All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.mermaid.min.js.map Maven / Gradle / Ivy

Go to download

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

The newest version!
{
  "version": 3,
  "sources": ["../../../node_modules/.pnpm/[email protected]/node_modules/dayjs/dayjs.min.js", "../src/logger.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/icon/defaults.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/customisations/defaults.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/icon/name.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/icon/transformations.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/icon/merge.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/icon-set/tree.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/svg/size.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/svg/defs.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/svg/build.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/svg/id.mjs", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/svg/html.mjs", "../../../node_modules/.pnpm/[email protected]/node_modules/ms/index.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/debug/src/common.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/debug/src/browser.js", "../../../node_modules/.pnpm/@[email protected]/node_modules/@iconify/utils/lib/index.mjs", "../src/rendering-util/icons.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/ts-dedent/src/index.ts", "../src/diagram-api/regexes.ts", "../src/errors.ts", "../src/diagram-api/detectType.ts", "../src/diagrams/c4/parser/c4Diagram.jison", "../src/assignWithDepth.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/utils/channel.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/utils/lang.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/utils/unit.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/utils/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/constants.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/channels/type.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/channels/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/channels/reusable.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/color/hex.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/color/hsl.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/color/keyword.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/color/rgb.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/color/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/change.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/rgba.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/channel.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/luminance.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/is_light.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/is_dark.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/adjust_channel.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/lighten.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/darken.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/adjust.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/mix.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/invert.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/methods/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/khroma/dist/index.js", "../src/themes/erDiagram-oldHardcodedValues.ts", "../src/themes/theme-helpers.js", "../src/themes/theme-base.js", "../src/themes/theme-dark.js", "../src/themes/theme-default.js", "../src/themes/theme-forest.js", "../src/themes/theme-neutral.js", "../src/themes/index.js", "../src/schemas/config.schema.yaml", "../src/defaultConfig.ts", "../src/utils/sanitizeDirective.ts", "../src/config.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/dompurify/src/utils.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dompurify/src/tags.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dompurify/src/attrs.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dompurify/src/regexp.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dompurify/src/purify.js", "../../../node_modules/.pnpm/[email protected]/node_modules/katex/dist/katex.mjs", "../src/diagrams/common/common.ts", "../src/setupGraphViewbox.js", "../src/styles.ts", "../src/diagrams/common/commonDb.ts", "../src/diagram-api/diagramAPI.ts", "../src/diagrams/c4/c4Db.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/ascending.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/descending.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/bisector.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/number.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/bisect.js", "../../../node_modules/.pnpm/[email protected]/node_modules/internmap/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/ticks.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/max.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/min.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/range.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-axis/src/identity.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-axis/src/axis.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-axis/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-dispatch/src/dispatch.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-dispatch/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/namespaces.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/namespace.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/creator.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selector.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/select.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/array.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selectorAll.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/selectAll.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/matcher.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/selectChild.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/selectChildren.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/filter.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/sparse.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/enter.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/constant.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/data.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/exit.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/join.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/merge.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/order.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/sort.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/call.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/nodes.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/node.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/size.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/empty.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/each.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/attr.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/window.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/style.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/property.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/classed.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/text.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/html.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/raise.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/lower.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/append.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/insert.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/remove.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/clone.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/datum.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/on.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/dispatch.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/iterator.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/selection/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/select.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-selection/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-drag/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-color/src/define.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-color/src/color.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-color/src/math.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-color/src/lab.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-color/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/basis.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/basisClosed.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/constant.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/color.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/rgb.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/numberArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/array.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/date.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/number.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/object.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/string.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/value.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/round.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/transform/decompose.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/transform/parse.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/transform/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/hcl.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-interpolate/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-timer/src/timer.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-timer/src/timeout.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-timer/src/index.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/schedule.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/interrupt.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/selection/interrupt.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/tween.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/interpolate.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/attr.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/attrTween.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/delay.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/duration.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/ease.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/easeVarying.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/filter.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/merge.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/on.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/remove.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/select.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/selectAll.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/selection.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/style.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/styleTween.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/text.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/textTween.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/transition.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/end.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/transition/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-ease/src/cubic.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-ease/src/index.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/selection/transition.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/selection/index.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/d3-transition/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-brush/src/constant.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-brush/src/event.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-brush/src/noevent.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-brush/src/brush.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-brush/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-path/src/path.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-path/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-chord/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-contour/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-delaunay/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-dsv/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-fetch/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-quadtree/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-force/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/formatDecimal.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/exponent.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/formatGroup.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/formatNumerals.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/formatSpecifier.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/formatTrim.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/formatPrefixAuto.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/formatRounded.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/formatTypes.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/identity.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/locale.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/defaultLocale.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/precisionFixed.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/precisionPrefix.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/precisionRound.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-format/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-geo/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-hierarchy/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-polygon/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-random/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/init.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/ordinal.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/band.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/constant.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/number.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/continuous.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/tickFormat.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/linear.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/nice.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/interval.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/millisecond.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/second.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/minute.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/hour.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/day.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/week.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/month.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/year.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/ticks.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time-format/src/locale.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time-format/src/defaultLocale.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-time-format/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/time.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale-chromatic/src/colors.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-scale-chromatic/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/constant.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/math.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/path.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/arc.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/array.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/linear.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/point.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/line.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/descending.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/identity.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/pie.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/bump.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/noop.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/basis.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/basisClosed.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/basisOpen.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/bundle.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/cardinal.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/cardinalClosed.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/cardinalOpen.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/catmullRom.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/catmullRomClosed.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/catmullRomOpen.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/linearClosed.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/monotone.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/natural.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/curve/step.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-zoom/src/constant.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-zoom/src/event.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-zoom/src/transform.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-zoom/src/noevent.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-zoom/src/zoom.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-zoom/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3/src/index.js", "../../../node_modules/.pnpm/@[email protected]/node_modules/@braintree/sanitize-url/dist/constants.js", "../../../node_modules/.pnpm/@[email protected]/node_modules/@braintree/sanitize-url/dist/index.js", "../src/diagrams/common/svgDrawCommon.ts", "../src/diagrams/c4/svgDraw.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_freeGlobal.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_root.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_Symbol.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getRawTag.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_objectToString.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseGetTag.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isObject.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isFunction.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_coreJsData.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_isMasked.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_toSource.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsNative.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getValue.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getNative.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_nativeCreate.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_hashClear.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_hashDelete.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_hashGet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_hashHas.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_hashSet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_Hash.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_listCacheClear.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/eq.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_assocIndexOf.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_listCacheDelete.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_listCacheGet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_listCacheHas.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_listCacheSet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_ListCache.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_Map.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_mapCacheClear.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_isKeyable.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getMapData.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_mapCacheDelete.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_mapCacheGet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_mapCacheHas.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_mapCacheSet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_MapCache.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/memoize.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_stackClear.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_stackDelete.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_stackGet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_stackHas.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_stackSet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_Stack.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_defineProperty.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseAssignValue.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_assignMergeValue.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_createBaseFor.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseFor.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_cloneBuffer.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_Uint8Array.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_cloneArrayBuffer.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_cloneTypedArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_copyArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseCreate.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_overArg.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getPrototype.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_isPrototype.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_initCloneObject.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isObjectLike.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsArguments.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isArguments.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isLength.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isArrayLike.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isArrayLikeObject.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/stubFalse.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isBuffer.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isPlainObject.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsTypedArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseUnary.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_nodeUtil.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isTypedArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_safeGet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_assignValue.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_copyObject.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseTimes.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_isIndex.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayLikeKeys.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_nativeKeysIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseKeysIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/keysIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/toPlainObject.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseMergeDeep.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseMerge.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/identity.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_apply.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_overRest.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/constant.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseSetToString.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_shortOut.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_setToString.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseRest.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_isIterateeCall.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_createAssigner.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/merge.js", "../src/utils.ts", "../src/diagrams/c4/c4Renderer.js", "../src/diagrams/c4/styles.js", "../src/diagrams/c4/c4Diagram.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/defaults.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/helpers.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/Tokenizer.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/rules.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/Lexer.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/Renderer.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/TextRenderer.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/Parser.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/Hooks.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/Instance.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/marked/src/marked.ts", "../src/rendering-util/handle-markdown-text.ts", "../src/rendering-util/splitText.ts", "../src/rendering-util/createText.ts", "../src/rendering-util/rendering-elements/shapes/util.ts", "../src/rendering-util/rendering-elements/intersect/intersect-node.js", "../src/rendering-util/rendering-elements/intersect/intersect-ellipse.js", "../src/rendering-util/rendering-elements/intersect/intersect-circle.js", "../src/rendering-util/rendering-elements/intersect/intersect-line.js", "../src/rendering-util/rendering-elements/intersect/intersect-polygon.js", "../src/rendering-util/rendering-elements/intersect/intersect-rect.js", "../src/rendering-util/rendering-elements/intersect/index.js", "../src/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.ts", "../../../node_modules/.pnpm/[email protected]_patch_hash=vxb6t6fqvzyhwhtjiliqr25jyq/node_modules/roughjs/bundled/rough.esm.js", "../src/rendering-util/rendering-elements/shapes/anchor.ts", "../src/rendering-util/rendering-elements/shapes/bowTieRect.ts", "../src/rendering-util/rendering-elements/shapes/insertPolygonShape.ts", "../src/rendering-util/rendering-elements/shapes/card.ts", "../src/rendering-util/rendering-elements/shapes/choice.ts", "../src/rendering-util/rendering-elements/shapes/circle.ts", "../src/rendering-util/rendering-elements/shapes/crossedCircle.ts", "../src/rendering-util/rendering-elements/shapes/curlyBraceLeft.ts", "../src/rendering-util/rendering-elements/shapes/curlyBraceRight.ts", "../src/rendering-util/rendering-elements/shapes/curlyBraces.ts", "../src/rendering-util/rendering-elements/shapes/curvedTrapezoid.ts", "../src/rendering-util/rendering-elements/shapes/cylinder.ts", "../src/rendering-util/rendering-elements/shapes/dividedRect.ts", "../src/rendering-util/rendering-elements/shapes/doubleCircle.ts", "../src/rendering-util/rendering-elements/shapes/filledCircle.ts", "../src/rendering-util/rendering-elements/shapes/flippedTriangle.ts", "../src/rendering-util/rendering-elements/shapes/forkJoin.ts", "../src/rendering-util/rendering-elements/shapes/halfRoundedRectangle.ts", "../src/rendering-util/rendering-elements/shapes/hexagon.ts", "../src/rendering-util/rendering-elements/shapes/hourglass.ts", "../src/rendering-util/rendering-elements/shapes/icon.ts", "../src/rendering-util/rendering-elements/shapes/iconCircle.ts", "../src/rendering-util/rendering-elements/shapes/roundedRectPath.ts", "../src/rendering-util/rendering-elements/shapes/iconRounded.ts", "../src/rendering-util/rendering-elements/shapes/iconSquare.ts", "../src/rendering-util/rendering-elements/shapes/imageSquare.ts", "../src/rendering-util/rendering-elements/shapes/invertedTrapezoid.ts", "../src/rendering-util/rendering-elements/shapes/drawRect.ts", "../src/rendering-util/rendering-elements/shapes/labelRect.ts", "../src/rendering-util/rendering-elements/shapes/leanLeft.ts", "../src/rendering-util/rendering-elements/shapes/leanRight.ts", "../src/rendering-util/rendering-elements/shapes/lightningBolt.ts", "../src/rendering-util/rendering-elements/shapes/linedCylinder.ts", "../src/rendering-util/rendering-elements/shapes/linedWaveEdgedRect.ts", "../src/rendering-util/rendering-elements/shapes/multiRect.ts", "../src/rendering-util/rendering-elements/shapes/multiWaveEdgedRectangle.ts", "../src/rendering-util/rendering-elements/shapes/note.ts", "../src/rendering-util/rendering-elements/shapes/question.ts", "../src/rendering-util/rendering-elements/shapes/rectLeftInvArrow.ts", "../src/rendering-util/rendering-elements/createLabel.js", "../src/rendering-util/rendering-elements/shapes/rectWithTitle.ts", "../src/rendering-util/rendering-elements/shapes/roundedRect.ts", "../src/rendering-util/rendering-elements/shapes/shadedProcess.ts", "../src/rendering-util/rendering-elements/shapes/slopedRect.ts", "../src/rendering-util/rendering-elements/shapes/squareRect.ts", "../src/rendering-util/rendering-elements/shapes/stadium.ts", "../src/rendering-util/rendering-elements/shapes/state.ts", "../src/rendering-util/rendering-elements/shapes/stateEnd.ts", "../src/rendering-util/rendering-elements/shapes/stateStart.ts", "../src/rendering-util/rendering-elements/shapes/subroutine.ts", "../src/rendering-util/rendering-elements/shapes/taggedRect.ts", "../src/rendering-util/rendering-elements/shapes/taggedWaveEdgedRectangle.ts", "../src/rendering-util/rendering-elements/shapes/text.ts", "../src/rendering-util/rendering-elements/shapes/tiltedCylinder.ts", "../src/rendering-util/rendering-elements/shapes/trapezoid.ts", "../src/rendering-util/rendering-elements/shapes/trapezoidalPentagon.ts", "../src/rendering-util/rendering-elements/shapes/triangle.ts", "../src/rendering-util/rendering-elements/shapes/waveEdgedRectangle.ts", "../src/rendering-util/rendering-elements/shapes/waveRectangle.ts", "../src/rendering-util/rendering-elements/shapes/windowPane.ts", "../src/diagrams/class/shapeUtil.ts", "../src/rendering-util/rendering-elements/shapes/classBox.ts", "../src/rendering-util/rendering-elements/shapes/kanbanItem.ts", "../src/rendering-util/rendering-elements/shapes.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/js-yaml/dist/js-yaml.mjs", "../src/diagrams/flowchart/flowDb.ts", "../src/rendering-util/insertElementsForSize.js", "../src/utils/subGraphTitleMargins.ts", "../src/rendering-util/rendering-elements/clusters.js", "../src/utils/lineWithOffset.ts", "../src/rendering-util/rendering-elements/edgeMarker.ts", "../src/rendering-util/rendering-elements/edges.js", "../src/rendering-util/rendering-elements/markers.js", "../src/rendering-util/rendering-elements/nodes.ts", "../src/internals.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isSymbol.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayMap.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseToString.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_trimmedEndIndex.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseTrim.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/toNumber.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/toFinite.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/toInteger.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_WeakMap.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/noop.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayEach.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseFindIndex.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsNaN.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_strictIndexOf.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIndexOf.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayIncludes.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_nativeKeys.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseKeys.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/keys.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/assign.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_isKey.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_memoizeCapped.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_stringToPath.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/toString.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_castPath.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_toKey.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseGet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/get.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayPush.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_isFlattenable.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseFlatten.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/flatten.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_flatRest.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseSlice.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_hasUnicode.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayReduce.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseAssign.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseAssignIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayFilter.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/stubArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getSymbols.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_copySymbols.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getSymbolsIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_copySymbolsIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseGetAllKeys.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getAllKeys.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getAllKeysIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_DataView.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_Promise.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_Set.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getTag.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_initCloneArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_cloneDataView.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_cloneRegExp.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_cloneSymbol.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_initCloneByTag.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsMap.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isMap.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsSet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isSet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseClone.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/clone.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/cloneDeep.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/compact.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_setCacheAdd.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_setCacheHas.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_SetCache.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arraySome.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_cacheHas.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_equalArrays.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_mapToArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_setToArray.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_equalByTag.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_equalObjects.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsEqualDeep.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsEqual.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsMatch.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_isStrictComparable.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_getMatchData.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_matchesStrictComparable.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseMatches.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseHasIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_hasPath.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/hasIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseMatchesProperty.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseProperty.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_basePropertyDeep.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/property.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIteratee.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayAggregator.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseForOwn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_createBaseEach.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseEach.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseAggregator.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_createAggregator.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/now.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/defaults.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayIncludesWith.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseDifference.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/difference.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/last.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/drop.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/dropRight.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_castFunction.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/forEach.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/each.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_arrayEvery.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseEvery.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/every.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseFilter.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/filter.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_createFind.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/findIndex.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/find.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/head.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/first.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseMap.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/map.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/flatMap.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/forIn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/forOwn.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/groupBy.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseGt.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseHas.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/has.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isString.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseValues.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/values.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/includes.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/indexOf.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isEmpty.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseIsRegExp.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isRegExp.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/isUndefined.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseLt.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/mapValues.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseExtremum.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/max.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/min.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/minBy.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/negate.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseSet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_basePickBy.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/pickBy.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseSortBy.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_compareAscending.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_compareMultiple.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseOrderBy.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_asciiSize.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_unicodeSize.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_stringSize.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_basePick.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/pick.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseRange.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_createRange.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/range.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseReduce.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/reduce.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/reject.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/size.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseSome.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/some.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/sortBy.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_createSet.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseUniq.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/union.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/uniq.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/uniqBy.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/uniqueId.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/_baseZipObject.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/zipObject.js", "../../../node_modules/.pnpm/[email protected]/node_modules/lodash-es/lodash.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/graph.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/data/list.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/greedy-fas.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/acyclic.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/util.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/add-border-segments.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/coordinate-system.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/normalize.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/rank/util.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/components.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/data/priority-queue.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/tarjan.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/find-cycles.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/prim.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/alg/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/rank/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/nesting-graph.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/order/cross-count.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/order/init-order.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/order/barycenter.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/order/sort.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/order/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/position/bk.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/position/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/layout.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/dagre/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dagre-d3-es/src/graphlib/json.js", "../src/rendering-util/layout-algorithms/dagre/mermaid-graphlib.js", "../src/rendering-util/layout-algorithms/dagre/index.js", "../src/rendering-util/render.ts", "../src/rendering-util/setupViewPortForSVG.ts", "../src/diagrams/flowchart/flowRenderer-v3-unified.ts", "../src/diagrams/flowchart/parser/flow.jison", "../src/diagrams/flowchart/styles.ts", "../src/diagrams/flowchart/flowDiagram.ts", "../src/diagrams/er/parser/erDiagram.jison", "../src/diagrams/er/erDb.js", "../src/diagrams/er/erMarkers.js", "../../../node_modules/.pnpm/[email protected]/node_modules/uuid/dist/esm-browser/regex.js", "../../../node_modules/.pnpm/[email protected]/node_modules/uuid/dist/esm-browser/validate.js", "../../../node_modules/.pnpm/[email protected]/node_modules/uuid/dist/esm-browser/stringify.js", "../../../node_modules/.pnpm/[email protected]/node_modules/uuid/dist/esm-browser/parse.js", "../../../node_modules/.pnpm/[email protected]/node_modules/uuid/dist/esm-browser/v35.js", "../../../node_modules/.pnpm/[email protected]/node_modules/uuid/dist/esm-browser/sha1.js", "../../../node_modules/.pnpm/[email protected]/node_modules/uuid/dist/esm-browser/v5.js", "../../../node_modules/.pnpm/[email protected]/node_modules/uuid/dist/esm-browser/index.js", "../src/diagrams/er/erRenderer.js", "../src/diagrams/er/styles.js", "../src/diagrams/er/erDiagram.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/syntax-tree.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/stream.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/cst-utils.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/errors.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/languages/generated/ast.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/ast-utils.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/regexp-to-ast/src/utils.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/regexp-to-ast/src/character-classes.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/regexp-to-ast/src/regexp-parser.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/regexp-to-ast/src/base-regexp-visitor.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/regexp-to-ast/src/api.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/regexp-utils.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/grammar-utils.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/languages/grammar-config.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/version.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/utils/src/print.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/utils/src/timer.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/utils/src/to-fast-properties.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/utils/src/api.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/gast/src/model.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/gast/src/visitor.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/gast/src/helpers.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/gast/src/api.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/rest.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/first.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/constants.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/follow.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/scan/reg_exp_parser.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/scan/reg_exp.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/scan/lexer.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/scan/tokens.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/scan/lexer_errors_public.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/scan/lexer_public.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/scan/tokens_public.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/errors_public.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/resolver.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/interpreter.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/lookahead.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/checks.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/gast/gast_resolver_public.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/exceptions_public.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/recoverable.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/keys.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/grammar/llk_lookahead.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/looksahead.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/cst/cst.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/lang/lang_extensions.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/cst/cst_visitor.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/tree_builder.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/lexer_adapter.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/recognizer_api.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/recognizer_engine.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/error_handler.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/context_assist.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/gast_recorder.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/traits/perf_tracer.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/utils/apply_mixins.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/parse/parser/parser.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/cst-dts-gen/src/model.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/cst-dts-gen/src/generate.ts", "../../../node_modules/.pnpm/@[email protected]/node_modules/@chevrotain/cst-dts-gen/src/api.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/diagrams/render_public.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/chevrotain/src/api.ts", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/chevrotain-allstar/src/atn.ts", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/chevrotain-allstar/src/dfa.ts", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/chevrotain-allstar/src/all-star-lookahead.ts", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/chevrotain-allstar/src/index.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-languageserver-types/lib/esm/main.js", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/cst-node-builder.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/langium-parser.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/parser-builder-base.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/completion-parser-builder.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/langium-parser-builder.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/token-builder.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/value-converter.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/ral.js", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/is.js", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/events.js", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/cancellation.js", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/cancellation.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/promise-utils.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-languageserver-textdocument/lib/esm/main.js", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-uri/lib/esm/webpack:/LIB/node_modules/path-browserify/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-uri/lib/esm/webpack:/LIB/webpack/bootstrap", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-uri/lib/esm/webpack:/LIB/webpack/runtime/define property getters", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-uri/lib/esm/webpack:/LIB/webpack/runtime/hasOwnProperty shorthand", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-uri/lib/esm/webpack:/LIB/webpack/runtime/make namespace object", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-uri/lib/esm/webpack:/LIB/src/platform.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-uri/lib/esm/webpack:/LIB/src/uri.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/vscode-uri/lib/esm/webpack:/LIB/src/utils.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/uri-utils.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/documents.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/references/linker.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/references/name-provider.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/references/references.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/collections.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/references/scope-computation.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/references/scope.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/caching.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/references/scope-provider.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/serializer/json-serializer.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/service-registry.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/validation/validation-registry.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/validation/document-validator.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/ast-descriptions.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/ast-node-locator.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/configuration.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/disposable.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/document-builder.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/index-manager.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/workspace-manager.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/lexer.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/documentation/jsdoc.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/documentation/documentation-provider.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/documentation/comment-provider.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/event.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/async-parser.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/workspace-lock.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/serializer/hydrator.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/default-module.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/dependency-injection.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/services.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/documentation/index.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/languages/language-meta-data.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/languages/index.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/parser-config.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/parser/index.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/references/index.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/serializer/index.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/file-system-provider.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/grammar-loader.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/utils/index.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/validation/index.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/workspace/index.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/langium/src/index.ts", "../../parser/dist/chunks/mermaid-parser.core/chunk-Y27MQZ3U.mjs", "../../parser/dist/chunks/mermaid-parser.core/chunk-NCMFTTUW.mjs", "../../parser/dist/chunks/mermaid-parser.core/chunk-4YFB5VUC.mjs", "../../parser/dist/chunks/mermaid-parser.core/chunk-EQFLFMNE.mjs", "../../parser/dist/chunks/mermaid-parser.core/chunk-BI6EQKOQ.mjs", "../../parser/dist/chunks/mermaid-parser.core/chunk-FF7BQXOH.mjs", "../../parser/dist/chunks/mermaid-parser.core/info-46DW6VJ7.mjs", "../../parser/dist/chunks/mermaid-parser.core/packet-W2GHVCYJ.mjs", "../../parser/dist/chunks/mermaid-parser.core/pie-BEWT4RHE.mjs", "../../parser/dist/chunks/mermaid-parser.core/architecture-I3QFYML2.mjs", "../../parser/dist/chunks/mermaid-parser.core/gitGraph-YCYPL57B.mjs", "../../parser/dist/mermaid-parser.core.mjs", "../src/diagrams/common/populateCommonDb.ts", "../src/diagrams/git/gitGraphTypes.ts", "../src/utils/imperativeState.ts", "../src/diagrams/git/gitGraphAst.ts", "../src/diagrams/git/gitGraphParser.ts", "../src/diagrams/git/gitGraphRenderer.ts", "../src/diagrams/git/styles.js", "../src/diagrams/git/gitGraphDiagram.ts", "../src/diagrams/gantt/parser/gantt.jison", "../../../node_modules/.pnpm/[email protected]/node_modules/dayjs/plugin/isoWeek.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dayjs/plugin/customParseFormat.js", "../../../node_modules/.pnpm/[email protected]/node_modules/dayjs/plugin/advancedFormat.js", "../src/diagrams/gantt/ganttDb.js", "../src/diagrams/gantt/ganttRenderer.js", "../src/diagrams/gantt/styles.js", "../src/diagrams/gantt/ganttDiagram.ts", "../src/diagrams/info/infoParser.ts", "../package.json", "../src/diagrams/info/infoDb.ts", "../src/rendering-util/selectSvgElement.ts", "../src/diagrams/info/infoRenderer.ts", "../src/diagrams/info/infoDiagram.ts", "../src/diagrams/pie/pieDb.ts", "../src/diagrams/pie/pieParser.ts", "../src/diagrams/pie/pieStyles.ts", "../src/diagrams/pie/pieRenderer.ts", "../src/diagrams/pie/pieDiagram.ts", "../src/diagrams/quadrant-chart/parser/quadrant.jison", "../src/diagrams/quadrant-chart/quadrantBuilder.ts", "../src/diagrams/quadrant-chart/utils.ts", "../src/diagrams/quadrant-chart/quadrantDb.ts", "../src/diagrams/quadrant-chart/quadrantRenderer.ts", "../src/diagrams/quadrant-chart/quadrantDiagram.ts", "../src/diagrams/xychart/parser/xychart.jison", "../src/diagrams/xychart/chartBuilder/interfaces.ts", "../src/diagrams/xychart/chartBuilder/textDimensionCalculator.ts", "../src/diagrams/xychart/chartBuilder/components/axis/baseAxis.ts", "../src/diagrams/xychart/chartBuilder/components/axis/bandAxis.ts", "../src/diagrams/xychart/chartBuilder/components/axis/linearAxis.ts", "../src/diagrams/xychart/chartBuilder/components/axis/index.ts", "../src/diagrams/xychart/chartBuilder/components/chartTitle.ts", "../src/diagrams/xychart/chartBuilder/components/plot/linePlot.ts", "../src/diagrams/xychart/chartBuilder/components/plot/barPlot.ts", "../src/diagrams/xychart/chartBuilder/components/plot/index.ts", "../src/diagrams/xychart/chartBuilder/orchestrator.ts", "../src/diagrams/xychart/chartBuilder/index.ts", "../src/diagrams/xychart/xychartDb.ts", "../src/diagrams/xychart/xychartRenderer.ts", "../src/diagrams/xychart/xychartDiagram.ts", "../src/diagrams/requirement/parser/requirementDiagram.jison", "../src/diagrams/requirement/requirementDb.js", "../src/diagrams/requirement/styles.js", "../src/diagrams/requirement/requirementMarkers.js", "../src/diagrams/requirement/requirementRenderer.js", "../src/diagrams/requirement/requirementDiagram.ts", "../src/diagrams/sequence/parser/sequenceDiagram.jison", "../src/diagrams/sequence/sequenceDb.ts", "../src/diagrams/sequence/styles.js", "../src/diagrams/sequence/svgDraw.js", "../src/diagrams/sequence/sequenceRenderer.ts", "../src/diagrams/sequence/sequenceDiagram.ts", "../src/diagrams/class/parser/classDiagram.jison", "../src/diagrams/class/classTypes.ts", "../src/diagrams/class/classDb.ts", "../src/diagrams/class/styles.js", "../src/diagrams/class/classRenderer-v3-unified.ts", "../src/diagrams/class/classDiagram.ts", "../src/diagrams/class/classDiagram-v2.ts", "../src/diagrams/state/parser/stateDiagram.jison", "../src/diagrams/state/stateCommon.ts", "../src/diagrams/state/dataFetcher.js", "../src/diagrams/state/stateRenderer-v3-unified.ts", "../src/diagrams/state/stateDb.js", "../src/diagrams/state/styles.js", "../src/diagrams/state/id-cache.js", "../src/diagrams/state/shapes.js", "../src/diagrams/state/stateRenderer.js", "../src/diagrams/state/stateDiagram.ts", "../src/diagrams/state/stateDiagram-v2.ts", "../src/diagrams/user-journey/parser/journey.jison", "../src/diagrams/user-journey/journeyDb.js", "../src/diagrams/user-journey/styles.js", "../src/diagrams/user-journey/svgDraw.js", "../src/diagrams/user-journey/journeyRenderer.ts", "../src/diagrams/user-journey/journeyDiagram.ts", "../src/diagrams/timeline/parser/timeline.jison", "../src/diagrams/timeline/timelineDb.js", "../src/diagrams/timeline/svgDraw.js", "../src/diagrams/timeline/timelineRenderer.ts", "../src/diagrams/timeline/styles.js", "../src/diagrams/timeline/timeline-definition.ts", "../src/diagrams/mindmap/parser/mindmap.jison", "../src/diagrams/mindmap/mindmapDb.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/cytoscape/dist/cytoscape.esm.mjs", "../../../node_modules/.pnpm/[email protected]/node_modules/layout-base/layout-base.js", "../../../node_modules/.pnpm/[email protected]/node_modules/cose-base/cose-base.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js", "../src/diagrams/mindmap/svgDraw.ts", "../src/diagrams/mindmap/mindmapRenderer.ts", "../src/diagrams/mindmap/styles.ts", "../src/diagrams/mindmap/mindmap-definition.ts", "../src/diagrams/kanban/parser/kanban.jison", "../src/diagrams/kanban/kanbanDb.ts", "../src/diagrams/kanban/kanbanRenderer.ts", "../src/diagrams/kanban/styles.ts", "../src/diagrams/kanban/kanban-definition.ts", "../src/diagrams/sankey/parser/sankey.jison", "../src/diagrams/sankey/sankeyDB.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/max.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/min.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/sum.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-array/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-sankey/src/align.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-sankey/src/constant.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-sankey/src/sankey.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-path/src/path.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-path/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/constant.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/point.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/array.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/link/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-shape/src/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-sankey/src/sankeyLinkHorizontal.js", "../../../node_modules/.pnpm/[email protected]/node_modules/d3-sankey/src/index.js", "../src/rendering-util/uid.ts", "../src/diagrams/sankey/sankeyRenderer.ts", "../src/diagrams/sankey/sankeyUtils.ts", "../src/diagrams/sankey/sankeyDiagram.ts", "../src/diagrams/packet/db.ts", "../src/diagrams/packet/parser.ts", "../src/diagrams/packet/renderer.ts", "../src/diagrams/packet/styles.ts", "../src/diagrams/packet/diagram.ts", "../src/diagrams/block/parser/block.jison", "../src/diagrams/block/blockDB.ts", "../src/diagrams/block/styles.ts", "../src/dagre-wrapper/markers.js", "../src/diagrams/block/layout.ts", "../src/dagre-wrapper/createLabel.js", "../src/dagre-wrapper/edgeMarker.ts", "../src/dagre-wrapper/edges.js", "../src/dagre-wrapper/blockArrowHelper.ts", "../src/dagre-wrapper/intersect/intersect-node.js", "../src/dagre-wrapper/intersect/intersect-ellipse.js", "../src/dagre-wrapper/intersect/intersect-circle.js", "../src/dagre-wrapper/intersect/intersect-line.js", "../src/dagre-wrapper/intersect/intersect-polygon.js", "../src/dagre-wrapper/intersect/intersect-rect.js", "../src/dagre-wrapper/intersect/index.js", "../src/dagre-wrapper/shapes/util.js", "../src/dagre-wrapper/shapes/note.js", "../src/dagre-wrapper/nodes.js", "../src/diagrams/block/renderHelpers.ts", "../src/diagrams/block/blockRenderer.ts", "../src/diagrams/block/blockDiagram.ts", "../src/diagrams/architecture/architectureTypes.ts", "../src/diagrams/architecture/architectureDb.ts", "../src/diagrams/architecture/architectureParser.ts", "../src/diagrams/architecture/architectureStyles.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/layout-base/layout-base.js", "../../../node_modules/.pnpm/[email protected]/node_modules/cose-base/cose-base.js", "../../../node_modules/.pnpm/[email protected][email protected]/node_modules/cytoscape-fcose/cytoscape-fcose.js", "../src/diagrams/architecture/architectureIcons.ts", "../src/diagrams/architecture/svgDraw.ts", "../src/diagrams/architecture/architectureRenderer.ts", "../src/diagrams/architecture/architectureDiagram.ts", "../src/mermaid.ts", "../src/diagrams/c4/c4Detector.ts", "../src/diagrams/flowchart/flowDetector.ts", "../src/diagrams/flowchart/flowDetector-v2.ts", "../src/diagrams/er/erDetector.ts", "../src/diagrams/git/gitGraphDetector.ts", "../src/diagrams/gantt/ganttDetector.ts", "../src/diagrams/info/infoDetector.ts", "../src/diagrams/pie/pieDetector.ts", "../src/diagrams/quadrant-chart/quadrantDetector.ts", "../src/diagrams/xychart/xychartDetector.ts", "../src/diagrams/requirement/requirementDetector.ts", "../src/diagrams/sequence/sequenceDetector.ts", "../src/diagrams/class/classDetector.ts", "../src/diagrams/class/classDetector-V2.ts", "../src/diagrams/state/stateDetector.ts", "../src/diagrams/state/stateDetector-V2.ts", "../src/diagrams/user-journey/journeyDetector.ts", "../src/diagrams/error/errorRenderer.ts", "../src/diagrams/error/errorDiagram.ts", "../src/diagrams/flowchart/elk/detector.ts", "../src/diagrams/timeline/detector.ts", "../src/diagrams/mindmap/detector.ts", "../src/diagrams/kanban/detector.ts", "../src/diagrams/sankey/sankeyDetector.ts", "../src/diagrams/packet/detector.ts", "../src/diagrams/block/blockDetector.ts", "../src/diagrams/architecture/architectureDetector.ts", "../src/diagram-api/diagram-orchestration.ts", "../src/diagram-api/loadDiagram.ts", "../src/mermaidAPI.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/stylis/src/Enum.js", "../../../node_modules/.pnpm/[email protected]/node_modules/stylis/src/Utility.js", "../../../node_modules/.pnpm/[email protected]/node_modules/stylis/src/Tokenizer.js", "../../../node_modules/.pnpm/[email protected]/node_modules/stylis/src/Parser.js", "../../../node_modules/.pnpm/[email protected]/node_modules/stylis/src/Serializer.js", "../src/accessibility.ts", "../src/Diagram.ts", "../src/interactionDb.ts", "../src/diagram-api/comments.ts", "../src/diagram-api/frontmatter.ts", "../src/preprocess.ts", "../src/utils/base64.ts"],
  "sourcesContent": ["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) = {\n  trace: 0,\n  debug: 1,\n  info: 2,\n  warn: 3,\n  error: 4,\n  fatal: 5,\n};\n\nexport const log: Record = {\n  trace: (..._args: any[]) => {},\n  debug: (..._args: any[]) => {},\n  info: (..._args: any[]) => {},\n  warn: (..._args: any[]) => {},\n  error: (..._args: any[]) => {},\n  fatal: (..._args: any[]) => {},\n};\n\n/**\n * Sets a log level\n *\n * @param level - The level to set the logging to. Default is `\"fatal\"`\n */\nexport const setLogLevel = function (level: keyof typeof LEVELS | number = 'fatal') {\n  let numericLevel: number = LEVELS.fatal;\n  if (typeof level === 'string') {\n    if (level.toLowerCase() in LEVELS) {\n      numericLevel = LEVELS[level];\n    }\n  } else if (typeof level === 'number') {\n    numericLevel = level;\n  }\n  log.trace = () => {};\n  log.debug = () => {};\n  log.info = () => {};\n  log.warn = () => {};\n  log.error = () => {};\n  log.fatal = () => {};\n\n  if (numericLevel <= LEVELS.fatal) {\n    log.fatal = console.error\n      ? console.error.bind(console, format('FATAL'), 'color: orange')\n      : console.log.bind(console, '\\x1b[35m', format('FATAL'));\n  }\n  if (numericLevel <= LEVELS.error) {\n    log.error = console.error\n      ? console.error.bind(console, format('ERROR'), 'color: orange')\n      : console.log.bind(console, '\\x1b[31m', format('ERROR'));\n  }\n  if (numericLevel <= LEVELS.warn) {\n    log.warn = console.warn\n      ? console.warn.bind(console, format('WARN'), 'color: orange')\n      : console.log.bind(console, `\\x1b[33m`, format('WARN'));\n  }\n  if (numericLevel <= LEVELS.info) {\n    log.info = console.info\n      ? console.info.bind(console, format('INFO'), 'color: lightblue')\n      : console.log.bind(console, '\\x1b[34m', format('INFO'));\n  }\n  if (numericLevel <= LEVELS.debug) {\n    log.debug = console.debug\n      ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen')\n      : console.log.bind(console, '\\x1b[32m', format('DEBUG'));\n  }\n  if (numericLevel <= LEVELS.trace) {\n    log.trace = console.debug\n      ? console.debug.bind(console, format('TRACE'), 'color: lightgreen')\n      : console.log.bind(console, '\\x1b[32m', format('TRACE'));\n  }\n};\n\n/**\n * Returns a format with the timestamp and the log level\n *\n * @param level - The level for the log format\n * @returns The format with the timestamp and log level\n */\nconst format = (level: Uppercase): string => {\n  const time = dayjs().format('ss.SSS');\n  return `%c${time} : ${level} : `;\n};\n", "const defaultIconDimensions = Object.freeze(\n  {\n    left: 0,\n    top: 0,\n    width: 16,\n    height: 16\n  }\n);\nconst defaultIconTransformations = Object.freeze({\n  rotate: 0,\n  vFlip: false,\n  hFlip: false\n});\nconst defaultIconProps = Object.freeze({\n  ...defaultIconDimensions,\n  ...defaultIconTransformations\n});\nconst defaultExtendedIconProps = Object.freeze({\n  ...defaultIconProps,\n  body: \"\",\n  hidden: false\n});\n\nexport { defaultExtendedIconProps, defaultIconDimensions, defaultIconProps, defaultIconTransformations };\n", "import { defaultIconTransformations } from '../icon/defaults.mjs';\n\nconst defaultIconSizeCustomisations = Object.freeze({\n  width: null,\n  height: null\n});\nconst defaultIconCustomisations = Object.freeze({\n  // Dimensions\n  ...defaultIconSizeCustomisations,\n  // Transformations\n  ...defaultIconTransformations\n});\n\nexport { defaultIconCustomisations, defaultIconSizeCustomisations };\n", "const matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;\nconst stringToIcon = (value, validate, allowSimpleName, provider = \"\") => {\n  const colonSeparated = value.split(\":\");\n  if (value.slice(0, 1) === \"@\") {\n    if (colonSeparated.length < 2 || colonSeparated.length > 3) {\n      return null;\n    }\n    provider = colonSeparated.shift().slice(1);\n  }\n  if (colonSeparated.length > 3 || !colonSeparated.length) {\n    return null;\n  }\n  if (colonSeparated.length > 1) {\n    const name2 = colonSeparated.pop();\n    const prefix = colonSeparated.pop();\n    const result = {\n      // Allow provider without '@': \"provider:prefix:name\"\n      provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,\n      prefix,\n      name: name2\n    };\n    return validate && !validateIconName(result) ? null : result;\n  }\n  const name = colonSeparated[0];\n  const dashSeparated = name.split(\"-\");\n  if (dashSeparated.length > 1) {\n    const result = {\n      provider,\n      prefix: dashSeparated.shift(),\n      name: dashSeparated.join(\"-\")\n    };\n    return validate && !validateIconName(result) ? null : result;\n  }\n  if (allowSimpleName && provider === \"\") {\n    const result = {\n      provider,\n      prefix: \"\",\n      name\n    };\n    return validate && !validateIconName(result, allowSimpleName) ? null : result;\n  }\n  return null;\n};\nconst validateIconName = (icon, allowSimpleName) => {\n  if (!icon) {\n    return false;\n  }\n  return !!((icon.provider === \"\" || icon.provider.match(matchIconName)) && (allowSimpleName && icon.prefix === \"\" || icon.prefix.match(matchIconName)) && icon.name.match(matchIconName));\n};\n\nexport { matchIconName, stringToIcon, validateIconName };\n", "function mergeIconTransformations(obj1, obj2) {\n  const result = {};\n  if (!obj1.hFlip !== !obj2.hFlip) {\n    result.hFlip = true;\n  }\n  if (!obj1.vFlip !== !obj2.vFlip) {\n    result.vFlip = true;\n  }\n  const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;\n  if (rotate) {\n    result.rotate = rotate;\n  }\n  return result;\n}\n\nexport { mergeIconTransformations };\n", "import { defaultExtendedIconProps, defaultIconTransformations } from './defaults.mjs';\nimport { mergeIconTransformations } from './transformations.mjs';\n\nfunction mergeIconData(parent, child) {\n  const result = mergeIconTransformations(parent, child);\n  for (const key in defaultExtendedIconProps) {\n    if (key in defaultIconTransformations) {\n      if (key in parent && !(key in result)) {\n        result[key] = defaultIconTransformations[key];\n      }\n    } else if (key in child) {\n      result[key] = child[key];\n    } else if (key in parent) {\n      result[key] = parent[key];\n    }\n  }\n  return result;\n}\n\nexport { mergeIconData };\n", "function getIconsTree(data, names) {\n  const icons = data.icons;\n  const aliases = data.aliases || /* @__PURE__ */ Object.create(null);\n  const resolved = /* @__PURE__ */ Object.create(null);\n  function resolve(name) {\n    if (icons[name]) {\n      return resolved[name] = [];\n    }\n    if (!(name in resolved)) {\n      resolved[name] = null;\n      const parent = aliases[name] && aliases[name].parent;\n      const value = parent && resolve(parent);\n      if (value) {\n        resolved[name] = [parent].concat(value);\n      }\n    }\n    return resolved[name];\n  }\n  (names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);\n  return resolved;\n}\n\nexport { getIconsTree };\n", "import { mergeIconData } from '../icon/merge.mjs';\nimport { getIconsTree } from './tree.mjs';\nimport '../icon/defaults.mjs';\nimport '../icon/transformations.mjs';\n\nfunction internalGetIconData(data, name, tree) {\n  const icons = data.icons;\n  const aliases = data.aliases || /* @__PURE__ */ Object.create(null);\n  let currentProps = {};\n  function parse(name2) {\n    currentProps = mergeIconData(\n      icons[name2] || aliases[name2],\n      currentProps\n    );\n  }\n  parse(name);\n  tree.forEach(parse);\n  return mergeIconData(data, currentProps);\n}\nfunction getIconData(data, name) {\n  if (data.icons[name]) {\n    return internalGetIconData(data, name, []);\n  }\n  const tree = getIconsTree(data, [name])[name];\n  return tree ? internalGetIconData(data, name, tree) : null;\n}\n\nexport { getIconData, internalGetIconData };\n", "const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;\nconst unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;\nfunction calculateSize(size, ratio, precision) {\n  if (ratio === 1) {\n    return size;\n  }\n  precision = precision || 100;\n  if (typeof size === \"number\") {\n    return Math.ceil(size * ratio * precision) / precision;\n  }\n  if (typeof size !== \"string\") {\n    return size;\n  }\n  const oldParts = size.split(unitsSplit);\n  if (oldParts === null || !oldParts.length) {\n    return size;\n  }\n  const newParts = [];\n  let code = oldParts.shift();\n  let isNumber = unitsTest.test(code);\n  while (true) {\n    if (isNumber) {\n      const num = parseFloat(code);\n      if (isNaN(num)) {\n        newParts.push(code);\n      } else {\n        newParts.push(Math.ceil(num * ratio * precision) / precision);\n      }\n    } else {\n      newParts.push(code);\n    }\n    code = oldParts.shift();\n    if (code === void 0) {\n      return newParts.join(\"\");\n    }\n    isNumber = !isNumber;\n  }\n}\n\nexport { calculateSize };\n", "function splitSVGDefs(content, tag = \"defs\") {\n  let defs = \"\";\n  const index = content.indexOf(\"<\" + tag);\n  while (index >= 0) {\n    const start = content.indexOf(\">\", index);\n    const end = content.indexOf(\"\", end);\n    if (endEnd === -1) {\n      break;\n    }\n    defs += content.slice(start + 1, end).trim();\n    content = content.slice(0, index).trim() + content.slice(endEnd + 1);\n  }\n  return {\n    defs,\n    content\n  };\n}\nfunction mergeDefsAndContent(defs, content) {\n  return defs ? \"\" + defs + \"\" + content : content;\n}\nfunction wrapSVGContent(body, start, end) {\n  const split = splitSVGDefs(body);\n  return mergeDefsAndContent(split.defs, start + split.content + end);\n}\n\nexport { mergeDefsAndContent, splitSVGDefs, wrapSVGContent };\n", "import { defaultIconProps } from '../icon/defaults.mjs';\nimport { defaultIconCustomisations } from '../customisations/defaults.mjs';\nimport { calculateSize } from './size.mjs';\nimport { wrapSVGContent } from './defs.mjs';\n\nconst isUnsetKeyword = (value) => value === \"unset\" || value === \"undefined\" || value === \"none\";\nfunction iconToSVG(icon, customisations) {\n  const fullIcon = {\n    ...defaultIconProps,\n    ...icon\n  };\n  const fullCustomisations = {\n    ...defaultIconCustomisations,\n    ...customisations\n  };\n  const box = {\n    left: fullIcon.left,\n    top: fullIcon.top,\n    width: fullIcon.width,\n    height: fullIcon.height\n  };\n  let body = fullIcon.body;\n  [fullIcon, fullCustomisations].forEach((props) => {\n    const transformations = [];\n    const hFlip = props.hFlip;\n    const vFlip = props.vFlip;\n    let rotation = props.rotate;\n    if (hFlip) {\n      if (vFlip) {\n        rotation += 2;\n      } else {\n        transformations.push(\n          \"translate(\" + (box.width + box.left).toString() + \" \" + (0 - box.top).toString() + \")\"\n        );\n        transformations.push(\"scale(-1 1)\");\n        box.top = box.left = 0;\n      }\n    } else if (vFlip) {\n      transformations.push(\n        \"translate(\" + (0 - box.left).toString() + \" \" + (box.height + box.top).toString() + \")\"\n      );\n      transformations.push(\"scale(1 -1)\");\n      box.top = box.left = 0;\n    }\n    let tempValue;\n    if (rotation < 0) {\n      rotation -= Math.floor(rotation / 4) * 4;\n    }\n    rotation = rotation % 4;\n    switch (rotation) {\n      case 1:\n        tempValue = box.height / 2 + box.top;\n        transformations.unshift(\n          \"rotate(90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n        );\n        break;\n      case 2:\n        transformations.unshift(\n          \"rotate(180 \" + (box.width / 2 + box.left).toString() + \" \" + (box.height / 2 + box.top).toString() + \")\"\n        );\n        break;\n      case 3:\n        tempValue = box.width / 2 + box.left;\n        transformations.unshift(\n          \"rotate(-90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n        );\n        break;\n    }\n    if (rotation % 2 === 1) {\n      if (box.left !== box.top) {\n        tempValue = box.left;\n        box.left = box.top;\n        box.top = tempValue;\n      }\n      if (box.width !== box.height) {\n        tempValue = box.width;\n        box.width = box.height;\n        box.height = tempValue;\n      }\n    }\n    if (transformations.length) {\n      body = wrapSVGContent(\n        body,\n        '',\n        \"\"\n      );\n    }\n  });\n  const customisationsWidth = fullCustomisations.width;\n  const customisationsHeight = fullCustomisations.height;\n  const boxWidth = box.width;\n  const boxHeight = box.height;\n  let width;\n  let height;\n  if (customisationsWidth === null) {\n    height = customisationsHeight === null ? \"1em\" : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n    width = calculateSize(height, boxWidth / boxHeight);\n  } else {\n    width = customisationsWidth === \"auto\" ? boxWidth : customisationsWidth;\n    height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n  }\n  const attributes = {};\n  const setAttr = (prop, value) => {\n    if (!isUnsetKeyword(value)) {\n      attributes[prop] = value.toString();\n    }\n  };\n  setAttr(\"width\", width);\n  setAttr(\"height\", height);\n  const viewBox = [box.left, box.top, boxWidth, boxHeight];\n  attributes.viewBox = viewBox.join(\" \");\n  return {\n    attributes,\n    viewBox,\n    body\n  };\n}\n\nexport { iconToSVG, isUnsetKeyword };\n", "const regex = /\\sid=\"(\\S+)\"/g;\nconst randomPrefix = \"IconifyId\" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);\nlet counter = 0;\nfunction replaceIDs(body, prefix = randomPrefix) {\n  const ids = [];\n  let match;\n  while (match = regex.exec(body)) {\n    ids.push(match[1]);\n  }\n  if (!ids.length) {\n    return body;\n  }\n  const suffix = \"suffix\" + (Math.random() * 16777216 | Date.now()).toString(16);\n  ids.forEach((id) => {\n    const newID = typeof prefix === \"function\" ? prefix(id) : prefix + (counter++).toString();\n    const escapedID = id.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n    body = body.replace(\n      // Allowed characters before id: [#;\"]\n      // Allowed characters after id: [)\"], .[a-z]\n      new RegExp('([#;\"])(' + escapedID + ')([\")]|\\\\.[a-z])', \"g\"),\n      \"$1\" + newID + suffix + \"$3\"\n    );\n  });\n  body = body.replace(new RegExp(suffix, \"g\"), \"\");\n  return body;\n}\n\nexport { replaceIDs };\n", "function iconToHTML(body, attributes) {\n  let renderAttribsHTML = body.indexOf(\"xlink:\") === -1 ? \"\" : ' xmlns:xlink=\"http://www.w3.org/1999/xlink\"';\n  for (const attr in attributes) {\n    renderAttribsHTML += \" \" + attr + '=\"' + attributes[attr] + '\"';\n  }\n  return '\" + body + \"\";\n}\n\nexport { iconToHTML };\n", "/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n *  - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n  options = options || {};\n  var type = typeof val;\n  if (type === 'string' && val.length > 0) {\n    return parse(val);\n  } else if (type === 'number' && isFinite(val)) {\n    return options.long ? fmtLong(val) : fmtShort(val);\n  }\n  throw new Error(\n    'val is not a non-empty string or a valid number. val=' +\n      JSON.stringify(val)\n  );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n  str = String(str);\n  if (str.length > 100) {\n    return;\n  }\n  var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n    str\n  );\n  if (!match) {\n    return;\n  }\n  var n = parseFloat(match[1]);\n  var type = (match[2] || 'ms').toLowerCase();\n  switch (type) {\n    case 'years':\n    case 'year':\n    case 'yrs':\n    case 'yr':\n    case 'y':\n      return n * y;\n    case 'weeks':\n    case 'week':\n    case 'w':\n      return n * w;\n    case 'days':\n    case 'day':\n    case 'd':\n      return n * d;\n    case 'hours':\n    case 'hour':\n    case 'hrs':\n    case 'hr':\n    case 'h':\n      return n * h;\n    case 'minutes':\n    case 'minute':\n    case 'mins':\n    case 'min':\n    case 'm':\n      return n * m;\n    case 'seconds':\n    case 'second':\n    case 'secs':\n    case 'sec':\n    case 's':\n      return n * s;\n    case 'milliseconds':\n    case 'millisecond':\n    case 'msecs':\n    case 'msec':\n    case 'ms':\n      return n;\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (msAbs >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (msAbs >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (msAbs >= s) {\n    return Math.round(ms / s) + 's';\n  }\n  return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return plural(ms, msAbs, d, 'day');\n  }\n  if (msAbs >= h) {\n    return plural(ms, msAbs, h, 'hour');\n  }\n  if (msAbs >= m) {\n    return plural(ms, msAbs, m, 'minute');\n  }\n  if (msAbs >= s) {\n    return plural(ms, msAbs, s, 'second');\n  }\n  return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n  var isPlural = msAbs >= n * 1.5;\n  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n", "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n", "export { defaultIconCustomisations, defaultIconSizeCustomisations } from './customisations/defaults.mjs';\nexport { mergeCustomisations } from './customisations/merge.mjs';\nexport { toBoolean } from './customisations/bool.mjs';\nexport { flipFromString } from './customisations/flip.mjs';\nexport { rotateFromString } from './customisations/rotate.mjs';\nexport { matchIconName, stringToIcon, validateIconName } from './icon/name.mjs';\nexport { mergeIconData } from './icon/merge.mjs';\nexport { mergeIconTransformations } from './icon/transformations.mjs';\nexport { defaultExtendedIconProps, defaultIconDimensions, defaultIconProps, defaultIconTransformations } from './icon/defaults.mjs';\nexport { makeIconSquare } from './icon/square.mjs';\nexport { getIconsTree } from './icon-set/tree.mjs';\nexport { parseIconSet, parseIconSetAsync } from './icon-set/parse.mjs';\nexport { validateIconSet } from './icon-set/validate.mjs';\nexport { quicklyValidateIconSet } from './icon-set/validate-basic.mjs';\nexport { expandIconSet } from './icon-set/expand.mjs';\nexport { minifyIconSet } from './icon-set/minify.mjs';\nexport { getIcons } from './icon-set/get-icons.mjs';\nexport { getIconData } from './icon-set/get-icon.mjs';\nexport { convertIconSetInfo } from './icon-set/convert-info.mjs';\nexport { iconToSVG } from './svg/build.mjs';\nexport { mergeDefsAndContent, splitSVGDefs, wrapSVGContent } from './svg/defs.mjs';\nexport { replaceIDs } from './svg/id.mjs';\nexport { calculateSize } from './svg/size.mjs';\nexport { encodeSvgForCss } from './svg/encode-svg-for-css.mjs';\nexport { trimSVG } from './svg/trim.mjs';\nexport { prettifySVG } from './svg/pretty.mjs';\nexport { iconToHTML } from './svg/html.mjs';\nexport { svgToData, svgToURL } from './svg/url.mjs';\nexport { cleanUpInnerHTML } from './svg/inner-html.mjs';\nexport { getSVGViewBox } from './svg/viewbox.mjs';\nexport { buildParsedSVG, convertParsedSVG, parseSVGContent } from './svg/parse.mjs';\nexport { colorKeywords } from './colors/keywords.mjs';\nexport { colorToString, compareColors, stringToColor } from './colors/index.mjs';\nexport { getIconCSS, getIconContentCSS } from './css/icon.mjs';\nexport { getIconsCSS, getIconsContentCSS } from './css/icons.mjs';\nexport { mergeIconProps } from './loader/utils.mjs';\nexport { getCustomIcon } from './loader/custom.mjs';\nexport { searchForIcon } from './loader/modern.mjs';\nexport { loadIcon } from './loader/loader.mjs';\nexport { getEmojiSequenceFromString, getUnqualifiedEmojiSequence } from './emoji/cleanup.mjs';\nexport { convertEmojiSequenceToUTF16, convertEmojiSequenceToUTF32, getEmojiCodePoint, getEmojiUnicode, isUTF32SplitNumber, mergeUTF32Numbers, splitUTF32Number } from './emoji/convert.mjs';\nexport { getEmojiSequenceKeyword, getEmojiSequenceString, getEmojiUnicodeString } from './emoji/format.mjs';\nexport { parseEmojiTestFile } from './emoji/test/parse.mjs';\nexport { getQualifiedEmojiVariations } from './emoji/test/variations.mjs';\nexport { findMissingEmojis } from './emoji/test/missing.mjs';\nexport { createOptimisedRegex, createOptimisedRegexForEmojiSequences } from './emoji/regex/create.mjs';\nexport { prepareEmojiForIconSet, prepareEmojiForIconsList } from './emoji/parse.mjs';\nexport { findAndReplaceEmojisInText } from './emoji/replace/replace.mjs';\nexport { camelToKebab, camelize, pascalize, snakelize } from './misc/strings.mjs';\nexport { commonObjectProps, compareObjects, unmergeObjects } from './misc/objects.mjs';\nexport { sanitiseTitleAttribute } from './misc/title.mjs';\nimport './css/common.mjs';\nimport './css/format.mjs';\nimport 'debug';\nimport './emoji/data.mjs';\nimport './emoji/test/components.mjs';\nimport './emoji/regex/tree.mjs';\nimport './emoji/regex/base.mjs';\nimport './emoji/regex/numbers.mjs';\nimport './emoji/regex/similar.mjs';\nimport './emoji/test/similar.mjs';\nimport './emoji/test/name.mjs';\nimport './emoji/test/tree.mjs';\nimport './emoji/replace/find.mjs';\n", "import { log } from '../logger.js';\nimport type { ExtendedIconifyIcon, IconifyIcon, IconifyJSON } from '@iconify/types';\nimport type { IconifyIconCustomisations } from '@iconify/utils';\nimport { getIconData, iconToHTML, iconToSVG, replaceIDs, stringToIcon } from '@iconify/utils';\n\ninterface AsyncIconLoader {\n  name: string;\n  loader: () => Promise;\n}\n\ninterface SyncIconLoader {\n  name: string;\n  icons: IconifyJSON;\n}\n\nexport type IconLoader = AsyncIconLoader | SyncIconLoader;\n\nexport const unknownIcon: IconifyIcon = {\n  body: '?',\n  height: 80,\n  width: 80,\n};\n\nconst iconsStore = new Map();\nconst loaderStore = new Map();\n\nexport const registerIconPacks = (iconLoaders: IconLoader[]) => {\n  for (const iconLoader of iconLoaders) {\n    if (!iconLoader.name) {\n      throw new Error(\n        'Invalid icon loader. Must have a \"name\" property with non-empty string value.'\n      );\n    }\n    log.debug('Registering icon pack:', iconLoader.name);\n    if ('loader' in iconLoader) {\n      loaderStore.set(iconLoader.name, iconLoader.loader);\n    } else if ('icons' in iconLoader) {\n      iconsStore.set(iconLoader.name, iconLoader.icons);\n    } else {\n      log.error('Invalid icon loader:', iconLoader);\n      throw new Error('Invalid icon loader. Must have either \"icons\" or \"loader\" property.');\n    }\n  }\n};\n\nconst getRegisteredIconData = async (iconName: string, fallbackPrefix?: string) => {\n  const data = stringToIcon(iconName, true, fallbackPrefix !== undefined);\n  if (!data) {\n    throw new Error(`Invalid icon name: ${iconName}`);\n  }\n  const prefix = data.prefix || fallbackPrefix;\n  if (!prefix) {\n    throw new Error(`Icon name must contain a prefix: ${iconName}`);\n  }\n  let icons = iconsStore.get(prefix);\n  if (!icons) {\n    const loader = loaderStore.get(prefix);\n    if (!loader) {\n      throw new Error(`Icon set not found: ${data.prefix}`);\n    }\n    try {\n      const loaded = await loader();\n      icons = { ...loaded, prefix };\n      iconsStore.set(prefix, icons);\n    } catch (e) {\n      log.error(e);\n      throw new Error(`Failed to load icon set: ${data.prefix}`);\n    }\n  }\n  const iconData = getIconData(icons, data.name);\n  if (!iconData) {\n    throw new Error(`Icon not found: ${iconName}`);\n  }\n  return iconData;\n};\n\nexport const isIconAvailable = async (iconName: string) => {\n  try {\n    await getRegisteredIconData(iconName);\n    return true;\n  } catch {\n    return false;\n  }\n};\n\nexport const getIconSVG = async (\n  iconName: string,\n  customisations?: IconifyIconCustomisations & { fallbackPrefix?: string }\n) => {\n  let iconData: ExtendedIconifyIcon;\n  try {\n    iconData = await getRegisteredIconData(iconName, customisations?.fallbackPrefix);\n  } catch (e) {\n    log.error(e);\n    iconData = unknownIcon;\n  }\n  const renderData = iconToSVG(iconData, customisations);\n  const svg = iconToHTML(replaceIDs(renderData.body), renderData.attributes);\n  return svg;\n};\n", "export function dedent(\n  templ: TemplateStringsArray | string,\n  ...values: unknown[]\n): string {\n  let strings = Array.from(typeof templ === 'string' ? [templ] : templ);\n\n  // 1. Remove trailing whitespace.\n  strings[strings.length - 1] = strings[strings.length - 1].replace(\n    /\\r?\\n([\\t ]*)$/,\n    '',\n  );\n\n  // 2. Find all line breaks to determine the highest common indentation level.\n  const indentLengths = strings.reduce((arr, str) => {\n    const matches = str.match(/\\n([\\t ]+|(?!\\s).)/g);\n    if (matches) {\n      return arr.concat(\n        matches.map((match) => match.match(/[\\t ]/g)?.length ?? 0),\n      );\n    }\n    return arr;\n  }, []);\n\n  // 3. Remove the common indentation from all strings.\n  if (indentLengths.length) {\n    const pattern = new RegExp(`\\n[\\t ]{${Math.min(...indentLengths)}}`, 'g');\n\n    strings = strings.map((str) => str.replace(pattern, '\\n'));\n  }\n\n  // 4. Remove leading whitespace.\n  strings[0] = strings[0].replace(/^\\r?\\n/, '');\n\n  // 5. Perform interpolation.\n  let string = strings[0];\n\n  values.forEach((value, i) => {\n    // 5.1 Read current indentation level\n    const endentations = string.match(/(?:^|\\n)( *)$/)\n    const endentation = endentations ? endentations[1] : ''\n    let indentedValue = value\n    // 5.2 Add indentation to values with multiline strings\n    if (typeof value === 'string' && value.includes('\\n')) {\n      indentedValue = String(value)\n        .split('\\n')\n        .map((str, i) => {\n          return i === 0 ? str : `${endentation}${str}`\n        })\n        .join('\\n');\n    }\n\n    string += indentedValue + strings[i + 1];\n  });\n\n  return string;\n}\n\nexport default dedent;\n", "// Match Jekyll-style front matter blocks (https://jekyllrb.com/docs/front-matter/).\n// Based on regex used by Jekyll: https://github.com/jekyll/jekyll/blob/6dd3cc21c40b98054851846425af06c64f9fb466/lib/jekyll/document.rb#L10\n// Note that JS doesn't support the \"\\A\" anchor, which means we can't use\n// multiline mode.\n// Relevant YAML spec: https://yaml.org/spec/1.2.2/#914-explicit-documents\nexport const frontMatterRegex = /^-{3}\\s*[\\n\\r](.*?)[\\n\\r]-{3}\\s*[\\n\\r]+/s;\n\nexport const directiveRegex =\n  /%{2}{\\s*(?:(\\w+)\\s*:|(\\w+))\\s*(?:(\\w+)|((?:(?!}%{2}).|\\r?\\n)*))?\\s*(?:}%{2})?/gi;\n\nexport const anyCommentRegex = /\\s*%%.*\\n/gm;\n", "export class UnknownDiagramError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'UnknownDiagramError';\n  }\n}\n", "import type { MermaidConfig } from '../config.type.js';\nimport { log } from '../logger.js';\nimport type {\n  DetectorRecord,\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from './types.js';\nimport { anyCommentRegex, directiveRegex, frontMatterRegex } from './regexes.js';\nimport { UnknownDiagramError } from '../errors.js';\n\nexport const detectors: Record = {};\n\n/**\n * Detects the type of the graph text.\n *\n * Takes into consideration the possible existence of an `%%init` directive\n *\n * @param text - The text defining the graph. For example:\n *\n * ```mermaid\n *   %%{initialize: {\"startOnLoad\": true, logLevel: \"fatal\" }}%%\n *   graph LR\n *    a-->b\n *    b-->c\n *    c-->d\n *    d-->e\n *    e-->f\n *    f-->g\n *    g-->h\n * ```\n *\n * @param config - The mermaid config.\n * @returns A graph definition key\n */\nexport const detectType = function (text: string, config?: MermaidConfig): string {\n  text = text\n    .replace(frontMatterRegex, '')\n    .replace(directiveRegex, '')\n    .replace(anyCommentRegex, '\\n');\n  for (const [key, { detector }] of Object.entries(detectors)) {\n    const diagram = detector(text, config);\n    if (diagram) {\n      return key;\n    }\n  }\n\n  throw new UnknownDiagramError(\n    `No diagram type detected matching given configuration for text: ${text}`\n  );\n};\n\n/**\n * Registers lazy-loaded diagrams to Mermaid.\n *\n * The diagram function is loaded asynchronously, so that diagrams are only loaded\n * if the diagram is detected.\n *\n * @remarks\n * Please note that the order of diagram detectors is important.\n * The first detector to return `true` is the diagram that will be loaded\n * and used, so put more specific detectors at the beginning!\n *\n * @param diagrams - Diagrams to lazy load, and their detectors, in order of importance.\n */\nexport const registerLazyLoadedDiagrams = (...diagrams: ExternalDiagramDefinition[]) => {\n  for (const { id, detector, loader } of diagrams) {\n    addDetector(id, detector, loader);\n  }\n};\n\nexport const addDetector = (key: string, detector: DiagramDetector, loader?: DiagramLoader) => {\n  if (detectors[key]) {\n    log.warn(`Detector with key ${key} already exists. Overwriting.`);\n  }\n  detectors[key] = { detector, loader };\n  log.debug(`Detector with key ${key} added${loader ? ' with loader' : ''}`);\n};\n\nexport const getDiagramLoader = (key: string) => {\n  return detectors[key].loader;\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,24],$V1=[1,25],$V2=[1,26],$V3=[1,27],$V4=[1,28],$V5=[1,63],$V6=[1,64],$V7=[1,65],$V8=[1,66],$V9=[1,67],$Va=[1,68],$Vb=[1,69],$Vc=[1,29],$Vd=[1,30],$Ve=[1,31],$Vf=[1,32],$Vg=[1,33],$Vh=[1,34],$Vi=[1,35],$Vj=[1,36],$Vk=[1,37],$Vl=[1,38],$Vm=[1,39],$Vn=[1,40],$Vo=[1,41],$Vp=[1,42],$Vq=[1,43],$Vr=[1,44],$Vs=[1,45],$Vt=[1,46],$Vu=[1,47],$Vv=[1,48],$Vw=[1,50],$Vx=[1,51],$Vy=[1,52],$Vz=[1,53],$VA=[1,54],$VB=[1,55],$VC=[1,56],$VD=[1,57],$VE=[1,58],$VF=[1,59],$VG=[1,60],$VH=[14,42],$VI=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],$VJ=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],$VK=[1,82],$VL=[1,83],$VM=[1,84],$VN=[1,85],$VO=[12,14,42],$VP=[12,14,33,42],$VQ=[12,14,33,42,76,77,79,80],$VR=[12,33],$VS=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mermaidDoc\":4,\"direction\":5,\"direction_tb\":6,\"direction_bt\":7,\"direction_rl\":8,\"direction_lr\":9,\"graphConfig\":10,\"C4_CONTEXT\":11,\"NEWLINE\":12,\"statements\":13,\"EOF\":14,\"C4_CONTAINER\":15,\"C4_COMPONENT\":16,\"C4_DYNAMIC\":17,\"C4_DEPLOYMENT\":18,\"otherStatements\":19,\"diagramStatements\":20,\"otherStatement\":21,\"title\":22,\"accDescription\":23,\"acc_title\":24,\"acc_title_value\":25,\"acc_descr\":26,\"acc_descr_value\":27,\"acc_descr_multiline_value\":28,\"boundaryStatement\":29,\"boundaryStartStatement\":30,\"boundaryStopStatement\":31,\"boundaryStart\":32,\"LBRACE\":33,\"ENTERPRISE_BOUNDARY\":34,\"attributes\":35,\"SYSTEM_BOUNDARY\":36,\"BOUNDARY\":37,\"CONTAINER_BOUNDARY\":38,\"NODE\":39,\"NODE_L\":40,\"NODE_R\":41,\"RBRACE\":42,\"diagramStatement\":43,\"PERSON\":44,\"PERSON_EXT\":45,\"SYSTEM\":46,\"SYSTEM_DB\":47,\"SYSTEM_QUEUE\":48,\"SYSTEM_EXT\":49,\"SYSTEM_EXT_DB\":50,\"SYSTEM_EXT_QUEUE\":51,\"CONTAINER\":52,\"CONTAINER_DB\":53,\"CONTAINER_QUEUE\":54,\"CONTAINER_EXT\":55,\"CONTAINER_EXT_DB\":56,\"CONTAINER_EXT_QUEUE\":57,\"COMPONENT\":58,\"COMPONENT_DB\":59,\"COMPONENT_QUEUE\":60,\"COMPONENT_EXT\":61,\"COMPONENT_EXT_DB\":62,\"COMPONENT_EXT_QUEUE\":63,\"REL\":64,\"BIREL\":65,\"REL_U\":66,\"REL_D\":67,\"REL_L\":68,\"REL_R\":69,\"REL_B\":70,\"REL_INDEX\":71,\"UPDATE_EL_STYLE\":72,\"UPDATE_REL_STYLE\":73,\"UPDATE_LAYOUT_CONFIG\":74,\"attribute\":75,\"STR\":76,\"STR_KEY\":77,\"STR_VALUE\":78,\"ATTRIBUTE\":79,\"ATTRIBUTE_EMPTY\":80,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",6:\"direction_tb\",7:\"direction_bt\",8:\"direction_rl\",9:\"direction_lr\",11:\"C4_CONTEXT\",12:\"NEWLINE\",14:\"EOF\",15:\"C4_CONTAINER\",16:\"C4_COMPONENT\",17:\"C4_DYNAMIC\",18:\"C4_DEPLOYMENT\",22:\"title\",23:\"accDescription\",24:\"acc_title\",25:\"acc_title_value\",26:\"acc_descr\",27:\"acc_descr_value\",28:\"acc_descr_multiline_value\",33:\"LBRACE\",34:\"ENTERPRISE_BOUNDARY\",36:\"SYSTEM_BOUNDARY\",37:\"BOUNDARY\",38:\"CONTAINER_BOUNDARY\",39:\"NODE\",40:\"NODE_L\",41:\"NODE_R\",42:\"RBRACE\",44:\"PERSON\",45:\"PERSON_EXT\",46:\"SYSTEM\",47:\"SYSTEM_DB\",48:\"SYSTEM_QUEUE\",49:\"SYSTEM_EXT\",50:\"SYSTEM_EXT_DB\",51:\"SYSTEM_EXT_QUEUE\",52:\"CONTAINER\",53:\"CONTAINER_DB\",54:\"CONTAINER_QUEUE\",55:\"CONTAINER_EXT\",56:\"CONTAINER_EXT_DB\",57:\"CONTAINER_EXT_QUEUE\",58:\"COMPONENT\",59:\"COMPONENT_DB\",60:\"COMPONENT_QUEUE\",61:\"COMPONENT_EXT\",62:\"COMPONENT_EXT_DB\",63:\"COMPONENT_EXT_QUEUE\",64:\"REL\",65:\"BIREL\",66:\"REL_U\",67:\"REL_D\",68:\"REL_L\",69:\"REL_R\",70:\"REL_B\",71:\"REL_INDEX\",72:\"UPDATE_EL_STYLE\",73:\"UPDATE_REL_STYLE\",74:\"UPDATE_LAYOUT_CONFIG\",76:\"STR\",77:\"STR_KEY\",78:\"STR_VALUE\",79:\"ATTRIBUTE\",80:\"ATTRIBUTE_EMPTY\"},\nproductions_: [0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 3:\n yy.setDirection('TB');\nbreak;\ncase 4:\n yy.setDirection('BT');\nbreak;\ncase 5:\n yy.setDirection('RL');\nbreak;\ncase 6:\n yy.setDirection('LR');\nbreak;\ncase 8: case 9: case 10: case 11: case 12:\nyy.setC4Type($$[$0-3])\nbreak;\ncase 19:\nyy.setTitle($$[$0].substring(6));this.$=$$[$0].substring(6);\nbreak;\ncase 20:\nyy.setAccDescription($$[$0].substring(15));this.$=$$[$0].substring(15);\nbreak;\ncase 21:\n this.$=$$[$0].trim();yy.setTitle(this.$); \nbreak;\ncase 22: case 23:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 28:\n$$[$0].splice(2, 0, 'ENTERPRISE'); yy.addPersonOrSystemBoundary(...$$[$0]); this.$=$$[$0];\nbreak;\ncase 29:\n$$[$0].splice(2, 0, 'SYSTEM'); yy.addPersonOrSystemBoundary(...$$[$0]); this.$=$$[$0];\nbreak;\ncase 30:\nyy.addPersonOrSystemBoundary(...$$[$0]); this.$=$$[$0];\nbreak;\ncase 31:\n$$[$0].splice(2, 0, 'CONTAINER'); yy.addContainerBoundary(...$$[$0]); this.$=$$[$0];\nbreak;\ncase 32:\nyy.addDeploymentNode('node', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 33:\nyy.addDeploymentNode('nodeL', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 34:\nyy.addDeploymentNode('nodeR', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 35:\n yy.popBoundaryParseStack() \nbreak;\ncase 39:\nyy.addPersonOrSystem('person', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 40:\nyy.addPersonOrSystem('external_person', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 41:\nyy.addPersonOrSystem('system', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 42:\nyy.addPersonOrSystem('system_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 43:\nyy.addPersonOrSystem('system_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 44:\nyy.addPersonOrSystem('external_system', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 45:\nyy.addPersonOrSystem('external_system_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 46:\nyy.addPersonOrSystem('external_system_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 47:\nyy.addContainer('container', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 48:\nyy.addContainer('container_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 49:\nyy.addContainer('container_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 50:\nyy.addContainer('external_container', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 51:\nyy.addContainer('external_container_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 52:\nyy.addContainer('external_container_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 53:\nyy.addComponent('component', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 54:\nyy.addComponent('component_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 55:\nyy.addComponent('component_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 56:\nyy.addComponent('external_component', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 57:\nyy.addComponent('external_component_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 58:\nyy.addComponent('external_component_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 60:\nyy.addRel('rel', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 61:\nyy.addRel('birel', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 62:\nyy.addRel('rel_u', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 63:\nyy.addRel('rel_d', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 64:\nyy.addRel('rel_l', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 65:\nyy.addRel('rel_r', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 66:\nyy.addRel('rel_b', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 67:\n$$[$0].splice(0, 1); yy.addRel('rel', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 68:\nyy.updateElStyle('update_el_style', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 69:\nyy.updateRelStyle('update_rel_style', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 70:\nyy.updateLayoutConfig('update_layout_config', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 71:\n this.$ = [$$[$0]]; \nbreak;\ncase 72:\n $$[$0].unshift($$[$0-1]); this.$=$$[$0];\nbreak;\ncase 73: case 75:\n  this.$ = $$[$0].trim(); \nbreak;\ncase 74:\n let kv={}; kv[$$[$0-1].trim()]=$$[$0].trim(); this.$=kv; \nbreak;\ncase 76:\n  this.$ = \"\"; \nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:70,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:71,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:72,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:73,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{14:[1,74]},o($VH,[2,13],{43:23,29:49,30:61,32:62,20:75,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG}),o($VH,[2,14]),o($VI,[2,16],{12:[1,76]}),o($VH,[2,36],{12:[1,77]}),o($VJ,[2,19]),o($VJ,[2,20]),{25:[1,78]},{27:[1,79]},o($VJ,[2,23]),{35:80,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:86,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:87,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:88,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:89,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:90,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:91,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:92,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:93,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:94,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:95,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:96,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:97,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:98,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:99,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:100,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:101,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:102,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:103,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:104,75:81,76:$VK,77:$VL,79:$VM,80:$VN},o($VO,[2,59]),{35:105,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:106,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:107,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:108,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:109,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:110,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:111,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:112,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:113,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:114,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:115,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{20:116,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{12:[1,118],33:[1,117]},{35:119,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:120,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:121,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:122,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:123,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:124,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:125,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},o($VH,[2,15]),o($VI,[2,17],{21:22,19:130,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4}),o($VH,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG}),o($VJ,[2,21]),o($VJ,[2,22]),o($VO,[2,39]),o($VP,[2,71],{75:81,35:132,76:$VK,77:$VL,79:$VM,80:$VN}),o($VQ,[2,73]),{78:[1,133]},o($VQ,[2,75]),o($VQ,[2,76]),o($VO,[2,40]),o($VO,[2,41]),o($VO,[2,42]),o($VO,[2,43]),o($VO,[2,44]),o($VO,[2,45]),o($VO,[2,46]),o($VO,[2,47]),o($VO,[2,48]),o($VO,[2,49]),o($VO,[2,50]),o($VO,[2,51]),o($VO,[2,52]),o($VO,[2,53]),o($VO,[2,54]),o($VO,[2,55]),o($VO,[2,56]),o($VO,[2,57]),o($VO,[2,58]),o($VO,[2,60]),o($VO,[2,61]),o($VO,[2,62]),o($VO,[2,63]),o($VO,[2,64]),o($VO,[2,65]),o($VO,[2,66]),o($VO,[2,67]),o($VO,[2,68]),o($VO,[2,69]),o($VO,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},o($VR,[2,28]),o($VR,[2,29]),o($VR,[2,30]),o($VR,[2,31]),o($VR,[2,32]),o($VR,[2,33]),o($VR,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},o($VI,[2,18]),o($VH,[2,38]),o($VP,[2,72]),o($VQ,[2,74]),o($VO,[2,24]),o($VO,[2,35]),o($VS,[2,25]),o($VS,[2,26],{12:[1,138]}),o($VS,[2,27])],\ndefaultActions: {2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},\nparseError: function parseError (str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n            function lex() {\n            var token;\n            token = tstack.pop() || lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                if (token instanceof Array) {\n                    tstack = token;\n                    token = tstack.pop();\n                }\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n            var errStr = '';\n            expected = [];\n            for (p in table[state]) {\n                if (this.terminals_[p] && p > TERROR) {\n                    expected.push('\\'' + this.terminals_[p] + '\\'');\n                }\n            }\n            if (lexer.showPosition) {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n            } else {\n                errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n            }\n            this.parseError(errStr, {\n                text: lexer.match,\n                token: this.terminals_[symbol] || symbol,\n                line: lexer.yylineno,\n                loc: yyloc,\n                expected: expected\n            });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex () {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 6;\nbreak;\ncase 1:return 7;\nbreak;\ncase 2:return 8;\nbreak;\ncase 3:return 9;\nbreak;\ncase 4:return 22;\nbreak;\ncase 5:return 23;\nbreak;\ncase 6: this.begin(\"acc_title\");return 24; \nbreak;\ncase 7: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 8: this.begin(\"acc_descr\");return 26; \nbreak;\ncase 9: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 10: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 11: this.popState(); \nbreak;\ncase 12:return \"acc_descr_multiline_value\";\nbreak;\ncase 13:/* skip comments */\nbreak;\ncase 14:c            /* skip comments */\nbreak;\ncase 15:return 12;\nbreak;\ncase 16:/* skip whitespace */\nbreak;\ncase 17:return 11;\nbreak;\ncase 18:return 15;\nbreak;\ncase 19:return 16;\nbreak;\ncase 20:return 17;\nbreak;\ncase 21:return 18;\nbreak;\ncase 22: this.begin(\"person_ext\"); return 45;\nbreak;\ncase 23: this.begin(\"person\"); return 44;\nbreak;\ncase 24: this.begin(\"system_ext_queue\"); return 51;\nbreak;\ncase 25: this.begin(\"system_ext_db\"); return 50;\nbreak;\ncase 26: this.begin(\"system_ext\"); return 49;\nbreak;\ncase 27: this.begin(\"system_queue\"); return 48;\nbreak;\ncase 28: this.begin(\"system_db\"); return 47;\nbreak;\ncase 29: this.begin(\"system\"); return 46;\nbreak;\ncase 30: this.begin(\"boundary\"); return 37;\nbreak;\ncase 31: this.begin(\"enterprise_boundary\"); return 34;\nbreak;\ncase 32: this.begin(\"system_boundary\"); return 36;\nbreak;\ncase 33: this.begin(\"container_ext_queue\"); return 57;\nbreak;\ncase 34: this.begin(\"container_ext_db\"); return 56;\nbreak;\ncase 35: this.begin(\"container_ext\"); return 55;\nbreak;\ncase 36: this.begin(\"container_queue\"); return 54;\nbreak;\ncase 37: this.begin(\"container_db\"); return 53;\nbreak;\ncase 38: this.begin(\"container\"); return 52;\nbreak;\ncase 39: this.begin(\"container_boundary\"); return 38;\nbreak;\ncase 40: this.begin(\"component_ext_queue\"); return 63;\nbreak;\ncase 41: this.begin(\"component_ext_db\"); return 62;\nbreak;\ncase 42: this.begin(\"component_ext\"); return 61;\nbreak;\ncase 43: this.begin(\"component_queue\"); return 60;\nbreak;\ncase 44: this.begin(\"component_db\"); return 59;\nbreak;\ncase 45: this.begin(\"component\"); return 58;\nbreak;\ncase 46: this.begin(\"node\"); return 39;\nbreak;\ncase 47: this.begin(\"node\"); return 39;\nbreak;\ncase 48: this.begin(\"node_l\"); return 40;\nbreak;\ncase 49: this.begin(\"node_r\"); return 41;\nbreak;\ncase 50: this.begin(\"rel\"); return 64;\nbreak;\ncase 51: this.begin(\"birel\"); return 65;\nbreak;\ncase 52: this.begin(\"rel_u\"); return 66;\nbreak;\ncase 53: this.begin(\"rel_u\"); return 66;\nbreak;\ncase 54: this.begin(\"rel_d\"); return 67;\nbreak;\ncase 55: this.begin(\"rel_d\"); return 67;\nbreak;\ncase 56: this.begin(\"rel_l\"); return 68;\nbreak;\ncase 57: this.begin(\"rel_l\"); return 68;\nbreak;\ncase 58: this.begin(\"rel_r\"); return 69;\nbreak;\ncase 59: this.begin(\"rel_r\"); return 69;\nbreak;\ncase 60: this.begin(\"rel_b\"); return 70;\nbreak;\ncase 61: this.begin(\"rel_index\"); return 71;\nbreak;\ncase 62: this.begin(\"update_el_style\"); return 72;\nbreak;\ncase 63: this.begin(\"update_rel_style\"); return 73;\nbreak;\ncase 64: this.begin(\"update_layout_config\"); return 74;\nbreak;\ncase 65:return \"EOF_IN_STRUCT\";\nbreak;\ncase 66: this.begin(\"attribute\"); return \"ATTRIBUTE_EMPTY\";\nbreak;\ncase 67: this.begin(\"attribute\"); \nbreak;\ncase 68: this.popState();this.popState();\nbreak;\ncase 69: return 80;\nbreak;\ncase 70: \nbreak;\ncase 71: return 80;\nbreak;\ncase 72: this.begin(\"string\");\nbreak;\ncase 73:  this.popState(); \nbreak;\ncase 74: return \"STR\";\nbreak;\ncase 75: this.begin(\"string_kv\");\nbreak;\ncase 76: this.begin(\"string_kv_key\"); return \"STR_KEY\";\nbreak;\ncase 77: this.popState(); this.begin(\"string_kv_value\"); \nbreak;\ncase 78: return \"STR_VALUE\";\nbreak;\ncase 79: this.popState(); this.popState(); \nbreak;\ncase 80: return \"STR\";\nbreak;\ncase 81: /* this.begin(\"lbrace\"); */ return \"LBRACE\";\nbreak;\ncase 82: /* this.popState(); */ return \"RBRACE\";\nbreak;\ncase 83:return 'SPACE';\nbreak;\ncase 84:return 'EOL';\nbreak;\ncase 85:return 14;\nbreak;\n}\n},\nrules: [/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:title\\s[^#\\n;]+)/,/^(?:accDescription\\s[^#\\n;]+)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:C4Context\\b)/,/^(?:C4Container\\b)/,/^(?:C4Component\\b)/,/^(?:C4Dynamic\\b)/,/^(?:C4Deployment\\b)/,/^(?:Person_Ext\\b)/,/^(?:Person\\b)/,/^(?:SystemQueue_Ext\\b)/,/^(?:SystemDb_Ext\\b)/,/^(?:System_Ext\\b)/,/^(?:SystemQueue\\b)/,/^(?:SystemDb\\b)/,/^(?:System\\b)/,/^(?:Boundary\\b)/,/^(?:Enterprise_Boundary\\b)/,/^(?:System_Boundary\\b)/,/^(?:ContainerQueue_Ext\\b)/,/^(?:ContainerDb_Ext\\b)/,/^(?:Container_Ext\\b)/,/^(?:ContainerQueue\\b)/,/^(?:ContainerDb\\b)/,/^(?:Container\\b)/,/^(?:Container_Boundary\\b)/,/^(?:ComponentQueue_Ext\\b)/,/^(?:ComponentDb_Ext\\b)/,/^(?:Component_Ext\\b)/,/^(?:ComponentQueue\\b)/,/^(?:ComponentDb\\b)/,/^(?:Component\\b)/,/^(?:Deployment_Node\\b)/,/^(?:Node\\b)/,/^(?:Node_L\\b)/,/^(?:Node_R\\b)/,/^(?:Rel\\b)/,/^(?:BiRel\\b)/,/^(?:Rel_Up\\b)/,/^(?:Rel_U\\b)/,/^(?:Rel_Down\\b)/,/^(?:Rel_D\\b)/,/^(?:Rel_Left\\b)/,/^(?:Rel_L\\b)/,/^(?:Rel_Right\\b)/,/^(?:Rel_R\\b)/,/^(?:Rel_Back\\b)/,/^(?:RelIndex\\b)/,/^(?:UpdateElementStyle\\b)/,/^(?:UpdateRelStyle\\b)/,/^(?:UpdateLayoutConfig\\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*[\"][\"])/,/^(?:[ ]*[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:[ ]*[\\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*[\"])/,/^(?:[^\"]+)/,/^(?:[\"])/,/^(?:[^,]+)/,/^(?:\\{)/,/^(?:\\})/,/^(?:[\\s]+)/,/^(?:[\\n\\r]+)/,/^(?:$)/],\nconditions: {\"acc_descr_multiline\":{\"rules\":[11,12],\"inclusive\":false},\"acc_descr\":{\"rules\":[9],\"inclusive\":false},\"acc_title\":{\"rules\":[7],\"inclusive\":false},\"string_kv_value\":{\"rules\":[78,79],\"inclusive\":false},\"string_kv_key\":{\"rules\":[77],\"inclusive\":false},\"string_kv\":{\"rules\":[76],\"inclusive\":false},\"string\":{\"rules\":[73,74],\"inclusive\":false},\"attribute\":{\"rules\":[68,69,70,71,72,75,80],\"inclusive\":false},\"update_layout_config\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"update_rel_style\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"update_el_style\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_b\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_r\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_l\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_d\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_u\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_bi\":{\"rules\":[],\"inclusive\":false},\"rel\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"node_r\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"node_l\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"node\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"index\":{\"rules\":[],\"inclusive\":false},\"rel_index\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component_ext_queue\":{\"rules\":[],\"inclusive\":false},\"component_ext_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component_ext\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_boundary\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_ext_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_ext_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_ext\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"birel\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_boundary\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"enterprise_boundary\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"boundary\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_ext_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_ext_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_ext\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"person_ext\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"person\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * assignWithDepth Extends the functionality of {@link Object.assign} with the\n *   ability to merge arbitrary-depth objects For each key in src with path `k` (recursively)\n *   performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of\n *   undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to `{}` and\n *   effectively merged with src[`k`]

Additionally, dissimilar types will not clobber unless the\n * config.clobber parameter === true. Example:\n *\n * ```\n * const config_0 = { foo: { bar: 'bar' }, bar: 'foo' };\n * const config_1 = { foo: 'foo', bar: 'bar' };\n * const result = assignWithDepth(config_0, config_1);\n * console.log(result);\n * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }\n * ```\n *\n * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a\n * destructured array of objects and dst is not an array, assignWithDepth will apply each element\n * of src to dst in order.\n * @param dst - The destination of the merge\n * @param src - The source object(s) to merge into destination\n * @param config -\n * * depth: depth to traverse within src and dst for merging\n * * clobber: should dissimilar types clobber\n */\nconst assignWithDepth = (\n dst: any,\n src: any,\n { depth = 2, clobber = false }: { depth?: number; clobber?: boolean } = {}\n): any => {\n const config: { depth: number; clobber: boolean } = { depth, clobber };\n if (Array.isArray(src) && !Array.isArray(dst)) {\n src.forEach((s) => assignWithDepth(dst, s, config));\n return dst;\n } else if (Array.isArray(src) && Array.isArray(dst)) {\n src.forEach((s) => {\n if (!dst.includes(s)) {\n dst.push(s);\n }\n });\n return dst;\n }\n if (dst === undefined || depth <= 0) {\n if (dst !== undefined && dst !== null && typeof dst === 'object' && typeof src === 'object') {\n return Object.assign(dst, src);\n } else {\n return src;\n }\n }\n if (src !== undefined && typeof dst === 'object' && typeof src === 'object') {\n Object.keys(src).forEach((key) => {\n if (\n typeof src[key] === 'object' &&\n (dst[key] === undefined || typeof dst[key] === 'object')\n ) {\n if (dst[key] === undefined) {\n dst[key] = Array.isArray(src[key]) ? [] : {};\n }\n dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber });\n } else if (clobber || (typeof dst[key] !== 'object' && typeof src[key] !== 'object')) {\n dst[key] = src[key];\n }\n });\n }\n return dst;\n};\n\nexport default assignWithDepth;\n", "/* IMPORT */\n/* MAIN */\nconst Channel = {\n /* CLAMP */\n min: {\n r: 0,\n g: 0,\n b: 0,\n s: 0,\n l: 0,\n a: 0\n },\n max: {\n r: 255,\n g: 255,\n b: 255,\n h: 360,\n s: 100,\n l: 100,\n a: 1\n },\n clamp: {\n r: (r) => r >= 255 ? 255 : (r < 0 ? 0 : r),\n g: (g) => g >= 255 ? 255 : (g < 0 ? 0 : g),\n b: (b) => b >= 255 ? 255 : (b < 0 ? 0 : b),\n h: (h) => h % 360,\n s: (s) => s >= 100 ? 100 : (s < 0 ? 0 : s),\n l: (l) => l >= 100 ? 100 : (l < 0 ? 0 : l),\n a: (a) => a >= 1 ? 1 : (a < 0 ? 0 : a)\n },\n /* CONVERSION */\n //SOURCE: https://planetcalc.com/7779\n toLinear: (c) => {\n const n = c / 255;\n return c > .03928 ? Math.pow(((n + .055) / 1.055), 2.4) : n / 12.92;\n },\n //SOURCE: https://gist.github.com/mjackson/5311256\n hue2rgb: (p, q, t) => {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n },\n hsl2rgb: ({ h, s, l }, channel) => {\n if (!s)\n return l * 2.55; // Achromatic\n h /= 360;\n s /= 100;\n l /= 100;\n const q = (l < .5) ? l * (1 + s) : (l + s) - (l * s);\n const p = 2 * l - q;\n switch (channel) {\n case 'r': return Channel.hue2rgb(p, q, h + 1 / 3) * 255;\n case 'g': return Channel.hue2rgb(p, q, h) * 255;\n case 'b': return Channel.hue2rgb(p, q, h - 1 / 3) * 255;\n }\n },\n rgb2hsl: ({ r, g, b }, channel) => {\n r /= 255;\n g /= 255;\n b /= 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n if (channel === 'l')\n return l * 100;\n if (max === min)\n return 0; // Achromatic\n const d = max - min;\n const s = (l > .5) ? d / (2 - max - min) : d / (max + min);\n if (channel === 's')\n return s * 100;\n switch (max) {\n case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60;\n case g: return ((b - r) / d + 2) * 60;\n case b: return ((r - g) / d + 4) * 60;\n default: return -1; //TSC: TypeScript is stupid and complains if there isn't this useless default statement\n }\n }\n};\n/* EXPORT */\nexport default Channel;\n", "/* MAIN */\nconst Lang = {\n /* API */\n clamp: (number, lower, upper) => {\n if (lower > upper)\n return Math.min(lower, Math.max(upper, number));\n return Math.min(upper, Math.max(lower, number));\n },\n round: (number) => {\n return Math.round(number * 10000000000) / 10000000000;\n }\n};\n/* EXPORT */\nexport default Lang;\n", "/* MAIN */\nconst Unit = {\n /* API */\n dec2hex: (dec) => {\n const hex = Math.round(dec).toString(16);\n return hex.length > 1 ? hex : `0${hex}`;\n }\n};\n/* EXPORT */\nexport default Unit;\n", "/* IMPORT */\nimport channel from './channel.js';\nimport lang from './lang.js';\nimport unit from './unit.js';\n/* MAIN */\nconst Utils = {\n channel,\n lang,\n unit\n};\n/* EXPORT */\nexport default Utils;\n", "/* IMPORT */\nimport _ from './utils/index.js';\n/* MAIN */\nconst DEC2HEX = {};\nfor (let i = 0; i <= 255; i++)\n DEC2HEX[i] = _.unit.dec2hex(i); // Populating dynamically, striking a balance between code size and performance\nconst TYPE = {\n ALL: 0,\n RGB: 1,\n HSL: 2\n};\n/* EXPORT */\nexport { DEC2HEX, TYPE };\n", "/* IMPORT */\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Type {\n constructor() {\n /* VARIABLES */\n this.type = TYPE.ALL;\n }\n /* API */\n get() {\n return this.type;\n }\n set(type) {\n if (this.type && this.type !== type)\n throw new Error('Cannot change both RGB and HSL channels at the same time');\n this.type = type;\n }\n reset() {\n this.type = TYPE.ALL;\n }\n is(type) {\n return this.type === type;\n }\n}\n/* EXPORT */\nexport default Type;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Type from './type.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Channels {\n /* CONSTRUCTOR */\n constructor(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type = new Type();\n }\n /* API */\n set(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type.type = TYPE.ALL;\n return this;\n }\n /* HELPERS */\n _ensureHSL() {\n const data = this.data;\n const { h, s, l } = data;\n if (h === undefined)\n data.h = _.channel.rgb2hsl(data, 'h');\n if (s === undefined)\n data.s = _.channel.rgb2hsl(data, 's');\n if (l === undefined)\n data.l = _.channel.rgb2hsl(data, 'l');\n }\n _ensureRGB() {\n const data = this.data;\n const { r, g, b } = data;\n if (r === undefined)\n data.r = _.channel.hsl2rgb(data, 'r');\n if (g === undefined)\n data.g = _.channel.hsl2rgb(data, 'g');\n if (b === undefined)\n data.b = _.channel.hsl2rgb(data, 'b');\n }\n /* GETTERS */\n get r() {\n const data = this.data;\n const r = data.r;\n if (!this.type.is(TYPE.HSL) && r !== undefined)\n return r;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'r');\n }\n get g() {\n const data = this.data;\n const g = data.g;\n if (!this.type.is(TYPE.HSL) && g !== undefined)\n return g;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'g');\n }\n get b() {\n const data = this.data;\n const b = data.b;\n if (!this.type.is(TYPE.HSL) && b !== undefined)\n return b;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'b');\n }\n get h() {\n const data = this.data;\n const h = data.h;\n if (!this.type.is(TYPE.RGB) && h !== undefined)\n return h;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'h');\n }\n get s() {\n const data = this.data;\n const s = data.s;\n if (!this.type.is(TYPE.RGB) && s !== undefined)\n return s;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 's');\n }\n get l() {\n const data = this.data;\n const l = data.l;\n if (!this.type.is(TYPE.RGB) && l !== undefined)\n return l;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'l');\n }\n get a() {\n return this.data.a;\n }\n /* SETTERS */\n set r(r) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.r = r;\n }\n set g(g) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.g = g;\n }\n set b(b) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.b = b;\n }\n set h(h) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.h = h;\n }\n set s(s) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.s = s;\n }\n set l(l) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.l = l;\n }\n set a(a) {\n this.changed = true;\n this.data.a = a;\n }\n}\n/* EXPORT */\nexport default Channels;\n", "/* IMPORT */\nimport Channels from './/index.js';\n/* MAIN */\nconst channels = new Channels({ r: 0, g: 0, b: 0, a: 0 }, 'transparent');\n/* EXPORT */\nexport default channels;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport { DEC2HEX } from '../constants.js';\n/* MAIN */\nconst Hex = {\n /* VARIABLES */\n re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,\n /* API */\n parse: (color) => {\n if (color.charCodeAt(0) !== 35)\n return; // '#'\n const match = color.match(Hex.re);\n if (!match)\n return;\n const hex = match[1];\n const dec = parseInt(hex, 16);\n const length = hex.length;\n const hasAlpha = length % 4 === 0;\n const isFullLength = length > 4;\n const multiplier = isFullLength ? 1 : 17;\n const bits = isFullLength ? 8 : 4;\n const bitsOffset = hasAlpha ? 0 : -1;\n const mask = isFullLength ? 255 : 15;\n return ChannelsReusable.set({\n r: ((dec >> (bits * (bitsOffset + 3))) & mask) * multiplier,\n g: ((dec >> (bits * (bitsOffset + 2))) & mask) * multiplier,\n b: ((dec >> (bits * (bitsOffset + 1))) & mask) * multiplier,\n a: hasAlpha ? (dec & mask) * multiplier / 255 : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // #RRGGBBAA\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a * 255)]}`;\n }\n else { // #RRGGBB\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`;\n }\n }\n};\n/* EXPORT */\nexport default Hex;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst HSL = {\n /* VARIABLES */\n re: /^hsla?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(?:deg|grad|rad|turn)?)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(%)?))?\\s*?\\)$/i,\n hueRe: /^(.+?)(deg|grad|rad|turn)$/i,\n /* HELPERS */\n _hue2deg: (hue) => {\n const match = hue.match(HSL.hueRe);\n if (match) {\n const [, number, unit] = match;\n switch (unit) {\n case 'grad': return _.channel.clamp.h(parseFloat(number) * .9);\n case 'rad': return _.channel.clamp.h(parseFloat(number) * 180 / Math.PI);\n case 'turn': return _.channel.clamp.h(parseFloat(number) * 360);\n }\n }\n return _.channel.clamp.h(parseFloat(hue));\n },\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 104 && charCode !== 72)\n return; // 'h'/'H'\n const match = color.match(HSL.re);\n if (!match)\n return;\n const [, h, s, l, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n h: HSL._hue2deg(h),\n s: _.channel.clamp.s(parseFloat(s)),\n l: _.channel.clamp.l(parseFloat(l)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { h, s, l, a } = channels;\n if (a < 1) { // HSLA\n return `hsla(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%, ${a})`;\n }\n else { // HSL\n return `hsl(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%)`;\n }\n }\n};\n/* EXPORT */\nexport default HSL;\n", "/* IMPORT */\nimport Hex from './hex.js';\n/* MAIN */\nconst Keyword = {\n /* VARIABLES */\n colors: {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyanaqua: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n transparent: '#00000000',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n },\n /* API */\n parse: (color) => {\n color = color.toLowerCase();\n const hex = Keyword.colors[color];\n if (!hex)\n return;\n return Hex.parse(hex);\n },\n stringify: (channels) => {\n const hex = Hex.stringify(channels);\n for (const name in Keyword.colors) {\n if (Keyword.colors[name] === hex)\n return name;\n }\n return;\n }\n};\n/* EXPORT */\nexport default Keyword;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst RGB = {\n /* VARIABLES */\n re: /^rgba?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?)))?\\s*?\\)$/i,\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 114 && charCode !== 82)\n return; // 'r'/'R'\n const match = color.match(RGB.re);\n if (!match)\n return;\n const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n r: _.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),\n g: _.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),\n b: _.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // RGBA\n return `rgba(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)}, ${_.lang.round(a)})`;\n }\n else { // RGB\n return `rgb(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)})`;\n }\n }\n};\n/* EXPORT */\nexport default RGB;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Hex from './hex.js';\nimport HSL from './hsl.js';\nimport Keyword from './keyword.js';\nimport RGB from './rgb.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nconst Color = {\n /* VARIABLES */\n format: {\n keyword: Keyword,\n hex: Hex,\n rgb: RGB,\n rgba: RGB,\n hsl: HSL,\n hsla: HSL\n },\n /* API */\n parse: (color) => {\n if (typeof color !== 'string')\n return color;\n const channels = Hex.parse(color) || RGB.parse(color) || HSL.parse(color) || Keyword.parse(color); // Color providers ordered with performance in mind\n if (channels)\n return channels;\n throw new Error(`Unsupported color format: \"${color}\"`);\n },\n stringify: (channels) => {\n // SASS returns a keyword if possible, but we avoid doing that as it's slower and doesn't really add any value\n if (!channels.changed && channels.color)\n return channels.color;\n if (channels.type.is(TYPE.HSL) || channels.data.r === undefined) {\n return HSL.stringify(channels);\n }\n else if (channels.a < 1 || !Number.isInteger(channels.r) || !Number.isInteger(channels.g) || !Number.isInteger(channels.b)) {\n return RGB.stringify(channels);\n }\n else {\n return Hex.stringify(channels);\n }\n }\n};\n/* EXPORT */\nexport default Color;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst change = (color, channels) => {\n const ch = Color.parse(color);\n for (const c in channels) {\n ch[c] = _.channel.clamp[c](channels[c]);\n }\n return Color.stringify(ch);\n};\n/* EXPORT */\nexport default change;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst rgba = (r, g, b = 0, a = 1) => {\n if (typeof r !== 'number')\n return change(r, { a: g });\n const channels = ChannelsReusable.set({\n r: _.channel.clamp.r(r),\n g: _.channel.clamp.g(g),\n b: _.channel.clamp.b(b),\n a: _.channel.clamp.a(a)\n });\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default rgba;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst channel = (color, channel) => {\n return _.lang.round(Color.parse(color)[channel]);\n};\n/* EXPORT */\nexport default channel;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\n//SOURCE: https://planetcalc.com/7779\nconst luminance = (color) => {\n const { r, g, b } = Color.parse(color);\n const luminance = .2126 * _.channel.toLinear(r) + .7152 * _.channel.toLinear(g) + .0722 * _.channel.toLinear(b);\n return _.lang.round(luminance);\n};\n/* EXPORT */\nexport default luminance;\n", "/* IMPORT */\nimport luminance from './luminance.js';\n/* MAIN */\nconst isLight = (color) => {\n return luminance(color) >= .5;\n};\n/* EXPORT */\nexport default isLight;\n", "/* IMPORT */\nimport isLight from './is_light.js';\n/* MAIN */\nconst isDark = (color) => {\n return !isLight(color);\n};\n/* EXPORT */\nexport default isDark;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst adjustChannel = (color, channel, amount) => {\n const channels = Color.parse(color);\n const amountCurrent = channels[channel];\n const amountNext = _.channel.clamp[channel](amountCurrent + amount);\n if (amountCurrent !== amountNext)\n channels[channel] = amountNext;\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default adjustChannel;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst lighten = (color, amount) => {\n return adjustChannel(color, 'l', amount);\n};\n/* EXPORT */\nexport default lighten;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst darken = (color, amount) => {\n return adjustChannel(color, 'l', -amount);\n};\n/* EXPORT */\nexport default darken;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst adjust = (color, channels) => {\n const ch = Color.parse(color);\n const changes = {};\n for (const c in channels) {\n if (!channels[c])\n continue;\n changes[c] = ch[c] + channels[c];\n }\n return change(color, changes);\n};\n/* EXPORT */\nexport default adjust;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport rgba from './rgba.js';\n/* MAIN */\n//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756\nconst mix = (color1, color2, weight = 50) => {\n const { r: r1, g: g1, b: b1, a: a1 } = Color.parse(color1);\n const { r: r2, g: g2, b: b2, a: a2 } = Color.parse(color2);\n const weightScale = weight / 100;\n const weightNormalized = (weightScale * 2) - 1;\n const alphaDelta = a1 - a2;\n const weight1combined = ((weightNormalized * alphaDelta) === -1) ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta);\n const weight1 = (weight1combined + 1) / 2;\n const weight2 = 1 - weight1;\n const r = (r1 * weight1) + (r2 * weight2);\n const g = (g1 * weight1) + (g2 * weight2);\n const b = (b1 * weight1) + (b2 * weight2);\n const a = (a1 * weightScale) + (a2 * (1 - weightScale));\n return rgba(r, g, b, a);\n};\n/* EXPORT */\nexport default mix;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport mix from './mix.js';\n/* MAIN */\nconst invert = (color, weight = 100) => {\n const inverse = Color.parse(color);\n inverse.r = 255 - inverse.r;\n inverse.g = 255 - inverse.g;\n inverse.b = 255 - inverse.b;\n return mix(inverse, color, weight);\n};\n/* EXPORT */\nexport default invert;\n", "/* IMPORT */\nimport hex from './rgba.js'; // Alias\nimport rgb from './rgba.js'; // Alias\nimport rgba from './rgba.js';\nimport hsl from './hsla.js'; // Alias\nimport hsla from './hsla.js';\nimport toKeyword from './to_keyword.js';\nimport toHex from './to_hex.js';\nimport toRgba from './to_rgba.js';\nimport toHsla from './to_hsla.js';\nimport channel from './channel.js';\nimport red from './red.js';\nimport green from './green.js';\nimport blue from './blue.js';\nimport hue from './hue.js';\nimport saturation from './saturation.js';\nimport lightness from './lightness.js';\nimport alpha from './alpha.js';\nimport opacity from './alpha.js'; // Alias\nimport contrast from './contrast.js';\nimport luminance from './luminance.js';\nimport isDark from './is_dark.js';\nimport isLight from './is_light.js';\nimport isTransparent from './is_transparent.js';\nimport isValid from './is_valid.js';\nimport saturate from './saturate.js';\nimport desaturate from './desaturate.js';\nimport lighten from './lighten.js';\nimport darken from './darken.js';\nimport opacify from './opacify.js';\nimport fadeIn from './opacify.js'; // Alias\nimport transparentize from './transparentize.js';\nimport fadeOut from './transparentize.js'; // Alias\nimport complement from './complement.js';\nimport grayscale from './grayscale.js';\nimport adjust from './adjust.js';\nimport change from './change.js';\nimport invert from './invert.js';\nimport mix from './mix.js';\nimport scale from './scale.js';\n/* EXPORT */\nexport { \n/* CREATE */\nhex, rgb, rgba, hsl, hsla, \n/* CONVERT */\ntoKeyword, toHex, toRgba, toHsla, \n/* GET - CHANNEL */\nchannel, red, green, blue, hue, saturation, lightness, alpha, opacity, \n/* GET - MORE */\ncontrast, luminance, isDark, isLight, isTransparent, isValid, \n/* EDIT - CHANNEL */\nsaturate, desaturate, lighten, darken, opacify, fadeIn, transparentize, fadeOut, complement, grayscale, \n/* EDIT - MORE */\nadjust, change, invert, mix, scale };\n", "/* EXPORT */\nexport * from './methods/index.js';\n", "/**\n * Values that have been hardcoded in src/diagrams/er/styles.js. These can be used by\n * theme-_._ files to maintain display styles until themes, styles, renderers are revised. --\n * 2022-09-22\n */\nexport const oldAttributeBackgroundColorOdd = '#ffffff';\nexport const oldAttributeBackgroundColorEven = '#f2f2f2';\n", "import { adjust } from 'khroma';\n\nexport const mkBorder = (col, darkMode) =>\n darkMode ? adjust(col, { s: -40, l: 10 }) : adjust(col, { s: -40, l: -10 });\n", "import { adjust, darken, invert, isDark, lighten } from 'khroma';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\nimport { mkBorder } from './theme-helpers.js';\n\nclass Theme {\n constructor() {\n /** # Base variables */\n /**\n * - Background - used to know what the background color is of the diagram. This is used for\n * deducing colors for instance line color. Default value is #f4f4f4.\n */\n this.background = '#f4f4f4';\n\n this.primaryColor = '#fff4dd';\n\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = '#333';\n\n this.THEME_COLOR_LIMIT = 12;\n\n // dark\n\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n }\n updateColors() {\n // The || is to make sure that if the variable has been defined by a user override that value is to be used\n\n /* Main */\n this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#eee' : '#333'); // invert(this.primaryColor);\n this.secondaryColor = this.secondaryColor || adjust(this.primaryColor, { h: -120 });\n this.tertiaryColor = this.tertiaryColor || adjust(this.primaryColor, { h: 180, l: 5 });\n\n this.primaryBorderColor = this.primaryBorderColor || mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor =\n this.secondaryBorderColor || mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor =\n this.tertiaryBorderColor || mkBorder(this.tertiaryColor, this.darkMode);\n this.noteBorderColor = this.noteBorderColor || mkBorder(this.noteBkgColor, this.darkMode);\n this.noteBkgColor = this.noteBkgColor || '#fff5ad';\n this.noteTextColor = this.noteTextColor || '#333';\n\n this.secondaryTextColor = this.secondaryTextColor || invert(this.secondaryColor);\n this.tertiaryTextColor = this.tertiaryTextColor || invert(this.tertiaryColor);\n this.lineColor = this.lineColor || invert(this.background);\n this.arrowheadColor = this.arrowheadColor || invert(this.background);\n this.textColor = this.textColor || this.primaryTextColor;\n\n // TODO: should this instead default to secondaryBorderColor?\n this.border2 = this.border2 || this.tertiaryBorderColor;\n\n /* Flowchart variables */\n this.nodeBkg = this.nodeBkg || this.primaryColor;\n this.mainBkg = this.mainBkg || this.primaryColor;\n this.nodeBorder = this.nodeBorder || this.primaryBorderColor;\n this.clusterBkg = this.clusterBkg || this.tertiaryColor;\n this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor;\n this.defaultLinkColor = this.defaultLinkColor || this.lineColor;\n this.titleColor = this.titleColor || this.tertiaryTextColor;\n this.edgeLabelBackground =\n this.edgeLabelBackground ||\n (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor);\n this.nodeTextColor = this.nodeTextColor || this.primaryTextColor;\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = this.actorBorder || this.primaryBorderColor;\n this.actorBkg = this.actorBkg || this.mainBkg;\n this.actorTextColor = this.actorTextColor || this.primaryTextColor;\n this.actorLineColor = this.actorLineColor || this.actorBorder;\n this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg;\n this.signalColor = this.signalColor || this.textColor;\n this.signalTextColor = this.signalTextColor || this.textColor;\n this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder;\n this.labelTextColor = this.labelTextColor || this.actorTextColor;\n this.loopTextColor = this.loopTextColor || this.actorTextColor;\n this.activationBorderColor = this.activationBorderColor || darken(this.secondaryColor, 10);\n this.activationBkgColor = this.activationBkgColor || this.secondaryColor;\n this.sequenceNumberColor = this.sequenceNumberColor || invert(this.lineColor);\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor;\n this.altSectionBkgColor = this.altSectionBkgColor || 'white';\n this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor;\n this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor;\n this.excludeBkgColor = this.excludeBkgColor || '#eeeeee';\n this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;\n this.taskBkgColor = this.taskBkgColor || this.primaryColor;\n this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor;\n this.activeTaskBkgColor = this.activeTaskBkgColor || lighten(this.primaryColor, 23);\n this.gridColor = this.gridColor || 'lightgrey';\n this.doneTaskBkgColor = this.doneTaskBkgColor || 'lightgrey';\n this.doneTaskBorderColor = this.doneTaskBorderColor || 'grey';\n this.critBorderColor = this.critBorderColor || '#ff8888';\n this.critBkgColor = this.critBkgColor || 'red';\n this.todayLineColor = this.todayLineColor || 'red';\n this.taskTextColor = this.taskTextColor || this.textColor;\n this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor;\n this.taskTextLightColor = this.taskTextLightColor || this.textColor;\n this.taskTextColor = this.taskTextColor || this.primaryTextColor;\n this.taskTextDarkColor = this.taskTextDarkColor || this.textColor;\n this.taskTextClickableColor = this.taskTextClickableColor || '#003163';\n\n /* Sequence Diagram variables */\n\n this.personBorder = this.personBorder || this.primaryBorderColor;\n this.personBkg = this.personBkg || this.mainBkg;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n /* The color of the text tables of the states*/\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || this.tertiaryColor;\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.nodeBorder;\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n this.transitionColor = this.transitionColor || this.lineColor;\n this.specialStateColor = this.lineColor;\n\n /* Color Scale */\n /* Each color-set will have a background, a foreground and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210, l: 150 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n if (this.darkMode) {\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScale' + i] = darken(this['cScale' + i], 75);\n }\n } else {\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScale' + i] = darken(this['cScale' + i], 25);\n }\n }\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || invert(this['cScale' + i]);\n }\n // Setup the peer color for the set, useful for borders\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n if (this.darkMode) {\n this['cScalePeer' + i] = this['cScalePeer' + i] || lighten(this['cScale' + i], 10);\n } else {\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 10);\n }\n }\n\n // Setup the label color for the set\n this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;\n\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n const multiplier = this.darkMode ? -4 : -1;\n for (let i = 0; i < 5; i++) {\n this['surface' + i] =\n this['surface' + i] ||\n adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] ||\n adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });\n }\n\n /* class */\n this.classText = this.classText || this.textColor;\n\n /* user-journey */\n this.fillType0 = this.fillType0 || this.primaryColor;\n this.fillType1 = this.fillType1 || this.secondaryColor;\n this.fillType2 = this.fillType2 || adjust(this.primaryColor, { h: 64 });\n this.fillType3 = this.fillType3 || adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = this.fillType4 || adjust(this.primaryColor, { h: -64 });\n this.fillType5 = this.fillType5 || adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = this.fillType6 || adjust(this.primaryColor, { h: 128 });\n this.fillType7 = this.fillType7 || adjust(this.secondaryColor, { h: 128 });\n\n /* pie */\n this.pie1 = this.pie1 || this.primaryColor;\n this.pie2 = this.pie2 || this.secondaryColor;\n this.pie3 = this.pie3 || this.tertiaryColor;\n this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });\n this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });\n this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });\n this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });\n this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });\n this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });\n this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });\n this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });\n this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* architecture */\n this.archEdgeColor = this.archEdgeColor || '#777';\n this.archEdgeArrowColor = this.archEdgeArrowColor || '#777';\n this.archEdgeWidth = this.archEdgeWidth || '3';\n this.archGroupBorderColor = this.archGroupBorderColor || '#000';\n this.archGroupBorderWidth = this.archGroupBorderWidth || '2px';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0',\n };\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground =\n this.relationLabelBackground ||\n (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor);\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = this.git0 || this.primaryColor;\n this.git1 = this.git1 || this.secondaryColor;\n this.git2 = this.git2 || this.tertiaryColor;\n this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.git6 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.git7 || adjust(this.primaryColor, { h: +120 });\n if (this.darkMode) {\n this.git0 = lighten(this.git0, 25);\n this.git1 = lighten(this.git1, 25);\n this.git2 = lighten(this.git2, 25);\n this.git3 = lighten(this.git3, 25);\n this.git4 = lighten(this.git4, 25);\n this.git5 = lighten(this.git5, 25);\n this.git6 = lighten(this.git6, 25);\n this.git7 = lighten(this.git7, 25);\n } else {\n this.git0 = darken(this.git0, 25);\n this.git1 = darken(this.git1, 25);\n this.git2 = darken(this.git2, 25);\n this.git3 = darken(this.git3, 25);\n this.git4 = darken(this.git4, 25);\n this.git5 = darken(this.git5, 25);\n this.git6 = darken(this.git6, 25);\n this.git7 = darken(this.git7, 25);\n }\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.branchLabelColor =\n this.branchLabelColor || (this.darkMode ? 'black' : this.labelTextColor);\n this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor;\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor;\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { adjust, darken, invert, isDark, lighten, rgba } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\n\nclass Theme {\n constructor() {\n this.background = '#333';\n this.primaryColor = '#1f2020';\n this.secondaryColor = lighten(this.primaryColor, 16);\n this.tertiaryColor = adjust(this.primaryColor, { h: -160 });\n this.primaryBorderColor = invert(this.background);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.tertiaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n\n this.mainBkg = '#1f2020';\n this.secondBkg = 'calculated';\n this.mainContrastColor = 'lightgrey';\n this.darkTextColor = lighten(invert('#323D47'), 10);\n this.lineColor = 'calculated';\n this.border1 = '#ccc';\n this.border2 = rgba(255, 255, 255, 0.25);\n this.arrowheadColor = 'calculated';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.labelBackground = '#181818';\n this.textColor = '#ccc';\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#F9FFFE';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = 'calculated';\n this.activationBkgColor = 'calculated';\n this.sequenceNumberColor = 'black';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = darken('#EAE8D9', 30);\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = '#EAE8D9';\n this.excludeBkgColor = darken(this.sectionBkgColor, 10);\n this.taskBorderColor = rgba(255, 255, 255, 70);\n this.taskBkgColor = 'calculated';\n this.taskTextColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = rgba(255, 255, 255, 50);\n this.activeTaskBkgColor = '#81B1DB';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#E83737';\n this.critBkgColor = '#E83737';\n this.taskTextDarkColor = 'calculated';\n this.todayLineColor = '#DB5757';\n\n /* C4 Context Diagram variables */\n this.personBorder = this.primaryBorderColor;\n this.personBkg = this.mainBkg;\n\n /* Architecture Diagram variables */\n this.archEdgeColor = 'calculated';\n this.archEdgeArrowColor = 'calculated';\n this.archEdgeWidth = '3';\n this.archGroupBorderColor = this.primaryBorderColor;\n this.archGroupBorderWidth = '2px';\n\n /* state colors */\n this.labelColor = 'calculated';\n\n this.errorBkgColor = '#a44141';\n this.errorTextColor = '#ddd';\n }\n updateColors() {\n this.secondBkg = lighten(this.mainBkg, 16);\n this.lineColor = this.mainContrastColor;\n this.arrowheadColor = this.mainContrastColor;\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.edgeLabelBackground = lighten(this.labelBackground, 25);\n\n /* Sequence Diagram variables */\n\n this.actorBorder = this.border1;\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.mainContrastColor;\n this.actorLineColor = this.actorBorder;\n this.signalColor = this.mainContrastColor;\n this.signalTextColor = this.mainContrastColor;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.mainContrastColor;\n this.loopTextColor = this.mainContrastColor;\n this.noteBorderColor = this.secondaryBorderColor;\n this.noteBkgColor = this.secondBkg;\n this.noteTextColor = this.secondaryTextColor;\n this.activationBorderColor = this.border1;\n this.activationBkgColor = this.secondBkg;\n\n /* Gantt chart variables */\n\n this.altSectionBkgColor = this.background;\n this.taskBkgColor = lighten(this.mainBkg, 23);\n this.taskTextColor = this.darkTextColor;\n this.taskTextLightColor = this.mainContrastColor;\n this.taskTextOutsideColor = this.taskTextLightColor;\n this.gridColor = this.mainContrastColor;\n this.doneTaskBkgColor = this.mainContrastColor;\n this.taskTextDarkColor = this.darkTextColor;\n\n /* Architecture Diagram variables */\n this.archEdgeColor = this.lineColor;\n this.archEdgeArrowColor = this.lineColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#555';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.primaryBorderColor;\n this.specialStateColor = '#f4f4f4'; // this.lineColor;\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n /* cScale */\n this.cScale1 = this.cScale1 || '#0b0000';\n this.cScale2 = this.cScale2 || '#4d1037';\n this.cScale3 = this.cScale3 || '#3f5258';\n this.cScale4 = this.cScale4 || '#4f2f1b';\n this.cScale5 = this.cScale5 || '#6e0a0a';\n this.cScale6 = this.cScale6 || '#3b0048';\n this.cScale7 = this.cScale7 || '#995a01';\n this.cScale8 = this.cScale8 || '#154706';\n this.cScale9 = this.cScale9 || '#161722';\n this.cScale10 = this.cScale10 || '#00296f';\n this.cScale11 = this.cScale11 || '#01629c';\n this.cScale12 = this.cScale12 || '#010029';\n\n /* Color Scale */\n /* Each color-set will have a background, a foreground and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || invert(this['cScale' + i]);\n }\n // Setup the peer color for the set, useful for borders\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScalePeer' + i] = this['cScalePeer' + i] || lighten(this['cScale' + i], 10);\n }\n\n for (let i = 0; i < 5; i++) {\n this['surface' + i] =\n this['surface' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-10 + i * 4) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) });\n }\n\n // Setup the label color for the set\n this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor);\n\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n /* Pie diagram */\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['pie' + i] = this['cScale' + i];\n }\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22',\n };\n\n this.packet = {\n startByteColor: this.primaryTextColor,\n endByteColor: this.primaryTextColor,\n labelColor: this.primaryTextColor,\n titleColor: this.primaryTextColor,\n blockStrokeColor: this.primaryTextColor,\n blockFillColor: this.background,\n };\n\n /* class */\n this.classText = this.primaryTextColor;\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground =\n this.relationLabelBackground ||\n (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor);\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = lighten(this.secondaryColor, 20);\n this.git1 = lighten(this.pie2 || this.secondaryColor, 20);\n this.git2 = lighten(this.pie3 || this.tertiaryColor, 20);\n this.git3 = lighten(this.pie4 || adjust(this.primaryColor, { h: -30 }), 20);\n this.git4 = lighten(this.pie5 || adjust(this.primaryColor, { h: -60 }), 20);\n this.git5 = lighten(this.pie6 || adjust(this.primaryColor, { h: -90 }), 10);\n this.git6 = lighten(this.pie7 || adjust(this.primaryColor, { h: +60 }), 10);\n this.git7 = lighten(this.pie8 || adjust(this.primaryColor, { h: +120 }), 20);\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor);\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor);\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || lighten(this.background, 12);\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || lighten(this.background, 2);\n /* -------------------------------------------------- */\n\n this.nodeBorder = this.nodeBorder || '#999';\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { invert, lighten, rgba, adjust, darken, isDark } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\n\nclass Theme {\n constructor() {\n /* Base variables */\n this.background = '#f4f4f4';\n this.primaryColor = '#ECECFF';\n\n this.secondaryColor = adjust(this.primaryColor, { h: 120 });\n this.secondaryColor = '#ffffde';\n this.tertiaryColor = adjust(this.primaryColor, { h: -160 });\n this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.tertiaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n\n this.background = 'white';\n this.mainBkg = '#ECECFF';\n this.secondBkg = '#ffffde';\n this.lineColor = '#333333';\n this.border1 = '#9370DB';\n this.border2 = '#aaaa33';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.labelBackground = 'rgba(232,232,232, 0.8)';\n this.textColor = '#333';\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = 'calculated';\n this.excludeBkgColor = '#eeeeee';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.taskTextClickableColor = 'calculated';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n this.sectionBkgColor = rgba(102, 102, 255, 0.49);\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#fff400';\n this.taskBorderColor = '#534fbc';\n this.taskBkgColor = '#8a90dd';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = '#534fbc';\n this.activeTaskBkgColor = '#bfc7ff';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* C4 Context Diagram variables */\n this.personBorder = this.primaryBorderColor;\n this.personBkg = this.mainBkg;\n\n /* Architecture Diagram variables */\n this.archEdgeColor = 'calculated';\n this.archEdgeArrowColor = 'calculated';\n this.archEdgeWidth = '3';\n this.archGroupBorderColor = this.primaryBorderColor;\n this.archGroupBorderWidth = '2px';\n\n /* state colors */\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n this.updateColors();\n }\n updateColors() {\n /* Color Scale */\n /* Each color-set will have a background, a foreground and a border color */\n\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n this['cScalePeer' + 1] = this['cScalePeer' + 1] || darken(this.secondaryColor, 45);\n this['cScalePeer' + 2] = this['cScalePeer' + 2] || darken(this.tertiaryColor, 40);\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n // Setup the peer color for the set, useful for borders\n this['cScale' + i] = darken(this['cScale' + i], 10);\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 25);\n }\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 });\n }\n\n for (let i = 0; i < 5; i++) {\n this['surface' + i] = this['surface' + i] || adjust(this.mainBkg, { h: 30, l: -(5 + i * 5) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, l: -(7 + i * 5) });\n }\n // Setup the label color for the set\n this.scaleLabelColor =\n this.scaleLabelColor !== 'calculated' && this.scaleLabelColor\n ? this.scaleLabelColor\n : this.labelTextColor;\n\n if (this.labelTextColor !== 'calculated') {\n this.cScaleLabel0 = this.cScaleLabel0 || invert(this.labelTextColor);\n this.cScaleLabel3 = this.cScaleLabel3 || invert(this.labelTextColor);\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.labelTextColor;\n }\n }\n\n /* Flowchart variables */\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1; // border 1\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.textColor;\n this.edgeLabelBackground = this.labelBackground;\n\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.signalColor = this.textColor;\n this.signalTextColor = this.textColor;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n this.actorLineColor = this.actorBorder;\n\n /* Gantt chart variables */\n\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n\n /* Architecture Diagram variables */\n this.archEdgeColor = this.lineColor;\n this.archEdgeArrowColor = this.lineColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#f0f0f0';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.nodeBorder;\n this.specialStateColor = this.lineColor;\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n this.transitionColor = this.transitionColor || this.lineColor;\n /* class */\n this.classText = this.primaryTextColor;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n /* pie */\n this.pie1 = this.pie1 || this.primaryColor;\n this.pie2 = this.pie2 || this.secondaryColor;\n this.pie3 = this.pie3 || adjust(this.tertiaryColor, { l: -40 });\n this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });\n this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 });\n this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -20 });\n this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -20 });\n this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -40 });\n this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: -40 });\n this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -40 });\n this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -90, l: -40 });\n this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -30 });\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3',\n };\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground = this.relationLabelBackground || this.labelBackground;\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = this.git0 || this.primaryColor;\n this.git1 = this.git1 || this.secondaryColor;\n this.git2 = this.git2 || this.tertiaryColor;\n this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.git6 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.git7 || adjust(this.primaryColor, { h: +120 });\n if (this.darkMode) {\n this.git0 = lighten(this.git0, 25);\n this.git1 = lighten(this.git1, 25);\n this.git2 = lighten(this.git2, 25);\n this.git3 = lighten(this.git3, 25);\n this.git4 = lighten(this.git4, 25);\n this.git5 = lighten(this.git5, 25);\n this.git6 = lighten(this.git6, 25);\n this.git7 = lighten(this.git7, 25);\n } else {\n this.git0 = darken(this.git0, 25);\n this.git1 = darken(this.git1, 25);\n this.git2 = darken(this.git2, 25);\n this.git3 = darken(this.git3, 25);\n this.git4 = darken(this.git4, 25);\n this.git5 = darken(this.git5, 25);\n this.git6 = darken(this.git6, 25);\n this.git7 = darken(this.git7, 25);\n }\n this.gitInv0 = this.gitInv0 || darken(invert(this.git0), 25);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor);\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor);\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { adjust, darken, invert, isDark, lighten } from 'khroma';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\nimport { mkBorder } from './theme-helpers.js';\n\nclass Theme {\n constructor() {\n /* Base vales */\n this.background = '#f4f4f4';\n this.primaryColor = '#cde498';\n this.secondaryColor = '#cdffb2';\n this.background = 'white';\n this.mainBkg = '#cde498';\n this.secondBkg = '#cdffb2';\n this.lineColor = 'green';\n this.border1 = '#13540c';\n this.border2 = '#6eaa49';\n this.arrowheadColor = 'green';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n\n this.tertiaryColor = lighten('#cde498', 10);\n this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.primaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#333';\n this.edgeLabelBackground = '#e8e8e8';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'calculated';\n this.signalColor = '#333';\n this.signalTextColor = '#333';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = '#326932';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = '#6eaa49';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#6eaa49';\n this.excludeBkgColor = '#eeeeee';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = '#487e3a';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* C4 Context Diagram variables */\n this.personBorder = this.primaryBorderColor;\n this.personBkg = this.mainBkg;\n\n /* Architecture Diagram variables */\n this.archEdgeColor = 'calculated';\n this.archEdgeArrowColor = 'calculated';\n this.archEdgeWidth = '3';\n this.archGroupBorderColor = this.primaryBorderColor;\n this.archGroupBorderWidth = '2px';\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n /* Sequence Diagram variables */\n this.actorBorder = darken(this.mainBkg, 20);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n this.actorLineColor = this.actorBorder;\n\n /* Each color-set will have a background, a foreground and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n this['cScalePeer' + 1] = this['cScalePeer' + 1] || darken(this.secondaryColor, 45);\n this['cScalePeer' + 2] = this['cScalePeer' + 2] || darken(this.tertiaryColor, 40);\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n // Setup the peer color for the set, useful for borders\n this['cScale' + i] = darken(this['cScale' + i], 10);\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 25);\n }\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 });\n }\n\n // Setup the label color for the set\n this.scaleLabelColor =\n this.scaleLabelColor !== 'calculated' && this.scaleLabelColor\n ? this.scaleLabelColor\n : this.labelTextColor;\n\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n for (let i = 0; i < 5; i++) {\n this['surface' + i] =\n this['surface' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(5 + i * 5) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(8 + i * 5) });\n }\n\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n\n /* Gantt chart variables */\n\n this.taskBorderColor = this.border1;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n\n /* Architecture Diagram variables */\n this.archEdgeColor = this.lineColor;\n this.archEdgeArrowColor = this.lineColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#f0f0f0';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.primaryBorderColor;\n this.specialStateColor = this.lineColor;\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n this.transitionColor = this.transitionColor || this.lineColor;\n /* class */\n this.classText = this.primaryTextColor;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n /* pie */\n this.pie1 = this.pie1 || this.primaryColor;\n this.pie2 = this.pie2 || this.secondaryColor;\n this.pie3 = this.pie3 || this.tertiaryColor;\n this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -30 });\n this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 });\n this.pie6 = this.pie6 || adjust(this.tertiaryColor, { h: +40, l: -40 });\n this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });\n this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });\n this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });\n this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -50 });\n this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -50 });\n this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -50 });\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n this.packet = {\n startByteColor: this.primaryTextColor,\n endByteColor: this.primaryTextColor,\n labelColor: this.primaryTextColor,\n titleColor: this.primaryTextColor,\n blockStrokeColor: this.primaryTextColor,\n blockFillColor: this.mainBkg,\n };\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176',\n };\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = this.git0 || this.primaryColor;\n this.git1 = this.git1 || this.secondaryColor;\n this.git2 = this.git2 || this.tertiaryColor;\n this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.git6 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.git7 || adjust(this.primaryColor, { h: +120 });\n if (this.darkMode) {\n this.git0 = lighten(this.git0, 25);\n this.git1 = lighten(this.git1, 25);\n this.git2 = lighten(this.git2, 25);\n this.git3 = lighten(this.git3, 25);\n this.git4 = lighten(this.git4, 25);\n this.git5 = lighten(this.git5, 25);\n this.git6 = lighten(this.git6, 25);\n this.git7 = lighten(this.git7, 25);\n } else {\n this.git0 = darken(this.git0, 25);\n this.git1 = darken(this.git1, 25);\n this.git2 = darken(this.git2, 25);\n this.git3 = darken(this.git3, 25);\n this.git4 = darken(this.git4, 25);\n this.git5 = darken(this.git5, 25);\n this.git6 = darken(this.git6, 25);\n this.git7 = darken(this.git7, 25);\n }\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor);\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor);\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { invert, darken, lighten, adjust, isDark } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\n\n// const Color = require ( 'khroma/dist/color' ).default\n// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => \"#EAF2FB\"\n\nclass Theme {\n constructor() {\n this.primaryColor = '#eee';\n this.contrast = '#707070';\n this.secondaryColor = lighten(this.contrast, 55);\n this.background = '#ffffff';\n\n // this.secondaryColor = adjust(this.primaryColor, { h: 120 });\n this.tertiaryColor = adjust(this.primaryColor, { h: -160 });\n this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.tertiaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n\n // this.altBackground = lighten(this.contrast, 55);\n this.mainBkg = '#eee';\n this.secondBkg = 'calculated';\n this.lineColor = '#666';\n this.border1 = '#999';\n this.border2 = 'calculated';\n this.note = '#ffa';\n this.text = '#333';\n this.critical = '#d42';\n this.done = '#bbb';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'white';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = this.actorBorder;\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = 'calculated';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = 'calculated';\n this.excludeBkgColor = '#eeeeee';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n /* C4 Context Diagram variables */\n this.personBorder = this.primaryBorderColor;\n this.personBkg = this.mainBkg;\n\n /* Architecture Diagram variables */\n this.archEdgeColor = 'calculated';\n this.archEdgeArrowColor = 'calculated';\n this.archEdgeWidth = '3';\n this.archGroupBorderColor = this.primaryBorderColor;\n this.archGroupBorderWidth = '2px';\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n this.secondBkg = lighten(this.contrast, 55);\n this.border2 = this.contrast;\n\n /* Sequence Diagram variables */\n\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.text;\n this.actorLineColor = this.actorBorder;\n this.signalColor = this.text;\n this.signalTextColor = this.text;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.text;\n this.loopTextColor = this.text;\n this.noteBorderColor = '#999';\n this.noteBkgColor = '#666';\n this.noteTextColor = '#fff';\n\n /* Color Scale */\n /* Each color-set will have a background, a foreground and a border color */\n\n this.cScale0 = this.cScale0 || '#555';\n this.cScale1 = this.cScale1 || '#F4F4F4';\n this.cScale2 = this.cScale2 || '#555';\n this.cScale3 = this.cScale3 || '#BBB';\n this.cScale4 = this.cScale4 || '#777';\n this.cScale5 = this.cScale5 || '#999';\n this.cScale6 = this.cScale6 || '#DDD';\n this.cScale7 = this.cScale7 || '#FFF';\n this.cScale8 = this.cScale8 || '#DDD';\n this.cScale9 = this.cScale9 || '#BBB';\n this.cScale10 = this.cScale10 || '#999';\n this.cScale11 = this.cScale11 || '#777';\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || invert(this['cScale' + i]);\n }\n // Setup the peer color for the set, useful for borders\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n if (this.darkMode) {\n this['cScalePeer' + i] = this['cScalePeer' + i] || lighten(this['cScale' + i], 10);\n } else {\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 10);\n }\n }\n\n // Setup the label color for the set\n this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor);\n\n this.cScaleLabel0 = this.cScaleLabel0 || this.cScale1;\n this.cScaleLabel2 = this.cScaleLabel2 || this.cScale1;\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n for (let i = 0; i < 5; i++) {\n this['surface' + i] = this['surface' + i] || adjust(this.mainBkg, { l: -(5 + i * 5) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] || adjust(this.mainBkg, { l: -(8 + i * 5) });\n }\n\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.text;\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = lighten(this.contrast, 30);\n this.sectionBkgColor2 = lighten(this.contrast, 30);\n\n this.taskBorderColor = darken(this.contrast, 10);\n\n this.taskBkgColor = this.contrast;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = this.text;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n this.gridColor = lighten(this.border1, 30);\n\n this.doneTaskBkgColor = this.done;\n this.doneTaskBorderColor = this.lineColor;\n this.critBkgColor = this.critical;\n this.critBorderColor = darken(this.critBkgColor, 10);\n\n this.todayLineColor = this.critBkgColor;\n\n /* Architecture Diagram variables */\n this.archEdgeColor = this.lineColor;\n this.archEdgeArrowColor = this.lineColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || '#000';\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#f4f4f4';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.stateBorder = this.stateBorder || '#000';\n this.innerEndBackground = this.primaryBorderColor;\n this.specialStateColor = '#222';\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n\n /* class */\n this.classText = this.primaryTextColor;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n // /* pie */\n /* Pie diagram */\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['pie' + i] = this['cScale' + i];\n }\n this.pie12 = this.pie0;\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0',\n };\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = darken(this.pie1, 25) || this.primaryColor;\n this.git1 = this.pie2 || this.secondaryColor;\n this.git2 = this.pie3 || this.tertiaryColor;\n this.git3 = this.pie4 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.pie5 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.pie6 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.pie7 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.pie8 || adjust(this.primaryColor, { h: +120 });\n\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n\n this.branchLabelColor = this.branchLabelColor || this.labelTextColor;\n this.gitBranchLabel0 = this.branchLabelColor;\n this.gitBranchLabel1 = 'white';\n this.gitBranchLabel2 = this.branchLabelColor;\n this.gitBranchLabel3 = 'white';\n this.gitBranchLabel4 = this.branchLabelColor;\n this.gitBranchLabel5 = this.branchLabelColor;\n this.gitBranchLabel6 = this.branchLabelColor;\n this.gitBranchLabel7 = this.branchLabelColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { getThemeVariables as baseThemeVariables } from './theme-base.js';\nimport { getThemeVariables as darkThemeVariables } from './theme-dark.js';\nimport { getThemeVariables as defaultThemeVariables } from './theme-default.js';\nimport { getThemeVariables as forestThemeVariables } from './theme-forest.js';\nimport { getThemeVariables as neutralThemeVariables } from './theme-neutral.js';\n\nexport default {\n base: {\n getThemeVariables: baseThemeVariables,\n },\n dark: {\n getThemeVariables: darkThemeVariables,\n },\n default: {\n getThemeVariables: defaultThemeVariables,\n },\n forest: {\n getThemeVariables: forestThemeVariables,\n },\n neutral: {\n getThemeVariables: neutralThemeVariables,\n },\n};\n", "export default {\n \"flowchart\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"subGraphTitleMargin\": {\n \"top\": 0,\n \"bottom\": 0\n },\n \"diagramPadding\": 8,\n \"htmlLabels\": true,\n \"nodeSpacing\": 50,\n \"rankSpacing\": 50,\n \"curve\": \"basis\",\n \"padding\": 15,\n \"defaultRenderer\": \"dagre-wrapper\",\n \"wrappingWidth\": 200\n },\n \"sequence\": {\n \"useMaxWidth\": true,\n \"hideUnusedParticipants\": false,\n \"activationWidth\": 10,\n \"diagramMarginX\": 50,\n \"diagramMarginY\": 10,\n \"actorMargin\": 50,\n \"width\": 150,\n \"height\": 65,\n \"boxMargin\": 10,\n \"boxTextMargin\": 5,\n \"noteMargin\": 10,\n \"messageMargin\": 35,\n \"messageAlign\": \"center\",\n \"mirrorActors\": true,\n \"forceMenus\": false,\n \"bottomMarginAdj\": 1,\n \"rightAngles\": false,\n \"showSequenceNumbers\": false,\n \"actorFontSize\": 14,\n \"actorFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"actorFontWeight\": 400,\n \"noteFontSize\": 14,\n \"noteFontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif\",\n \"noteFontWeight\": 400,\n \"noteAlign\": \"center\",\n \"messageFontSize\": 16,\n \"messageFontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif\",\n \"messageFontWeight\": 400,\n \"wrap\": false,\n \"wrapPadding\": 10,\n \"labelBoxWidth\": 50,\n \"labelBoxHeight\": 20\n },\n \"gantt\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"barHeight\": 20,\n \"barGap\": 4,\n \"topPadding\": 50,\n \"rightPadding\": 75,\n \"leftPadding\": 75,\n \"gridLineStartPadding\": 35,\n \"fontSize\": 11,\n \"sectionFontSize\": 11,\n \"numberSectionStyles\": 4,\n \"axisFormat\": \"%Y-%m-%d\",\n \"topAxis\": false,\n \"displayMode\": \"\",\n \"weekday\": \"sunday\"\n },\n \"journey\": {\n \"useMaxWidth\": true,\n \"diagramMarginX\": 50,\n \"diagramMarginY\": 10,\n \"leftMargin\": 150,\n \"width\": 150,\n \"height\": 50,\n \"boxMargin\": 10,\n \"boxTextMargin\": 5,\n \"noteMargin\": 10,\n \"messageMargin\": 35,\n \"messageAlign\": \"center\",\n \"bottomMarginAdj\": 1,\n \"rightAngles\": false,\n \"taskFontSize\": 14,\n \"taskFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"taskMargin\": 50,\n \"activationWidth\": 10,\n \"textPlacement\": \"fo\",\n \"actorColours\": [\n \"#8FBC8F\",\n \"#7CFC00\",\n \"#00FFFF\",\n \"#20B2AA\",\n \"#B0E0E6\",\n \"#FFFFE0\"\n ],\n \"sectionFills\": [\n \"#191970\",\n \"#8B008B\",\n \"#4B0082\",\n \"#2F4F4F\",\n \"#800000\",\n \"#8B4513\",\n \"#00008B\"\n ],\n \"sectionColours\": [\n \"#fff\"\n ]\n },\n \"class\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"arrowMarkerAbsolute\": false,\n \"dividerMargin\": 10,\n \"padding\": 5,\n \"textHeight\": 10,\n \"defaultRenderer\": \"dagre-wrapper\",\n \"htmlLabels\": false,\n \"hideEmptyMembersBox\": false\n },\n \"state\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"dividerMargin\": 10,\n \"sizeUnit\": 5,\n \"padding\": 8,\n \"textHeight\": 10,\n \"titleShift\": -15,\n \"noteMargin\": 10,\n \"forkWidth\": 70,\n \"forkHeight\": 7,\n \"miniPadding\": 2,\n \"fontSizeFactor\": 5.02,\n \"fontSize\": 24,\n \"labelHeight\": 16,\n \"edgeLengthFactor\": \"20\",\n \"compositTitleSize\": 35,\n \"radius\": 5,\n \"defaultRenderer\": \"dagre-wrapper\"\n },\n \"er\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"diagramPadding\": 20,\n \"layoutDirection\": \"TB\",\n \"minEntityWidth\": 100,\n \"minEntityHeight\": 75,\n \"entityPadding\": 15,\n \"stroke\": \"gray\",\n \"fill\": \"honeydew\",\n \"fontSize\": 12\n },\n \"pie\": {\n \"useMaxWidth\": true,\n \"textPosition\": 0.75\n },\n \"quadrantChart\": {\n \"useMaxWidth\": true,\n \"chartWidth\": 500,\n \"chartHeight\": 500,\n \"titleFontSize\": 20,\n \"titlePadding\": 10,\n \"quadrantPadding\": 5,\n \"xAxisLabelPadding\": 5,\n \"yAxisLabelPadding\": 5,\n \"xAxisLabelFontSize\": 16,\n \"yAxisLabelFontSize\": 16,\n \"quadrantLabelFontSize\": 16,\n \"quadrantTextTopPadding\": 5,\n \"pointTextPadding\": 5,\n \"pointLabelFontSize\": 12,\n \"pointRadius\": 5,\n \"xAxisPosition\": \"top\",\n \"yAxisPosition\": \"left\",\n \"quadrantInternalBorderStrokeWidth\": 1,\n \"quadrantExternalBorderStrokeWidth\": 2\n },\n \"xyChart\": {\n \"useMaxWidth\": true,\n \"width\": 700,\n \"height\": 500,\n \"titleFontSize\": 20,\n \"titlePadding\": 10,\n \"showTitle\": true,\n \"xAxis\": {\n \"$ref\": \"#/$defs/XYChartAxisConfig\",\n \"showLabel\": true,\n \"labelFontSize\": 14,\n \"labelPadding\": 5,\n \"showTitle\": true,\n \"titleFontSize\": 16,\n \"titlePadding\": 5,\n \"showTick\": true,\n \"tickLength\": 5,\n \"tickWidth\": 2,\n \"showAxisLine\": true,\n \"axisLineWidth\": 2\n },\n \"yAxis\": {\n \"$ref\": \"#/$defs/XYChartAxisConfig\",\n \"showLabel\": true,\n \"labelFontSize\": 14,\n \"labelPadding\": 5,\n \"showTitle\": true,\n \"titleFontSize\": 16,\n \"titlePadding\": 5,\n \"showTick\": true,\n \"tickLength\": 5,\n \"tickWidth\": 2,\n \"showAxisLine\": true,\n \"axisLineWidth\": 2\n },\n \"chartOrientation\": \"vertical\",\n \"plotReservedSpacePercent\": 50\n },\n \"requirement\": {\n \"useMaxWidth\": true,\n \"rect_fill\": \"#f9f9f9\",\n \"text_color\": \"#333\",\n \"rect_border_size\": \"0.5px\",\n \"rect_border_color\": \"#bbb\",\n \"rect_min_width\": 200,\n \"rect_min_height\": 200,\n \"fontSize\": 14,\n \"rect_padding\": 10,\n \"line_height\": 20\n },\n \"mindmap\": {\n \"useMaxWidth\": true,\n \"padding\": 10,\n \"maxNodeWidth\": 200\n },\n \"kanban\": {\n \"useMaxWidth\": true,\n \"padding\": 8,\n \"sectionWidth\": 200,\n \"ticketBaseUrl\": \"\"\n },\n \"timeline\": {\n \"useMaxWidth\": true,\n \"diagramMarginX\": 50,\n \"diagramMarginY\": 10,\n \"leftMargin\": 150,\n \"width\": 150,\n \"height\": 50,\n \"boxMargin\": 10,\n \"boxTextMargin\": 5,\n \"noteMargin\": 10,\n \"messageMargin\": 35,\n \"messageAlign\": \"center\",\n \"bottomMarginAdj\": 1,\n \"rightAngles\": false,\n \"taskFontSize\": 14,\n \"taskFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"taskMargin\": 50,\n \"activationWidth\": 10,\n \"textPlacement\": \"fo\",\n \"actorColours\": [\n \"#8FBC8F\",\n \"#7CFC00\",\n \"#00FFFF\",\n \"#20B2AA\",\n \"#B0E0E6\",\n \"#FFFFE0\"\n ],\n \"sectionFills\": [\n \"#191970\",\n \"#8B008B\",\n \"#4B0082\",\n \"#2F4F4F\",\n \"#800000\",\n \"#8B4513\",\n \"#00008B\"\n ],\n \"sectionColours\": [\n \"#fff\"\n ],\n \"disableMulticolor\": false\n },\n \"gitGraph\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"diagramPadding\": 8,\n \"nodeLabel\": {\n \"width\": 75,\n \"height\": 100,\n \"x\": -25,\n \"y\": 0\n },\n \"mainBranchName\": \"main\",\n \"mainBranchOrder\": 0,\n \"showCommitLabel\": true,\n \"showBranches\": true,\n \"rotateCommitLabel\": true,\n \"parallelCommits\": false,\n \"arrowMarkerAbsolute\": false\n },\n \"c4\": {\n \"useMaxWidth\": true,\n \"diagramMarginX\": 50,\n \"diagramMarginY\": 10,\n \"c4ShapeMargin\": 50,\n \"c4ShapePadding\": 20,\n \"width\": 216,\n \"height\": 60,\n \"boxMargin\": 10,\n \"c4ShapeInRow\": 4,\n \"nextLinePaddingX\": 0,\n \"c4BoundaryInRow\": 2,\n \"personFontSize\": 14,\n \"personFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"personFontWeight\": \"normal\",\n \"external_personFontSize\": 14,\n \"external_personFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_personFontWeight\": \"normal\",\n \"systemFontSize\": 14,\n \"systemFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"systemFontWeight\": \"normal\",\n \"external_systemFontSize\": 14,\n \"external_systemFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_systemFontWeight\": \"normal\",\n \"system_dbFontSize\": 14,\n \"system_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"system_dbFontWeight\": \"normal\",\n \"external_system_dbFontSize\": 14,\n \"external_system_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_system_dbFontWeight\": \"normal\",\n \"system_queueFontSize\": 14,\n \"system_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"system_queueFontWeight\": \"normal\",\n \"external_system_queueFontSize\": 14,\n \"external_system_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_system_queueFontWeight\": \"normal\",\n \"boundaryFontSize\": 14,\n \"boundaryFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"boundaryFontWeight\": \"normal\",\n \"messageFontSize\": 12,\n \"messageFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"messageFontWeight\": \"normal\",\n \"containerFontSize\": 14,\n \"containerFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"containerFontWeight\": \"normal\",\n \"external_containerFontSize\": 14,\n \"external_containerFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_containerFontWeight\": \"normal\",\n \"container_dbFontSize\": 14,\n \"container_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"container_dbFontWeight\": \"normal\",\n \"external_container_dbFontSize\": 14,\n \"external_container_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_container_dbFontWeight\": \"normal\",\n \"container_queueFontSize\": 14,\n \"container_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"container_queueFontWeight\": \"normal\",\n \"external_container_queueFontSize\": 14,\n \"external_container_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_container_queueFontWeight\": \"normal\",\n \"componentFontSize\": 14,\n \"componentFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"componentFontWeight\": \"normal\",\n \"external_componentFontSize\": 14,\n \"external_componentFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_componentFontWeight\": \"normal\",\n \"component_dbFontSize\": 14,\n \"component_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"component_dbFontWeight\": \"normal\",\n \"external_component_dbFontSize\": 14,\n \"external_component_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_component_dbFontWeight\": \"normal\",\n \"component_queueFontSize\": 14,\n \"component_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"component_queueFontWeight\": \"normal\",\n \"external_component_queueFontSize\": 14,\n \"external_component_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_component_queueFontWeight\": \"normal\",\n \"wrap\": true,\n \"wrapPadding\": 10,\n \"person_bg_color\": \"#08427B\",\n \"person_border_color\": \"#073B6F\",\n \"external_person_bg_color\": \"#686868\",\n \"external_person_border_color\": \"#8A8A8A\",\n \"system_bg_color\": \"#1168BD\",\n \"system_border_color\": \"#3C7FC0\",\n \"system_db_bg_color\": \"#1168BD\",\n \"system_db_border_color\": \"#3C7FC0\",\n \"system_queue_bg_color\": \"#1168BD\",\n \"system_queue_border_color\": \"#3C7FC0\",\n \"external_system_bg_color\": \"#999999\",\n \"external_system_border_color\": \"#8A8A8A\",\n \"external_system_db_bg_color\": \"#999999\",\n \"external_system_db_border_color\": \"#8A8A8A\",\n \"external_system_queue_bg_color\": \"#999999\",\n \"external_system_queue_border_color\": \"#8A8A8A\",\n \"container_bg_color\": \"#438DD5\",\n \"container_border_color\": \"#3C7FC0\",\n \"container_db_bg_color\": \"#438DD5\",\n \"container_db_border_color\": \"#3C7FC0\",\n \"container_queue_bg_color\": \"#438DD5\",\n \"container_queue_border_color\": \"#3C7FC0\",\n \"external_container_bg_color\": \"#B3B3B3\",\n \"external_container_border_color\": \"#A6A6A6\",\n \"external_container_db_bg_color\": \"#B3B3B3\",\n \"external_container_db_border_color\": \"#A6A6A6\",\n \"external_container_queue_bg_color\": \"#B3B3B3\",\n \"external_container_queue_border_color\": \"#A6A6A6\",\n \"component_bg_color\": \"#85BBF0\",\n \"component_border_color\": \"#78A8D8\",\n \"component_db_bg_color\": \"#85BBF0\",\n \"component_db_border_color\": \"#78A8D8\",\n \"component_queue_bg_color\": \"#85BBF0\",\n \"component_queue_border_color\": \"#78A8D8\",\n \"external_component_bg_color\": \"#CCCCCC\",\n \"external_component_border_color\": \"#BFBFBF\",\n \"external_component_db_bg_color\": \"#CCCCCC\",\n \"external_component_db_border_color\": \"#BFBFBF\",\n \"external_component_queue_bg_color\": \"#CCCCCC\",\n \"external_component_queue_border_color\": \"#BFBFBF\"\n },\n \"sankey\": {\n \"useMaxWidth\": true,\n \"width\": 600,\n \"height\": 400,\n \"linkColor\": \"gradient\",\n \"nodeAlignment\": \"justify\",\n \"showValues\": true,\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"block\": {\n \"useMaxWidth\": true,\n \"padding\": 8\n },\n \"packet\": {\n \"useMaxWidth\": true,\n \"rowHeight\": 32,\n \"bitWidth\": 32,\n \"bitsPerRow\": 32,\n \"showBits\": true,\n \"paddingX\": 5,\n \"paddingY\": 5\n },\n \"architecture\": {\n \"useMaxWidth\": true,\n \"padding\": 40,\n \"iconSize\": 80,\n \"fontSize\": 16\n },\n \"theme\": \"default\",\n \"look\": \"classic\",\n \"handDrawnSeed\": 0,\n \"layout\": \"dagre\",\n \"maxTextSize\": 50000,\n \"maxEdges\": 500,\n \"darkMode\": false,\n \"fontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif;\",\n \"logLevel\": 5,\n \"securityLevel\": \"strict\",\n \"startOnLoad\": true,\n \"arrowMarkerAbsolute\": false,\n \"secure\": [\n \"secure\",\n \"securityLevel\",\n \"startOnLoad\",\n \"maxTextSize\",\n \"suppressErrorRendering\",\n \"maxEdges\"\n ],\n \"legacyMathML\": false,\n \"forceLegacyMathML\": false,\n \"deterministicIds\": false,\n \"fontSize\": 16,\n \"markdownAutoWrap\": true,\n \"suppressErrorRendering\": false\n};", "import type { RequiredDeep } from 'type-fest';\n\nimport theme from './themes/index.js';\nimport type { MermaidConfig } from './config.type.js';\n\n// Uses our custom Vite jsonSchemaPlugin to load only the default values from\n// our JSON Schema\n// @ts-expect-error This file is automatically generated via a custom Vite plugin\nimport defaultConfigJson from './schemas/config.schema.yaml?only-defaults=true';\n\n/**\n * Default mermaid configuration options.\n *\n * Please see the Mermaid config JSON Schema for the default JSON values.\n * Non-JSON JS default values are listed in this file, e.g. functions, or\n * `undefined` (explicitly set so that `configKeys` finds them).\n */\nconst config: RequiredDeep = {\n ...defaultConfigJson,\n // Set, even though they're `undefined` so that `configKeys` finds these keys\n // TODO: Should we replace these with `null` so that they can go in the JSON Schema?\n deterministicIDSeed: undefined,\n elk: {\n // mergeEdges is needed here to be considered\n mergeEdges: false,\n nodePlacementStrategy: 'BRANDES_KOEPF',\n },\n themeCSS: undefined,\n\n // add non-JSON default config values\n themeVariables: theme.default.getThemeVariables(),\n sequence: {\n ...defaultConfigJson.sequence,\n messageFont: function () {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight,\n };\n },\n noteFont: function () {\n return {\n fontFamily: this.noteFontFamily,\n fontSize: this.noteFontSize,\n fontWeight: this.noteFontWeight,\n };\n },\n actorFont: function () {\n return {\n fontFamily: this.actorFontFamily,\n fontSize: this.actorFontSize,\n fontWeight: this.actorFontWeight,\n };\n },\n },\n class: {\n hideEmptyMembersBox: false,\n },\n gantt: {\n ...defaultConfigJson.gantt,\n tickInterval: undefined,\n useWidth: undefined, // can probably be removed since `configKeys` already includes this\n },\n c4: {\n ...defaultConfigJson.c4,\n useWidth: undefined,\n personFont: function () {\n return {\n fontFamily: this.personFontFamily,\n fontSize: this.personFontSize,\n fontWeight: this.personFontWeight,\n };\n },\n\n external_personFont: function () {\n return {\n fontFamily: this.external_personFontFamily,\n fontSize: this.external_personFontSize,\n fontWeight: this.external_personFontWeight,\n };\n },\n\n systemFont: function () {\n return {\n fontFamily: this.systemFontFamily,\n fontSize: this.systemFontSize,\n fontWeight: this.systemFontWeight,\n };\n },\n\n external_systemFont: function () {\n return {\n fontFamily: this.external_systemFontFamily,\n fontSize: this.external_systemFontSize,\n fontWeight: this.external_systemFontWeight,\n };\n },\n\n system_dbFont: function () {\n return {\n fontFamily: this.system_dbFontFamily,\n fontSize: this.system_dbFontSize,\n fontWeight: this.system_dbFontWeight,\n };\n },\n\n external_system_dbFont: function () {\n return {\n fontFamily: this.external_system_dbFontFamily,\n fontSize: this.external_system_dbFontSize,\n fontWeight: this.external_system_dbFontWeight,\n };\n },\n\n system_queueFont: function () {\n return {\n fontFamily: this.system_queueFontFamily,\n fontSize: this.system_queueFontSize,\n fontWeight: this.system_queueFontWeight,\n };\n },\n\n external_system_queueFont: function () {\n return {\n fontFamily: this.external_system_queueFontFamily,\n fontSize: this.external_system_queueFontSize,\n fontWeight: this.external_system_queueFontWeight,\n };\n },\n\n containerFont: function () {\n return {\n fontFamily: this.containerFontFamily,\n fontSize: this.containerFontSize,\n fontWeight: this.containerFontWeight,\n };\n },\n\n external_containerFont: function () {\n return {\n fontFamily: this.external_containerFontFamily,\n fontSize: this.external_containerFontSize,\n fontWeight: this.external_containerFontWeight,\n };\n },\n\n container_dbFont: function () {\n return {\n fontFamily: this.container_dbFontFamily,\n fontSize: this.container_dbFontSize,\n fontWeight: this.container_dbFontWeight,\n };\n },\n\n external_container_dbFont: function () {\n return {\n fontFamily: this.external_container_dbFontFamily,\n fontSize: this.external_container_dbFontSize,\n fontWeight: this.external_container_dbFontWeight,\n };\n },\n\n container_queueFont: function () {\n return {\n fontFamily: this.container_queueFontFamily,\n fontSize: this.container_queueFontSize,\n fontWeight: this.container_queueFontWeight,\n };\n },\n\n external_container_queueFont: function () {\n return {\n fontFamily: this.external_container_queueFontFamily,\n fontSize: this.external_container_queueFontSize,\n fontWeight: this.external_container_queueFontWeight,\n };\n },\n\n componentFont: function () {\n return {\n fontFamily: this.componentFontFamily,\n fontSize: this.componentFontSize,\n fontWeight: this.componentFontWeight,\n };\n },\n\n external_componentFont: function () {\n return {\n fontFamily: this.external_componentFontFamily,\n fontSize: this.external_componentFontSize,\n fontWeight: this.external_componentFontWeight,\n };\n },\n\n component_dbFont: function () {\n return {\n fontFamily: this.component_dbFontFamily,\n fontSize: this.component_dbFontSize,\n fontWeight: this.component_dbFontWeight,\n };\n },\n\n external_component_dbFont: function () {\n return {\n fontFamily: this.external_component_dbFontFamily,\n fontSize: this.external_component_dbFontSize,\n fontWeight: this.external_component_dbFontWeight,\n };\n },\n\n component_queueFont: function () {\n return {\n fontFamily: this.component_queueFontFamily,\n fontSize: this.component_queueFontSize,\n fontWeight: this.component_queueFontWeight,\n };\n },\n\n external_component_queueFont: function () {\n return {\n fontFamily: this.external_component_queueFontFamily,\n fontSize: this.external_component_queueFontSize,\n fontWeight: this.external_component_queueFontWeight,\n };\n },\n\n boundaryFont: function () {\n return {\n fontFamily: this.boundaryFontFamily,\n fontSize: this.boundaryFontSize,\n fontWeight: this.boundaryFontWeight,\n };\n },\n\n messageFont: function () {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight,\n };\n },\n },\n pie: {\n ...defaultConfigJson.pie,\n useWidth: 984,\n },\n xyChart: {\n ...defaultConfigJson.xyChart,\n useWidth: undefined,\n },\n requirement: {\n ...defaultConfigJson.requirement,\n useWidth: undefined,\n },\n packet: {\n ...defaultConfigJson.packet,\n },\n};\n\nconst keyify = (obj: any, prefix = ''): string[] =>\n Object.keys(obj).reduce((res: string[], el): string[] => {\n if (Array.isArray(obj[el])) {\n return res;\n } else if (typeof obj[el] === 'object' && obj[el] !== null) {\n return [...res, prefix + el, ...keyify(obj[el], '')];\n }\n return [...res, prefix + el];\n }, []);\n\nexport const configKeys = new Set(keyify(config, ''));\nexport default config;\n", "import { configKeys } from '../defaultConfig.js';\nimport { log } from '../logger.js';\n\n/**\n * Sanitizes directive objects\n *\n * @param args - Directive's JSON\n */\nexport const sanitizeDirective = (args: any): void => {\n log.debug('sanitizeDirective called with', args);\n\n // Return if not an object\n if (typeof args !== 'object' || args == null) {\n return;\n }\n\n // Sanitize each element if an array\n if (Array.isArray(args)) {\n args.forEach((arg) => sanitizeDirective(arg));\n return;\n }\n\n // Sanitize each key if an object\n for (const key of Object.keys(args)) {\n log.debug('Checking key', key);\n if (\n key.startsWith('__') ||\n key.includes('proto') ||\n key.includes('constr') ||\n !configKeys.has(key) ||\n args[key] == null\n ) {\n log.debug('sanitize deleting key: ', key);\n delete args[key];\n continue;\n }\n\n // Recurse if an object\n if (typeof args[key] === 'object') {\n log.debug('sanitizing object', key);\n sanitizeDirective(args[key]);\n continue;\n }\n\n const cssMatchers = ['themeCSS', 'fontFamily', 'altFontFamily'];\n for (const cssKey of cssMatchers) {\n if (key.includes(cssKey)) {\n log.debug('sanitizing css option', key);\n args[key] = sanitizeCss(args[key]);\n }\n }\n }\n\n if (args.themeVariables) {\n for (const k of Object.keys(args.themeVariables)) {\n const val = args.themeVariables[k];\n if (val?.match && !val.match(/^[\\d \"#%(),.;A-Za-z]+$/)) {\n args.themeVariables[k] = '';\n }\n }\n }\n log.debug('After sanitization', args);\n};\n\nexport const sanitizeCss = (str: string): string => {\n let startCnt = 0;\n let endCnt = 0;\n\n for (const element of str) {\n if (startCnt < endCnt) {\n return '{ /* ERROR: Unbalanced CSS */ }';\n }\n if (element === '{') {\n startCnt++;\n } else if (element === '}') {\n endCnt++;\n }\n }\n if (startCnt !== endCnt) {\n return '{ /* ERROR: Unbalanced CSS */ }';\n }\n // Todo add more checks here\n return str;\n};\n", "import assignWithDepth from './assignWithDepth.js';\nimport { log } from './logger.js';\nimport theme from './themes/index.js';\nimport config from './defaultConfig.js';\nimport type { MermaidConfig } from './config.type.js';\nimport { sanitizeDirective } from './utils/sanitizeDirective.js';\n\nexport const defaultConfig: MermaidConfig = Object.freeze(config);\n\nlet siteConfig: MermaidConfig = assignWithDepth({}, defaultConfig);\nlet configFromInitialize: MermaidConfig;\nlet directives: MermaidConfig[] = [];\nlet currentConfig: MermaidConfig = assignWithDepth({}, defaultConfig);\n\nexport const updateCurrentConfig = (siteCfg: MermaidConfig, _directives: MermaidConfig[]) => {\n // start with config being the siteConfig\n let cfg: MermaidConfig = assignWithDepth({}, siteCfg);\n // let sCfg = assignWithDepth(defaultConfig, siteConfigDelta);\n\n // Join directives\n let sumOfDirectives: MermaidConfig = {};\n for (const d of _directives) {\n sanitize(d);\n // Apply the data from the directive where the overrides the themeVariables\n sumOfDirectives = assignWithDepth(sumOfDirectives, d);\n }\n\n cfg = assignWithDepth(cfg, sumOfDirectives);\n\n if (sumOfDirectives.theme && sumOfDirectives.theme in theme) {\n const tmpConfigFromInitialize = assignWithDepth({}, configFromInitialize);\n const themeVariables = assignWithDepth(\n tmpConfigFromInitialize.themeVariables || {},\n sumOfDirectives.themeVariables\n );\n if (cfg.theme && cfg.theme in theme) {\n cfg.themeVariables = theme[cfg.theme as keyof typeof theme].getThemeVariables(themeVariables);\n }\n }\n\n currentConfig = cfg;\n checkConfig(currentConfig);\n return currentConfig;\n};\n\n/**\n * ## setSiteConfig\n *\n * | Function | Description | Type | Values |\n * | ------------- | ------------------------------------- | ----------- | --------------------------------------- |\n * | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |\n *\n * **Notes:** Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls\n * to reset() will reset the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig)\n * will reset siteConfig and currentConfig to the defaultConfig Note: currentConfig is set in this\n * function _Default value: At default, will mirror Global Config_\n *\n * @param conf - The base currentConfig to use as siteConfig\n * @returns The new siteConfig\n */\nexport const setSiteConfig = (conf: MermaidConfig): MermaidConfig => {\n siteConfig = assignWithDepth({}, defaultConfig);\n siteConfig = assignWithDepth(siteConfig, conf);\n\n // @ts-ignore: TODO Fix ts errors\n if (conf.theme && theme[conf.theme]) {\n // @ts-ignore: TODO Fix ts errors\n siteConfig.themeVariables = theme[conf.theme].getThemeVariables(conf.themeVariables);\n }\n\n updateCurrentConfig(siteConfig, directives);\n return siteConfig;\n};\n\nexport const saveConfigFromInitialize = (conf: MermaidConfig): void => {\n configFromInitialize = assignWithDepth({}, conf);\n};\n\nexport const updateSiteConfig = (conf: MermaidConfig): MermaidConfig => {\n siteConfig = assignWithDepth(siteConfig, conf);\n updateCurrentConfig(siteConfig, directives);\n\n return siteConfig;\n};\n/**\n * ## getSiteConfig\n *\n * | Function | Description | Type | Values |\n * | ------------- | ------------------------------------------------- | ----------- | -------------------------------- |\n * | setSiteConfig | Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig |\n *\n * **Notes**: Returns **any** values in siteConfig.\n *\n * @returns The siteConfig\n */\nexport const getSiteConfig = (): MermaidConfig => {\n return assignWithDepth({}, siteConfig);\n};\n/**\n * ## setConfig\n *\n * | Function | Description | Type | Values |\n * | ------------- | ------------------------------------- | ----------- | --------------------------------------- |\n * | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |\n *\n * **Notes**: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure\n * keys. Any values found in conf with key found in siteConfig.secure will be replaced with the\n * corresponding siteConfig value.\n *\n * @param conf - The potential currentConfig\n * @returns The currentConfig merged with the sanitized conf\n */\nexport const setConfig = (conf: MermaidConfig): MermaidConfig => {\n checkConfig(conf);\n assignWithDepth(currentConfig, conf);\n\n return getConfig();\n};\n\n/**\n * ## getConfig\n *\n * | Function | Description | Type | Return Values |\n * | --------- | ------------------------- | ----------- | ------------------------------ |\n * | getConfig | Obtains the currentConfig | Get Request | Any Values from current Config |\n *\n * **Notes**: Avoid calling this function repeatedly. Instead, store the result in a variable and use it, and pass it down to function calls.\n *\n * @returns The currentConfig\n */\nexport const getConfig = (): MermaidConfig => {\n return assignWithDepth({}, currentConfig);\n};\n/**\n * ## sanitize\n *\n * | Function | Description | Type | Values |\n * | -------- | -------------------------------------- | ----------- | ------ |\n * | sanitize | Sets the siteConfig to desired values. | Put Request | None |\n *\n * Ensures options parameter does not attempt to override siteConfig secure keys **Notes**: modifies\n * options in-place\n *\n * @param options - The potential setConfig parameter\n */\nexport const sanitize = (options: any) => {\n if (!options) {\n return;\n }\n // Checking that options are not in the list of excluded options\n ['secure', ...(siteConfig.secure ?? [])].forEach((key) => {\n if (Object.hasOwn(options, key)) {\n // DO NOT attempt to print options[key] within `${}` as a malicious script\n // can exploit the logger's attempt to stringify the value and execute arbitrary code\n log.debug(`Denied attempt to modify a secure key ${key}`, options[key]);\n delete options[key];\n }\n });\n\n // Check that there no attempts of prototype pollution\n Object.keys(options).forEach((key) => {\n if (key.startsWith('__')) {\n delete options[key];\n }\n });\n // Check that there no attempts of xss, there should be no tags at all in the directive\n // blocking data urls as base64 urls can contain svg's with inline script tags\n Object.keys(options).forEach((key) => {\n if (\n typeof options[key] === 'string' &&\n (options[key].includes('<') ||\n options[key].includes('>') ||\n options[key].includes('url(data:'))\n ) {\n delete options[key];\n }\n if (typeof options[key] === 'object') {\n sanitize(options[key]);\n }\n });\n};\n\n/**\n * Pushes in a directive to the configuration\n *\n * @param directive - The directive to push in\n */\nexport const addDirective = (directive: MermaidConfig) => {\n sanitizeDirective(directive);\n\n // If the directive has a fontFamily, but no themeVariables, add the fontFamily to the themeVariables\n if (directive.fontFamily && !directive.themeVariables?.fontFamily) {\n directive.themeVariables = {\n ...directive.themeVariables,\n fontFamily: directive.fontFamily,\n };\n }\n\n directives.push(directive);\n updateCurrentConfig(siteConfig, directives);\n};\n\n/**\n * ## reset\n *\n * | Function | Description | Type | Required | Values |\n * | -------- | ---------------------------- | ----------- | -------- | ------ |\n * | reset | Resets currentConfig to conf | Put Request | Required | None |\n *\n * ## conf\n *\n * | Parameter | Description | Type | Required | Values |\n * | --------- | -------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- |\n * | conf | base set of values, which currentConfig could be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array |\n *\n * **Notes**: (default: current siteConfig ) (optional, default `getSiteConfig()`)\n *\n * @param config - base set of values, which currentConfig could be **reset** to.\n * Defaults to the current siteConfig (e.g returned by {@link getSiteConfig}).\n */\nexport const reset = (config = siteConfig): void => {\n // Replace current config with siteConfig\n directives = [];\n updateCurrentConfig(config, directives);\n};\n\nconst ConfigWarning = {\n LAZY_LOAD_DEPRECATED:\n 'The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.',\n} as const;\n\ntype ConfigWarningStrings = keyof typeof ConfigWarning;\nconst issuedWarnings: { [key in ConfigWarningStrings]?: boolean } = {};\nconst issueWarning = (warning: ConfigWarningStrings) => {\n if (issuedWarnings[warning]) {\n return;\n }\n log.warn(ConfigWarning[warning]);\n issuedWarnings[warning] = true;\n};\n\nconst checkConfig = (config: MermaidConfig) => {\n if (!config) {\n return;\n }\n // @ts-expect-error Properties were removed in v10. Warning should exist.\n if (config.lazyLoadedDiagrams || config.loadExternalDiagramsAtStartup) {\n issueWarning('LAZY_LOAD_DEPRECATED');\n }\n};\n", "const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n} = Object;\n\nlet { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports\nlet { apply, construct } = typeof Reflect !== 'undefined' && Reflect;\n\nif (!freeze) {\n freeze = function (x) {\n return x;\n };\n}\n\nif (!seal) {\n seal = function (x) {\n return x;\n };\n}\n\nif (!apply) {\n apply = function (fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\n\nif (!construct) {\n construct = function (Func, args) {\n return new Func(...args);\n };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayIndexOf = unapply(Array.prototype.indexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\n\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\n\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n\nconst regExpTest = unapply(RegExp.prototype.test);\n\nconst typeErrorCreate = unconstruct(TypeError);\n\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(func) {\n return (thisArg, ...args) => apply(func, thisArg, args);\n}\n\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(func) {\n return (...args) => construct(func, args);\n}\n\n/**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\nfunction addToSet(set, array, transformCaseFunc = stringToLowerCase) {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n}\n\n/**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\nfunction cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n\n return array;\n}\n\n/**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\nfunction clone(object) {\n const newObject = create(null);\n\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (\n value &&\n typeof value === 'object' &&\n value.constructor === Object\n ) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n\n return newObject;\n}\n\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue() {\n return null;\n }\n\n return fallbackValue;\n}\n\nexport {\n // Array\n arrayForEach,\n arrayIndexOf,\n arrayPop,\n arrayPush,\n arraySlice,\n // Object\n entries,\n freeze,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n isFrozen,\n setPrototypeOf,\n seal,\n clone,\n create,\n objectHasOwnProperty,\n // RegExp\n regExpTest,\n // String\n stringIndexOf,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringTrim,\n // Errors\n typeErrorCreate,\n // Other\n lookupGetter,\n addToSet,\n // Reflect\n unapply,\n unconstruct,\n};\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'a',\n 'abbr',\n 'acronym',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blink',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'content',\n 'data',\n 'datalist',\n 'dd',\n 'decorator',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'element',\n 'em',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'main',\n 'map',\n 'mark',\n 'marquee',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'nobr',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'section',\n 'select',\n 'shadow',\n 'small',\n 'source',\n 'spacer',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n]);\n\n// SVG\nexport const svg = freeze([\n 'svg',\n 'a',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'style',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'view',\n 'vkern',\n]);\n\nexport const svgFilters = freeze([\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n]);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nexport const svgDisallowed = freeze([\n 'animate',\n 'color-profile',\n 'cursor',\n 'discard',\n 'font-face',\n 'font-face-format',\n 'font-face-name',\n 'font-face-src',\n 'font-face-uri',\n 'foreignobject',\n 'hatch',\n 'hatchpath',\n 'mesh',\n 'meshgradient',\n 'meshpatch',\n 'meshrow',\n 'missing-glyph',\n 'script',\n 'set',\n 'solidcolor',\n 'unknown',\n 'use',\n]);\n\nexport const mathMl = freeze([\n 'math',\n 'menclose',\n 'merror',\n 'mfenced',\n 'mfrac',\n 'mglyph',\n 'mi',\n 'mlabeledtr',\n 'mmultiscripts',\n 'mn',\n 'mo',\n 'mover',\n 'mpadded',\n 'mphantom',\n 'mroot',\n 'mrow',\n 'ms',\n 'mspace',\n 'msqrt',\n 'mstyle',\n 'msub',\n 'msup',\n 'msubsup',\n 'mtable',\n 'mtd',\n 'mtext',\n 'mtr',\n 'munder',\n 'munderover',\n 'mprescripts',\n]);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nexport const mathMlDisallowed = freeze([\n 'maction',\n 'maligngroup',\n 'malignmark',\n 'mlongdiv',\n 'mscarries',\n 'mscarry',\n 'msgroup',\n 'mstack',\n 'msline',\n 'msrow',\n 'semantics',\n 'annotation',\n 'annotation-xml',\n 'mprescripts',\n 'none',\n]);\n\nexport const text = freeze(['#text']);\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'accept',\n 'action',\n 'align',\n 'alt',\n 'autocapitalize',\n 'autocomplete',\n 'autopictureinpicture',\n 'autoplay',\n 'background',\n 'bgcolor',\n 'border',\n 'capture',\n 'cellpadding',\n 'cellspacing',\n 'checked',\n 'cite',\n 'class',\n 'clear',\n 'color',\n 'cols',\n 'colspan',\n 'controls',\n 'controlslist',\n 'coords',\n 'crossorigin',\n 'datetime',\n 'decoding',\n 'default',\n 'dir',\n 'disabled',\n 'disablepictureinpicture',\n 'disableremoteplayback',\n 'download',\n 'draggable',\n 'enctype',\n 'enterkeyhint',\n 'face',\n 'for',\n 'headers',\n 'height',\n 'hidden',\n 'high',\n 'href',\n 'hreflang',\n 'id',\n 'inputmode',\n 'integrity',\n 'ismap',\n 'kind',\n 'label',\n 'lang',\n 'list',\n 'loading',\n 'loop',\n 'low',\n 'max',\n 'maxlength',\n 'media',\n 'method',\n 'min',\n 'minlength',\n 'multiple',\n 'muted',\n 'name',\n 'nonce',\n 'noshade',\n 'novalidate',\n 'nowrap',\n 'open',\n 'optimum',\n 'pattern',\n 'placeholder',\n 'playsinline',\n 'popover',\n 'popovertarget',\n 'popovertargetaction',\n 'poster',\n 'preload',\n 'pubdate',\n 'radiogroup',\n 'readonly',\n 'rel',\n 'required',\n 'rev',\n 'reversed',\n 'role',\n 'rows',\n 'rowspan',\n 'spellcheck',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'sizes',\n 'span',\n 'srclang',\n 'start',\n 'src',\n 'srcset',\n 'step',\n 'style',\n 'summary',\n 'tabindex',\n 'title',\n 'translate',\n 'type',\n 'usemap',\n 'valign',\n 'value',\n 'width',\n 'wrap',\n 'xmlns',\n 'slot',\n]);\n\nexport const svg = freeze([\n 'accent-height',\n 'accumulate',\n 'additive',\n 'alignment-baseline',\n 'ascent',\n 'attributename',\n 'attributetype',\n 'azimuth',\n 'basefrequency',\n 'baseline-shift',\n 'begin',\n 'bias',\n 'by',\n 'class',\n 'clip',\n 'clippathunits',\n 'clip-path',\n 'clip-rule',\n 'color',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'diffuseconstant',\n 'direction',\n 'display',\n 'divisor',\n 'dur',\n 'edgemode',\n 'elevation',\n 'end',\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n 'filter',\n 'filterunits',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'fx',\n 'fy',\n 'g1',\n 'g2',\n 'glyph-name',\n 'glyphref',\n 'gradientunits',\n 'gradienttransform',\n 'height',\n 'href',\n 'id',\n 'image-rendering',\n 'in',\n 'in2',\n 'k',\n 'k1',\n 'k2',\n 'k3',\n 'k4',\n 'kerning',\n 'keypoints',\n 'keysplines',\n 'keytimes',\n 'lang',\n 'lengthadjust',\n 'letter-spacing',\n 'kernelmatrix',\n 'kernelunitlength',\n 'lighting-color',\n 'local',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'markerheight',\n 'markerunits',\n 'markerwidth',\n 'maskcontentunits',\n 'maskunits',\n 'max',\n 'mask',\n 'media',\n 'method',\n 'mode',\n 'min',\n 'name',\n 'numoctaves',\n 'offset',\n 'operator',\n 'opacity',\n 'order',\n 'orient',\n 'orientation',\n 'origin',\n 'overflow',\n 'paint-order',\n 'path',\n 'pathlength',\n 'patterncontentunits',\n 'patterntransform',\n 'patternunits',\n 'points',\n 'preservealpha',\n 'preserveaspectratio',\n 'primitiveunits',\n 'r',\n 'rx',\n 'ry',\n 'radius',\n 'refx',\n 'refy',\n 'repeatcount',\n 'repeatdur',\n 'restart',\n 'result',\n 'rotate',\n 'scale',\n 'seed',\n 'shape-rendering',\n 'specularconstant',\n 'specularexponent',\n 'spreadmethod',\n 'startoffset',\n 'stddeviation',\n 'stitchtiles',\n 'stop-color',\n 'stop-opacity',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke',\n 'stroke-width',\n 'style',\n 'surfacescale',\n 'systemlanguage',\n 'tabindex',\n 'targetx',\n 'targety',\n 'transform',\n 'transform-origin',\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n 'textlength',\n 'type',\n 'u1',\n 'u2',\n 'unicode',\n 'values',\n 'viewbox',\n 'visibility',\n 'version',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'width',\n 'word-spacing',\n 'wrap',\n 'writing-mode',\n 'xchannelselector',\n 'ychannelselector',\n 'x',\n 'x1',\n 'x2',\n 'xmlns',\n 'y',\n 'y1',\n 'y2',\n 'z',\n 'zoomandpan',\n]);\n\nexport const mathMl = freeze([\n 'accent',\n 'accentunder',\n 'align',\n 'bevelled',\n 'close',\n 'columnsalign',\n 'columnlines',\n 'columnspan',\n 'denomalign',\n 'depth',\n 'dir',\n 'display',\n 'displaystyle',\n 'encoding',\n 'fence',\n 'frame',\n 'height',\n 'href',\n 'id',\n 'largeop',\n 'length',\n 'linethickness',\n 'lspace',\n 'lquote',\n 'mathbackground',\n 'mathcolor',\n 'mathsize',\n 'mathvariant',\n 'maxsize',\n 'minsize',\n 'movablelimits',\n 'notation',\n 'numalign',\n 'open',\n 'rowalign',\n 'rowlines',\n 'rowspacing',\n 'rowspan',\n 'rspace',\n 'rquote',\n 'scriptlevel',\n 'scriptminsize',\n 'scriptsizemultiplier',\n 'selection',\n 'separator',\n 'separators',\n 'stretchy',\n 'subscriptshift',\n 'supscriptshift',\n 'symmetric',\n 'voffset',\n 'width',\n 'xmlns',\n]);\n\nexport const xml = freeze([\n 'xlink:href',\n 'xml:id',\n 'xlink:title',\n 'xml:space',\n 'xmlns:xlink',\n]);\n", "import { seal } from './utils.js';\n\n// eslint-disable-next-line unicorn/better-regex\nexport const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nexport const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nexport const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\nexport const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\nexport const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nexport const IS_ALLOWED_URI = seal(\n /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nexport const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nexport const ATTR_WHITESPACE = seal(\n /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nexport const DOCTYPE_NAME = seal(/^html$/i);\nexport const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n", "import * as TAGS from './tags.js';\nimport * as ATTRS from './attrs.js';\nimport * as EXPRESSIONS from './regexp.js';\nimport {\n addToSet,\n clone,\n entries,\n freeze,\n arrayForEach,\n arrayPop,\n arrayPush,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringIndexOf,\n stringTrim,\n regExpTest,\n typeErrorCreate,\n lookupGetter,\n create,\n objectHasOwnProperty,\n} from './utils.js';\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5, // Deprecated\n entityNode: 6, // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12, // Deprecated\n};\n\nconst getGlobal = function () {\n return typeof window === 'undefined' ? null : window;\n};\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function (trustedTypes, purifyHostElement) {\n if (\n typeof trustedTypes !== 'object' ||\n typeof trustedTypes.createPolicy !== 'function'\n ) {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n },\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn(\n 'TrustedTypes policy ' + policyName + ' could not be created.'\n );\n return null;\n }\n};\n\nfunction createDOMPurify(window = getGlobal()) {\n const DOMPurify = (root) => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = VERSION;\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (\n !window ||\n !window.document ||\n window.document.nodeType !== NODE_TYPE.document\n ) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n let { document } = window;\n\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes,\n } = window;\n\n const ElementPrototype = Element.prototype;\n\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const remove = lookupGetter(ElementPrototype, 'remove');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n let trustedTypesPolicy;\n let emptyHTML = '';\n\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName,\n } = document;\n const { importNode } = originalDocument;\n\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported =\n typeof entries === 'function' &&\n typeof getParentNode === 'function' &&\n implementation &&\n implementation.createHTMLDocument !== undefined;\n\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT,\n } = EXPRESSIONS;\n\n let { IS_ALLOWED_URI } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [\n ...TAGS.html,\n ...TAGS.svg,\n ...TAGS.svgFilters,\n ...TAGS.mathMl,\n ...TAGS.text,\n ]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [\n ...ATTRS.html,\n ...ATTRS.svg,\n ...ATTRS.mathMl,\n ...ATTRS.xml,\n ]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(\n create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false,\n },\n })\n );\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, [\n 'annotation-xml',\n 'audio',\n 'colgroup',\n 'desc',\n 'foreignobject',\n 'head',\n 'iframe',\n 'math',\n 'mi',\n 'mn',\n 'mo',\n 'ms',\n 'mtext',\n 'noembed',\n 'noframes',\n 'noscript',\n 'plaintext',\n 'script',\n 'style',\n 'svg',\n 'template',\n 'thead',\n 'title',\n 'video',\n 'xmp',\n ]);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, [\n 'audio',\n 'video',\n 'img',\n 'source',\n 'image',\n 'track',\n ]);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n 'alt',\n 'class',\n 'for',\n 'id',\n 'label',\n 'name',\n 'pattern',\n 'placeholder',\n 'role',\n 'summary',\n 'title',\n 'value',\n 'style',\n 'xmlns',\n ]);\n\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet(\n {},\n [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE],\n stringToString\n );\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n\n const isRegexOrFunction = function (testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function (cfg = {}) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1\n ? DEFAULT_PARSER_MEDIA_TYPE\n : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc =\n PARSER_MEDIA_TYPE === 'application/xhtml+xml'\n ? stringToString\n : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS')\n ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc)\n : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR')\n ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc)\n : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES')\n ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString)\n : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR')\n ? addToSet(\n clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS')\n ? addToSet(\n clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS')\n ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc)\n : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS')\n ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc)\n : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR')\n ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc)\n : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES')\n ? cfg.USE_PROFILES\n : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI = cfg.ALLOWED_URI_REGEXP || EXPRESSIONS.IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)\n ) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck =\n cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)\n ) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck =\n cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements ===\n 'boolean'\n ) {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements =\n cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, TAGS.text);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, TAGS.html);\n addToSet(ALLOWED_ATTR, ATTRS.html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, TAGS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, TAGS.svgFilters);\n addToSet(ALLOWED_ATTR, ATTRS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, TAGS.mathMl);\n addToSet(ALLOWED_ATTR, ATTRS.mathMl);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate(\n 'TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.'\n );\n }\n\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate(\n 'TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.'\n );\n }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(\n trustedTypes,\n currentScript\n );\n }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, [\n 'mi',\n 'mo',\n 'mn',\n 'ms',\n 'mtext',\n ]);\n\n const HTML_INTEGRATION_POINTS = addToSet({}, [\n 'foreignobject',\n 'annotation-xml',\n ]);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n 'title',\n 'style',\n 'font',\n 'a',\n 'script',\n ]);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [\n ...TAGS.svg,\n ...TAGS.svgFilters,\n ...TAGS.svgDisallowed,\n ]);\n const ALL_MATHML_TAGS = addToSet({}, [\n ...TAGS.mathMl,\n ...TAGS.mathMlDisallowed,\n ]);\n\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function (element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template',\n };\n }\n\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return (\n tagName === 'svg' &&\n (parentTagName === 'annotation-xml' ||\n MATHML_TEXT_INTEGRATION_POINTS[parentTagName])\n );\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (\n parent.namespaceURI === SVG_NAMESPACE &&\n !HTML_INTEGRATION_POINTS[parentTagName]\n ) {\n return false;\n }\n\n if (\n parent.namespaceURI === MATHML_NAMESPACE &&\n !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]\n ) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return (\n !ALL_MATHML_TAGS[tagName] &&\n (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName])\n );\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (\n PARSER_MEDIA_TYPE === 'application/xhtml+xml' &&\n ALLOWED_NAMESPACES[element.namespaceURI]\n ) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n const _forceRemove = function (node) {\n arrayPush(DOMPurify.removed, { element: node });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n getParentNode(node).removeChild(node);\n } catch (_) {\n remove(node);\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n const _removeAttribute = function (name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node,\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node,\n });\n }\n\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n const _initDocument = function (dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (\n PARSER_MEDIA_TYPE === 'application/xhtml+xml' &&\n NAMESPACE === HTML_NAMESPACE\n ) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty =\n '' +\n dirty +\n '';\n }\n\n const dirtyPayload = trustedTypesPolicy\n ? trustedTypesPolicy.createHTML(dirty)\n : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT\n ? emptyHTML\n : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n\n const body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(\n document.createTextNode(leadingWhitespace),\n body.childNodes[0] || null\n );\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(\n doc,\n WHOLE_DOCUMENT ? 'html' : 'body'\n )[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n const _createNodeIterator = function (root) {\n return createNodeIterator.call(\n root.ownerDocument || root,\n root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT |\n NodeFilter.SHOW_COMMENT |\n NodeFilter.SHOW_TEXT |\n NodeFilter.SHOW_PROCESSING_INSTRUCTION |\n NodeFilter.SHOW_CDATA_SECTION,\n null\n );\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n const _isClobbered = function (elm) {\n return (\n elm instanceof HTMLFormElement &&\n (typeof elm.nodeName !== 'string' ||\n typeof elm.textContent !== 'string' ||\n typeof elm.removeChild !== 'function' ||\n !(elm.attributes instanceof NamedNodeMap) ||\n typeof elm.removeAttribute !== 'function' ||\n typeof elm.setAttribute !== 'function' ||\n typeof elm.namespaceURI !== 'string' ||\n typeof elm.insertBefore !== 'function' ||\n typeof elm.hasChildNodes !== 'function')\n );\n };\n\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n const _isNode = function (object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n const _executeHook = function (entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], (hook) => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n const _sanitizeElements = function (currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS,\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (\n currentNode.hasChildNodes() &&\n !_isNode(currentNode.firstElementChild) &&\n regExpTest(/<[/\\w]/g, currentNode.innerHTML) &&\n regExpTest(/<[/\\w]/g, currentNode.textContent)\n ) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any occurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any kind of possibly harmful comments */\n if (\n SAFE_FOR_XML &&\n currentNode.nodeType === NODE_TYPE.comment &&\n regExpTest(/<[/\\w]/g, currentNode.data)\n ) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (\n CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp &&\n regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)\n ) {\n return false;\n }\n\n if (\n CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function &&\n CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)\n ) {\n return false;\n }\n }\n\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n\n for (let i = childCount - 1; i >= 0; --i) {\n const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if (\n (tagName === 'noscript' ||\n tagName === 'noembed' ||\n tagName === 'noframes') &&\n regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)\n ) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n /* Get the element's text content */\n content = currentNode.textContent;\n\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], (expr) => {\n content = stringReplace(content, expr, ' ');\n });\n\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function (lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (\n SANITIZE_DOM &&\n (lcName === 'id' || lcName === 'name') &&\n (value in document || value in formElement)\n ) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (\n ALLOW_DATA_ATTR &&\n !FORBID_ATTR[lcName] &&\n regExpTest(DATA_ATTR, lcName)\n ) {\n // This attribute is safe\n } else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) {\n // This attribute is safe\n /* Otherwise, check the name is permitted */\n } else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n (_isBasicCustomElement(lcTag) &&\n ((CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp &&\n regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag)) ||\n (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function &&\n CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag))) &&\n ((CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp &&\n regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName)) ||\n (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function &&\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)))) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n (lcName === 'is' &&\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements &&\n ((CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp &&\n regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value)) ||\n (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function &&\n CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))))\n ) {\n // If user has supplied a regexp or function in CUSTOM_ELEMENT_HANDLING.tagNameCheck, we need to also allow derived custom elements using the same tagName test.\n // Additionally, we need to allow attributes passing the CUSTOM_ELEMENT_HANDLING.attributeNameCheck user has configured, as custom elements can define these at their own discretion.\n } else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) {\n // This attribute is safe\n /* Check no script, data or unknown possibly unsafe URI\n unless we know URI values are safe for that attribute */\n } else if (\n regExpTest(IS_ALLOWED_URI, stringReplace(value, ATTR_WHITESPACE, ''))\n ) {\n // This attribute is safe\n /* Keep image data URIs alive if src/xlink:href is allowed */\n /* Further prevent gadget XSS for dynamically built script tags */\n } else if (\n (lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') &&\n lcTag !== 'script' &&\n stringIndexOf(value, 'data:') === 0 &&\n DATA_URI_TAGS[lcTag]\n ) {\n // This attribute is safe\n /* Allow unknown protocols: This provides support for links that\n are handled by protocol handlers which may be unknown ahead of\n time, e.g. fb:, spotify: */\n } else if (\n ALLOW_UNKNOWN_PROTOCOLS &&\n !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))\n ) {\n // This attribute is safe\n /* Check for binary attributes */\n } else if (value) {\n return false;\n } else {\n // Binary attributes are safe at this point\n /* Anything else, presume unsafe, do not add it back */\n }\n\n return true;\n };\n\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function (tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n const _sanitizeAttributes = function (currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n const { attributes } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes) {\n return;\n }\n\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR,\n };\n let l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const { name, namespaceURI, value: attrValue } = attr;\n const lcName = transformCaseFunc(name);\n\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], (expr) => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Handle attributes that require Trusted Types */\n if (\n trustedTypesPolicy &&\n typeof trustedTypes === 'object' &&\n typeof trustedTypes.getAttributeType === 'function'\n ) {\n if (namespaceURI) {\n /* Namespaces are not yet supported, see https://bugs.chromium.org/p/chromium/issues/detail?id=1305293 */\n } else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML': {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n\n case 'TrustedScriptURL': {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n\n default: {\n break;\n }\n }\n }\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function (fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while ((shadowNode = shadowIterator.nextNode())) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty, cfg = {}) {\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate(\n 'root node is forbidden and cannot be sanitized in-place'\n );\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (\n importedNode.nodeType === NODE_TYPE.element &&\n importedNode.nodeName === 'BODY'\n ) {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (\n !RETURN_DOM &&\n !SAFE_FOR_TEMPLATES &&\n !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1\n ) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE\n ? trustedTypesPolicy.createHTML(dirty)\n : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while ((currentNode = nodeIterator.nextNode())) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Serialize doctype if allowed */\n if (\n WHOLE_DOCUMENT &&\n ALLOWED_TAGS['!doctype'] &&\n body.ownerDocument &&\n body.ownerDocument.doctype &&\n body.ownerDocument.doctype.name &&\n regExpTest(EXPRESSIONS.DOCTYPE_NAME, body.ownerDocument.doctype.name)\n ) {\n serializedHTML =\n '\\n' + serializedHTML;\n }\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], (expr) => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE\n ? trustedTypesPolicy.createHTML(serializedHTML)\n : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function (cfg = {}) {\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n}\n\nexport default createDOMPurify();\n", "/**\n * Lexing or parsing positional information for error reporting.\n * This object is immutable.\n */\nclass SourceLocation {\n // The + prefix indicates that these fields aren't writeable\n // Lexer holding the input string.\n // Start offset, zero-based inclusive.\n // End offset, zero-based exclusive.\n constructor(lexer, start, end) {\n this.lexer = void 0;\n this.start = void 0;\n this.end = void 0;\n this.lexer = lexer;\n this.start = start;\n this.end = end;\n }\n /**\n * Merges two `SourceLocation`s from location providers, given they are\n * provided in order of appearance.\n * - Returns the first one's location if only the first is provided.\n * - Returns a merged range of the first and the last if both are provided\n * and their lexers match.\n * - Otherwise, returns null.\n */\n\n\n static range(first, second) {\n if (!second) {\n return first && first.loc;\n } else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) {\n return null;\n } else {\n return new SourceLocation(first.loc.lexer, first.loc.start, second.loc.end);\n }\n }\n\n}\n\n/**\n * Interface required to break circular dependency between Token, Lexer, and\n * ParseError.\n */\n\n/**\n * The resulting token returned from `lex`.\n *\n * It consists of the token text plus some position information.\n * The position information is essentially a range in an input string,\n * but instead of referencing the bare input string, we refer to the lexer.\n * That way it is possible to attach extra metadata to the input string,\n * like for example a file name or similar.\n *\n * The position information is optional, so it is OK to construct synthetic\n * tokens if appropriate. Not providing available position information may\n * lead to degraded error reporting, though.\n */\nclass Token {\n // don't expand the token\n // used in \\noexpand\n constructor(text, // the text of this token\n loc) {\n this.text = void 0;\n this.loc = void 0;\n this.noexpand = void 0;\n this.treatAsRelax = void 0;\n this.text = text;\n this.loc = loc;\n }\n /**\n * Given a pair of tokens (this and endToken), compute a `Token` encompassing\n * the whole input range enclosed by these two.\n */\n\n\n range(endToken, // last token of the range, inclusive\n text // the text of the newly constructed token\n ) {\n return new Token(text, SourceLocation.range(this, endToken));\n }\n\n}\n\n/**\n * This is the ParseError class, which is the main error thrown by KaTeX\n * functions when something has gone wrong. This is used to distinguish internal\n * errors from errors in the expression that the user provided.\n *\n * If possible, a caller should provide a Token or ParseNode with information\n * about where in the source string the problem occurred.\n */\nclass ParseError {\n // Error start position based on passed-in Token or ParseNode.\n // Length of affected text based on passed-in Token or ParseNode.\n // The underlying error message without any context added.\n constructor(message, // The error message\n token // An object providing position information\n ) {\n this.name = void 0;\n this.position = void 0;\n this.length = void 0;\n this.rawMessage = void 0;\n var error = \"KaTeX parse error: \" + message;\n var start;\n var end;\n var loc = token && token.loc;\n\n if (loc && loc.start <= loc.end) {\n // If we have the input and a position, make the error a bit fancier\n // Get the input\n var input = loc.lexer.input; // Prepend some information\n\n start = loc.start;\n end = loc.end;\n\n if (start === input.length) {\n error += \" at end of input: \";\n } else {\n error += \" at position \" + (start + 1) + \": \";\n } // Underline token in question using combining underscores\n\n\n var underlined = input.slice(start, end).replace(/[^]/g, \"$&\\u0332\"); // Extract some context from the input and add it to the error\n\n var left;\n\n if (start > 15) {\n left = \"\u2026\" + input.slice(start - 15, start);\n } else {\n left = input.slice(0, start);\n }\n\n var right;\n\n if (end + 15 < input.length) {\n right = input.slice(end, end + 15) + \"\u2026\";\n } else {\n right = input.slice(end);\n }\n\n error += left + underlined + right;\n } // Some hackery to make ParseError a prototype of Error\n // See http://stackoverflow.com/a/8460753\n // $FlowFixMe\n\n\n var self = new Error(error);\n self.name = \"ParseError\"; // $FlowFixMe\n\n self.__proto__ = ParseError.prototype;\n self.position = start;\n\n if (start != null && end != null) {\n self.length = end - start;\n }\n\n self.rawMessage = message;\n return self;\n }\n\n} // $FlowFixMe More hackery\n\n\nParseError.prototype.__proto__ = Error.prototype;\n\n/**\n * This file contains a list of utility functions which are useful in other\n * files.\n */\n\n/**\n * Return whether an element is contained in a list\n */\nvar contains = function contains(list, elem) {\n return list.indexOf(elem) !== -1;\n};\n/**\n * Provide a default value if a setting is undefined\n * NOTE: Couldn't use `T` as the output type due to facebook/flow#5022.\n */\n\n\nvar deflt = function deflt(setting, defaultIfUndefined) {\n return setting === undefined ? defaultIfUndefined : setting;\n}; // hyphenate and escape adapted from Facebook's React under Apache 2 license\n\n\nvar uppercase = /([A-Z])/g;\n\nvar hyphenate = function hyphenate(str) {\n return str.replace(uppercase, \"-$1\").toLowerCase();\n};\n\nvar ESCAPE_LOOKUP = {\n \"&\": \"&\",\n \">\": \">\",\n \"<\": \"<\",\n \"\\\"\": \""\",\n \"'\": \"'\"\n};\nvar ESCAPE_REGEX = /[&><\"']/g;\n/**\n * Escapes text to prevent scripting attacks.\n */\n\nfunction escape(text) {\n return String(text).replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);\n}\n/**\n * Sometimes we want to pull out the innermost element of a group. In most\n * cases, this will just be the group itself, but when ordgroups and colors have\n * a single element, we want to pull that out.\n */\n\n\nvar getBaseElem = function getBaseElem(group) {\n if (group.type === \"ordgroup\") {\n if (group.body.length === 1) {\n return getBaseElem(group.body[0]);\n } else {\n return group;\n }\n } else if (group.type === \"color\") {\n if (group.body.length === 1) {\n return getBaseElem(group.body[0]);\n } else {\n return group;\n }\n } else if (group.type === \"font\") {\n return getBaseElem(group.body);\n } else {\n return group;\n }\n};\n/**\n * TeXbook algorithms often reference \"character boxes\", which are simply groups\n * with a single character in them. To decide if something is a character box,\n * we find its innermost group, and see if it is a single character.\n */\n\n\nvar isCharacterBox = function isCharacterBox(group) {\n var baseElem = getBaseElem(group); // These are all they types of groups which hold single characters\n\n return baseElem.type === \"mathord\" || baseElem.type === \"textord\" || baseElem.type === \"atom\";\n};\n\nvar assert = function assert(value) {\n if (!value) {\n throw new Error('Expected non-null, but got ' + String(value));\n }\n\n return value;\n};\n/**\n * Return the protocol of a URL, or \"_relative\" if the URL does not specify a\n * protocol (and thus is relative), or `null` if URL has invalid protocol\n * (so should be outright rejected).\n */\n\nvar protocolFromUrl = function protocolFromUrl(url) {\n // Check for possible leading protocol.\n // https://url.spec.whatwg.org/#url-parsing strips leading whitespace\n // (U+20) or C0 control (U+00-U+1F) characters.\n // eslint-disable-next-line no-control-regex\n var protocol = /^[\\x00-\\x20]*([^\\\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(url);\n\n if (!protocol) {\n return \"_relative\";\n } // Reject weird colons\n\n\n if (protocol[2] !== \":\") {\n return null;\n } // Reject invalid characters in scheme according to\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.1\n\n\n if (!/^[a-zA-Z][a-zA-Z0-9+\\-.]*$/.test(protocol[1])) {\n return null;\n } // Lowercase the protocol\n\n\n return protocol[1].toLowerCase();\n};\nvar utils = {\n contains,\n deflt,\n escape,\n hyphenate,\n getBaseElem,\n isCharacterBox,\n protocolFromUrl\n};\n\n/* eslint no-console:0 */\n// TODO: automatically generate documentation\n// TODO: check all properties on Settings exist\n// TODO: check the type of a property on Settings matches\nvar SETTINGS_SCHEMA = {\n displayMode: {\n type: \"boolean\",\n description: \"Render math in display mode, which puts the math in \" + \"display style (so \\\\int and \\\\sum are large, for example), and \" + \"centers the math on the page on its own line.\",\n cli: \"-d, --display-mode\"\n },\n output: {\n type: {\n enum: [\"htmlAndMathml\", \"html\", \"mathml\"]\n },\n description: \"Determines the markup language of the output.\",\n cli: \"-F, --format \"\n },\n leqno: {\n type: \"boolean\",\n description: \"Render display math in leqno style (left-justified tags).\"\n },\n fleqn: {\n type: \"boolean\",\n description: \"Render display math flush left.\"\n },\n throwOnError: {\n type: \"boolean\",\n default: true,\n cli: \"-t, --no-throw-on-error\",\n cliDescription: \"Render errors (in the color given by --error-color) ins\" + \"tead of throwing a ParseError exception when encountering an error.\"\n },\n errorColor: {\n type: \"string\",\n default: \"#cc0000\",\n cli: \"-c, --error-color \",\n cliDescription: \"A color string given in the format 'rgb' or 'rrggbb' \" + \"(no #). This option determines the color of errors rendered by the \" + \"-t option.\",\n cliProcessor: color => \"#\" + color\n },\n macros: {\n type: \"object\",\n cli: \"-m, --macro \",\n cliDescription: \"Define custom macro of the form '\\\\foo:expansion' (use \" + \"multiple -m arguments for multiple macros).\",\n cliDefault: [],\n cliProcessor: (def, defs) => {\n defs.push(def);\n return defs;\n }\n },\n minRuleThickness: {\n type: \"number\",\n description: \"Specifies a minimum thickness, in ems, for fraction lines,\" + \" `\\\\sqrt` top lines, `{array}` vertical lines, `\\\\hline`, \" + \"`\\\\hdashline`, `\\\\underline`, `\\\\overline`, and the borders of \" + \"`\\\\fbox`, `\\\\boxed`, and `\\\\fcolorbox`.\",\n processor: t => Math.max(0, t),\n cli: \"--min-rule-thickness \",\n cliProcessor: parseFloat\n },\n colorIsTextColor: {\n type: \"boolean\",\n description: \"Makes \\\\color behave like LaTeX's 2-argument \\\\textcolor, \" + \"instead of LaTeX's one-argument \\\\color mode change.\",\n cli: \"-b, --color-is-text-color\"\n },\n strict: {\n type: [{\n enum: [\"warn\", \"ignore\", \"error\"]\n }, \"boolean\", \"function\"],\n description: \"Turn on strict / LaTeX faithfulness mode, which throws an \" + \"error if the input uses features that are not supported by LaTeX.\",\n cli: \"-S, --strict\",\n cliDefault: false\n },\n trust: {\n type: [\"boolean\", \"function\"],\n description: \"Trust the input, enabling all HTML features such as \\\\url.\",\n cli: \"-T, --trust\"\n },\n maxSize: {\n type: \"number\",\n default: Infinity,\n description: \"If non-zero, all user-specified sizes, e.g. in \" + \"\\\\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, \" + \"elements and spaces can be arbitrarily large\",\n processor: s => Math.max(0, s),\n cli: \"-s, --max-size \",\n cliProcessor: parseInt\n },\n maxExpand: {\n type: \"number\",\n default: 1000,\n description: \"Limit the number of macro expansions to the specified \" + \"number, to prevent e.g. infinite macro loops. If set to Infinity, \" + \"the macro expander will try to fully expand as in LaTeX.\",\n processor: n => Math.max(0, n),\n cli: \"-e, --max-expand \",\n cliProcessor: n => n === \"Infinity\" ? Infinity : parseInt(n)\n },\n globalGroup: {\n type: \"boolean\",\n cli: false\n }\n};\n\nfunction getDefaultValue(schema) {\n if (schema.default) {\n return schema.default;\n }\n\n var type = schema.type;\n var defaultType = Array.isArray(type) ? type[0] : type;\n\n if (typeof defaultType !== 'string') {\n return defaultType.enum[0];\n }\n\n switch (defaultType) {\n case 'boolean':\n return false;\n\n case 'string':\n return '';\n\n case 'number':\n return 0;\n\n case 'object':\n return {};\n }\n}\n/**\n * The main Settings object\n *\n * The current options stored are:\n * - displayMode: Whether the expression should be typeset as inline math\n * (false, the default), meaning that the math starts in\n * \\textstyle and is placed in an inline-block); or as display\n * math (true), meaning that the math starts in \\displaystyle\n * and is placed in a block with vertical margin.\n */\n\n\nclass Settings {\n constructor(options) {\n this.displayMode = void 0;\n this.output = void 0;\n this.leqno = void 0;\n this.fleqn = void 0;\n this.throwOnError = void 0;\n this.errorColor = void 0;\n this.macros = void 0;\n this.minRuleThickness = void 0;\n this.colorIsTextColor = void 0;\n this.strict = void 0;\n this.trust = void 0;\n this.maxSize = void 0;\n this.maxExpand = void 0;\n this.globalGroup = void 0;\n // allow null options\n options = options || {};\n\n for (var prop in SETTINGS_SCHEMA) {\n if (SETTINGS_SCHEMA.hasOwnProperty(prop)) {\n // $FlowFixMe\n var schema = SETTINGS_SCHEMA[prop]; // TODO: validate options\n // $FlowFixMe\n\n this[prop] = options[prop] !== undefined ? schema.processor ? schema.processor(options[prop]) : options[prop] : getDefaultValue(schema);\n }\n }\n }\n /**\n * Report nonstrict (non-LaTeX-compatible) input.\n * Can safely not be called if `this.strict` is false in JavaScript.\n */\n\n\n reportNonstrict(errorCode, errorMsg, token) {\n var strict = this.strict;\n\n if (typeof strict === \"function\") {\n // Allow return value of strict function to be boolean or string\n // (or null/undefined, meaning no further processing).\n strict = strict(errorCode, errorMsg, token);\n }\n\n if (!strict || strict === \"ignore\") {\n return;\n } else if (strict === true || strict === \"error\") {\n throw new ParseError(\"LaTeX-incompatible input and strict mode is set to 'error': \" + (errorMsg + \" [\" + errorCode + \"]\"), token);\n } else if (strict === \"warn\") {\n typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to 'warn': \" + (errorMsg + \" [\" + errorCode + \"]\"));\n } else {\n // won't happen in type-safe code\n typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to \" + (\"unrecognized '\" + strict + \"': \" + errorMsg + \" [\" + errorCode + \"]\"));\n }\n }\n /**\n * Check whether to apply strict (LaTeX-adhering) behavior for unusual\n * input (like `\\\\`). Unlike `nonstrict`, will not throw an error;\n * instead, \"error\" translates to a return value of `true`, while \"ignore\"\n * translates to a return value of `false`. May still print a warning:\n * \"warn\" prints a warning and returns `false`.\n * This is for the second category of `errorCode`s listed in the README.\n */\n\n\n useStrictBehavior(errorCode, errorMsg, token) {\n var strict = this.strict;\n\n if (typeof strict === \"function\") {\n // Allow return value of strict function to be boolean or string\n // (or null/undefined, meaning no further processing).\n // But catch any exceptions thrown by function, treating them\n // like \"error\".\n try {\n strict = strict(errorCode, errorMsg, token);\n } catch (error) {\n strict = \"error\";\n }\n }\n\n if (!strict || strict === \"ignore\") {\n return false;\n } else if (strict === true || strict === \"error\") {\n return true;\n } else if (strict === \"warn\") {\n typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to 'warn': \" + (errorMsg + \" [\" + errorCode + \"]\"));\n return false;\n } else {\n // won't happen in type-safe code\n typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to \" + (\"unrecognized '\" + strict + \"': \" + errorMsg + \" [\" + errorCode + \"]\"));\n return false;\n }\n }\n /**\n * Check whether to test potentially dangerous input, and return\n * `true` (trusted) or `false` (untrusted). The sole argument `context`\n * should be an object with `command` field specifying the relevant LaTeX\n * command (as a string starting with `\\`), and any other arguments, etc.\n * If `context` has a `url` field, a `protocol` field will automatically\n * get added by this function (changing the specified object).\n */\n\n\n isTrusted(context) {\n if (context.url && !context.protocol) {\n var protocol = utils.protocolFromUrl(context.url);\n\n if (protocol == null) {\n return false;\n }\n\n context.protocol = protocol;\n }\n\n var trust = typeof this.trust === \"function\" ? this.trust(context) : this.trust;\n return Boolean(trust);\n }\n\n}\n\n/**\n * This file contains information and classes for the various kinds of styles\n * used in TeX. It provides a generic `Style` class, which holds information\n * about a specific style. It then provides instances of all the different kinds\n * of styles possible, and provides functions to move between them and get\n * information about them.\n */\n\n/**\n * The main style class. Contains a unique id for the style, a size (which is\n * the same for cramped and uncramped version of a style), and a cramped flag.\n */\nclass Style {\n constructor(id, size, cramped) {\n this.id = void 0;\n this.size = void 0;\n this.cramped = void 0;\n this.id = id;\n this.size = size;\n this.cramped = cramped;\n }\n /**\n * Get the style of a superscript given a base in the current style.\n */\n\n\n sup() {\n return styles[sup[this.id]];\n }\n /**\n * Get the style of a subscript given a base in the current style.\n */\n\n\n sub() {\n return styles[sub[this.id]];\n }\n /**\n * Get the style of a fraction numerator given the fraction in the current\n * style.\n */\n\n\n fracNum() {\n return styles[fracNum[this.id]];\n }\n /**\n * Get the style of a fraction denominator given the fraction in the current\n * style.\n */\n\n\n fracDen() {\n return styles[fracDen[this.id]];\n }\n /**\n * Get the cramped version of a style (in particular, cramping a cramped style\n * doesn't change the style).\n */\n\n\n cramp() {\n return styles[cramp[this.id]];\n }\n /**\n * Get a text or display version of this style.\n */\n\n\n text() {\n return styles[text$1[this.id]];\n }\n /**\n * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)\n */\n\n\n isTight() {\n return this.size >= 2;\n }\n\n} // Export an interface for type checking, but don't expose the implementation.\n// This way, no more styles can be generated.\n\n\n// IDs of the different styles\nvar D = 0;\nvar Dc = 1;\nvar T = 2;\nvar Tc = 3;\nvar S = 4;\nvar Sc = 5;\nvar SS = 6;\nvar SSc = 7; // Instances of the different styles\n\nvar styles = [new Style(D, 0, false), new Style(Dc, 0, true), new Style(T, 1, false), new Style(Tc, 1, true), new Style(S, 2, false), new Style(Sc, 2, true), new Style(SS, 3, false), new Style(SSc, 3, true)]; // Lookup tables for switching from one style to another\n\nvar sup = [S, Sc, S, Sc, SS, SSc, SS, SSc];\nvar sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc];\nvar fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc];\nvar fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];\nvar cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc];\nvar text$1 = [D, Dc, T, Tc, T, Tc, T, Tc]; // We only export some of the styles.\n\nvar Style$1 = {\n DISPLAY: styles[D],\n TEXT: styles[T],\n SCRIPT: styles[S],\n SCRIPTSCRIPT: styles[SS]\n};\n\n/*\n * This file defines the Unicode scripts and script families that we\n * support. To add new scripts or families, just add a new entry to the\n * scriptData array below. Adding scripts to the scriptData array allows\n * characters from that script to appear in \\text{} environments.\n */\n\n/**\n * Each script or script family has a name and an array of blocks.\n * Each block is an array of two numbers which specify the start and\n * end points (inclusive) of a block of Unicode codepoints.\n */\n\n/**\n * Unicode block data for the families of scripts we support in \\text{}.\n * Scripts only need to appear here if they do not have font metrics.\n */\nvar scriptData = [{\n // Latin characters beyond the Latin-1 characters we have metrics for.\n // Needed for Czech, Hungarian and Turkish text, for example.\n name: 'latin',\n blocks: [[0x0100, 0x024f], // Latin Extended-A and Latin Extended-B\n [0x0300, 0x036f] // Combining Diacritical marks\n ]\n}, {\n // The Cyrillic script used by Russian and related languages.\n // A Cyrillic subset used to be supported as explicitly defined\n // symbols in symbols.js\n name: 'cyrillic',\n blocks: [[0x0400, 0x04ff]]\n}, {\n // Armenian\n name: 'armenian',\n blocks: [[0x0530, 0x058F]]\n}, {\n // The Brahmic scripts of South and Southeast Asia\n // Devanagari (0900\u2013097F)\n // Bengali (0980\u201309FF)\n // Gurmukhi (0A00\u20130A7F)\n // Gujarati (0A80\u20130AFF)\n // Oriya (0B00\u20130B7F)\n // Tamil (0B80\u20130BFF)\n // Telugu (0C00\u20130C7F)\n // Kannada (0C80\u20130CFF)\n // Malayalam (0D00\u20130D7F)\n // Sinhala (0D80\u20130DFF)\n // Thai (0E00\u20130E7F)\n // Lao (0E80\u20130EFF)\n // Tibetan (0F00\u20130FFF)\n // Myanmar (1000\u2013109F)\n name: 'brahmic',\n blocks: [[0x0900, 0x109F]]\n}, {\n name: 'georgian',\n blocks: [[0x10A0, 0x10ff]]\n}, {\n // Chinese and Japanese.\n // The \"k\" in cjk is for Korean, but we've separated Korean out\n name: \"cjk\",\n blocks: [[0x3000, 0x30FF], // CJK symbols and punctuation, Hiragana, Katakana\n [0x4E00, 0x9FAF], // CJK ideograms\n [0xFF00, 0xFF60] // Fullwidth punctuation\n // TODO: add halfwidth Katakana and Romanji glyphs\n ]\n}, {\n // Korean\n name: 'hangul',\n blocks: [[0xAC00, 0xD7AF]]\n}];\n/**\n * Given a codepoint, return the name of the script or script family\n * it is from, or null if it is not part of a known block\n */\n\nfunction scriptFromCodepoint(codepoint) {\n for (var i = 0; i < scriptData.length; i++) {\n var script = scriptData[i];\n\n for (var _i = 0; _i < script.blocks.length; _i++) {\n var block = script.blocks[_i];\n\n if (codepoint >= block[0] && codepoint <= block[1]) {\n return script.name;\n }\n }\n }\n\n return null;\n}\n/**\n * A flattened version of all the supported blocks in a single array.\n * This is an optimization to make supportedCodepoint() fast.\n */\n\nvar allBlocks = [];\nscriptData.forEach(s => s.blocks.forEach(b => allBlocks.push(...b)));\n/**\n * Given a codepoint, return true if it falls within one of the\n * scripts or script families defined above and false otherwise.\n *\n * Micro benchmarks shows that this is faster than\n * /[\\u3000-\\u30FF\\u4E00-\\u9FAF\\uFF00-\\uFF60\\uAC00-\\uD7AF\\u0900-\\u109F]/.test()\n * in Firefox, Chrome and Node.\n */\n\nfunction supportedCodepoint(codepoint) {\n for (var i = 0; i < allBlocks.length; i += 2) {\n if (codepoint >= allBlocks[i] && codepoint <= allBlocks[i + 1]) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * This file provides support to domTree.js and delimiter.js.\n * It's a storehouse of path geometry for SVG images.\n */\n// In all paths below, the viewBox-to-em scale is 1000:1.\nvar hLinePad = 80; // padding above a sqrt vinculum. Prevents image cropping.\n// The vinculum of a \\sqrt can be made thicker by a KaTeX rendering option.\n// Think of variable extraVinculum as two detours in the SVG path.\n// The detour begins at the lower left of the area labeled extraVinculum below.\n// The detour proceeds one extraVinculum distance up and slightly to the right,\n// displacing the radiused corner between surd and vinculum. The radius is\n// traversed as usual, then the detour resumes. It goes right, to the end of\n// the very long vinculum, then down one extraVinculum distance,\n// after which it resumes regular path geometry for the radical.\n\n/* vinculum\n /\n /\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2190extraVinculum\n / \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u21900.04em (40 unit) std vinculum thickness\n / /\n / /\n / /\\\n / / surd\n*/\n\nvar sqrtMain = function sqrtMain(extraVinculum, hLinePad) {\n // sqrtMain path geometry is from glyph U221A in the font KaTeX Main\n return \"M95,\" + (622 + extraVinculum + hLinePad) + \"\\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\\nc69,-144,104.5,-217.7,106.5,-221\\nl\" + extraVinculum / 2.075 + \" -\" + extraVinculum + \"\\nc5.3,-9.3,12,-14,20,-14\\nH400000v\" + (40 + extraVinculum) + \"H845.2724\\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\\nM\" + (834 + extraVinculum) + \" \" + hLinePad + \"h400000v\" + (40 + extraVinculum) + \"h-400000z\";\n};\n\nvar sqrtSize1 = function sqrtSize1(extraVinculum, hLinePad) {\n // size1 is from glyph U221A in the font KaTeX_Size1-Regular\n return \"M263,\" + (601 + extraVinculum + hLinePad) + \"c0.7,0,18,39.7,52,119\\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\\nc340,-704.7,510.7,-1060.3,512,-1067\\nl\" + extraVinculum / 2.084 + \" -\" + extraVinculum + \"\\nc4.7,-7.3,11,-11,19,-11\\nH40000v\" + (40 + extraVinculum) + \"H1012.3\\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\\nM\" + (1001 + extraVinculum) + \" \" + hLinePad + \"h400000v\" + (40 + extraVinculum) + \"h-400000z\";\n};\n\nvar sqrtSize2 = function sqrtSize2(extraVinculum, hLinePad) {\n // size2 is from glyph U221A in the font KaTeX_Size2-Regular\n return \"M983 \" + (10 + extraVinculum + hLinePad) + \"\\nl\" + extraVinculum / 3.13 + \" -\" + extraVinculum + \"\\nc4,-6.7,10,-10,18,-10 H400000v\" + (40 + extraVinculum) + \"\\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\\nM\" + (1001 + extraVinculum) + \" \" + hLinePad + \"h400000v\" + (40 + extraVinculum) + \"h-400000z\";\n};\n\nvar sqrtSize3 = function sqrtSize3(extraVinculum, hLinePad) {\n // size3 is from glyph U221A in the font KaTeX_Size3-Regular\n return \"M424,\" + (2398 + extraVinculum + hLinePad) + \"\\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\\nl\" + extraVinculum / 4.223 + \" -\" + extraVinculum + \"c4,-6.7,10,-10,18,-10 H400000\\nv\" + (40 + extraVinculum) + \"H1014.6\\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\\nc-2,6,-10,9,-24,9\\nc-8,0,-12,-0.7,-12,-2z M\" + (1001 + extraVinculum) + \" \" + hLinePad + \"\\nh400000v\" + (40 + extraVinculum) + \"h-400000z\";\n};\n\nvar sqrtSize4 = function sqrtSize4(extraVinculum, hLinePad) {\n // size4 is from glyph U221A in the font KaTeX_Size4-Regular\n return \"M473,\" + (2713 + extraVinculum + hLinePad) + \"\\nc339.3,-1799.3,509.3,-2700,510,-2702 l\" + extraVinculum / 5.298 + \" -\" + extraVinculum + \"\\nc3.3,-7.3,9.3,-11,18,-11 H400000v\" + (40 + extraVinculum) + \"H1017.7\\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\\n606zM\" + (1001 + extraVinculum) + \" \" + hLinePad + \"h400000v\" + (40 + extraVinculum) + \"H1017.7z\";\n};\n\nvar phasePath = function phasePath(y) {\n var x = y / 2; // x coordinate at top of angle\n\n return \"M400000 \" + y + \" H0 L\" + x + \" 0 l65 45 L145 \" + (y - 80) + \" H400000z\";\n};\n\nvar sqrtTall = function sqrtTall(extraVinculum, hLinePad, viewBoxHeight) {\n // sqrtTall is from glyph U23B7 in the font KaTeX_Size4-Regular\n // One path edge has a variable length. It runs vertically from the vinculum\n // to a point near (14 units) the bottom of the surd. The vinculum\n // is normally 40 units thick. So the length of the line in question is:\n var vertSegment = viewBoxHeight - 54 - hLinePad - extraVinculum;\n return \"M702 \" + (extraVinculum + hLinePad) + \"H400000\" + (40 + extraVinculum) + \"\\nH742v\" + vertSegment + \"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\\n219 661 l218 661zM702 \" + hLinePad + \"H400000v\" + (40 + extraVinculum) + \"H742z\";\n};\n\nvar sqrtPath = function sqrtPath(size, extraVinculum, viewBoxHeight) {\n extraVinculum = 1000 * extraVinculum; // Convert from document ems to viewBox.\n\n var path = \"\";\n\n switch (size) {\n case \"sqrtMain\":\n path = sqrtMain(extraVinculum, hLinePad);\n break;\n\n case \"sqrtSize1\":\n path = sqrtSize1(extraVinculum, hLinePad);\n break;\n\n case \"sqrtSize2\":\n path = sqrtSize2(extraVinculum, hLinePad);\n break;\n\n case \"sqrtSize3\":\n path = sqrtSize3(extraVinculum, hLinePad);\n break;\n\n case \"sqrtSize4\":\n path = sqrtSize4(extraVinculum, hLinePad);\n break;\n\n case \"sqrtTall\":\n path = sqrtTall(extraVinculum, hLinePad, viewBoxHeight);\n }\n\n return path;\n};\nvar innerPath = function innerPath(name, height) {\n // The inner part of stretchy tall delimiters\n switch (name) {\n case \"\\u239c\":\n return \"M291 0 H417 V\" + height + \" H291z M291 0 H417 V\" + height + \" H291z\";\n\n case \"\\u2223\":\n return \"M145 0 H188 V\" + height + \" H145z M145 0 H188 V\" + height + \" H145z\";\n\n case \"\\u2225\":\n return \"M145 0 H188 V\" + height + \" H145z M145 0 H188 V\" + height + \" H145z\" + (\"M367 0 H410 V\" + height + \" H367z M367 0 H410 V\" + height + \" H367z\");\n\n case \"\\u239f\":\n return \"M457 0 H583 V\" + height + \" H457z M457 0 H583 V\" + height + \" H457z\";\n\n case \"\\u23a2\":\n return \"M319 0 H403 V\" + height + \" H319z M319 0 H403 V\" + height + \" H319z\";\n\n case \"\\u23a5\":\n return \"M263 0 H347 V\" + height + \" H263z M263 0 H347 V\" + height + \" H263z\";\n\n case \"\\u23aa\":\n return \"M384 0 H504 V\" + height + \" H384z M384 0 H504 V\" + height + \" H384z\";\n\n case \"\\u23d0\":\n return \"M312 0 H355 V\" + height + \" H312z M312 0 H355 V\" + height + \" H312z\";\n\n case \"\\u2016\":\n return \"M257 0 H300 V\" + height + \" H257z M257 0 H300 V\" + height + \" H257z\" + (\"M478 0 H521 V\" + height + \" H478z M478 0 H521 V\" + height + \" H478z\");\n\n default:\n return \"\";\n }\n};\nvar path = {\n // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main\n doubleleftarrow: \"M262 157\\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\\nm8 0v40h399730v-40zm0 194v40h399730v-40z\",\n // doublerightarrow is from glyph U+21D2 in font KaTeX Main\n doublerightarrow: \"M399738 392l\\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z\",\n // leftarrow is from glyph U+2190 in font KaTeX Main\n leftarrow: \"M400000 241H110l3-3c68.7-52.7 113.7-120\\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\\n l-3-3h399890zM100 241v40h399900v-40z\",\n // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular\n leftbrace: \"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z\",\n leftbraceunder: \"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z\",\n // overgroup is from the MnSymbol package (public domain)\n leftgroup: \"M400000 80\\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\\n 435 0h399565z\",\n leftgroupunder: \"M400000 262\\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\\n 435 219h399565z\",\n // Harpoons are from glyph U+21BD in font KaTeX Main\n leftharpoon: \"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z\",\n leftharpoonplus: \"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\\nm0 0v40h400000v-40z\",\n leftharpoondown: \"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z\",\n leftharpoondownplus: \"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z\",\n // hook is from glyph U+21A9 in font KaTeX Main\n lefthook: \"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\\n 71.5 23h399859zM103 281v-40h399897v40z\",\n leftlinesegment: \"M40 281 V428 H0 V94 H40 V241 H400000 v40z\\nM40 281 V428 H0 V94 H40 V241 H400000 v40z\",\n leftmapsto: \"M40 281 V448H0V74H40V241H400000v40z\\nM40 281 V448H0V74H40V241H400000v40z\",\n // tofrom is from glyph U+21C4 in font KaTeX AMS Regular\n leftToFrom: \"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z\",\n longequal: \"M0 50 h400000 v40H0z m0 194h40000v40H0z\\nM0 50 h400000 v40H0z m0 194h40000v40H0z\",\n midbrace: \"M200428 334\\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z\",\n midbraceunder: \"M199572 214\\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z\",\n oiintSize1: \"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z\",\n oiintSize2: \"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\\nc0 110 84 276 504 276s502.4-166 502.4-276z\",\n oiiintSize1: \"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z\",\n oiiintSize2: \"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z\",\n rightarrow: \"M0 241v40h399891c-47.3 35.3-84 78-110 128\\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\\n 151.7 139 205zm0 0v40h399900v-40z\",\n rightbrace: \"M400000 542l\\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z\",\n rightbraceunder: \"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z\",\n rightgroup: \"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\\n 3-1 3-3v-38c-76-158-257-219-435-219H0z\",\n rightgroupunder: \"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z\",\n rightharpoon: \"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\\n 69.2 92 94.5zm0 0v40h399900v-40z\",\n rightharpoonplus: \"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z\",\n rightharpoondown: \"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z\",\n rightharpoondownplus: \"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\\nm0-194v40h400000v-40zm0 0v40h400000v-40z\",\n righthook: \"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z\",\n rightlinesegment: \"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z\",\n rightToFrom: \"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z\",\n // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular\n twoheadleftarrow: \"M0 167c68 40\\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z\",\n twoheadrightarrow: \"M400000 167\\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z\",\n // tilde1 is a modified version of a glyph from the MnSymbol package\n tilde1: \"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\\n-68.267.847-113-73.952-191-73.952z\",\n // ditto tilde2, tilde3, & tilde4\n tilde2: \"M344 55.266c-142 0-300.638 81.316-311.5 86.418\\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z\",\n tilde3: \"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\\n -338 0-409-156.573-744-156.573z\",\n tilde4: \"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\\n -175.236-744-175.236z\",\n // vec is from glyph U+20D7 in font KaTeX Main\n vec: \"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\\nc-16-25.333-24-45-24-59z\",\n // widehat1 is a modified version of a glyph from the MnSymbol package\n widehat1: \"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z\",\n // ditto widehat2, widehat3, & widehat4\n widehat2: \"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z\",\n widehat3: \"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z\",\n widehat4: \"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z\",\n // widecheck paths are all inverted versions of widehat\n widecheck1: \"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z\",\n widecheck2: \"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z\",\n widecheck3: \"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z\",\n widecheck4: \"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z\",\n // The next ten paths support reaction arrows from the mhchem package.\n // Arrows for \\ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX\n // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main\n baraboveleftarrow: \"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z\",\n // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main\n rightarrowabovebar: \"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z\",\n // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.\n // Ref from mhchem.sty: \\rlap{\\raisebox{-.22ex}{$\\kern0.5em\n baraboveshortleftharpoon: \"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z\",\n rightharpoonaboveshortbar: \"M0,241 l0,40c399126,0,399993,0,399993,0\\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z\",\n shortbaraboveleftharpoon: \"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z\",\n shortrightharpoonabovebar: \"M53,241l0,40c398570,0,399437,0,399437,0\\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z\"\n};\nvar tallDelim = function tallDelim(label, midHeight) {\n switch (label) {\n case \"lbrack\":\n return \"M403 1759 V84 H666 V0 H319 V1759 v\" + midHeight + \" v1759 h347 v-84\\nH403z M403 1759 V0 H319 V1759 v\" + midHeight + \" v1759 h84z\";\n\n case \"rbrack\":\n return \"M347 1759 V0 H0 V84 H263 V1759 v\" + midHeight + \" v1759 H0 v84 H347z\\nM347 1759 V0 H263 V1759 v\" + midHeight + \" v1759 h84z\";\n\n case \"vert\":\n return \"M145 15 v585 v\" + midHeight + \" v585 c2.667,10,9.667,15,21,15\\nc10,0,16.667,-5,20,-15 v-585 v\" + -midHeight + \" v-585 c-2.667,-10,-9.667,-15,-21,-15\\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v\" + midHeight + \" v585 h43z\";\n\n case \"doublevert\":\n return \"M145 15 v585 v\" + midHeight + \" v585 c2.667,10,9.667,15,21,15\\nc10,0,16.667,-5,20,-15 v-585 v\" + -midHeight + \" v-585 c-2.667,-10,-9.667,-15,-21,-15\\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v\" + midHeight + \" v585 h43z\\nM367 15 v585 v\" + midHeight + \" v585 c2.667,10,9.667,15,21,15\\nc10,0,16.667,-5,20,-15 v-585 v\" + -midHeight + \" v-585 c-2.667,-10,-9.667,-15,-21,-15\\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v\" + midHeight + \" v585 h43z\";\n\n case \"lfloor\":\n return \"M319 602 V0 H403 V602 v\" + midHeight + \" v1715 h263 v84 H319z\\nMM319 602 V0 H403 V602 v\" + midHeight + \" v1715 H319z\";\n\n case \"rfloor\":\n return \"M319 602 V0 H403 V602 v\" + midHeight + \" v1799 H0 v-84 H319z\\nMM319 602 V0 H403 V602 v\" + midHeight + \" v1715 H319z\";\n\n case \"lceil\":\n return \"M403 1759 V84 H666 V0 H319 V1759 v\" + midHeight + \" v602 h84z\\nM403 1759 V0 H319 V1759 v\" + midHeight + \" v602 h84z\";\n\n case \"rceil\":\n return \"M347 1759 V0 H0 V84 H263 V1759 v\" + midHeight + \" v602 h84z\\nM347 1759 V0 h-84 V1759 v\" + midHeight + \" v602 h84z\";\n\n case \"lparen\":\n return \"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\\n-36,557 l0,\" + (midHeight + 84) + \"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\\nl0,-\" + (midHeight + 92) + \"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z\";\n\n case \"rparen\":\n return \"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,\" + (midHeight + 9) + \"\\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\\nl0,-\" + (midHeight + 144) + \"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z\";\n\n default:\n // We should not ever get here.\n throw new Error(\"Unknown stretchy delimiter.\");\n }\n};\n\n/**\n * This node represents a document fragment, which contains elements, but when\n * placed into the DOM doesn't have any representation itself. It only contains\n * children and doesn't have any DOM node properties.\n */\nclass DocumentFragment {\n // HtmlDomNode\n // Never used; needed for satisfying interface.\n constructor(children) {\n this.children = void 0;\n this.classes = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.maxFontSize = void 0;\n this.style = void 0;\n this.children = children;\n this.classes = [];\n this.height = 0;\n this.depth = 0;\n this.maxFontSize = 0;\n this.style = {};\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n /** Convert the fragment into a node. */\n\n\n toNode() {\n var frag = document.createDocumentFragment();\n\n for (var i = 0; i < this.children.length; i++) {\n frag.appendChild(this.children[i].toNode());\n }\n\n return frag;\n }\n /** Convert the fragment into HTML markup. */\n\n\n toMarkup() {\n var markup = \"\"; // Simply concatenate the markup for the children together.\n\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n return markup;\n }\n /**\n * Converts the math node into a string, similar to innerText. Applies to\n * MathDomNode's only.\n */\n\n\n toText() {\n // To avoid this, we would subclass documentFragment separately for\n // MathML, but polyfills for subclassing is expensive per PR 1469.\n // $FlowFixMe: Only works for ChildType = MathDomNode.\n var toText = child => child.toText();\n\n return this.children.map(toText).join(\"\");\n }\n\n}\n\n// This file is GENERATED by buildMetrics.sh. DO NOT MODIFY.\nvar fontMetricsData = {\n \"AMS-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"65\": [0, 0.68889, 0, 0, 0.72222],\n \"66\": [0, 0.68889, 0, 0, 0.66667],\n \"67\": [0, 0.68889, 0, 0, 0.72222],\n \"68\": [0, 0.68889, 0, 0, 0.72222],\n \"69\": [0, 0.68889, 0, 0, 0.66667],\n \"70\": [0, 0.68889, 0, 0, 0.61111],\n \"71\": [0, 0.68889, 0, 0, 0.77778],\n \"72\": [0, 0.68889, 0, 0, 0.77778],\n \"73\": [0, 0.68889, 0, 0, 0.38889],\n \"74\": [0.16667, 0.68889, 0, 0, 0.5],\n \"75\": [0, 0.68889, 0, 0, 0.77778],\n \"76\": [0, 0.68889, 0, 0, 0.66667],\n \"77\": [0, 0.68889, 0, 0, 0.94445],\n \"78\": [0, 0.68889, 0, 0, 0.72222],\n \"79\": [0.16667, 0.68889, 0, 0, 0.77778],\n \"80\": [0, 0.68889, 0, 0, 0.61111],\n \"81\": [0.16667, 0.68889, 0, 0, 0.77778],\n \"82\": [0, 0.68889, 0, 0, 0.72222],\n \"83\": [0, 0.68889, 0, 0, 0.55556],\n \"84\": [0, 0.68889, 0, 0, 0.66667],\n \"85\": [0, 0.68889, 0, 0, 0.72222],\n \"86\": [0, 0.68889, 0, 0, 0.72222],\n \"87\": [0, 0.68889, 0, 0, 1.0],\n \"88\": [0, 0.68889, 0, 0, 0.72222],\n \"89\": [0, 0.68889, 0, 0, 0.72222],\n \"90\": [0, 0.68889, 0, 0, 0.66667],\n \"107\": [0, 0.68889, 0, 0, 0.55556],\n \"160\": [0, 0, 0, 0, 0.25],\n \"165\": [0, 0.675, 0.025, 0, 0.75],\n \"174\": [0.15559, 0.69224, 0, 0, 0.94666],\n \"240\": [0, 0.68889, 0, 0, 0.55556],\n \"295\": [0, 0.68889, 0, 0, 0.54028],\n \"710\": [0, 0.825, 0, 0, 2.33334],\n \"732\": [0, 0.9, 0, 0, 2.33334],\n \"770\": [0, 0.825, 0, 0, 2.33334],\n \"771\": [0, 0.9, 0, 0, 2.33334],\n \"989\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"1008\": [0, 0.43056, 0.04028, 0, 0.66667],\n \"8245\": [0, 0.54986, 0, 0, 0.275],\n \"8463\": [0, 0.68889, 0, 0, 0.54028],\n \"8487\": [0, 0.68889, 0, 0, 0.72222],\n \"8498\": [0, 0.68889, 0, 0, 0.55556],\n \"8502\": [0, 0.68889, 0, 0, 0.66667],\n \"8503\": [0, 0.68889, 0, 0, 0.44445],\n \"8504\": [0, 0.68889, 0, 0, 0.66667],\n \"8513\": [0, 0.68889, 0, 0, 0.63889],\n \"8592\": [-0.03598, 0.46402, 0, 0, 0.5],\n \"8594\": [-0.03598, 0.46402, 0, 0, 0.5],\n \"8602\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8603\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8606\": [0.01354, 0.52239, 0, 0, 1.0],\n \"8608\": [0.01354, 0.52239, 0, 0, 1.0],\n \"8610\": [0.01354, 0.52239, 0, 0, 1.11111],\n \"8611\": [0.01354, 0.52239, 0, 0, 1.11111],\n \"8619\": [0, 0.54986, 0, 0, 1.0],\n \"8620\": [0, 0.54986, 0, 0, 1.0],\n \"8621\": [-0.13313, 0.37788, 0, 0, 1.38889],\n \"8622\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8624\": [0, 0.69224, 0, 0, 0.5],\n \"8625\": [0, 0.69224, 0, 0, 0.5],\n \"8630\": [0, 0.43056, 0, 0, 1.0],\n \"8631\": [0, 0.43056, 0, 0, 1.0],\n \"8634\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8635\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8638\": [0.19444, 0.69224, 0, 0, 0.41667],\n \"8639\": [0.19444, 0.69224, 0, 0, 0.41667],\n \"8642\": [0.19444, 0.69224, 0, 0, 0.41667],\n \"8643\": [0.19444, 0.69224, 0, 0, 0.41667],\n \"8644\": [0.1808, 0.675, 0, 0, 1.0],\n \"8646\": [0.1808, 0.675, 0, 0, 1.0],\n \"8647\": [0.1808, 0.675, 0, 0, 1.0],\n \"8648\": [0.19444, 0.69224, 0, 0, 0.83334],\n \"8649\": [0.1808, 0.675, 0, 0, 1.0],\n \"8650\": [0.19444, 0.69224, 0, 0, 0.83334],\n \"8651\": [0.01354, 0.52239, 0, 0, 1.0],\n \"8652\": [0.01354, 0.52239, 0, 0, 1.0],\n \"8653\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8654\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8655\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8666\": [0.13667, 0.63667, 0, 0, 1.0],\n \"8667\": [0.13667, 0.63667, 0, 0, 1.0],\n \"8669\": [-0.13313, 0.37788, 0, 0, 1.0],\n \"8672\": [-0.064, 0.437, 0, 0, 1.334],\n \"8674\": [-0.064, 0.437, 0, 0, 1.334],\n \"8705\": [0, 0.825, 0, 0, 0.5],\n \"8708\": [0, 0.68889, 0, 0, 0.55556],\n \"8709\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8717\": [0, 0.43056, 0, 0, 0.42917],\n \"8722\": [-0.03598, 0.46402, 0, 0, 0.5],\n \"8724\": [0.08198, 0.69224, 0, 0, 0.77778],\n \"8726\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8733\": [0, 0.69224, 0, 0, 0.77778],\n \"8736\": [0, 0.69224, 0, 0, 0.72222],\n \"8737\": [0, 0.69224, 0, 0, 0.72222],\n \"8738\": [0.03517, 0.52239, 0, 0, 0.72222],\n \"8739\": [0.08167, 0.58167, 0, 0, 0.22222],\n \"8740\": [0.25142, 0.74111, 0, 0, 0.27778],\n \"8741\": [0.08167, 0.58167, 0, 0, 0.38889],\n \"8742\": [0.25142, 0.74111, 0, 0, 0.5],\n \"8756\": [0, 0.69224, 0, 0, 0.66667],\n \"8757\": [0, 0.69224, 0, 0, 0.66667],\n \"8764\": [-0.13313, 0.36687, 0, 0, 0.77778],\n \"8765\": [-0.13313, 0.37788, 0, 0, 0.77778],\n \"8769\": [-0.13313, 0.36687, 0, 0, 0.77778],\n \"8770\": [-0.03625, 0.46375, 0, 0, 0.77778],\n \"8774\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8776\": [-0.01688, 0.48312, 0, 0, 0.77778],\n \"8778\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8782\": [0.06062, 0.54986, 0, 0, 0.77778],\n \"8783\": [0.06062, 0.54986, 0, 0, 0.77778],\n \"8785\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8786\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8787\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8790\": [0, 0.69224, 0, 0, 0.77778],\n \"8791\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8796\": [0.08198, 0.91667, 0, 0, 0.77778],\n \"8806\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"8807\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"8808\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"8809\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"8812\": [0.25583, 0.75583, 0, 0, 0.5],\n \"8814\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8815\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8816\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8817\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8818\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8819\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8822\": [0.1808, 0.675, 0, 0, 0.77778],\n \"8823\": [0.1808, 0.675, 0, 0, 0.77778],\n \"8828\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8829\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8830\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8831\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8832\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8833\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8840\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8841\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8842\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8843\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8847\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8848\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8858\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8859\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8861\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8862\": [0, 0.675, 0, 0, 0.77778],\n \"8863\": [0, 0.675, 0, 0, 0.77778],\n \"8864\": [0, 0.675, 0, 0, 0.77778],\n \"8865\": [0, 0.675, 0, 0, 0.77778],\n \"8872\": [0, 0.69224, 0, 0, 0.61111],\n \"8873\": [0, 0.69224, 0, 0, 0.72222],\n \"8874\": [0, 0.69224, 0, 0, 0.88889],\n \"8876\": [0, 0.68889, 0, 0, 0.61111],\n \"8877\": [0, 0.68889, 0, 0, 0.61111],\n \"8878\": [0, 0.68889, 0, 0, 0.72222],\n \"8879\": [0, 0.68889, 0, 0, 0.72222],\n \"8882\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8883\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8884\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8885\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8888\": [0, 0.54986, 0, 0, 1.11111],\n \"8890\": [0.19444, 0.43056, 0, 0, 0.55556],\n \"8891\": [0.19444, 0.69224, 0, 0, 0.61111],\n \"8892\": [0.19444, 0.69224, 0, 0, 0.61111],\n \"8901\": [0, 0.54986, 0, 0, 0.27778],\n \"8903\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8905\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8906\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8907\": [0, 0.69224, 0, 0, 0.77778],\n \"8908\": [0, 0.69224, 0, 0, 0.77778],\n \"8909\": [-0.03598, 0.46402, 0, 0, 0.77778],\n \"8910\": [0, 0.54986, 0, 0, 0.76042],\n \"8911\": [0, 0.54986, 0, 0, 0.76042],\n \"8912\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8913\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8914\": [0, 0.54986, 0, 0, 0.66667],\n \"8915\": [0, 0.54986, 0, 0, 0.66667],\n \"8916\": [0, 0.69224, 0, 0, 0.66667],\n \"8918\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8919\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8920\": [0.03517, 0.54986, 0, 0, 1.33334],\n \"8921\": [0.03517, 0.54986, 0, 0, 1.33334],\n \"8922\": [0.38569, 0.88569, 0, 0, 0.77778],\n \"8923\": [0.38569, 0.88569, 0, 0, 0.77778],\n \"8926\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8927\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8928\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8929\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8934\": [0.23222, 0.74111, 0, 0, 0.77778],\n \"8935\": [0.23222, 0.74111, 0, 0, 0.77778],\n \"8936\": [0.23222, 0.74111, 0, 0, 0.77778],\n \"8937\": [0.23222, 0.74111, 0, 0, 0.77778],\n \"8938\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8939\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8940\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8941\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8994\": [0.19444, 0.69224, 0, 0, 0.77778],\n \"8995\": [0.19444, 0.69224, 0, 0, 0.77778],\n \"9416\": [0.15559, 0.69224, 0, 0, 0.90222],\n \"9484\": [0, 0.69224, 0, 0, 0.5],\n \"9488\": [0, 0.69224, 0, 0, 0.5],\n \"9492\": [0, 0.37788, 0, 0, 0.5],\n \"9496\": [0, 0.37788, 0, 0, 0.5],\n \"9585\": [0.19444, 0.68889, 0, 0, 0.88889],\n \"9586\": [0.19444, 0.74111, 0, 0, 0.88889],\n \"9632\": [0, 0.675, 0, 0, 0.77778],\n \"9633\": [0, 0.675, 0, 0, 0.77778],\n \"9650\": [0, 0.54986, 0, 0, 0.72222],\n \"9651\": [0, 0.54986, 0, 0, 0.72222],\n \"9654\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"9660\": [0, 0.54986, 0, 0, 0.72222],\n \"9661\": [0, 0.54986, 0, 0, 0.72222],\n \"9664\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"9674\": [0.11111, 0.69224, 0, 0, 0.66667],\n \"9733\": [0.19444, 0.69224, 0, 0, 0.94445],\n \"10003\": [0, 0.69224, 0, 0, 0.83334],\n \"10016\": [0, 0.69224, 0, 0, 0.83334],\n \"10731\": [0.11111, 0.69224, 0, 0, 0.66667],\n \"10846\": [0.19444, 0.75583, 0, 0, 0.61111],\n \"10877\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"10878\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"10885\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"10886\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"10887\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"10888\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"10889\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10890\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10891\": [0.48256, 0.98256, 0, 0, 0.77778],\n \"10892\": [0.48256, 0.98256, 0, 0, 0.77778],\n \"10901\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"10902\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"10933\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"10934\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"10935\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10936\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10937\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10938\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10949\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"10950\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"10955\": [0.28481, 0.79383, 0, 0, 0.77778],\n \"10956\": [0.28481, 0.79383, 0, 0, 0.77778],\n \"57350\": [0.08167, 0.58167, 0, 0, 0.22222],\n \"57351\": [0.08167, 0.58167, 0, 0, 0.38889],\n \"57352\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"57353\": [0, 0.43056, 0.04028, 0, 0.66667],\n \"57356\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57357\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57358\": [0.41951, 0.91951, 0, 0, 0.77778],\n \"57359\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"57360\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"57361\": [0.41951, 0.91951, 0, 0, 0.77778],\n \"57366\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57367\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57368\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57369\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57370\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"57371\": [0.13597, 0.63597, 0, 0, 0.77778]\n },\n \"Caligraphic-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"65\": [0, 0.68333, 0, 0.19445, 0.79847],\n \"66\": [0, 0.68333, 0.03041, 0.13889, 0.65681],\n \"67\": [0, 0.68333, 0.05834, 0.13889, 0.52653],\n \"68\": [0, 0.68333, 0.02778, 0.08334, 0.77139],\n \"69\": [0, 0.68333, 0.08944, 0.11111, 0.52778],\n \"70\": [0, 0.68333, 0.09931, 0.11111, 0.71875],\n \"71\": [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],\n \"72\": [0, 0.68333, 0.00965, 0.11111, 0.84452],\n \"73\": [0, 0.68333, 0.07382, 0, 0.54452],\n \"74\": [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],\n \"75\": [0, 0.68333, 0.01445, 0.05556, 0.76195],\n \"76\": [0, 0.68333, 0, 0.13889, 0.68972],\n \"77\": [0, 0.68333, 0, 0.13889, 1.2009],\n \"78\": [0, 0.68333, 0.14736, 0.08334, 0.82049],\n \"79\": [0, 0.68333, 0.02778, 0.11111, 0.79611],\n \"80\": [0, 0.68333, 0.08222, 0.08334, 0.69556],\n \"81\": [0.09722, 0.68333, 0, 0.11111, 0.81667],\n \"82\": [0, 0.68333, 0, 0.08334, 0.8475],\n \"83\": [0, 0.68333, 0.075, 0.13889, 0.60556],\n \"84\": [0, 0.68333, 0.25417, 0, 0.54464],\n \"85\": [0, 0.68333, 0.09931, 0.08334, 0.62583],\n \"86\": [0, 0.68333, 0.08222, 0, 0.61278],\n \"87\": [0, 0.68333, 0.08222, 0.08334, 0.98778],\n \"88\": [0, 0.68333, 0.14643, 0.13889, 0.7133],\n \"89\": [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],\n \"90\": [0, 0.68333, 0.07944, 0.13889, 0.72473],\n \"160\": [0, 0, 0, 0, 0.25]\n },\n \"Fraktur-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69141, 0, 0, 0.29574],\n \"34\": [0, 0.69141, 0, 0, 0.21471],\n \"38\": [0, 0.69141, 0, 0, 0.73786],\n \"39\": [0, 0.69141, 0, 0, 0.21201],\n \"40\": [0.24982, 0.74947, 0, 0, 0.38865],\n \"41\": [0.24982, 0.74947, 0, 0, 0.38865],\n \"42\": [0, 0.62119, 0, 0, 0.27764],\n \"43\": [0.08319, 0.58283, 0, 0, 0.75623],\n \"44\": [0, 0.10803, 0, 0, 0.27764],\n \"45\": [0.08319, 0.58283, 0, 0, 0.75623],\n \"46\": [0, 0.10803, 0, 0, 0.27764],\n \"47\": [0.24982, 0.74947, 0, 0, 0.50181],\n \"48\": [0, 0.47534, 0, 0, 0.50181],\n \"49\": [0, 0.47534, 0, 0, 0.50181],\n \"50\": [0, 0.47534, 0, 0, 0.50181],\n \"51\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"52\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"53\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"54\": [0, 0.69141, 0, 0, 0.50181],\n \"55\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"56\": [0, 0.69141, 0, 0, 0.50181],\n \"57\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"58\": [0, 0.47534, 0, 0, 0.21606],\n \"59\": [0.12604, 0.47534, 0, 0, 0.21606],\n \"61\": [-0.13099, 0.36866, 0, 0, 0.75623],\n \"63\": [0, 0.69141, 0, 0, 0.36245],\n \"65\": [0, 0.69141, 0, 0, 0.7176],\n \"66\": [0, 0.69141, 0, 0, 0.88397],\n \"67\": [0, 0.69141, 0, 0, 0.61254],\n \"68\": [0, 0.69141, 0, 0, 0.83158],\n \"69\": [0, 0.69141, 0, 0, 0.66278],\n \"70\": [0.12604, 0.69141, 0, 0, 0.61119],\n \"71\": [0, 0.69141, 0, 0, 0.78539],\n \"72\": [0.06302, 0.69141, 0, 0, 0.7203],\n \"73\": [0, 0.69141, 0, 0, 0.55448],\n \"74\": [0.12604, 0.69141, 0, 0, 0.55231],\n \"75\": [0, 0.69141, 0, 0, 0.66845],\n \"76\": [0, 0.69141, 0, 0, 0.66602],\n \"77\": [0, 0.69141, 0, 0, 1.04953],\n \"78\": [0, 0.69141, 0, 0, 0.83212],\n \"79\": [0, 0.69141, 0, 0, 0.82699],\n \"80\": [0.18906, 0.69141, 0, 0, 0.82753],\n \"81\": [0.03781, 0.69141, 0, 0, 0.82699],\n \"82\": [0, 0.69141, 0, 0, 0.82807],\n \"83\": [0, 0.69141, 0, 0, 0.82861],\n \"84\": [0, 0.69141, 0, 0, 0.66899],\n \"85\": [0, 0.69141, 0, 0, 0.64576],\n \"86\": [0, 0.69141, 0, 0, 0.83131],\n \"87\": [0, 0.69141, 0, 0, 1.04602],\n \"88\": [0, 0.69141, 0, 0, 0.71922],\n \"89\": [0.18906, 0.69141, 0, 0, 0.83293],\n \"90\": [0.12604, 0.69141, 0, 0, 0.60201],\n \"91\": [0.24982, 0.74947, 0, 0, 0.27764],\n \"93\": [0.24982, 0.74947, 0, 0, 0.27764],\n \"94\": [0, 0.69141, 0, 0, 0.49965],\n \"97\": [0, 0.47534, 0, 0, 0.50046],\n \"98\": [0, 0.69141, 0, 0, 0.51315],\n \"99\": [0, 0.47534, 0, 0, 0.38946],\n \"100\": [0, 0.62119, 0, 0, 0.49857],\n \"101\": [0, 0.47534, 0, 0, 0.40053],\n \"102\": [0.18906, 0.69141, 0, 0, 0.32626],\n \"103\": [0.18906, 0.47534, 0, 0, 0.5037],\n \"104\": [0.18906, 0.69141, 0, 0, 0.52126],\n \"105\": [0, 0.69141, 0, 0, 0.27899],\n \"106\": [0, 0.69141, 0, 0, 0.28088],\n \"107\": [0, 0.69141, 0, 0, 0.38946],\n \"108\": [0, 0.69141, 0, 0, 0.27953],\n \"109\": [0, 0.47534, 0, 0, 0.76676],\n \"110\": [0, 0.47534, 0, 0, 0.52666],\n \"111\": [0, 0.47534, 0, 0, 0.48885],\n \"112\": [0.18906, 0.52396, 0, 0, 0.50046],\n \"113\": [0.18906, 0.47534, 0, 0, 0.48912],\n \"114\": [0, 0.47534, 0, 0, 0.38919],\n \"115\": [0, 0.47534, 0, 0, 0.44266],\n \"116\": [0, 0.62119, 0, 0, 0.33301],\n \"117\": [0, 0.47534, 0, 0, 0.5172],\n \"118\": [0, 0.52396, 0, 0, 0.5118],\n \"119\": [0, 0.52396, 0, 0, 0.77351],\n \"120\": [0.18906, 0.47534, 0, 0, 0.38865],\n \"121\": [0.18906, 0.47534, 0, 0, 0.49884],\n \"122\": [0.18906, 0.47534, 0, 0, 0.39054],\n \"160\": [0, 0, 0, 0, 0.25],\n \"8216\": [0, 0.69141, 0, 0, 0.21471],\n \"8217\": [0, 0.69141, 0, 0, 0.21471],\n \"58112\": [0, 0.62119, 0, 0, 0.49749],\n \"58113\": [0, 0.62119, 0, 0, 0.4983],\n \"58114\": [0.18906, 0.69141, 0, 0, 0.33328],\n \"58115\": [0.18906, 0.69141, 0, 0, 0.32923],\n \"58116\": [0.18906, 0.47534, 0, 0, 0.50343],\n \"58117\": [0, 0.69141, 0, 0, 0.33301],\n \"58118\": [0, 0.62119, 0, 0, 0.33409],\n \"58119\": [0, 0.47534, 0, 0, 0.50073]\n },\n \"Main-Bold\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0, 0, 0.35],\n \"34\": [0, 0.69444, 0, 0, 0.60278],\n \"35\": [0.19444, 0.69444, 0, 0, 0.95833],\n \"36\": [0.05556, 0.75, 0, 0, 0.575],\n \"37\": [0.05556, 0.75, 0, 0, 0.95833],\n \"38\": [0, 0.69444, 0, 0, 0.89444],\n \"39\": [0, 0.69444, 0, 0, 0.31944],\n \"40\": [0.25, 0.75, 0, 0, 0.44722],\n \"41\": [0.25, 0.75, 0, 0, 0.44722],\n \"42\": [0, 0.75, 0, 0, 0.575],\n \"43\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"44\": [0.19444, 0.15556, 0, 0, 0.31944],\n \"45\": [0, 0.44444, 0, 0, 0.38333],\n \"46\": [0, 0.15556, 0, 0, 0.31944],\n \"47\": [0.25, 0.75, 0, 0, 0.575],\n \"48\": [0, 0.64444, 0, 0, 0.575],\n \"49\": [0, 0.64444, 0, 0, 0.575],\n \"50\": [0, 0.64444, 0, 0, 0.575],\n \"51\": [0, 0.64444, 0, 0, 0.575],\n \"52\": [0, 0.64444, 0, 0, 0.575],\n \"53\": [0, 0.64444, 0, 0, 0.575],\n \"54\": [0, 0.64444, 0, 0, 0.575],\n \"55\": [0, 0.64444, 0, 0, 0.575],\n \"56\": [0, 0.64444, 0, 0, 0.575],\n \"57\": [0, 0.64444, 0, 0, 0.575],\n \"58\": [0, 0.44444, 0, 0, 0.31944],\n \"59\": [0.19444, 0.44444, 0, 0, 0.31944],\n \"60\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"61\": [-0.10889, 0.39111, 0, 0, 0.89444],\n \"62\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"63\": [0, 0.69444, 0, 0, 0.54305],\n \"64\": [0, 0.69444, 0, 0, 0.89444],\n \"65\": [0, 0.68611, 0, 0, 0.86944],\n \"66\": [0, 0.68611, 0, 0, 0.81805],\n \"67\": [0, 0.68611, 0, 0, 0.83055],\n \"68\": [0, 0.68611, 0, 0, 0.88194],\n \"69\": [0, 0.68611, 0, 0, 0.75555],\n \"70\": [0, 0.68611, 0, 0, 0.72361],\n \"71\": [0, 0.68611, 0, 0, 0.90416],\n \"72\": [0, 0.68611, 0, 0, 0.9],\n \"73\": [0, 0.68611, 0, 0, 0.43611],\n \"74\": [0, 0.68611, 0, 0, 0.59444],\n \"75\": [0, 0.68611, 0, 0, 0.90138],\n \"76\": [0, 0.68611, 0, 0, 0.69166],\n \"77\": [0, 0.68611, 0, 0, 1.09166],\n \"78\": [0, 0.68611, 0, 0, 0.9],\n \"79\": [0, 0.68611, 0, 0, 0.86388],\n \"80\": [0, 0.68611, 0, 0, 0.78611],\n \"81\": [0.19444, 0.68611, 0, 0, 0.86388],\n \"82\": [0, 0.68611, 0, 0, 0.8625],\n \"83\": [0, 0.68611, 0, 0, 0.63889],\n \"84\": [0, 0.68611, 0, 0, 0.8],\n \"85\": [0, 0.68611, 0, 0, 0.88472],\n \"86\": [0, 0.68611, 0.01597, 0, 0.86944],\n \"87\": [0, 0.68611, 0.01597, 0, 1.18888],\n \"88\": [0, 0.68611, 0, 0, 0.86944],\n \"89\": [0, 0.68611, 0.02875, 0, 0.86944],\n \"90\": [0, 0.68611, 0, 0, 0.70277],\n \"91\": [0.25, 0.75, 0, 0, 0.31944],\n \"92\": [0.25, 0.75, 0, 0, 0.575],\n \"93\": [0.25, 0.75, 0, 0, 0.31944],\n \"94\": [0, 0.69444, 0, 0, 0.575],\n \"95\": [0.31, 0.13444, 0.03194, 0, 0.575],\n \"97\": [0, 0.44444, 0, 0, 0.55902],\n \"98\": [0, 0.69444, 0, 0, 0.63889],\n \"99\": [0, 0.44444, 0, 0, 0.51111],\n \"100\": [0, 0.69444, 0, 0, 0.63889],\n \"101\": [0, 0.44444, 0, 0, 0.52708],\n \"102\": [0, 0.69444, 0.10903, 0, 0.35139],\n \"103\": [0.19444, 0.44444, 0.01597, 0, 0.575],\n \"104\": [0, 0.69444, 0, 0, 0.63889],\n \"105\": [0, 0.69444, 0, 0, 0.31944],\n \"106\": [0.19444, 0.69444, 0, 0, 0.35139],\n \"107\": [0, 0.69444, 0, 0, 0.60694],\n \"108\": [0, 0.69444, 0, 0, 0.31944],\n \"109\": [0, 0.44444, 0, 0, 0.95833],\n \"110\": [0, 0.44444, 0, 0, 0.63889],\n \"111\": [0, 0.44444, 0, 0, 0.575],\n \"112\": [0.19444, 0.44444, 0, 0, 0.63889],\n \"113\": [0.19444, 0.44444, 0, 0, 0.60694],\n \"114\": [0, 0.44444, 0, 0, 0.47361],\n \"115\": [0, 0.44444, 0, 0, 0.45361],\n \"116\": [0, 0.63492, 0, 0, 0.44722],\n \"117\": [0, 0.44444, 0, 0, 0.63889],\n \"118\": [0, 0.44444, 0.01597, 0, 0.60694],\n \"119\": [0, 0.44444, 0.01597, 0, 0.83055],\n \"120\": [0, 0.44444, 0, 0, 0.60694],\n \"121\": [0.19444, 0.44444, 0.01597, 0, 0.60694],\n \"122\": [0, 0.44444, 0, 0, 0.51111],\n \"123\": [0.25, 0.75, 0, 0, 0.575],\n \"124\": [0.25, 0.75, 0, 0, 0.31944],\n \"125\": [0.25, 0.75, 0, 0, 0.575],\n \"126\": [0.35, 0.34444, 0, 0, 0.575],\n \"160\": [0, 0, 0, 0, 0.25],\n \"163\": [0, 0.69444, 0, 0, 0.86853],\n \"168\": [0, 0.69444, 0, 0, 0.575],\n \"172\": [0, 0.44444, 0, 0, 0.76666],\n \"176\": [0, 0.69444, 0, 0, 0.86944],\n \"177\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"184\": [0.17014, 0, 0, 0, 0.51111],\n \"198\": [0, 0.68611, 0, 0, 1.04166],\n \"215\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"216\": [0.04861, 0.73472, 0, 0, 0.89444],\n \"223\": [0, 0.69444, 0, 0, 0.59722],\n \"230\": [0, 0.44444, 0, 0, 0.83055],\n \"247\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"248\": [0.09722, 0.54167, 0, 0, 0.575],\n \"305\": [0, 0.44444, 0, 0, 0.31944],\n \"338\": [0, 0.68611, 0, 0, 1.16944],\n \"339\": [0, 0.44444, 0, 0, 0.89444],\n \"567\": [0.19444, 0.44444, 0, 0, 0.35139],\n \"710\": [0, 0.69444, 0, 0, 0.575],\n \"711\": [0, 0.63194, 0, 0, 0.575],\n \"713\": [0, 0.59611, 0, 0, 0.575],\n \"714\": [0, 0.69444, 0, 0, 0.575],\n \"715\": [0, 0.69444, 0, 0, 0.575],\n \"728\": [0, 0.69444, 0, 0, 0.575],\n \"729\": [0, 0.69444, 0, 0, 0.31944],\n \"730\": [0, 0.69444, 0, 0, 0.86944],\n \"732\": [0, 0.69444, 0, 0, 0.575],\n \"733\": [0, 0.69444, 0, 0, 0.575],\n \"915\": [0, 0.68611, 0, 0, 0.69166],\n \"916\": [0, 0.68611, 0, 0, 0.95833],\n \"920\": [0, 0.68611, 0, 0, 0.89444],\n \"923\": [0, 0.68611, 0, 0, 0.80555],\n \"926\": [0, 0.68611, 0, 0, 0.76666],\n \"928\": [0, 0.68611, 0, 0, 0.9],\n \"931\": [0, 0.68611, 0, 0, 0.83055],\n \"933\": [0, 0.68611, 0, 0, 0.89444],\n \"934\": [0, 0.68611, 0, 0, 0.83055],\n \"936\": [0, 0.68611, 0, 0, 0.89444],\n \"937\": [0, 0.68611, 0, 0, 0.83055],\n \"8211\": [0, 0.44444, 0.03194, 0, 0.575],\n \"8212\": [0, 0.44444, 0.03194, 0, 1.14999],\n \"8216\": [0, 0.69444, 0, 0, 0.31944],\n \"8217\": [0, 0.69444, 0, 0, 0.31944],\n \"8220\": [0, 0.69444, 0, 0, 0.60278],\n \"8221\": [0, 0.69444, 0, 0, 0.60278],\n \"8224\": [0.19444, 0.69444, 0, 0, 0.51111],\n \"8225\": [0.19444, 0.69444, 0, 0, 0.51111],\n \"8242\": [0, 0.55556, 0, 0, 0.34444],\n \"8407\": [0, 0.72444, 0.15486, 0, 0.575],\n \"8463\": [0, 0.69444, 0, 0, 0.66759],\n \"8465\": [0, 0.69444, 0, 0, 0.83055],\n \"8467\": [0, 0.69444, 0, 0, 0.47361],\n \"8472\": [0.19444, 0.44444, 0, 0, 0.74027],\n \"8476\": [0, 0.69444, 0, 0, 0.83055],\n \"8501\": [0, 0.69444, 0, 0, 0.70277],\n \"8592\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8593\": [0.19444, 0.69444, 0, 0, 0.575],\n \"8594\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8595\": [0.19444, 0.69444, 0, 0, 0.575],\n \"8596\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8597\": [0.25, 0.75, 0, 0, 0.575],\n \"8598\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"8599\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"8600\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"8601\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"8636\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8637\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8640\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8641\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8656\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8657\": [0.19444, 0.69444, 0, 0, 0.70277],\n \"8658\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8659\": [0.19444, 0.69444, 0, 0, 0.70277],\n \"8660\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8661\": [0.25, 0.75, 0, 0, 0.70277],\n \"8704\": [0, 0.69444, 0, 0, 0.63889],\n \"8706\": [0, 0.69444, 0.06389, 0, 0.62847],\n \"8707\": [0, 0.69444, 0, 0, 0.63889],\n \"8709\": [0.05556, 0.75, 0, 0, 0.575],\n \"8711\": [0, 0.68611, 0, 0, 0.95833],\n \"8712\": [0.08556, 0.58556, 0, 0, 0.76666],\n \"8715\": [0.08556, 0.58556, 0, 0, 0.76666],\n \"8722\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8723\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8725\": [0.25, 0.75, 0, 0, 0.575],\n \"8726\": [0.25, 0.75, 0, 0, 0.575],\n \"8727\": [-0.02778, 0.47222, 0, 0, 0.575],\n \"8728\": [-0.02639, 0.47361, 0, 0, 0.575],\n \"8729\": [-0.02639, 0.47361, 0, 0, 0.575],\n \"8730\": [0.18, 0.82, 0, 0, 0.95833],\n \"8733\": [0, 0.44444, 0, 0, 0.89444],\n \"8734\": [0, 0.44444, 0, 0, 1.14999],\n \"8736\": [0, 0.69224, 0, 0, 0.72222],\n \"8739\": [0.25, 0.75, 0, 0, 0.31944],\n \"8741\": [0.25, 0.75, 0, 0, 0.575],\n \"8743\": [0, 0.55556, 0, 0, 0.76666],\n \"8744\": [0, 0.55556, 0, 0, 0.76666],\n \"8745\": [0, 0.55556, 0, 0, 0.76666],\n \"8746\": [0, 0.55556, 0, 0, 0.76666],\n \"8747\": [0.19444, 0.69444, 0.12778, 0, 0.56875],\n \"8764\": [-0.10889, 0.39111, 0, 0, 0.89444],\n \"8768\": [0.19444, 0.69444, 0, 0, 0.31944],\n \"8771\": [0.00222, 0.50222, 0, 0, 0.89444],\n \"8773\": [0.027, 0.638, 0, 0, 0.894],\n \"8776\": [0.02444, 0.52444, 0, 0, 0.89444],\n \"8781\": [0.00222, 0.50222, 0, 0, 0.89444],\n \"8801\": [0.00222, 0.50222, 0, 0, 0.89444],\n \"8804\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8805\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8810\": [0.08556, 0.58556, 0, 0, 1.14999],\n \"8811\": [0.08556, 0.58556, 0, 0, 1.14999],\n \"8826\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"8827\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"8834\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"8835\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"8838\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8839\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8846\": [0, 0.55556, 0, 0, 0.76666],\n \"8849\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8850\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8851\": [0, 0.55556, 0, 0, 0.76666],\n \"8852\": [0, 0.55556, 0, 0, 0.76666],\n \"8853\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8854\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8855\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8856\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8857\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8866\": [0, 0.69444, 0, 0, 0.70277],\n \"8867\": [0, 0.69444, 0, 0, 0.70277],\n \"8868\": [0, 0.69444, 0, 0, 0.89444],\n \"8869\": [0, 0.69444, 0, 0, 0.89444],\n \"8900\": [-0.02639, 0.47361, 0, 0, 0.575],\n \"8901\": [-0.02639, 0.47361, 0, 0, 0.31944],\n \"8902\": [-0.02778, 0.47222, 0, 0, 0.575],\n \"8968\": [0.25, 0.75, 0, 0, 0.51111],\n \"8969\": [0.25, 0.75, 0, 0, 0.51111],\n \"8970\": [0.25, 0.75, 0, 0, 0.51111],\n \"8971\": [0.25, 0.75, 0, 0, 0.51111],\n \"8994\": [-0.13889, 0.36111, 0, 0, 1.14999],\n \"8995\": [-0.13889, 0.36111, 0, 0, 1.14999],\n \"9651\": [0.19444, 0.69444, 0, 0, 1.02222],\n \"9657\": [-0.02778, 0.47222, 0, 0, 0.575],\n \"9661\": [0.19444, 0.69444, 0, 0, 1.02222],\n \"9667\": [-0.02778, 0.47222, 0, 0, 0.575],\n \"9711\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"9824\": [0.12963, 0.69444, 0, 0, 0.89444],\n \"9825\": [0.12963, 0.69444, 0, 0, 0.89444],\n \"9826\": [0.12963, 0.69444, 0, 0, 0.89444],\n \"9827\": [0.12963, 0.69444, 0, 0, 0.89444],\n \"9837\": [0, 0.75, 0, 0, 0.44722],\n \"9838\": [0.19444, 0.69444, 0, 0, 0.44722],\n \"9839\": [0.19444, 0.69444, 0, 0, 0.44722],\n \"10216\": [0.25, 0.75, 0, 0, 0.44722],\n \"10217\": [0.25, 0.75, 0, 0, 0.44722],\n \"10815\": [0, 0.68611, 0, 0, 0.9],\n \"10927\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"10928\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"57376\": [0.19444, 0.69444, 0, 0, 0]\n },\n \"Main-BoldItalic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0.11417, 0, 0.38611],\n \"34\": [0, 0.69444, 0.07939, 0, 0.62055],\n \"35\": [0.19444, 0.69444, 0.06833, 0, 0.94444],\n \"37\": [0.05556, 0.75, 0.12861, 0, 0.94444],\n \"38\": [0, 0.69444, 0.08528, 0, 0.88555],\n \"39\": [0, 0.69444, 0.12945, 0, 0.35555],\n \"40\": [0.25, 0.75, 0.15806, 0, 0.47333],\n \"41\": [0.25, 0.75, 0.03306, 0, 0.47333],\n \"42\": [0, 0.75, 0.14333, 0, 0.59111],\n \"43\": [0.10333, 0.60333, 0.03306, 0, 0.88555],\n \"44\": [0.19444, 0.14722, 0, 0, 0.35555],\n \"45\": [0, 0.44444, 0.02611, 0, 0.41444],\n \"46\": [0, 0.14722, 0, 0, 0.35555],\n \"47\": [0.25, 0.75, 0.15806, 0, 0.59111],\n \"48\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"49\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"50\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"51\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"52\": [0.19444, 0.64444, 0.13167, 0, 0.59111],\n \"53\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"54\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"55\": [0.19444, 0.64444, 0.13167, 0, 0.59111],\n \"56\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"57\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"58\": [0, 0.44444, 0.06695, 0, 0.35555],\n \"59\": [0.19444, 0.44444, 0.06695, 0, 0.35555],\n \"61\": [-0.10889, 0.39111, 0.06833, 0, 0.88555],\n \"63\": [0, 0.69444, 0.11472, 0, 0.59111],\n \"64\": [0, 0.69444, 0.09208, 0, 0.88555],\n \"65\": [0, 0.68611, 0, 0, 0.86555],\n \"66\": [0, 0.68611, 0.0992, 0, 0.81666],\n \"67\": [0, 0.68611, 0.14208, 0, 0.82666],\n \"68\": [0, 0.68611, 0.09062, 0, 0.87555],\n \"69\": [0, 0.68611, 0.11431, 0, 0.75666],\n \"70\": [0, 0.68611, 0.12903, 0, 0.72722],\n \"71\": [0, 0.68611, 0.07347, 0, 0.89527],\n \"72\": [0, 0.68611, 0.17208, 0, 0.8961],\n \"73\": [0, 0.68611, 0.15681, 0, 0.47166],\n \"74\": [0, 0.68611, 0.145, 0, 0.61055],\n \"75\": [0, 0.68611, 0.14208, 0, 0.89499],\n \"76\": [0, 0.68611, 0, 0, 0.69777],\n \"77\": [0, 0.68611, 0.17208, 0, 1.07277],\n \"78\": [0, 0.68611, 0.17208, 0, 0.8961],\n \"79\": [0, 0.68611, 0.09062, 0, 0.85499],\n \"80\": [0, 0.68611, 0.0992, 0, 0.78721],\n \"81\": [0.19444, 0.68611, 0.09062, 0, 0.85499],\n \"82\": [0, 0.68611, 0.02559, 0, 0.85944],\n \"83\": [0, 0.68611, 0.11264, 0, 0.64999],\n \"84\": [0, 0.68611, 0.12903, 0, 0.7961],\n \"85\": [0, 0.68611, 0.17208, 0, 0.88083],\n \"86\": [0, 0.68611, 0.18625, 0, 0.86555],\n \"87\": [0, 0.68611, 0.18625, 0, 1.15999],\n \"88\": [0, 0.68611, 0.15681, 0, 0.86555],\n \"89\": [0, 0.68611, 0.19803, 0, 0.86555],\n \"90\": [0, 0.68611, 0.14208, 0, 0.70888],\n \"91\": [0.25, 0.75, 0.1875, 0, 0.35611],\n \"93\": [0.25, 0.75, 0.09972, 0, 0.35611],\n \"94\": [0, 0.69444, 0.06709, 0, 0.59111],\n \"95\": [0.31, 0.13444, 0.09811, 0, 0.59111],\n \"97\": [0, 0.44444, 0.09426, 0, 0.59111],\n \"98\": [0, 0.69444, 0.07861, 0, 0.53222],\n \"99\": [0, 0.44444, 0.05222, 0, 0.53222],\n \"100\": [0, 0.69444, 0.10861, 0, 0.59111],\n \"101\": [0, 0.44444, 0.085, 0, 0.53222],\n \"102\": [0.19444, 0.69444, 0.21778, 0, 0.4],\n \"103\": [0.19444, 0.44444, 0.105, 0, 0.53222],\n \"104\": [0, 0.69444, 0.09426, 0, 0.59111],\n \"105\": [0, 0.69326, 0.11387, 0, 0.35555],\n \"106\": [0.19444, 0.69326, 0.1672, 0, 0.35555],\n \"107\": [0, 0.69444, 0.11111, 0, 0.53222],\n \"108\": [0, 0.69444, 0.10861, 0, 0.29666],\n \"109\": [0, 0.44444, 0.09426, 0, 0.94444],\n \"110\": [0, 0.44444, 0.09426, 0, 0.64999],\n \"111\": [0, 0.44444, 0.07861, 0, 0.59111],\n \"112\": [0.19444, 0.44444, 0.07861, 0, 0.59111],\n \"113\": [0.19444, 0.44444, 0.105, 0, 0.53222],\n \"114\": [0, 0.44444, 0.11111, 0, 0.50167],\n \"115\": [0, 0.44444, 0.08167, 0, 0.48694],\n \"116\": [0, 0.63492, 0.09639, 0, 0.385],\n \"117\": [0, 0.44444, 0.09426, 0, 0.62055],\n \"118\": [0, 0.44444, 0.11111, 0, 0.53222],\n \"119\": [0, 0.44444, 0.11111, 0, 0.76777],\n \"120\": [0, 0.44444, 0.12583, 0, 0.56055],\n \"121\": [0.19444, 0.44444, 0.105, 0, 0.56166],\n \"122\": [0, 0.44444, 0.13889, 0, 0.49055],\n \"126\": [0.35, 0.34444, 0.11472, 0, 0.59111],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.69444, 0.11473, 0, 0.59111],\n \"176\": [0, 0.69444, 0, 0, 0.94888],\n \"184\": [0.17014, 0, 0, 0, 0.53222],\n \"198\": [0, 0.68611, 0.11431, 0, 1.02277],\n \"216\": [0.04861, 0.73472, 0.09062, 0, 0.88555],\n \"223\": [0.19444, 0.69444, 0.09736, 0, 0.665],\n \"230\": [0, 0.44444, 0.085, 0, 0.82666],\n \"248\": [0.09722, 0.54167, 0.09458, 0, 0.59111],\n \"305\": [0, 0.44444, 0.09426, 0, 0.35555],\n \"338\": [0, 0.68611, 0.11431, 0, 1.14054],\n \"339\": [0, 0.44444, 0.085, 0, 0.82666],\n \"567\": [0.19444, 0.44444, 0.04611, 0, 0.385],\n \"710\": [0, 0.69444, 0.06709, 0, 0.59111],\n \"711\": [0, 0.63194, 0.08271, 0, 0.59111],\n \"713\": [0, 0.59444, 0.10444, 0, 0.59111],\n \"714\": [0, 0.69444, 0.08528, 0, 0.59111],\n \"715\": [0, 0.69444, 0, 0, 0.59111],\n \"728\": [0, 0.69444, 0.10333, 0, 0.59111],\n \"729\": [0, 0.69444, 0.12945, 0, 0.35555],\n \"730\": [0, 0.69444, 0, 0, 0.94888],\n \"732\": [0, 0.69444, 0.11472, 0, 0.59111],\n \"733\": [0, 0.69444, 0.11472, 0, 0.59111],\n \"915\": [0, 0.68611, 0.12903, 0, 0.69777],\n \"916\": [0, 0.68611, 0, 0, 0.94444],\n \"920\": [0, 0.68611, 0.09062, 0, 0.88555],\n \"923\": [0, 0.68611, 0, 0, 0.80666],\n \"926\": [0, 0.68611, 0.15092, 0, 0.76777],\n \"928\": [0, 0.68611, 0.17208, 0, 0.8961],\n \"931\": [0, 0.68611, 0.11431, 0, 0.82666],\n \"933\": [0, 0.68611, 0.10778, 0, 0.88555],\n \"934\": [0, 0.68611, 0.05632, 0, 0.82666],\n \"936\": [0, 0.68611, 0.10778, 0, 0.88555],\n \"937\": [0, 0.68611, 0.0992, 0, 0.82666],\n \"8211\": [0, 0.44444, 0.09811, 0, 0.59111],\n \"8212\": [0, 0.44444, 0.09811, 0, 1.18221],\n \"8216\": [0, 0.69444, 0.12945, 0, 0.35555],\n \"8217\": [0, 0.69444, 0.12945, 0, 0.35555],\n \"8220\": [0, 0.69444, 0.16772, 0, 0.62055],\n \"8221\": [0, 0.69444, 0.07939, 0, 0.62055]\n },\n \"Main-Italic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0.12417, 0, 0.30667],\n \"34\": [0, 0.69444, 0.06961, 0, 0.51444],\n \"35\": [0.19444, 0.69444, 0.06616, 0, 0.81777],\n \"37\": [0.05556, 0.75, 0.13639, 0, 0.81777],\n \"38\": [0, 0.69444, 0.09694, 0, 0.76666],\n \"39\": [0, 0.69444, 0.12417, 0, 0.30667],\n \"40\": [0.25, 0.75, 0.16194, 0, 0.40889],\n \"41\": [0.25, 0.75, 0.03694, 0, 0.40889],\n \"42\": [0, 0.75, 0.14917, 0, 0.51111],\n \"43\": [0.05667, 0.56167, 0.03694, 0, 0.76666],\n \"44\": [0.19444, 0.10556, 0, 0, 0.30667],\n \"45\": [0, 0.43056, 0.02826, 0, 0.35778],\n \"46\": [0, 0.10556, 0, 0, 0.30667],\n \"47\": [0.25, 0.75, 0.16194, 0, 0.51111],\n \"48\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"49\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"50\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"51\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"52\": [0.19444, 0.64444, 0.13556, 0, 0.51111],\n \"53\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"54\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"55\": [0.19444, 0.64444, 0.13556, 0, 0.51111],\n \"56\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"57\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"58\": [0, 0.43056, 0.0582, 0, 0.30667],\n \"59\": [0.19444, 0.43056, 0.0582, 0, 0.30667],\n \"61\": [-0.13313, 0.36687, 0.06616, 0, 0.76666],\n \"63\": [0, 0.69444, 0.1225, 0, 0.51111],\n \"64\": [0, 0.69444, 0.09597, 0, 0.76666],\n \"65\": [0, 0.68333, 0, 0, 0.74333],\n \"66\": [0, 0.68333, 0.10257, 0, 0.70389],\n \"67\": [0, 0.68333, 0.14528, 0, 0.71555],\n \"68\": [0, 0.68333, 0.09403, 0, 0.755],\n \"69\": [0, 0.68333, 0.12028, 0, 0.67833],\n \"70\": [0, 0.68333, 0.13305, 0, 0.65277],\n \"71\": [0, 0.68333, 0.08722, 0, 0.77361],\n \"72\": [0, 0.68333, 0.16389, 0, 0.74333],\n \"73\": [0, 0.68333, 0.15806, 0, 0.38555],\n \"74\": [0, 0.68333, 0.14028, 0, 0.525],\n \"75\": [0, 0.68333, 0.14528, 0, 0.76888],\n \"76\": [0, 0.68333, 0, 0, 0.62722],\n \"77\": [0, 0.68333, 0.16389, 0, 0.89666],\n \"78\": [0, 0.68333, 0.16389, 0, 0.74333],\n \"79\": [0, 0.68333, 0.09403, 0, 0.76666],\n \"80\": [0, 0.68333, 0.10257, 0, 0.67833],\n \"81\": [0.19444, 0.68333, 0.09403, 0, 0.76666],\n \"82\": [0, 0.68333, 0.03868, 0, 0.72944],\n \"83\": [0, 0.68333, 0.11972, 0, 0.56222],\n \"84\": [0, 0.68333, 0.13305, 0, 0.71555],\n \"85\": [0, 0.68333, 0.16389, 0, 0.74333],\n \"86\": [0, 0.68333, 0.18361, 0, 0.74333],\n \"87\": [0, 0.68333, 0.18361, 0, 0.99888],\n \"88\": [0, 0.68333, 0.15806, 0, 0.74333],\n \"89\": [0, 0.68333, 0.19383, 0, 0.74333],\n \"90\": [0, 0.68333, 0.14528, 0, 0.61333],\n \"91\": [0.25, 0.75, 0.1875, 0, 0.30667],\n \"93\": [0.25, 0.75, 0.10528, 0, 0.30667],\n \"94\": [0, 0.69444, 0.06646, 0, 0.51111],\n \"95\": [0.31, 0.12056, 0.09208, 0, 0.51111],\n \"97\": [0, 0.43056, 0.07671, 0, 0.51111],\n \"98\": [0, 0.69444, 0.06312, 0, 0.46],\n \"99\": [0, 0.43056, 0.05653, 0, 0.46],\n \"100\": [0, 0.69444, 0.10333, 0, 0.51111],\n \"101\": [0, 0.43056, 0.07514, 0, 0.46],\n \"102\": [0.19444, 0.69444, 0.21194, 0, 0.30667],\n \"103\": [0.19444, 0.43056, 0.08847, 0, 0.46],\n \"104\": [0, 0.69444, 0.07671, 0, 0.51111],\n \"105\": [0, 0.65536, 0.1019, 0, 0.30667],\n \"106\": [0.19444, 0.65536, 0.14467, 0, 0.30667],\n \"107\": [0, 0.69444, 0.10764, 0, 0.46],\n \"108\": [0, 0.69444, 0.10333, 0, 0.25555],\n \"109\": [0, 0.43056, 0.07671, 0, 0.81777],\n \"110\": [0, 0.43056, 0.07671, 0, 0.56222],\n \"111\": [0, 0.43056, 0.06312, 0, 0.51111],\n \"112\": [0.19444, 0.43056, 0.06312, 0, 0.51111],\n \"113\": [0.19444, 0.43056, 0.08847, 0, 0.46],\n \"114\": [0, 0.43056, 0.10764, 0, 0.42166],\n \"115\": [0, 0.43056, 0.08208, 0, 0.40889],\n \"116\": [0, 0.61508, 0.09486, 0, 0.33222],\n \"117\": [0, 0.43056, 0.07671, 0, 0.53666],\n \"118\": [0, 0.43056, 0.10764, 0, 0.46],\n \"119\": [0, 0.43056, 0.10764, 0, 0.66444],\n \"120\": [0, 0.43056, 0.12042, 0, 0.46389],\n \"121\": [0.19444, 0.43056, 0.08847, 0, 0.48555],\n \"122\": [0, 0.43056, 0.12292, 0, 0.40889],\n \"126\": [0.35, 0.31786, 0.11585, 0, 0.51111],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.66786, 0.10474, 0, 0.51111],\n \"176\": [0, 0.69444, 0, 0, 0.83129],\n \"184\": [0.17014, 0, 0, 0, 0.46],\n \"198\": [0, 0.68333, 0.12028, 0, 0.88277],\n \"216\": [0.04861, 0.73194, 0.09403, 0, 0.76666],\n \"223\": [0.19444, 0.69444, 0.10514, 0, 0.53666],\n \"230\": [0, 0.43056, 0.07514, 0, 0.71555],\n \"248\": [0.09722, 0.52778, 0.09194, 0, 0.51111],\n \"338\": [0, 0.68333, 0.12028, 0, 0.98499],\n \"339\": [0, 0.43056, 0.07514, 0, 0.71555],\n \"710\": [0, 0.69444, 0.06646, 0, 0.51111],\n \"711\": [0, 0.62847, 0.08295, 0, 0.51111],\n \"713\": [0, 0.56167, 0.10333, 0, 0.51111],\n \"714\": [0, 0.69444, 0.09694, 0, 0.51111],\n \"715\": [0, 0.69444, 0, 0, 0.51111],\n \"728\": [0, 0.69444, 0.10806, 0, 0.51111],\n \"729\": [0, 0.66786, 0.11752, 0, 0.30667],\n \"730\": [0, 0.69444, 0, 0, 0.83129],\n \"732\": [0, 0.66786, 0.11585, 0, 0.51111],\n \"733\": [0, 0.69444, 0.1225, 0, 0.51111],\n \"915\": [0, 0.68333, 0.13305, 0, 0.62722],\n \"916\": [0, 0.68333, 0, 0, 0.81777],\n \"920\": [0, 0.68333, 0.09403, 0, 0.76666],\n \"923\": [0, 0.68333, 0, 0, 0.69222],\n \"926\": [0, 0.68333, 0.15294, 0, 0.66444],\n \"928\": [0, 0.68333, 0.16389, 0, 0.74333],\n \"931\": [0, 0.68333, 0.12028, 0, 0.71555],\n \"933\": [0, 0.68333, 0.11111, 0, 0.76666],\n \"934\": [0, 0.68333, 0.05986, 0, 0.71555],\n \"936\": [0, 0.68333, 0.11111, 0, 0.76666],\n \"937\": [0, 0.68333, 0.10257, 0, 0.71555],\n \"8211\": [0, 0.43056, 0.09208, 0, 0.51111],\n \"8212\": [0, 0.43056, 0.09208, 0, 1.02222],\n \"8216\": [0, 0.69444, 0.12417, 0, 0.30667],\n \"8217\": [0, 0.69444, 0.12417, 0, 0.30667],\n \"8220\": [0, 0.69444, 0.1685, 0, 0.51444],\n \"8221\": [0, 0.69444, 0.06961, 0, 0.51444],\n \"8463\": [0, 0.68889, 0, 0, 0.54028]\n },\n \"Main-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0, 0, 0.27778],\n \"34\": [0, 0.69444, 0, 0, 0.5],\n \"35\": [0.19444, 0.69444, 0, 0, 0.83334],\n \"36\": [0.05556, 0.75, 0, 0, 0.5],\n \"37\": [0.05556, 0.75, 0, 0, 0.83334],\n \"38\": [0, 0.69444, 0, 0, 0.77778],\n \"39\": [0, 0.69444, 0, 0, 0.27778],\n \"40\": [0.25, 0.75, 0, 0, 0.38889],\n \"41\": [0.25, 0.75, 0, 0, 0.38889],\n \"42\": [0, 0.75, 0, 0, 0.5],\n \"43\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"44\": [0.19444, 0.10556, 0, 0, 0.27778],\n \"45\": [0, 0.43056, 0, 0, 0.33333],\n \"46\": [0, 0.10556, 0, 0, 0.27778],\n \"47\": [0.25, 0.75, 0, 0, 0.5],\n \"48\": [0, 0.64444, 0, 0, 0.5],\n \"49\": [0, 0.64444, 0, 0, 0.5],\n \"50\": [0, 0.64444, 0, 0, 0.5],\n \"51\": [0, 0.64444, 0, 0, 0.5],\n \"52\": [0, 0.64444, 0, 0, 0.5],\n \"53\": [0, 0.64444, 0, 0, 0.5],\n \"54\": [0, 0.64444, 0, 0, 0.5],\n \"55\": [0, 0.64444, 0, 0, 0.5],\n \"56\": [0, 0.64444, 0, 0, 0.5],\n \"57\": [0, 0.64444, 0, 0, 0.5],\n \"58\": [0, 0.43056, 0, 0, 0.27778],\n \"59\": [0.19444, 0.43056, 0, 0, 0.27778],\n \"60\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"61\": [-0.13313, 0.36687, 0, 0, 0.77778],\n \"62\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"63\": [0, 0.69444, 0, 0, 0.47222],\n \"64\": [0, 0.69444, 0, 0, 0.77778],\n \"65\": [0, 0.68333, 0, 0, 0.75],\n \"66\": [0, 0.68333, 0, 0, 0.70834],\n \"67\": [0, 0.68333, 0, 0, 0.72222],\n \"68\": [0, 0.68333, 0, 0, 0.76389],\n \"69\": [0, 0.68333, 0, 0, 0.68056],\n \"70\": [0, 0.68333, 0, 0, 0.65278],\n \"71\": [0, 0.68333, 0, 0, 0.78472],\n \"72\": [0, 0.68333, 0, 0, 0.75],\n \"73\": [0, 0.68333, 0, 0, 0.36111],\n \"74\": [0, 0.68333, 0, 0, 0.51389],\n \"75\": [0, 0.68333, 0, 0, 0.77778],\n \"76\": [0, 0.68333, 0, 0, 0.625],\n \"77\": [0, 0.68333, 0, 0, 0.91667],\n \"78\": [0, 0.68333, 0, 0, 0.75],\n \"79\": [0, 0.68333, 0, 0, 0.77778],\n \"80\": [0, 0.68333, 0, 0, 0.68056],\n \"81\": [0.19444, 0.68333, 0, 0, 0.77778],\n \"82\": [0, 0.68333, 0, 0, 0.73611],\n \"83\": [0, 0.68333, 0, 0, 0.55556],\n \"84\": [0, 0.68333, 0, 0, 0.72222],\n \"85\": [0, 0.68333, 0, 0, 0.75],\n \"86\": [0, 0.68333, 0.01389, 0, 0.75],\n \"87\": [0, 0.68333, 0.01389, 0, 1.02778],\n \"88\": [0, 0.68333, 0, 0, 0.75],\n \"89\": [0, 0.68333, 0.025, 0, 0.75],\n \"90\": [0, 0.68333, 0, 0, 0.61111],\n \"91\": [0.25, 0.75, 0, 0, 0.27778],\n \"92\": [0.25, 0.75, 0, 0, 0.5],\n \"93\": [0.25, 0.75, 0, 0, 0.27778],\n \"94\": [0, 0.69444, 0, 0, 0.5],\n \"95\": [0.31, 0.12056, 0.02778, 0, 0.5],\n \"97\": [0, 0.43056, 0, 0, 0.5],\n \"98\": [0, 0.69444, 0, 0, 0.55556],\n \"99\": [0, 0.43056, 0, 0, 0.44445],\n \"100\": [0, 0.69444, 0, 0, 0.55556],\n \"101\": [0, 0.43056, 0, 0, 0.44445],\n \"102\": [0, 0.69444, 0.07778, 0, 0.30556],\n \"103\": [0.19444, 0.43056, 0.01389, 0, 0.5],\n \"104\": [0, 0.69444, 0, 0, 0.55556],\n \"105\": [0, 0.66786, 0, 0, 0.27778],\n \"106\": [0.19444, 0.66786, 0, 0, 0.30556],\n \"107\": [0, 0.69444, 0, 0, 0.52778],\n \"108\": [0, 0.69444, 0, 0, 0.27778],\n \"109\": [0, 0.43056, 0, 0, 0.83334],\n \"110\": [0, 0.43056, 0, 0, 0.55556],\n \"111\": [0, 0.43056, 0, 0, 0.5],\n \"112\": [0.19444, 0.43056, 0, 0, 0.55556],\n \"113\": [0.19444, 0.43056, 0, 0, 0.52778],\n \"114\": [0, 0.43056, 0, 0, 0.39167],\n \"115\": [0, 0.43056, 0, 0, 0.39445],\n \"116\": [0, 0.61508, 0, 0, 0.38889],\n \"117\": [0, 0.43056, 0, 0, 0.55556],\n \"118\": [0, 0.43056, 0.01389, 0, 0.52778],\n \"119\": [0, 0.43056, 0.01389, 0, 0.72222],\n \"120\": [0, 0.43056, 0, 0, 0.52778],\n \"121\": [0.19444, 0.43056, 0.01389, 0, 0.52778],\n \"122\": [0, 0.43056, 0, 0, 0.44445],\n \"123\": [0.25, 0.75, 0, 0, 0.5],\n \"124\": [0.25, 0.75, 0, 0, 0.27778],\n \"125\": [0.25, 0.75, 0, 0, 0.5],\n \"126\": [0.35, 0.31786, 0, 0, 0.5],\n \"160\": [0, 0, 0, 0, 0.25],\n \"163\": [0, 0.69444, 0, 0, 0.76909],\n \"167\": [0.19444, 0.69444, 0, 0, 0.44445],\n \"168\": [0, 0.66786, 0, 0, 0.5],\n \"172\": [0, 0.43056, 0, 0, 0.66667],\n \"176\": [0, 0.69444, 0, 0, 0.75],\n \"177\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"182\": [0.19444, 0.69444, 0, 0, 0.61111],\n \"184\": [0.17014, 0, 0, 0, 0.44445],\n \"198\": [0, 0.68333, 0, 0, 0.90278],\n \"215\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"216\": [0.04861, 0.73194, 0, 0, 0.77778],\n \"223\": [0, 0.69444, 0, 0, 0.5],\n \"230\": [0, 0.43056, 0, 0, 0.72222],\n \"247\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"248\": [0.09722, 0.52778, 0, 0, 0.5],\n \"305\": [0, 0.43056, 0, 0, 0.27778],\n \"338\": [0, 0.68333, 0, 0, 1.01389],\n \"339\": [0, 0.43056, 0, 0, 0.77778],\n \"567\": [0.19444, 0.43056, 0, 0, 0.30556],\n \"710\": [0, 0.69444, 0, 0, 0.5],\n \"711\": [0, 0.62847, 0, 0, 0.5],\n \"713\": [0, 0.56778, 0, 0, 0.5],\n \"714\": [0, 0.69444, 0, 0, 0.5],\n \"715\": [0, 0.69444, 0, 0, 0.5],\n \"728\": [0, 0.69444, 0, 0, 0.5],\n \"729\": [0, 0.66786, 0, 0, 0.27778],\n \"730\": [0, 0.69444, 0, 0, 0.75],\n \"732\": [0, 0.66786, 0, 0, 0.5],\n \"733\": [0, 0.69444, 0, 0, 0.5],\n \"915\": [0, 0.68333, 0, 0, 0.625],\n \"916\": [0, 0.68333, 0, 0, 0.83334],\n \"920\": [0, 0.68333, 0, 0, 0.77778],\n \"923\": [0, 0.68333, 0, 0, 0.69445],\n \"926\": [0, 0.68333, 0, 0, 0.66667],\n \"928\": [0, 0.68333, 0, 0, 0.75],\n \"931\": [0, 0.68333, 0, 0, 0.72222],\n \"933\": [0, 0.68333, 0, 0, 0.77778],\n \"934\": [0, 0.68333, 0, 0, 0.72222],\n \"936\": [0, 0.68333, 0, 0, 0.77778],\n \"937\": [0, 0.68333, 0, 0, 0.72222],\n \"8211\": [0, 0.43056, 0.02778, 0, 0.5],\n \"8212\": [0, 0.43056, 0.02778, 0, 1.0],\n \"8216\": [0, 0.69444, 0, 0, 0.27778],\n \"8217\": [0, 0.69444, 0, 0, 0.27778],\n \"8220\": [0, 0.69444, 0, 0, 0.5],\n \"8221\": [0, 0.69444, 0, 0, 0.5],\n \"8224\": [0.19444, 0.69444, 0, 0, 0.44445],\n \"8225\": [0.19444, 0.69444, 0, 0, 0.44445],\n \"8230\": [0, 0.123, 0, 0, 1.172],\n \"8242\": [0, 0.55556, 0, 0, 0.275],\n \"8407\": [0, 0.71444, 0.15382, 0, 0.5],\n \"8463\": [0, 0.68889, 0, 0, 0.54028],\n \"8465\": [0, 0.69444, 0, 0, 0.72222],\n \"8467\": [0, 0.69444, 0, 0.11111, 0.41667],\n \"8472\": [0.19444, 0.43056, 0, 0.11111, 0.63646],\n \"8476\": [0, 0.69444, 0, 0, 0.72222],\n \"8501\": [0, 0.69444, 0, 0, 0.61111],\n \"8592\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8593\": [0.19444, 0.69444, 0, 0, 0.5],\n \"8594\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8595\": [0.19444, 0.69444, 0, 0, 0.5],\n \"8596\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8597\": [0.25, 0.75, 0, 0, 0.5],\n \"8598\": [0.19444, 0.69444, 0, 0, 1.0],\n \"8599\": [0.19444, 0.69444, 0, 0, 1.0],\n \"8600\": [0.19444, 0.69444, 0, 0, 1.0],\n \"8601\": [0.19444, 0.69444, 0, 0, 1.0],\n \"8614\": [0.011, 0.511, 0, 0, 1.0],\n \"8617\": [0.011, 0.511, 0, 0, 1.126],\n \"8618\": [0.011, 0.511, 0, 0, 1.126],\n \"8636\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8637\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8640\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8641\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8652\": [0.011, 0.671, 0, 0, 1.0],\n \"8656\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8657\": [0.19444, 0.69444, 0, 0, 0.61111],\n \"8658\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8659\": [0.19444, 0.69444, 0, 0, 0.61111],\n \"8660\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8661\": [0.25, 0.75, 0, 0, 0.61111],\n \"8704\": [0, 0.69444, 0, 0, 0.55556],\n \"8706\": [0, 0.69444, 0.05556, 0.08334, 0.5309],\n \"8707\": [0, 0.69444, 0, 0, 0.55556],\n \"8709\": [0.05556, 0.75, 0, 0, 0.5],\n \"8711\": [0, 0.68333, 0, 0, 0.83334],\n \"8712\": [0.0391, 0.5391, 0, 0, 0.66667],\n \"8715\": [0.0391, 0.5391, 0, 0, 0.66667],\n \"8722\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8723\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8725\": [0.25, 0.75, 0, 0, 0.5],\n \"8726\": [0.25, 0.75, 0, 0, 0.5],\n \"8727\": [-0.03472, 0.46528, 0, 0, 0.5],\n \"8728\": [-0.05555, 0.44445, 0, 0, 0.5],\n \"8729\": [-0.05555, 0.44445, 0, 0, 0.5],\n \"8730\": [0.2, 0.8, 0, 0, 0.83334],\n \"8733\": [0, 0.43056, 0, 0, 0.77778],\n \"8734\": [0, 0.43056, 0, 0, 1.0],\n \"8736\": [0, 0.69224, 0, 0, 0.72222],\n \"8739\": [0.25, 0.75, 0, 0, 0.27778],\n \"8741\": [0.25, 0.75, 0, 0, 0.5],\n \"8743\": [0, 0.55556, 0, 0, 0.66667],\n \"8744\": [0, 0.55556, 0, 0, 0.66667],\n \"8745\": [0, 0.55556, 0, 0, 0.66667],\n \"8746\": [0, 0.55556, 0, 0, 0.66667],\n \"8747\": [0.19444, 0.69444, 0.11111, 0, 0.41667],\n \"8764\": [-0.13313, 0.36687, 0, 0, 0.77778],\n \"8768\": [0.19444, 0.69444, 0, 0, 0.27778],\n \"8771\": [-0.03625, 0.46375, 0, 0, 0.77778],\n \"8773\": [-0.022, 0.589, 0, 0, 0.778],\n \"8776\": [-0.01688, 0.48312, 0, 0, 0.77778],\n \"8781\": [-0.03625, 0.46375, 0, 0, 0.77778],\n \"8784\": [-0.133, 0.673, 0, 0, 0.778],\n \"8801\": [-0.03625, 0.46375, 0, 0, 0.77778],\n \"8804\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8805\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8810\": [0.0391, 0.5391, 0, 0, 1.0],\n \"8811\": [0.0391, 0.5391, 0, 0, 1.0],\n \"8826\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8827\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8834\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8835\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8838\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8839\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8846\": [0, 0.55556, 0, 0, 0.66667],\n \"8849\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8850\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8851\": [0, 0.55556, 0, 0, 0.66667],\n \"8852\": [0, 0.55556, 0, 0, 0.66667],\n \"8853\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8854\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8855\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8856\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8857\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8866\": [0, 0.69444, 0, 0, 0.61111],\n \"8867\": [0, 0.69444, 0, 0, 0.61111],\n \"8868\": [0, 0.69444, 0, 0, 0.77778],\n \"8869\": [0, 0.69444, 0, 0, 0.77778],\n \"8872\": [0.249, 0.75, 0, 0, 0.867],\n \"8900\": [-0.05555, 0.44445, 0, 0, 0.5],\n \"8901\": [-0.05555, 0.44445, 0, 0, 0.27778],\n \"8902\": [-0.03472, 0.46528, 0, 0, 0.5],\n \"8904\": [0.005, 0.505, 0, 0, 0.9],\n \"8942\": [0.03, 0.903, 0, 0, 0.278],\n \"8943\": [-0.19, 0.313, 0, 0, 1.172],\n \"8945\": [-0.1, 0.823, 0, 0, 1.282],\n \"8968\": [0.25, 0.75, 0, 0, 0.44445],\n \"8969\": [0.25, 0.75, 0, 0, 0.44445],\n \"8970\": [0.25, 0.75, 0, 0, 0.44445],\n \"8971\": [0.25, 0.75, 0, 0, 0.44445],\n \"8994\": [-0.14236, 0.35764, 0, 0, 1.0],\n \"8995\": [-0.14236, 0.35764, 0, 0, 1.0],\n \"9136\": [0.244, 0.744, 0, 0, 0.412],\n \"9137\": [0.244, 0.745, 0, 0, 0.412],\n \"9651\": [0.19444, 0.69444, 0, 0, 0.88889],\n \"9657\": [-0.03472, 0.46528, 0, 0, 0.5],\n \"9661\": [0.19444, 0.69444, 0, 0, 0.88889],\n \"9667\": [-0.03472, 0.46528, 0, 0, 0.5],\n \"9711\": [0.19444, 0.69444, 0, 0, 1.0],\n \"9824\": [0.12963, 0.69444, 0, 0, 0.77778],\n \"9825\": [0.12963, 0.69444, 0, 0, 0.77778],\n \"9826\": [0.12963, 0.69444, 0, 0, 0.77778],\n \"9827\": [0.12963, 0.69444, 0, 0, 0.77778],\n \"9837\": [0, 0.75, 0, 0, 0.38889],\n \"9838\": [0.19444, 0.69444, 0, 0, 0.38889],\n \"9839\": [0.19444, 0.69444, 0, 0, 0.38889],\n \"10216\": [0.25, 0.75, 0, 0, 0.38889],\n \"10217\": [0.25, 0.75, 0, 0, 0.38889],\n \"10222\": [0.244, 0.744, 0, 0, 0.412],\n \"10223\": [0.244, 0.745, 0, 0, 0.412],\n \"10229\": [0.011, 0.511, 0, 0, 1.609],\n \"10230\": [0.011, 0.511, 0, 0, 1.638],\n \"10231\": [0.011, 0.511, 0, 0, 1.859],\n \"10232\": [0.024, 0.525, 0, 0, 1.609],\n \"10233\": [0.024, 0.525, 0, 0, 1.638],\n \"10234\": [0.024, 0.525, 0, 0, 1.858],\n \"10236\": [0.011, 0.511, 0, 0, 1.638],\n \"10815\": [0, 0.68333, 0, 0, 0.75],\n \"10927\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"10928\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"57376\": [0.19444, 0.69444, 0, 0, 0]\n },\n \"Math-BoldItalic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"48\": [0, 0.44444, 0, 0, 0.575],\n \"49\": [0, 0.44444, 0, 0, 0.575],\n \"50\": [0, 0.44444, 0, 0, 0.575],\n \"51\": [0.19444, 0.44444, 0, 0, 0.575],\n \"52\": [0.19444, 0.44444, 0, 0, 0.575],\n \"53\": [0.19444, 0.44444, 0, 0, 0.575],\n \"54\": [0, 0.64444, 0, 0, 0.575],\n \"55\": [0.19444, 0.44444, 0, 0, 0.575],\n \"56\": [0, 0.64444, 0, 0, 0.575],\n \"57\": [0.19444, 0.44444, 0, 0, 0.575],\n \"65\": [0, 0.68611, 0, 0, 0.86944],\n \"66\": [0, 0.68611, 0.04835, 0, 0.8664],\n \"67\": [0, 0.68611, 0.06979, 0, 0.81694],\n \"68\": [0, 0.68611, 0.03194, 0, 0.93812],\n \"69\": [0, 0.68611, 0.05451, 0, 0.81007],\n \"70\": [0, 0.68611, 0.15972, 0, 0.68889],\n \"71\": [0, 0.68611, 0, 0, 0.88673],\n \"72\": [0, 0.68611, 0.08229, 0, 0.98229],\n \"73\": [0, 0.68611, 0.07778, 0, 0.51111],\n \"74\": [0, 0.68611, 0.10069, 0, 0.63125],\n \"75\": [0, 0.68611, 0.06979, 0, 0.97118],\n \"76\": [0, 0.68611, 0, 0, 0.75555],\n \"77\": [0, 0.68611, 0.11424, 0, 1.14201],\n \"78\": [0, 0.68611, 0.11424, 0, 0.95034],\n \"79\": [0, 0.68611, 0.03194, 0, 0.83666],\n \"80\": [0, 0.68611, 0.15972, 0, 0.72309],\n \"81\": [0.19444, 0.68611, 0, 0, 0.86861],\n \"82\": [0, 0.68611, 0.00421, 0, 0.87235],\n \"83\": [0, 0.68611, 0.05382, 0, 0.69271],\n \"84\": [0, 0.68611, 0.15972, 0, 0.63663],\n \"85\": [0, 0.68611, 0.11424, 0, 0.80027],\n \"86\": [0, 0.68611, 0.25555, 0, 0.67778],\n \"87\": [0, 0.68611, 0.15972, 0, 1.09305],\n \"88\": [0, 0.68611, 0.07778, 0, 0.94722],\n \"89\": [0, 0.68611, 0.25555, 0, 0.67458],\n \"90\": [0, 0.68611, 0.06979, 0, 0.77257],\n \"97\": [0, 0.44444, 0, 0, 0.63287],\n \"98\": [0, 0.69444, 0, 0, 0.52083],\n \"99\": [0, 0.44444, 0, 0, 0.51342],\n \"100\": [0, 0.69444, 0, 0, 0.60972],\n \"101\": [0, 0.44444, 0, 0, 0.55361],\n \"102\": [0.19444, 0.69444, 0.11042, 0, 0.56806],\n \"103\": [0.19444, 0.44444, 0.03704, 0, 0.5449],\n \"104\": [0, 0.69444, 0, 0, 0.66759],\n \"105\": [0, 0.69326, 0, 0, 0.4048],\n \"106\": [0.19444, 0.69326, 0.0622, 0, 0.47083],\n \"107\": [0, 0.69444, 0.01852, 0, 0.6037],\n \"108\": [0, 0.69444, 0.0088, 0, 0.34815],\n \"109\": [0, 0.44444, 0, 0, 1.0324],\n \"110\": [0, 0.44444, 0, 0, 0.71296],\n \"111\": [0, 0.44444, 0, 0, 0.58472],\n \"112\": [0.19444, 0.44444, 0, 0, 0.60092],\n \"113\": [0.19444, 0.44444, 0.03704, 0, 0.54213],\n \"114\": [0, 0.44444, 0.03194, 0, 0.5287],\n \"115\": [0, 0.44444, 0, 0, 0.53125],\n \"116\": [0, 0.63492, 0, 0, 0.41528],\n \"117\": [0, 0.44444, 0, 0, 0.68102],\n \"118\": [0, 0.44444, 0.03704, 0, 0.56666],\n \"119\": [0, 0.44444, 0.02778, 0, 0.83148],\n \"120\": [0, 0.44444, 0, 0, 0.65903],\n \"121\": [0.19444, 0.44444, 0.03704, 0, 0.59028],\n \"122\": [0, 0.44444, 0.04213, 0, 0.55509],\n \"160\": [0, 0, 0, 0, 0.25],\n \"915\": [0, 0.68611, 0.15972, 0, 0.65694],\n \"916\": [0, 0.68611, 0, 0, 0.95833],\n \"920\": [0, 0.68611, 0.03194, 0, 0.86722],\n \"923\": [0, 0.68611, 0, 0, 0.80555],\n \"926\": [0, 0.68611, 0.07458, 0, 0.84125],\n \"928\": [0, 0.68611, 0.08229, 0, 0.98229],\n \"931\": [0, 0.68611, 0.05451, 0, 0.88507],\n \"933\": [0, 0.68611, 0.15972, 0, 0.67083],\n \"934\": [0, 0.68611, 0, 0, 0.76666],\n \"936\": [0, 0.68611, 0.11653, 0, 0.71402],\n \"937\": [0, 0.68611, 0.04835, 0, 0.8789],\n \"945\": [0, 0.44444, 0, 0, 0.76064],\n \"946\": [0.19444, 0.69444, 0.03403, 0, 0.65972],\n \"947\": [0.19444, 0.44444, 0.06389, 0, 0.59003],\n \"948\": [0, 0.69444, 0.03819, 0, 0.52222],\n \"949\": [0, 0.44444, 0, 0, 0.52882],\n \"950\": [0.19444, 0.69444, 0.06215, 0, 0.50833],\n \"951\": [0.19444, 0.44444, 0.03704, 0, 0.6],\n \"952\": [0, 0.69444, 0.03194, 0, 0.5618],\n \"953\": [0, 0.44444, 0, 0, 0.41204],\n \"954\": [0, 0.44444, 0, 0, 0.66759],\n \"955\": [0, 0.69444, 0, 0, 0.67083],\n \"956\": [0.19444, 0.44444, 0, 0, 0.70787],\n \"957\": [0, 0.44444, 0.06898, 0, 0.57685],\n \"958\": [0.19444, 0.69444, 0.03021, 0, 0.50833],\n \"959\": [0, 0.44444, 0, 0, 0.58472],\n \"960\": [0, 0.44444, 0.03704, 0, 0.68241],\n \"961\": [0.19444, 0.44444, 0, 0, 0.6118],\n \"962\": [0.09722, 0.44444, 0.07917, 0, 0.42361],\n \"963\": [0, 0.44444, 0.03704, 0, 0.68588],\n \"964\": [0, 0.44444, 0.13472, 0, 0.52083],\n \"965\": [0, 0.44444, 0.03704, 0, 0.63055],\n \"966\": [0.19444, 0.44444, 0, 0, 0.74722],\n \"967\": [0.19444, 0.44444, 0, 0, 0.71805],\n \"968\": [0.19444, 0.69444, 0.03704, 0, 0.75833],\n \"969\": [0, 0.44444, 0.03704, 0, 0.71782],\n \"977\": [0, 0.69444, 0, 0, 0.69155],\n \"981\": [0.19444, 0.69444, 0, 0, 0.7125],\n \"982\": [0, 0.44444, 0.03194, 0, 0.975],\n \"1009\": [0.19444, 0.44444, 0, 0, 0.6118],\n \"1013\": [0, 0.44444, 0, 0, 0.48333],\n \"57649\": [0, 0.44444, 0, 0, 0.39352],\n \"57911\": [0.19444, 0.44444, 0, 0, 0.43889]\n },\n \"Math-Italic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"48\": [0, 0.43056, 0, 0, 0.5],\n \"49\": [0, 0.43056, 0, 0, 0.5],\n \"50\": [0, 0.43056, 0, 0, 0.5],\n \"51\": [0.19444, 0.43056, 0, 0, 0.5],\n \"52\": [0.19444, 0.43056, 0, 0, 0.5],\n \"53\": [0.19444, 0.43056, 0, 0, 0.5],\n \"54\": [0, 0.64444, 0, 0, 0.5],\n \"55\": [0.19444, 0.43056, 0, 0, 0.5],\n \"56\": [0, 0.64444, 0, 0, 0.5],\n \"57\": [0.19444, 0.43056, 0, 0, 0.5],\n \"65\": [0, 0.68333, 0, 0.13889, 0.75],\n \"66\": [0, 0.68333, 0.05017, 0.08334, 0.75851],\n \"67\": [0, 0.68333, 0.07153, 0.08334, 0.71472],\n \"68\": [0, 0.68333, 0.02778, 0.05556, 0.82792],\n \"69\": [0, 0.68333, 0.05764, 0.08334, 0.7382],\n \"70\": [0, 0.68333, 0.13889, 0.08334, 0.64306],\n \"71\": [0, 0.68333, 0, 0.08334, 0.78625],\n \"72\": [0, 0.68333, 0.08125, 0.05556, 0.83125],\n \"73\": [0, 0.68333, 0.07847, 0.11111, 0.43958],\n \"74\": [0, 0.68333, 0.09618, 0.16667, 0.55451],\n \"75\": [0, 0.68333, 0.07153, 0.05556, 0.84931],\n \"76\": [0, 0.68333, 0, 0.02778, 0.68056],\n \"77\": [0, 0.68333, 0.10903, 0.08334, 0.97014],\n \"78\": [0, 0.68333, 0.10903, 0.08334, 0.80347],\n \"79\": [0, 0.68333, 0.02778, 0.08334, 0.76278],\n \"80\": [0, 0.68333, 0.13889, 0.08334, 0.64201],\n \"81\": [0.19444, 0.68333, 0, 0.08334, 0.79056],\n \"82\": [0, 0.68333, 0.00773, 0.08334, 0.75929],\n \"83\": [0, 0.68333, 0.05764, 0.08334, 0.6132],\n \"84\": [0, 0.68333, 0.13889, 0.08334, 0.58438],\n \"85\": [0, 0.68333, 0.10903, 0.02778, 0.68278],\n \"86\": [0, 0.68333, 0.22222, 0, 0.58333],\n \"87\": [0, 0.68333, 0.13889, 0, 0.94445],\n \"88\": [0, 0.68333, 0.07847, 0.08334, 0.82847],\n \"89\": [0, 0.68333, 0.22222, 0, 0.58056],\n \"90\": [0, 0.68333, 0.07153, 0.08334, 0.68264],\n \"97\": [0, 0.43056, 0, 0, 0.52859],\n \"98\": [0, 0.69444, 0, 0, 0.42917],\n \"99\": [0, 0.43056, 0, 0.05556, 0.43276],\n \"100\": [0, 0.69444, 0, 0.16667, 0.52049],\n \"101\": [0, 0.43056, 0, 0.05556, 0.46563],\n \"102\": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],\n \"103\": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],\n \"104\": [0, 0.69444, 0, 0, 0.57616],\n \"105\": [0, 0.65952, 0, 0, 0.34451],\n \"106\": [0.19444, 0.65952, 0.05724, 0, 0.41181],\n \"107\": [0, 0.69444, 0.03148, 0, 0.5206],\n \"108\": [0, 0.69444, 0.01968, 0.08334, 0.29838],\n \"109\": [0, 0.43056, 0, 0, 0.87801],\n \"110\": [0, 0.43056, 0, 0, 0.60023],\n \"111\": [0, 0.43056, 0, 0.05556, 0.48472],\n \"112\": [0.19444, 0.43056, 0, 0.08334, 0.50313],\n \"113\": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],\n \"114\": [0, 0.43056, 0.02778, 0.05556, 0.45116],\n \"115\": [0, 0.43056, 0, 0.05556, 0.46875],\n \"116\": [0, 0.61508, 0, 0.08334, 0.36111],\n \"117\": [0, 0.43056, 0, 0.02778, 0.57246],\n \"118\": [0, 0.43056, 0.03588, 0.02778, 0.48472],\n \"119\": [0, 0.43056, 0.02691, 0.08334, 0.71592],\n \"120\": [0, 0.43056, 0, 0.02778, 0.57153],\n \"121\": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],\n \"122\": [0, 0.43056, 0.04398, 0.05556, 0.46505],\n \"160\": [0, 0, 0, 0, 0.25],\n \"915\": [0, 0.68333, 0.13889, 0.08334, 0.61528],\n \"916\": [0, 0.68333, 0, 0.16667, 0.83334],\n \"920\": [0, 0.68333, 0.02778, 0.08334, 0.76278],\n \"923\": [0, 0.68333, 0, 0.16667, 0.69445],\n \"926\": [0, 0.68333, 0.07569, 0.08334, 0.74236],\n \"928\": [0, 0.68333, 0.08125, 0.05556, 0.83125],\n \"931\": [0, 0.68333, 0.05764, 0.08334, 0.77986],\n \"933\": [0, 0.68333, 0.13889, 0.05556, 0.58333],\n \"934\": [0, 0.68333, 0, 0.08334, 0.66667],\n \"936\": [0, 0.68333, 0.11, 0.05556, 0.61222],\n \"937\": [0, 0.68333, 0.05017, 0.08334, 0.7724],\n \"945\": [0, 0.43056, 0.0037, 0.02778, 0.6397],\n \"946\": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],\n \"947\": [0.19444, 0.43056, 0.05556, 0, 0.51773],\n \"948\": [0, 0.69444, 0.03785, 0.05556, 0.44444],\n \"949\": [0, 0.43056, 0, 0.08334, 0.46632],\n \"950\": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],\n \"951\": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],\n \"952\": [0, 0.69444, 0.02778, 0.08334, 0.46944],\n \"953\": [0, 0.43056, 0, 0.05556, 0.35394],\n \"954\": [0, 0.43056, 0, 0, 0.57616],\n \"955\": [0, 0.69444, 0, 0, 0.58334],\n \"956\": [0.19444, 0.43056, 0, 0.02778, 0.60255],\n \"957\": [0, 0.43056, 0.06366, 0.02778, 0.49398],\n \"958\": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],\n \"959\": [0, 0.43056, 0, 0.05556, 0.48472],\n \"960\": [0, 0.43056, 0.03588, 0, 0.57003],\n \"961\": [0.19444, 0.43056, 0, 0.08334, 0.51702],\n \"962\": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],\n \"963\": [0, 0.43056, 0.03588, 0, 0.57141],\n \"964\": [0, 0.43056, 0.1132, 0.02778, 0.43715],\n \"965\": [0, 0.43056, 0.03588, 0.02778, 0.54028],\n \"966\": [0.19444, 0.43056, 0, 0.08334, 0.65417],\n \"967\": [0.19444, 0.43056, 0, 0.05556, 0.62569],\n \"968\": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],\n \"969\": [0, 0.43056, 0.03588, 0, 0.62245],\n \"977\": [0, 0.69444, 0, 0.08334, 0.59144],\n \"981\": [0.19444, 0.69444, 0, 0.08334, 0.59583],\n \"982\": [0, 0.43056, 0.02778, 0, 0.82813],\n \"1009\": [0.19444, 0.43056, 0, 0.08334, 0.51702],\n \"1013\": [0, 0.43056, 0, 0.05556, 0.4059],\n \"57649\": [0, 0.43056, 0, 0.02778, 0.32246],\n \"57911\": [0.19444, 0.43056, 0, 0.08334, 0.38403]\n },\n \"SansSerif-Bold\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0, 0, 0.36667],\n \"34\": [0, 0.69444, 0, 0, 0.55834],\n \"35\": [0.19444, 0.69444, 0, 0, 0.91667],\n \"36\": [0.05556, 0.75, 0, 0, 0.55],\n \"37\": [0.05556, 0.75, 0, 0, 1.02912],\n \"38\": [0, 0.69444, 0, 0, 0.83056],\n \"39\": [0, 0.69444, 0, 0, 0.30556],\n \"40\": [0.25, 0.75, 0, 0, 0.42778],\n \"41\": [0.25, 0.75, 0, 0, 0.42778],\n \"42\": [0, 0.75, 0, 0, 0.55],\n \"43\": [0.11667, 0.61667, 0, 0, 0.85556],\n \"44\": [0.10556, 0.13056, 0, 0, 0.30556],\n \"45\": [0, 0.45833, 0, 0, 0.36667],\n \"46\": [0, 0.13056, 0, 0, 0.30556],\n \"47\": [0.25, 0.75, 0, 0, 0.55],\n \"48\": [0, 0.69444, 0, 0, 0.55],\n \"49\": [0, 0.69444, 0, 0, 0.55],\n \"50\": [0, 0.69444, 0, 0, 0.55],\n \"51\": [0, 0.69444, 0, 0, 0.55],\n \"52\": [0, 0.69444, 0, 0, 0.55],\n \"53\": [0, 0.69444, 0, 0, 0.55],\n \"54\": [0, 0.69444, 0, 0, 0.55],\n \"55\": [0, 0.69444, 0, 0, 0.55],\n \"56\": [0, 0.69444, 0, 0, 0.55],\n \"57\": [0, 0.69444, 0, 0, 0.55],\n \"58\": [0, 0.45833, 0, 0, 0.30556],\n \"59\": [0.10556, 0.45833, 0, 0, 0.30556],\n \"61\": [-0.09375, 0.40625, 0, 0, 0.85556],\n \"63\": [0, 0.69444, 0, 0, 0.51945],\n \"64\": [0, 0.69444, 0, 0, 0.73334],\n \"65\": [0, 0.69444, 0, 0, 0.73334],\n \"66\": [0, 0.69444, 0, 0, 0.73334],\n \"67\": [0, 0.69444, 0, 0, 0.70278],\n \"68\": [0, 0.69444, 0, 0, 0.79445],\n \"69\": [0, 0.69444, 0, 0, 0.64167],\n \"70\": [0, 0.69444, 0, 0, 0.61111],\n \"71\": [0, 0.69444, 0, 0, 0.73334],\n \"72\": [0, 0.69444, 0, 0, 0.79445],\n \"73\": [0, 0.69444, 0, 0, 0.33056],\n \"74\": [0, 0.69444, 0, 0, 0.51945],\n \"75\": [0, 0.69444, 0, 0, 0.76389],\n \"76\": [0, 0.69444, 0, 0, 0.58056],\n \"77\": [0, 0.69444, 0, 0, 0.97778],\n \"78\": [0, 0.69444, 0, 0, 0.79445],\n \"79\": [0, 0.69444, 0, 0, 0.79445],\n \"80\": [0, 0.69444, 0, 0, 0.70278],\n \"81\": [0.10556, 0.69444, 0, 0, 0.79445],\n \"82\": [0, 0.69444, 0, 0, 0.70278],\n \"83\": [0, 0.69444, 0, 0, 0.61111],\n \"84\": [0, 0.69444, 0, 0, 0.73334],\n \"85\": [0, 0.69444, 0, 0, 0.76389],\n \"86\": [0, 0.69444, 0.01528, 0, 0.73334],\n \"87\": [0, 0.69444, 0.01528, 0, 1.03889],\n \"88\": [0, 0.69444, 0, 0, 0.73334],\n \"89\": [0, 0.69444, 0.0275, 0, 0.73334],\n \"90\": [0, 0.69444, 0, 0, 0.67223],\n \"91\": [0.25, 0.75, 0, 0, 0.34306],\n \"93\": [0.25, 0.75, 0, 0, 0.34306],\n \"94\": [0, 0.69444, 0, 0, 0.55],\n \"95\": [0.35, 0.10833, 0.03056, 0, 0.55],\n \"97\": [0, 0.45833, 0, 0, 0.525],\n \"98\": [0, 0.69444, 0, 0, 0.56111],\n \"99\": [0, 0.45833, 0, 0, 0.48889],\n \"100\": [0, 0.69444, 0, 0, 0.56111],\n \"101\": [0, 0.45833, 0, 0, 0.51111],\n \"102\": [0, 0.69444, 0.07639, 0, 0.33611],\n \"103\": [0.19444, 0.45833, 0.01528, 0, 0.55],\n \"104\": [0, 0.69444, 0, 0, 0.56111],\n \"105\": [0, 0.69444, 0, 0, 0.25556],\n \"106\": [0.19444, 0.69444, 0, 0, 0.28611],\n \"107\": [0, 0.69444, 0, 0, 0.53056],\n \"108\": [0, 0.69444, 0, 0, 0.25556],\n \"109\": [0, 0.45833, 0, 0, 0.86667],\n \"110\": [0, 0.45833, 0, 0, 0.56111],\n \"111\": [0, 0.45833, 0, 0, 0.55],\n \"112\": [0.19444, 0.45833, 0, 0, 0.56111],\n \"113\": [0.19444, 0.45833, 0, 0, 0.56111],\n \"114\": [0, 0.45833, 0.01528, 0, 0.37222],\n \"115\": [0, 0.45833, 0, 0, 0.42167],\n \"116\": [0, 0.58929, 0, 0, 0.40417],\n \"117\": [0, 0.45833, 0, 0, 0.56111],\n \"118\": [0, 0.45833, 0.01528, 0, 0.5],\n \"119\": [0, 0.45833, 0.01528, 0, 0.74445],\n \"120\": [0, 0.45833, 0, 0, 0.5],\n \"121\": [0.19444, 0.45833, 0.01528, 0, 0.5],\n \"122\": [0, 0.45833, 0, 0, 0.47639],\n \"126\": [0.35, 0.34444, 0, 0, 0.55],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.69444, 0, 0, 0.55],\n \"176\": [0, 0.69444, 0, 0, 0.73334],\n \"180\": [0, 0.69444, 0, 0, 0.55],\n \"184\": [0.17014, 0, 0, 0, 0.48889],\n \"305\": [0, 0.45833, 0, 0, 0.25556],\n \"567\": [0.19444, 0.45833, 0, 0, 0.28611],\n \"710\": [0, 0.69444, 0, 0, 0.55],\n \"711\": [0, 0.63542, 0, 0, 0.55],\n \"713\": [0, 0.63778, 0, 0, 0.55],\n \"728\": [0, 0.69444, 0, 0, 0.55],\n \"729\": [0, 0.69444, 0, 0, 0.30556],\n \"730\": [0, 0.69444, 0, 0, 0.73334],\n \"732\": [0, 0.69444, 0, 0, 0.55],\n \"733\": [0, 0.69444, 0, 0, 0.55],\n \"915\": [0, 0.69444, 0, 0, 0.58056],\n \"916\": [0, 0.69444, 0, 0, 0.91667],\n \"920\": [0, 0.69444, 0, 0, 0.85556],\n \"923\": [0, 0.69444, 0, 0, 0.67223],\n \"926\": [0, 0.69444, 0, 0, 0.73334],\n \"928\": [0, 0.69444, 0, 0, 0.79445],\n \"931\": [0, 0.69444, 0, 0, 0.79445],\n \"933\": [0, 0.69444, 0, 0, 0.85556],\n \"934\": [0, 0.69444, 0, 0, 0.79445],\n \"936\": [0, 0.69444, 0, 0, 0.85556],\n \"937\": [0, 0.69444, 0, 0, 0.79445],\n \"8211\": [0, 0.45833, 0.03056, 0, 0.55],\n \"8212\": [0, 0.45833, 0.03056, 0, 1.10001],\n \"8216\": [0, 0.69444, 0, 0, 0.30556],\n \"8217\": [0, 0.69444, 0, 0, 0.30556],\n \"8220\": [0, 0.69444, 0, 0, 0.55834],\n \"8221\": [0, 0.69444, 0, 0, 0.55834]\n },\n \"SansSerif-Italic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0.05733, 0, 0.31945],\n \"34\": [0, 0.69444, 0.00316, 0, 0.5],\n \"35\": [0.19444, 0.69444, 0.05087, 0, 0.83334],\n \"36\": [0.05556, 0.75, 0.11156, 0, 0.5],\n \"37\": [0.05556, 0.75, 0.03126, 0, 0.83334],\n \"38\": [0, 0.69444, 0.03058, 0, 0.75834],\n \"39\": [0, 0.69444, 0.07816, 0, 0.27778],\n \"40\": [0.25, 0.75, 0.13164, 0, 0.38889],\n \"41\": [0.25, 0.75, 0.02536, 0, 0.38889],\n \"42\": [0, 0.75, 0.11775, 0, 0.5],\n \"43\": [0.08333, 0.58333, 0.02536, 0, 0.77778],\n \"44\": [0.125, 0.08333, 0, 0, 0.27778],\n \"45\": [0, 0.44444, 0.01946, 0, 0.33333],\n \"46\": [0, 0.08333, 0, 0, 0.27778],\n \"47\": [0.25, 0.75, 0.13164, 0, 0.5],\n \"48\": [0, 0.65556, 0.11156, 0, 0.5],\n \"49\": [0, 0.65556, 0.11156, 0, 0.5],\n \"50\": [0, 0.65556, 0.11156, 0, 0.5],\n \"51\": [0, 0.65556, 0.11156, 0, 0.5],\n \"52\": [0, 0.65556, 0.11156, 0, 0.5],\n \"53\": [0, 0.65556, 0.11156, 0, 0.5],\n \"54\": [0, 0.65556, 0.11156, 0, 0.5],\n \"55\": [0, 0.65556, 0.11156, 0, 0.5],\n \"56\": [0, 0.65556, 0.11156, 0, 0.5],\n \"57\": [0, 0.65556, 0.11156, 0, 0.5],\n \"58\": [0, 0.44444, 0.02502, 0, 0.27778],\n \"59\": [0.125, 0.44444, 0.02502, 0, 0.27778],\n \"61\": [-0.13, 0.37, 0.05087, 0, 0.77778],\n \"63\": [0, 0.69444, 0.11809, 0, 0.47222],\n \"64\": [0, 0.69444, 0.07555, 0, 0.66667],\n \"65\": [0, 0.69444, 0, 0, 0.66667],\n \"66\": [0, 0.69444, 0.08293, 0, 0.66667],\n \"67\": [0, 0.69444, 0.11983, 0, 0.63889],\n \"68\": [0, 0.69444, 0.07555, 0, 0.72223],\n \"69\": [0, 0.69444, 0.11983, 0, 0.59722],\n \"70\": [0, 0.69444, 0.13372, 0, 0.56945],\n \"71\": [0, 0.69444, 0.11983, 0, 0.66667],\n \"72\": [0, 0.69444, 0.08094, 0, 0.70834],\n \"73\": [0, 0.69444, 0.13372, 0, 0.27778],\n \"74\": [0, 0.69444, 0.08094, 0, 0.47222],\n \"75\": [0, 0.69444, 0.11983, 0, 0.69445],\n \"76\": [0, 0.69444, 0, 0, 0.54167],\n \"77\": [0, 0.69444, 0.08094, 0, 0.875],\n \"78\": [0, 0.69444, 0.08094, 0, 0.70834],\n \"79\": [0, 0.69444, 0.07555, 0, 0.73611],\n \"80\": [0, 0.69444, 0.08293, 0, 0.63889],\n \"81\": [0.125, 0.69444, 0.07555, 0, 0.73611],\n \"82\": [0, 0.69444, 0.08293, 0, 0.64584],\n \"83\": [0, 0.69444, 0.09205, 0, 0.55556],\n \"84\": [0, 0.69444, 0.13372, 0, 0.68056],\n \"85\": [0, 0.69444, 0.08094, 0, 0.6875],\n \"86\": [0, 0.69444, 0.1615, 0, 0.66667],\n \"87\": [0, 0.69444, 0.1615, 0, 0.94445],\n \"88\": [0, 0.69444, 0.13372, 0, 0.66667],\n \"89\": [0, 0.69444, 0.17261, 0, 0.66667],\n \"90\": [0, 0.69444, 0.11983, 0, 0.61111],\n \"91\": [0.25, 0.75, 0.15942, 0, 0.28889],\n \"93\": [0.25, 0.75, 0.08719, 0, 0.28889],\n \"94\": [0, 0.69444, 0.0799, 0, 0.5],\n \"95\": [0.35, 0.09444, 0.08616, 0, 0.5],\n \"97\": [0, 0.44444, 0.00981, 0, 0.48056],\n \"98\": [0, 0.69444, 0.03057, 0, 0.51667],\n \"99\": [0, 0.44444, 0.08336, 0, 0.44445],\n \"100\": [0, 0.69444, 0.09483, 0, 0.51667],\n \"101\": [0, 0.44444, 0.06778, 0, 0.44445],\n \"102\": [0, 0.69444, 0.21705, 0, 0.30556],\n \"103\": [0.19444, 0.44444, 0.10836, 0, 0.5],\n \"104\": [0, 0.69444, 0.01778, 0, 0.51667],\n \"105\": [0, 0.67937, 0.09718, 0, 0.23889],\n \"106\": [0.19444, 0.67937, 0.09162, 0, 0.26667],\n \"107\": [0, 0.69444, 0.08336, 0, 0.48889],\n \"108\": [0, 0.69444, 0.09483, 0, 0.23889],\n \"109\": [0, 0.44444, 0.01778, 0, 0.79445],\n \"110\": [0, 0.44444, 0.01778, 0, 0.51667],\n \"111\": [0, 0.44444, 0.06613, 0, 0.5],\n \"112\": [0.19444, 0.44444, 0.0389, 0, 0.51667],\n \"113\": [0.19444, 0.44444, 0.04169, 0, 0.51667],\n \"114\": [0, 0.44444, 0.10836, 0, 0.34167],\n \"115\": [0, 0.44444, 0.0778, 0, 0.38333],\n \"116\": [0, 0.57143, 0.07225, 0, 0.36111],\n \"117\": [0, 0.44444, 0.04169, 0, 0.51667],\n \"118\": [0, 0.44444, 0.10836, 0, 0.46111],\n \"119\": [0, 0.44444, 0.10836, 0, 0.68334],\n \"120\": [0, 0.44444, 0.09169, 0, 0.46111],\n \"121\": [0.19444, 0.44444, 0.10836, 0, 0.46111],\n \"122\": [0, 0.44444, 0.08752, 0, 0.43472],\n \"126\": [0.35, 0.32659, 0.08826, 0, 0.5],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.67937, 0.06385, 0, 0.5],\n \"176\": [0, 0.69444, 0, 0, 0.73752],\n \"184\": [0.17014, 0, 0, 0, 0.44445],\n \"305\": [0, 0.44444, 0.04169, 0, 0.23889],\n \"567\": [0.19444, 0.44444, 0.04169, 0, 0.26667],\n \"710\": [0, 0.69444, 0.0799, 0, 0.5],\n \"711\": [0, 0.63194, 0.08432, 0, 0.5],\n \"713\": [0, 0.60889, 0.08776, 0, 0.5],\n \"714\": [0, 0.69444, 0.09205, 0, 0.5],\n \"715\": [0, 0.69444, 0, 0, 0.5],\n \"728\": [0, 0.69444, 0.09483, 0, 0.5],\n \"729\": [0, 0.67937, 0.07774, 0, 0.27778],\n \"730\": [0, 0.69444, 0, 0, 0.73752],\n \"732\": [0, 0.67659, 0.08826, 0, 0.5],\n \"733\": [0, 0.69444, 0.09205, 0, 0.5],\n \"915\": [0, 0.69444, 0.13372, 0, 0.54167],\n \"916\": [0, 0.69444, 0, 0, 0.83334],\n \"920\": [0, 0.69444, 0.07555, 0, 0.77778],\n \"923\": [0, 0.69444, 0, 0, 0.61111],\n \"926\": [0, 0.69444, 0.12816, 0, 0.66667],\n \"928\": [0, 0.69444, 0.08094, 0, 0.70834],\n \"931\": [0, 0.69444, 0.11983, 0, 0.72222],\n \"933\": [0, 0.69444, 0.09031, 0, 0.77778],\n \"934\": [0, 0.69444, 0.04603, 0, 0.72222],\n \"936\": [0, 0.69444, 0.09031, 0, 0.77778],\n \"937\": [0, 0.69444, 0.08293, 0, 0.72222],\n \"8211\": [0, 0.44444, 0.08616, 0, 0.5],\n \"8212\": [0, 0.44444, 0.08616, 0, 1.0],\n \"8216\": [0, 0.69444, 0.07816, 0, 0.27778],\n \"8217\": [0, 0.69444, 0.07816, 0, 0.27778],\n \"8220\": [0, 0.69444, 0.14205, 0, 0.5],\n \"8221\": [0, 0.69444, 0.00316, 0, 0.5]\n },\n \"SansSerif-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0, 0, 0.31945],\n \"34\": [0, 0.69444, 0, 0, 0.5],\n \"35\": [0.19444, 0.69444, 0, 0, 0.83334],\n \"36\": [0.05556, 0.75, 0, 0, 0.5],\n \"37\": [0.05556, 0.75, 0, 0, 0.83334],\n \"38\": [0, 0.69444, 0, 0, 0.75834],\n \"39\": [0, 0.69444, 0, 0, 0.27778],\n \"40\": [0.25, 0.75, 0, 0, 0.38889],\n \"41\": [0.25, 0.75, 0, 0, 0.38889],\n \"42\": [0, 0.75, 0, 0, 0.5],\n \"43\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"44\": [0.125, 0.08333, 0, 0, 0.27778],\n \"45\": [0, 0.44444, 0, 0, 0.33333],\n \"46\": [0, 0.08333, 0, 0, 0.27778],\n \"47\": [0.25, 0.75, 0, 0, 0.5],\n \"48\": [0, 0.65556, 0, 0, 0.5],\n \"49\": [0, 0.65556, 0, 0, 0.5],\n \"50\": [0, 0.65556, 0, 0, 0.5],\n \"51\": [0, 0.65556, 0, 0, 0.5],\n \"52\": [0, 0.65556, 0, 0, 0.5],\n \"53\": [0, 0.65556, 0, 0, 0.5],\n \"54\": [0, 0.65556, 0, 0, 0.5],\n \"55\": [0, 0.65556, 0, 0, 0.5],\n \"56\": [0, 0.65556, 0, 0, 0.5],\n \"57\": [0, 0.65556, 0, 0, 0.5],\n \"58\": [0, 0.44444, 0, 0, 0.27778],\n \"59\": [0.125, 0.44444, 0, 0, 0.27778],\n \"61\": [-0.13, 0.37, 0, 0, 0.77778],\n \"63\": [0, 0.69444, 0, 0, 0.47222],\n \"64\": [0, 0.69444, 0, 0, 0.66667],\n \"65\": [0, 0.69444, 0, 0, 0.66667],\n \"66\": [0, 0.69444, 0, 0, 0.66667],\n \"67\": [0, 0.69444, 0, 0, 0.63889],\n \"68\": [0, 0.69444, 0, 0, 0.72223],\n \"69\": [0, 0.69444, 0, 0, 0.59722],\n \"70\": [0, 0.69444, 0, 0, 0.56945],\n \"71\": [0, 0.69444, 0, 0, 0.66667],\n \"72\": [0, 0.69444, 0, 0, 0.70834],\n \"73\": [0, 0.69444, 0, 0, 0.27778],\n \"74\": [0, 0.69444, 0, 0, 0.47222],\n \"75\": [0, 0.69444, 0, 0, 0.69445],\n \"76\": [0, 0.69444, 0, 0, 0.54167],\n \"77\": [0, 0.69444, 0, 0, 0.875],\n \"78\": [0, 0.69444, 0, 0, 0.70834],\n \"79\": [0, 0.69444, 0, 0, 0.73611],\n \"80\": [0, 0.69444, 0, 0, 0.63889],\n \"81\": [0.125, 0.69444, 0, 0, 0.73611],\n \"82\": [0, 0.69444, 0, 0, 0.64584],\n \"83\": [0, 0.69444, 0, 0, 0.55556],\n \"84\": [0, 0.69444, 0, 0, 0.68056],\n \"85\": [0, 0.69444, 0, 0, 0.6875],\n \"86\": [0, 0.69444, 0.01389, 0, 0.66667],\n \"87\": [0, 0.69444, 0.01389, 0, 0.94445],\n \"88\": [0, 0.69444, 0, 0, 0.66667],\n \"89\": [0, 0.69444, 0.025, 0, 0.66667],\n \"90\": [0, 0.69444, 0, 0, 0.61111],\n \"91\": [0.25, 0.75, 0, 0, 0.28889],\n \"93\": [0.25, 0.75, 0, 0, 0.28889],\n \"94\": [0, 0.69444, 0, 0, 0.5],\n \"95\": [0.35, 0.09444, 0.02778, 0, 0.5],\n \"97\": [0, 0.44444, 0, 0, 0.48056],\n \"98\": [0, 0.69444, 0, 0, 0.51667],\n \"99\": [0, 0.44444, 0, 0, 0.44445],\n \"100\": [0, 0.69444, 0, 0, 0.51667],\n \"101\": [0, 0.44444, 0, 0, 0.44445],\n \"102\": [0, 0.69444, 0.06944, 0, 0.30556],\n \"103\": [0.19444, 0.44444, 0.01389, 0, 0.5],\n \"104\": [0, 0.69444, 0, 0, 0.51667],\n \"105\": [0, 0.67937, 0, 0, 0.23889],\n \"106\": [0.19444, 0.67937, 0, 0, 0.26667],\n \"107\": [0, 0.69444, 0, 0, 0.48889],\n \"108\": [0, 0.69444, 0, 0, 0.23889],\n \"109\": [0, 0.44444, 0, 0, 0.79445],\n \"110\": [0, 0.44444, 0, 0, 0.51667],\n \"111\": [0, 0.44444, 0, 0, 0.5],\n \"112\": [0.19444, 0.44444, 0, 0, 0.51667],\n \"113\": [0.19444, 0.44444, 0, 0, 0.51667],\n \"114\": [0, 0.44444, 0.01389, 0, 0.34167],\n \"115\": [0, 0.44444, 0, 0, 0.38333],\n \"116\": [0, 0.57143, 0, 0, 0.36111],\n \"117\": [0, 0.44444, 0, 0, 0.51667],\n \"118\": [0, 0.44444, 0.01389, 0, 0.46111],\n \"119\": [0, 0.44444, 0.01389, 0, 0.68334],\n \"120\": [0, 0.44444, 0, 0, 0.46111],\n \"121\": [0.19444, 0.44444, 0.01389, 0, 0.46111],\n \"122\": [0, 0.44444, 0, 0, 0.43472],\n \"126\": [0.35, 0.32659, 0, 0, 0.5],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.67937, 0, 0, 0.5],\n \"176\": [0, 0.69444, 0, 0, 0.66667],\n \"184\": [0.17014, 0, 0, 0, 0.44445],\n \"305\": [0, 0.44444, 0, 0, 0.23889],\n \"567\": [0.19444, 0.44444, 0, 0, 0.26667],\n \"710\": [0, 0.69444, 0, 0, 0.5],\n \"711\": [0, 0.63194, 0, 0, 0.5],\n \"713\": [0, 0.60889, 0, 0, 0.5],\n \"714\": [0, 0.69444, 0, 0, 0.5],\n \"715\": [0, 0.69444, 0, 0, 0.5],\n \"728\": [0, 0.69444, 0, 0, 0.5],\n \"729\": [0, 0.67937, 0, 0, 0.27778],\n \"730\": [0, 0.69444, 0, 0, 0.66667],\n \"732\": [0, 0.67659, 0, 0, 0.5],\n \"733\": [0, 0.69444, 0, 0, 0.5],\n \"915\": [0, 0.69444, 0, 0, 0.54167],\n \"916\": [0, 0.69444, 0, 0, 0.83334],\n \"920\": [0, 0.69444, 0, 0, 0.77778],\n \"923\": [0, 0.69444, 0, 0, 0.61111],\n \"926\": [0, 0.69444, 0, 0, 0.66667],\n \"928\": [0, 0.69444, 0, 0, 0.70834],\n \"931\": [0, 0.69444, 0, 0, 0.72222],\n \"933\": [0, 0.69444, 0, 0, 0.77778],\n \"934\": [0, 0.69444, 0, 0, 0.72222],\n \"936\": [0, 0.69444, 0, 0, 0.77778],\n \"937\": [0, 0.69444, 0, 0, 0.72222],\n \"8211\": [0, 0.44444, 0.02778, 0, 0.5],\n \"8212\": [0, 0.44444, 0.02778, 0, 1.0],\n \"8216\": [0, 0.69444, 0, 0, 0.27778],\n \"8217\": [0, 0.69444, 0, 0, 0.27778],\n \"8220\": [0, 0.69444, 0, 0, 0.5],\n \"8221\": [0, 0.69444, 0, 0, 0.5]\n },\n \"Script-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"65\": [0, 0.7, 0.22925, 0, 0.80253],\n \"66\": [0, 0.7, 0.04087, 0, 0.90757],\n \"67\": [0, 0.7, 0.1689, 0, 0.66619],\n \"68\": [0, 0.7, 0.09371, 0, 0.77443],\n \"69\": [0, 0.7, 0.18583, 0, 0.56162],\n \"70\": [0, 0.7, 0.13634, 0, 0.89544],\n \"71\": [0, 0.7, 0.17322, 0, 0.60961],\n \"72\": [0, 0.7, 0.29694, 0, 0.96919],\n \"73\": [0, 0.7, 0.19189, 0, 0.80907],\n \"74\": [0.27778, 0.7, 0.19189, 0, 1.05159],\n \"75\": [0, 0.7, 0.31259, 0, 0.91364],\n \"76\": [0, 0.7, 0.19189, 0, 0.87373],\n \"77\": [0, 0.7, 0.15981, 0, 1.08031],\n \"78\": [0, 0.7, 0.3525, 0, 0.9015],\n \"79\": [0, 0.7, 0.08078, 0, 0.73787],\n \"80\": [0, 0.7, 0.08078, 0, 1.01262],\n \"81\": [0, 0.7, 0.03305, 0, 0.88282],\n \"82\": [0, 0.7, 0.06259, 0, 0.85],\n \"83\": [0, 0.7, 0.19189, 0, 0.86767],\n \"84\": [0, 0.7, 0.29087, 0, 0.74697],\n \"85\": [0, 0.7, 0.25815, 0, 0.79996],\n \"86\": [0, 0.7, 0.27523, 0, 0.62204],\n \"87\": [0, 0.7, 0.27523, 0, 0.80532],\n \"88\": [0, 0.7, 0.26006, 0, 0.94445],\n \"89\": [0, 0.7, 0.2939, 0, 0.70961],\n \"90\": [0, 0.7, 0.24037, 0, 0.8212],\n \"160\": [0, 0, 0, 0, 0.25]\n },\n \"Size1-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"40\": [0.35001, 0.85, 0, 0, 0.45834],\n \"41\": [0.35001, 0.85, 0, 0, 0.45834],\n \"47\": [0.35001, 0.85, 0, 0, 0.57778],\n \"91\": [0.35001, 0.85, 0, 0, 0.41667],\n \"92\": [0.35001, 0.85, 0, 0, 0.57778],\n \"93\": [0.35001, 0.85, 0, 0, 0.41667],\n \"123\": [0.35001, 0.85, 0, 0, 0.58334],\n \"125\": [0.35001, 0.85, 0, 0, 0.58334],\n \"160\": [0, 0, 0, 0, 0.25],\n \"710\": [0, 0.72222, 0, 0, 0.55556],\n \"732\": [0, 0.72222, 0, 0, 0.55556],\n \"770\": [0, 0.72222, 0, 0, 0.55556],\n \"771\": [0, 0.72222, 0, 0, 0.55556],\n \"8214\": [-0.00099, 0.601, 0, 0, 0.77778],\n \"8593\": [1e-05, 0.6, 0, 0, 0.66667],\n \"8595\": [1e-05, 0.6, 0, 0, 0.66667],\n \"8657\": [1e-05, 0.6, 0, 0, 0.77778],\n \"8659\": [1e-05, 0.6, 0, 0, 0.77778],\n \"8719\": [0.25001, 0.75, 0, 0, 0.94445],\n \"8720\": [0.25001, 0.75, 0, 0, 0.94445],\n \"8721\": [0.25001, 0.75, 0, 0, 1.05556],\n \"8730\": [0.35001, 0.85, 0, 0, 1.0],\n \"8739\": [-0.00599, 0.606, 0, 0, 0.33333],\n \"8741\": [-0.00599, 0.606, 0, 0, 0.55556],\n \"8747\": [0.30612, 0.805, 0.19445, 0, 0.47222],\n \"8748\": [0.306, 0.805, 0.19445, 0, 0.47222],\n \"8749\": [0.306, 0.805, 0.19445, 0, 0.47222],\n \"8750\": [0.30612, 0.805, 0.19445, 0, 0.47222],\n \"8896\": [0.25001, 0.75, 0, 0, 0.83334],\n \"8897\": [0.25001, 0.75, 0, 0, 0.83334],\n \"8898\": [0.25001, 0.75, 0, 0, 0.83334],\n \"8899\": [0.25001, 0.75, 0, 0, 0.83334],\n \"8968\": [0.35001, 0.85, 0, 0, 0.47222],\n \"8969\": [0.35001, 0.85, 0, 0, 0.47222],\n \"8970\": [0.35001, 0.85, 0, 0, 0.47222],\n \"8971\": [0.35001, 0.85, 0, 0, 0.47222],\n \"9168\": [-0.00099, 0.601, 0, 0, 0.66667],\n \"10216\": [0.35001, 0.85, 0, 0, 0.47222],\n \"10217\": [0.35001, 0.85, 0, 0, 0.47222],\n \"10752\": [0.25001, 0.75, 0, 0, 1.11111],\n \"10753\": [0.25001, 0.75, 0, 0, 1.11111],\n \"10754\": [0.25001, 0.75, 0, 0, 1.11111],\n \"10756\": [0.25001, 0.75, 0, 0, 0.83334],\n \"10758\": [0.25001, 0.75, 0, 0, 0.83334]\n },\n \"Size2-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"40\": [0.65002, 1.15, 0, 0, 0.59722],\n \"41\": [0.65002, 1.15, 0, 0, 0.59722],\n \"47\": [0.65002, 1.15, 0, 0, 0.81111],\n \"91\": [0.65002, 1.15, 0, 0, 0.47222],\n \"92\": [0.65002, 1.15, 0, 0, 0.81111],\n \"93\": [0.65002, 1.15, 0, 0, 0.47222],\n \"123\": [0.65002, 1.15, 0, 0, 0.66667],\n \"125\": [0.65002, 1.15, 0, 0, 0.66667],\n \"160\": [0, 0, 0, 0, 0.25],\n \"710\": [0, 0.75, 0, 0, 1.0],\n \"732\": [0, 0.75, 0, 0, 1.0],\n \"770\": [0, 0.75, 0, 0, 1.0],\n \"771\": [0, 0.75, 0, 0, 1.0],\n \"8719\": [0.55001, 1.05, 0, 0, 1.27778],\n \"8720\": [0.55001, 1.05, 0, 0, 1.27778],\n \"8721\": [0.55001, 1.05, 0, 0, 1.44445],\n \"8730\": [0.65002, 1.15, 0, 0, 1.0],\n \"8747\": [0.86225, 1.36, 0.44445, 0, 0.55556],\n \"8748\": [0.862, 1.36, 0.44445, 0, 0.55556],\n \"8749\": [0.862, 1.36, 0.44445, 0, 0.55556],\n \"8750\": [0.86225, 1.36, 0.44445, 0, 0.55556],\n \"8896\": [0.55001, 1.05, 0, 0, 1.11111],\n \"8897\": [0.55001, 1.05, 0, 0, 1.11111],\n \"8898\": [0.55001, 1.05, 0, 0, 1.11111],\n \"8899\": [0.55001, 1.05, 0, 0, 1.11111],\n \"8968\": [0.65002, 1.15, 0, 0, 0.52778],\n \"8969\": [0.65002, 1.15, 0, 0, 0.52778],\n \"8970\": [0.65002, 1.15, 0, 0, 0.52778],\n \"8971\": [0.65002, 1.15, 0, 0, 0.52778],\n \"10216\": [0.65002, 1.15, 0, 0, 0.61111],\n \"10217\": [0.65002, 1.15, 0, 0, 0.61111],\n \"10752\": [0.55001, 1.05, 0, 0, 1.51112],\n \"10753\": [0.55001, 1.05, 0, 0, 1.51112],\n \"10754\": [0.55001, 1.05, 0, 0, 1.51112],\n \"10756\": [0.55001, 1.05, 0, 0, 1.11111],\n \"10758\": [0.55001, 1.05, 0, 0, 1.11111]\n },\n \"Size3-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"40\": [0.95003, 1.45, 0, 0, 0.73611],\n \"41\": [0.95003, 1.45, 0, 0, 0.73611],\n \"47\": [0.95003, 1.45, 0, 0, 1.04445],\n \"91\": [0.95003, 1.45, 0, 0, 0.52778],\n \"92\": [0.95003, 1.45, 0, 0, 1.04445],\n \"93\": [0.95003, 1.45, 0, 0, 0.52778],\n \"123\": [0.95003, 1.45, 0, 0, 0.75],\n \"125\": [0.95003, 1.45, 0, 0, 0.75],\n \"160\": [0, 0, 0, 0, 0.25],\n \"710\": [0, 0.75, 0, 0, 1.44445],\n \"732\": [0, 0.75, 0, 0, 1.44445],\n \"770\": [0, 0.75, 0, 0, 1.44445],\n \"771\": [0, 0.75, 0, 0, 1.44445],\n \"8730\": [0.95003, 1.45, 0, 0, 1.0],\n \"8968\": [0.95003, 1.45, 0, 0, 0.58334],\n \"8969\": [0.95003, 1.45, 0, 0, 0.58334],\n \"8970\": [0.95003, 1.45, 0, 0, 0.58334],\n \"8971\": [0.95003, 1.45, 0, 0, 0.58334],\n \"10216\": [0.95003, 1.45, 0, 0, 0.75],\n \"10217\": [0.95003, 1.45, 0, 0, 0.75]\n },\n \"Size4-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"40\": [1.25003, 1.75, 0, 0, 0.79167],\n \"41\": [1.25003, 1.75, 0, 0, 0.79167],\n \"47\": [1.25003, 1.75, 0, 0, 1.27778],\n \"91\": [1.25003, 1.75, 0, 0, 0.58334],\n \"92\": [1.25003, 1.75, 0, 0, 1.27778],\n \"93\": [1.25003, 1.75, 0, 0, 0.58334],\n \"123\": [1.25003, 1.75, 0, 0, 0.80556],\n \"125\": [1.25003, 1.75, 0, 0, 0.80556],\n \"160\": [0, 0, 0, 0, 0.25],\n \"710\": [0, 0.825, 0, 0, 1.8889],\n \"732\": [0, 0.825, 0, 0, 1.8889],\n \"770\": [0, 0.825, 0, 0, 1.8889],\n \"771\": [0, 0.825, 0, 0, 1.8889],\n \"8730\": [1.25003, 1.75, 0, 0, 1.0],\n \"8968\": [1.25003, 1.75, 0, 0, 0.63889],\n \"8969\": [1.25003, 1.75, 0, 0, 0.63889],\n \"8970\": [1.25003, 1.75, 0, 0, 0.63889],\n \"8971\": [1.25003, 1.75, 0, 0, 0.63889],\n \"9115\": [0.64502, 1.155, 0, 0, 0.875],\n \"9116\": [1e-05, 0.6, 0, 0, 0.875],\n \"9117\": [0.64502, 1.155, 0, 0, 0.875],\n \"9118\": [0.64502, 1.155, 0, 0, 0.875],\n \"9119\": [1e-05, 0.6, 0, 0, 0.875],\n \"9120\": [0.64502, 1.155, 0, 0, 0.875],\n \"9121\": [0.64502, 1.155, 0, 0, 0.66667],\n \"9122\": [-0.00099, 0.601, 0, 0, 0.66667],\n \"9123\": [0.64502, 1.155, 0, 0, 0.66667],\n \"9124\": [0.64502, 1.155, 0, 0, 0.66667],\n \"9125\": [-0.00099, 0.601, 0, 0, 0.66667],\n \"9126\": [0.64502, 1.155, 0, 0, 0.66667],\n \"9127\": [1e-05, 0.9, 0, 0, 0.88889],\n \"9128\": [0.65002, 1.15, 0, 0, 0.88889],\n \"9129\": [0.90001, 0, 0, 0, 0.88889],\n \"9130\": [0, 0.3, 0, 0, 0.88889],\n \"9131\": [1e-05, 0.9, 0, 0, 0.88889],\n \"9132\": [0.65002, 1.15, 0, 0, 0.88889],\n \"9133\": [0.90001, 0, 0, 0, 0.88889],\n \"9143\": [0.88502, 0.915, 0, 0, 1.05556],\n \"10216\": [1.25003, 1.75, 0, 0, 0.80556],\n \"10217\": [1.25003, 1.75, 0, 0, 0.80556],\n \"57344\": [-0.00499, 0.605, 0, 0, 1.05556],\n \"57345\": [-0.00499, 0.605, 0, 0, 1.05556],\n \"57680\": [0, 0.12, 0, 0, 0.45],\n \"57681\": [0, 0.12, 0, 0, 0.45],\n \"57682\": [0, 0.12, 0, 0, 0.45],\n \"57683\": [0, 0.12, 0, 0, 0.45]\n },\n \"Typewriter-Regular\": {\n \"32\": [0, 0, 0, 0, 0.525],\n \"33\": [0, 0.61111, 0, 0, 0.525],\n \"34\": [0, 0.61111, 0, 0, 0.525],\n \"35\": [0, 0.61111, 0, 0, 0.525],\n \"36\": [0.08333, 0.69444, 0, 0, 0.525],\n \"37\": [0.08333, 0.69444, 0, 0, 0.525],\n \"38\": [0, 0.61111, 0, 0, 0.525],\n \"39\": [0, 0.61111, 0, 0, 0.525],\n \"40\": [0.08333, 0.69444, 0, 0, 0.525],\n \"41\": [0.08333, 0.69444, 0, 0, 0.525],\n \"42\": [0, 0.52083, 0, 0, 0.525],\n \"43\": [-0.08056, 0.53055, 0, 0, 0.525],\n \"44\": [0.13889, 0.125, 0, 0, 0.525],\n \"45\": [-0.08056, 0.53055, 0, 0, 0.525],\n \"46\": [0, 0.125, 0, 0, 0.525],\n \"47\": [0.08333, 0.69444, 0, 0, 0.525],\n \"48\": [0, 0.61111, 0, 0, 0.525],\n \"49\": [0, 0.61111, 0, 0, 0.525],\n \"50\": [0, 0.61111, 0, 0, 0.525],\n \"51\": [0, 0.61111, 0, 0, 0.525],\n \"52\": [0, 0.61111, 0, 0, 0.525],\n \"53\": [0, 0.61111, 0, 0, 0.525],\n \"54\": [0, 0.61111, 0, 0, 0.525],\n \"55\": [0, 0.61111, 0, 0, 0.525],\n \"56\": [0, 0.61111, 0, 0, 0.525],\n \"57\": [0, 0.61111, 0, 0, 0.525],\n \"58\": [0, 0.43056, 0, 0, 0.525],\n \"59\": [0.13889, 0.43056, 0, 0, 0.525],\n \"60\": [-0.05556, 0.55556, 0, 0, 0.525],\n \"61\": [-0.19549, 0.41562, 0, 0, 0.525],\n \"62\": [-0.05556, 0.55556, 0, 0, 0.525],\n \"63\": [0, 0.61111, 0, 0, 0.525],\n \"64\": [0, 0.61111, 0, 0, 0.525],\n \"65\": [0, 0.61111, 0, 0, 0.525],\n \"66\": [0, 0.61111, 0, 0, 0.525],\n \"67\": [0, 0.61111, 0, 0, 0.525],\n \"68\": [0, 0.61111, 0, 0, 0.525],\n \"69\": [0, 0.61111, 0, 0, 0.525],\n \"70\": [0, 0.61111, 0, 0, 0.525],\n \"71\": [0, 0.61111, 0, 0, 0.525],\n \"72\": [0, 0.61111, 0, 0, 0.525],\n \"73\": [0, 0.61111, 0, 0, 0.525],\n \"74\": [0, 0.61111, 0, 0, 0.525],\n \"75\": [0, 0.61111, 0, 0, 0.525],\n \"76\": [0, 0.61111, 0, 0, 0.525],\n \"77\": [0, 0.61111, 0, 0, 0.525],\n \"78\": [0, 0.61111, 0, 0, 0.525],\n \"79\": [0, 0.61111, 0, 0, 0.525],\n \"80\": [0, 0.61111, 0, 0, 0.525],\n \"81\": [0.13889, 0.61111, 0, 0, 0.525],\n \"82\": [0, 0.61111, 0, 0, 0.525],\n \"83\": [0, 0.61111, 0, 0, 0.525],\n \"84\": [0, 0.61111, 0, 0, 0.525],\n \"85\": [0, 0.61111, 0, 0, 0.525],\n \"86\": [0, 0.61111, 0, 0, 0.525],\n \"87\": [0, 0.61111, 0, 0, 0.525],\n \"88\": [0, 0.61111, 0, 0, 0.525],\n \"89\": [0, 0.61111, 0, 0, 0.525],\n \"90\": [0, 0.61111, 0, 0, 0.525],\n \"91\": [0.08333, 0.69444, 0, 0, 0.525],\n \"92\": [0.08333, 0.69444, 0, 0, 0.525],\n \"93\": [0.08333, 0.69444, 0, 0, 0.525],\n \"94\": [0, 0.61111, 0, 0, 0.525],\n \"95\": [0.09514, 0, 0, 0, 0.525],\n \"96\": [0, 0.61111, 0, 0, 0.525],\n \"97\": [0, 0.43056, 0, 0, 0.525],\n \"98\": [0, 0.61111, 0, 0, 0.525],\n \"99\": [0, 0.43056, 0, 0, 0.525],\n \"100\": [0, 0.61111, 0, 0, 0.525],\n \"101\": [0, 0.43056, 0, 0, 0.525],\n \"102\": [0, 0.61111, 0, 0, 0.525],\n \"103\": [0.22222, 0.43056, 0, 0, 0.525],\n \"104\": [0, 0.61111, 0, 0, 0.525],\n \"105\": [0, 0.61111, 0, 0, 0.525],\n \"106\": [0.22222, 0.61111, 0, 0, 0.525],\n \"107\": [0, 0.61111, 0, 0, 0.525],\n \"108\": [0, 0.61111, 0, 0, 0.525],\n \"109\": [0, 0.43056, 0, 0, 0.525],\n \"110\": [0, 0.43056, 0, 0, 0.525],\n \"111\": [0, 0.43056, 0, 0, 0.525],\n \"112\": [0.22222, 0.43056, 0, 0, 0.525],\n \"113\": [0.22222, 0.43056, 0, 0, 0.525],\n \"114\": [0, 0.43056, 0, 0, 0.525],\n \"115\": [0, 0.43056, 0, 0, 0.525],\n \"116\": [0, 0.55358, 0, 0, 0.525],\n \"117\": [0, 0.43056, 0, 0, 0.525],\n \"118\": [0, 0.43056, 0, 0, 0.525],\n \"119\": [0, 0.43056, 0, 0, 0.525],\n \"120\": [0, 0.43056, 0, 0, 0.525],\n \"121\": [0.22222, 0.43056, 0, 0, 0.525],\n \"122\": [0, 0.43056, 0, 0, 0.525],\n \"123\": [0.08333, 0.69444, 0, 0, 0.525],\n \"124\": [0.08333, 0.69444, 0, 0, 0.525],\n \"125\": [0.08333, 0.69444, 0, 0, 0.525],\n \"126\": [0, 0.61111, 0, 0, 0.525],\n \"127\": [0, 0.61111, 0, 0, 0.525],\n \"160\": [0, 0, 0, 0, 0.525],\n \"176\": [0, 0.61111, 0, 0, 0.525],\n \"184\": [0.19445, 0, 0, 0, 0.525],\n \"305\": [0, 0.43056, 0, 0, 0.525],\n \"567\": [0.22222, 0.43056, 0, 0, 0.525],\n \"711\": [0, 0.56597, 0, 0, 0.525],\n \"713\": [0, 0.56555, 0, 0, 0.525],\n \"714\": [0, 0.61111, 0, 0, 0.525],\n \"715\": [0, 0.61111, 0, 0, 0.525],\n \"728\": [0, 0.61111, 0, 0, 0.525],\n \"730\": [0, 0.61111, 0, 0, 0.525],\n \"770\": [0, 0.61111, 0, 0, 0.525],\n \"771\": [0, 0.61111, 0, 0, 0.525],\n \"776\": [0, 0.61111, 0, 0, 0.525],\n \"915\": [0, 0.61111, 0, 0, 0.525],\n \"916\": [0, 0.61111, 0, 0, 0.525],\n \"920\": [0, 0.61111, 0, 0, 0.525],\n \"923\": [0, 0.61111, 0, 0, 0.525],\n \"926\": [0, 0.61111, 0, 0, 0.525],\n \"928\": [0, 0.61111, 0, 0, 0.525],\n \"931\": [0, 0.61111, 0, 0, 0.525],\n \"933\": [0, 0.61111, 0, 0, 0.525],\n \"934\": [0, 0.61111, 0, 0, 0.525],\n \"936\": [0, 0.61111, 0, 0, 0.525],\n \"937\": [0, 0.61111, 0, 0, 0.525],\n \"8216\": [0, 0.61111, 0, 0, 0.525],\n \"8217\": [0, 0.61111, 0, 0, 0.525],\n \"8242\": [0, 0.61111, 0, 0, 0.525],\n \"9251\": [0.11111, 0.21944, 0, 0, 0.525]\n }\n};\n\n/**\n * This file contains metrics regarding fonts and individual symbols. The sigma\n * and xi variables, as well as the metricMap map contain data extracted from\n * TeX, TeX font metrics, and the TTF files. These data are then exposed via the\n * `metrics` variable and the getCharacterMetrics function.\n */\n// In TeX, there are actually three sets of dimensions, one for each of\n// textstyle (size index 5 and higher: >=9pt), scriptstyle (size index 3 and 4:\n// 7-8pt), and scriptscriptstyle (size index 1 and 2: 5-6pt). These are\n// provided in the arrays below, in that order.\n//\n// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respectively.\n// This was determined by running the following script:\n//\n// latex -interaction=nonstopmode \\\n// '\\documentclass{article}\\usepackage{amsmath}\\begin{document}' \\\n// '$a$ \\expandafter\\show\\the\\textfont2' \\\n// '\\expandafter\\show\\the\\scriptfont2' \\\n// '\\expandafter\\show\\the\\scriptscriptfont2' \\\n// '\\stop'\n//\n// The metrics themselves were retrieved using the following commands:\n//\n// tftopl cmsy10\n// tftopl cmsy7\n// tftopl cmsy5\n//\n// The output of each of these commands is quite lengthy. The only part we\n// care about is the FONTDIMEN section. Each value is measured in EMs.\nvar sigmasAndXis = {\n slant: [0.250, 0.250, 0.250],\n // sigma1\n space: [0.000, 0.000, 0.000],\n // sigma2\n stretch: [0.000, 0.000, 0.000],\n // sigma3\n shrink: [0.000, 0.000, 0.000],\n // sigma4\n xHeight: [0.431, 0.431, 0.431],\n // sigma5\n quad: [1.000, 1.171, 1.472],\n // sigma6\n extraSpace: [0.000, 0.000, 0.000],\n // sigma7\n num1: [0.677, 0.732, 0.925],\n // sigma8\n num2: [0.394, 0.384, 0.387],\n // sigma9\n num3: [0.444, 0.471, 0.504],\n // sigma10\n denom1: [0.686, 0.752, 1.025],\n // sigma11\n denom2: [0.345, 0.344, 0.532],\n // sigma12\n sup1: [0.413, 0.503, 0.504],\n // sigma13\n sup2: [0.363, 0.431, 0.404],\n // sigma14\n sup3: [0.289, 0.286, 0.294],\n // sigma15\n sub1: [0.150, 0.143, 0.200],\n // sigma16\n sub2: [0.247, 0.286, 0.400],\n // sigma17\n supDrop: [0.386, 0.353, 0.494],\n // sigma18\n subDrop: [0.050, 0.071, 0.100],\n // sigma19\n delim1: [2.390, 1.700, 1.980],\n // sigma20\n delim2: [1.010, 1.157, 1.420],\n // sigma21\n axisHeight: [0.250, 0.250, 0.250],\n // sigma22\n // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;\n // they correspond to the font parameters of the extension fonts (family 3).\n // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to\n // match cmex7, we'd use cmex7.tfm values for script and scriptscript\n // values.\n defaultRuleThickness: [0.04, 0.049, 0.049],\n // xi8; cmex7: 0.049\n bigOpSpacing1: [0.111, 0.111, 0.111],\n // xi9\n bigOpSpacing2: [0.166, 0.166, 0.166],\n // xi10\n bigOpSpacing3: [0.2, 0.2, 0.2],\n // xi11\n bigOpSpacing4: [0.6, 0.611, 0.611],\n // xi12; cmex7: 0.611\n bigOpSpacing5: [0.1, 0.143, 0.143],\n // xi13; cmex7: 0.143\n // The \\sqrt rule width is taken from the height of the surd character.\n // Since we use the same font at all sizes, this thickness doesn't scale.\n sqrtRuleThickness: [0.04, 0.04, 0.04],\n // This value determines how large a pt is, for metrics which are defined\n // in terms of pts.\n // This value is also used in katex.scss; if you change it make sure the\n // values match.\n ptPerEm: [10.0, 10.0, 10.0],\n // The space between adjacent `|` columns in an array definition. From\n // `\\showthe\\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.\n doubleRuleSep: [0.2, 0.2, 0.2],\n // The width of separator lines in {array} environments. From\n // `\\showthe\\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm.\n arrayRuleWidth: [0.04, 0.04, 0.04],\n // Two values from LaTeX source2e:\n fboxsep: [0.3, 0.3, 0.3],\n // 3 pt / ptPerEm\n fboxrule: [0.04, 0.04, 0.04] // 0.4 pt / ptPerEm\n\n}; // This map contains a mapping from font name and character code to character\n// should have Latin-1 and Cyrillic characters, but may not depending on the\n// operating system. The metrics do not account for extra height from the\n// accents. In the case of Cyrillic characters which have both ascenders and\n// descenders we prefer approximations with ascenders, primarily to prevent\n// the fraction bar or root line from intersecting the glyph.\n// TODO(kevinb) allow union of multiple glyph metrics for better accuracy.\n\nvar extraCharacterMap = {\n // Latin-1\n '\u00C5': 'A',\n '\u00D0': 'D',\n '\u00DE': 'o',\n '\u00E5': 'a',\n '\u00F0': 'd',\n '\u00FE': 'o',\n // Cyrillic\n '\u0410': 'A',\n '\u0411': 'B',\n '\u0412': 'B',\n '\u0413': 'F',\n '\u0414': 'A',\n '\u0415': 'E',\n '\u0416': 'K',\n '\u0417': '3',\n '\u0418': 'N',\n '\u0419': 'N',\n '\u041A': 'K',\n '\u041B': 'N',\n '\u041C': 'M',\n '\u041D': 'H',\n '\u041E': 'O',\n '\u041F': 'N',\n '\u0420': 'P',\n '\u0421': 'C',\n '\u0422': 'T',\n '\u0423': 'y',\n '\u0424': 'O',\n '\u0425': 'X',\n '\u0426': 'U',\n '\u0427': 'h',\n '\u0428': 'W',\n '\u0429': 'W',\n '\u042A': 'B',\n '\u042B': 'X',\n '\u042C': 'B',\n '\u042D': '3',\n '\u042E': 'X',\n '\u042F': 'R',\n '\u0430': 'a',\n '\u0431': 'b',\n '\u0432': 'a',\n '\u0433': 'r',\n '\u0434': 'y',\n '\u0435': 'e',\n '\u0436': 'm',\n '\u0437': 'e',\n '\u0438': 'n',\n '\u0439': 'n',\n '\u043A': 'n',\n '\u043B': 'n',\n '\u043C': 'm',\n '\u043D': 'n',\n '\u043E': 'o',\n '\u043F': 'n',\n '\u0440': 'p',\n '\u0441': 'c',\n '\u0442': 'o',\n '\u0443': 'y',\n '\u0444': 'b',\n '\u0445': 'x',\n '\u0446': 'n',\n '\u0447': 'n',\n '\u0448': 'w',\n '\u0449': 'w',\n '\u044A': 'a',\n '\u044B': 'm',\n '\u044C': 'a',\n '\u044D': 'e',\n '\u044E': 'm',\n '\u044F': 'r'\n};\n\n/**\n * This function adds new font metrics to default metricMap\n * It can also override existing metrics\n */\nfunction setFontMetrics(fontName, metrics) {\n fontMetricsData[fontName] = metrics;\n}\n/**\n * This function is a convenience function for looking up information in the\n * metricMap table. It takes a character as a string, and a font.\n *\n * Note: the `width` property may be undefined if fontMetricsData.js wasn't\n * built using `Make extended_metrics`.\n */\n\nfunction getCharacterMetrics(character, font, mode) {\n if (!fontMetricsData[font]) {\n throw new Error(\"Font metrics not found for font: \" + font + \".\");\n }\n\n var ch = character.charCodeAt(0);\n var metrics = fontMetricsData[font][ch];\n\n if (!metrics && character[0] in extraCharacterMap) {\n ch = extraCharacterMap[character[0]].charCodeAt(0);\n metrics = fontMetricsData[font][ch];\n }\n\n if (!metrics && mode === 'text') {\n // We don't typically have font metrics for Asian scripts.\n // But since we support them in text mode, we need to return\n // some sort of metrics.\n // So if the character is in a script we support but we\n // don't have metrics for it, just use the metrics for\n // the Latin capital letter M. This is close enough because\n // we (currently) only care about the height of the glyph\n // not its width.\n if (supportedCodepoint(ch)) {\n metrics = fontMetricsData[font][77]; // 77 is the charcode for 'M'\n }\n }\n\n if (metrics) {\n return {\n depth: metrics[0],\n height: metrics[1],\n italic: metrics[2],\n skew: metrics[3],\n width: metrics[4]\n };\n }\n}\nvar fontMetricsBySizeIndex = {};\n/**\n * Get the font metrics for a given size.\n */\n\nfunction getGlobalMetrics(size) {\n var sizeIndex;\n\n if (size >= 5) {\n sizeIndex = 0;\n } else if (size >= 3) {\n sizeIndex = 1;\n } else {\n sizeIndex = 2;\n }\n\n if (!fontMetricsBySizeIndex[sizeIndex]) {\n var metrics = fontMetricsBySizeIndex[sizeIndex] = {\n cssEmPerMu: sigmasAndXis.quad[sizeIndex] / 18\n };\n\n for (var key in sigmasAndXis) {\n if (sigmasAndXis.hasOwnProperty(key)) {\n metrics[key] = sigmasAndXis[key][sizeIndex];\n }\n }\n }\n\n return fontMetricsBySizeIndex[sizeIndex];\n}\n\n/**\n * This file contains information about the options that the Parser carries\n * around with it while parsing. Data is held in an `Options` object, and when\n * recursing, a new `Options` object can be created with the `.with*` and\n * `.reset` functions.\n */\nvar sizeStyleMap = [// Each element contains [textsize, scriptsize, scriptscriptsize].\n// The size mappings are taken from TeX with \\normalsize=10pt.\n[1, 1, 1], // size1: [5, 5, 5] \\tiny\n[2, 1, 1], // size2: [6, 5, 5]\n[3, 1, 1], // size3: [7, 5, 5] \\scriptsize\n[4, 2, 1], // size4: [8, 6, 5] \\footnotesize\n[5, 2, 1], // size5: [9, 6, 5] \\small\n[6, 3, 1], // size6: [10, 7, 5] \\normalsize\n[7, 4, 2], // size7: [12, 8, 6] \\large\n[8, 6, 3], // size8: [14.4, 10, 7] \\Large\n[9, 7, 6], // size9: [17.28, 12, 10] \\LARGE\n[10, 8, 7], // size10: [20.74, 14.4, 12] \\huge\n[11, 10, 9] // size11: [24.88, 20.74, 17.28] \\HUGE\n];\nvar sizeMultipliers = [// fontMetrics.js:getGlobalMetrics also uses size indexes, so if\n// you change size indexes, change that function.\n0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.44, 1.728, 2.074, 2.488];\n\nvar sizeAtStyle = function sizeAtStyle(size, style) {\n return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];\n}; // In these types, \"\" (empty string) means \"no change\".\n\n\n/**\n * This is the main options class. It contains the current style, size, color,\n * and font.\n *\n * Options objects should not be modified. To create a new Options with\n * different properties, call a `.having*` method.\n */\nclass Options {\n // A font family applies to a group of fonts (i.e. SansSerif), while a font\n // represents a specific font (i.e. SansSerif Bold).\n // See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm\n\n /**\n * The base size index.\n */\n constructor(data) {\n this.style = void 0;\n this.color = void 0;\n this.size = void 0;\n this.textSize = void 0;\n this.phantom = void 0;\n this.font = void 0;\n this.fontFamily = void 0;\n this.fontWeight = void 0;\n this.fontShape = void 0;\n this.sizeMultiplier = void 0;\n this.maxSize = void 0;\n this.minRuleThickness = void 0;\n this._fontMetrics = void 0;\n this.style = data.style;\n this.color = data.color;\n this.size = data.size || Options.BASESIZE;\n this.textSize = data.textSize || this.size;\n this.phantom = !!data.phantom;\n this.font = data.font || \"\";\n this.fontFamily = data.fontFamily || \"\";\n this.fontWeight = data.fontWeight || '';\n this.fontShape = data.fontShape || '';\n this.sizeMultiplier = sizeMultipliers[this.size - 1];\n this.maxSize = data.maxSize;\n this.minRuleThickness = data.minRuleThickness;\n this._fontMetrics = undefined;\n }\n /**\n * Returns a new options object with the same properties as \"this\". Properties\n * from \"extension\" will be copied to the new options object.\n */\n\n\n extend(extension) {\n var data = {\n style: this.style,\n size: this.size,\n textSize: this.textSize,\n color: this.color,\n phantom: this.phantom,\n font: this.font,\n fontFamily: this.fontFamily,\n fontWeight: this.fontWeight,\n fontShape: this.fontShape,\n maxSize: this.maxSize,\n minRuleThickness: this.minRuleThickness\n };\n\n for (var key in extension) {\n if (extension.hasOwnProperty(key)) {\n data[key] = extension[key];\n }\n }\n\n return new Options(data);\n }\n /**\n * Return an options object with the given style. If `this.style === style`,\n * returns `this`.\n */\n\n\n havingStyle(style) {\n if (this.style === style) {\n return this;\n } else {\n return this.extend({\n style: style,\n size: sizeAtStyle(this.textSize, style)\n });\n }\n }\n /**\n * Return an options object with a cramped version of the current style. If\n * the current style is cramped, returns `this`.\n */\n\n\n havingCrampedStyle() {\n return this.havingStyle(this.style.cramp());\n }\n /**\n * Return an options object with the given size and in at least `\\textstyle`.\n * Returns `this` if appropriate.\n */\n\n\n havingSize(size) {\n if (this.size === size && this.textSize === size) {\n return this;\n } else {\n return this.extend({\n style: this.style.text(),\n size: size,\n textSize: size,\n sizeMultiplier: sizeMultipliers[size - 1]\n });\n }\n }\n /**\n * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,\n * changes to at least `\\textstyle`.\n */\n\n\n havingBaseStyle(style) {\n style = style || this.style.text();\n var wantSize = sizeAtStyle(Options.BASESIZE, style);\n\n if (this.size === wantSize && this.textSize === Options.BASESIZE && this.style === style) {\n return this;\n } else {\n return this.extend({\n style: style,\n size: wantSize\n });\n }\n }\n /**\n * Remove the effect of sizing changes such as \\Huge.\n * Keep the effect of the current style, such as \\scriptstyle.\n */\n\n\n havingBaseSizing() {\n var size;\n\n switch (this.style.id) {\n case 4:\n case 5:\n size = 3; // normalsize in scriptstyle\n\n break;\n\n case 6:\n case 7:\n size = 1; // normalsize in scriptscriptstyle\n\n break;\n\n default:\n size = 6;\n // normalsize in textstyle or displaystyle\n }\n\n return this.extend({\n style: this.style.text(),\n size: size\n });\n }\n /**\n * Create a new options object with the given color.\n */\n\n\n withColor(color) {\n return this.extend({\n color: color\n });\n }\n /**\n * Create a new options object with \"phantom\" set to true.\n */\n\n\n withPhantom() {\n return this.extend({\n phantom: true\n });\n }\n /**\n * Creates a new options object with the given math font or old text font.\n * @type {[type]}\n */\n\n\n withFont(font) {\n return this.extend({\n font\n });\n }\n /**\n * Create a new options objects with the given fontFamily.\n */\n\n\n withTextFontFamily(fontFamily) {\n return this.extend({\n fontFamily,\n font: \"\"\n });\n }\n /**\n * Creates a new options object with the given font weight\n */\n\n\n withTextFontWeight(fontWeight) {\n return this.extend({\n fontWeight,\n font: \"\"\n });\n }\n /**\n * Creates a new options object with the given font weight\n */\n\n\n withTextFontShape(fontShape) {\n return this.extend({\n fontShape,\n font: \"\"\n });\n }\n /**\n * Return the CSS sizing classes required to switch from enclosing options\n * `oldOptions` to `this`. Returns an array of classes.\n */\n\n\n sizingClasses(oldOptions) {\n if (oldOptions.size !== this.size) {\n return [\"sizing\", \"reset-size\" + oldOptions.size, \"size\" + this.size];\n } else {\n return [];\n }\n }\n /**\n * Return the CSS sizing classes required to switch to the base size. Like\n * `this.havingSize(BASESIZE).sizingClasses(this)`.\n */\n\n\n baseSizingClasses() {\n if (this.size !== Options.BASESIZE) {\n return [\"sizing\", \"reset-size\" + this.size, \"size\" + Options.BASESIZE];\n } else {\n return [];\n }\n }\n /**\n * Return the font metrics for this size.\n */\n\n\n fontMetrics() {\n if (!this._fontMetrics) {\n this._fontMetrics = getGlobalMetrics(this.size);\n }\n\n return this._fontMetrics;\n }\n /**\n * Gets the CSS color of the current options object\n */\n\n\n getColor() {\n if (this.phantom) {\n return \"transparent\";\n } else {\n return this.color;\n }\n }\n\n}\n\nOptions.BASESIZE = 6;\n\n/**\n * This file does conversion between units. In particular, it provides\n * calculateSize to convert other units into ems.\n */\n// Thus, multiplying a length by this number converts the length from units\n// into pts. Dividing the result by ptPerEm gives the number of ems\n// *assuming* a font size of ptPerEm (normal size, normal style).\n\nvar ptPerUnit = {\n // https://en.wikibooks.org/wiki/LaTeX/Lengths and\n // https://tex.stackexchange.com/a/8263\n \"pt\": 1,\n // TeX point\n \"mm\": 7227 / 2540,\n // millimeter\n \"cm\": 7227 / 254,\n // centimeter\n \"in\": 72.27,\n // inch\n \"bp\": 803 / 800,\n // big (PostScript) points\n \"pc\": 12,\n // pica\n \"dd\": 1238 / 1157,\n // didot\n \"cc\": 14856 / 1157,\n // cicero (12 didot)\n \"nd\": 685 / 642,\n // new didot\n \"nc\": 1370 / 107,\n // new cicero (12 new didot)\n \"sp\": 1 / 65536,\n // scaled point (TeX's internal smallest unit)\n // https://tex.stackexchange.com/a/41371\n \"px\": 803 / 800 // \\pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX\n\n}; // Dictionary of relative units, for fast validity testing.\n\nvar relativeUnit = {\n \"ex\": true,\n \"em\": true,\n \"mu\": true\n};\n\n/**\n * Determine whether the specified unit (either a string defining the unit\n * or a \"size\" parse node containing a unit field) is valid.\n */\nvar validUnit = function validUnit(unit) {\n if (typeof unit !== \"string\") {\n unit = unit.unit;\n }\n\n return unit in ptPerUnit || unit in relativeUnit || unit === \"ex\";\n};\n/*\n * Convert a \"size\" parse node (with numeric \"number\" and string \"unit\" fields,\n * as parsed by functions.js argType \"size\") into a CSS em value for the\n * current style/scale. `options` gives the current options.\n */\n\nvar calculateSize = function calculateSize(sizeValue, options) {\n var scale;\n\n if (sizeValue.unit in ptPerUnit) {\n // Absolute units\n scale = ptPerUnit[sizeValue.unit] // Convert unit to pt\n / options.fontMetrics().ptPerEm // Convert pt to CSS em\n / options.sizeMultiplier; // Unscale to make absolute units\n } else if (sizeValue.unit === \"mu\") {\n // `mu` units scale with scriptstyle/scriptscriptstyle.\n scale = options.fontMetrics().cssEmPerMu;\n } else {\n // Other relative units always refer to the *textstyle* font\n // in the current size.\n var unitOptions;\n\n if (options.style.isTight()) {\n // isTight() means current style is script/scriptscript.\n unitOptions = options.havingStyle(options.style.text());\n } else {\n unitOptions = options;\n } // TODO: In TeX these units are relative to the quad of the current\n // *text* font, e.g. cmr10. KaTeX instead uses values from the\n // comparably-sized *Computer Modern symbol* font. At 10pt, these\n // match. At 7pt and 5pt, they differ: cmr7=1.138894, cmsy7=1.170641;\n // cmr5=1.361133, cmsy5=1.472241. Consider $\\scriptsize a\\kern1emb$.\n // TeX \\showlists shows a kern of 1.13889 * fontsize;\n // KaTeX shows a kern of 1.171 * fontsize.\n\n\n if (sizeValue.unit === \"ex\") {\n scale = unitOptions.fontMetrics().xHeight;\n } else if (sizeValue.unit === \"em\") {\n scale = unitOptions.fontMetrics().quad;\n } else {\n throw new ParseError(\"Invalid unit: '\" + sizeValue.unit + \"'\");\n }\n\n if (unitOptions !== options) {\n scale *= unitOptions.sizeMultiplier / options.sizeMultiplier;\n }\n }\n\n return Math.min(sizeValue.number * scale, options.maxSize);\n};\n/**\n * Round `n` to 4 decimal places, or to the nearest 1/10,000th em. See\n * https://github.com/KaTeX/KaTeX/pull/2460.\n */\n\nvar makeEm = function makeEm(n) {\n return +n.toFixed(4) + \"em\";\n};\n\n/**\n * These objects store the data about the DOM nodes we create, as well as some\n * extra data. They can then be transformed into real DOM nodes with the\n * `toNode` function or HTML markup using `toMarkup`. They are useful for both\n * storing extra properties on the nodes, as well as providing a way to easily\n * work with the DOM.\n *\n * Similar functions for working with MathML nodes exist in mathMLTree.js.\n *\n * TODO: refactor `span` and `anchor` into common superclass when\n * target environments support class inheritance\n */\n\n/**\n * Create an HTML className based on a list of classes. In addition to joining\n * with spaces, we also remove empty classes.\n */\nvar createClass = function createClass(classes) {\n return classes.filter(cls => cls).join(\" \");\n};\n\nvar initNode = function initNode(classes, options, style) {\n this.classes = classes || [];\n this.attributes = {};\n this.height = 0;\n this.depth = 0;\n this.maxFontSize = 0;\n this.style = style || {};\n\n if (options) {\n if (options.style.isTight()) {\n this.classes.push(\"mtight\");\n }\n\n var color = options.getColor();\n\n if (color) {\n this.style.color = color;\n }\n }\n};\n/**\n * Convert into an HTML node\n */\n\n\nvar toNode = function toNode(tagName) {\n var node = document.createElement(tagName); // Apply the class\n\n node.className = createClass(this.classes); // Apply inline styles\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n // $FlowFixMe Flow doesn't seem to understand span.style's type.\n node.style[style] = this.style[style];\n }\n } // Apply attributes\n\n\n for (var attr in this.attributes) {\n if (this.attributes.hasOwnProperty(attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n } // Append the children, also as HTML nodes\n\n\n for (var i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n\n return node;\n};\n/**\n * Convert into an HTML markup string\n */\n\n\nvar toMarkup = function toMarkup(tagName) {\n var markup = \"<\" + tagName; // Add the class\n\n if (this.classes.length) {\n markup += \" class=\\\"\" + utils.escape(createClass(this.classes)) + \"\\\"\";\n }\n\n var styles = \"\"; // Add the styles, after hyphenation\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n styles += utils.hyphenate(style) + \":\" + this.style[style] + \";\";\n }\n }\n\n if (styles) {\n markup += \" style=\\\"\" + utils.escape(styles) + \"\\\"\";\n } // Add the attributes\n\n\n for (var attr in this.attributes) {\n if (this.attributes.hasOwnProperty(attr)) {\n markup += \" \" + attr + \"=\\\"\" + utils.escape(this.attributes[attr]) + \"\\\"\";\n }\n }\n\n markup += \">\"; // Add the markup of the children, also as markup\n\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += \"\";\n return markup;\n}; // Making the type below exact with all optional fields doesn't work due to\n// - https://github.com/facebook/flow/issues/4582\n// - https://github.com/facebook/flow/issues/5688\n// However, since *all* fields are optional, $Shape<> works as suggested in 5688\n// above.\n// This type does not include all CSS properties. Additional properties should\n// be added as needed.\n\n\n/**\n * This node represents a span node, with a className, a list of children, and\n * an inline style. It also contains information about its height, depth, and\n * maxFontSize.\n *\n * Represents two types with different uses: SvgSpan to wrap an SVG and DomSpan\n * otherwise. This typesafety is important when HTML builders access a span's\n * children.\n */\nclass Span {\n constructor(classes, children, options, style) {\n this.children = void 0;\n this.attributes = void 0;\n this.classes = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.width = void 0;\n this.maxFontSize = void 0;\n this.style = void 0;\n initNode.call(this, classes, options, style);\n this.children = children || [];\n }\n /**\n * Sets an arbitrary attribute on the span. Warning: use this wisely. Not\n * all browsers support attributes the same, and having too many custom\n * attributes is probably bad.\n */\n\n\n setAttribute(attribute, value) {\n this.attributes[attribute] = value;\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n\n toNode() {\n return toNode.call(this, \"span\");\n }\n\n toMarkup() {\n return toMarkup.call(this, \"span\");\n }\n\n}\n/**\n * This node represents an anchor () element with a hyperlink. See `span`\n * for further details.\n */\n\nclass Anchor {\n constructor(href, classes, children, options) {\n this.children = void 0;\n this.attributes = void 0;\n this.classes = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.maxFontSize = void 0;\n this.style = void 0;\n initNode.call(this, classes, options);\n this.children = children || [];\n this.setAttribute('href', href);\n }\n\n setAttribute(attribute, value) {\n this.attributes[attribute] = value;\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n\n toNode() {\n return toNode.call(this, \"a\");\n }\n\n toMarkup() {\n return toMarkup.call(this, \"a\");\n }\n\n}\n/**\n * This node represents an image embed () element.\n */\n\nclass Img {\n constructor(src, alt, style) {\n this.src = void 0;\n this.alt = void 0;\n this.classes = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.maxFontSize = void 0;\n this.style = void 0;\n this.alt = alt;\n this.src = src;\n this.classes = [\"mord\"];\n this.style = style;\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n\n toNode() {\n var node = document.createElement(\"img\");\n node.src = this.src;\n node.alt = this.alt;\n node.className = \"mord\"; // Apply inline styles\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n // $FlowFixMe\n node.style[style] = this.style[style];\n }\n }\n\n return node;\n }\n\n toMarkup() {\n var markup = \"\\\"\"\";\n return markup;\n }\n\n}\nvar iCombinations = {\n '\u00EE': '\\u0131\\u0302',\n '\u00EF': '\\u0131\\u0308',\n '\u00ED': '\\u0131\\u0301',\n // '\u012B': '\\u0131\\u0304', // enable when we add Extended Latin\n '\u00EC': '\\u0131\\u0300'\n};\n/**\n * A symbol node contains information about a single symbol. It either renders\n * to a single text node, or a span with a single text node in it, depending on\n * whether it has CSS classes, styles, or needs italic correction.\n */\n\nclass SymbolNode {\n constructor(text, height, depth, italic, skew, width, classes, style) {\n this.text = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.italic = void 0;\n this.skew = void 0;\n this.width = void 0;\n this.maxFontSize = void 0;\n this.classes = void 0;\n this.style = void 0;\n this.text = text;\n this.height = height || 0;\n this.depth = depth || 0;\n this.italic = italic || 0;\n this.skew = skew || 0;\n this.width = width || 0;\n this.classes = classes || [];\n this.style = style || {};\n this.maxFontSize = 0; // Mark text from non-Latin scripts with specific classes so that we\n // can specify which fonts to use. This allows us to render these\n // characters with a serif font in situations where the browser would\n // either default to a sans serif or render a placeholder character.\n // We use CSS class names like cjk_fallback, hangul_fallback and\n // brahmic_fallback. See ./unicodeScripts.js for the set of possible\n // script names\n\n var script = scriptFromCodepoint(this.text.charCodeAt(0));\n\n if (script) {\n this.classes.push(script + \"_fallback\");\n }\n\n if (/[\u00EE\u00EF\u00ED\u00EC]/.test(this.text)) {\n // add \u012B when we add Extended Latin\n this.text = iCombinations[this.text];\n }\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n /**\n * Creates a text node or span from a symbol node. Note that a span is only\n * created if it is needed.\n */\n\n\n toNode() {\n var node = document.createTextNode(this.text);\n var span = null;\n\n if (this.italic > 0) {\n span = document.createElement(\"span\");\n span.style.marginRight = makeEm(this.italic);\n }\n\n if (this.classes.length > 0) {\n span = span || document.createElement(\"span\");\n span.className = createClass(this.classes);\n }\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n span = span || document.createElement(\"span\"); // $FlowFixMe Flow doesn't seem to understand span.style's type.\n\n span.style[style] = this.style[style];\n }\n }\n\n if (span) {\n span.appendChild(node);\n return span;\n } else {\n return node;\n }\n }\n /**\n * Creates markup for a symbol node.\n */\n\n\n toMarkup() {\n // TODO(alpert): More duplication than I'd like from\n // span.prototype.toMarkup and symbolNode.prototype.toNode...\n var needsSpan = false;\n var markup = \" 0) {\n styles += \"margin-right:\" + this.italic + \"em;\";\n }\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n styles += utils.hyphenate(style) + \":\" + this.style[style] + \";\";\n }\n }\n\n if (styles) {\n needsSpan = true;\n markup += \" style=\\\"\" + utils.escape(styles) + \"\\\"\";\n }\n\n var escaped = utils.escape(this.text);\n\n if (needsSpan) {\n markup += \">\";\n markup += escaped;\n markup += \"\";\n return markup;\n } else {\n return escaped;\n }\n }\n\n}\n/**\n * SVG nodes are used to render stretchy wide elements.\n */\n\nclass SvgNode {\n constructor(children, attributes) {\n this.children = void 0;\n this.attributes = void 0;\n this.children = children || [];\n this.attributes = attributes || {};\n }\n\n toNode() {\n var svgNS = \"http://www.w3.org/2000/svg\";\n var node = document.createElementNS(svgNS, \"svg\"); // Apply attributes\n\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n for (var i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n\n return node;\n }\n\n toMarkup() {\n var markup = \"\";\n\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += \"\";\n return markup;\n }\n\n}\nclass PathNode {\n constructor(pathName, alternate) {\n this.pathName = void 0;\n this.alternate = void 0;\n this.pathName = pathName;\n this.alternate = alternate; // Used only for \\sqrt, \\phase, & tall delims\n }\n\n toNode() {\n var svgNS = \"http://www.w3.org/2000/svg\";\n var node = document.createElementNS(svgNS, \"path\");\n\n if (this.alternate) {\n node.setAttribute(\"d\", this.alternate);\n } else {\n node.setAttribute(\"d\", path[this.pathName]);\n }\n\n return node;\n }\n\n toMarkup() {\n if (this.alternate) {\n return \"\";\n } else {\n return \"\";\n }\n }\n\n}\nclass LineNode {\n constructor(attributes) {\n this.attributes = void 0;\n this.attributes = attributes || {};\n }\n\n toNode() {\n var svgNS = \"http://www.w3.org/2000/svg\";\n var node = document.createElementNS(svgNS, \"line\"); // Apply attributes\n\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n return node;\n }\n\n toMarkup() {\n var markup = \"\";\n return markup;\n }\n\n}\nfunction assertSymbolDomNode(group) {\n if (group instanceof SymbolNode) {\n return group;\n } else {\n throw new Error(\"Expected symbolNode but got \" + String(group) + \".\");\n }\n}\nfunction assertSpan(group) {\n if (group instanceof Span) {\n return group;\n } else {\n throw new Error(\"Expected span but got \" + String(group) + \".\");\n }\n}\n\n/**\n * This file holds a list of all no-argument functions and single-character\n * symbols (like 'a' or ';').\n *\n * For each of the symbols, there are three properties they can have:\n * - font (required): the font to be used for this symbol. Either \"main\" (the\n normal font), or \"ams\" (the ams fonts).\n * - group (required): the ParseNode group type the symbol should have (i.e.\n \"textord\", \"mathord\", etc).\n See https://github.com/KaTeX/KaTeX/wiki/Examining-TeX#group-types\n * - replace: the character that this symbol or function should be\n * replaced with (i.e. \"\\phi\" has a replace value of \"\\u03d5\", the phi\n * character in the main font).\n *\n * The outermost map in the table indicates what mode the symbols should be\n * accepted in (e.g. \"math\" or \"text\").\n */\n// Some of these have a \"-token\" suffix since these are also used as `ParseNode`\n// types for raw text tokens, and we want to avoid conflicts with higher-level\n// `ParseNode` types. These `ParseNode`s are constructed within `Parser` by\n// looking up the `symbols` map.\nvar ATOMS = {\n \"bin\": 1,\n \"close\": 1,\n \"inner\": 1,\n \"open\": 1,\n \"punct\": 1,\n \"rel\": 1\n};\nvar NON_ATOMS = {\n \"accent-token\": 1,\n \"mathord\": 1,\n \"op-token\": 1,\n \"spacing\": 1,\n \"textord\": 1\n};\nvar symbols = {\n \"math\": {},\n \"text\": {}\n};\n/** `acceptUnicodeChar = true` is only applicable if `replace` is set. */\n\nfunction defineSymbol(mode, font, group, replace, name, acceptUnicodeChar) {\n symbols[mode][name] = {\n font,\n group,\n replace\n };\n\n if (acceptUnicodeChar && replace) {\n symbols[mode][replace] = symbols[mode][name];\n }\n} // Some abbreviations for commonly used strings.\n// This helps minify the code, and also spotting typos using jshint.\n// modes:\n\nvar math = \"math\";\nvar text = \"text\"; // fonts:\n\nvar main = \"main\";\nvar ams = \"ams\"; // groups:\n\nvar accent = \"accent-token\";\nvar bin = \"bin\";\nvar close = \"close\";\nvar inner = \"inner\";\nvar mathord = \"mathord\";\nvar op = \"op-token\";\nvar open = \"open\";\nvar punct = \"punct\";\nvar rel = \"rel\";\nvar spacing = \"spacing\";\nvar textord = \"textord\"; // Now comes the symbol table\n// Relation Symbols\n\ndefineSymbol(math, main, rel, \"\\u2261\", \"\\\\equiv\", true);\ndefineSymbol(math, main, rel, \"\\u227a\", \"\\\\prec\", true);\ndefineSymbol(math, main, rel, \"\\u227b\", \"\\\\succ\", true);\ndefineSymbol(math, main, rel, \"\\u223c\", \"\\\\sim\", true);\ndefineSymbol(math, main, rel, \"\\u22a5\", \"\\\\perp\");\ndefineSymbol(math, main, rel, \"\\u2aaf\", \"\\\\preceq\", true);\ndefineSymbol(math, main, rel, \"\\u2ab0\", \"\\\\succeq\", true);\ndefineSymbol(math, main, rel, \"\\u2243\", \"\\\\simeq\", true);\ndefineSymbol(math, main, rel, \"\\u2223\", \"\\\\mid\", true);\ndefineSymbol(math, main, rel, \"\\u226a\", \"\\\\ll\", true);\ndefineSymbol(math, main, rel, \"\\u226b\", \"\\\\gg\", true);\ndefineSymbol(math, main, rel, \"\\u224d\", \"\\\\asymp\", true);\ndefineSymbol(math, main, rel, \"\\u2225\", \"\\\\parallel\");\ndefineSymbol(math, main, rel, \"\\u22c8\", \"\\\\bowtie\", true);\ndefineSymbol(math, main, rel, \"\\u2323\", \"\\\\smile\", true);\ndefineSymbol(math, main, rel, \"\\u2291\", \"\\\\sqsubseteq\", true);\ndefineSymbol(math, main, rel, \"\\u2292\", \"\\\\sqsupseteq\", true);\ndefineSymbol(math, main, rel, \"\\u2250\", \"\\\\doteq\", true);\ndefineSymbol(math, main, rel, \"\\u2322\", \"\\\\frown\", true);\ndefineSymbol(math, main, rel, \"\\u220b\", \"\\\\ni\", true);\ndefineSymbol(math, main, rel, \"\\u221d\", \"\\\\propto\", true);\ndefineSymbol(math, main, rel, \"\\u22a2\", \"\\\\vdash\", true);\ndefineSymbol(math, main, rel, \"\\u22a3\", \"\\\\dashv\", true);\ndefineSymbol(math, main, rel, \"\\u220b\", \"\\\\owns\"); // Punctuation\n\ndefineSymbol(math, main, punct, \"\\u002e\", \"\\\\ldotp\");\ndefineSymbol(math, main, punct, \"\\u22c5\", \"\\\\cdotp\"); // Misc Symbols\n\ndefineSymbol(math, main, textord, \"\\u0023\", \"\\\\#\");\ndefineSymbol(text, main, textord, \"\\u0023\", \"\\\\#\");\ndefineSymbol(math, main, textord, \"\\u0026\", \"\\\\&\");\ndefineSymbol(text, main, textord, \"\\u0026\", \"\\\\&\");\ndefineSymbol(math, main, textord, \"\\u2135\", \"\\\\aleph\", true);\ndefineSymbol(math, main, textord, \"\\u2200\", \"\\\\forall\", true);\ndefineSymbol(math, main, textord, \"\\u210f\", \"\\\\hbar\", true);\ndefineSymbol(math, main, textord, \"\\u2203\", \"\\\\exists\", true);\ndefineSymbol(math, main, textord, \"\\u2207\", \"\\\\nabla\", true);\ndefineSymbol(math, main, textord, \"\\u266d\", \"\\\\flat\", true);\ndefineSymbol(math, main, textord, \"\\u2113\", \"\\\\ell\", true);\ndefineSymbol(math, main, textord, \"\\u266e\", \"\\\\natural\", true);\ndefineSymbol(math, main, textord, \"\\u2663\", \"\\\\clubsuit\", true);\ndefineSymbol(math, main, textord, \"\\u2118\", \"\\\\wp\", true);\ndefineSymbol(math, main, textord, \"\\u266f\", \"\\\\sharp\", true);\ndefineSymbol(math, main, textord, \"\\u2662\", \"\\\\diamondsuit\", true);\ndefineSymbol(math, main, textord, \"\\u211c\", \"\\\\Re\", true);\ndefineSymbol(math, main, textord, \"\\u2661\", \"\\\\heartsuit\", true);\ndefineSymbol(math, main, textord, \"\\u2111\", \"\\\\Im\", true);\ndefineSymbol(math, main, textord, \"\\u2660\", \"\\\\spadesuit\", true);\ndefineSymbol(math, main, textord, \"\\u00a7\", \"\\\\S\", true);\ndefineSymbol(text, main, textord, \"\\u00a7\", \"\\\\S\");\ndefineSymbol(math, main, textord, \"\\u00b6\", \"\\\\P\", true);\ndefineSymbol(text, main, textord, \"\\u00b6\", \"\\\\P\"); // Math and Text\n\ndefineSymbol(math, main, textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(text, main, textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(text, main, textord, \"\\u2020\", \"\\\\textdagger\");\ndefineSymbol(math, main, textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(text, main, textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(text, main, textord, \"\\u2021\", \"\\\\textdaggerdbl\"); // Large Delimiters\n\ndefineSymbol(math, main, close, \"\\u23b1\", \"\\\\rmoustache\", true);\ndefineSymbol(math, main, open, \"\\u23b0\", \"\\\\lmoustache\", true);\ndefineSymbol(math, main, close, \"\\u27ef\", \"\\\\rgroup\", true);\ndefineSymbol(math, main, open, \"\\u27ee\", \"\\\\lgroup\", true); // Binary Operators\n\ndefineSymbol(math, main, bin, \"\\u2213\", \"\\\\mp\", true);\ndefineSymbol(math, main, bin, \"\\u2296\", \"\\\\ominus\", true);\ndefineSymbol(math, main, bin, \"\\u228e\", \"\\\\uplus\", true);\ndefineSymbol(math, main, bin, \"\\u2293\", \"\\\\sqcap\", true);\ndefineSymbol(math, main, bin, \"\\u2217\", \"\\\\ast\");\ndefineSymbol(math, main, bin, \"\\u2294\", \"\\\\sqcup\", true);\ndefineSymbol(math, main, bin, \"\\u25ef\", \"\\\\bigcirc\", true);\ndefineSymbol(math, main, bin, \"\\u2219\", \"\\\\bullet\", true);\ndefineSymbol(math, main, bin, \"\\u2021\", \"\\\\ddagger\");\ndefineSymbol(math, main, bin, \"\\u2240\", \"\\\\wr\", true);\ndefineSymbol(math, main, bin, \"\\u2a3f\", \"\\\\amalg\");\ndefineSymbol(math, main, bin, \"\\u0026\", \"\\\\And\"); // from amsmath\n// Arrow Symbols\n\ndefineSymbol(math, main, rel, \"\\u27f5\", \"\\\\longleftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d0\", \"\\\\Leftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27f8\", \"\\\\Longleftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27f6\", \"\\\\longrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d2\", \"\\\\Rightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27f9\", \"\\\\Longrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2194\", \"\\\\leftrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27f7\", \"\\\\longleftrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d4\", \"\\\\Leftrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27fa\", \"\\\\Longleftrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21a6\", \"\\\\mapsto\", true);\ndefineSymbol(math, main, rel, \"\\u27fc\", \"\\\\longmapsto\", true);\ndefineSymbol(math, main, rel, \"\\u2197\", \"\\\\nearrow\", true);\ndefineSymbol(math, main, rel, \"\\u21a9\", \"\\\\hookleftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21aa\", \"\\\\hookrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2198\", \"\\\\searrow\", true);\ndefineSymbol(math, main, rel, \"\\u21bc\", \"\\\\leftharpoonup\", true);\ndefineSymbol(math, main, rel, \"\\u21c0\", \"\\\\rightharpoonup\", true);\ndefineSymbol(math, main, rel, \"\\u2199\", \"\\\\swarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21bd\", \"\\\\leftharpoondown\", true);\ndefineSymbol(math, main, rel, \"\\u21c1\", \"\\\\rightharpoondown\", true);\ndefineSymbol(math, main, rel, \"\\u2196\", \"\\\\nwarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21cc\", \"\\\\rightleftharpoons\", true); // AMS Negated Binary Relations\n\ndefineSymbol(math, ams, rel, \"\\u226e\", \"\\\\nless\", true); // Symbol names preceded by \"@\" each have a corresponding macro.\n\ndefineSymbol(math, ams, rel, \"\\ue010\", \"\\\\@nleqslant\");\ndefineSymbol(math, ams, rel, \"\\ue011\", \"\\\\@nleqq\");\ndefineSymbol(math, ams, rel, \"\\u2a87\", \"\\\\lneq\", true);\ndefineSymbol(math, ams, rel, \"\\u2268\", \"\\\\lneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue00c\", \"\\\\@lvertneqq\");\ndefineSymbol(math, ams, rel, \"\\u22e6\", \"\\\\lnsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2a89\", \"\\\\lnapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u2280\", \"\\\\nprec\", true); // unicode-math maps \\u22e0 to \\npreccurlyeq. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u22e0\", \"\\\\npreceq\", true);\ndefineSymbol(math, ams, rel, \"\\u22e8\", \"\\\\precnsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab9\", \"\\\\precnapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u2241\", \"\\\\nsim\", true);\ndefineSymbol(math, ams, rel, \"\\ue006\", \"\\\\@nshortmid\");\ndefineSymbol(math, ams, rel, \"\\u2224\", \"\\\\nmid\", true);\ndefineSymbol(math, ams, rel, \"\\u22ac\", \"\\\\nvdash\", true);\ndefineSymbol(math, ams, rel, \"\\u22ad\", \"\\\\nvDash\", true);\ndefineSymbol(math, ams, rel, \"\\u22ea\", \"\\\\ntriangleleft\");\ndefineSymbol(math, ams, rel, \"\\u22ec\", \"\\\\ntrianglelefteq\", true);\ndefineSymbol(math, ams, rel, \"\\u228a\", \"\\\\subsetneq\", true);\ndefineSymbol(math, ams, rel, \"\\ue01a\", \"\\\\@varsubsetneq\");\ndefineSymbol(math, ams, rel, \"\\u2acb\", \"\\\\subsetneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue017\", \"\\\\@varsubsetneqq\");\ndefineSymbol(math, ams, rel, \"\\u226f\", \"\\\\ngtr\", true);\ndefineSymbol(math, ams, rel, \"\\ue00f\", \"\\\\@ngeqslant\");\ndefineSymbol(math, ams, rel, \"\\ue00e\", \"\\\\@ngeqq\");\ndefineSymbol(math, ams, rel, \"\\u2a88\", \"\\\\gneq\", true);\ndefineSymbol(math, ams, rel, \"\\u2269\", \"\\\\gneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue00d\", \"\\\\@gvertneqq\");\ndefineSymbol(math, ams, rel, \"\\u22e7\", \"\\\\gnsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2a8a\", \"\\\\gnapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u2281\", \"\\\\nsucc\", true); // unicode-math maps \\u22e1 to \\nsucccurlyeq. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u22e1\", \"\\\\nsucceq\", true);\ndefineSymbol(math, ams, rel, \"\\u22e9\", \"\\\\succnsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2aba\", \"\\\\succnapprox\", true); // unicode-math maps \\u2246 to \\simneqq. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u2246\", \"\\\\ncong\", true);\ndefineSymbol(math, ams, rel, \"\\ue007\", \"\\\\@nshortparallel\");\ndefineSymbol(math, ams, rel, \"\\u2226\", \"\\\\nparallel\", true);\ndefineSymbol(math, ams, rel, \"\\u22af\", \"\\\\nVDash\", true);\ndefineSymbol(math, ams, rel, \"\\u22eb\", \"\\\\ntriangleright\");\ndefineSymbol(math, ams, rel, \"\\u22ed\", \"\\\\ntrianglerighteq\", true);\ndefineSymbol(math, ams, rel, \"\\ue018\", \"\\\\@nsupseteqq\");\ndefineSymbol(math, ams, rel, \"\\u228b\", \"\\\\supsetneq\", true);\ndefineSymbol(math, ams, rel, \"\\ue01b\", \"\\\\@varsupsetneq\");\ndefineSymbol(math, ams, rel, \"\\u2acc\", \"\\\\supsetneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue019\", \"\\\\@varsupsetneqq\");\ndefineSymbol(math, ams, rel, \"\\u22ae\", \"\\\\nVdash\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab5\", \"\\\\precneqq\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab6\", \"\\\\succneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue016\", \"\\\\@nsubseteqq\");\ndefineSymbol(math, ams, bin, \"\\u22b4\", \"\\\\unlhd\");\ndefineSymbol(math, ams, bin, \"\\u22b5\", \"\\\\unrhd\"); // AMS Negated Arrows\n\ndefineSymbol(math, ams, rel, \"\\u219a\", \"\\\\nleftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u219b\", \"\\\\nrightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21cd\", \"\\\\nLeftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21cf\", \"\\\\nRightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21ae\", \"\\\\nleftrightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21ce\", \"\\\\nLeftrightarrow\", true); // AMS Misc\n\ndefineSymbol(math, ams, rel, \"\\u25b3\", \"\\\\vartriangle\");\ndefineSymbol(math, ams, textord, \"\\u210f\", \"\\\\hslash\");\ndefineSymbol(math, ams, textord, \"\\u25bd\", \"\\\\triangledown\");\ndefineSymbol(math, ams, textord, \"\\u25ca\", \"\\\\lozenge\");\ndefineSymbol(math, ams, textord, \"\\u24c8\", \"\\\\circledS\");\ndefineSymbol(math, ams, textord, \"\\u00ae\", \"\\\\circledR\");\ndefineSymbol(text, ams, textord, \"\\u00ae\", \"\\\\circledR\");\ndefineSymbol(math, ams, textord, \"\\u2221\", \"\\\\measuredangle\", true);\ndefineSymbol(math, ams, textord, \"\\u2204\", \"\\\\nexists\");\ndefineSymbol(math, ams, textord, \"\\u2127\", \"\\\\mho\");\ndefineSymbol(math, ams, textord, \"\\u2132\", \"\\\\Finv\", true);\ndefineSymbol(math, ams, textord, \"\\u2141\", \"\\\\Game\", true);\ndefineSymbol(math, ams, textord, \"\\u2035\", \"\\\\backprime\");\ndefineSymbol(math, ams, textord, \"\\u25b2\", \"\\\\blacktriangle\");\ndefineSymbol(math, ams, textord, \"\\u25bc\", \"\\\\blacktriangledown\");\ndefineSymbol(math, ams, textord, \"\\u25a0\", \"\\\\blacksquare\");\ndefineSymbol(math, ams, textord, \"\\u29eb\", \"\\\\blacklozenge\");\ndefineSymbol(math, ams, textord, \"\\u2605\", \"\\\\bigstar\");\ndefineSymbol(math, ams, textord, \"\\u2222\", \"\\\\sphericalangle\", true);\ndefineSymbol(math, ams, textord, \"\\u2201\", \"\\\\complement\", true); // unicode-math maps U+F0 to \\matheth. We map to AMS function \\eth\n\ndefineSymbol(math, ams, textord, \"\\u00f0\", \"\\\\eth\", true);\ndefineSymbol(text, main, textord, \"\\u00f0\", \"\\u00f0\");\ndefineSymbol(math, ams, textord, \"\\u2571\", \"\\\\diagup\");\ndefineSymbol(math, ams, textord, \"\\u2572\", \"\\\\diagdown\");\ndefineSymbol(math, ams, textord, \"\\u25a1\", \"\\\\square\");\ndefineSymbol(math, ams, textord, \"\\u25a1\", \"\\\\Box\");\ndefineSymbol(math, ams, textord, \"\\u25ca\", \"\\\\Diamond\"); // unicode-math maps U+A5 to \\mathyen. We map to AMS function \\yen\n\ndefineSymbol(math, ams, textord, \"\\u00a5\", \"\\\\yen\", true);\ndefineSymbol(text, ams, textord, \"\\u00a5\", \"\\\\yen\", true);\ndefineSymbol(math, ams, textord, \"\\u2713\", \"\\\\checkmark\", true);\ndefineSymbol(text, ams, textord, \"\\u2713\", \"\\\\checkmark\"); // AMS Hebrew\n\ndefineSymbol(math, ams, textord, \"\\u2136\", \"\\\\beth\", true);\ndefineSymbol(math, ams, textord, \"\\u2138\", \"\\\\daleth\", true);\ndefineSymbol(math, ams, textord, \"\\u2137\", \"\\\\gimel\", true); // AMS Greek\n\ndefineSymbol(math, ams, textord, \"\\u03dd\", \"\\\\digamma\", true);\ndefineSymbol(math, ams, textord, \"\\u03f0\", \"\\\\varkappa\"); // AMS Delimiters\n\ndefineSymbol(math, ams, open, \"\\u250c\", \"\\\\@ulcorner\", true);\ndefineSymbol(math, ams, close, \"\\u2510\", \"\\\\@urcorner\", true);\ndefineSymbol(math, ams, open, \"\\u2514\", \"\\\\@llcorner\", true);\ndefineSymbol(math, ams, close, \"\\u2518\", \"\\\\@lrcorner\", true); // AMS Binary Relations\n\ndefineSymbol(math, ams, rel, \"\\u2266\", \"\\\\leqq\", true);\ndefineSymbol(math, ams, rel, \"\\u2a7d\", \"\\\\leqslant\", true);\ndefineSymbol(math, ams, rel, \"\\u2a95\", \"\\\\eqslantless\", true);\ndefineSymbol(math, ams, rel, \"\\u2272\", \"\\\\lesssim\", true);\ndefineSymbol(math, ams, rel, \"\\u2a85\", \"\\\\lessapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u224a\", \"\\\\approxeq\", true);\ndefineSymbol(math, ams, bin, \"\\u22d6\", \"\\\\lessdot\");\ndefineSymbol(math, ams, rel, \"\\u22d8\", \"\\\\lll\", true);\ndefineSymbol(math, ams, rel, \"\\u2276\", \"\\\\lessgtr\", true);\ndefineSymbol(math, ams, rel, \"\\u22da\", \"\\\\lesseqgtr\", true);\ndefineSymbol(math, ams, rel, \"\\u2a8b\", \"\\\\lesseqqgtr\", true);\ndefineSymbol(math, ams, rel, \"\\u2251\", \"\\\\doteqdot\");\ndefineSymbol(math, ams, rel, \"\\u2253\", \"\\\\risingdotseq\", true);\ndefineSymbol(math, ams, rel, \"\\u2252\", \"\\\\fallingdotseq\", true);\ndefineSymbol(math, ams, rel, \"\\u223d\", \"\\\\backsim\", true);\ndefineSymbol(math, ams, rel, \"\\u22cd\", \"\\\\backsimeq\", true);\ndefineSymbol(math, ams, rel, \"\\u2ac5\", \"\\\\subseteqq\", true);\ndefineSymbol(math, ams, rel, \"\\u22d0\", \"\\\\Subset\", true);\ndefineSymbol(math, ams, rel, \"\\u228f\", \"\\\\sqsubset\", true);\ndefineSymbol(math, ams, rel, \"\\u227c\", \"\\\\preccurlyeq\", true);\ndefineSymbol(math, ams, rel, \"\\u22de\", \"\\\\curlyeqprec\", true);\ndefineSymbol(math, ams, rel, \"\\u227e\", \"\\\\precsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab7\", \"\\\\precapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u22b2\", \"\\\\vartriangleleft\");\ndefineSymbol(math, ams, rel, \"\\u22b4\", \"\\\\trianglelefteq\");\ndefineSymbol(math, ams, rel, \"\\u22a8\", \"\\\\vDash\", true);\ndefineSymbol(math, ams, rel, \"\\u22aa\", \"\\\\Vvdash\", true);\ndefineSymbol(math, ams, rel, \"\\u2323\", \"\\\\smallsmile\");\ndefineSymbol(math, ams, rel, \"\\u2322\", \"\\\\smallfrown\");\ndefineSymbol(math, ams, rel, \"\\u224f\", \"\\\\bumpeq\", true);\ndefineSymbol(math, ams, rel, \"\\u224e\", \"\\\\Bumpeq\", true);\ndefineSymbol(math, ams, rel, \"\\u2267\", \"\\\\geqq\", true);\ndefineSymbol(math, ams, rel, \"\\u2a7e\", \"\\\\geqslant\", true);\ndefineSymbol(math, ams, rel, \"\\u2a96\", \"\\\\eqslantgtr\", true);\ndefineSymbol(math, ams, rel, \"\\u2273\", \"\\\\gtrsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2a86\", \"\\\\gtrapprox\", true);\ndefineSymbol(math, ams, bin, \"\\u22d7\", \"\\\\gtrdot\");\ndefineSymbol(math, ams, rel, \"\\u22d9\", \"\\\\ggg\", true);\ndefineSymbol(math, ams, rel, \"\\u2277\", \"\\\\gtrless\", true);\ndefineSymbol(math, ams, rel, \"\\u22db\", \"\\\\gtreqless\", true);\ndefineSymbol(math, ams, rel, \"\\u2a8c\", \"\\\\gtreqqless\", true);\ndefineSymbol(math, ams, rel, \"\\u2256\", \"\\\\eqcirc\", true);\ndefineSymbol(math, ams, rel, \"\\u2257\", \"\\\\circeq\", true);\ndefineSymbol(math, ams, rel, \"\\u225c\", \"\\\\triangleq\", true);\ndefineSymbol(math, ams, rel, \"\\u223c\", \"\\\\thicksim\");\ndefineSymbol(math, ams, rel, \"\\u2248\", \"\\\\thickapprox\");\ndefineSymbol(math, ams, rel, \"\\u2ac6\", \"\\\\supseteqq\", true);\ndefineSymbol(math, ams, rel, \"\\u22d1\", \"\\\\Supset\", true);\ndefineSymbol(math, ams, rel, \"\\u2290\", \"\\\\sqsupset\", true);\ndefineSymbol(math, ams, rel, \"\\u227d\", \"\\\\succcurlyeq\", true);\ndefineSymbol(math, ams, rel, \"\\u22df\", \"\\\\curlyeqsucc\", true);\ndefineSymbol(math, ams, rel, \"\\u227f\", \"\\\\succsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab8\", \"\\\\succapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u22b3\", \"\\\\vartriangleright\");\ndefineSymbol(math, ams, rel, \"\\u22b5\", \"\\\\trianglerighteq\");\ndefineSymbol(math, ams, rel, \"\\u22a9\", \"\\\\Vdash\", true);\ndefineSymbol(math, ams, rel, \"\\u2223\", \"\\\\shortmid\");\ndefineSymbol(math, ams, rel, \"\\u2225\", \"\\\\shortparallel\");\ndefineSymbol(math, ams, rel, \"\\u226c\", \"\\\\between\", true);\ndefineSymbol(math, ams, rel, \"\\u22d4\", \"\\\\pitchfork\", true);\ndefineSymbol(math, ams, rel, \"\\u221d\", \"\\\\varpropto\");\ndefineSymbol(math, ams, rel, \"\\u25c0\", \"\\\\blacktriangleleft\"); // unicode-math says that \\therefore is a mathord atom.\n// We kept the amssymb atom type, which is rel.\n\ndefineSymbol(math, ams, rel, \"\\u2234\", \"\\\\therefore\", true);\ndefineSymbol(math, ams, rel, \"\\u220d\", \"\\\\backepsilon\");\ndefineSymbol(math, ams, rel, \"\\u25b6\", \"\\\\blacktriangleright\"); // unicode-math says that \\because is a mathord atom.\n// We kept the amssymb atom type, which is rel.\n\ndefineSymbol(math, ams, rel, \"\\u2235\", \"\\\\because\", true);\ndefineSymbol(math, ams, rel, \"\\u22d8\", \"\\\\llless\");\ndefineSymbol(math, ams, rel, \"\\u22d9\", \"\\\\gggtr\");\ndefineSymbol(math, ams, bin, \"\\u22b2\", \"\\\\lhd\");\ndefineSymbol(math, ams, bin, \"\\u22b3\", \"\\\\rhd\");\ndefineSymbol(math, ams, rel, \"\\u2242\", \"\\\\eqsim\", true);\ndefineSymbol(math, main, rel, \"\\u22c8\", \"\\\\Join\");\ndefineSymbol(math, ams, rel, \"\\u2251\", \"\\\\Doteq\", true); // AMS Binary Operators\n\ndefineSymbol(math, ams, bin, \"\\u2214\", \"\\\\dotplus\", true);\ndefineSymbol(math, ams, bin, \"\\u2216\", \"\\\\smallsetminus\");\ndefineSymbol(math, ams, bin, \"\\u22d2\", \"\\\\Cap\", true);\ndefineSymbol(math, ams, bin, \"\\u22d3\", \"\\\\Cup\", true);\ndefineSymbol(math, ams, bin, \"\\u2a5e\", \"\\\\doublebarwedge\", true);\ndefineSymbol(math, ams, bin, \"\\u229f\", \"\\\\boxminus\", true);\ndefineSymbol(math, ams, bin, \"\\u229e\", \"\\\\boxplus\", true);\ndefineSymbol(math, ams, bin, \"\\u22c7\", \"\\\\divideontimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22c9\", \"\\\\ltimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22ca\", \"\\\\rtimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22cb\", \"\\\\leftthreetimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22cc\", \"\\\\rightthreetimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22cf\", \"\\\\curlywedge\", true);\ndefineSymbol(math, ams, bin, \"\\u22ce\", \"\\\\curlyvee\", true);\ndefineSymbol(math, ams, bin, \"\\u229d\", \"\\\\circleddash\", true);\ndefineSymbol(math, ams, bin, \"\\u229b\", \"\\\\circledast\", true);\ndefineSymbol(math, ams, bin, \"\\u22c5\", \"\\\\centerdot\");\ndefineSymbol(math, ams, bin, \"\\u22ba\", \"\\\\intercal\", true);\ndefineSymbol(math, ams, bin, \"\\u22d2\", \"\\\\doublecap\");\ndefineSymbol(math, ams, bin, \"\\u22d3\", \"\\\\doublecup\");\ndefineSymbol(math, ams, bin, \"\\u22a0\", \"\\\\boxtimes\", true); // AMS Arrows\n// Note: unicode-math maps \\u21e2 to their own function \\rightdasharrow.\n// We'll map it to AMS function \\dashrightarrow. It produces the same atom.\n\ndefineSymbol(math, ams, rel, \"\\u21e2\", \"\\\\dashrightarrow\", true); // unicode-math maps \\u21e0 to \\leftdasharrow. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u21e0\", \"\\\\dashleftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21c7\", \"\\\\leftleftarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21c6\", \"\\\\leftrightarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21da\", \"\\\\Lleftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u219e\", \"\\\\twoheadleftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21a2\", \"\\\\leftarrowtail\", true);\ndefineSymbol(math, ams, rel, \"\\u21ab\", \"\\\\looparrowleft\", true);\ndefineSymbol(math, ams, rel, \"\\u21cb\", \"\\\\leftrightharpoons\", true);\ndefineSymbol(math, ams, rel, \"\\u21b6\", \"\\\\curvearrowleft\", true); // unicode-math maps \\u21ba to \\acwopencirclearrow. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u21ba\", \"\\\\circlearrowleft\", true);\ndefineSymbol(math, ams, rel, \"\\u21b0\", \"\\\\Lsh\", true);\ndefineSymbol(math, ams, rel, \"\\u21c8\", \"\\\\upuparrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21bf\", \"\\\\upharpoonleft\", true);\ndefineSymbol(math, ams, rel, \"\\u21c3\", \"\\\\downharpoonleft\", true);\ndefineSymbol(math, main, rel, \"\\u22b6\", \"\\\\origof\", true); // not in font\n\ndefineSymbol(math, main, rel, \"\\u22b7\", \"\\\\imageof\", true); // not in font\n\ndefineSymbol(math, ams, rel, \"\\u22b8\", \"\\\\multimap\", true);\ndefineSymbol(math, ams, rel, \"\\u21ad\", \"\\\\leftrightsquigarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21c9\", \"\\\\rightrightarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21c4\", \"\\\\rightleftarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21a0\", \"\\\\twoheadrightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21a3\", \"\\\\rightarrowtail\", true);\ndefineSymbol(math, ams, rel, \"\\u21ac\", \"\\\\looparrowright\", true);\ndefineSymbol(math, ams, rel, \"\\u21b7\", \"\\\\curvearrowright\", true); // unicode-math maps \\u21bb to \\cwopencirclearrow. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u21bb\", \"\\\\circlearrowright\", true);\ndefineSymbol(math, ams, rel, \"\\u21b1\", \"\\\\Rsh\", true);\ndefineSymbol(math, ams, rel, \"\\u21ca\", \"\\\\downdownarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21be\", \"\\\\upharpoonright\", true);\ndefineSymbol(math, ams, rel, \"\\u21c2\", \"\\\\downharpoonright\", true);\ndefineSymbol(math, ams, rel, \"\\u21dd\", \"\\\\rightsquigarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21dd\", \"\\\\leadsto\");\ndefineSymbol(math, ams, rel, \"\\u21db\", \"\\\\Rrightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21be\", \"\\\\restriction\");\ndefineSymbol(math, main, textord, \"\\u2018\", \"`\");\ndefineSymbol(math, main, textord, \"$\", \"\\\\$\");\ndefineSymbol(text, main, textord, \"$\", \"\\\\$\");\ndefineSymbol(text, main, textord, \"$\", \"\\\\textdollar\");\ndefineSymbol(math, main, textord, \"%\", \"\\\\%\");\ndefineSymbol(text, main, textord, \"%\", \"\\\\%\");\ndefineSymbol(math, main, textord, \"_\", \"\\\\_\");\ndefineSymbol(text, main, textord, \"_\", \"\\\\_\");\ndefineSymbol(text, main, textord, \"_\", \"\\\\textunderscore\");\ndefineSymbol(math, main, textord, \"\\u2220\", \"\\\\angle\", true);\ndefineSymbol(math, main, textord, \"\\u221e\", \"\\\\infty\", true);\ndefineSymbol(math, main, textord, \"\\u2032\", \"\\\\prime\");\ndefineSymbol(math, main, textord, \"\\u25b3\", \"\\\\triangle\");\ndefineSymbol(math, main, textord, \"\\u0393\", \"\\\\Gamma\", true);\ndefineSymbol(math, main, textord, \"\\u0394\", \"\\\\Delta\", true);\ndefineSymbol(math, main, textord, \"\\u0398\", \"\\\\Theta\", true);\ndefineSymbol(math, main, textord, \"\\u039b\", \"\\\\Lambda\", true);\ndefineSymbol(math, main, textord, \"\\u039e\", \"\\\\Xi\", true);\ndefineSymbol(math, main, textord, \"\\u03a0\", \"\\\\Pi\", true);\ndefineSymbol(math, main, textord, \"\\u03a3\", \"\\\\Sigma\", true);\ndefineSymbol(math, main, textord, \"\\u03a5\", \"\\\\Upsilon\", true);\ndefineSymbol(math, main, textord, \"\\u03a6\", \"\\\\Phi\", true);\ndefineSymbol(math, main, textord, \"\\u03a8\", \"\\\\Psi\", true);\ndefineSymbol(math, main, textord, \"\\u03a9\", \"\\\\Omega\", true);\ndefineSymbol(math, main, textord, \"A\", \"\\u0391\");\ndefineSymbol(math, main, textord, \"B\", \"\\u0392\");\ndefineSymbol(math, main, textord, \"E\", \"\\u0395\");\ndefineSymbol(math, main, textord, \"Z\", \"\\u0396\");\ndefineSymbol(math, main, textord, \"H\", \"\\u0397\");\ndefineSymbol(math, main, textord, \"I\", \"\\u0399\");\ndefineSymbol(math, main, textord, \"K\", \"\\u039A\");\ndefineSymbol(math, main, textord, \"M\", \"\\u039C\");\ndefineSymbol(math, main, textord, \"N\", \"\\u039D\");\ndefineSymbol(math, main, textord, \"O\", \"\\u039F\");\ndefineSymbol(math, main, textord, \"P\", \"\\u03A1\");\ndefineSymbol(math, main, textord, \"T\", \"\\u03A4\");\ndefineSymbol(math, main, textord, \"X\", \"\\u03A7\");\ndefineSymbol(math, main, textord, \"\\u00ac\", \"\\\\neg\", true);\ndefineSymbol(math, main, textord, \"\\u00ac\", \"\\\\lnot\");\ndefineSymbol(math, main, textord, \"\\u22a4\", \"\\\\top\");\ndefineSymbol(math, main, textord, \"\\u22a5\", \"\\\\bot\");\ndefineSymbol(math, main, textord, \"\\u2205\", \"\\\\emptyset\");\ndefineSymbol(math, ams, textord, \"\\u2205\", \"\\\\varnothing\");\ndefineSymbol(math, main, mathord, \"\\u03b1\", \"\\\\alpha\", true);\ndefineSymbol(math, main, mathord, \"\\u03b2\", \"\\\\beta\", true);\ndefineSymbol(math, main, mathord, \"\\u03b3\", \"\\\\gamma\", true);\ndefineSymbol(math, main, mathord, \"\\u03b4\", \"\\\\delta\", true);\ndefineSymbol(math, main, mathord, \"\\u03f5\", \"\\\\epsilon\", true);\ndefineSymbol(math, main, mathord, \"\\u03b6\", \"\\\\zeta\", true);\ndefineSymbol(math, main, mathord, \"\\u03b7\", \"\\\\eta\", true);\ndefineSymbol(math, main, mathord, \"\\u03b8\", \"\\\\theta\", true);\ndefineSymbol(math, main, mathord, \"\\u03b9\", \"\\\\iota\", true);\ndefineSymbol(math, main, mathord, \"\\u03ba\", \"\\\\kappa\", true);\ndefineSymbol(math, main, mathord, \"\\u03bb\", \"\\\\lambda\", true);\ndefineSymbol(math, main, mathord, \"\\u03bc\", \"\\\\mu\", true);\ndefineSymbol(math, main, mathord, \"\\u03bd\", \"\\\\nu\", true);\ndefineSymbol(math, main, mathord, \"\\u03be\", \"\\\\xi\", true);\ndefineSymbol(math, main, mathord, \"\\u03bf\", \"\\\\omicron\", true);\ndefineSymbol(math, main, mathord, \"\\u03c0\", \"\\\\pi\", true);\ndefineSymbol(math, main, mathord, \"\\u03c1\", \"\\\\rho\", true);\ndefineSymbol(math, main, mathord, \"\\u03c3\", \"\\\\sigma\", true);\ndefineSymbol(math, main, mathord, \"\\u03c4\", \"\\\\tau\", true);\ndefineSymbol(math, main, mathord, \"\\u03c5\", \"\\\\upsilon\", true);\ndefineSymbol(math, main, mathord, \"\\u03d5\", \"\\\\phi\", true);\ndefineSymbol(math, main, mathord, \"\\u03c7\", \"\\\\chi\", true);\ndefineSymbol(math, main, mathord, \"\\u03c8\", \"\\\\psi\", true);\ndefineSymbol(math, main, mathord, \"\\u03c9\", \"\\\\omega\", true);\ndefineSymbol(math, main, mathord, \"\\u03b5\", \"\\\\varepsilon\", true);\ndefineSymbol(math, main, mathord, \"\\u03d1\", \"\\\\vartheta\", true);\ndefineSymbol(math, main, mathord, \"\\u03d6\", \"\\\\varpi\", true);\ndefineSymbol(math, main, mathord, \"\\u03f1\", \"\\\\varrho\", true);\ndefineSymbol(math, main, mathord, \"\\u03c2\", \"\\\\varsigma\", true);\ndefineSymbol(math, main, mathord, \"\\u03c6\", \"\\\\varphi\", true);\ndefineSymbol(math, main, bin, \"\\u2217\", \"*\", true);\ndefineSymbol(math, main, bin, \"+\", \"+\");\ndefineSymbol(math, main, bin, \"\\u2212\", \"-\", true);\ndefineSymbol(math, main, bin, \"\\u22c5\", \"\\\\cdot\", true);\ndefineSymbol(math, main, bin, \"\\u2218\", \"\\\\circ\", true);\ndefineSymbol(math, main, bin, \"\\u00f7\", \"\\\\div\", true);\ndefineSymbol(math, main, bin, \"\\u00b1\", \"\\\\pm\", true);\ndefineSymbol(math, main, bin, \"\\u00d7\", \"\\\\times\", true);\ndefineSymbol(math, main, bin, \"\\u2229\", \"\\\\cap\", true);\ndefineSymbol(math, main, bin, \"\\u222a\", \"\\\\cup\", true);\ndefineSymbol(math, main, bin, \"\\u2216\", \"\\\\setminus\", true);\ndefineSymbol(math, main, bin, \"\\u2227\", \"\\\\land\");\ndefineSymbol(math, main, bin, \"\\u2228\", \"\\\\lor\");\ndefineSymbol(math, main, bin, \"\\u2227\", \"\\\\wedge\", true);\ndefineSymbol(math, main, bin, \"\\u2228\", \"\\\\vee\", true);\ndefineSymbol(math, main, textord, \"\\u221a\", \"\\\\surd\");\ndefineSymbol(math, main, open, \"\\u27e8\", \"\\\\langle\", true);\ndefineSymbol(math, main, open, \"\\u2223\", \"\\\\lvert\");\ndefineSymbol(math, main, open, \"\\u2225\", \"\\\\lVert\");\ndefineSymbol(math, main, close, \"?\", \"?\");\ndefineSymbol(math, main, close, \"!\", \"!\");\ndefineSymbol(math, main, close, \"\\u27e9\", \"\\\\rangle\", true);\ndefineSymbol(math, main, close, \"\\u2223\", \"\\\\rvert\");\ndefineSymbol(math, main, close, \"\\u2225\", \"\\\\rVert\");\ndefineSymbol(math, main, rel, \"=\", \"=\");\ndefineSymbol(math, main, rel, \":\", \":\");\ndefineSymbol(math, main, rel, \"\\u2248\", \"\\\\approx\", true);\ndefineSymbol(math, main, rel, \"\\u2245\", \"\\\\cong\", true);\ndefineSymbol(math, main, rel, \"\\u2265\", \"\\\\ge\");\ndefineSymbol(math, main, rel, \"\\u2265\", \"\\\\geq\", true);\ndefineSymbol(math, main, rel, \"\\u2190\", \"\\\\gets\");\ndefineSymbol(math, main, rel, \">\", \"\\\\gt\", true);\ndefineSymbol(math, main, rel, \"\\u2208\", \"\\\\in\", true);\ndefineSymbol(math, main, rel, \"\\ue020\", \"\\\\@not\");\ndefineSymbol(math, main, rel, \"\\u2282\", \"\\\\subset\", true);\ndefineSymbol(math, main, rel, \"\\u2283\", \"\\\\supset\", true);\ndefineSymbol(math, main, rel, \"\\u2286\", \"\\\\subseteq\", true);\ndefineSymbol(math, main, rel, \"\\u2287\", \"\\\\supseteq\", true);\ndefineSymbol(math, ams, rel, \"\\u2288\", \"\\\\nsubseteq\", true);\ndefineSymbol(math, ams, rel, \"\\u2289\", \"\\\\nsupseteq\", true);\ndefineSymbol(math, main, rel, \"\\u22a8\", \"\\\\models\");\ndefineSymbol(math, main, rel, \"\\u2190\", \"\\\\leftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2264\", \"\\\\le\");\ndefineSymbol(math, main, rel, \"\\u2264\", \"\\\\leq\", true);\ndefineSymbol(math, main, rel, \"<\", \"\\\\lt\", true);\ndefineSymbol(math, main, rel, \"\\u2192\", \"\\\\rightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2192\", \"\\\\to\");\ndefineSymbol(math, ams, rel, \"\\u2271\", \"\\\\ngeq\", true);\ndefineSymbol(math, ams, rel, \"\\u2270\", \"\\\\nleq\", true);\ndefineSymbol(math, main, spacing, \"\\u00a0\", \"\\\\ \");\ndefineSymbol(math, main, spacing, \"\\u00a0\", \"\\\\space\"); // Ref: LaTeX Source 2e: \\DeclareRobustCommand{\\nobreakspace}{%\n\ndefineSymbol(math, main, spacing, \"\\u00a0\", \"\\\\nobreakspace\");\ndefineSymbol(text, main, spacing, \"\\u00a0\", \"\\\\ \");\ndefineSymbol(text, main, spacing, \"\\u00a0\", \" \");\ndefineSymbol(text, main, spacing, \"\\u00a0\", \"\\\\space\");\ndefineSymbol(text, main, spacing, \"\\u00a0\", \"\\\\nobreakspace\");\ndefineSymbol(math, main, spacing, null, \"\\\\nobreak\");\ndefineSymbol(math, main, spacing, null, \"\\\\allowbreak\");\ndefineSymbol(math, main, punct, \",\", \",\");\ndefineSymbol(math, main, punct, \";\", \";\");\ndefineSymbol(math, ams, bin, \"\\u22bc\", \"\\\\barwedge\", true);\ndefineSymbol(math, ams, bin, \"\\u22bb\", \"\\\\veebar\", true);\ndefineSymbol(math, main, bin, \"\\u2299\", \"\\\\odot\", true);\ndefineSymbol(math, main, bin, \"\\u2295\", \"\\\\oplus\", true);\ndefineSymbol(math, main, bin, \"\\u2297\", \"\\\\otimes\", true);\ndefineSymbol(math, main, textord, \"\\u2202\", \"\\\\partial\", true);\ndefineSymbol(math, main, bin, \"\\u2298\", \"\\\\oslash\", true);\ndefineSymbol(math, ams, bin, \"\\u229a\", \"\\\\circledcirc\", true);\ndefineSymbol(math, ams, bin, \"\\u22a1\", \"\\\\boxdot\", true);\ndefineSymbol(math, main, bin, \"\\u25b3\", \"\\\\bigtriangleup\");\ndefineSymbol(math, main, bin, \"\\u25bd\", \"\\\\bigtriangledown\");\ndefineSymbol(math, main, bin, \"\\u2020\", \"\\\\dagger\");\ndefineSymbol(math, main, bin, \"\\u22c4\", \"\\\\diamond\");\ndefineSymbol(math, main, bin, \"\\u22c6\", \"\\\\star\");\ndefineSymbol(math, main, bin, \"\\u25c3\", \"\\\\triangleleft\");\ndefineSymbol(math, main, bin, \"\\u25b9\", \"\\\\triangleright\");\ndefineSymbol(math, main, open, \"{\", \"\\\\{\");\ndefineSymbol(text, main, textord, \"{\", \"\\\\{\");\ndefineSymbol(text, main, textord, \"{\", \"\\\\textbraceleft\");\ndefineSymbol(math, main, close, \"}\", \"\\\\}\");\ndefineSymbol(text, main, textord, \"}\", \"\\\\}\");\ndefineSymbol(text, main, textord, \"}\", \"\\\\textbraceright\");\ndefineSymbol(math, main, open, \"{\", \"\\\\lbrace\");\ndefineSymbol(math, main, close, \"}\", \"\\\\rbrace\");\ndefineSymbol(math, main, open, \"[\", \"\\\\lbrack\", true);\ndefineSymbol(text, main, textord, \"[\", \"\\\\lbrack\", true);\ndefineSymbol(math, main, close, \"]\", \"\\\\rbrack\", true);\ndefineSymbol(text, main, textord, \"]\", \"\\\\rbrack\", true);\ndefineSymbol(math, main, open, \"(\", \"\\\\lparen\", true);\ndefineSymbol(math, main, close, \")\", \"\\\\rparen\", true);\ndefineSymbol(text, main, textord, \"<\", \"\\\\textless\", true); // in T1 fontenc\n\ndefineSymbol(text, main, textord, \">\", \"\\\\textgreater\", true); // in T1 fontenc\n\ndefineSymbol(math, main, open, \"\\u230a\", \"\\\\lfloor\", true);\ndefineSymbol(math, main, close, \"\\u230b\", \"\\\\rfloor\", true);\ndefineSymbol(math, main, open, \"\\u2308\", \"\\\\lceil\", true);\ndefineSymbol(math, main, close, \"\\u2309\", \"\\\\rceil\", true);\ndefineSymbol(math, main, textord, \"\\\\\", \"\\\\backslash\");\ndefineSymbol(math, main, textord, \"\\u2223\", \"|\");\ndefineSymbol(math, main, textord, \"\\u2223\", \"\\\\vert\");\ndefineSymbol(text, main, textord, \"|\", \"\\\\textbar\", true); // in T1 fontenc\n\ndefineSymbol(math, main, textord, \"\\u2225\", \"\\\\|\");\ndefineSymbol(math, main, textord, \"\\u2225\", \"\\\\Vert\");\ndefineSymbol(text, main, textord, \"\\u2225\", \"\\\\textbardbl\");\ndefineSymbol(text, main, textord, \"~\", \"\\\\textasciitilde\");\ndefineSymbol(text, main, textord, \"\\\\\", \"\\\\textbackslash\");\ndefineSymbol(text, main, textord, \"^\", \"\\\\textasciicircum\");\ndefineSymbol(math, main, rel, \"\\u2191\", \"\\\\uparrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d1\", \"\\\\Uparrow\", true);\ndefineSymbol(math, main, rel, \"\\u2193\", \"\\\\downarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d3\", \"\\\\Downarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2195\", \"\\\\updownarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d5\", \"\\\\Updownarrow\", true);\ndefineSymbol(math, main, op, \"\\u2210\", \"\\\\coprod\");\ndefineSymbol(math, main, op, \"\\u22c1\", \"\\\\bigvee\");\ndefineSymbol(math, main, op, \"\\u22c0\", \"\\\\bigwedge\");\ndefineSymbol(math, main, op, \"\\u2a04\", \"\\\\biguplus\");\ndefineSymbol(math, main, op, \"\\u22c2\", \"\\\\bigcap\");\ndefineSymbol(math, main, op, \"\\u22c3\", \"\\\\bigcup\");\ndefineSymbol(math, main, op, \"\\u222b\", \"\\\\int\");\ndefineSymbol(math, main, op, \"\\u222b\", \"\\\\intop\");\ndefineSymbol(math, main, op, \"\\u222c\", \"\\\\iint\");\ndefineSymbol(math, main, op, \"\\u222d\", \"\\\\iiint\");\ndefineSymbol(math, main, op, \"\\u220f\", \"\\\\prod\");\ndefineSymbol(math, main, op, \"\\u2211\", \"\\\\sum\");\ndefineSymbol(math, main, op, \"\\u2a02\", \"\\\\bigotimes\");\ndefineSymbol(math, main, op, \"\\u2a01\", \"\\\\bigoplus\");\ndefineSymbol(math, main, op, \"\\u2a00\", \"\\\\bigodot\");\ndefineSymbol(math, main, op, \"\\u222e\", \"\\\\oint\");\ndefineSymbol(math, main, op, \"\\u222f\", \"\\\\oiint\");\ndefineSymbol(math, main, op, \"\\u2230\", \"\\\\oiiint\");\ndefineSymbol(math, main, op, \"\\u2a06\", \"\\\\bigsqcup\");\ndefineSymbol(math, main, op, \"\\u222b\", \"\\\\smallint\");\ndefineSymbol(text, main, inner, \"\\u2026\", \"\\\\textellipsis\");\ndefineSymbol(math, main, inner, \"\\u2026\", \"\\\\mathellipsis\");\ndefineSymbol(text, main, inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(math, main, inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(math, main, inner, \"\\u22ef\", \"\\\\@cdots\", true);\ndefineSymbol(math, main, inner, \"\\u22f1\", \"\\\\ddots\", true);\ndefineSymbol(math, main, textord, \"\\u22ee\", \"\\\\varvdots\"); // \\vdots is a macro\n\ndefineSymbol(math, main, accent, \"\\u02ca\", \"\\\\acute\");\ndefineSymbol(math, main, accent, \"\\u02cb\", \"\\\\grave\");\ndefineSymbol(math, main, accent, \"\\u00a8\", \"\\\\ddot\");\ndefineSymbol(math, main, accent, \"\\u007e\", \"\\\\tilde\");\ndefineSymbol(math, main, accent, \"\\u02c9\", \"\\\\bar\");\ndefineSymbol(math, main, accent, \"\\u02d8\", \"\\\\breve\");\ndefineSymbol(math, main, accent, \"\\u02c7\", \"\\\\check\");\ndefineSymbol(math, main, accent, \"\\u005e\", \"\\\\hat\");\ndefineSymbol(math, main, accent, \"\\u20d7\", \"\\\\vec\");\ndefineSymbol(math, main, accent, \"\\u02d9\", \"\\\\dot\");\ndefineSymbol(math, main, accent, \"\\u02da\", \"\\\\mathring\"); // \\imath and \\jmath should be invariant to \\mathrm, \\mathbf, etc., so use PUA\n\ndefineSymbol(math, main, mathord, \"\\ue131\", \"\\\\@imath\");\ndefineSymbol(math, main, mathord, \"\\ue237\", \"\\\\@jmath\");\ndefineSymbol(math, main, textord, \"\\u0131\", \"\\u0131\");\ndefineSymbol(math, main, textord, \"\\u0237\", \"\\u0237\");\ndefineSymbol(text, main, textord, \"\\u0131\", \"\\\\i\", true);\ndefineSymbol(text, main, textord, \"\\u0237\", \"\\\\j\", true);\ndefineSymbol(text, main, textord, \"\\u00df\", \"\\\\ss\", true);\ndefineSymbol(text, main, textord, \"\\u00e6\", \"\\\\ae\", true);\ndefineSymbol(text, main, textord, \"\\u0153\", \"\\\\oe\", true);\ndefineSymbol(text, main, textord, \"\\u00f8\", \"\\\\o\", true);\ndefineSymbol(text, main, textord, \"\\u00c6\", \"\\\\AE\", true);\ndefineSymbol(text, main, textord, \"\\u0152\", \"\\\\OE\", true);\ndefineSymbol(text, main, textord, \"\\u00d8\", \"\\\\O\", true);\ndefineSymbol(text, main, accent, \"\\u02ca\", \"\\\\'\"); // acute\n\ndefineSymbol(text, main, accent, \"\\u02cb\", \"\\\\`\"); // grave\n\ndefineSymbol(text, main, accent, \"\\u02c6\", \"\\\\^\"); // circumflex\n\ndefineSymbol(text, main, accent, \"\\u02dc\", \"\\\\~\"); // tilde\n\ndefineSymbol(text, main, accent, \"\\u02c9\", \"\\\\=\"); // macron\n\ndefineSymbol(text, main, accent, \"\\u02d8\", \"\\\\u\"); // breve\n\ndefineSymbol(text, main, accent, \"\\u02d9\", \"\\\\.\"); // dot above\n\ndefineSymbol(text, main, accent, \"\\u00b8\", \"\\\\c\"); // cedilla\n\ndefineSymbol(text, main, accent, \"\\u02da\", \"\\\\r\"); // ring above\n\ndefineSymbol(text, main, accent, \"\\u02c7\", \"\\\\v\"); // caron\n\ndefineSymbol(text, main, accent, \"\\u00a8\", '\\\\\"'); // diaresis\n\ndefineSymbol(text, main, accent, \"\\u02dd\", \"\\\\H\"); // double acute\n\ndefineSymbol(text, main, accent, \"\\u25ef\", \"\\\\textcircled\"); // \\bigcirc glyph\n// These ligatures are detected and created in Parser.js's `formLigatures`.\n\nvar ligatures = {\n \"--\": true,\n \"---\": true,\n \"``\": true,\n \"''\": true\n};\ndefineSymbol(text, main, textord, \"\\u2013\", \"--\", true);\ndefineSymbol(text, main, textord, \"\\u2013\", \"\\\\textendash\");\ndefineSymbol(text, main, textord, \"\\u2014\", \"---\", true);\ndefineSymbol(text, main, textord, \"\\u2014\", \"\\\\textemdash\");\ndefineSymbol(text, main, textord, \"\\u2018\", \"`\", true);\ndefineSymbol(text, main, textord, \"\\u2018\", \"\\\\textquoteleft\");\ndefineSymbol(text, main, textord, \"\\u2019\", \"'\", true);\ndefineSymbol(text, main, textord, \"\\u2019\", \"\\\\textquoteright\");\ndefineSymbol(text, main, textord, \"\\u201c\", \"``\", true);\ndefineSymbol(text, main, textord, \"\\u201c\", \"\\\\textquotedblleft\");\ndefineSymbol(text, main, textord, \"\\u201d\", \"''\", true);\ndefineSymbol(text, main, textord, \"\\u201d\", \"\\\\textquotedblright\"); // \\degree from gensymb package\n\ndefineSymbol(math, main, textord, \"\\u00b0\", \"\\\\degree\", true);\ndefineSymbol(text, main, textord, \"\\u00b0\", \"\\\\degree\"); // \\textdegree from inputenc package\n\ndefineSymbol(text, main, textord, \"\\u00b0\", \"\\\\textdegree\", true); // TODO: In LaTeX, \\pounds can generate a different character in text and math\n// mode, but among our fonts, only Main-Regular defines this character \"163\".\n\ndefineSymbol(math, main, textord, \"\\u00a3\", \"\\\\pounds\");\ndefineSymbol(math, main, textord, \"\\u00a3\", \"\\\\mathsterling\", true);\ndefineSymbol(text, main, textord, \"\\u00a3\", \"\\\\pounds\");\ndefineSymbol(text, main, textord, \"\\u00a3\", \"\\\\textsterling\", true);\ndefineSymbol(math, ams, textord, \"\\u2720\", \"\\\\maltese\");\ndefineSymbol(text, ams, textord, \"\\u2720\", \"\\\\maltese\"); // There are lots of symbols which are the same, so we add them in afterwards.\n// All of these are textords in math mode\n\nvar mathTextSymbols = \"0123456789/@.\\\"\";\n\nfor (var i = 0; i < mathTextSymbols.length; i++) {\n var ch = mathTextSymbols.charAt(i);\n defineSymbol(math, main, textord, ch, ch);\n} // All of these are textords in text mode\n\n\nvar textSymbols = \"0123456789!@*()-=+\\\";:?/.,\";\n\nfor (var _i = 0; _i < textSymbols.length; _i++) {\n var _ch = textSymbols.charAt(_i);\n\n defineSymbol(text, main, textord, _ch, _ch);\n} // All of these are textords in text mode, and mathords in math mode\n\n\nvar letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\nfor (var _i2 = 0; _i2 < letters.length; _i2++) {\n var _ch2 = letters.charAt(_i2);\n\n defineSymbol(math, main, mathord, _ch2, _ch2);\n defineSymbol(text, main, textord, _ch2, _ch2);\n} // Blackboard bold and script letters in Unicode range\n\n\ndefineSymbol(math, ams, textord, \"C\", \"\\u2102\"); // blackboard bold\n\ndefineSymbol(text, ams, textord, \"C\", \"\\u2102\");\ndefineSymbol(math, ams, textord, \"H\", \"\\u210D\");\ndefineSymbol(text, ams, textord, \"H\", \"\\u210D\");\ndefineSymbol(math, ams, textord, \"N\", \"\\u2115\");\ndefineSymbol(text, ams, textord, \"N\", \"\\u2115\");\ndefineSymbol(math, ams, textord, \"P\", \"\\u2119\");\ndefineSymbol(text, ams, textord, \"P\", \"\\u2119\");\ndefineSymbol(math, ams, textord, \"Q\", \"\\u211A\");\ndefineSymbol(text, ams, textord, \"Q\", \"\\u211A\");\ndefineSymbol(math, ams, textord, \"R\", \"\\u211D\");\ndefineSymbol(text, ams, textord, \"R\", \"\\u211D\");\ndefineSymbol(math, ams, textord, \"Z\", \"\\u2124\");\ndefineSymbol(text, ams, textord, \"Z\", \"\\u2124\");\ndefineSymbol(math, main, mathord, \"h\", \"\\u210E\"); // italic h, Planck constant\n\ndefineSymbol(text, main, mathord, \"h\", \"\\u210E\"); // The next loop loads wide (surrogate pair) characters.\n// We support some letters in the Unicode range U+1D400 to U+1D7FF,\n// Mathematical Alphanumeric Symbols.\n// Some editors do not deal well with wide characters. So don't write the\n// string into this file. Instead, create the string from the surrogate pair.\n\nvar wideChar = \"\";\n\nfor (var _i3 = 0; _i3 < letters.length; _i3++) {\n var _ch3 = letters.charAt(_i3); // The hex numbers in the next line are a surrogate pair.\n // 0xD835 is the high surrogate for all letters in the range we support.\n // 0xDC00 is the low surrogate for bold A.\n\n\n wideChar = String.fromCharCode(0xD835, 0xDC00 + _i3); // A-Z a-z bold\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDC34 + _i3); // A-Z a-z italic\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDC68 + _i3); // A-Z a-z bold italic\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDD04 + _i3); // A-Z a-z Fraktur\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDD6C + _i3); // A-Z a-z bold Fraktur\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDDA0 + _i3); // A-Z a-z sans-serif\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDDD4 + _i3); // A-Z a-z sans bold\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDE08 + _i3); // A-Z a-z sans italic\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDE70 + _i3); // A-Z a-z monospace\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n\n if (_i3 < 26) {\n // KaTeX fonts have only capital letters for blackboard bold and script.\n // See exception for k below.\n wideChar = String.fromCharCode(0xD835, 0xDD38 + _i3); // A-Z double struck\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDC9C + _i3); // A-Z script\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n } // TODO: Add bold script when it is supported by a KaTeX font.\n\n} // \"k\" is the only double struck lower case letter in the KaTeX fonts.\n\n\nwideChar = String.fromCharCode(0xD835, 0xDD5C); // k double struck\n\ndefineSymbol(math, main, mathord, \"k\", wideChar);\ndefineSymbol(text, main, textord, \"k\", wideChar); // Next, some wide character numerals\n\nfor (var _i4 = 0; _i4 < 10; _i4++) {\n var _ch4 = _i4.toString();\n\n wideChar = String.fromCharCode(0xD835, 0xDFCE + _i4); // 0-9 bold\n\n defineSymbol(math, main, mathord, _ch4, wideChar);\n defineSymbol(text, main, textord, _ch4, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDFE2 + _i4); // 0-9 sans serif\n\n defineSymbol(math, main, mathord, _ch4, wideChar);\n defineSymbol(text, main, textord, _ch4, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDFEC + _i4); // 0-9 bold sans\n\n defineSymbol(math, main, mathord, _ch4, wideChar);\n defineSymbol(text, main, textord, _ch4, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDFF6 + _i4); // 0-9 monospace\n\n defineSymbol(math, main, mathord, _ch4, wideChar);\n defineSymbol(text, main, textord, _ch4, wideChar);\n} // We add these Latin-1 letters as symbols for backwards-compatibility,\n// but they are not actually in the font, nor are they supported by the\n// Unicode accent mechanism, so they fall back to Times font and look ugly.\n// TODO(edemaine): Fix this.\n\n\nvar extraLatin = \"\\u00d0\\u00de\\u00fe\";\n\nfor (var _i5 = 0; _i5 < extraLatin.length; _i5++) {\n var _ch5 = extraLatin.charAt(_i5);\n\n defineSymbol(math, main, mathord, _ch5, _ch5);\n defineSymbol(text, main, textord, _ch5, _ch5);\n}\n\n/**\n * This file provides support for Unicode range U+1D400 to U+1D7FF,\n * Mathematical Alphanumeric Symbols.\n *\n * Function wideCharacterFont takes a wide character as input and returns\n * the font information necessary to render it properly.\n */\n/**\n * Data below is from https://www.unicode.org/charts/PDF/U1D400.pdf\n * That document sorts characters into groups by font type, say bold or italic.\n *\n * In the arrays below, each subarray consists three elements:\n * * The CSS class of that group when in math mode.\n * * The CSS class of that group when in text mode.\n * * The font name, so that KaTeX can get font metrics.\n */\n\nvar wideLatinLetterData = [[\"mathbf\", \"textbf\", \"Main-Bold\"], // A-Z bold upright\n[\"mathbf\", \"textbf\", \"Main-Bold\"], // a-z bold upright\n[\"mathnormal\", \"textit\", \"Math-Italic\"], // A-Z italic\n[\"mathnormal\", \"textit\", \"Math-Italic\"], // a-z italic\n[\"boldsymbol\", \"boldsymbol\", \"Main-BoldItalic\"], // A-Z bold italic\n[\"boldsymbol\", \"boldsymbol\", \"Main-BoldItalic\"], // a-z bold italic\n// Map fancy A-Z letters to script, not calligraphic.\n// This aligns with unicode-math and math fonts (except Cambria Math).\n[\"mathscr\", \"textscr\", \"Script-Regular\"], // A-Z script\n[\"\", \"\", \"\"], // a-z script. No font\n[\"\", \"\", \"\"], // A-Z bold script. No font\n[\"\", \"\", \"\"], // a-z bold script. No font\n[\"mathfrak\", \"textfrak\", \"Fraktur-Regular\"], // A-Z Fraktur\n[\"mathfrak\", \"textfrak\", \"Fraktur-Regular\"], // a-z Fraktur\n[\"mathbb\", \"textbb\", \"AMS-Regular\"], // A-Z double-struck\n[\"mathbb\", \"textbb\", \"AMS-Regular\"], // k double-struck\n// Note that we are using a bold font, but font metrics for regular Fraktur.\n[\"mathboldfrak\", \"textboldfrak\", \"Fraktur-Regular\"], // A-Z bold Fraktur\n[\"mathboldfrak\", \"textboldfrak\", \"Fraktur-Regular\"], // a-z bold Fraktur\n[\"mathsf\", \"textsf\", \"SansSerif-Regular\"], // A-Z sans-serif\n[\"mathsf\", \"textsf\", \"SansSerif-Regular\"], // a-z sans-serif\n[\"mathboldsf\", \"textboldsf\", \"SansSerif-Bold\"], // A-Z bold sans-serif\n[\"mathboldsf\", \"textboldsf\", \"SansSerif-Bold\"], // a-z bold sans-serif\n[\"mathitsf\", \"textitsf\", \"SansSerif-Italic\"], // A-Z italic sans-serif\n[\"mathitsf\", \"textitsf\", \"SansSerif-Italic\"], // a-z italic sans-serif\n[\"\", \"\", \"\"], // A-Z bold italic sans. No font\n[\"\", \"\", \"\"], // a-z bold italic sans. No font\n[\"mathtt\", \"texttt\", \"Typewriter-Regular\"], // A-Z monospace\n[\"mathtt\", \"texttt\", \"Typewriter-Regular\"] // a-z monospace\n];\nvar wideNumeralData = [[\"mathbf\", \"textbf\", \"Main-Bold\"], // 0-9 bold\n[\"\", \"\", \"\"], // 0-9 double-struck. No KaTeX font.\n[\"mathsf\", \"textsf\", \"SansSerif-Regular\"], // 0-9 sans-serif\n[\"mathboldsf\", \"textboldsf\", \"SansSerif-Bold\"], // 0-9 bold sans-serif\n[\"mathtt\", \"texttt\", \"Typewriter-Regular\"] // 0-9 monospace\n];\nvar wideCharacterFont = function wideCharacterFont(wideChar, mode) {\n // IE doesn't support codePointAt(). So work with the surrogate pair.\n var H = wideChar.charCodeAt(0); // high surrogate\n\n var L = wideChar.charCodeAt(1); // low surrogate\n\n var codePoint = (H - 0xD800) * 0x400 + (L - 0xDC00) + 0x10000;\n var j = mode === \"math\" ? 0 : 1; // column index for CSS class.\n\n if (0x1D400 <= codePoint && codePoint < 0x1D6A4) {\n // wideLatinLetterData contains exactly 26 chars on each row.\n // So we can calculate the relevant row. No traverse necessary.\n var i = Math.floor((codePoint - 0x1D400) / 26);\n return [wideLatinLetterData[i][2], wideLatinLetterData[i][j]];\n } else if (0x1D7CE <= codePoint && codePoint <= 0x1D7FF) {\n // Numerals, ten per row.\n var _i = Math.floor((codePoint - 0x1D7CE) / 10);\n\n return [wideNumeralData[_i][2], wideNumeralData[_i][j]];\n } else if (codePoint === 0x1D6A5 || codePoint === 0x1D6A6) {\n // dotless i or j\n return [wideLatinLetterData[0][2], wideLatinLetterData[0][j]];\n } else if (0x1D6A6 < codePoint && codePoint < 0x1D7CE) {\n // Greek letters. Not supported, yet.\n return [\"\", \"\"];\n } else {\n // We don't support any wide characters outside 1D400\u20131D7FF.\n throw new ParseError(\"Unsupported character: \" + wideChar);\n }\n};\n\n/* eslint no-console:0 */\n\n/**\n * Looks up the given symbol in fontMetrics, after applying any symbol\n * replacements defined in symbol.js\n */\nvar lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this.\nfontName, mode) {\n // Replace the value with its replaced value from symbol.js\n if (symbols[mode][value] && symbols[mode][value].replace) {\n value = symbols[mode][value].replace;\n }\n\n return {\n value: value,\n metrics: getCharacterMetrics(value, fontName, mode)\n };\n};\n/**\n * Makes a symbolNode after translation via the list of symbols in symbols.js.\n * Correctly pulls out metrics for the character, and optionally takes a list of\n * classes to be attached to the node.\n *\n * TODO: make argument order closer to makeSpan\n * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which\n * should if present come first in `classes`.\n * TODO(#953): Make `options` mandatory and always pass it in.\n */\n\n\nvar makeSymbol = function makeSymbol(value, fontName, mode, options, classes) {\n var lookup = lookupSymbol(value, fontName, mode);\n var metrics = lookup.metrics;\n value = lookup.value;\n var symbolNode;\n\n if (metrics) {\n var italic = metrics.italic;\n\n if (mode === \"text\" || options && options.font === \"mathit\") {\n italic = 0;\n }\n\n symbolNode = new SymbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, metrics.width, classes);\n } else {\n // TODO(emily): Figure out a good way to only print this in development\n typeof console !== \"undefined\" && console.warn(\"No character metrics \" + (\"for '\" + value + \"' in style '\" + fontName + \"' and mode '\" + mode + \"'\"));\n symbolNode = new SymbolNode(value, 0, 0, 0, 0, 0, classes);\n }\n\n if (options) {\n symbolNode.maxFontSize = options.sizeMultiplier;\n\n if (options.style.isTight()) {\n symbolNode.classes.push(\"mtight\");\n }\n\n var color = options.getColor();\n\n if (color) {\n symbolNode.style.color = color;\n }\n }\n\n return symbolNode;\n};\n/**\n * Makes a symbol in Main-Regular or AMS-Regular.\n * Used for rel, bin, open, close, inner, and punct.\n */\n\n\nvar mathsym = function mathsym(value, mode, options, classes) {\n if (classes === void 0) {\n classes = [];\n }\n\n // Decide what font to render the symbol in by its entry in the symbols\n // table.\n // Have a special case for when the value = \\ because the \\ is used as a\n // textord in unsupported command errors but cannot be parsed as a regular\n // text ordinal and is therefore not present as a symbol in the symbols\n // table for text, as well as a special case for boldsymbol because it\n // can be used for bold + and -\n if (options.font === \"boldsymbol\" && lookupSymbol(value, \"Main-Bold\", mode).metrics) {\n return makeSymbol(value, \"Main-Bold\", mode, options, classes.concat([\"mathbf\"]));\n } else if (value === \"\\\\\" || symbols[mode][value].font === \"main\") {\n return makeSymbol(value, \"Main-Regular\", mode, options, classes);\n } else {\n return makeSymbol(value, \"AMS-Regular\", mode, options, classes.concat([\"amsrm\"]));\n }\n};\n/**\n * Determines which of the two font names (Main-Bold and Math-BoldItalic) and\n * corresponding style tags (mathbf or boldsymbol) to use for font \"boldsymbol\",\n * depending on the symbol. Use this function instead of fontMap for font\n * \"boldsymbol\".\n */\n\n\nvar boldsymbol = function boldsymbol(value, mode, options, classes, type) {\n if (type !== \"textord\" && lookupSymbol(value, \"Math-BoldItalic\", mode).metrics) {\n return {\n fontName: \"Math-BoldItalic\",\n fontClass: \"boldsymbol\"\n };\n } else {\n // Some glyphs do not exist in Math-BoldItalic so we need to use\n // Main-Bold instead.\n return {\n fontName: \"Main-Bold\",\n fontClass: \"mathbf\"\n };\n }\n};\n/**\n * Makes either a mathord or textord in the correct font and color.\n */\n\n\nvar makeOrd = function makeOrd(group, options, type) {\n var mode = group.mode;\n var text = group.text;\n var classes = [\"mord\"]; // Math mode or Old font (i.e. \\rm)\n\n var isFont = mode === \"math\" || mode === \"text\" && options.font;\n var fontOrFamily = isFont ? options.font : options.fontFamily;\n var wideFontName = \"\";\n var wideFontClass = \"\";\n\n if (text.charCodeAt(0) === 0xD835) {\n [wideFontName, wideFontClass] = wideCharacterFont(text, mode);\n }\n\n if (wideFontName.length > 0) {\n // surrogate pairs get special treatment\n return makeSymbol(text, wideFontName, mode, options, classes.concat(wideFontClass));\n } else if (fontOrFamily) {\n var fontName;\n var fontClasses;\n\n if (fontOrFamily === \"boldsymbol\") {\n var fontData = boldsymbol(text, mode, options, classes, type);\n fontName = fontData.fontName;\n fontClasses = [fontData.fontClass];\n } else if (isFont) {\n fontName = fontMap[fontOrFamily].fontName;\n fontClasses = [fontOrFamily];\n } else {\n fontName = retrieveTextFontName(fontOrFamily, options.fontWeight, options.fontShape);\n fontClasses = [fontOrFamily, options.fontWeight, options.fontShape];\n }\n\n if (lookupSymbol(text, fontName, mode).metrics) {\n return makeSymbol(text, fontName, mode, options, classes.concat(fontClasses));\n } else if (ligatures.hasOwnProperty(text) && fontName.slice(0, 10) === \"Typewriter\") {\n // Deconstruct ligatures in monospace fonts (\\texttt, \\tt).\n var parts = [];\n\n for (var i = 0; i < text.length; i++) {\n parts.push(makeSymbol(text[i], fontName, mode, options, classes.concat(fontClasses)));\n }\n\n return makeFragment(parts);\n }\n } // Makes a symbol in the default font for mathords and textords.\n\n\n if (type === \"mathord\") {\n return makeSymbol(text, \"Math-Italic\", mode, options, classes.concat([\"mathnormal\"]));\n } else if (type === \"textord\") {\n var font = symbols[mode][text] && symbols[mode][text].font;\n\n if (font === \"ams\") {\n var _fontName = retrieveTextFontName(\"amsrm\", options.fontWeight, options.fontShape);\n\n return makeSymbol(text, _fontName, mode, options, classes.concat(\"amsrm\", options.fontWeight, options.fontShape));\n } else if (font === \"main\" || !font) {\n var _fontName2 = retrieveTextFontName(\"textrm\", options.fontWeight, options.fontShape);\n\n return makeSymbol(text, _fontName2, mode, options, classes.concat(options.fontWeight, options.fontShape));\n } else {\n // fonts added by plugins\n var _fontName3 = retrieveTextFontName(font, options.fontWeight, options.fontShape); // We add font name as a css class\n\n\n return makeSymbol(text, _fontName3, mode, options, classes.concat(_fontName3, options.fontWeight, options.fontShape));\n }\n } else {\n throw new Error(\"unexpected type: \" + type + \" in makeOrd\");\n }\n};\n/**\n * Returns true if subsequent symbolNodes have the same classes, skew, maxFont,\n * and styles.\n */\n\n\nvar canCombine = (prev, next) => {\n if (createClass(prev.classes) !== createClass(next.classes) || prev.skew !== next.skew || prev.maxFontSize !== next.maxFontSize) {\n return false;\n } // If prev and next both are just \"mbin\"s or \"mord\"s we don't combine them\n // so that the proper spacing can be preserved.\n\n\n if (prev.classes.length === 1) {\n var cls = prev.classes[0];\n\n if (cls === \"mbin\" || cls === \"mord\") {\n return false;\n }\n }\n\n for (var style in prev.style) {\n if (prev.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) {\n return false;\n }\n }\n\n for (var _style in next.style) {\n if (next.style.hasOwnProperty(_style) && prev.style[_style] !== next.style[_style]) {\n return false;\n }\n }\n\n return true;\n};\n/**\n * Combine consecutive domTree.symbolNodes into a single symbolNode.\n * Note: this function mutates the argument.\n */\n\n\nvar tryCombineChars = chars => {\n for (var i = 0; i < chars.length - 1; i++) {\n var prev = chars[i];\n var next = chars[i + 1];\n\n if (prev instanceof SymbolNode && next instanceof SymbolNode && canCombine(prev, next)) {\n prev.text += next.text;\n prev.height = Math.max(prev.height, next.height);\n prev.depth = Math.max(prev.depth, next.depth); // Use the last character's italic correction since we use\n // it to add padding to the right of the span created from\n // the combined characters.\n\n prev.italic = next.italic;\n chars.splice(i + 1, 1);\n i--;\n }\n }\n\n return chars;\n};\n/**\n * Calculate the height, depth, and maxFontSize of an element based on its\n * children.\n */\n\n\nvar sizeElementFromChildren = function sizeElementFromChildren(elem) {\n var height = 0;\n var depth = 0;\n var maxFontSize = 0;\n\n for (var i = 0; i < elem.children.length; i++) {\n var child = elem.children[i];\n\n if (child.height > height) {\n height = child.height;\n }\n\n if (child.depth > depth) {\n depth = child.depth;\n }\n\n if (child.maxFontSize > maxFontSize) {\n maxFontSize = child.maxFontSize;\n }\n }\n\n elem.height = height;\n elem.depth = depth;\n elem.maxFontSize = maxFontSize;\n};\n/**\n * Makes a span with the given list of classes, list of children, and options.\n *\n * TODO(#953): Ensure that `options` is always provided (currently some call\n * sites don't pass it) and make the type below mandatory.\n * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which\n * should if present come first in `classes`.\n */\n\n\nvar makeSpan$2 = function makeSpan(classes, children, options, style) {\n var span = new Span(classes, children, options, style);\n sizeElementFromChildren(span);\n return span;\n}; // SVG one is simpler -- doesn't require height, depth, max-font setting.\n// This is also a separate method for typesafety.\n\n\nvar makeSvgSpan = (classes, children, options, style) => new Span(classes, children, options, style);\n\nvar makeLineSpan = function makeLineSpan(className, options, thickness) {\n var line = makeSpan$2([className], [], options);\n line.height = Math.max(thickness || options.fontMetrics().defaultRuleThickness, options.minRuleThickness);\n line.style.borderBottomWidth = makeEm(line.height);\n line.maxFontSize = 1.0;\n return line;\n};\n/**\n * Makes an anchor with the given href, list of classes, list of children,\n * and options.\n */\n\n\nvar makeAnchor = function makeAnchor(href, classes, children, options) {\n var anchor = new Anchor(href, classes, children, options);\n sizeElementFromChildren(anchor);\n return anchor;\n};\n/**\n * Makes a document fragment with the given list of children.\n */\n\n\nvar makeFragment = function makeFragment(children) {\n var fragment = new DocumentFragment(children);\n sizeElementFromChildren(fragment);\n return fragment;\n};\n/**\n * Wraps group in a span if it's a document fragment, allowing to apply classes\n * and styles\n */\n\n\nvar wrapFragment = function wrapFragment(group, options) {\n if (group instanceof DocumentFragment) {\n return makeSpan$2([], [group], options);\n }\n\n return group;\n}; // These are exact object types to catch typos in the names of the optional fields.\n\n\n// Computes the updated `children` list and the overall depth.\n//\n// This helper function for makeVList makes it easier to enforce type safety by\n// allowing early exits (returns) in the logic.\nvar getVListChildrenAndDepth = function getVListChildrenAndDepth(params) {\n if (params.positionType === \"individualShift\") {\n var oldChildren = params.children;\n var children = [oldChildren[0]]; // Add in kerns to the list of params.children to get each element to be\n // shifted to the correct specified shift\n\n var _depth = -oldChildren[0].shift - oldChildren[0].elem.depth;\n\n var currPos = _depth;\n\n for (var i = 1; i < oldChildren.length; i++) {\n var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth;\n var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth);\n currPos = currPos + diff;\n children.push({\n type: \"kern\",\n size\n });\n children.push(oldChildren[i]);\n }\n\n return {\n children,\n depth: _depth\n };\n }\n\n var depth;\n\n if (params.positionType === \"top\") {\n // We always start at the bottom, so calculate the bottom by adding up\n // all the sizes\n var bottom = params.positionData;\n\n for (var _i = 0; _i < params.children.length; _i++) {\n var child = params.children[_i];\n bottom -= child.type === \"kern\" ? child.size : child.elem.height + child.elem.depth;\n }\n\n depth = bottom;\n } else if (params.positionType === \"bottom\") {\n depth = -params.positionData;\n } else {\n var firstChild = params.children[0];\n\n if (firstChild.type !== \"elem\") {\n throw new Error('First child must have type \"elem\".');\n }\n\n if (params.positionType === \"shift\") {\n depth = -firstChild.elem.depth - params.positionData;\n } else if (params.positionType === \"firstBaseline\") {\n depth = -firstChild.elem.depth;\n } else {\n throw new Error(\"Invalid positionType \" + params.positionType + \".\");\n }\n }\n\n return {\n children: params.children,\n depth\n };\n};\n/**\n * Makes a vertical list by stacking elements and kerns on top of each other.\n * Allows for many different ways of specifying the positioning method.\n *\n * See VListParam documentation above.\n */\n\n\nvar makeVList = function makeVList(params, options) {\n var {\n children,\n depth\n } = getVListChildrenAndDepth(params); // Create a strut that is taller than any list item. The strut is added to\n // each item, where it will determine the item's baseline. Since it has\n // `overflow:hidden`, the strut's top edge will sit on the item's line box's\n // top edge and the strut's bottom edge will sit on the item's baseline,\n // with no additional line-height spacing. This allows the item baseline to\n // be positioned precisely without worrying about font ascent and\n // line-height.\n\n var pstrutSize = 0;\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n\n if (child.type === \"elem\") {\n var elem = child.elem;\n pstrutSize = Math.max(pstrutSize, elem.maxFontSize, elem.height);\n }\n }\n\n pstrutSize += 2;\n var pstrut = makeSpan$2([\"pstrut\"], []);\n pstrut.style.height = makeEm(pstrutSize); // Create a new list of actual children at the correct offsets\n\n var realChildren = [];\n var minPos = depth;\n var maxPos = depth;\n var currPos = depth;\n\n for (var _i2 = 0; _i2 < children.length; _i2++) {\n var _child = children[_i2];\n\n if (_child.type === \"kern\") {\n currPos += _child.size;\n } else {\n var _elem = _child.elem;\n var classes = _child.wrapperClasses || [];\n var style = _child.wrapperStyle || {};\n var childWrap = makeSpan$2(classes, [pstrut, _elem], undefined, style);\n childWrap.style.top = makeEm(-pstrutSize - currPos - _elem.depth);\n\n if (_child.marginLeft) {\n childWrap.style.marginLeft = _child.marginLeft;\n }\n\n if (_child.marginRight) {\n childWrap.style.marginRight = _child.marginRight;\n }\n\n realChildren.push(childWrap);\n currPos += _elem.height + _elem.depth;\n }\n\n minPos = Math.min(minPos, currPos);\n maxPos = Math.max(maxPos, currPos);\n } // The vlist contents go in a table-cell with `vertical-align:bottom`.\n // This cell's bottom edge will determine the containing table's baseline\n // without overly expanding the containing line-box.\n\n\n var vlist = makeSpan$2([\"vlist\"], realChildren);\n vlist.style.height = makeEm(maxPos); // A second row is used if necessary to represent the vlist's depth.\n\n var rows;\n\n if (minPos < 0) {\n // We will define depth in an empty span with display: table-cell.\n // It should render with the height that we define. But Chrome, in\n // contenteditable mode only, treats that span as if it contains some\n // text content. And that min-height over-rides our desired height.\n // So we put another empty span inside the depth strut span.\n var emptySpan = makeSpan$2([], []);\n var depthStrut = makeSpan$2([\"vlist\"], [emptySpan]);\n depthStrut.style.height = makeEm(-minPos); // Safari wants the first row to have inline content; otherwise it\n // puts the bottom of the *second* row on the baseline.\n\n var topStrut = makeSpan$2([\"vlist-s\"], [new SymbolNode(\"\\u200b\")]);\n rows = [makeSpan$2([\"vlist-r\"], [vlist, topStrut]), makeSpan$2([\"vlist-r\"], [depthStrut])];\n } else {\n rows = [makeSpan$2([\"vlist-r\"], [vlist])];\n }\n\n var vtable = makeSpan$2([\"vlist-t\"], rows);\n\n if (rows.length === 2) {\n vtable.classes.push(\"vlist-t2\");\n }\n\n vtable.height = maxPos;\n vtable.depth = -minPos;\n return vtable;\n}; // Glue is a concept from TeX which is a flexible space between elements in\n// either a vertical or horizontal list. In KaTeX, at least for now, it's\n// static space between elements in a horizontal layout.\n\n\nvar makeGlue = (measurement, options) => {\n // Make an empty span for the space\n var rule = makeSpan$2([\"mspace\"], [], options);\n var size = calculateSize(measurement, options);\n rule.style.marginRight = makeEm(size);\n return rule;\n}; // Takes font options, and returns the appropriate fontLookup name\n\n\nvar retrieveTextFontName = function retrieveTextFontName(fontFamily, fontWeight, fontShape) {\n var baseFontName = \"\";\n\n switch (fontFamily) {\n case \"amsrm\":\n baseFontName = \"AMS\";\n break;\n\n case \"textrm\":\n baseFontName = \"Main\";\n break;\n\n case \"textsf\":\n baseFontName = \"SansSerif\";\n break;\n\n case \"texttt\":\n baseFontName = \"Typewriter\";\n break;\n\n default:\n baseFontName = fontFamily;\n // use fonts added by a plugin\n }\n\n var fontStylesName;\n\n if (fontWeight === \"textbf\" && fontShape === \"textit\") {\n fontStylesName = \"BoldItalic\";\n } else if (fontWeight === \"textbf\") {\n fontStylesName = \"Bold\";\n } else if (fontWeight === \"textit\") {\n fontStylesName = \"Italic\";\n } else {\n fontStylesName = \"Regular\";\n }\n\n return baseFontName + \"-\" + fontStylesName;\n};\n/**\n * Maps TeX font commands to objects containing:\n * - variant: string used for \"mathvariant\" attribute in buildMathML.js\n * - fontName: the \"style\" parameter to fontMetrics.getCharacterMetrics\n */\n// A map between tex font commands an MathML mathvariant attribute values\n\n\nvar fontMap = {\n // styles\n \"mathbf\": {\n variant: \"bold\",\n fontName: \"Main-Bold\"\n },\n \"mathrm\": {\n variant: \"normal\",\n fontName: \"Main-Regular\"\n },\n \"textit\": {\n variant: \"italic\",\n fontName: \"Main-Italic\"\n },\n \"mathit\": {\n variant: \"italic\",\n fontName: \"Main-Italic\"\n },\n \"mathnormal\": {\n variant: \"italic\",\n fontName: \"Math-Italic\"\n },\n // \"boldsymbol\" is missing because they require the use of multiple fonts:\n // Math-BoldItalic and Main-Bold. This is handled by a special case in\n // makeOrd which ends up calling boldsymbol.\n // families\n \"mathbb\": {\n variant: \"double-struck\",\n fontName: \"AMS-Regular\"\n },\n \"mathcal\": {\n variant: \"script\",\n fontName: \"Caligraphic-Regular\"\n },\n \"mathfrak\": {\n variant: \"fraktur\",\n fontName: \"Fraktur-Regular\"\n },\n \"mathscr\": {\n variant: \"script\",\n fontName: \"Script-Regular\"\n },\n \"mathsf\": {\n variant: \"sans-serif\",\n fontName: \"SansSerif-Regular\"\n },\n \"mathtt\": {\n variant: \"monospace\",\n fontName: \"Typewriter-Regular\"\n }\n};\nvar svgData = {\n // path, width, height\n vec: [\"vec\", 0.471, 0.714],\n // values from the font glyph\n oiintSize1: [\"oiintSize1\", 0.957, 0.499],\n // oval to overlay the integrand\n oiintSize2: [\"oiintSize2\", 1.472, 0.659],\n oiiintSize1: [\"oiiintSize1\", 1.304, 0.499],\n oiiintSize2: [\"oiiintSize2\", 1.98, 0.659]\n};\n\nvar staticSvg = function staticSvg(value, options) {\n // Create a span with inline SVG for the element.\n var [pathName, width, height] = svgData[value];\n var path = new PathNode(pathName);\n var svgNode = new SvgNode([path], {\n \"width\": makeEm(width),\n \"height\": makeEm(height),\n // Override CSS rule `.katex svg { width: 100% }`\n \"style\": \"width:\" + makeEm(width),\n \"viewBox\": \"0 0 \" + 1000 * width + \" \" + 1000 * height,\n \"preserveAspectRatio\": \"xMinYMin\"\n });\n var span = makeSvgSpan([\"overlay\"], [svgNode], options);\n span.height = height;\n span.style.height = makeEm(height);\n span.style.width = makeEm(width);\n return span;\n};\n\nvar buildCommon = {\n fontMap,\n makeSymbol,\n mathsym,\n makeSpan: makeSpan$2,\n makeSvgSpan,\n makeLineSpan,\n makeAnchor,\n makeFragment,\n wrapFragment,\n makeVList,\n makeOrd,\n makeGlue,\n staticSvg,\n svgData,\n tryCombineChars\n};\n\n/**\n * Describes spaces between different classes of atoms.\n */\nvar thinspace = {\n number: 3,\n unit: \"mu\"\n};\nvar mediumspace = {\n number: 4,\n unit: \"mu\"\n};\nvar thickspace = {\n number: 5,\n unit: \"mu\"\n}; // Making the type below exact with all optional fields doesn't work due to\n// - https://github.com/facebook/flow/issues/4582\n// - https://github.com/facebook/flow/issues/5688\n// However, since *all* fields are optional, $Shape<> works as suggested in 5688\n// above.\n\n// Spacing relationships for display and text styles\nvar spacings = {\n mord: {\n mop: thinspace,\n mbin: mediumspace,\n mrel: thickspace,\n minner: thinspace\n },\n mop: {\n mord: thinspace,\n mop: thinspace,\n mrel: thickspace,\n minner: thinspace\n },\n mbin: {\n mord: mediumspace,\n mop: mediumspace,\n mopen: mediumspace,\n minner: mediumspace\n },\n mrel: {\n mord: thickspace,\n mop: thickspace,\n mopen: thickspace,\n minner: thickspace\n },\n mopen: {},\n mclose: {\n mop: thinspace,\n mbin: mediumspace,\n mrel: thickspace,\n minner: thinspace\n },\n mpunct: {\n mord: thinspace,\n mop: thinspace,\n mrel: thickspace,\n mopen: thinspace,\n mclose: thinspace,\n mpunct: thinspace,\n minner: thinspace\n },\n minner: {\n mord: thinspace,\n mop: thinspace,\n mbin: mediumspace,\n mrel: thickspace,\n mopen: thinspace,\n mpunct: thinspace,\n minner: thinspace\n }\n}; // Spacing relationships for script and scriptscript styles\n\nvar tightSpacings = {\n mord: {\n mop: thinspace\n },\n mop: {\n mord: thinspace,\n mop: thinspace\n },\n mbin: {},\n mrel: {},\n mopen: {},\n mclose: {\n mop: thinspace\n },\n mpunct: {},\n minner: {\n mop: thinspace\n }\n};\n\n/** Context provided to function handlers for error messages. */\n// Note: reverse the order of the return type union will cause a flow error.\n// See https://github.com/facebook/flow/issues/3663.\n// More general version of `HtmlBuilder` for nodes (e.g. \\sum, accent types)\n// whose presence impacts super/subscripting. In this case, ParseNode<\"supsub\">\n// delegates its HTML building to the HtmlBuilder corresponding to these nodes.\n\n/**\n * Final function spec for use at parse time.\n * This is almost identical to `FunctionPropSpec`, except it\n * 1. includes the function handler, and\n * 2. requires all arguments except argTypes.\n * It is generated by `defineFunction()` below.\n */\n\n/**\n * All registered functions.\n * `functions.js` just exports this same dictionary again and makes it public.\n * `Parser.js` requires this dictionary.\n */\nvar _functions = {};\n/**\n * All HTML builders. Should be only used in the `define*` and the `build*ML`\n * functions.\n */\n\nvar _htmlGroupBuilders = {};\n/**\n * All MathML builders. Should be only used in the `define*` and the `build*ML`\n * functions.\n */\n\nvar _mathmlGroupBuilders = {};\nfunction defineFunction(_ref) {\n var {\n type,\n names,\n props,\n handler,\n htmlBuilder,\n mathmlBuilder\n } = _ref;\n // Set default values of functions\n var data = {\n type,\n numArgs: props.numArgs,\n argTypes: props.argTypes,\n allowedInArgument: !!props.allowedInArgument,\n allowedInText: !!props.allowedInText,\n allowedInMath: props.allowedInMath === undefined ? true : props.allowedInMath,\n numOptionalArgs: props.numOptionalArgs || 0,\n infix: !!props.infix,\n primitive: !!props.primitive,\n handler: handler\n };\n\n for (var i = 0; i < names.length; ++i) {\n _functions[names[i]] = data;\n }\n\n if (type) {\n if (htmlBuilder) {\n _htmlGroupBuilders[type] = htmlBuilder;\n }\n\n if (mathmlBuilder) {\n _mathmlGroupBuilders[type] = mathmlBuilder;\n }\n }\n}\n/**\n * Use this to register only the HTML and MathML builders for a function (e.g.\n * if the function's ParseNode is generated in Parser.js rather than via a\n * stand-alone handler provided to `defineFunction`).\n */\n\nfunction defineFunctionBuilders(_ref2) {\n var {\n type,\n htmlBuilder,\n mathmlBuilder\n } = _ref2;\n defineFunction({\n type,\n names: [],\n props: {\n numArgs: 0\n },\n\n handler() {\n throw new Error('Should never be called.');\n },\n\n htmlBuilder,\n mathmlBuilder\n });\n}\nvar normalizeArgument = function normalizeArgument(arg) {\n return arg.type === \"ordgroup\" && arg.body.length === 1 ? arg.body[0] : arg;\n}; // Since the corresponding buildHTML/buildMathML function expects a\n// list of elements, we normalize for different kinds of arguments\n\nvar ordargument = function ordargument(arg) {\n return arg.type === \"ordgroup\" ? arg.body : [arg];\n};\n\n/**\n * This file does the main work of building a domTree structure from a parse\n * tree. The entry point is the `buildHTML` function, which takes a parse tree.\n * Then, the buildExpression, buildGroup, and various groupBuilders functions\n * are called, to produce a final HTML tree.\n */\nvar makeSpan$1 = buildCommon.makeSpan; // Binary atoms (first class `mbin`) change into ordinary atoms (`mord`)\n// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,\n// and the text before Rule 19.\n\nvar binLeftCanceller = [\"leftmost\", \"mbin\", \"mopen\", \"mrel\", \"mop\", \"mpunct\"];\nvar binRightCanceller = [\"rightmost\", \"mrel\", \"mclose\", \"mpunct\"];\nvar styleMap$1 = {\n \"display\": Style$1.DISPLAY,\n \"text\": Style$1.TEXT,\n \"script\": Style$1.SCRIPT,\n \"scriptscript\": Style$1.SCRIPTSCRIPT\n};\nvar DomEnum = {\n mord: \"mord\",\n mop: \"mop\",\n mbin: \"mbin\",\n mrel: \"mrel\",\n mopen: \"mopen\",\n mclose: \"mclose\",\n mpunct: \"mpunct\",\n minner: \"minner\"\n};\n\n/**\n * Take a list of nodes, build them in order, and return a list of the built\n * nodes. documentFragments are flattened into their contents, so the\n * returned list contains no fragments. `isRealGroup` is true if `expression`\n * is a real group (no atoms will be added on either side), as opposed to\n * a partial group (e.g. one created by \\color). `surrounding` is an array\n * consisting type of nodes that will be added to the left and right.\n */\nvar buildExpression$1 = function buildExpression(expression, options, isRealGroup, surrounding) {\n if (surrounding === void 0) {\n surrounding = [null, null];\n }\n\n // Parse expressions into `groups`.\n var groups = [];\n\n for (var i = 0; i < expression.length; i++) {\n var output = buildGroup$1(expression[i], options);\n\n if (output instanceof DocumentFragment) {\n var children = output.children;\n groups.push(...children);\n } else {\n groups.push(output);\n }\n } // Combine consecutive domTree.symbolNodes into a single symbolNode.\n\n\n buildCommon.tryCombineChars(groups); // If `expression` is a partial group, let the parent handle spacings\n // to avoid processing groups multiple times.\n\n if (!isRealGroup) {\n return groups;\n }\n\n var glueOptions = options;\n\n if (expression.length === 1) {\n var node = expression[0];\n\n if (node.type === \"sizing\") {\n glueOptions = options.havingSize(node.size);\n } else if (node.type === \"styling\") {\n glueOptions = options.havingStyle(styleMap$1[node.style]);\n }\n } // Dummy spans for determining spacings between surrounding atoms.\n // If `expression` has no atoms on the left or right, class \"leftmost\"\n // or \"rightmost\", respectively, is used to indicate it.\n\n\n var dummyPrev = makeSpan$1([surrounding[0] || \"leftmost\"], [], options);\n var dummyNext = makeSpan$1([surrounding[1] || \"rightmost\"], [], options); // TODO: These code assumes that a node's math class is the first element\n // of its `classes` array. A later cleanup should ensure this, for\n // instance by changing the signature of `makeSpan`.\n // Before determining what spaces to insert, perform bin cancellation.\n // Binary operators change to ordinary symbols in some contexts.\n\n var isRoot = isRealGroup === \"root\";\n traverseNonSpaceNodes(groups, (node, prev) => {\n var prevType = prev.classes[0];\n var type = node.classes[0];\n\n if (prevType === \"mbin\" && utils.contains(binRightCanceller, type)) {\n prev.classes[0] = \"mord\";\n } else if (type === \"mbin\" && utils.contains(binLeftCanceller, prevType)) {\n node.classes[0] = \"mord\";\n }\n }, {\n node: dummyPrev\n }, dummyNext, isRoot);\n traverseNonSpaceNodes(groups, (node, prev) => {\n var prevType = getTypeOfDomTree(prev);\n var type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style.\n\n var space = prevType && type ? node.hasClass(\"mtight\") ? tightSpacings[prevType][type] : spacings[prevType][type] : null;\n\n if (space) {\n // Insert glue (spacing) after the `prev`.\n return buildCommon.makeGlue(space, glueOptions);\n }\n }, {\n node: dummyPrev\n }, dummyNext, isRoot);\n return groups;\n}; // Depth-first traverse non-space `nodes`, calling `callback` with the current and\n// previous node as arguments, optionally returning a node to insert after the\n// previous node. `prev` is an object with the previous node and `insertAfter`\n// function to insert after it. `next` is a node that will be added to the right.\n// Used for bin cancellation and inserting spacings.\n\nvar traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next, isRoot) {\n if (next) {\n // temporarily append the right node, if exists\n nodes.push(next);\n }\n\n var i = 0;\n\n for (; i < nodes.length; i++) {\n var node = nodes[i];\n var partialGroup = checkPartialGroup(node);\n\n if (partialGroup) {\n // Recursive DFS\n // $FlowFixMe: make nodes a $ReadOnlyArray by returning a new array\n traverseNonSpaceNodes(partialGroup.children, callback, prev, null, isRoot);\n continue;\n } // Ignore explicit spaces (e.g., \\;, \\,) when determining what implicit\n // spacing should go between atoms of different classes\n\n\n var nonspace = !node.hasClass(\"mspace\");\n\n if (nonspace) {\n var result = callback(node, prev.node);\n\n if (result) {\n if (prev.insertAfter) {\n prev.insertAfter(result);\n } else {\n // insert at front\n nodes.unshift(result);\n i++;\n }\n }\n }\n\n if (nonspace) {\n prev.node = node;\n } else if (isRoot && node.hasClass(\"newline\")) {\n prev.node = makeSpan$1([\"leftmost\"]); // treat like beginning of line\n }\n\n prev.insertAfter = (index => n => {\n nodes.splice(index + 1, 0, n);\n i++;\n })(i);\n }\n\n if (next) {\n nodes.pop();\n }\n}; // Check if given node is a partial group, i.e., does not affect spacing around.\n\n\nvar checkPartialGroup = function checkPartialGroup(node) {\n if (node instanceof DocumentFragment || node instanceof Anchor || node instanceof Span && node.hasClass(\"enclosing\")) {\n return node;\n }\n\n return null;\n}; // Return the outermost node of a domTree.\n\n\nvar getOutermostNode = function getOutermostNode(node, side) {\n var partialGroup = checkPartialGroup(node);\n\n if (partialGroup) {\n var children = partialGroup.children;\n\n if (children.length) {\n if (side === \"right\") {\n return getOutermostNode(children[children.length - 1], \"right\");\n } else if (side === \"left\") {\n return getOutermostNode(children[0], \"left\");\n }\n }\n }\n\n return node;\n}; // Return math atom class (mclass) of a domTree.\n// If `side` is given, it will get the type of the outermost node at given side.\n\n\nvar getTypeOfDomTree = function getTypeOfDomTree(node, side) {\n if (!node) {\n return null;\n }\n\n if (side) {\n node = getOutermostNode(node, side);\n } // This makes a lot of assumptions as to where the type of atom\n // appears. We should do a better job of enforcing this.\n\n\n return DomEnum[node.classes[0]] || null;\n};\nvar makeNullDelimiter = function makeNullDelimiter(options, classes) {\n var moreClasses = [\"nulldelimiter\"].concat(options.baseSizingClasses());\n return makeSpan$1(classes.concat(moreClasses));\n};\n/**\n * buildGroup is the function that takes a group and calls the correct groupType\n * function for it. It also handles the interaction of size and style changes\n * between parents and children.\n */\n\nvar buildGroup$1 = function buildGroup(group, options, baseOptions) {\n if (!group) {\n return makeSpan$1();\n }\n\n if (_htmlGroupBuilders[group.type]) {\n // Call the groupBuilders function\n // $FlowFixMe\n var groupNode = _htmlGroupBuilders[group.type](group, options); // If the size changed between the parent and the current group, account\n // for that size difference.\n\n if (baseOptions && options.size !== baseOptions.size) {\n groupNode = makeSpan$1(options.sizingClasses(baseOptions), [groupNode], options);\n var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;\n groupNode.height *= multiplier;\n groupNode.depth *= multiplier;\n }\n\n return groupNode;\n } else {\n throw new ParseError(\"Got group of unknown type: '\" + group.type + \"'\");\n }\n};\n/**\n * Combine an array of HTML DOM nodes (e.g., the output of `buildExpression`)\n * into an unbreakable HTML node of class .base, with proper struts to\n * guarantee correct vertical extent. `buildHTML` calls this repeatedly to\n * make up the entire expression as a sequence of unbreakable units.\n */\n\nfunction buildHTMLUnbreakable(children, options) {\n // Compute height and depth of this chunk.\n var body = makeSpan$1([\"base\"], children, options); // Add strut, which ensures that the top of the HTML element falls at\n // the height of the expression, and the bottom of the HTML element\n // falls at the depth of the expression.\n\n var strut = makeSpan$1([\"strut\"]);\n strut.style.height = makeEm(body.height + body.depth);\n\n if (body.depth) {\n strut.style.verticalAlign = makeEm(-body.depth);\n }\n\n body.children.unshift(strut);\n return body;\n}\n/**\n * Take an entire parse tree, and build it into an appropriate set of HTML\n * nodes.\n */\n\n\nfunction buildHTML(tree, options) {\n // Strip off outer tag wrapper for processing below.\n var tag = null;\n\n if (tree.length === 1 && tree[0].type === \"tag\") {\n tag = tree[0].tag;\n tree = tree[0].body;\n } // Build the expression contained in the tree\n\n\n var expression = buildExpression$1(tree, options, \"root\");\n var eqnNum;\n\n if (expression.length === 2 && expression[1].hasClass(\"tag\")) {\n // An environment with automatic equation numbers, e.g. {gather}.\n eqnNum = expression.pop();\n }\n\n var children = []; // Create one base node for each chunk between potential line breaks.\n // The TeXBook [p.173] says \"A formula will be broken only after a\n // relation symbol like $=$ or $<$ or $\\rightarrow$, or after a binary\n // operation symbol like $+$ or $-$ or $\\times$, where the relation or\n // binary operation is on the ``outer level'' of the formula (i.e., not\n // enclosed in {...} and not part of an \\over construction).\"\n\n var parts = [];\n\n for (var i = 0; i < expression.length; i++) {\n parts.push(expression[i]);\n\n if (expression[i].hasClass(\"mbin\") || expression[i].hasClass(\"mrel\") || expression[i].hasClass(\"allowbreak\")) {\n // Put any post-operator glue on same line as operator.\n // Watch for \\nobreak along the way, and stop at \\newline.\n var nobreak = false;\n\n while (i < expression.length - 1 && expression[i + 1].hasClass(\"mspace\") && !expression[i + 1].hasClass(\"newline\")) {\n i++;\n parts.push(expression[i]);\n\n if (expression[i].hasClass(\"nobreak\")) {\n nobreak = true;\n }\n } // Don't allow break if \\nobreak among the post-operator glue.\n\n\n if (!nobreak) {\n children.push(buildHTMLUnbreakable(parts, options));\n parts = [];\n }\n } else if (expression[i].hasClass(\"newline\")) {\n // Write the line except the newline\n parts.pop();\n\n if (parts.length > 0) {\n children.push(buildHTMLUnbreakable(parts, options));\n parts = [];\n } // Put the newline at the top level\n\n\n children.push(expression[i]);\n }\n }\n\n if (parts.length > 0) {\n children.push(buildHTMLUnbreakable(parts, options));\n } // Now, if there was a tag, build it too and append it as a final child.\n\n\n var tagChild;\n\n if (tag) {\n tagChild = buildHTMLUnbreakable(buildExpression$1(tag, options, true));\n tagChild.classes = [\"tag\"];\n children.push(tagChild);\n } else if (eqnNum) {\n children.push(eqnNum);\n }\n\n var htmlNode = makeSpan$1([\"katex-html\"], children);\n htmlNode.setAttribute(\"aria-hidden\", \"true\"); // Adjust the strut of the tag to be the maximum height of all children\n // (the height of the enclosing htmlNode) for proper vertical alignment.\n\n if (tagChild) {\n var strut = tagChild.children[0];\n strut.style.height = makeEm(htmlNode.height + htmlNode.depth);\n\n if (htmlNode.depth) {\n strut.style.verticalAlign = makeEm(-htmlNode.depth);\n }\n }\n\n return htmlNode;\n}\n\n/**\n * These objects store data about MathML nodes. This is the MathML equivalent\n * of the types in domTree.js. Since MathML handles its own rendering, and\n * since we're mainly using MathML to improve accessibility, we don't manage\n * any of the styling state that the plain DOM nodes do.\n *\n * The `toNode` and `toMarkup` functions work similarly to how they do in\n * domTree.js, creating namespaced DOM nodes and HTML text markup respectively.\n */\nfunction newDocumentFragment(children) {\n return new DocumentFragment(children);\n}\n/**\n * This node represents a general purpose MathML node of any type. The\n * constructor requires the type of node to create (for example, `\"mo\"` or\n * `\"mspace\"`, corresponding to `` and `` tags).\n */\n\nclass MathNode {\n constructor(type, children, classes) {\n this.type = void 0;\n this.attributes = void 0;\n this.children = void 0;\n this.classes = void 0;\n this.type = type;\n this.attributes = {};\n this.children = children || [];\n this.classes = classes || [];\n }\n /**\n * Sets an attribute on a MathML node. MathML depends on attributes to convey a\n * semantic content, so this is used heavily.\n */\n\n\n setAttribute(name, value) {\n this.attributes[name] = value;\n }\n /**\n * Gets an attribute on a MathML node.\n */\n\n\n getAttribute(name) {\n return this.attributes[name];\n }\n /**\n * Converts the math node into a MathML-namespaced DOM element.\n */\n\n\n toNode() {\n var node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", this.type);\n\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n if (this.classes.length > 0) {\n node.className = createClass(this.classes);\n }\n\n for (var i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n\n return node;\n }\n /**\n * Converts the math node into an HTML markup string.\n */\n\n\n toMarkup() {\n var markup = \"<\" + this.type; // Add the attributes\n\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n markup += \" \" + attr + \"=\\\"\";\n markup += utils.escape(this.attributes[attr]);\n markup += \"\\\"\";\n }\n }\n\n if (this.classes.length > 0) {\n markup += \" class =\\\"\" + utils.escape(createClass(this.classes)) + \"\\\"\";\n }\n\n markup += \">\";\n\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += \"\";\n return markup;\n }\n /**\n * Converts the math node into a string, similar to innerText, but escaped.\n */\n\n\n toText() {\n return this.children.map(child => child.toText()).join(\"\");\n }\n\n}\n/**\n * This node represents a piece of text.\n */\n\nclass TextNode {\n constructor(text) {\n this.text = void 0;\n this.text = text;\n }\n /**\n * Converts the text node into a DOM text node.\n */\n\n\n toNode() {\n return document.createTextNode(this.text);\n }\n /**\n * Converts the text node into escaped HTML markup\n * (representing the text itself).\n */\n\n\n toMarkup() {\n return utils.escape(this.toText());\n }\n /**\n * Converts the text node into a string\n * (representing the text itself).\n */\n\n\n toText() {\n return this.text;\n }\n\n}\n/**\n * This node represents a space, but may render as or as text,\n * depending on the width.\n */\n\nclass SpaceNode {\n /**\n * Create a Space node with width given in CSS ems.\n */\n constructor(width) {\n this.width = void 0;\n this.character = void 0;\n this.width = width; // See https://www.w3.org/TR/2000/WD-MathML2-20000328/chapter6.html\n // for a table of space-like characters. We use Unicode\n // representations instead of &LongNames; as it's not clear how to\n // make the latter via document.createTextNode.\n\n if (width >= 0.05555 && width <= 0.05556) {\n this.character = \"\\u200a\"; //  \n } else if (width >= 0.1666 && width <= 0.1667) {\n this.character = \"\\u2009\"; //  \n } else if (width >= 0.2222 && width <= 0.2223) {\n this.character = \"\\u2005\"; //  \n } else if (width >= 0.2777 && width <= 0.2778) {\n this.character = \"\\u2005\\u200a\"; //   \n } else if (width >= -0.05556 && width <= -0.05555) {\n this.character = \"\\u200a\\u2063\"; // ​\n } else if (width >= -0.1667 && width <= -0.1666) {\n this.character = \"\\u2009\\u2063\"; // ​\n } else if (width >= -0.2223 && width <= -0.2222) {\n this.character = \"\\u205f\\u2063\"; // ​\n } else if (width >= -0.2778 && width <= -0.2777) {\n this.character = \"\\u2005\\u2063\"; // ​\n } else {\n this.character = null;\n }\n }\n /**\n * Converts the math node into a MathML-namespaced DOM element.\n */\n\n\n toNode() {\n if (this.character) {\n return document.createTextNode(this.character);\n } else {\n var node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", \"mspace\");\n node.setAttribute(\"width\", makeEm(this.width));\n return node;\n }\n }\n /**\n * Converts the math node into an HTML markup string.\n */\n\n\n toMarkup() {\n if (this.character) {\n return \"\" + this.character + \"\";\n } else {\n return \"\";\n }\n }\n /**\n * Converts the math node into a string, similar to innerText.\n */\n\n\n toText() {\n if (this.character) {\n return this.character;\n } else {\n return \" \";\n }\n }\n\n}\n\nvar mathMLTree = {\n MathNode,\n TextNode,\n SpaceNode,\n newDocumentFragment\n};\n\n/**\n * This file converts a parse tree into a corresponding MathML tree. The main\n * entry point is the `buildMathML` function, which takes a parse tree from the\n * parser.\n */\n\n/**\n * Takes a symbol and converts it into a MathML text node after performing\n * optional replacement from symbols.js.\n */\nvar makeText = function makeText(text, mode, options) {\n if (symbols[mode][text] && symbols[mode][text].replace && text.charCodeAt(0) !== 0xD835 && !(ligatures.hasOwnProperty(text) && options && (options.fontFamily && options.fontFamily.slice(4, 6) === \"tt\" || options.font && options.font.slice(4, 6) === \"tt\"))) {\n text = symbols[mode][text].replace;\n }\n\n return new mathMLTree.TextNode(text);\n};\n/**\n * Wrap the given array of nodes in an node if needed, i.e.,\n * unless the array has length 1. Always returns a single node.\n */\n\nvar makeRow = function makeRow(body) {\n if (body.length === 1) {\n return body[0];\n } else {\n return new mathMLTree.MathNode(\"mrow\", body);\n }\n};\n/**\n * Returns the math variant as a string or null if none is required.\n */\n\nvar getVariant = function getVariant(group, options) {\n // Handle \\text... font specifiers as best we can.\n // MathML has a limited list of allowable mathvariant specifiers; see\n // https://www.w3.org/TR/MathML3/chapter3.html#presm.commatt\n if (options.fontFamily === \"texttt\") {\n return \"monospace\";\n } else if (options.fontFamily === \"textsf\") {\n if (options.fontShape === \"textit\" && options.fontWeight === \"textbf\") {\n return \"sans-serif-bold-italic\";\n } else if (options.fontShape === \"textit\") {\n return \"sans-serif-italic\";\n } else if (options.fontWeight === \"textbf\") {\n return \"bold-sans-serif\";\n } else {\n return \"sans-serif\";\n }\n } else if (options.fontShape === \"textit\" && options.fontWeight === \"textbf\") {\n return \"bold-italic\";\n } else if (options.fontShape === \"textit\") {\n return \"italic\";\n } else if (options.fontWeight === \"textbf\") {\n return \"bold\";\n }\n\n var font = options.font;\n\n if (!font || font === \"mathnormal\") {\n return null;\n }\n\n var mode = group.mode;\n\n if (font === \"mathit\") {\n return \"italic\";\n } else if (font === \"boldsymbol\") {\n return group.type === \"textord\" ? \"bold\" : \"bold-italic\";\n } else if (font === \"mathbf\") {\n return \"bold\";\n } else if (font === \"mathbb\") {\n return \"double-struck\";\n } else if (font === \"mathfrak\") {\n return \"fraktur\";\n } else if (font === \"mathscr\" || font === \"mathcal\") {\n // MathML makes no distinction between script and calligraphic\n return \"script\";\n } else if (font === \"mathsf\") {\n return \"sans-serif\";\n } else if (font === \"mathtt\") {\n return \"monospace\";\n }\n\n var text = group.text;\n\n if (utils.contains([\"\\\\imath\", \"\\\\jmath\"], text)) {\n return null;\n }\n\n if (symbols[mode][text] && symbols[mode][text].replace) {\n text = symbols[mode][text].replace;\n }\n\n var fontName = buildCommon.fontMap[font].fontName;\n\n if (getCharacterMetrics(text, fontName, mode)) {\n return buildCommon.fontMap[font].variant;\n }\n\n return null;\n};\n/**\n * Takes a list of nodes, builds them, and returns a list of the generated\n * MathML nodes. Also combine consecutive outputs into a single\n * tag.\n */\n\nvar buildExpression = function buildExpression(expression, options, isOrdgroup) {\n if (expression.length === 1) {\n var group = buildGroup(expression[0], options);\n\n if (isOrdgroup && group instanceof MathNode && group.type === \"mo\") {\n // When TeX writers want to suppress spacing on an operator,\n // they often put the operator by itself inside braces.\n group.setAttribute(\"lspace\", \"0em\");\n group.setAttribute(\"rspace\", \"0em\");\n }\n\n return [group];\n }\n\n var groups = [];\n var lastGroup;\n\n for (var i = 0; i < expression.length; i++) {\n var _group = buildGroup(expression[i], options);\n\n if (_group instanceof MathNode && lastGroup instanceof MathNode) {\n // Concatenate adjacent s\n if (_group.type === 'mtext' && lastGroup.type === 'mtext' && _group.getAttribute('mathvariant') === lastGroup.getAttribute('mathvariant')) {\n lastGroup.children.push(..._group.children);\n continue; // Concatenate adjacent s\n } else if (_group.type === 'mn' && lastGroup.type === 'mn') {\n lastGroup.children.push(..._group.children);\n continue; // Concatenate ... followed by .\n } else if (_group.type === 'mi' && _group.children.length === 1 && lastGroup.type === 'mn') {\n var child = _group.children[0];\n\n if (child instanceof TextNode && child.text === '.') {\n lastGroup.children.push(..._group.children);\n continue;\n }\n } else if (lastGroup.type === 'mi' && lastGroup.children.length === 1) {\n var lastChild = lastGroup.children[0];\n\n if (lastChild instanceof TextNode && lastChild.text === '\\u0338' && (_group.type === 'mo' || _group.type === 'mi' || _group.type === 'mn')) {\n var _child = _group.children[0];\n\n if (_child instanceof TextNode && _child.text.length > 0) {\n // Overlay with combining character long solidus\n _child.text = _child.text.slice(0, 1) + \"\\u0338\" + _child.text.slice(1);\n groups.pop();\n }\n }\n }\n }\n\n groups.push(_group);\n lastGroup = _group;\n }\n\n return groups;\n};\n/**\n * Equivalent to buildExpression, but wraps the elements in an \n * if there's more than one. Returns a single node instead of an array.\n */\n\nvar buildExpressionRow = function buildExpressionRow(expression, options, isOrdgroup) {\n return makeRow(buildExpression(expression, options, isOrdgroup));\n};\n/**\n * Takes a group from the parser and calls the appropriate groupBuilders function\n * on it to produce a MathML node.\n */\n\nvar buildGroup = function buildGroup(group, options) {\n if (!group) {\n return new mathMLTree.MathNode(\"mrow\");\n }\n\n if (_mathmlGroupBuilders[group.type]) {\n // Call the groupBuilders function\n // $FlowFixMe\n var result = _mathmlGroupBuilders[group.type](group, options); // $FlowFixMe\n\n return result;\n } else {\n throw new ParseError(\"Got group of unknown type: '\" + group.type + \"'\");\n }\n};\n/**\n * Takes a full parse tree and settings and builds a MathML representation of\n * it. In particular, we put the elements from building the parse tree into a\n * tag so we can also include that TeX source as an annotation.\n *\n * Note that we actually return a domTree element with a `` inside it so\n * we can do appropriate styling.\n */\n\nfunction buildMathML(tree, texExpression, options, isDisplayMode, forMathmlOnly) {\n var expression = buildExpression(tree, options); // TODO: Make a pass thru the MathML similar to buildHTML.traverseNonSpaceNodes\n // and add spacing nodes. This is necessary only adjacent to math operators\n // like \\sin or \\lim or to subsup elements that contain math operators.\n // MathML takes care of the other spacing issues.\n // Wrap up the expression in an mrow so it is presented in the semantics\n // tag correctly, unless it's a single or .\n\n var wrapper;\n\n if (expression.length === 1 && expression[0] instanceof MathNode && utils.contains([\"mrow\", \"mtable\"], expression[0].type)) {\n wrapper = expression[0];\n } else {\n wrapper = new mathMLTree.MathNode(\"mrow\", expression);\n } // Build a TeX annotation of the source\n\n\n var annotation = new mathMLTree.MathNode(\"annotation\", [new mathMLTree.TextNode(texExpression)]);\n annotation.setAttribute(\"encoding\", \"application/x-tex\");\n var semantics = new mathMLTree.MathNode(\"semantics\", [wrapper, annotation]);\n var math = new mathMLTree.MathNode(\"math\", [semantics]);\n math.setAttribute(\"xmlns\", \"http://www.w3.org/1998/Math/MathML\");\n\n if (isDisplayMode) {\n math.setAttribute(\"display\", \"block\");\n } // You can't style nodes, so we wrap the node in a span.\n // NOTE: The span class is not typed to have nodes as children, and\n // we don't want to make the children type more generic since the children\n // of span are expected to have more fields in `buildHtml` contexts.\n\n\n var wrapperClass = forMathmlOnly ? \"katex\" : \"katex-mathml\"; // $FlowFixMe\n\n return buildCommon.makeSpan([wrapperClass], [math]);\n}\n\nvar optionsFromSettings = function optionsFromSettings(settings) {\n return new Options({\n style: settings.displayMode ? Style$1.DISPLAY : Style$1.TEXT,\n maxSize: settings.maxSize,\n minRuleThickness: settings.minRuleThickness\n });\n};\n\nvar displayWrap = function displayWrap(node, settings) {\n if (settings.displayMode) {\n var classes = [\"katex-display\"];\n\n if (settings.leqno) {\n classes.push(\"leqno\");\n }\n\n if (settings.fleqn) {\n classes.push(\"fleqn\");\n }\n\n node = buildCommon.makeSpan(classes, [node]);\n }\n\n return node;\n};\n\nvar buildTree = function buildTree(tree, expression, settings) {\n var options = optionsFromSettings(settings);\n var katexNode;\n\n if (settings.output === \"mathml\") {\n return buildMathML(tree, expression, options, settings.displayMode, true);\n } else if (settings.output === \"html\") {\n var htmlNode = buildHTML(tree, options);\n katexNode = buildCommon.makeSpan([\"katex\"], [htmlNode]);\n } else {\n var mathMLNode = buildMathML(tree, expression, options, settings.displayMode, false);\n\n var _htmlNode = buildHTML(tree, options);\n\n katexNode = buildCommon.makeSpan([\"katex\"], [mathMLNode, _htmlNode]);\n }\n\n return displayWrap(katexNode, settings);\n};\nvar buildHTMLTree = function buildHTMLTree(tree, expression, settings) {\n var options = optionsFromSettings(settings);\n var htmlNode = buildHTML(tree, options);\n var katexNode = buildCommon.makeSpan([\"katex\"], [htmlNode]);\n return displayWrap(katexNode, settings);\n};\n\n/**\n * This file provides support to buildMathML.js and buildHTML.js\n * for stretchy wide elements rendered from SVG files\n * and other CSS trickery.\n */\nvar stretchyCodePoint = {\n widehat: \"^\",\n widecheck: \"\u02C7\",\n widetilde: \"~\",\n utilde: \"~\",\n overleftarrow: \"\\u2190\",\n underleftarrow: \"\\u2190\",\n xleftarrow: \"\\u2190\",\n overrightarrow: \"\\u2192\",\n underrightarrow: \"\\u2192\",\n xrightarrow: \"\\u2192\",\n underbrace: \"\\u23df\",\n overbrace: \"\\u23de\",\n overgroup: \"\\u23e0\",\n undergroup: \"\\u23e1\",\n overleftrightarrow: \"\\u2194\",\n underleftrightarrow: \"\\u2194\",\n xleftrightarrow: \"\\u2194\",\n Overrightarrow: \"\\u21d2\",\n xRightarrow: \"\\u21d2\",\n overleftharpoon: \"\\u21bc\",\n xleftharpoonup: \"\\u21bc\",\n overrightharpoon: \"\\u21c0\",\n xrightharpoonup: \"\\u21c0\",\n xLeftarrow: \"\\u21d0\",\n xLeftrightarrow: \"\\u21d4\",\n xhookleftarrow: \"\\u21a9\",\n xhookrightarrow: \"\\u21aa\",\n xmapsto: \"\\u21a6\",\n xrightharpoondown: \"\\u21c1\",\n xleftharpoondown: \"\\u21bd\",\n xrightleftharpoons: \"\\u21cc\",\n xleftrightharpoons: \"\\u21cb\",\n xtwoheadleftarrow: \"\\u219e\",\n xtwoheadrightarrow: \"\\u21a0\",\n xlongequal: \"=\",\n xtofrom: \"\\u21c4\",\n xrightleftarrows: \"\\u21c4\",\n xrightequilibrium: \"\\u21cc\",\n // Not a perfect match.\n xleftequilibrium: \"\\u21cb\",\n // None better available.\n \"\\\\cdrightarrow\": \"\\u2192\",\n \"\\\\cdleftarrow\": \"\\u2190\",\n \"\\\\cdlongequal\": \"=\"\n};\n\nvar mathMLnode = function mathMLnode(label) {\n var node = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(stretchyCodePoint[label.replace(/^\\\\/, '')])]);\n node.setAttribute(\"stretchy\", \"true\");\n return node;\n}; // Many of the KaTeX SVG images have been adapted from glyphs in KaTeX fonts.\n// Copyright (c) 2009-2010, Design Science, Inc. ()\n// Copyright (c) 2014-2017 Khan Academy ()\n// Licensed under the SIL Open Font License, Version 1.1.\n// See \\nhttp://scripts.sil.org/OFL\n// Very Long SVGs\n// Many of the KaTeX stretchy wide elements use a long SVG image and an\n// overflow: hidden tactic to achieve a stretchy image while avoiding\n// distortion of arrowheads or brace corners.\n// The SVG typically contains a very long (400 em) arrow.\n// The SVG is in a container span that has overflow: hidden, so the span\n// acts like a window that exposes only part of the SVG.\n// The SVG always has a longer, thinner aspect ratio than the container span.\n// After the SVG fills 100% of the height of the container span,\n// there is a long arrow shaft left over. That left-over shaft is not shown.\n// Instead, it is sliced off because the span's CSS has overflow: hidden.\n// Thus, the reader sees an arrow that matches the subject matter width\n// without distortion.\n// Some functions, such as \\cancel, need to vary their aspect ratio. These\n// functions do not get the overflow SVG treatment.\n// Second Brush Stroke\n// Low resolution monitors struggle to display images in fine detail.\n// So browsers apply anti-aliasing. A long straight arrow shaft therefore\n// will sometimes appear as if it has a blurred edge.\n// To mitigate this, these SVG files contain a second \"brush-stroke\" on the\n// arrow shafts. That is, a second long thin rectangular SVG path has been\n// written directly on top of each arrow shaft. This reinforcement causes\n// some of the screen pixels to display as black instead of the anti-aliased\n// gray pixel that a single path would generate. So we get arrow shafts\n// whose edges appear to be sharper.\n// In the katexImagesData object just below, the dimensions all\n// correspond to path geometry inside the relevant SVG.\n// For example, \\overrightarrow uses the same arrowhead as glyph U+2192\n// from the KaTeX Main font. The scaling factor is 1000.\n// That is, inside the font, that arrowhead is 522 units tall, which\n// corresponds to 0.522 em inside the document.\n\n\nvar katexImagesData = {\n // path(s), minWidth, height, align\n overrightarrow: [[\"rightarrow\"], 0.888, 522, \"xMaxYMin\"],\n overleftarrow: [[\"leftarrow\"], 0.888, 522, \"xMinYMin\"],\n underrightarrow: [[\"rightarrow\"], 0.888, 522, \"xMaxYMin\"],\n underleftarrow: [[\"leftarrow\"], 0.888, 522, \"xMinYMin\"],\n xrightarrow: [[\"rightarrow\"], 1.469, 522, \"xMaxYMin\"],\n \"\\\\cdrightarrow\": [[\"rightarrow\"], 3.0, 522, \"xMaxYMin\"],\n // CD minwwidth2.5pc\n xleftarrow: [[\"leftarrow\"], 1.469, 522, \"xMinYMin\"],\n \"\\\\cdleftarrow\": [[\"leftarrow\"], 3.0, 522, \"xMinYMin\"],\n Overrightarrow: [[\"doublerightarrow\"], 0.888, 560, \"xMaxYMin\"],\n xRightarrow: [[\"doublerightarrow\"], 1.526, 560, \"xMaxYMin\"],\n xLeftarrow: [[\"doubleleftarrow\"], 1.526, 560, \"xMinYMin\"],\n overleftharpoon: [[\"leftharpoon\"], 0.888, 522, \"xMinYMin\"],\n xleftharpoonup: [[\"leftharpoon\"], 0.888, 522, \"xMinYMin\"],\n xleftharpoondown: [[\"leftharpoondown\"], 0.888, 522, \"xMinYMin\"],\n overrightharpoon: [[\"rightharpoon\"], 0.888, 522, \"xMaxYMin\"],\n xrightharpoonup: [[\"rightharpoon\"], 0.888, 522, \"xMaxYMin\"],\n xrightharpoondown: [[\"rightharpoondown\"], 0.888, 522, \"xMaxYMin\"],\n xlongequal: [[\"longequal\"], 0.888, 334, \"xMinYMin\"],\n \"\\\\cdlongequal\": [[\"longequal\"], 3.0, 334, \"xMinYMin\"],\n xtwoheadleftarrow: [[\"twoheadleftarrow\"], 0.888, 334, \"xMinYMin\"],\n xtwoheadrightarrow: [[\"twoheadrightarrow\"], 0.888, 334, \"xMaxYMin\"],\n overleftrightarrow: [[\"leftarrow\", \"rightarrow\"], 0.888, 522],\n overbrace: [[\"leftbrace\", \"midbrace\", \"rightbrace\"], 1.6, 548],\n underbrace: [[\"leftbraceunder\", \"midbraceunder\", \"rightbraceunder\"], 1.6, 548],\n underleftrightarrow: [[\"leftarrow\", \"rightarrow\"], 0.888, 522],\n xleftrightarrow: [[\"leftarrow\", \"rightarrow\"], 1.75, 522],\n xLeftrightarrow: [[\"doubleleftarrow\", \"doublerightarrow\"], 1.75, 560],\n xrightleftharpoons: [[\"leftharpoondownplus\", \"rightharpoonplus\"], 1.75, 716],\n xleftrightharpoons: [[\"leftharpoonplus\", \"rightharpoondownplus\"], 1.75, 716],\n xhookleftarrow: [[\"leftarrow\", \"righthook\"], 1.08, 522],\n xhookrightarrow: [[\"lefthook\", \"rightarrow\"], 1.08, 522],\n overlinesegment: [[\"leftlinesegment\", \"rightlinesegment\"], 0.888, 522],\n underlinesegment: [[\"leftlinesegment\", \"rightlinesegment\"], 0.888, 522],\n overgroup: [[\"leftgroup\", \"rightgroup\"], 0.888, 342],\n undergroup: [[\"leftgroupunder\", \"rightgroupunder\"], 0.888, 342],\n xmapsto: [[\"leftmapsto\", \"rightarrow\"], 1.5, 522],\n xtofrom: [[\"leftToFrom\", \"rightToFrom\"], 1.75, 528],\n // The next three arrows are from the mhchem package.\n // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the\n // document as \\xrightarrow or \\xrightleftharpoons. Those have\n // min-length = 1.75em, so we set min-length on these next three to match.\n xrightleftarrows: [[\"baraboveleftarrow\", \"rightarrowabovebar\"], 1.75, 901],\n xrightequilibrium: [[\"baraboveshortleftharpoon\", \"rightharpoonaboveshortbar\"], 1.75, 716],\n xleftequilibrium: [[\"shortbaraboveleftharpoon\", \"shortrightharpoonabovebar\"], 1.75, 716]\n};\n\nvar groupLength = function groupLength(arg) {\n if (arg.type === \"ordgroup\") {\n return arg.body.length;\n } else {\n return 1;\n }\n};\n\nvar svgSpan = function svgSpan(group, options) {\n // Create a span with inline SVG for the element.\n function buildSvgSpan_() {\n var viewBoxWidth = 400000; // default\n\n var label = group.label.slice(1);\n\n if (utils.contains([\"widehat\", \"widecheck\", \"widetilde\", \"utilde\"], label)) {\n // Each type in the `if` statement corresponds to one of the ParseNode\n // types below. This narrowing is required to access `grp.base`.\n // $FlowFixMe\n var grp = group; // There are four SVG images available for each function.\n // Choose a taller image when there are more characters.\n\n var numChars = groupLength(grp.base);\n var viewBoxHeight;\n var pathName;\n\n var _height;\n\n if (numChars > 5) {\n if (label === \"widehat\" || label === \"widecheck\") {\n viewBoxHeight = 420;\n viewBoxWidth = 2364;\n _height = 0.42;\n pathName = label + \"4\";\n } else {\n viewBoxHeight = 312;\n viewBoxWidth = 2340;\n _height = 0.34;\n pathName = \"tilde4\";\n }\n } else {\n var imgIndex = [1, 1, 2, 2, 3, 3][numChars];\n\n if (label === \"widehat\" || label === \"widecheck\") {\n viewBoxWidth = [0, 1062, 2364, 2364, 2364][imgIndex];\n viewBoxHeight = [0, 239, 300, 360, 420][imgIndex];\n _height = [0, 0.24, 0.3, 0.3, 0.36, 0.42][imgIndex];\n pathName = label + imgIndex;\n } else {\n viewBoxWidth = [0, 600, 1033, 2339, 2340][imgIndex];\n viewBoxHeight = [0, 260, 286, 306, 312][imgIndex];\n _height = [0, 0.26, 0.286, 0.3, 0.306, 0.34][imgIndex];\n pathName = \"tilde\" + imgIndex;\n }\n }\n\n var path = new PathNode(pathName);\n var svgNode = new SvgNode([path], {\n \"width\": \"100%\",\n \"height\": makeEm(_height),\n \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + viewBoxHeight,\n \"preserveAspectRatio\": \"none\"\n });\n return {\n span: buildCommon.makeSvgSpan([], [svgNode], options),\n minWidth: 0,\n height: _height\n };\n } else {\n var spans = [];\n var data = katexImagesData[label];\n var [paths, _minWidth, _viewBoxHeight] = data;\n\n var _height2 = _viewBoxHeight / 1000;\n\n var numSvgChildren = paths.length;\n var widthClasses;\n var aligns;\n\n if (numSvgChildren === 1) {\n // $FlowFixMe: All these cases must be of the 4-tuple type.\n var align1 = data[3];\n widthClasses = [\"hide-tail\"];\n aligns = [align1];\n } else if (numSvgChildren === 2) {\n widthClasses = [\"halfarrow-left\", \"halfarrow-right\"];\n aligns = [\"xMinYMin\", \"xMaxYMin\"];\n } else if (numSvgChildren === 3) {\n widthClasses = [\"brace-left\", \"brace-center\", \"brace-right\"];\n aligns = [\"xMinYMin\", \"xMidYMin\", \"xMaxYMin\"];\n } else {\n throw new Error(\"Correct katexImagesData or update code here to support\\n \" + numSvgChildren + \" children.\");\n }\n\n for (var i = 0; i < numSvgChildren; i++) {\n var _path = new PathNode(paths[i]);\n\n var _svgNode = new SvgNode([_path], {\n \"width\": \"400em\",\n \"height\": makeEm(_height2),\n \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + _viewBoxHeight,\n \"preserveAspectRatio\": aligns[i] + \" slice\"\n });\n\n var _span = buildCommon.makeSvgSpan([widthClasses[i]], [_svgNode], options);\n\n if (numSvgChildren === 1) {\n return {\n span: _span,\n minWidth: _minWidth,\n height: _height2\n };\n } else {\n _span.style.height = makeEm(_height2);\n spans.push(_span);\n }\n }\n\n return {\n span: buildCommon.makeSpan([\"stretchy\"], spans, options),\n minWidth: _minWidth,\n height: _height2\n };\n }\n } // buildSvgSpan_()\n\n\n var {\n span,\n minWidth,\n height\n } = buildSvgSpan_(); // Note that we are returning span.depth = 0.\n // Any adjustments relative to the baseline must be done in buildHTML.\n\n span.height = height;\n span.style.height = makeEm(height);\n\n if (minWidth > 0) {\n span.style.minWidth = makeEm(minWidth);\n }\n\n return span;\n};\n\nvar encloseSpan = function encloseSpan(inner, label, topPad, bottomPad, options) {\n // Return an image span for \\cancel, \\bcancel, \\xcancel, \\fbox, or \\angl\n var img;\n var totalHeight = inner.height + inner.depth + topPad + bottomPad;\n\n if (/fbox|color|angl/.test(label)) {\n img = buildCommon.makeSpan([\"stretchy\", label], [], options);\n\n if (label === \"fbox\") {\n var color = options.color && options.getColor();\n\n if (color) {\n img.style.borderColor = color;\n }\n }\n } else {\n // \\cancel, \\bcancel, or \\xcancel\n // Since \\cancel's SVG is inline and it omits the viewBox attribute,\n // its stroke-width will not vary with span area.\n var lines = [];\n\n if (/^[bx]cancel$/.test(label)) {\n lines.push(new LineNode({\n \"x1\": \"0\",\n \"y1\": \"0\",\n \"x2\": \"100%\",\n \"y2\": \"100%\",\n \"stroke-width\": \"0.046em\"\n }));\n }\n\n if (/^x?cancel$/.test(label)) {\n lines.push(new LineNode({\n \"x1\": \"0\",\n \"y1\": \"100%\",\n \"x2\": \"100%\",\n \"y2\": \"0\",\n \"stroke-width\": \"0.046em\"\n }));\n }\n\n var svgNode = new SvgNode(lines, {\n \"width\": \"100%\",\n \"height\": makeEm(totalHeight)\n });\n img = buildCommon.makeSvgSpan([], [svgNode], options);\n }\n\n img.height = totalHeight;\n img.style.height = makeEm(totalHeight);\n return img;\n};\n\nvar stretchy = {\n encloseSpan,\n mathMLnode,\n svgSpan\n};\n\n/**\n * Asserts that the node is of the given type and returns it with stricter\n * typing. Throws if the node's type does not match.\n */\nfunction assertNodeType(node, type) {\n if (!node || node.type !== type) {\n throw new Error(\"Expected node of type \" + type + \", but got \" + (node ? \"node of type \" + node.type : String(node)));\n } // $FlowFixMe, >=0.125\n\n\n return node;\n}\n/**\n * Returns the node more strictly typed iff it is of the given type. Otherwise,\n * returns null.\n */\n\nfunction assertSymbolNodeType(node) {\n var typedNode = checkSymbolNodeType(node);\n\n if (!typedNode) {\n throw new Error(\"Expected node of symbol group type, but got \" + (node ? \"node of type \" + node.type : String(node)));\n }\n\n return typedNode;\n}\n/**\n * Returns the node more strictly typed iff it is of the given type. Otherwise,\n * returns null.\n */\n\nfunction checkSymbolNodeType(node) {\n if (node && (node.type === \"atom\" || NON_ATOMS.hasOwnProperty(node.type))) {\n // $FlowFixMe\n return node;\n }\n\n return null;\n}\n\n// NOTE: Unlike most `htmlBuilder`s, this one handles not only \"accent\", but\n// also \"supsub\" since an accent can affect super/subscripting.\nvar htmlBuilder$a = (grp, options) => {\n // Accents are handled in the TeXbook pg. 443, rule 12.\n var base;\n var group;\n var supSubGroup;\n\n if (grp && grp.type === \"supsub\") {\n // If our base is a character box, and we have superscripts and\n // subscripts, the supsub will defer to us. In particular, we want\n // to attach the superscripts and subscripts to the inner body (so\n // that the position of the superscripts and subscripts won't be\n // affected by the height of the accent). We accomplish this by\n // sticking the base of the accent into the base of the supsub, and\n // rendering that, while keeping track of where the accent is.\n // The real accent group is the base of the supsub group\n group = assertNodeType(grp.base, \"accent\"); // The character box is the base of the accent group\n\n base = group.base; // Stick the character box into the base of the supsub group\n\n grp.base = base; // Rerender the supsub group with its new base, and store that\n // result.\n\n supSubGroup = assertSpan(buildGroup$1(grp, options)); // reset original base\n\n grp.base = group;\n } else {\n group = assertNodeType(grp, \"accent\");\n base = group.base;\n } // Build the base group\n\n\n var body = buildGroup$1(base, options.havingCrampedStyle()); // Does the accent need to shift for the skew of a character?\n\n var mustShift = group.isShifty && utils.isCharacterBox(base); // Calculate the skew of the accent. This is based on the line \"If the\n // nucleus is not a single character, let s = 0; otherwise set s to the\n // kern amount for the nucleus followed by the \\skewchar of its font.\"\n // Note that our skew metrics are just the kern between each character\n // and the skewchar.\n\n var skew = 0;\n\n if (mustShift) {\n // If the base is a character box, then we want the skew of the\n // innermost character. To do that, we find the innermost character:\n var baseChar = utils.getBaseElem(base); // Then, we render its group to get the symbol inside it\n\n var baseGroup = buildGroup$1(baseChar, options.havingCrampedStyle()); // Finally, we pull the skew off of the symbol.\n\n skew = assertSymbolDomNode(baseGroup).skew; // Note that we now throw away baseGroup, because the layers we\n // removed with getBaseElem might contain things like \\color which\n // we can't get rid of.\n // TODO(emily): Find a better way to get the skew\n }\n\n var accentBelow = group.label === \"\\\\c\"; // calculate the amount of space between the body and the accent\n\n var clearance = accentBelow ? body.height + body.depth : Math.min(body.height, options.fontMetrics().xHeight); // Build the accent\n\n var accentBody;\n\n if (!group.isStretchy) {\n var accent;\n var width;\n\n if (group.label === \"\\\\vec\") {\n // Before version 0.9, \\vec used the combining font glyph U+20D7.\n // But browsers, especially Safari, are not consistent in how they\n // render combining characters when not preceded by a character.\n // So now we use an SVG.\n // If Safari reforms, we should consider reverting to the glyph.\n accent = buildCommon.staticSvg(\"vec\", options);\n width = buildCommon.svgData.vec[1];\n } else {\n accent = buildCommon.makeOrd({\n mode: group.mode,\n text: group.label\n }, options, \"textord\");\n accent = assertSymbolDomNode(accent); // Remove the italic correction of the accent, because it only serves to\n // shift the accent over to a place we don't want.\n\n accent.italic = 0;\n width = accent.width;\n\n if (accentBelow) {\n clearance += accent.depth;\n }\n }\n\n accentBody = buildCommon.makeSpan([\"accent-body\"], [accent]); // \"Full\" accents expand the width of the resulting symbol to be\n // at least the width of the accent, and overlap directly onto the\n // character without any vertical offset.\n\n var accentFull = group.label === \"\\\\textcircled\";\n\n if (accentFull) {\n accentBody.classes.push('accent-full');\n clearance = body.height;\n } // Shift the accent over by the skew.\n\n\n var left = skew; // CSS defines `.katex .accent .accent-body:not(.accent-full) { width: 0 }`\n // so that the accent doesn't contribute to the bounding box.\n // We need to shift the character by its width (effectively half\n // its width) to compensate.\n\n if (!accentFull) {\n left -= width / 2;\n }\n\n accentBody.style.left = makeEm(left); // \\textcircled uses the \\bigcirc glyph, so it needs some\n // vertical adjustment to match LaTeX.\n\n if (group.label === \"\\\\textcircled\") {\n accentBody.style.top = \".2em\";\n }\n\n accentBody = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: body\n }, {\n type: \"kern\",\n size: -clearance\n }, {\n type: \"elem\",\n elem: accentBody\n }]\n }, options);\n } else {\n accentBody = stretchy.svgSpan(group, options);\n accentBody = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: body\n }, {\n type: \"elem\",\n elem: accentBody,\n wrapperClasses: [\"svg-align\"],\n wrapperStyle: skew > 0 ? {\n width: \"calc(100% - \" + makeEm(2 * skew) + \")\",\n marginLeft: makeEm(2 * skew)\n } : undefined\n }]\n }, options);\n }\n\n var accentWrap = buildCommon.makeSpan([\"mord\", \"accent\"], [accentBody], options);\n\n if (supSubGroup) {\n // Here, we replace the \"base\" child of the supsub with our newly\n // generated accent.\n supSubGroup.children[0] = accentWrap; // Since we don't rerun the height calculation after replacing the\n // accent, we manually recalculate height.\n\n supSubGroup.height = Math.max(accentWrap.height, supSubGroup.height); // Accents should always be ords, even when their innards are not.\n\n supSubGroup.classes[0] = \"mord\";\n return supSubGroup;\n } else {\n return accentWrap;\n }\n};\n\nvar mathmlBuilder$9 = (group, options) => {\n var accentNode = group.isStretchy ? stretchy.mathMLnode(group.label) : new mathMLTree.MathNode(\"mo\", [makeText(group.label, group.mode)]);\n var node = new mathMLTree.MathNode(\"mover\", [buildGroup(group.base, options), accentNode]);\n node.setAttribute(\"accent\", \"true\");\n return node;\n};\n\nvar NON_STRETCHY_ACCENT_REGEX = new RegExp([\"\\\\acute\", \"\\\\grave\", \"\\\\ddot\", \"\\\\tilde\", \"\\\\bar\", \"\\\\breve\", \"\\\\check\", \"\\\\hat\", \"\\\\vec\", \"\\\\dot\", \"\\\\mathring\"].map(accent => \"\\\\\" + accent).join(\"|\")); // Accents\n\ndefineFunction({\n type: \"accent\",\n names: [\"\\\\acute\", \"\\\\grave\", \"\\\\ddot\", \"\\\\tilde\", \"\\\\bar\", \"\\\\breve\", \"\\\\check\", \"\\\\hat\", \"\\\\vec\", \"\\\\dot\", \"\\\\mathring\", \"\\\\widecheck\", \"\\\\widehat\", \"\\\\widetilde\", \"\\\\overrightarrow\", \"\\\\overleftarrow\", \"\\\\Overrightarrow\", \"\\\\overleftrightarrow\", \"\\\\overgroup\", \"\\\\overlinesegment\", \"\\\\overleftharpoon\", \"\\\\overrightharpoon\"],\n props: {\n numArgs: 1\n },\n handler: (context, args) => {\n var base = normalizeArgument(args[0]);\n var isStretchy = !NON_STRETCHY_ACCENT_REGEX.test(context.funcName);\n var isShifty = !isStretchy || context.funcName === \"\\\\widehat\" || context.funcName === \"\\\\widetilde\" || context.funcName === \"\\\\widecheck\";\n return {\n type: \"accent\",\n mode: context.parser.mode,\n label: context.funcName,\n isStretchy: isStretchy,\n isShifty: isShifty,\n base: base\n };\n },\n htmlBuilder: htmlBuilder$a,\n mathmlBuilder: mathmlBuilder$9\n}); // Text-mode accents\n\ndefineFunction({\n type: \"accent\",\n names: [\"\\\\'\", \"\\\\`\", \"\\\\^\", \"\\\\~\", \"\\\\=\", \"\\\\u\", \"\\\\.\", '\\\\\"', \"\\\\c\", \"\\\\r\", \"\\\\H\", \"\\\\v\", \"\\\\textcircled\"],\n props: {\n numArgs: 1,\n allowedInText: true,\n allowedInMath: true,\n // unless in strict mode\n argTypes: [\"primitive\"]\n },\n handler: (context, args) => {\n var base = args[0];\n var mode = context.parser.mode;\n\n if (mode === \"math\") {\n context.parser.settings.reportNonstrict(\"mathVsTextAccents\", \"LaTeX's accent \" + context.funcName + \" works only in text mode\");\n mode = \"text\";\n }\n\n return {\n type: \"accent\",\n mode: mode,\n label: context.funcName,\n isStretchy: false,\n isShifty: true,\n base: base\n };\n },\n htmlBuilder: htmlBuilder$a,\n mathmlBuilder: mathmlBuilder$9\n});\n\n// Horizontal overlap functions\ndefineFunction({\n type: \"accentUnder\",\n names: [\"\\\\underleftarrow\", \"\\\\underrightarrow\", \"\\\\underleftrightarrow\", \"\\\\undergroup\", \"\\\\underlinesegment\", \"\\\\utilde\"],\n props: {\n numArgs: 1\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var base = args[0];\n return {\n type: \"accentUnder\",\n mode: parser.mode,\n label: funcName,\n base: base\n };\n },\n htmlBuilder: (group, options) => {\n // Treat under accents much like underlines.\n var innerGroup = buildGroup$1(group.base, options);\n var accentBody = stretchy.svgSpan(group, options);\n var kern = group.label === \"\\\\utilde\" ? 0.12 : 0; // Generate the vlist, with the appropriate kerns\n\n var vlist = buildCommon.makeVList({\n positionType: \"top\",\n positionData: innerGroup.height,\n children: [{\n type: \"elem\",\n elem: accentBody,\n wrapperClasses: [\"svg-align\"]\n }, {\n type: \"kern\",\n size: kern\n }, {\n type: \"elem\",\n elem: innerGroup\n }]\n }, options);\n return buildCommon.makeSpan([\"mord\", \"accentunder\"], [vlist], options);\n },\n mathmlBuilder: (group, options) => {\n var accentNode = stretchy.mathMLnode(group.label);\n var node = new mathMLTree.MathNode(\"munder\", [buildGroup(group.base, options), accentNode]);\n node.setAttribute(\"accentunder\", \"true\");\n return node;\n }\n});\n\n// Helper function\nvar paddedNode = group => {\n var node = new mathMLTree.MathNode(\"mpadded\", group ? [group] : []);\n node.setAttribute(\"width\", \"+0.6em\");\n node.setAttribute(\"lspace\", \"0.3em\");\n return node;\n}; // Stretchy arrows with an optional argument\n\n\ndefineFunction({\n type: \"xArrow\",\n names: [\"\\\\xleftarrow\", \"\\\\xrightarrow\", \"\\\\xLeftarrow\", \"\\\\xRightarrow\", \"\\\\xleftrightarrow\", \"\\\\xLeftrightarrow\", \"\\\\xhookleftarrow\", \"\\\\xhookrightarrow\", \"\\\\xmapsto\", \"\\\\xrightharpoondown\", \"\\\\xrightharpoonup\", \"\\\\xleftharpoondown\", \"\\\\xleftharpoonup\", \"\\\\xrightleftharpoons\", \"\\\\xleftrightharpoons\", \"\\\\xlongequal\", \"\\\\xtwoheadrightarrow\", \"\\\\xtwoheadleftarrow\", \"\\\\xtofrom\", // The next 3 functions are here to support the mhchem extension.\n // Direct use of these functions is discouraged and may break someday.\n \"\\\\xrightleftarrows\", \"\\\\xrightequilibrium\", \"\\\\xleftequilibrium\", // The next 3 functions are here only to support the {CD} environment.\n \"\\\\\\\\cdrightarrow\", \"\\\\\\\\cdleftarrow\", \"\\\\\\\\cdlongequal\"],\n props: {\n numArgs: 1,\n numOptionalArgs: 1\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser,\n funcName\n } = _ref;\n return {\n type: \"xArrow\",\n mode: parser.mode,\n label: funcName,\n body: args[0],\n below: optArgs[0]\n };\n },\n\n // Flow is unable to correctly infer the type of `group`, even though it's\n // unambiguously determined from the passed-in `type` above.\n htmlBuilder(group, options) {\n var style = options.style; // Build the argument groups in the appropriate style.\n // Ref: amsmath.dtx: \\hbox{$\\scriptstyle\\mkern#3mu{#6}\\mkern#4mu$}%\n // Some groups can return document fragments. Handle those by wrapping\n // them in a span.\n\n var newOptions = options.havingStyle(style.sup());\n var upperGroup = buildCommon.wrapFragment(buildGroup$1(group.body, newOptions, options), options);\n var arrowPrefix = group.label.slice(0, 2) === \"\\\\x\" ? \"x\" : \"cd\";\n upperGroup.classes.push(arrowPrefix + \"-arrow-pad\");\n var lowerGroup;\n\n if (group.below) {\n // Build the lower group\n newOptions = options.havingStyle(style.sub());\n lowerGroup = buildCommon.wrapFragment(buildGroup$1(group.below, newOptions, options), options);\n lowerGroup.classes.push(arrowPrefix + \"-arrow-pad\");\n }\n\n var arrowBody = stretchy.svgSpan(group, options); // Re shift: Note that stretchy.svgSpan returned arrowBody.depth = 0.\n // The point we want on the math axis is at 0.5 * arrowBody.height.\n\n var arrowShift = -options.fontMetrics().axisHeight + 0.5 * arrowBody.height; // 2 mu kern. Ref: amsmath.dtx: #7\\if0#2\\else\\mkern#2mu\\fi\n\n var upperShift = -options.fontMetrics().axisHeight - 0.5 * arrowBody.height - 0.111; // 0.111 em = 2 mu\n\n if (upperGroup.depth > 0.25 || group.label === \"\\\\xleftequilibrium\") {\n upperShift -= upperGroup.depth; // shift up if depth encroaches\n } // Generate the vlist\n\n\n var vlist;\n\n if (lowerGroup) {\n var lowerShift = -options.fontMetrics().axisHeight + lowerGroup.height + 0.5 * arrowBody.height + 0.111;\n vlist = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: upperGroup,\n shift: upperShift\n }, {\n type: \"elem\",\n elem: arrowBody,\n shift: arrowShift\n }, {\n type: \"elem\",\n elem: lowerGroup,\n shift: lowerShift\n }]\n }, options);\n } else {\n vlist = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: upperGroup,\n shift: upperShift\n }, {\n type: \"elem\",\n elem: arrowBody,\n shift: arrowShift\n }]\n }, options);\n } // $FlowFixMe: Replace this with passing \"svg-align\" into makeVList.\n\n\n vlist.children[0].children[0].children[1].classes.push(\"svg-align\");\n return buildCommon.makeSpan([\"mrel\", \"x-arrow\"], [vlist], options);\n },\n\n mathmlBuilder(group, options) {\n var arrowNode = stretchy.mathMLnode(group.label);\n arrowNode.setAttribute(\"minsize\", group.label.charAt(0) === \"x\" ? \"1.75em\" : \"3.0em\");\n var node;\n\n if (group.body) {\n var upperNode = paddedNode(buildGroup(group.body, options));\n\n if (group.below) {\n var lowerNode = paddedNode(buildGroup(group.below, options));\n node = new mathMLTree.MathNode(\"munderover\", [arrowNode, lowerNode, upperNode]);\n } else {\n node = new mathMLTree.MathNode(\"mover\", [arrowNode, upperNode]);\n }\n } else if (group.below) {\n var _lowerNode = paddedNode(buildGroup(group.below, options));\n\n node = new mathMLTree.MathNode(\"munder\", [arrowNode, _lowerNode]);\n } else {\n // This should never happen.\n // Parser.js throws an error if there is no argument.\n node = paddedNode();\n node = new mathMLTree.MathNode(\"mover\", [arrowNode, node]);\n }\n\n return node;\n }\n\n});\n\nvar makeSpan = buildCommon.makeSpan;\n\nfunction htmlBuilder$9(group, options) {\n var elements = buildExpression$1(group.body, options, true);\n return makeSpan([group.mclass], elements, options);\n}\n\nfunction mathmlBuilder$8(group, options) {\n var node;\n var inner = buildExpression(group.body, options);\n\n if (group.mclass === \"minner\") {\n node = new mathMLTree.MathNode(\"mpadded\", inner);\n } else if (group.mclass === \"mord\") {\n if (group.isCharacterBox) {\n node = inner[0];\n node.type = \"mi\";\n } else {\n node = new mathMLTree.MathNode(\"mi\", inner);\n }\n } else {\n if (group.isCharacterBox) {\n node = inner[0];\n node.type = \"mo\";\n } else {\n node = new mathMLTree.MathNode(\"mo\", inner);\n } // Set spacing based on what is the most likely adjacent atom type.\n // See TeXbook p170.\n\n\n if (group.mclass === \"mbin\") {\n node.attributes.lspace = \"0.22em\"; // medium space\n\n node.attributes.rspace = \"0.22em\";\n } else if (group.mclass === \"mpunct\") {\n node.attributes.lspace = \"0em\";\n node.attributes.rspace = \"0.17em\"; // thinspace\n } else if (group.mclass === \"mopen\" || group.mclass === \"mclose\") {\n node.attributes.lspace = \"0em\";\n node.attributes.rspace = \"0em\";\n } else if (group.mclass === \"minner\") {\n node.attributes.lspace = \"0.0556em\"; // 1 mu is the most likely option\n\n node.attributes.width = \"+0.1111em\";\n } // MathML default space is 5/18 em, so needs no action.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mo\n\n }\n\n return node;\n} // Math class commands except \\mathop\n\n\ndefineFunction({\n type: \"mclass\",\n names: [\"\\\\mathord\", \"\\\\mathbin\", \"\\\\mathrel\", \"\\\\mathopen\", \"\\\\mathclose\", \"\\\\mathpunct\", \"\\\\mathinner\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n var body = args[0];\n return {\n type: \"mclass\",\n mode: parser.mode,\n mclass: \"m\" + funcName.slice(5),\n // TODO(kevinb): don't prefix with 'm'\n body: ordargument(body),\n isCharacterBox: utils.isCharacterBox(body)\n };\n },\n\n htmlBuilder: htmlBuilder$9,\n mathmlBuilder: mathmlBuilder$8\n});\nvar binrelClass = arg => {\n // \\binrel@ spacing varies with (bin|rel|ord) of the atom in the argument.\n // (by rendering separately and with {}s before and after, and measuring\n // the change in spacing). We'll do roughly the same by detecting the\n // atom type directly.\n var atom = arg.type === \"ordgroup\" && arg.body.length ? arg.body[0] : arg;\n\n if (atom.type === \"atom\" && (atom.family === \"bin\" || atom.family === \"rel\")) {\n return \"m\" + atom.family;\n } else {\n return \"mord\";\n }\n}; // \\@binrel{x}{y} renders like y but as mbin/mrel/mord if x is mbin/mrel/mord.\n// This is equivalent to \\binrel@{x}\\binrel@@{y} in AMSTeX.\n\ndefineFunction({\n type: \"mclass\",\n names: [\"\\\\@binrel\"],\n props: {\n numArgs: 2\n },\n\n handler(_ref2, args) {\n var {\n parser\n } = _ref2;\n return {\n type: \"mclass\",\n mode: parser.mode,\n mclass: binrelClass(args[0]),\n body: ordargument(args[1]),\n isCharacterBox: utils.isCharacterBox(args[1])\n };\n }\n\n}); // Build a relation or stacked op by placing one symbol on top of another\n\ndefineFunction({\n type: \"mclass\",\n names: [\"\\\\stackrel\", \"\\\\overset\", \"\\\\underset\"],\n props: {\n numArgs: 2\n },\n\n handler(_ref3, args) {\n var {\n parser,\n funcName\n } = _ref3;\n var baseArg = args[1];\n var shiftedArg = args[0];\n var mclass;\n\n if (funcName !== \"\\\\stackrel\") {\n // LaTeX applies \\binrel spacing to \\overset and \\underset.\n mclass = binrelClass(baseArg);\n } else {\n mclass = \"mrel\"; // for \\stackrel\n }\n\n var baseOp = {\n type: \"op\",\n mode: baseArg.mode,\n limits: true,\n alwaysHandleSupSub: true,\n parentIsSupSub: false,\n symbol: false,\n suppressBaseShift: funcName !== \"\\\\stackrel\",\n body: ordargument(baseArg)\n };\n var supsub = {\n type: \"supsub\",\n mode: shiftedArg.mode,\n base: baseOp,\n sup: funcName === \"\\\\underset\" ? null : shiftedArg,\n sub: funcName === \"\\\\underset\" ? shiftedArg : null\n };\n return {\n type: \"mclass\",\n mode: parser.mode,\n mclass,\n body: [supsub],\n isCharacterBox: utils.isCharacterBox(supsub)\n };\n },\n\n htmlBuilder: htmlBuilder$9,\n mathmlBuilder: mathmlBuilder$8\n});\n\n// \\pmb is a simulation of bold font.\n// The version of \\pmb in ambsy.sty works by typesetting three copies\n// with small offsets. We use CSS text-shadow.\n// It's a hack. Not as good as a real bold font. Better than nothing.\ndefineFunction({\n type: \"pmb\",\n names: [\"\\\\pmb\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n return {\n type: \"pmb\",\n mode: parser.mode,\n mclass: binrelClass(args[0]),\n body: ordargument(args[0])\n };\n },\n\n htmlBuilder(group, options) {\n var elements = buildExpression$1(group.body, options, true);\n var node = buildCommon.makeSpan([group.mclass], elements, options);\n node.style.textShadow = \"0.02em 0.01em 0.04px\";\n return node;\n },\n\n mathmlBuilder(group, style) {\n var inner = buildExpression(group.body, style); // Wrap with an element.\n\n var node = new mathMLTree.MathNode(\"mstyle\", inner);\n node.setAttribute(\"style\", \"text-shadow: 0.02em 0.01em 0.04px\");\n return node;\n }\n\n});\n\nvar cdArrowFunctionName = {\n \">\": \"\\\\\\\\cdrightarrow\",\n \"<\": \"\\\\\\\\cdleftarrow\",\n \"=\": \"\\\\\\\\cdlongequal\",\n \"A\": \"\\\\uparrow\",\n \"V\": \"\\\\downarrow\",\n \"|\": \"\\\\Vert\",\n \".\": \"no arrow\"\n};\n\nvar newCell = () => {\n // Create an empty cell, to be filled below with parse nodes.\n // The parseTree from this module must be constructed like the\n // one created by parseArray(), so an empty CD cell must\n // be a ParseNode<\"styling\">. And CD is always displaystyle.\n // So these values are fixed and flow can do implicit typing.\n return {\n type: \"styling\",\n body: [],\n mode: \"math\",\n style: \"display\"\n };\n};\n\nvar isStartOfArrow = node => {\n return node.type === \"textord\" && node.text === \"@\";\n};\n\nvar isLabelEnd = (node, endChar) => {\n return (node.type === \"mathord\" || node.type === \"atom\") && node.text === endChar;\n};\n\nfunction cdArrow(arrowChar, labels, parser) {\n // Return a parse tree of an arrow and its labels.\n // This acts in a way similar to a macro expansion.\n var funcName = cdArrowFunctionName[arrowChar];\n\n switch (funcName) {\n case \"\\\\\\\\cdrightarrow\":\n case \"\\\\\\\\cdleftarrow\":\n return parser.callFunction(funcName, [labels[0]], [labels[1]]);\n\n case \"\\\\uparrow\":\n case \"\\\\downarrow\":\n {\n var leftLabel = parser.callFunction(\"\\\\\\\\cdleft\", [labels[0]], []);\n var bareArrow = {\n type: \"atom\",\n text: funcName,\n mode: \"math\",\n family: \"rel\"\n };\n var sizedArrow = parser.callFunction(\"\\\\Big\", [bareArrow], []);\n var rightLabel = parser.callFunction(\"\\\\\\\\cdright\", [labels[1]], []);\n var arrowGroup = {\n type: \"ordgroup\",\n mode: \"math\",\n body: [leftLabel, sizedArrow, rightLabel]\n };\n return parser.callFunction(\"\\\\\\\\cdparent\", [arrowGroup], []);\n }\n\n case \"\\\\\\\\cdlongequal\":\n return parser.callFunction(\"\\\\\\\\cdlongequal\", [], []);\n\n case \"\\\\Vert\":\n {\n var arrow = {\n type: \"textord\",\n text: \"\\\\Vert\",\n mode: \"math\"\n };\n return parser.callFunction(\"\\\\Big\", [arrow], []);\n }\n\n default:\n return {\n type: \"textord\",\n text: \" \",\n mode: \"math\"\n };\n }\n}\n\nfunction parseCD(parser) {\n // Get the array's parse nodes with \\\\ temporarily mapped to \\cr.\n var parsedRows = [];\n parser.gullet.beginGroup();\n parser.gullet.macros.set(\"\\\\cr\", \"\\\\\\\\\\\\relax\");\n parser.gullet.beginGroup();\n\n while (true) {\n // eslint-disable-line no-constant-condition\n // Get the parse nodes for the next row.\n parsedRows.push(parser.parseExpression(false, \"\\\\\\\\\"));\n parser.gullet.endGroup();\n parser.gullet.beginGroup();\n var next = parser.fetch().text;\n\n if (next === \"&\" || next === \"\\\\\\\\\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n if (parsedRows[parsedRows.length - 1].length === 0) {\n parsedRows.pop(); // final row ended in \\\\\n }\n\n break;\n } else {\n throw new ParseError(\"Expected \\\\\\\\ or \\\\cr or \\\\end\", parser.nextToken);\n }\n }\n\n var row = [];\n var body = [row]; // Loop thru the parse nodes. Collect them into cells and arrows.\n\n for (var i = 0; i < parsedRows.length; i++) {\n // Start a new row.\n var rowNodes = parsedRows[i]; // Create the first cell.\n\n var cell = newCell();\n\n for (var j = 0; j < rowNodes.length; j++) {\n if (!isStartOfArrow(rowNodes[j])) {\n // If a parseNode is not an arrow, it goes into a cell.\n cell.body.push(rowNodes[j]);\n } else {\n // Parse node j is an \"@\", the start of an arrow.\n // Before starting on the arrow, push the cell into `row`.\n row.push(cell); // Now collect parseNodes into an arrow.\n // The character after \"@\" defines the arrow type.\n\n j += 1;\n var arrowChar = assertSymbolNodeType(rowNodes[j]).text; // Create two empty label nodes. We may or may not use them.\n\n var labels = new Array(2);\n labels[0] = {\n type: \"ordgroup\",\n mode: \"math\",\n body: []\n };\n labels[1] = {\n type: \"ordgroup\",\n mode: \"math\",\n body: []\n }; // Process the arrow.\n\n if (\"=|.\".indexOf(arrowChar) > -1) ; else if (\"<>AV\".indexOf(arrowChar) > -1) {\n // Four arrows, `@>>>`, `@<<<`, `@AAA`, and `@VVV`, each take\n // two optional labels. E.g. the right-point arrow syntax is\n // really: @>{optional label}>{optional label}>\n // Collect parseNodes into labels.\n for (var labelNum = 0; labelNum < 2; labelNum++) {\n var inLabel = true;\n\n for (var k = j + 1; k < rowNodes.length; k++) {\n if (isLabelEnd(rowNodes[k], arrowChar)) {\n inLabel = false;\n j = k;\n break;\n }\n\n if (isStartOfArrow(rowNodes[k])) {\n throw new ParseError(\"Missing a \" + arrowChar + \" character to complete a CD arrow.\", rowNodes[k]);\n }\n\n labels[labelNum].body.push(rowNodes[k]);\n }\n\n if (inLabel) {\n // isLabelEnd never returned a true.\n throw new ParseError(\"Missing a \" + arrowChar + \" character to complete a CD arrow.\", rowNodes[j]);\n }\n }\n } else {\n throw new ParseError(\"Expected one of \\\"<>AV=|.\\\" after @\", rowNodes[j]);\n } // Now join the arrow to its labels.\n\n\n var arrow = cdArrow(arrowChar, labels, parser); // Wrap the arrow in ParseNode<\"styling\">.\n // This is done to match parseArray() behavior.\n\n var wrappedArrow = {\n type: \"styling\",\n body: [arrow],\n mode: \"math\",\n style: \"display\" // CD is always displaystyle.\n\n };\n row.push(wrappedArrow); // In CD's syntax, cells are implicit. That is, everything that\n // is not an arrow gets collected into a cell. So create an empty\n // cell now. It will collect upcoming parseNodes.\n\n cell = newCell();\n }\n }\n\n if (i % 2 === 0) {\n // Even-numbered rows consist of: cell, arrow, cell, arrow, ... cell\n // The last cell is not yet pushed into `row`, so:\n row.push(cell);\n } else {\n // Odd-numbered rows consist of: vert arrow, empty cell, ... vert arrow\n // Remove the empty cell that was placed at the beginning of `row`.\n row.shift();\n }\n\n row = [];\n body.push(row);\n } // End row group\n\n\n parser.gullet.endGroup(); // End array group defining \\\\\n\n parser.gullet.endGroup(); // define column separation.\n\n var cols = new Array(body[0].length).fill({\n type: \"align\",\n align: \"c\",\n pregap: 0.25,\n // CD package sets \\enskip between columns.\n postgap: 0.25 // So pre and post each get half an \\enskip, i.e. 0.25em.\n\n });\n return {\n type: \"array\",\n mode: \"math\",\n body,\n arraystretch: 1,\n addJot: true,\n rowGaps: [null],\n cols,\n colSeparationType: \"CD\",\n hLinesBeforeRow: new Array(body.length + 1).fill([])\n };\n} // The functions below are not available for general use.\n// They are here only for internal use by the {CD} environment in placing labels\n// next to vertical arrows.\n// We don't need any such functions for horizontal arrows because we can reuse\n// the functionality that already exists for extensible arrows.\n\ndefineFunction({\n type: \"cdlabel\",\n names: [\"\\\\\\\\cdleft\", \"\\\\\\\\cdright\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n return {\n type: \"cdlabel\",\n mode: parser.mode,\n side: funcName.slice(4),\n label: args[0]\n };\n },\n\n htmlBuilder(group, options) {\n var newOptions = options.havingStyle(options.style.sup());\n var label = buildCommon.wrapFragment(buildGroup$1(group.label, newOptions, options), options);\n label.classes.push(\"cd-label-\" + group.side);\n label.style.bottom = makeEm(0.8 - label.depth); // Zero out label height & depth, so vertical align of arrow is set\n // by the arrow height, not by the label.\n\n label.height = 0;\n label.depth = 0;\n return label;\n },\n\n mathmlBuilder(group, options) {\n var label = new mathMLTree.MathNode(\"mrow\", [buildGroup(group.label, options)]);\n label = new mathMLTree.MathNode(\"mpadded\", [label]);\n label.setAttribute(\"width\", \"0\");\n\n if (group.side === \"left\") {\n label.setAttribute(\"lspace\", \"-1width\");\n } // We have to guess at vertical alignment. We know the arrow is 1.8em tall,\n // But we don't know the height or depth of the label.\n\n\n label.setAttribute(\"voffset\", \"0.7em\");\n label = new mathMLTree.MathNode(\"mstyle\", [label]);\n label.setAttribute(\"displaystyle\", \"false\");\n label.setAttribute(\"scriptlevel\", \"1\");\n return label;\n }\n\n});\ndefineFunction({\n type: \"cdlabelparent\",\n names: [\"\\\\\\\\cdparent\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref2, args) {\n var {\n parser\n } = _ref2;\n return {\n type: \"cdlabelparent\",\n mode: parser.mode,\n fragment: args[0]\n };\n },\n\n htmlBuilder(group, options) {\n // Wrap the vertical arrow and its labels.\n // The parent gets position: relative. The child gets position: absolute.\n // So CSS can locate the label correctly.\n var parent = buildCommon.wrapFragment(buildGroup$1(group.fragment, options), options);\n parent.classes.push(\"cd-vert-arrow\");\n return parent;\n },\n\n mathmlBuilder(group, options) {\n return new mathMLTree.MathNode(\"mrow\", [buildGroup(group.fragment, options)]);\n }\n\n});\n\n// {123} and converts into symbol with code 123. It is used by the *macro*\n// \\char defined in macros.js.\n\ndefineFunction({\n type: \"textord\",\n names: [\"\\\\@char\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n var arg = assertNodeType(args[0], \"ordgroup\");\n var group = arg.body;\n var number = \"\";\n\n for (var i = 0; i < group.length; i++) {\n var node = assertNodeType(group[i], \"textord\");\n number += node.text;\n }\n\n var code = parseInt(number);\n var text;\n\n if (isNaN(code)) {\n throw new ParseError(\"\\\\@char has non-numeric argument \" + number); // If we drop IE support, the following code could be replaced with\n // text = String.fromCodePoint(code)\n } else if (code < 0 || code >= 0x10ffff) {\n throw new ParseError(\"\\\\@char with invalid code point \" + number);\n } else if (code <= 0xffff) {\n text = String.fromCharCode(code);\n } else {\n // Astral code point; split into surrogate halves\n code -= 0x10000;\n text = String.fromCharCode((code >> 10) + 0xd800, (code & 0x3ff) + 0xdc00);\n }\n\n return {\n type: \"textord\",\n mode: parser.mode,\n text: text\n };\n }\n\n});\n\nvar htmlBuilder$8 = (group, options) => {\n var elements = buildExpression$1(group.body, options.withColor(group.color), false); // \\color isn't supposed to affect the type of the elements it contains.\n // To accomplish this, we wrap the results in a fragment, so the inner\n // elements will be able to directly interact with their neighbors. For\n // example, `\\color{red}{2 +} 3` has the same spacing as `2 + 3`\n\n return buildCommon.makeFragment(elements);\n};\n\nvar mathmlBuilder$7 = (group, options) => {\n var inner = buildExpression(group.body, options.withColor(group.color));\n var node = new mathMLTree.MathNode(\"mstyle\", inner);\n node.setAttribute(\"mathcolor\", group.color);\n return node;\n};\n\ndefineFunction({\n type: \"color\",\n names: [\"\\\\textcolor\"],\n props: {\n numArgs: 2,\n allowedInText: true,\n argTypes: [\"color\", \"original\"]\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n var color = assertNodeType(args[0], \"color-token\").color;\n var body = args[1];\n return {\n type: \"color\",\n mode: parser.mode,\n color,\n body: ordargument(body)\n };\n },\n\n htmlBuilder: htmlBuilder$8,\n mathmlBuilder: mathmlBuilder$7\n});\ndefineFunction({\n type: \"color\",\n names: [\"\\\\color\"],\n props: {\n numArgs: 1,\n allowedInText: true,\n argTypes: [\"color\"]\n },\n\n handler(_ref2, args) {\n var {\n parser,\n breakOnTokenText\n } = _ref2;\n var color = assertNodeType(args[0], \"color-token\").color; // Set macro \\current@color in current namespace to store the current\n // color, mimicking the behavior of color.sty.\n // This is currently used just to correctly color a \\right\n // that follows a \\color command.\n\n parser.gullet.macros.set(\"\\\\current@color\", color); // Parse out the implicit body that should be colored.\n\n var body = parser.parseExpression(true, breakOnTokenText);\n return {\n type: \"color\",\n mode: parser.mode,\n color,\n body\n };\n },\n\n htmlBuilder: htmlBuilder$8,\n mathmlBuilder: mathmlBuilder$7\n});\n\n// Row breaks within tabular environments, and line breaks at top level\n\ndefineFunction({\n type: \"cr\",\n names: [\"\\\\\\\\\"],\n props: {\n numArgs: 0,\n numOptionalArgs: 0,\n allowedInText: true\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser\n } = _ref;\n var size = parser.gullet.future().text === \"[\" ? parser.parseSizeGroup(true) : null;\n var newLine = !parser.settings.displayMode || !parser.settings.useStrictBehavior(\"newLineInDisplayMode\", \"In LaTeX, \\\\\\\\ or \\\\newline \" + \"does nothing in display mode\");\n return {\n type: \"cr\",\n mode: parser.mode,\n newLine,\n size: size && assertNodeType(size, \"size\").value\n };\n },\n\n // The following builders are called only at the top level,\n // not within tabular/array environments.\n htmlBuilder(group, options) {\n var span = buildCommon.makeSpan([\"mspace\"], [], options);\n\n if (group.newLine) {\n span.classes.push(\"newline\");\n\n if (group.size) {\n span.style.marginTop = makeEm(calculateSize(group.size, options));\n }\n }\n\n return span;\n },\n\n mathmlBuilder(group, options) {\n var node = new mathMLTree.MathNode(\"mspace\");\n\n if (group.newLine) {\n node.setAttribute(\"linebreak\", \"newline\");\n\n if (group.size) {\n node.setAttribute(\"height\", makeEm(calculateSize(group.size, options)));\n }\n }\n\n return node;\n }\n\n});\n\nvar globalMap = {\n \"\\\\global\": \"\\\\global\",\n \"\\\\long\": \"\\\\\\\\globallong\",\n \"\\\\\\\\globallong\": \"\\\\\\\\globallong\",\n \"\\\\def\": \"\\\\gdef\",\n \"\\\\gdef\": \"\\\\gdef\",\n \"\\\\edef\": \"\\\\xdef\",\n \"\\\\xdef\": \"\\\\xdef\",\n \"\\\\let\": \"\\\\\\\\globallet\",\n \"\\\\futurelet\": \"\\\\\\\\globalfuture\"\n};\n\nvar checkControlSequence = tok => {\n var name = tok.text;\n\n if (/^(?:[\\\\{}$&#^_]|EOF)$/.test(name)) {\n throw new ParseError(\"Expected a control sequence\", tok);\n }\n\n return name;\n};\n\nvar getRHS = parser => {\n var tok = parser.gullet.popToken();\n\n if (tok.text === \"=\") {\n // consume optional equals\n tok = parser.gullet.popToken();\n\n if (tok.text === \" \") {\n // consume one optional space\n tok = parser.gullet.popToken();\n }\n }\n\n return tok;\n};\n\nvar letCommand = (parser, name, tok, global) => {\n var macro = parser.gullet.macros.get(tok.text);\n\n if (macro == null) {\n // don't expand it later even if a macro with the same name is defined\n // e.g., \\let\\foo=\\frac \\def\\frac{\\relax} \\frac12\n tok.noexpand = true;\n macro = {\n tokens: [tok],\n numArgs: 0,\n // reproduce the same behavior in expansion\n unexpandable: !parser.gullet.isExpandable(tok.text)\n };\n }\n\n parser.gullet.macros.set(name, macro, global);\n}; // -> |\n// -> |\\global\n// -> |\n// -> \\global|\\long|\\outer\n\n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\global\", \"\\\\long\", \"\\\\\\\\globallong\" // can\u2019t be entered directly\n ],\n props: {\n numArgs: 0,\n allowedInText: true\n },\n\n handler(_ref) {\n var {\n parser,\n funcName\n } = _ref;\n parser.consumeSpaces();\n var token = parser.fetch();\n\n if (globalMap[token.text]) {\n // KaTeX doesn't have \\par, so ignore \\long\n if (funcName === \"\\\\global\" || funcName === \"\\\\\\\\globallong\") {\n token.text = globalMap[token.text];\n }\n\n return assertNodeType(parser.parseFunction(), \"internal\");\n }\n\n throw new ParseError(\"Invalid token after macro prefix\", token);\n }\n\n}); // Basic support for macro definitions: \\def, \\gdef, \\edef, \\xdef\n// -> \n// -> \\def|\\gdef|\\edef|\\xdef\n// -> \n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\def\", \"\\\\gdef\", \"\\\\edef\", \"\\\\xdef\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref2) {\n var {\n parser,\n funcName\n } = _ref2;\n var tok = parser.gullet.popToken();\n var name = tok.text;\n\n if (/^(?:[\\\\{}$&#^_]|EOF)$/.test(name)) {\n throw new ParseError(\"Expected a control sequence\", tok);\n }\n\n var numArgs = 0;\n var insert;\n var delimiters = [[]]; // contains no braces\n\n while (parser.gullet.future().text !== \"{\") {\n tok = parser.gullet.popToken();\n\n if (tok.text === \"#\") {\n // If the very last character of the is #, so that\n // this # is immediately followed by {, TeX will behave as if the {\n // had been inserted at the right end of both the parameter text\n // and the replacement text.\n if (parser.gullet.future().text === \"{\") {\n insert = parser.gullet.future();\n delimiters[numArgs].push(\"{\");\n break;\n } // A parameter, the first appearance of # must be followed by 1,\n // the next by 2, and so on; up to nine #\u2019s are allowed\n\n\n tok = parser.gullet.popToken();\n\n if (!/^[1-9]$/.test(tok.text)) {\n throw new ParseError(\"Invalid argument number \\\"\" + tok.text + \"\\\"\");\n }\n\n if (parseInt(tok.text) !== numArgs + 1) {\n throw new ParseError(\"Argument number \\\"\" + tok.text + \"\\\" out of order\");\n }\n\n numArgs++;\n delimiters.push([]);\n } else if (tok.text === \"EOF\") {\n throw new ParseError(\"Expected a macro definition\");\n } else {\n delimiters[numArgs].push(tok.text);\n }\n } // replacement text, enclosed in '{' and '}' and properly nested\n\n\n var {\n tokens\n } = parser.gullet.consumeArg();\n\n if (insert) {\n tokens.unshift(insert);\n }\n\n if (funcName === \"\\\\edef\" || funcName === \"\\\\xdef\") {\n tokens = parser.gullet.expandTokens(tokens);\n tokens.reverse(); // to fit in with stack order\n } // Final arg is the expansion of the macro\n\n\n parser.gullet.macros.set(name, {\n tokens,\n numArgs,\n delimiters\n }, funcName === globalMap[funcName]);\n return {\n type: \"internal\",\n mode: parser.mode\n };\n }\n\n}); // -> \n// -> \\futurelet\n// | \\let\n// -> |=\n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\let\", \"\\\\\\\\globallet\" // can\u2019t be entered directly\n ],\n props: {\n numArgs: 0,\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref3) {\n var {\n parser,\n funcName\n } = _ref3;\n var name = checkControlSequence(parser.gullet.popToken());\n parser.gullet.consumeSpaces();\n var tok = getRHS(parser);\n letCommand(parser, name, tok, funcName === \"\\\\\\\\globallet\");\n return {\n type: \"internal\",\n mode: parser.mode\n };\n }\n\n}); // ref: https://www.tug.org/TUGboat/tb09-3/tb22bechtolsheim.pdf\n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\futurelet\", \"\\\\\\\\globalfuture\" // can\u2019t be entered directly\n ],\n props: {\n numArgs: 0,\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref4) {\n var {\n parser,\n funcName\n } = _ref4;\n var name = checkControlSequence(parser.gullet.popToken());\n var middle = parser.gullet.popToken();\n var tok = parser.gullet.popToken();\n letCommand(parser, name, tok, funcName === \"\\\\\\\\globalfuture\");\n parser.gullet.pushToken(tok);\n parser.gullet.pushToken(middle);\n return {\n type: \"internal\",\n mode: parser.mode\n };\n }\n\n});\n\n/**\n * This file deals with creating delimiters of various sizes. The TeXbook\n * discusses these routines on page 441-442, in the \"Another subroutine sets box\n * x to a specified variable delimiter\" paragraph.\n *\n * There are three main routines here. `makeSmallDelim` makes a delimiter in the\n * normal font, but in either text, script, or scriptscript style.\n * `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1,\n * Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of\n * smaller pieces that are stacked on top of one another.\n *\n * The functions take a parameter `center`, which determines if the delimiter\n * should be centered around the axis.\n *\n * Then, there are three exposed functions. `sizedDelim` makes a delimiter in\n * one of the given sizes. This is used for things like `\\bigl`.\n * `customSizedDelim` makes a delimiter with a given total height+depth. It is\n * called in places like `\\sqrt`. `leftRightDelim` makes an appropriate\n * delimiter which surrounds an expression of a given height an depth. It is\n * used in `\\left` and `\\right`.\n */\n\n/**\n * Get the metrics for a given symbol and font, after transformation (i.e.\n * after following replacement from symbols.js)\n */\nvar getMetrics = function getMetrics(symbol, font, mode) {\n var replace = symbols.math[symbol] && symbols.math[symbol].replace;\n var metrics = getCharacterMetrics(replace || symbol, font, mode);\n\n if (!metrics) {\n throw new Error(\"Unsupported symbol \" + symbol + \" and font size \" + font + \".\");\n }\n\n return metrics;\n};\n/**\n * Puts a delimiter span in a given style, and adds appropriate height, depth,\n * and maxFontSizes.\n */\n\n\nvar styleWrap = function styleWrap(delim, toStyle, options, classes) {\n var newOptions = options.havingBaseStyle(toStyle);\n var span = buildCommon.makeSpan(classes.concat(newOptions.sizingClasses(options)), [delim], options);\n var delimSizeMultiplier = newOptions.sizeMultiplier / options.sizeMultiplier;\n span.height *= delimSizeMultiplier;\n span.depth *= delimSizeMultiplier;\n span.maxFontSize = newOptions.sizeMultiplier;\n return span;\n};\n\nvar centerSpan = function centerSpan(span, options, style) {\n var newOptions = options.havingBaseStyle(style);\n var shift = (1 - options.sizeMultiplier / newOptions.sizeMultiplier) * options.fontMetrics().axisHeight;\n span.classes.push(\"delimcenter\");\n span.style.top = makeEm(shift);\n span.height -= shift;\n span.depth += shift;\n};\n/**\n * Makes a small delimiter. This is a delimiter that comes in the Main-Regular\n * font, but is restyled to either be in textstyle, scriptstyle, or\n * scriptscriptstyle.\n */\n\n\nvar makeSmallDelim = function makeSmallDelim(delim, style, center, options, mode, classes) {\n var text = buildCommon.makeSymbol(delim, \"Main-Regular\", mode, options);\n var span = styleWrap(text, style, options, classes);\n\n if (center) {\n centerSpan(span, options, style);\n }\n\n return span;\n};\n/**\n * Builds a symbol in the given font size (note size is an integer)\n */\n\n\nvar mathrmSize = function mathrmSize(value, size, mode, options) {\n return buildCommon.makeSymbol(value, \"Size\" + size + \"-Regular\", mode, options);\n};\n/**\n * Makes a large delimiter. This is a delimiter that comes in the Size1, Size2,\n * Size3, or Size4 fonts. It is always rendered in textstyle.\n */\n\n\nvar makeLargeDelim = function makeLargeDelim(delim, size, center, options, mode, classes) {\n var inner = mathrmSize(delim, size, mode, options);\n var span = styleWrap(buildCommon.makeSpan([\"delimsizing\", \"size\" + size], [inner], options), Style$1.TEXT, options, classes);\n\n if (center) {\n centerSpan(span, options, Style$1.TEXT);\n }\n\n return span;\n};\n/**\n * Make a span from a font glyph with the given offset and in the given font.\n * This is used in makeStackedDelim to make the stacking pieces for the delimiter.\n */\n\n\nvar makeGlyphSpan = function makeGlyphSpan(symbol, font, mode) {\n var sizeClass; // Apply the correct CSS class to choose the right font.\n\n if (font === \"Size1-Regular\") {\n sizeClass = \"delim-size1\";\n } else\n /* if (font === \"Size4-Regular\") */\n {\n sizeClass = \"delim-size4\";\n }\n\n var corner = buildCommon.makeSpan([\"delimsizinginner\", sizeClass], [buildCommon.makeSpan([], [buildCommon.makeSymbol(symbol, font, mode)])]); // Since this will be passed into `makeVList` in the end, wrap the element\n // in the appropriate tag that VList uses.\n\n return {\n type: \"elem\",\n elem: corner\n };\n};\n\nvar makeInner = function makeInner(ch, height, options) {\n // Create a span with inline SVG for the inner part of a tall stacked delimiter.\n var width = fontMetricsData['Size4-Regular'][ch.charCodeAt(0)] ? fontMetricsData['Size4-Regular'][ch.charCodeAt(0)][4] : fontMetricsData['Size1-Regular'][ch.charCodeAt(0)][4];\n var path = new PathNode(\"inner\", innerPath(ch, Math.round(1000 * height)));\n var svgNode = new SvgNode([path], {\n \"width\": makeEm(width),\n \"height\": makeEm(height),\n // Override CSS rule `.katex svg { width: 100% }`\n \"style\": \"width:\" + makeEm(width),\n \"viewBox\": \"0 0 \" + 1000 * width + \" \" + Math.round(1000 * height),\n \"preserveAspectRatio\": \"xMinYMin\"\n });\n var span = buildCommon.makeSvgSpan([], [svgNode], options);\n span.height = height;\n span.style.height = makeEm(height);\n span.style.width = makeEm(width);\n return {\n type: \"elem\",\n elem: span\n };\n}; // Helpers for makeStackedDelim\n\n\nvar lapInEms = 0.008;\nvar lap = {\n type: \"kern\",\n size: -1 * lapInEms\n};\nvar verts = [\"|\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\vert\"];\nvar doubleVerts = [\"\\\\|\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\Vert\"];\n/**\n * Make a stacked delimiter out of a given delimiter, with the total height at\n * least `heightTotal`. This routine is mentioned on page 442 of the TeXbook.\n */\n\nvar makeStackedDelim = function makeStackedDelim(delim, heightTotal, center, options, mode, classes) {\n // There are four parts, the top, an optional middle, a repeated part, and a\n // bottom.\n var top;\n var middle;\n var repeat;\n var bottom;\n var svgLabel = \"\";\n var viewBoxWidth = 0;\n top = repeat = bottom = delim;\n middle = null; // Also keep track of what font the delimiters are in\n\n var font = \"Size1-Regular\"; // We set the parts and font based on the symbol. Note that we use\n // '\\u23d0' instead of '|' and '\\u2016' instead of '\\\\|' for the\n // repeats of the arrows\n\n if (delim === \"\\\\uparrow\") {\n repeat = bottom = \"\\u23d0\";\n } else if (delim === \"\\\\Uparrow\") {\n repeat = bottom = \"\\u2016\";\n } else if (delim === \"\\\\downarrow\") {\n top = repeat = \"\\u23d0\";\n } else if (delim === \"\\\\Downarrow\") {\n top = repeat = \"\\u2016\";\n } else if (delim === \"\\\\updownarrow\") {\n top = \"\\\\uparrow\";\n repeat = \"\\u23d0\";\n bottom = \"\\\\downarrow\";\n } else if (delim === \"\\\\Updownarrow\") {\n top = \"\\\\Uparrow\";\n repeat = \"\\u2016\";\n bottom = \"\\\\Downarrow\";\n } else if (utils.contains(verts, delim)) {\n repeat = \"\\u2223\";\n svgLabel = \"vert\";\n viewBoxWidth = 333;\n } else if (utils.contains(doubleVerts, delim)) {\n repeat = \"\\u2225\";\n svgLabel = \"doublevert\";\n viewBoxWidth = 556;\n } else if (delim === \"[\" || delim === \"\\\\lbrack\") {\n top = \"\\u23a1\";\n repeat = \"\\u23a2\";\n bottom = \"\\u23a3\";\n font = \"Size4-Regular\";\n svgLabel = \"lbrack\";\n viewBoxWidth = 667;\n } else if (delim === \"]\" || delim === \"\\\\rbrack\") {\n top = \"\\u23a4\";\n repeat = \"\\u23a5\";\n bottom = \"\\u23a6\";\n font = \"Size4-Regular\";\n svgLabel = \"rbrack\";\n viewBoxWidth = 667;\n } else if (delim === \"\\\\lfloor\" || delim === \"\\u230a\") {\n repeat = top = \"\\u23a2\";\n bottom = \"\\u23a3\";\n font = \"Size4-Regular\";\n svgLabel = \"lfloor\";\n viewBoxWidth = 667;\n } else if (delim === \"\\\\lceil\" || delim === \"\\u2308\") {\n top = \"\\u23a1\";\n repeat = bottom = \"\\u23a2\";\n font = \"Size4-Regular\";\n svgLabel = \"lceil\";\n viewBoxWidth = 667;\n } else if (delim === \"\\\\rfloor\" || delim === \"\\u230b\") {\n repeat = top = \"\\u23a5\";\n bottom = \"\\u23a6\";\n font = \"Size4-Regular\";\n svgLabel = \"rfloor\";\n viewBoxWidth = 667;\n } else if (delim === \"\\\\rceil\" || delim === \"\\u2309\") {\n top = \"\\u23a4\";\n repeat = bottom = \"\\u23a5\";\n font = \"Size4-Regular\";\n svgLabel = \"rceil\";\n viewBoxWidth = 667;\n } else if (delim === \"(\" || delim === \"\\\\lparen\") {\n top = \"\\u239b\";\n repeat = \"\\u239c\";\n bottom = \"\\u239d\";\n font = \"Size4-Regular\";\n svgLabel = \"lparen\";\n viewBoxWidth = 875;\n } else if (delim === \")\" || delim === \"\\\\rparen\") {\n top = \"\\u239e\";\n repeat = \"\\u239f\";\n bottom = \"\\u23a0\";\n font = \"Size4-Regular\";\n svgLabel = \"rparen\";\n viewBoxWidth = 875;\n } else if (delim === \"\\\\{\" || delim === \"\\\\lbrace\") {\n top = \"\\u23a7\";\n middle = \"\\u23a8\";\n bottom = \"\\u23a9\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\}\" || delim === \"\\\\rbrace\") {\n top = \"\\u23ab\";\n middle = \"\\u23ac\";\n bottom = \"\\u23ad\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\lgroup\" || delim === \"\\u27ee\") {\n top = \"\\u23a7\";\n bottom = \"\\u23a9\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\rgroup\" || delim === \"\\u27ef\") {\n top = \"\\u23ab\";\n bottom = \"\\u23ad\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\lmoustache\" || delim === \"\\u23b0\") {\n top = \"\\u23a7\";\n bottom = \"\\u23ad\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\rmoustache\" || delim === \"\\u23b1\") {\n top = \"\\u23ab\";\n bottom = \"\\u23a9\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } // Get the metrics of the four sections\n\n\n var topMetrics = getMetrics(top, font, mode);\n var topHeightTotal = topMetrics.height + topMetrics.depth;\n var repeatMetrics = getMetrics(repeat, font, mode);\n var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth;\n var bottomMetrics = getMetrics(bottom, font, mode);\n var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth;\n var middleHeightTotal = 0;\n var middleFactor = 1;\n\n if (middle !== null) {\n var middleMetrics = getMetrics(middle, font, mode);\n middleHeightTotal = middleMetrics.height + middleMetrics.depth;\n middleFactor = 2; // repeat symmetrically above and below middle\n } // Calculate the minimal height that the delimiter can have.\n // It is at least the size of the top, bottom, and optional middle combined.\n\n\n var minHeight = topHeightTotal + bottomHeightTotal + middleHeightTotal; // Compute the number of copies of the repeat symbol we will need\n\n var repeatCount = Math.max(0, Math.ceil((heightTotal - minHeight) / (middleFactor * repeatHeightTotal))); // Compute the total height of the delimiter including all the symbols\n\n var realHeightTotal = minHeight + repeatCount * middleFactor * repeatHeightTotal; // The center of the delimiter is placed at the center of the axis. Note\n // that in this context, \"center\" means that the delimiter should be\n // centered around the axis in the current style, while normally it is\n // centered around the axis in textstyle.\n\n var axisHeight = options.fontMetrics().axisHeight;\n\n if (center) {\n axisHeight *= options.sizeMultiplier;\n } // Calculate the depth\n\n\n var depth = realHeightTotal / 2 - axisHeight; // Now, we start building the pieces that will go into the vlist\n // Keep a list of the pieces of the stacked delimiter\n\n var stack = [];\n\n if (svgLabel.length > 0) {\n // Instead of stacking glyphs, create a single SVG.\n // This evades browser problems with imprecise positioning of spans.\n var midHeight = realHeightTotal - topHeightTotal - bottomHeightTotal;\n var viewBoxHeight = Math.round(realHeightTotal * 1000);\n var pathStr = tallDelim(svgLabel, Math.round(midHeight * 1000));\n var path = new PathNode(svgLabel, pathStr);\n var width = (viewBoxWidth / 1000).toFixed(3) + \"em\";\n var height = (viewBoxHeight / 1000).toFixed(3) + \"em\";\n var svg = new SvgNode([path], {\n \"width\": width,\n \"height\": height,\n \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + viewBoxHeight\n });\n var wrapper = buildCommon.makeSvgSpan([], [svg], options);\n wrapper.height = viewBoxHeight / 1000;\n wrapper.style.width = width;\n wrapper.style.height = height;\n stack.push({\n type: \"elem\",\n elem: wrapper\n });\n } else {\n // Stack glyphs\n // Start by adding the bottom symbol\n stack.push(makeGlyphSpan(bottom, font, mode));\n stack.push(lap); // overlap\n\n if (middle === null) {\n // The middle section will be an SVG. Make it an extra 0.016em tall.\n // We'll overlap by 0.008em at top and bottom.\n var innerHeight = realHeightTotal - topHeightTotal - bottomHeightTotal + 2 * lapInEms;\n stack.push(makeInner(repeat, innerHeight, options));\n } else {\n // When there is a middle bit, we need the middle part and two repeated\n // sections\n var _innerHeight = (realHeightTotal - topHeightTotal - bottomHeightTotal - middleHeightTotal) / 2 + 2 * lapInEms;\n\n stack.push(makeInner(repeat, _innerHeight, options)); // Now insert the middle of the brace.\n\n stack.push(lap);\n stack.push(makeGlyphSpan(middle, font, mode));\n stack.push(lap);\n stack.push(makeInner(repeat, _innerHeight, options));\n } // Add the top symbol\n\n\n stack.push(lap);\n stack.push(makeGlyphSpan(top, font, mode));\n } // Finally, build the vlist\n\n\n var newOptions = options.havingBaseStyle(Style$1.TEXT);\n var inner = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: depth,\n children: stack\n }, newOptions);\n return styleWrap(buildCommon.makeSpan([\"delimsizing\", \"mult\"], [inner], newOptions), Style$1.TEXT, options, classes);\n}; // All surds have 0.08em padding above the vinculum inside the SVG.\n// That keeps browser span height rounding error from pinching the line.\n\n\nvar vbPad = 80; // padding above the surd, measured inside the viewBox.\n\nvar emPad = 0.08; // padding, in ems, measured in the document.\n\nvar sqrtSvg = function sqrtSvg(sqrtName, height, viewBoxHeight, extraVinculum, options) {\n var path = sqrtPath(sqrtName, extraVinculum, viewBoxHeight);\n var pathNode = new PathNode(sqrtName, path);\n var svg = new SvgNode([pathNode], {\n // Note: 1000:1 ratio of viewBox to document em width.\n \"width\": \"400em\",\n \"height\": makeEm(height),\n \"viewBox\": \"0 0 400000 \" + viewBoxHeight,\n \"preserveAspectRatio\": \"xMinYMin slice\"\n });\n return buildCommon.makeSvgSpan([\"hide-tail\"], [svg], options);\n};\n/**\n * Make a sqrt image of the given height,\n */\n\n\nvar makeSqrtImage = function makeSqrtImage(height, options) {\n // Define a newOptions that removes the effect of size changes such as \\Huge.\n // We don't pick different a height surd for \\Huge. For it, we scale up.\n var newOptions = options.havingBaseSizing(); // Pick the desired surd glyph from a sequence of surds.\n\n var delim = traverseSequence(\"\\\\surd\", height * newOptions.sizeMultiplier, stackLargeDelimiterSequence, newOptions);\n var sizeMultiplier = newOptions.sizeMultiplier; // default\n // The standard sqrt SVGs each have a 0.04em thick vinculum.\n // If Settings.minRuleThickness is larger than that, we add extraVinculum.\n\n var extraVinculum = Math.max(0, options.minRuleThickness - options.fontMetrics().sqrtRuleThickness); // Create a span containing an SVG image of a sqrt symbol.\n\n var span;\n var spanHeight = 0;\n var texHeight = 0;\n var viewBoxHeight = 0;\n var advanceWidth; // We create viewBoxes with 80 units of \"padding\" above each surd.\n // Then browser rounding error on the parent span height will not\n // encroach on the ink of the vinculum. But that padding is not\n // included in the TeX-like `height` used for calculation of\n // vertical alignment. So texHeight = span.height < span.style.height.\n\n if (delim.type === \"small\") {\n // Get an SVG that is derived from glyph U+221A in font KaTeX-Main.\n // 1000 unit normal glyph height.\n viewBoxHeight = 1000 + 1000 * extraVinculum + vbPad;\n\n if (height < 1.0) {\n sizeMultiplier = 1.0; // mimic a \\textfont radical\n } else if (height < 1.4) {\n sizeMultiplier = 0.7; // mimic a \\scriptfont radical\n }\n\n spanHeight = (1.0 + extraVinculum + emPad) / sizeMultiplier;\n texHeight = (1.00 + extraVinculum) / sizeMultiplier;\n span = sqrtSvg(\"sqrtMain\", spanHeight, viewBoxHeight, extraVinculum, options);\n span.style.minWidth = \"0.853em\";\n advanceWidth = 0.833 / sizeMultiplier; // from the font.\n } else if (delim.type === \"large\") {\n // These SVGs come from fonts: KaTeX_Size1, _Size2, etc.\n viewBoxHeight = (1000 + vbPad) * sizeToMaxHeight[delim.size];\n texHeight = (sizeToMaxHeight[delim.size] + extraVinculum) / sizeMultiplier;\n spanHeight = (sizeToMaxHeight[delim.size] + extraVinculum + emPad) / sizeMultiplier;\n span = sqrtSvg(\"sqrtSize\" + delim.size, spanHeight, viewBoxHeight, extraVinculum, options);\n span.style.minWidth = \"1.02em\";\n advanceWidth = 1.0 / sizeMultiplier; // 1.0 from the font.\n } else {\n // Tall sqrt. In TeX, this would be stacked using multiple glyphs.\n // We'll use a single SVG to accomplish the same thing.\n spanHeight = height + extraVinculum + emPad;\n texHeight = height + extraVinculum;\n viewBoxHeight = Math.floor(1000 * height + extraVinculum) + vbPad;\n span = sqrtSvg(\"sqrtTall\", spanHeight, viewBoxHeight, extraVinculum, options);\n span.style.minWidth = \"0.742em\";\n advanceWidth = 1.056;\n }\n\n span.height = texHeight;\n span.style.height = makeEm(spanHeight);\n return {\n span,\n advanceWidth,\n // Calculate the actual line width.\n // This actually should depend on the chosen font -- e.g. \\boldmath\n // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and\n // have thicker rules.\n ruleWidth: (options.fontMetrics().sqrtRuleThickness + extraVinculum) * sizeMultiplier\n };\n}; // There are three kinds of delimiters, delimiters that stack when they become\n// too large\n\n\nvar stackLargeDelimiters = [\"(\", \"\\\\lparen\", \")\", \"\\\\rparen\", \"[\", \"\\\\lbrack\", \"]\", \"\\\\rbrack\", \"\\\\{\", \"\\\\lbrace\", \"\\\\}\", \"\\\\rbrace\", \"\\\\lfloor\", \"\\\\rfloor\", \"\\u230a\", \"\\u230b\", \"\\\\lceil\", \"\\\\rceil\", \"\\u2308\", \"\\u2309\", \"\\\\surd\"]; // delimiters that always stack\n\nvar stackAlwaysDelimiters = [\"\\\\uparrow\", \"\\\\downarrow\", \"\\\\updownarrow\", \"\\\\Uparrow\", \"\\\\Downarrow\", \"\\\\Updownarrow\", \"|\", \"\\\\|\", \"\\\\vert\", \"\\\\Vert\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\lgroup\", \"\\\\rgroup\", \"\\u27ee\", \"\\u27ef\", \"\\\\lmoustache\", \"\\\\rmoustache\", \"\\u23b0\", \"\\u23b1\"]; // and delimiters that never stack\n\nvar stackNeverDelimiters = [\"<\", \">\", \"\\\\langle\", \"\\\\rangle\", \"/\", \"\\\\backslash\", \"\\\\lt\", \"\\\\gt\"]; // Metrics of the different sizes. Found by looking at TeX's output of\n// $\\bigl| // \\Bigl| \\biggl| \\Biggl| \\showlists$\n// Used to create stacked delimiters of appropriate sizes in makeSizedDelim.\n\nvar sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0];\n/**\n * Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4.\n */\n\nvar makeSizedDelim = function makeSizedDelim(delim, size, options, mode, classes) {\n // < and > turn into \\langle and \\rangle in delimiters\n if (delim === \"<\" || delim === \"\\\\lt\" || delim === \"\\u27e8\") {\n delim = \"\\\\langle\";\n } else if (delim === \">\" || delim === \"\\\\gt\" || delim === \"\\u27e9\") {\n delim = \"\\\\rangle\";\n } // Sized delimiters are never centered.\n\n\n if (utils.contains(stackLargeDelimiters, delim) || utils.contains(stackNeverDelimiters, delim)) {\n return makeLargeDelim(delim, size, false, options, mode, classes);\n } else if (utils.contains(stackAlwaysDelimiters, delim)) {\n return makeStackedDelim(delim, sizeToMaxHeight[size], false, options, mode, classes);\n } else {\n throw new ParseError(\"Illegal delimiter: '\" + delim + \"'\");\n }\n};\n/**\n * There are three different sequences of delimiter sizes that the delimiters\n * follow depending on the kind of delimiter. This is used when creating custom\n * sized delimiters to decide whether to create a small, large, or stacked\n * delimiter.\n *\n * In real TeX, these sequences aren't explicitly defined, but are instead\n * defined inside the font metrics. Since there are only three sequences that\n * are possible for the delimiters that TeX defines, it is easier to just encode\n * them explicitly here.\n */\n\n\n// Delimiters that never stack try small delimiters and large delimiters only\nvar stackNeverDelimiterSequence = [{\n type: \"small\",\n style: Style$1.SCRIPTSCRIPT\n}, {\n type: \"small\",\n style: Style$1.SCRIPT\n}, {\n type: \"small\",\n style: Style$1.TEXT\n}, {\n type: \"large\",\n size: 1\n}, {\n type: \"large\",\n size: 2\n}, {\n type: \"large\",\n size: 3\n}, {\n type: \"large\",\n size: 4\n}]; // Delimiters that always stack try the small delimiters first, then stack\n\nvar stackAlwaysDelimiterSequence = [{\n type: \"small\",\n style: Style$1.SCRIPTSCRIPT\n}, {\n type: \"small\",\n style: Style$1.SCRIPT\n}, {\n type: \"small\",\n style: Style$1.TEXT\n}, {\n type: \"stack\"\n}]; // Delimiters that stack when large try the small and then large delimiters, and\n// stack afterwards\n\nvar stackLargeDelimiterSequence = [{\n type: \"small\",\n style: Style$1.SCRIPTSCRIPT\n}, {\n type: \"small\",\n style: Style$1.SCRIPT\n}, {\n type: \"small\",\n style: Style$1.TEXT\n}, {\n type: \"large\",\n size: 1\n}, {\n type: \"large\",\n size: 2\n}, {\n type: \"large\",\n size: 3\n}, {\n type: \"large\",\n size: 4\n}, {\n type: \"stack\"\n}];\n/**\n * Get the font used in a delimiter based on what kind of delimiter it is.\n * TODO(#963) Use more specific font family return type once that is introduced.\n */\n\nvar delimTypeToFont = function delimTypeToFont(type) {\n if (type.type === \"small\") {\n return \"Main-Regular\";\n } else if (type.type === \"large\") {\n return \"Size\" + type.size + \"-Regular\";\n } else if (type.type === \"stack\") {\n return \"Size4-Regular\";\n } else {\n throw new Error(\"Add support for delim type '\" + type.type + \"' here.\");\n }\n};\n/**\n * Traverse a sequence of types of delimiters to decide what kind of delimiter\n * should be used to create a delimiter of the given height+depth.\n */\n\n\nvar traverseSequence = function traverseSequence(delim, height, sequence, options) {\n // Here, we choose the index we should start at in the sequences. In smaller\n // sizes (which correspond to larger numbers in style.size) we start earlier\n // in the sequence. Thus, scriptscript starts at index 3-3=0, script starts\n // at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2\n var start = Math.min(2, 3 - options.style.size);\n\n for (var i = start; i < sequence.length; i++) {\n if (sequence[i].type === \"stack\") {\n // This is always the last delimiter, so we just break the loop now.\n break;\n }\n\n var metrics = getMetrics(delim, delimTypeToFont(sequence[i]), \"math\");\n var heightDepth = metrics.height + metrics.depth; // Small delimiters are scaled down versions of the same font, so we\n // account for the style change size.\n\n if (sequence[i].type === \"small\") {\n var newOptions = options.havingBaseStyle(sequence[i].style);\n heightDepth *= newOptions.sizeMultiplier;\n } // Check if the delimiter at this size works for the given height.\n\n\n if (heightDepth > height) {\n return sequence[i];\n }\n } // If we reached the end of the sequence, return the last sequence element.\n\n\n return sequence[sequence.length - 1];\n};\n/**\n * Make a delimiter of a given height+depth, with optional centering. Here, we\n * traverse the sequences, and create a delimiter that the sequence tells us to.\n */\n\n\nvar makeCustomSizedDelim = function makeCustomSizedDelim(delim, height, center, options, mode, classes) {\n if (delim === \"<\" || delim === \"\\\\lt\" || delim === \"\\u27e8\") {\n delim = \"\\\\langle\";\n } else if (delim === \">\" || delim === \"\\\\gt\" || delim === \"\\u27e9\") {\n delim = \"\\\\rangle\";\n } // Decide what sequence to use\n\n\n var sequence;\n\n if (utils.contains(stackNeverDelimiters, delim)) {\n sequence = stackNeverDelimiterSequence;\n } else if (utils.contains(stackLargeDelimiters, delim)) {\n sequence = stackLargeDelimiterSequence;\n } else {\n sequence = stackAlwaysDelimiterSequence;\n } // Look through the sequence\n\n\n var delimType = traverseSequence(delim, height, sequence, options); // Get the delimiter from font glyphs.\n // Depending on the sequence element we decided on, call the\n // appropriate function.\n\n if (delimType.type === \"small\") {\n return makeSmallDelim(delim, delimType.style, center, options, mode, classes);\n } else if (delimType.type === \"large\") {\n return makeLargeDelim(delim, delimType.size, center, options, mode, classes);\n } else\n /* if (delimType.type === \"stack\") */\n {\n return makeStackedDelim(delim, height, center, options, mode, classes);\n }\n};\n/**\n * Make a delimiter for use with `\\left` and `\\right`, given a height and depth\n * of an expression that the delimiters surround.\n */\n\n\nvar makeLeftRightDelim = function makeLeftRightDelim(delim, height, depth, options, mode, classes) {\n // We always center \\left/\\right delimiters, so the axis is always shifted\n var axisHeight = options.fontMetrics().axisHeight * options.sizeMultiplier; // Taken from TeX source, tex.web, function make_left_right\n\n var delimiterFactor = 901;\n var delimiterExtend = 5.0 / options.fontMetrics().ptPerEm;\n var maxDistFromAxis = Math.max(height - axisHeight, depth + axisHeight);\n var totalHeight = Math.max( // In real TeX, calculations are done using integral values which are\n // 65536 per pt, or 655360 per em. So, the division here truncates in\n // TeX but doesn't here, producing different results. If we wanted to\n // exactly match TeX's calculation, we could do\n // Math.floor(655360 * maxDistFromAxis / 500) *\n // delimiterFactor / 655360\n // (To see the difference, compare\n // x^{x^{\\left(\\rule{0.1em}{0.68em}\\right)}}\n // in TeX and KaTeX)\n maxDistFromAxis / 500 * delimiterFactor, 2 * maxDistFromAxis - delimiterExtend); // Finally, we defer to `makeCustomSizedDelim` with our calculated total\n // height\n\n return makeCustomSizedDelim(delim, totalHeight, true, options, mode, classes);\n};\n\nvar delimiter = {\n sqrtImage: makeSqrtImage,\n sizedDelim: makeSizedDelim,\n sizeToMaxHeight: sizeToMaxHeight,\n customSizedDelim: makeCustomSizedDelim,\n leftRightDelim: makeLeftRightDelim\n};\n\n// Extra data needed for the delimiter handler down below\nvar delimiterSizes = {\n \"\\\\bigl\": {\n mclass: \"mopen\",\n size: 1\n },\n \"\\\\Bigl\": {\n mclass: \"mopen\",\n size: 2\n },\n \"\\\\biggl\": {\n mclass: \"mopen\",\n size: 3\n },\n \"\\\\Biggl\": {\n mclass: \"mopen\",\n size: 4\n },\n \"\\\\bigr\": {\n mclass: \"mclose\",\n size: 1\n },\n \"\\\\Bigr\": {\n mclass: \"mclose\",\n size: 2\n },\n \"\\\\biggr\": {\n mclass: \"mclose\",\n size: 3\n },\n \"\\\\Biggr\": {\n mclass: \"mclose\",\n size: 4\n },\n \"\\\\bigm\": {\n mclass: \"mrel\",\n size: 1\n },\n \"\\\\Bigm\": {\n mclass: \"mrel\",\n size: 2\n },\n \"\\\\biggm\": {\n mclass: \"mrel\",\n size: 3\n },\n \"\\\\Biggm\": {\n mclass: \"mrel\",\n size: 4\n },\n \"\\\\big\": {\n mclass: \"mord\",\n size: 1\n },\n \"\\\\Big\": {\n mclass: \"mord\",\n size: 2\n },\n \"\\\\bigg\": {\n mclass: \"mord\",\n size: 3\n },\n \"\\\\Bigg\": {\n mclass: \"mord\",\n size: 4\n }\n};\nvar delimiters = [\"(\", \"\\\\lparen\", \")\", \"\\\\rparen\", \"[\", \"\\\\lbrack\", \"]\", \"\\\\rbrack\", \"\\\\{\", \"\\\\lbrace\", \"\\\\}\", \"\\\\rbrace\", \"\\\\lfloor\", \"\\\\rfloor\", \"\\u230a\", \"\\u230b\", \"\\\\lceil\", \"\\\\rceil\", \"\\u2308\", \"\\u2309\", \"<\", \">\", \"\\\\langle\", \"\\u27e8\", \"\\\\rangle\", \"\\u27e9\", \"\\\\lt\", \"\\\\gt\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\lgroup\", \"\\\\rgroup\", \"\\u27ee\", \"\\u27ef\", \"\\\\lmoustache\", \"\\\\rmoustache\", \"\\u23b0\", \"\\u23b1\", \"/\", \"\\\\backslash\", \"|\", \"\\\\vert\", \"\\\\|\", \"\\\\Vert\", \"\\\\uparrow\", \"\\\\Uparrow\", \"\\\\downarrow\", \"\\\\Downarrow\", \"\\\\updownarrow\", \"\\\\Updownarrow\", \".\"];\n\n// Delimiter functions\nfunction checkDelimiter(delim, context) {\n var symDelim = checkSymbolNodeType(delim);\n\n if (symDelim && utils.contains(delimiters, symDelim.text)) {\n return symDelim;\n } else if (symDelim) {\n throw new ParseError(\"Invalid delimiter '\" + symDelim.text + \"' after '\" + context.funcName + \"'\", delim);\n } else {\n throw new ParseError(\"Invalid delimiter type '\" + delim.type + \"'\", delim);\n }\n}\n\ndefineFunction({\n type: \"delimsizing\",\n names: [\"\\\\bigl\", \"\\\\Bigl\", \"\\\\biggl\", \"\\\\Biggl\", \"\\\\bigr\", \"\\\\Bigr\", \"\\\\biggr\", \"\\\\Biggr\", \"\\\\bigm\", \"\\\\Bigm\", \"\\\\biggm\", \"\\\\Biggm\", \"\\\\big\", \"\\\\Big\", \"\\\\bigg\", \"\\\\Bigg\"],\n props: {\n numArgs: 1,\n argTypes: [\"primitive\"]\n },\n handler: (context, args) => {\n var delim = checkDelimiter(args[0], context);\n return {\n type: \"delimsizing\",\n mode: context.parser.mode,\n size: delimiterSizes[context.funcName].size,\n mclass: delimiterSizes[context.funcName].mclass,\n delim: delim.text\n };\n },\n htmlBuilder: (group, options) => {\n if (group.delim === \".\") {\n // Empty delimiters still count as elements, even though they don't\n // show anything.\n return buildCommon.makeSpan([group.mclass]);\n } // Use delimiter.sizedDelim to generate the delimiter.\n\n\n return delimiter.sizedDelim(group.delim, group.size, options, group.mode, [group.mclass]);\n },\n mathmlBuilder: group => {\n var children = [];\n\n if (group.delim !== \".\") {\n children.push(makeText(group.delim, group.mode));\n }\n\n var node = new mathMLTree.MathNode(\"mo\", children);\n\n if (group.mclass === \"mopen\" || group.mclass === \"mclose\") {\n // Only some of the delimsizing functions act as fences, and they\n // return \"mopen\" or \"mclose\" mclass.\n node.setAttribute(\"fence\", \"true\");\n } else {\n // Explicitly disable fencing if it's not a fence, to override the\n // defaults.\n node.setAttribute(\"fence\", \"false\");\n }\n\n node.setAttribute(\"stretchy\", \"true\");\n var size = makeEm(delimiter.sizeToMaxHeight[group.size]);\n node.setAttribute(\"minsize\", size);\n node.setAttribute(\"maxsize\", size);\n return node;\n }\n});\n\nfunction assertParsed(group) {\n if (!group.body) {\n throw new Error(\"Bug: The leftright ParseNode wasn't fully parsed.\");\n }\n}\n\ndefineFunction({\n type: \"leftright-right\",\n names: [\"\\\\right\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n handler: (context, args) => {\n // \\left case below triggers parsing of \\right in\n // `const right = parser.parseFunction();`\n // uses this return value.\n var color = context.parser.gullet.macros.get(\"\\\\current@color\");\n\n if (color && typeof color !== \"string\") {\n throw new ParseError(\"\\\\current@color set to non-string in \\\\right\");\n }\n\n return {\n type: \"leftright-right\",\n mode: context.parser.mode,\n delim: checkDelimiter(args[0], context).text,\n color // undefined if not set via \\color\n\n };\n }\n});\ndefineFunction({\n type: \"leftright\",\n names: [\"\\\\left\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n handler: (context, args) => {\n var delim = checkDelimiter(args[0], context);\n var parser = context.parser; // Parse out the implicit body\n\n ++parser.leftrightDepth; // parseExpression stops before '\\\\right'\n\n var body = parser.parseExpression(false);\n --parser.leftrightDepth; // Check the next token\n\n parser.expect(\"\\\\right\", false);\n var right = assertNodeType(parser.parseFunction(), \"leftright-right\");\n return {\n type: \"leftright\",\n mode: parser.mode,\n body,\n left: delim.text,\n right: right.delim,\n rightColor: right.color\n };\n },\n htmlBuilder: (group, options) => {\n assertParsed(group); // Build the inner expression\n\n var inner = buildExpression$1(group.body, options, true, [\"mopen\", \"mclose\"]);\n var innerHeight = 0;\n var innerDepth = 0;\n var hadMiddle = false; // Calculate its height and depth\n\n for (var i = 0; i < inner.length; i++) {\n // Property `isMiddle` not defined on `span`. See comment in\n // \"middle\"'s htmlBuilder.\n // $FlowFixMe\n if (inner[i].isMiddle) {\n hadMiddle = true;\n } else {\n innerHeight = Math.max(inner[i].height, innerHeight);\n innerDepth = Math.max(inner[i].depth, innerDepth);\n }\n } // The size of delimiters is the same, regardless of what style we are\n // in. Thus, to correctly calculate the size of delimiter we need around\n // a group, we scale down the inner size based on the size.\n\n\n innerHeight *= options.sizeMultiplier;\n innerDepth *= options.sizeMultiplier;\n var leftDelim;\n\n if (group.left === \".\") {\n // Empty delimiters in \\left and \\right make null delimiter spaces.\n leftDelim = makeNullDelimiter(options, [\"mopen\"]);\n } else {\n // Otherwise, use leftRightDelim to generate the correct sized\n // delimiter.\n leftDelim = delimiter.leftRightDelim(group.left, innerHeight, innerDepth, options, group.mode, [\"mopen\"]);\n } // Add it to the beginning of the expression\n\n\n inner.unshift(leftDelim); // Handle middle delimiters\n\n if (hadMiddle) {\n for (var _i = 1; _i < inner.length; _i++) {\n var middleDelim = inner[_i]; // Property `isMiddle` not defined on `span`. See comment in\n // \"middle\"'s htmlBuilder.\n // $FlowFixMe\n\n var isMiddle = middleDelim.isMiddle;\n\n if (isMiddle) {\n // Apply the options that were active when \\middle was called\n inner[_i] = delimiter.leftRightDelim(isMiddle.delim, innerHeight, innerDepth, isMiddle.options, group.mode, []);\n }\n }\n }\n\n var rightDelim; // Same for the right delimiter, but using color specified by \\color\n\n if (group.right === \".\") {\n rightDelim = makeNullDelimiter(options, [\"mclose\"]);\n } else {\n var colorOptions = group.rightColor ? options.withColor(group.rightColor) : options;\n rightDelim = delimiter.leftRightDelim(group.right, innerHeight, innerDepth, colorOptions, group.mode, [\"mclose\"]);\n } // Add it to the end of the expression.\n\n\n inner.push(rightDelim);\n return buildCommon.makeSpan([\"minner\"], inner, options);\n },\n mathmlBuilder: (group, options) => {\n assertParsed(group);\n var inner = buildExpression(group.body, options);\n\n if (group.left !== \".\") {\n var leftNode = new mathMLTree.MathNode(\"mo\", [makeText(group.left, group.mode)]);\n leftNode.setAttribute(\"fence\", \"true\");\n inner.unshift(leftNode);\n }\n\n if (group.right !== \".\") {\n var rightNode = new mathMLTree.MathNode(\"mo\", [makeText(group.right, group.mode)]);\n rightNode.setAttribute(\"fence\", \"true\");\n\n if (group.rightColor) {\n rightNode.setAttribute(\"mathcolor\", group.rightColor);\n }\n\n inner.push(rightNode);\n }\n\n return makeRow(inner);\n }\n});\ndefineFunction({\n type: \"middle\",\n names: [\"\\\\middle\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n handler: (context, args) => {\n var delim = checkDelimiter(args[0], context);\n\n if (!context.parser.leftrightDepth) {\n throw new ParseError(\"\\\\middle without preceding \\\\left\", delim);\n }\n\n return {\n type: \"middle\",\n mode: context.parser.mode,\n delim: delim.text\n };\n },\n htmlBuilder: (group, options) => {\n var middleDelim;\n\n if (group.delim === \".\") {\n middleDelim = makeNullDelimiter(options, []);\n } else {\n middleDelim = delimiter.sizedDelim(group.delim, 1, options, group.mode, []);\n var isMiddle = {\n delim: group.delim,\n options\n }; // Property `isMiddle` not defined on `span`. It is only used in\n // this file above.\n // TODO: Fix this violation of the `span` type and possibly rename\n // things since `isMiddle` sounds like a boolean, but is a struct.\n // $FlowFixMe\n\n middleDelim.isMiddle = isMiddle;\n }\n\n return middleDelim;\n },\n mathmlBuilder: (group, options) => {\n // A Firefox \\middle will stretch a character vertically only if it\n // is in the fence part of the operator dictionary at:\n // https://www.w3.org/TR/MathML3/appendixc.html.\n // So we need to avoid U+2223 and use plain \"|\" instead.\n var textNode = group.delim === \"\\\\vert\" || group.delim === \"|\" ? makeText(\"|\", \"text\") : makeText(group.delim, group.mode);\n var middleNode = new mathMLTree.MathNode(\"mo\", [textNode]);\n middleNode.setAttribute(\"fence\", \"true\"); // MathML gives 5/18em spacing to each element.\n // \\middle should get delimiter spacing instead.\n\n middleNode.setAttribute(\"lspace\", \"0.05em\");\n middleNode.setAttribute(\"rspace\", \"0.05em\");\n return middleNode;\n }\n});\n\nvar htmlBuilder$7 = (group, options) => {\n // \\cancel, \\bcancel, \\xcancel, \\sout, \\fbox, \\colorbox, \\fcolorbox, \\phase\n // Some groups can return document fragments. Handle those by wrapping\n // them in a span.\n var inner = buildCommon.wrapFragment(buildGroup$1(group.body, options), options);\n var label = group.label.slice(1);\n var scale = options.sizeMultiplier;\n var img;\n var imgShift = 0; // In the LaTeX cancel package, line geometry is slightly different\n // depending on whether the subject is wider than it is tall, or vice versa.\n // We don't know the width of a group, so as a proxy, we test if\n // the subject is a single character. This captures most of the\n // subjects that should get the \"tall\" treatment.\n\n var isSingleChar = utils.isCharacterBox(group.body);\n\n if (label === \"sout\") {\n img = buildCommon.makeSpan([\"stretchy\", \"sout\"]);\n img.height = options.fontMetrics().defaultRuleThickness / scale;\n imgShift = -0.5 * options.fontMetrics().xHeight;\n } else if (label === \"phase\") {\n // Set a couple of dimensions from the steinmetz package.\n var lineWeight = calculateSize({\n number: 0.6,\n unit: \"pt\"\n }, options);\n var clearance = calculateSize({\n number: 0.35,\n unit: \"ex\"\n }, options); // Prevent size changes like \\Huge from affecting line thickness\n\n var newOptions = options.havingBaseSizing();\n scale = scale / newOptions.sizeMultiplier;\n var angleHeight = inner.height + inner.depth + lineWeight + clearance; // Reserve a left pad for the angle.\n\n inner.style.paddingLeft = makeEm(angleHeight / 2 + lineWeight); // Create an SVG\n\n var viewBoxHeight = Math.floor(1000 * angleHeight * scale);\n var path = phasePath(viewBoxHeight);\n var svgNode = new SvgNode([new PathNode(\"phase\", path)], {\n \"width\": \"400em\",\n \"height\": makeEm(viewBoxHeight / 1000),\n \"viewBox\": \"0 0 400000 \" + viewBoxHeight,\n \"preserveAspectRatio\": \"xMinYMin slice\"\n }); // Wrap it in a span with overflow: hidden.\n\n img = buildCommon.makeSvgSpan([\"hide-tail\"], [svgNode], options);\n img.style.height = makeEm(angleHeight);\n imgShift = inner.depth + lineWeight + clearance;\n } else {\n // Add horizontal padding\n if (/cancel/.test(label)) {\n if (!isSingleChar) {\n inner.classes.push(\"cancel-pad\");\n }\n } else if (label === \"angl\") {\n inner.classes.push(\"anglpad\");\n } else {\n inner.classes.push(\"boxpad\");\n } // Add vertical padding\n\n\n var topPad = 0;\n var bottomPad = 0;\n var ruleThickness = 0; // ref: cancel package: \\advance\\totalheight2\\p@ % \"+2\"\n\n if (/box/.test(label)) {\n ruleThickness = Math.max(options.fontMetrics().fboxrule, // default\n options.minRuleThickness // User override.\n );\n topPad = options.fontMetrics().fboxsep + (label === \"colorbox\" ? 0 : ruleThickness);\n bottomPad = topPad;\n } else if (label === \"angl\") {\n ruleThickness = Math.max(options.fontMetrics().defaultRuleThickness, options.minRuleThickness);\n topPad = 4 * ruleThickness; // gap = 3 \u00D7 line, plus the line itself.\n\n bottomPad = Math.max(0, 0.25 - inner.depth);\n } else {\n topPad = isSingleChar ? 0.2 : 0;\n bottomPad = topPad;\n }\n\n img = stretchy.encloseSpan(inner, label, topPad, bottomPad, options);\n\n if (/fbox|boxed|fcolorbox/.test(label)) {\n img.style.borderStyle = \"solid\";\n img.style.borderWidth = makeEm(ruleThickness);\n } else if (label === \"angl\" && ruleThickness !== 0.049) {\n img.style.borderTopWidth = makeEm(ruleThickness);\n img.style.borderRightWidth = makeEm(ruleThickness);\n }\n\n imgShift = inner.depth + bottomPad;\n\n if (group.backgroundColor) {\n img.style.backgroundColor = group.backgroundColor;\n\n if (group.borderColor) {\n img.style.borderColor = group.borderColor;\n }\n }\n }\n\n var vlist;\n\n if (group.backgroundColor) {\n vlist = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [// Put the color background behind inner;\n {\n type: \"elem\",\n elem: img,\n shift: imgShift\n }, {\n type: \"elem\",\n elem: inner,\n shift: 0\n }]\n }, options);\n } else {\n var classes = /cancel|phase/.test(label) ? [\"svg-align\"] : [];\n vlist = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [// Write the \\cancel stroke on top of inner.\n {\n type: \"elem\",\n elem: inner,\n shift: 0\n }, {\n type: \"elem\",\n elem: img,\n shift: imgShift,\n wrapperClasses: classes\n }]\n }, options);\n }\n\n if (/cancel/.test(label)) {\n // The cancel package documentation says that cancel lines add their height\n // to the expression, but tests show that isn't how it actually works.\n vlist.height = inner.height;\n vlist.depth = inner.depth;\n }\n\n if (/cancel/.test(label) && !isSingleChar) {\n // cancel does not create horiz space for its line extension.\n return buildCommon.makeSpan([\"mord\", \"cancel-lap\"], [vlist], options);\n } else {\n return buildCommon.makeSpan([\"mord\"], [vlist], options);\n }\n};\n\nvar mathmlBuilder$6 = (group, options) => {\n var fboxsep = 0;\n var node = new mathMLTree.MathNode(group.label.indexOf(\"colorbox\") > -1 ? \"mpadded\" : \"menclose\", [buildGroup(group.body, options)]);\n\n switch (group.label) {\n case \"\\\\cancel\":\n node.setAttribute(\"notation\", \"updiagonalstrike\");\n break;\n\n case \"\\\\bcancel\":\n node.setAttribute(\"notation\", \"downdiagonalstrike\");\n break;\n\n case \"\\\\phase\":\n node.setAttribute(\"notation\", \"phasorangle\");\n break;\n\n case \"\\\\sout\":\n node.setAttribute(\"notation\", \"horizontalstrike\");\n break;\n\n case \"\\\\fbox\":\n node.setAttribute(\"notation\", \"box\");\n break;\n\n case \"\\\\angl\":\n node.setAttribute(\"notation\", \"actuarial\");\n break;\n\n case \"\\\\fcolorbox\":\n case \"\\\\colorbox\":\n // doesn't have a good notation option. So use \n // instead. Set some attributes that come included with .\n fboxsep = options.fontMetrics().fboxsep * options.fontMetrics().ptPerEm;\n node.setAttribute(\"width\", \"+\" + 2 * fboxsep + \"pt\");\n node.setAttribute(\"height\", \"+\" + 2 * fboxsep + \"pt\");\n node.setAttribute(\"lspace\", fboxsep + \"pt\"); //\n\n node.setAttribute(\"voffset\", fboxsep + \"pt\");\n\n if (group.label === \"\\\\fcolorbox\") {\n var thk = Math.max(options.fontMetrics().fboxrule, // default\n options.minRuleThickness // user override\n );\n node.setAttribute(\"style\", \"border: \" + thk + \"em solid \" + String(group.borderColor));\n }\n\n break;\n\n case \"\\\\xcancel\":\n node.setAttribute(\"notation\", \"updiagonalstrike downdiagonalstrike\");\n break;\n }\n\n if (group.backgroundColor) {\n node.setAttribute(\"mathbackground\", group.backgroundColor);\n }\n\n return node;\n};\n\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\colorbox\"],\n props: {\n numArgs: 2,\n allowedInText: true,\n argTypes: [\"color\", \"text\"]\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser,\n funcName\n } = _ref;\n var color = assertNodeType(args[0], \"color-token\").color;\n var body = args[1];\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: funcName,\n backgroundColor: color,\n body\n };\n },\n\n htmlBuilder: htmlBuilder$7,\n mathmlBuilder: mathmlBuilder$6\n});\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\fcolorbox\"],\n props: {\n numArgs: 3,\n allowedInText: true,\n argTypes: [\"color\", \"color\", \"text\"]\n },\n\n handler(_ref2, args, optArgs) {\n var {\n parser,\n funcName\n } = _ref2;\n var borderColor = assertNodeType(args[0], \"color-token\").color;\n var backgroundColor = assertNodeType(args[1], \"color-token\").color;\n var body = args[2];\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: funcName,\n backgroundColor,\n borderColor,\n body\n };\n },\n\n htmlBuilder: htmlBuilder$7,\n mathmlBuilder: mathmlBuilder$6\n});\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\fbox\"],\n props: {\n numArgs: 1,\n argTypes: [\"hbox\"],\n allowedInText: true\n },\n\n handler(_ref3, args) {\n var {\n parser\n } = _ref3;\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: \"\\\\fbox\",\n body: args[0]\n };\n }\n\n});\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\cancel\", \"\\\\bcancel\", \"\\\\xcancel\", \"\\\\sout\", \"\\\\phase\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref4, args) {\n var {\n parser,\n funcName\n } = _ref4;\n var body = args[0];\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: funcName,\n body\n };\n },\n\n htmlBuilder: htmlBuilder$7,\n mathmlBuilder: mathmlBuilder$6\n});\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\angl\"],\n props: {\n numArgs: 1,\n argTypes: [\"hbox\"],\n allowedInText: false\n },\n\n handler(_ref5, args) {\n var {\n parser\n } = _ref5;\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: \"\\\\angl\",\n body: args[0]\n };\n }\n\n});\n\n/**\n * All registered environments.\n * `environments.js` exports this same dictionary again and makes it public.\n * `Parser.js` requires this dictionary via `environments.js`.\n */\nvar _environments = {};\nfunction defineEnvironment(_ref) {\n var {\n type,\n names,\n props,\n handler,\n htmlBuilder,\n mathmlBuilder\n } = _ref;\n // Set default values of environments.\n var data = {\n type,\n numArgs: props.numArgs || 0,\n allowedInText: false,\n numOptionalArgs: 0,\n handler\n };\n\n for (var i = 0; i < names.length; ++i) {\n // TODO: The value type of _environments should be a type union of all\n // possible `EnvSpec<>` possibilities instead of `EnvSpec<*>`, which is\n // an existential type.\n _environments[names[i]] = data;\n }\n\n if (htmlBuilder) {\n _htmlGroupBuilders[type] = htmlBuilder;\n }\n\n if (mathmlBuilder) {\n _mathmlGroupBuilders[type] = mathmlBuilder;\n }\n}\n\n/**\n * All registered global/built-in macros.\n * `macros.js` exports this same dictionary again and makes it public.\n * `Parser.js` requires this dictionary via `macros.js`.\n */\nvar _macros = {}; // This function might one day accept an additional argument and do more things.\n\nfunction defineMacro(name, body) {\n _macros[name] = body;\n}\n\n// Helper functions\nfunction getHLines(parser) {\n // Return an array. The array length = number of hlines.\n // Each element in the array tells if the line is dashed.\n var hlineInfo = [];\n parser.consumeSpaces();\n var nxt = parser.fetch().text;\n\n if (nxt === \"\\\\relax\") {\n // \\relax is an artifact of the \\cr macro below\n parser.consume();\n parser.consumeSpaces();\n nxt = parser.fetch().text;\n }\n\n while (nxt === \"\\\\hline\" || nxt === \"\\\\hdashline\") {\n parser.consume();\n hlineInfo.push(nxt === \"\\\\hdashline\");\n parser.consumeSpaces();\n nxt = parser.fetch().text;\n }\n\n return hlineInfo;\n}\n\nvar validateAmsEnvironmentContext = context => {\n var settings = context.parser.settings;\n\n if (!settings.displayMode) {\n throw new ParseError(\"{\" + context.envName + \"} can be used only in\" + \" display mode.\");\n }\n}; // autoTag (an argument to parseArray) can be one of three values:\n// * undefined: Regular (not-top-level) array; no tags on each row\n// * true: Automatic equation numbering, overridable by \\tag\n// * false: Tags allowed on each row, but no automatic numbering\n// This function *doesn't* work with the \"split\" environment name.\n\n\nfunction getAutoTag(name) {\n if (name.indexOf(\"ed\") === -1) {\n return name.indexOf(\"*\") === -1;\n } // return undefined;\n\n}\n/**\n * Parse the body of the environment, with rows delimited by \\\\ and\n * columns delimited by &, and create a nested list in row-major order\n * with one group per cell. If given an optional argument style\n * (\"text\", \"display\", etc.), then each cell is cast into that style.\n */\n\n\nfunction parseArray(parser, _ref, style) {\n var {\n hskipBeforeAndAfter,\n addJot,\n cols,\n arraystretch,\n colSeparationType,\n autoTag,\n singleRow,\n emptySingleRow,\n maxNumCols,\n leqno\n } = _ref;\n parser.gullet.beginGroup();\n\n if (!singleRow) {\n // \\cr is equivalent to \\\\ without the optional size argument (see below)\n // TODO: provide helpful error when \\cr is used outside array environment\n parser.gullet.macros.set(\"\\\\cr\", \"\\\\\\\\\\\\relax\");\n } // Get current arraystretch if it's not set by the environment\n\n\n if (!arraystretch) {\n var stretch = parser.gullet.expandMacroAsText(\"\\\\arraystretch\");\n\n if (stretch == null) {\n // Default \\arraystretch from lttab.dtx\n arraystretch = 1;\n } else {\n arraystretch = parseFloat(stretch);\n\n if (!arraystretch || arraystretch < 0) {\n throw new ParseError(\"Invalid \\\\arraystretch: \" + stretch);\n }\n }\n } // Start group for first cell\n\n\n parser.gullet.beginGroup();\n var row = [];\n var body = [row];\n var rowGaps = [];\n var hLinesBeforeRow = [];\n var tags = autoTag != null ? [] : undefined; // amsmath uses \\global\\@eqnswtrue and \\global\\@eqnswfalse to represent\n // whether this row should have an equation number. Simulate this with\n // a \\@eqnsw macro set to 1 or 0.\n\n function beginRow() {\n if (autoTag) {\n parser.gullet.macros.set(\"\\\\@eqnsw\", \"1\", true);\n }\n }\n\n function endRow() {\n if (tags) {\n if (parser.gullet.macros.get(\"\\\\df@tag\")) {\n tags.push(parser.subparse([new Token(\"\\\\df@tag\")]));\n parser.gullet.macros.set(\"\\\\df@tag\", undefined, true);\n } else {\n tags.push(Boolean(autoTag) && parser.gullet.macros.get(\"\\\\@eqnsw\") === \"1\");\n }\n }\n }\n\n beginRow(); // Test for \\hline at the top of the array.\n\n hLinesBeforeRow.push(getHLines(parser));\n\n while (true) {\n // eslint-disable-line no-constant-condition\n // Parse each cell in its own group (namespace)\n var cell = parser.parseExpression(false, singleRow ? \"\\\\end\" : \"\\\\\\\\\");\n parser.gullet.endGroup();\n parser.gullet.beginGroup();\n cell = {\n type: \"ordgroup\",\n mode: parser.mode,\n body: cell\n };\n\n if (style) {\n cell = {\n type: \"styling\",\n mode: parser.mode,\n style,\n body: [cell]\n };\n }\n\n row.push(cell);\n var next = parser.fetch().text;\n\n if (next === \"&\") {\n if (maxNumCols && row.length === maxNumCols) {\n if (singleRow || colSeparationType) {\n // {equation} or {split}\n throw new ParseError(\"Too many tab characters: &\", parser.nextToken);\n } else {\n // {array} environment\n parser.settings.reportNonstrict(\"textEnv\", \"Too few columns \" + \"specified in the {array} column argument.\");\n }\n }\n\n parser.consume();\n } else if (next === \"\\\\end\") {\n endRow(); // Arrays terminate newlines with `\\crcr` which consumes a `\\cr` if\n // the last line is empty. However, AMS environments keep the\n // empty row if it's the only one.\n // NOTE: Currently, `cell` is the last item added into `row`.\n\n if (row.length === 1 && cell.type === \"styling\" && cell.body[0].body.length === 0 && (body.length > 1 || !emptySingleRow)) {\n body.pop();\n }\n\n if (hLinesBeforeRow.length < body.length + 1) {\n hLinesBeforeRow.push([]);\n }\n\n break;\n } else if (next === \"\\\\\\\\\") {\n parser.consume();\n var size = void 0; // \\def\\Let@{\\let\\\\\\math@cr}\n // \\def\\math@cr{...\\math@cr@}\n // \\def\\math@cr@{\\new@ifnextchar[\\math@cr@@{\\math@cr@@[\\z@]}}\n // \\def\\math@cr@@[#1]{...\\math@cr@@@...}\n // \\def\\math@cr@@@{\\cr}\n\n if (parser.gullet.future().text !== \" \") {\n size = parser.parseSizeGroup(true);\n }\n\n rowGaps.push(size ? size.value : null);\n endRow(); // check for \\hline(s) following the row separator\n\n hLinesBeforeRow.push(getHLines(parser));\n row = [];\n body.push(row);\n beginRow();\n } else {\n throw new ParseError(\"Expected & or \\\\\\\\ or \\\\cr or \\\\end\", parser.nextToken);\n }\n } // End cell group\n\n\n parser.gullet.endGroup(); // End array group defining \\cr\n\n parser.gullet.endGroup();\n return {\n type: \"array\",\n mode: parser.mode,\n addJot,\n arraystretch,\n body,\n cols,\n rowGaps,\n hskipBeforeAndAfter,\n hLinesBeforeRow,\n colSeparationType,\n tags,\n leqno\n };\n} // Decides on a style for cells in an array according to whether the given\n// environment name starts with the letter 'd'.\n\n\nfunction dCellStyle(envName) {\n if (envName.slice(0, 1) === \"d\") {\n return \"display\";\n } else {\n return \"text\";\n }\n}\n\nvar htmlBuilder$6 = function htmlBuilder(group, options) {\n var r;\n var c;\n var nr = group.body.length;\n var hLinesBeforeRow = group.hLinesBeforeRow;\n var nc = 0;\n var body = new Array(nr);\n var hlines = [];\n var ruleThickness = Math.max( // From LaTeX \\showthe\\arrayrulewidth. Equals 0.04 em.\n options.fontMetrics().arrayRuleWidth, options.minRuleThickness // User override.\n ); // Horizontal spacing\n\n var pt = 1 / options.fontMetrics().ptPerEm;\n var arraycolsep = 5 * pt; // default value, i.e. \\arraycolsep in article.cls\n\n if (group.colSeparationType && group.colSeparationType === \"small\") {\n // We're in a {smallmatrix}. Default column space is \\thickspace,\n // i.e. 5/18em = 0.2778em, per amsmath.dtx for {smallmatrix}.\n // But that needs adjustment because LaTeX applies \\scriptstyle to the\n // entire array, including the colspace, but this function applies\n // \\scriptstyle only inside each element.\n var localMultiplier = options.havingStyle(Style$1.SCRIPT).sizeMultiplier;\n arraycolsep = 0.2778 * (localMultiplier / options.sizeMultiplier);\n } // Vertical spacing\n\n\n var baselineskip = group.colSeparationType === \"CD\" ? calculateSize({\n number: 3,\n unit: \"ex\"\n }, options) : 12 * pt; // see size10.clo\n // Default \\jot from ltmath.dtx\n // TODO(edemaine): allow overriding \\jot via \\setlength (#687)\n\n var jot = 3 * pt;\n var arrayskip = group.arraystretch * baselineskip;\n var arstrutHeight = 0.7 * arrayskip; // \\strutbox in ltfsstrc.dtx and\n\n var arstrutDepth = 0.3 * arrayskip; // \\@arstrutbox in lttab.dtx\n\n var totalHeight = 0; // Set a position for \\hline(s) at the top of the array, if any.\n\n function setHLinePos(hlinesInGap) {\n for (var i = 0; i < hlinesInGap.length; ++i) {\n if (i > 0) {\n totalHeight += 0.25;\n }\n\n hlines.push({\n pos: totalHeight,\n isDashed: hlinesInGap[i]\n });\n }\n }\n\n setHLinePos(hLinesBeforeRow[0]);\n\n for (r = 0; r < group.body.length; ++r) {\n var inrow = group.body[r];\n var height = arstrutHeight; // \\@array adds an \\@arstrut\n\n var depth = arstrutDepth; // to each tow (via the template)\n\n if (nc < inrow.length) {\n nc = inrow.length;\n }\n\n var outrow = new Array(inrow.length);\n\n for (c = 0; c < inrow.length; ++c) {\n var elt = buildGroup$1(inrow[c], options);\n\n if (depth < elt.depth) {\n depth = elt.depth;\n }\n\n if (height < elt.height) {\n height = elt.height;\n }\n\n outrow[c] = elt;\n }\n\n var rowGap = group.rowGaps[r];\n var gap = 0;\n\n if (rowGap) {\n gap = calculateSize(rowGap, options);\n\n if (gap > 0) {\n // \\@argarraycr\n gap += arstrutDepth;\n\n if (depth < gap) {\n depth = gap; // \\@xargarraycr\n }\n\n gap = 0;\n }\n } // In AMS multiline environments such as aligned and gathered, rows\n // correspond to lines that have additional \\jot added to the\n // \\baselineskip via \\openup.\n\n\n if (group.addJot) {\n depth += jot;\n }\n\n outrow.height = height;\n outrow.depth = depth;\n totalHeight += height;\n outrow.pos = totalHeight;\n totalHeight += depth + gap; // \\@yargarraycr\n\n body[r] = outrow; // Set a position for \\hline(s), if any.\n\n setHLinePos(hLinesBeforeRow[r + 1]);\n }\n\n var offset = totalHeight / 2 + options.fontMetrics().axisHeight;\n var colDescriptions = group.cols || [];\n var cols = [];\n var colSep;\n var colDescrNum;\n var tagSpans = [];\n\n if (group.tags && group.tags.some(tag => tag)) {\n // An environment with manual tags and/or automatic equation numbers.\n // Create node(s), the latter of which trigger CSS counter increment.\n for (r = 0; r < nr; ++r) {\n var rw = body[r];\n var shift = rw.pos - offset;\n var tag = group.tags[r];\n var tagSpan = void 0;\n\n if (tag === true) {\n // automatic numbering\n tagSpan = buildCommon.makeSpan([\"eqn-num\"], [], options);\n } else if (tag === false) {\n // \\nonumber/\\notag or starred environment\n tagSpan = buildCommon.makeSpan([], [], options);\n } else {\n // manual \\tag\n tagSpan = buildCommon.makeSpan([], buildExpression$1(tag, options, true), options);\n }\n\n tagSpan.depth = rw.depth;\n tagSpan.height = rw.height;\n tagSpans.push({\n type: \"elem\",\n elem: tagSpan,\n shift\n });\n }\n }\n\n for (c = 0, colDescrNum = 0; // Continue while either there are more columns or more column\n // descriptions, so trailing separators don't get lost.\n c < nc || colDescrNum < colDescriptions.length; ++c, ++colDescrNum) {\n var colDescr = colDescriptions[colDescrNum] || {};\n var firstSeparator = true;\n\n while (colDescr.type === \"separator\") {\n // If there is more than one separator in a row, add a space\n // between them.\n if (!firstSeparator) {\n colSep = buildCommon.makeSpan([\"arraycolsep\"], []);\n colSep.style.width = makeEm(options.fontMetrics().doubleRuleSep);\n cols.push(colSep);\n }\n\n if (colDescr.separator === \"|\" || colDescr.separator === \":\") {\n var lineType = colDescr.separator === \"|\" ? \"solid\" : \"dashed\";\n var separator = buildCommon.makeSpan([\"vertical-separator\"], [], options);\n separator.style.height = makeEm(totalHeight);\n separator.style.borderRightWidth = makeEm(ruleThickness);\n separator.style.borderRightStyle = lineType;\n separator.style.margin = \"0 \" + makeEm(-ruleThickness / 2);\n\n var _shift = totalHeight - offset;\n\n if (_shift) {\n separator.style.verticalAlign = makeEm(-_shift);\n }\n\n cols.push(separator);\n } else {\n throw new ParseError(\"Invalid separator type: \" + colDescr.separator);\n }\n\n colDescrNum++;\n colDescr = colDescriptions[colDescrNum] || {};\n firstSeparator = false;\n }\n\n if (c >= nc) {\n continue;\n }\n\n var sepwidth = void 0;\n\n if (c > 0 || group.hskipBeforeAndAfter) {\n sepwidth = utils.deflt(colDescr.pregap, arraycolsep);\n\n if (sepwidth !== 0) {\n colSep = buildCommon.makeSpan([\"arraycolsep\"], []);\n colSep.style.width = makeEm(sepwidth);\n cols.push(colSep);\n }\n }\n\n var col = [];\n\n for (r = 0; r < nr; ++r) {\n var row = body[r];\n var elem = row[c];\n\n if (!elem) {\n continue;\n }\n\n var _shift2 = row.pos - offset;\n\n elem.depth = row.depth;\n elem.height = row.height;\n col.push({\n type: \"elem\",\n elem: elem,\n shift: _shift2\n });\n }\n\n col = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: col\n }, options);\n col = buildCommon.makeSpan([\"col-align-\" + (colDescr.align || \"c\")], [col]);\n cols.push(col);\n\n if (c < nc - 1 || group.hskipBeforeAndAfter) {\n sepwidth = utils.deflt(colDescr.postgap, arraycolsep);\n\n if (sepwidth !== 0) {\n colSep = buildCommon.makeSpan([\"arraycolsep\"], []);\n colSep.style.width = makeEm(sepwidth);\n cols.push(colSep);\n }\n }\n }\n\n body = buildCommon.makeSpan([\"mtable\"], cols); // Add \\hline(s), if any.\n\n if (hlines.length > 0) {\n var line = buildCommon.makeLineSpan(\"hline\", options, ruleThickness);\n var dashes = buildCommon.makeLineSpan(\"hdashline\", options, ruleThickness);\n var vListElems = [{\n type: \"elem\",\n elem: body,\n shift: 0\n }];\n\n while (hlines.length > 0) {\n var hline = hlines.pop();\n var lineShift = hline.pos - offset;\n\n if (hline.isDashed) {\n vListElems.push({\n type: \"elem\",\n elem: dashes,\n shift: lineShift\n });\n } else {\n vListElems.push({\n type: \"elem\",\n elem: line,\n shift: lineShift\n });\n }\n }\n\n body = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: vListElems\n }, options);\n }\n\n if (tagSpans.length === 0) {\n return buildCommon.makeSpan([\"mord\"], [body], options);\n } else {\n var eqnNumCol = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: tagSpans\n }, options);\n eqnNumCol = buildCommon.makeSpan([\"tag\"], [eqnNumCol], options);\n return buildCommon.makeFragment([body, eqnNumCol]);\n }\n};\n\nvar alignMap = {\n c: \"center \",\n l: \"left \",\n r: \"right \"\n};\n\nvar mathmlBuilder$5 = function mathmlBuilder(group, options) {\n var tbl = [];\n var glue = new mathMLTree.MathNode(\"mtd\", [], [\"mtr-glue\"]);\n var tag = new mathMLTree.MathNode(\"mtd\", [], [\"mml-eqn-num\"]);\n\n for (var i = 0; i < group.body.length; i++) {\n var rw = group.body[i];\n var row = [];\n\n for (var j = 0; j < rw.length; j++) {\n row.push(new mathMLTree.MathNode(\"mtd\", [buildGroup(rw[j], options)]));\n }\n\n if (group.tags && group.tags[i]) {\n row.unshift(glue);\n row.push(glue);\n\n if (group.leqno) {\n row.unshift(tag);\n } else {\n row.push(tag);\n }\n }\n\n tbl.push(new mathMLTree.MathNode(\"mtr\", row));\n }\n\n var table = new mathMLTree.MathNode(\"mtable\", tbl); // Set column alignment, row spacing, column spacing, and\n // array lines by setting attributes on the table element.\n // Set the row spacing. In MathML, we specify a gap distance.\n // We do not use rowGap[] because MathML automatically increases\n // cell height with the height/depth of the element content.\n // LaTeX \\arraystretch multiplies the row baseline-to-baseline distance.\n // We simulate this by adding (arraystretch - 1)em to the gap. This\n // does a reasonable job of adjusting arrays containing 1 em tall content.\n // The 0.16 and 0.09 values are found empirically. They produce an array\n // similar to LaTeX and in which content does not interfere with \\hlines.\n\n var gap = group.arraystretch === 0.5 ? 0.1 // {smallmatrix}, {subarray}\n : 0.16 + group.arraystretch - 1 + (group.addJot ? 0.09 : 0);\n table.setAttribute(\"rowspacing\", makeEm(gap)); // MathML table lines go only between cells.\n // To place a line on an edge we'll use , if necessary.\n\n var menclose = \"\";\n var align = \"\";\n\n if (group.cols && group.cols.length > 0) {\n // Find column alignment, column spacing, and vertical lines.\n var cols = group.cols;\n var columnLines = \"\";\n var prevTypeWasAlign = false;\n var iStart = 0;\n var iEnd = cols.length;\n\n if (cols[0].type === \"separator\") {\n menclose += \"top \";\n iStart = 1;\n }\n\n if (cols[cols.length - 1].type === \"separator\") {\n menclose += \"bottom \";\n iEnd -= 1;\n }\n\n for (var _i = iStart; _i < iEnd; _i++) {\n if (cols[_i].type === \"align\") {\n align += alignMap[cols[_i].align];\n\n if (prevTypeWasAlign) {\n columnLines += \"none \";\n }\n\n prevTypeWasAlign = true;\n } else if (cols[_i].type === \"separator\") {\n // MathML accepts only single lines between cells.\n // So we read only the first of consecutive separators.\n if (prevTypeWasAlign) {\n columnLines += cols[_i].separator === \"|\" ? \"solid \" : \"dashed \";\n prevTypeWasAlign = false;\n }\n }\n }\n\n table.setAttribute(\"columnalign\", align.trim());\n\n if (/[sd]/.test(columnLines)) {\n table.setAttribute(\"columnlines\", columnLines.trim());\n }\n } // Set column spacing.\n\n\n if (group.colSeparationType === \"align\") {\n var _cols = group.cols || [];\n\n var spacing = \"\";\n\n for (var _i2 = 1; _i2 < _cols.length; _i2++) {\n spacing += _i2 % 2 ? \"0em \" : \"1em \";\n }\n\n table.setAttribute(\"columnspacing\", spacing.trim());\n } else if (group.colSeparationType === \"alignat\" || group.colSeparationType === \"gather\") {\n table.setAttribute(\"columnspacing\", \"0em\");\n } else if (group.colSeparationType === \"small\") {\n table.setAttribute(\"columnspacing\", \"0.2778em\");\n } else if (group.colSeparationType === \"CD\") {\n table.setAttribute(\"columnspacing\", \"0.5em\");\n } else {\n table.setAttribute(\"columnspacing\", \"1em\");\n } // Address \\hline and \\hdashline\n\n\n var rowLines = \"\";\n var hlines = group.hLinesBeforeRow;\n menclose += hlines[0].length > 0 ? \"left \" : \"\";\n menclose += hlines[hlines.length - 1].length > 0 ? \"right \" : \"\";\n\n for (var _i3 = 1; _i3 < hlines.length - 1; _i3++) {\n rowLines += hlines[_i3].length === 0 ? \"none \" // MathML accepts only a single line between rows. Read one element.\n : hlines[_i3][0] ? \"dashed \" : \"solid \";\n }\n\n if (/[sd]/.test(rowLines)) {\n table.setAttribute(\"rowlines\", rowLines.trim());\n }\n\n if (menclose !== \"\") {\n table = new mathMLTree.MathNode(\"menclose\", [table]);\n table.setAttribute(\"notation\", menclose.trim());\n }\n\n if (group.arraystretch && group.arraystretch < 1) {\n // A small array. Wrap in scriptstyle so row gap is not too large.\n table = new mathMLTree.MathNode(\"mstyle\", [table]);\n table.setAttribute(\"scriptlevel\", \"1\");\n }\n\n return table;\n}; // Convenience function for align, align*, aligned, alignat, alignat*, alignedat.\n\n\nvar alignedHandler = function alignedHandler(context, args) {\n if (context.envName.indexOf(\"ed\") === -1) {\n validateAmsEnvironmentContext(context);\n }\n\n var cols = [];\n var separationType = context.envName.indexOf(\"at\") > -1 ? \"alignat\" : \"align\";\n var isSplit = context.envName === \"split\";\n var res = parseArray(context.parser, {\n cols,\n addJot: true,\n autoTag: isSplit ? undefined : getAutoTag(context.envName),\n emptySingleRow: true,\n colSeparationType: separationType,\n maxNumCols: isSplit ? 2 : undefined,\n leqno: context.parser.settings.leqno\n }, \"display\"); // Determining number of columns.\n // 1. If the first argument is given, we use it as a number of columns,\n // and makes sure that each row doesn't exceed that number.\n // 2. Otherwise, just count number of columns = maximum number\n // of cells in each row (\"aligned\" mode -- isAligned will be true).\n //\n // At the same time, prepend empty group {} at beginning of every second\n // cell in each row (starting with second cell) so that operators become\n // binary. This behavior is implemented in amsmath's \\start@aligned.\n\n var numMaths;\n var numCols = 0;\n var emptyGroup = {\n type: \"ordgroup\",\n mode: context.mode,\n body: []\n };\n\n if (args[0] && args[0].type === \"ordgroup\") {\n var arg0 = \"\";\n\n for (var i = 0; i < args[0].body.length; i++) {\n var textord = assertNodeType(args[0].body[i], \"textord\");\n arg0 += textord.text;\n }\n\n numMaths = Number(arg0);\n numCols = numMaths * 2;\n }\n\n var isAligned = !numCols;\n res.body.forEach(function (row) {\n for (var _i4 = 1; _i4 < row.length; _i4 += 2) {\n // Modify ordgroup node within styling node\n var styling = assertNodeType(row[_i4], \"styling\");\n var ordgroup = assertNodeType(styling.body[0], \"ordgroup\");\n ordgroup.body.unshift(emptyGroup);\n }\n\n if (!isAligned) {\n // Case 1\n var curMaths = row.length / 2;\n\n if (numMaths < curMaths) {\n throw new ParseError(\"Too many math in a row: \" + (\"expected \" + numMaths + \", but got \" + curMaths), row[0]);\n }\n } else if (numCols < row.length) {\n // Case 2\n numCols = row.length;\n }\n }); // Adjusting alignment.\n // In aligned mode, we add one \\qquad between columns;\n // otherwise we add nothing.\n\n for (var _i5 = 0; _i5 < numCols; ++_i5) {\n var align = \"r\";\n var pregap = 0;\n\n if (_i5 % 2 === 1) {\n align = \"l\";\n } else if (_i5 > 0 && isAligned) {\n // \"aligned\" mode.\n pregap = 1; // add one \\quad\n }\n\n cols[_i5] = {\n type: \"align\",\n align: align,\n pregap: pregap,\n postgap: 0\n };\n }\n\n res.colSeparationType = isAligned ? \"align\" : \"alignat\";\n return res;\n}; // Arrays are part of LaTeX, defined in lttab.dtx so its documentation\n// is part of the source2e.pdf file of LaTeX2e source documentation.\n// {darray} is an {array} environment where cells are set in \\displaystyle,\n// as defined in nccmath.sty.\n\n\ndefineEnvironment({\n type: \"array\",\n names: [\"array\", \"darray\"],\n props: {\n numArgs: 1\n },\n\n handler(context, args) {\n // Since no types are specified above, the two possibilities are\n // - The argument is wrapped in {} or [], in which case Parser's\n // parseGroup() returns an \"ordgroup\" wrapping some symbol node.\n // - The argument is a bare symbol node.\n var symNode = checkSymbolNodeType(args[0]);\n var colalign = symNode ? [args[0]] : assertNodeType(args[0], \"ordgroup\").body;\n var cols = colalign.map(function (nde) {\n var node = assertSymbolNodeType(nde);\n var ca = node.text;\n\n if (\"lcr\".indexOf(ca) !== -1) {\n return {\n type: \"align\",\n align: ca\n };\n } else if (ca === \"|\") {\n return {\n type: \"separator\",\n separator: \"|\"\n };\n } else if (ca === \":\") {\n return {\n type: \"separator\",\n separator: \":\"\n };\n }\n\n throw new ParseError(\"Unknown column alignment: \" + ca, nde);\n });\n var res = {\n cols,\n hskipBeforeAndAfter: true,\n // \\@preamble in lttab.dtx\n maxNumCols: cols.length\n };\n return parseArray(context.parser, res, dCellStyle(context.envName));\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // The matrix environments of amsmath builds on the array environment\n// of LaTeX, which is discussed above.\n// The mathtools package adds starred versions of the same environments.\n// These have an optional argument to choose left|center|right justification.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"matrix\", \"pmatrix\", \"bmatrix\", \"Bmatrix\", \"vmatrix\", \"Vmatrix\", \"matrix*\", \"pmatrix*\", \"bmatrix*\", \"Bmatrix*\", \"vmatrix*\", \"Vmatrix*\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n var delimiters = {\n \"matrix\": null,\n \"pmatrix\": [\"(\", \")\"],\n \"bmatrix\": [\"[\", \"]\"],\n \"Bmatrix\": [\"\\\\{\", \"\\\\}\"],\n \"vmatrix\": [\"|\", \"|\"],\n \"Vmatrix\": [\"\\\\Vert\", \"\\\\Vert\"]\n }[context.envName.replace(\"*\", \"\")]; // \\hskip -\\arraycolsep in amsmath\n\n var colAlign = \"c\";\n var payload = {\n hskipBeforeAndAfter: false,\n cols: [{\n type: \"align\",\n align: colAlign\n }]\n };\n\n if (context.envName.charAt(context.envName.length - 1) === \"*\") {\n // It's one of the mathtools starred functions.\n // Parse the optional alignment argument.\n var parser = context.parser;\n parser.consumeSpaces();\n\n if (parser.fetch().text === \"[\") {\n parser.consume();\n parser.consumeSpaces();\n colAlign = parser.fetch().text;\n\n if (\"lcr\".indexOf(colAlign) === -1) {\n throw new ParseError(\"Expected l or c or r\", parser.nextToken);\n }\n\n parser.consume();\n parser.consumeSpaces();\n parser.expect(\"]\");\n parser.consume();\n payload.cols = [{\n type: \"align\",\n align: colAlign\n }];\n }\n }\n\n var res = parseArray(context.parser, payload, dCellStyle(context.envName)); // Populate cols with the correct number of column alignment specs.\n\n var numCols = Math.max(0, ...res.body.map(row => row.length));\n res.cols = new Array(numCols).fill({\n type: \"align\",\n align: colAlign\n });\n return delimiters ? {\n type: \"leftright\",\n mode: context.mode,\n body: [res],\n left: delimiters[0],\n right: delimiters[1],\n rightColor: undefined // \\right uninfluenced by \\color in array\n\n } : res;\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineEnvironment({\n type: \"array\",\n names: [\"smallmatrix\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n var payload = {\n arraystretch: 0.5\n };\n var res = parseArray(context.parser, payload, \"script\");\n res.colSeparationType = \"small\";\n return res;\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineEnvironment({\n type: \"array\",\n names: [\"subarray\"],\n props: {\n numArgs: 1\n },\n\n handler(context, args) {\n // Parsing of {subarray} is similar to {array}\n var symNode = checkSymbolNodeType(args[0]);\n var colalign = symNode ? [args[0]] : assertNodeType(args[0], \"ordgroup\").body;\n var cols = colalign.map(function (nde) {\n var node = assertSymbolNodeType(nde);\n var ca = node.text; // {subarray} only recognizes \"l\" & \"c\"\n\n if (\"lc\".indexOf(ca) !== -1) {\n return {\n type: \"align\",\n align: ca\n };\n }\n\n throw new ParseError(\"Unknown column alignment: \" + ca, nde);\n });\n\n if (cols.length > 1) {\n throw new ParseError(\"{subarray} can contain only one column\");\n }\n\n var res = {\n cols,\n hskipBeforeAndAfter: false,\n arraystretch: 0.5\n };\n res = parseArray(context.parser, res, \"script\");\n\n if (res.body.length > 0 && res.body[0].length > 1) {\n throw new ParseError(\"{subarray} can contain only one column\");\n }\n\n return res;\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // A cases environment (in amsmath.sty) is almost equivalent to\n// \\def\\arraystretch{1.2}%\n// \\left\\{\\begin{array}{@{}l@{\\quad}l@{}} \u2026 \\end{array}\\right.\n// {dcases} is a {cases} environment where cells are set in \\displaystyle,\n// as defined in mathtools.sty.\n// {rcases} is another mathtools environment. It's brace is on the right side.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"cases\", \"dcases\", \"rcases\", \"drcases\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n var payload = {\n arraystretch: 1.2,\n cols: [{\n type: \"align\",\n align: \"l\",\n pregap: 0,\n // TODO(kevinb) get the current style.\n // For now we use the metrics for TEXT style which is what we were\n // doing before. Before attempting to get the current style we\n // should look at TeX's behavior especially for \\over and matrices.\n postgap: 1.0\n /* 1em quad */\n\n }, {\n type: \"align\",\n align: \"l\",\n pregap: 0,\n postgap: 0\n }]\n };\n var res = parseArray(context.parser, payload, dCellStyle(context.envName));\n return {\n type: \"leftright\",\n mode: context.mode,\n body: [res],\n left: context.envName.indexOf(\"r\") > -1 ? \".\" : \"\\\\{\",\n right: context.envName.indexOf(\"r\") > -1 ? \"\\\\}\" : \".\",\n rightColor: undefined\n };\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // In the align environment, one uses ampersands, &, to specify number of\n// columns in each row, and to locate spacing between each column.\n// align gets automatic numbering. align* and aligned do not.\n// The alignedat environment can be used in math mode.\n// Note that we assume \\nomallineskiplimit to be zero,\n// so that \\strut@ is the same as \\strut.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"align\", \"align*\", \"aligned\", \"split\"],\n props: {\n numArgs: 0\n },\n handler: alignedHandler,\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // A gathered environment is like an array environment with one centered\n// column, but where rows are considered lines so get \\jot line spacing\n// and contents are set in \\displaystyle.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"gathered\", \"gather\", \"gather*\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n if (utils.contains([\"gather\", \"gather*\"], context.envName)) {\n validateAmsEnvironmentContext(context);\n }\n\n var res = {\n cols: [{\n type: \"align\",\n align: \"c\"\n }],\n addJot: true,\n colSeparationType: \"gather\",\n autoTag: getAutoTag(context.envName),\n emptySingleRow: true,\n leqno: context.parser.settings.leqno\n };\n return parseArray(context.parser, res, \"display\");\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // alignat environment is like an align environment, but one must explicitly\n// specify maximum number of columns in each row, and can adjust spacing between\n// each columns.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"alignat\", \"alignat*\", \"alignedat\"],\n props: {\n numArgs: 1\n },\n handler: alignedHandler,\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineEnvironment({\n type: \"array\",\n names: [\"equation\", \"equation*\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n validateAmsEnvironmentContext(context);\n var res = {\n autoTag: getAutoTag(context.envName),\n emptySingleRow: true,\n singleRow: true,\n maxNumCols: 1,\n leqno: context.parser.settings.leqno\n };\n return parseArray(context.parser, res, \"display\");\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineEnvironment({\n type: \"array\",\n names: [\"CD\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n validateAmsEnvironmentContext(context);\n return parseCD(context.parser);\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineMacro(\"\\\\nonumber\", \"\\\\gdef\\\\@eqnsw{0}\");\ndefineMacro(\"\\\\notag\", \"\\\\nonumber\"); // Catch \\hline outside array environment\n\ndefineFunction({\n type: \"text\",\n // Doesn't matter what this is.\n names: [\"\\\\hline\", \"\\\\hdashline\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n allowedInMath: true\n },\n\n handler(context, args) {\n throw new ParseError(context.funcName + \" valid only within array environment\");\n }\n\n});\n\nvar environments = _environments;\n\n// defineEnvironment definitions.\n\ndefineFunction({\n type: \"environment\",\n names: [\"\\\\begin\", \"\\\\end\"],\n props: {\n numArgs: 1,\n argTypes: [\"text\"]\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n var nameGroup = args[0];\n\n if (nameGroup.type !== \"ordgroup\") {\n throw new ParseError(\"Invalid environment name\", nameGroup);\n }\n\n var envName = \"\";\n\n for (var i = 0; i < nameGroup.body.length; ++i) {\n envName += assertNodeType(nameGroup.body[i], \"textord\").text;\n }\n\n if (funcName === \"\\\\begin\") {\n // begin...end is similar to left...right\n if (!environments.hasOwnProperty(envName)) {\n throw new ParseError(\"No such environment: \" + envName, nameGroup);\n } // Build the environment object. Arguments and other information will\n // be made available to the begin and end methods using properties.\n\n\n var env = environments[envName];\n var {\n args: _args,\n optArgs\n } = parser.parseArguments(\"\\\\begin{\" + envName + \"}\", env);\n var context = {\n mode: parser.mode,\n envName,\n parser\n };\n var result = env.handler(context, _args, optArgs);\n parser.expect(\"\\\\end\", false);\n var endNameToken = parser.nextToken;\n var end = assertNodeType(parser.parseFunction(), \"environment\");\n\n if (end.name !== envName) {\n throw new ParseError(\"Mismatch: \\\\begin{\" + envName + \"} matched by \\\\end{\" + end.name + \"}\", endNameToken);\n } // $FlowFixMe, \"environment\" handler returns an environment ParseNode\n\n\n return result;\n }\n\n return {\n type: \"environment\",\n mode: parser.mode,\n name: envName,\n nameGroup\n };\n }\n\n});\n\n// TODO(kevinb): implement \\\\sl and \\\\sc\n\nvar htmlBuilder$5 = (group, options) => {\n var font = group.font;\n var newOptions = options.withFont(font);\n return buildGroup$1(group.body, newOptions);\n};\n\nvar mathmlBuilder$4 = (group, options) => {\n var font = group.font;\n var newOptions = options.withFont(font);\n return buildGroup(group.body, newOptions);\n};\n\nvar fontAliases = {\n \"\\\\Bbb\": \"\\\\mathbb\",\n \"\\\\bold\": \"\\\\mathbf\",\n \"\\\\frak\": \"\\\\mathfrak\",\n \"\\\\bm\": \"\\\\boldsymbol\"\n};\ndefineFunction({\n type: \"font\",\n names: [// styles, except \\boldsymbol defined below\n \"\\\\mathrm\", \"\\\\mathit\", \"\\\\mathbf\", \"\\\\mathnormal\", // families\n \"\\\\mathbb\", \"\\\\mathcal\", \"\\\\mathfrak\", \"\\\\mathscr\", \"\\\\mathsf\", \"\\\\mathtt\", // aliases, except \\bm defined below\n \"\\\\Bbb\", \"\\\\bold\", \"\\\\frak\"],\n props: {\n numArgs: 1,\n allowedInArgument: true\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var body = normalizeArgument(args[0]);\n var func = funcName;\n\n if (func in fontAliases) {\n func = fontAliases[func];\n }\n\n return {\n type: \"font\",\n mode: parser.mode,\n font: func.slice(1),\n body\n };\n },\n htmlBuilder: htmlBuilder$5,\n mathmlBuilder: mathmlBuilder$4\n});\ndefineFunction({\n type: \"mclass\",\n names: [\"\\\\boldsymbol\", \"\\\\bm\"],\n props: {\n numArgs: 1\n },\n handler: (_ref2, args) => {\n var {\n parser\n } = _ref2;\n var body = args[0];\n var isCharacterBox = utils.isCharacterBox(body); // amsbsy.sty's \\boldsymbol uses \\binrel spacing to inherit the\n // argument's bin|rel|ord status\n\n return {\n type: \"mclass\",\n mode: parser.mode,\n mclass: binrelClass(body),\n body: [{\n type: \"font\",\n mode: parser.mode,\n font: \"boldsymbol\",\n body\n }],\n isCharacterBox: isCharacterBox\n };\n }\n}); // Old font changing functions\n\ndefineFunction({\n type: \"font\",\n names: [\"\\\\rm\", \"\\\\sf\", \"\\\\tt\", \"\\\\bf\", \"\\\\it\", \"\\\\cal\"],\n props: {\n numArgs: 0,\n allowedInText: true\n },\n handler: (_ref3, args) => {\n var {\n parser,\n funcName,\n breakOnTokenText\n } = _ref3;\n var {\n mode\n } = parser;\n var body = parser.parseExpression(true, breakOnTokenText);\n var style = \"math\" + funcName.slice(1);\n return {\n type: \"font\",\n mode: mode,\n font: style,\n body: {\n type: \"ordgroup\",\n mode: parser.mode,\n body\n }\n };\n },\n htmlBuilder: htmlBuilder$5,\n mathmlBuilder: mathmlBuilder$4\n});\n\nvar adjustStyle = (size, originalStyle) => {\n // Figure out what style this fraction should be in based on the\n // function used\n var style = originalStyle;\n\n if (size === \"display\") {\n // Get display style as a default.\n // If incoming style is sub/sup, use style.text() to get correct size.\n style = style.id >= Style$1.SCRIPT.id ? style.text() : Style$1.DISPLAY;\n } else if (size === \"text\" && style.size === Style$1.DISPLAY.size) {\n // We're in a \\tfrac but incoming style is displaystyle, so:\n style = Style$1.TEXT;\n } else if (size === \"script\") {\n style = Style$1.SCRIPT;\n } else if (size === \"scriptscript\") {\n style = Style$1.SCRIPTSCRIPT;\n }\n\n return style;\n};\n\nvar htmlBuilder$4 = (group, options) => {\n // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).\n var style = adjustStyle(group.size, options.style);\n var nstyle = style.fracNum();\n var dstyle = style.fracDen();\n var newOptions;\n newOptions = options.havingStyle(nstyle);\n var numerm = buildGroup$1(group.numer, newOptions, options);\n\n if (group.continued) {\n // \\cfrac inserts a \\strut into the numerator.\n // Get \\strut dimensions from TeXbook page 353.\n var hStrut = 8.5 / options.fontMetrics().ptPerEm;\n var dStrut = 3.5 / options.fontMetrics().ptPerEm;\n numerm.height = numerm.height < hStrut ? hStrut : numerm.height;\n numerm.depth = numerm.depth < dStrut ? dStrut : numerm.depth;\n }\n\n newOptions = options.havingStyle(dstyle);\n var denomm = buildGroup$1(group.denom, newOptions, options);\n var rule;\n var ruleWidth;\n var ruleSpacing;\n\n if (group.hasBarLine) {\n if (group.barSize) {\n ruleWidth = calculateSize(group.barSize, options);\n rule = buildCommon.makeLineSpan(\"frac-line\", options, ruleWidth);\n } else {\n rule = buildCommon.makeLineSpan(\"frac-line\", options);\n }\n\n ruleWidth = rule.height;\n ruleSpacing = rule.height;\n } else {\n rule = null;\n ruleWidth = 0;\n ruleSpacing = options.fontMetrics().defaultRuleThickness;\n } // Rule 15b\n\n\n var numShift;\n var clearance;\n var denomShift;\n\n if (style.size === Style$1.DISPLAY.size || group.size === \"display\") {\n numShift = options.fontMetrics().num1;\n\n if (ruleWidth > 0) {\n clearance = 3 * ruleSpacing;\n } else {\n clearance = 7 * ruleSpacing;\n }\n\n denomShift = options.fontMetrics().denom1;\n } else {\n if (ruleWidth > 0) {\n numShift = options.fontMetrics().num2;\n clearance = ruleSpacing;\n } else {\n numShift = options.fontMetrics().num3;\n clearance = 3 * ruleSpacing;\n }\n\n denomShift = options.fontMetrics().denom2;\n }\n\n var frac;\n\n if (!rule) {\n // Rule 15c\n var candidateClearance = numShift - numerm.depth - (denomm.height - denomShift);\n\n if (candidateClearance < clearance) {\n numShift += 0.5 * (clearance - candidateClearance);\n denomShift += 0.5 * (clearance - candidateClearance);\n }\n\n frac = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: denomm,\n shift: denomShift\n }, {\n type: \"elem\",\n elem: numerm,\n shift: -numShift\n }]\n }, options);\n } else {\n // Rule 15d\n var axisHeight = options.fontMetrics().axisHeight;\n\n if (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth) < clearance) {\n numShift += clearance - (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth));\n }\n\n if (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift) < clearance) {\n denomShift += clearance - (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift));\n }\n\n var midShift = -(axisHeight - 0.5 * ruleWidth);\n frac = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: denomm,\n shift: denomShift\n }, {\n type: \"elem\",\n elem: rule,\n shift: midShift\n }, {\n type: \"elem\",\n elem: numerm,\n shift: -numShift\n }]\n }, options);\n } // Since we manually change the style sometimes (with \\dfrac or \\tfrac),\n // account for the possible size change here.\n\n\n newOptions = options.havingStyle(style);\n frac.height *= newOptions.sizeMultiplier / options.sizeMultiplier;\n frac.depth *= newOptions.sizeMultiplier / options.sizeMultiplier; // Rule 15e\n\n var delimSize;\n\n if (style.size === Style$1.DISPLAY.size) {\n delimSize = options.fontMetrics().delim1;\n } else if (style.size === Style$1.SCRIPTSCRIPT.size) {\n delimSize = options.havingStyle(Style$1.SCRIPT).fontMetrics().delim2;\n } else {\n delimSize = options.fontMetrics().delim2;\n }\n\n var leftDelim;\n var rightDelim;\n\n if (group.leftDelim == null) {\n leftDelim = makeNullDelimiter(options, [\"mopen\"]);\n } else {\n leftDelim = delimiter.customSizedDelim(group.leftDelim, delimSize, true, options.havingStyle(style), group.mode, [\"mopen\"]);\n }\n\n if (group.continued) {\n rightDelim = buildCommon.makeSpan([]); // zero width for \\cfrac\n } else if (group.rightDelim == null) {\n rightDelim = makeNullDelimiter(options, [\"mclose\"]);\n } else {\n rightDelim = delimiter.customSizedDelim(group.rightDelim, delimSize, true, options.havingStyle(style), group.mode, [\"mclose\"]);\n }\n\n return buildCommon.makeSpan([\"mord\"].concat(newOptions.sizingClasses(options)), [leftDelim, buildCommon.makeSpan([\"mfrac\"], [frac]), rightDelim], options);\n};\n\nvar mathmlBuilder$3 = (group, options) => {\n var node = new mathMLTree.MathNode(\"mfrac\", [buildGroup(group.numer, options), buildGroup(group.denom, options)]);\n\n if (!group.hasBarLine) {\n node.setAttribute(\"linethickness\", \"0px\");\n } else if (group.barSize) {\n var ruleWidth = calculateSize(group.barSize, options);\n node.setAttribute(\"linethickness\", makeEm(ruleWidth));\n }\n\n var style = adjustStyle(group.size, options.style);\n\n if (style.size !== options.style.size) {\n node = new mathMLTree.MathNode(\"mstyle\", [node]);\n var isDisplay = style.size === Style$1.DISPLAY.size ? \"true\" : \"false\";\n node.setAttribute(\"displaystyle\", isDisplay);\n node.setAttribute(\"scriptlevel\", \"0\");\n }\n\n if (group.leftDelim != null || group.rightDelim != null) {\n var withDelims = [];\n\n if (group.leftDelim != null) {\n var leftOp = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(group.leftDelim.replace(\"\\\\\", \"\"))]);\n leftOp.setAttribute(\"fence\", \"true\");\n withDelims.push(leftOp);\n }\n\n withDelims.push(node);\n\n if (group.rightDelim != null) {\n var rightOp = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(group.rightDelim.replace(\"\\\\\", \"\"))]);\n rightOp.setAttribute(\"fence\", \"true\");\n withDelims.push(rightOp);\n }\n\n return makeRow(withDelims);\n }\n\n return node;\n};\n\ndefineFunction({\n type: \"genfrac\",\n names: [\"\\\\dfrac\", \"\\\\frac\", \"\\\\tfrac\", \"\\\\dbinom\", \"\\\\binom\", \"\\\\tbinom\", \"\\\\\\\\atopfrac\", // can\u2019t be entered directly\n \"\\\\\\\\bracefrac\", \"\\\\\\\\brackfrac\" // ditto\n ],\n props: {\n numArgs: 2,\n allowedInArgument: true\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var numer = args[0];\n var denom = args[1];\n var hasBarLine;\n var leftDelim = null;\n var rightDelim = null;\n var size = \"auto\";\n\n switch (funcName) {\n case \"\\\\dfrac\":\n case \"\\\\frac\":\n case \"\\\\tfrac\":\n hasBarLine = true;\n break;\n\n case \"\\\\\\\\atopfrac\":\n hasBarLine = false;\n break;\n\n case \"\\\\dbinom\":\n case \"\\\\binom\":\n case \"\\\\tbinom\":\n hasBarLine = false;\n leftDelim = \"(\";\n rightDelim = \")\";\n break;\n\n case \"\\\\\\\\bracefrac\":\n hasBarLine = false;\n leftDelim = \"\\\\{\";\n rightDelim = \"\\\\}\";\n break;\n\n case \"\\\\\\\\brackfrac\":\n hasBarLine = false;\n leftDelim = \"[\";\n rightDelim = \"]\";\n break;\n\n default:\n throw new Error(\"Unrecognized genfrac command\");\n }\n\n switch (funcName) {\n case \"\\\\dfrac\":\n case \"\\\\dbinom\":\n size = \"display\";\n break;\n\n case \"\\\\tfrac\":\n case \"\\\\tbinom\":\n size = \"text\";\n break;\n }\n\n return {\n type: \"genfrac\",\n mode: parser.mode,\n continued: false,\n numer,\n denom,\n hasBarLine,\n leftDelim,\n rightDelim,\n size,\n barSize: null\n };\n },\n htmlBuilder: htmlBuilder$4,\n mathmlBuilder: mathmlBuilder$3\n});\ndefineFunction({\n type: \"genfrac\",\n names: [\"\\\\cfrac\"],\n props: {\n numArgs: 2\n },\n handler: (_ref2, args) => {\n var {\n parser,\n funcName\n } = _ref2;\n var numer = args[0];\n var denom = args[1];\n return {\n type: \"genfrac\",\n mode: parser.mode,\n continued: true,\n numer,\n denom,\n hasBarLine: true,\n leftDelim: null,\n rightDelim: null,\n size: \"display\",\n barSize: null\n };\n }\n}); // Infix generalized fractions -- these are not rendered directly, but replaced\n// immediately by one of the variants above.\n\ndefineFunction({\n type: \"infix\",\n names: [\"\\\\over\", \"\\\\choose\", \"\\\\atop\", \"\\\\brace\", \"\\\\brack\"],\n props: {\n numArgs: 0,\n infix: true\n },\n\n handler(_ref3) {\n var {\n parser,\n funcName,\n token\n } = _ref3;\n var replaceWith;\n\n switch (funcName) {\n case \"\\\\over\":\n replaceWith = \"\\\\frac\";\n break;\n\n case \"\\\\choose\":\n replaceWith = \"\\\\binom\";\n break;\n\n case \"\\\\atop\":\n replaceWith = \"\\\\\\\\atopfrac\";\n break;\n\n case \"\\\\brace\":\n replaceWith = \"\\\\\\\\bracefrac\";\n break;\n\n case \"\\\\brack\":\n replaceWith = \"\\\\\\\\brackfrac\";\n break;\n\n default:\n throw new Error(\"Unrecognized infix genfrac command\");\n }\n\n return {\n type: \"infix\",\n mode: parser.mode,\n replaceWith,\n token\n };\n }\n\n});\nvar stylArray = [\"display\", \"text\", \"script\", \"scriptscript\"];\n\nvar delimFromValue = function delimFromValue(delimString) {\n var delim = null;\n\n if (delimString.length > 0) {\n delim = delimString;\n delim = delim === \".\" ? null : delim;\n }\n\n return delim;\n};\n\ndefineFunction({\n type: \"genfrac\",\n names: [\"\\\\genfrac\"],\n props: {\n numArgs: 6,\n allowedInArgument: true,\n argTypes: [\"math\", \"math\", \"size\", \"text\", \"math\", \"math\"]\n },\n\n handler(_ref4, args) {\n var {\n parser\n } = _ref4;\n var numer = args[4];\n var denom = args[5]; // Look into the parse nodes to get the desired delimiters.\n\n var leftNode = normalizeArgument(args[0]);\n var leftDelim = leftNode.type === \"atom\" && leftNode.family === \"open\" ? delimFromValue(leftNode.text) : null;\n var rightNode = normalizeArgument(args[1]);\n var rightDelim = rightNode.type === \"atom\" && rightNode.family === \"close\" ? delimFromValue(rightNode.text) : null;\n var barNode = assertNodeType(args[2], \"size\");\n var hasBarLine;\n var barSize = null;\n\n if (barNode.isBlank) {\n // \\genfrac acts differently than \\above.\n // \\genfrac treats an empty size group as a signal to use a\n // standard bar size. \\above would see size = 0 and omit the bar.\n hasBarLine = true;\n } else {\n barSize = barNode.value;\n hasBarLine = barSize.number > 0;\n } // Find out if we want displaystyle, textstyle, etc.\n\n\n var size = \"auto\";\n var styl = args[3];\n\n if (styl.type === \"ordgroup\") {\n if (styl.body.length > 0) {\n var textOrd = assertNodeType(styl.body[0], \"textord\");\n size = stylArray[Number(textOrd.text)];\n }\n } else {\n styl = assertNodeType(styl, \"textord\");\n size = stylArray[Number(styl.text)];\n }\n\n return {\n type: \"genfrac\",\n mode: parser.mode,\n numer,\n denom,\n continued: false,\n hasBarLine,\n barSize,\n leftDelim,\n rightDelim,\n size\n };\n },\n\n htmlBuilder: htmlBuilder$4,\n mathmlBuilder: mathmlBuilder$3\n}); // \\above is an infix fraction that also defines a fraction bar size.\n\ndefineFunction({\n type: \"infix\",\n names: [\"\\\\above\"],\n props: {\n numArgs: 1,\n argTypes: [\"size\"],\n infix: true\n },\n\n handler(_ref5, args) {\n var {\n parser,\n funcName,\n token\n } = _ref5;\n return {\n type: \"infix\",\n mode: parser.mode,\n replaceWith: \"\\\\\\\\abovefrac\",\n size: assertNodeType(args[0], \"size\").value,\n token\n };\n }\n\n});\ndefineFunction({\n type: \"genfrac\",\n names: [\"\\\\\\\\abovefrac\"],\n props: {\n numArgs: 3,\n argTypes: [\"math\", \"size\", \"math\"]\n },\n handler: (_ref6, args) => {\n var {\n parser,\n funcName\n } = _ref6;\n var numer = args[0];\n var barSize = assert(assertNodeType(args[1], \"infix\").size);\n var denom = args[2];\n var hasBarLine = barSize.number > 0;\n return {\n type: \"genfrac\",\n mode: parser.mode,\n numer,\n denom,\n continued: false,\n hasBarLine,\n barSize,\n leftDelim: null,\n rightDelim: null,\n size: \"auto\"\n };\n },\n htmlBuilder: htmlBuilder$4,\n mathmlBuilder: mathmlBuilder$3\n});\n\n// NOTE: Unlike most `htmlBuilder`s, this one handles not only \"horizBrace\", but\n// also \"supsub\" since an over/underbrace can affect super/subscripting.\nvar htmlBuilder$3 = (grp, options) => {\n var style = options.style; // Pull out the `ParseNode<\"horizBrace\">` if `grp` is a \"supsub\" node.\n\n var supSubGroup;\n var group;\n\n if (grp.type === \"supsub\") {\n // Ref: LaTeX source2e: }}}}\\limits}\n // i.e. LaTeX treats the brace similar to an op and passes it\n // with \\limits, so we need to assign supsub style.\n supSubGroup = grp.sup ? buildGroup$1(grp.sup, options.havingStyle(style.sup()), options) : buildGroup$1(grp.sub, options.havingStyle(style.sub()), options);\n group = assertNodeType(grp.base, \"horizBrace\");\n } else {\n group = assertNodeType(grp, \"horizBrace\");\n } // Build the base group\n\n\n var body = buildGroup$1(group.base, options.havingBaseStyle(Style$1.DISPLAY)); // Create the stretchy element\n\n var braceBody = stretchy.svgSpan(group, options); // Generate the vlist, with the appropriate kerns \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n // This first vlist contains the content and the brace: equation\n\n var vlist;\n\n if (group.isOver) {\n vlist = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: body\n }, {\n type: \"kern\",\n size: 0.1\n }, {\n type: \"elem\",\n elem: braceBody\n }]\n }, options); // $FlowFixMe: Replace this with passing \"svg-align\" into makeVList.\n\n vlist.children[0].children[0].children[1].classes.push(\"svg-align\");\n } else {\n vlist = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: body.depth + 0.1 + braceBody.height,\n children: [{\n type: \"elem\",\n elem: braceBody\n }, {\n type: \"kern\",\n size: 0.1\n }, {\n type: \"elem\",\n elem: body\n }]\n }, options); // $FlowFixMe: Replace this with passing \"svg-align\" into makeVList.\n\n vlist.children[0].children[0].children[0].classes.push(\"svg-align\");\n }\n\n if (supSubGroup) {\n // To write the supsub, wrap the first vlist in another vlist:\n // They can't all go in the same vlist, because the note might be\n // wider than the equation. We want the equation to control the\n // brace width.\n // note long note long note\n // \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513 or \u250F\u2501\u2501\u2501\u2513 not \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n // equation eqn eqn\n var vSpan = buildCommon.makeSpan([\"mord\", group.isOver ? \"mover\" : \"munder\"], [vlist], options);\n\n if (group.isOver) {\n vlist = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: vSpan\n }, {\n type: \"kern\",\n size: 0.2\n }, {\n type: \"elem\",\n elem: supSubGroup\n }]\n }, options);\n } else {\n vlist = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: vSpan.depth + 0.2 + supSubGroup.height + supSubGroup.depth,\n children: [{\n type: \"elem\",\n elem: supSubGroup\n }, {\n type: \"kern\",\n size: 0.2\n }, {\n type: \"elem\",\n elem: vSpan\n }]\n }, options);\n }\n }\n\n return buildCommon.makeSpan([\"mord\", group.isOver ? \"mover\" : \"munder\"], [vlist], options);\n};\n\nvar mathmlBuilder$2 = (group, options) => {\n var accentNode = stretchy.mathMLnode(group.label);\n return new mathMLTree.MathNode(group.isOver ? \"mover\" : \"munder\", [buildGroup(group.base, options), accentNode]);\n}; // Horizontal stretchy braces\n\n\ndefineFunction({\n type: \"horizBrace\",\n names: [\"\\\\overbrace\", \"\\\\underbrace\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n return {\n type: \"horizBrace\",\n mode: parser.mode,\n label: funcName,\n isOver: /^\\\\over/.test(funcName),\n base: args[0]\n };\n },\n\n htmlBuilder: htmlBuilder$3,\n mathmlBuilder: mathmlBuilder$2\n});\n\ndefineFunction({\n type: \"href\",\n names: [\"\\\\href\"],\n props: {\n numArgs: 2,\n argTypes: [\"url\", \"original\"],\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser\n } = _ref;\n var body = args[1];\n var href = assertNodeType(args[0], \"url\").url;\n\n if (!parser.settings.isTrusted({\n command: \"\\\\href\",\n url: href\n })) {\n return parser.formatUnsupportedCmd(\"\\\\href\");\n }\n\n return {\n type: \"href\",\n mode: parser.mode,\n href,\n body: ordargument(body)\n };\n },\n htmlBuilder: (group, options) => {\n var elements = buildExpression$1(group.body, options, false);\n return buildCommon.makeAnchor(group.href, [], elements, options);\n },\n mathmlBuilder: (group, options) => {\n var math = buildExpressionRow(group.body, options);\n\n if (!(math instanceof MathNode)) {\n math = new MathNode(\"mrow\", [math]);\n }\n\n math.setAttribute(\"href\", group.href);\n return math;\n }\n});\ndefineFunction({\n type: \"href\",\n names: [\"\\\\url\"],\n props: {\n numArgs: 1,\n argTypes: [\"url\"],\n allowedInText: true\n },\n handler: (_ref2, args) => {\n var {\n parser\n } = _ref2;\n var href = assertNodeType(args[0], \"url\").url;\n\n if (!parser.settings.isTrusted({\n command: \"\\\\url\",\n url: href\n })) {\n return parser.formatUnsupportedCmd(\"\\\\url\");\n }\n\n var chars = [];\n\n for (var i = 0; i < href.length; i++) {\n var c = href[i];\n\n if (c === \"~\") {\n c = \"\\\\textasciitilde\";\n }\n\n chars.push({\n type: \"textord\",\n mode: \"text\",\n text: c\n });\n }\n\n var body = {\n type: \"text\",\n mode: parser.mode,\n font: \"\\\\texttt\",\n body: chars\n };\n return {\n type: \"href\",\n mode: parser.mode,\n href,\n body: ordargument(body)\n };\n }\n});\n\n// In LaTeX, \\vcenter can act only on a box, as in\n// \\vcenter{\\hbox{$\\frac{a+b}{\\dfrac{c}{d}}$}}\n// This function by itself doesn't do anything but prevent a soft line break.\n\ndefineFunction({\n type: \"hbox\",\n names: [\"\\\\hbox\"],\n props: {\n numArgs: 1,\n argTypes: [\"text\"],\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n return {\n type: \"hbox\",\n mode: parser.mode,\n body: ordargument(args[0])\n };\n },\n\n htmlBuilder(group, options) {\n var elements = buildExpression$1(group.body, options, false);\n return buildCommon.makeFragment(elements);\n },\n\n mathmlBuilder(group, options) {\n return new mathMLTree.MathNode(\"mrow\", buildExpression(group.body, options));\n }\n\n});\n\ndefineFunction({\n type: \"html\",\n names: [\"\\\\htmlClass\", \"\\\\htmlId\", \"\\\\htmlStyle\", \"\\\\htmlData\"],\n props: {\n numArgs: 2,\n argTypes: [\"raw\", \"original\"],\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName,\n token\n } = _ref;\n var value = assertNodeType(args[0], \"raw\").string;\n var body = args[1];\n\n if (parser.settings.strict) {\n parser.settings.reportNonstrict(\"htmlExtension\", \"HTML extension is disabled on strict mode\");\n }\n\n var trustContext;\n var attributes = {};\n\n switch (funcName) {\n case \"\\\\htmlClass\":\n attributes.class = value;\n trustContext = {\n command: \"\\\\htmlClass\",\n class: value\n };\n break;\n\n case \"\\\\htmlId\":\n attributes.id = value;\n trustContext = {\n command: \"\\\\htmlId\",\n id: value\n };\n break;\n\n case \"\\\\htmlStyle\":\n attributes.style = value;\n trustContext = {\n command: \"\\\\htmlStyle\",\n style: value\n };\n break;\n\n case \"\\\\htmlData\":\n {\n var data = value.split(\",\");\n\n for (var i = 0; i < data.length; i++) {\n var keyVal = data[i].split(\"=\");\n\n if (keyVal.length !== 2) {\n throw new ParseError(\"Error parsing key-value for \\\\htmlData\");\n }\n\n attributes[\"data-\" + keyVal[0].trim()] = keyVal[1].trim();\n }\n\n trustContext = {\n command: \"\\\\htmlData\",\n attributes\n };\n break;\n }\n\n default:\n throw new Error(\"Unrecognized html command\");\n }\n\n if (!parser.settings.isTrusted(trustContext)) {\n return parser.formatUnsupportedCmd(funcName);\n }\n\n return {\n type: \"html\",\n mode: parser.mode,\n attributes,\n body: ordargument(body)\n };\n },\n htmlBuilder: (group, options) => {\n var elements = buildExpression$1(group.body, options, false);\n var classes = [\"enclosing\"];\n\n if (group.attributes.class) {\n classes.push(...group.attributes.class.trim().split(/\\s+/));\n }\n\n var span = buildCommon.makeSpan(classes, elements, options);\n\n for (var attr in group.attributes) {\n if (attr !== \"class\" && group.attributes.hasOwnProperty(attr)) {\n span.setAttribute(attr, group.attributes[attr]);\n }\n }\n\n return span;\n },\n mathmlBuilder: (group, options) => {\n return buildExpressionRow(group.body, options);\n }\n});\n\ndefineFunction({\n type: \"htmlmathml\",\n names: [\"\\\\html@mathml\"],\n props: {\n numArgs: 2,\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser\n } = _ref;\n return {\n type: \"htmlmathml\",\n mode: parser.mode,\n html: ordargument(args[0]),\n mathml: ordargument(args[1])\n };\n },\n htmlBuilder: (group, options) => {\n var elements = buildExpression$1(group.html, options, false);\n return buildCommon.makeFragment(elements);\n },\n mathmlBuilder: (group, options) => {\n return buildExpressionRow(group.mathml, options);\n }\n});\n\nvar sizeData = function sizeData(str) {\n if (/^[-+]? *(\\d+(\\.\\d*)?|\\.\\d+)$/.test(str)) {\n // str is a number with no unit specified.\n // default unit is bp, per graphix package.\n return {\n number: +str,\n unit: \"bp\"\n };\n } else {\n var match = /([-+]?) *(\\d+(?:\\.\\d*)?|\\.\\d+) *([a-z]{2})/.exec(str);\n\n if (!match) {\n throw new ParseError(\"Invalid size: '\" + str + \"' in \\\\includegraphics\");\n }\n\n var data = {\n number: +(match[1] + match[2]),\n // sign + magnitude, cast to number\n unit: match[3]\n };\n\n if (!validUnit(data)) {\n throw new ParseError(\"Invalid unit: '\" + data.unit + \"' in \\\\includegraphics.\");\n }\n\n return data;\n }\n};\n\ndefineFunction({\n type: \"includegraphics\",\n names: [\"\\\\includegraphics\"],\n props: {\n numArgs: 1,\n numOptionalArgs: 1,\n argTypes: [\"raw\", \"url\"],\n allowedInText: false\n },\n handler: (_ref, args, optArgs) => {\n var {\n parser\n } = _ref;\n var width = {\n number: 0,\n unit: \"em\"\n };\n var height = {\n number: 0.9,\n unit: \"em\"\n }; // sorta character sized.\n\n var totalheight = {\n number: 0,\n unit: \"em\"\n };\n var alt = \"\";\n\n if (optArgs[0]) {\n var attributeStr = assertNodeType(optArgs[0], \"raw\").string; // Parser.js does not parse key/value pairs. We get a string.\n\n var attributes = attributeStr.split(\",\");\n\n for (var i = 0; i < attributes.length; i++) {\n var keyVal = attributes[i].split(\"=\");\n\n if (keyVal.length === 2) {\n var str = keyVal[1].trim();\n\n switch (keyVal[0].trim()) {\n case \"alt\":\n alt = str;\n break;\n\n case \"width\":\n width = sizeData(str);\n break;\n\n case \"height\":\n height = sizeData(str);\n break;\n\n case \"totalheight\":\n totalheight = sizeData(str);\n break;\n\n default:\n throw new ParseError(\"Invalid key: '\" + keyVal[0] + \"' in \\\\includegraphics.\");\n }\n }\n }\n }\n\n var src = assertNodeType(args[0], \"url\").url;\n\n if (alt === \"\") {\n // No alt given. Use the file name. Strip away the path.\n alt = src;\n alt = alt.replace(/^.*[\\\\/]/, '');\n alt = alt.substring(0, alt.lastIndexOf('.'));\n }\n\n if (!parser.settings.isTrusted({\n command: \"\\\\includegraphics\",\n url: src\n })) {\n return parser.formatUnsupportedCmd(\"\\\\includegraphics\");\n }\n\n return {\n type: \"includegraphics\",\n mode: parser.mode,\n alt: alt,\n width: width,\n height: height,\n totalheight: totalheight,\n src: src\n };\n },\n htmlBuilder: (group, options) => {\n var height = calculateSize(group.height, options);\n var depth = 0;\n\n if (group.totalheight.number > 0) {\n depth = calculateSize(group.totalheight, options) - height;\n }\n\n var width = 0;\n\n if (group.width.number > 0) {\n width = calculateSize(group.width, options);\n }\n\n var style = {\n height: makeEm(height + depth)\n };\n\n if (width > 0) {\n style.width = makeEm(width);\n }\n\n if (depth > 0) {\n style.verticalAlign = makeEm(-depth);\n }\n\n var node = new Img(group.src, group.alt, style);\n node.height = height;\n node.depth = depth;\n return node;\n },\n mathmlBuilder: (group, options) => {\n var node = new mathMLTree.MathNode(\"mglyph\", []);\n node.setAttribute(\"alt\", group.alt);\n var height = calculateSize(group.height, options);\n var depth = 0;\n\n if (group.totalheight.number > 0) {\n depth = calculateSize(group.totalheight, options) - height;\n node.setAttribute(\"valign\", makeEm(-depth));\n }\n\n node.setAttribute(\"height\", makeEm(height + depth));\n\n if (group.width.number > 0) {\n var width = calculateSize(group.width, options);\n node.setAttribute(\"width\", makeEm(width));\n }\n\n node.setAttribute(\"src\", group.src);\n return node;\n }\n});\n\n// Horizontal spacing commands\n\ndefineFunction({\n type: \"kern\",\n names: [\"\\\\kern\", \"\\\\mkern\", \"\\\\hskip\", \"\\\\mskip\"],\n props: {\n numArgs: 1,\n argTypes: [\"size\"],\n primitive: true,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n var size = assertNodeType(args[0], \"size\");\n\n if (parser.settings.strict) {\n var mathFunction = funcName[1] === 'm'; // \\mkern, \\mskip\n\n var muUnit = size.value.unit === 'mu';\n\n if (mathFunction) {\n if (!muUnit) {\n parser.settings.reportNonstrict(\"mathVsTextUnits\", \"LaTeX's \" + funcName + \" supports only mu units, \" + (\"not \" + size.value.unit + \" units\"));\n }\n\n if (parser.mode !== \"math\") {\n parser.settings.reportNonstrict(\"mathVsTextUnits\", \"LaTeX's \" + funcName + \" works only in math mode\");\n }\n } else {\n // !mathFunction\n if (muUnit) {\n parser.settings.reportNonstrict(\"mathVsTextUnits\", \"LaTeX's \" + funcName + \" doesn't support mu units\");\n }\n }\n }\n\n return {\n type: \"kern\",\n mode: parser.mode,\n dimension: size.value\n };\n },\n\n htmlBuilder(group, options) {\n return buildCommon.makeGlue(group.dimension, options);\n },\n\n mathmlBuilder(group, options) {\n var dimension = calculateSize(group.dimension, options);\n return new mathMLTree.SpaceNode(dimension);\n }\n\n});\n\n// Horizontal overlap functions\ndefineFunction({\n type: \"lap\",\n names: [\"\\\\mathllap\", \"\\\\mathrlap\", \"\\\\mathclap\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var body = args[0];\n return {\n type: \"lap\",\n mode: parser.mode,\n alignment: funcName.slice(5),\n body\n };\n },\n htmlBuilder: (group, options) => {\n // mathllap, mathrlap, mathclap\n var inner;\n\n if (group.alignment === \"clap\") {\n // ref: https://www.math.lsu.edu/~aperlis/publications/mathclap/\n inner = buildCommon.makeSpan([], [buildGroup$1(group.body, options)]); // wrap, since CSS will center a .clap > .inner > span\n\n inner = buildCommon.makeSpan([\"inner\"], [inner], options);\n } else {\n inner = buildCommon.makeSpan([\"inner\"], [buildGroup$1(group.body, options)]);\n }\n\n var fix = buildCommon.makeSpan([\"fix\"], []);\n var node = buildCommon.makeSpan([group.alignment], [inner, fix], options); // At this point, we have correctly set horizontal alignment of the\n // two items involved in the lap.\n // Next, use a strut to set the height of the HTML bounding box.\n // Otherwise, a tall argument may be misplaced.\n // This code resolved issue #1153\n\n var strut = buildCommon.makeSpan([\"strut\"]);\n strut.style.height = makeEm(node.height + node.depth);\n\n if (node.depth) {\n strut.style.verticalAlign = makeEm(-node.depth);\n }\n\n node.children.unshift(strut); // Next, prevent vertical misplacement when next to something tall.\n // This code resolves issue #1234\n\n node = buildCommon.makeSpan([\"thinbox\"], [node], options);\n return buildCommon.makeSpan([\"mord\", \"vbox\"], [node], options);\n },\n mathmlBuilder: (group, options) => {\n // mathllap, mathrlap, mathclap\n var node = new mathMLTree.MathNode(\"mpadded\", [buildGroup(group.body, options)]);\n\n if (group.alignment !== \"rlap\") {\n var offset = group.alignment === \"llap\" ? \"-1\" : \"-0.5\";\n node.setAttribute(\"lspace\", offset + \"width\");\n }\n\n node.setAttribute(\"width\", \"0px\");\n return node;\n }\n});\n\ndefineFunction({\n type: \"styling\",\n names: [\"\\\\(\", \"$\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n allowedInMath: false\n },\n\n handler(_ref, args) {\n var {\n funcName,\n parser\n } = _ref;\n var outerMode = parser.mode;\n parser.switchMode(\"math\");\n var close = funcName === \"\\\\(\" ? \"\\\\)\" : \"$\";\n var body = parser.parseExpression(false, close);\n parser.expect(close);\n parser.switchMode(outerMode);\n return {\n type: \"styling\",\n mode: parser.mode,\n style: \"text\",\n body\n };\n }\n\n}); // Check for extra closing math delimiters\n\ndefineFunction({\n type: \"text\",\n // Doesn't matter what this is.\n names: [\"\\\\)\", \"\\\\]\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n allowedInMath: false\n },\n\n handler(context, args) {\n throw new ParseError(\"Mismatched \" + context.funcName);\n }\n\n});\n\nvar chooseMathStyle = (group, options) => {\n switch (options.style.size) {\n case Style$1.DISPLAY.size:\n return group.display;\n\n case Style$1.TEXT.size:\n return group.text;\n\n case Style$1.SCRIPT.size:\n return group.script;\n\n case Style$1.SCRIPTSCRIPT.size:\n return group.scriptscript;\n\n default:\n return group.text;\n }\n};\n\ndefineFunction({\n type: \"mathchoice\",\n names: [\"\\\\mathchoice\"],\n props: {\n numArgs: 4,\n primitive: true\n },\n handler: (_ref, args) => {\n var {\n parser\n } = _ref;\n return {\n type: \"mathchoice\",\n mode: parser.mode,\n display: ordargument(args[0]),\n text: ordargument(args[1]),\n script: ordargument(args[2]),\n scriptscript: ordargument(args[3])\n };\n },\n htmlBuilder: (group, options) => {\n var body = chooseMathStyle(group, options);\n var elements = buildExpression$1(body, options, false);\n return buildCommon.makeFragment(elements);\n },\n mathmlBuilder: (group, options) => {\n var body = chooseMathStyle(group, options);\n return buildExpressionRow(body, options);\n }\n});\n\nvar assembleSupSub = (base, supGroup, subGroup, options, style, slant, baseShift) => {\n base = buildCommon.makeSpan([], [base]);\n var subIsSingleCharacter = subGroup && utils.isCharacterBox(subGroup);\n var sub;\n var sup; // We manually have to handle the superscripts and subscripts. This,\n // aside from the kern calculations, is copied from supsub.\n\n if (supGroup) {\n var elem = buildGroup$1(supGroup, options.havingStyle(style.sup()), options);\n sup = {\n elem,\n kern: Math.max(options.fontMetrics().bigOpSpacing1, options.fontMetrics().bigOpSpacing3 - elem.depth)\n };\n }\n\n if (subGroup) {\n var _elem = buildGroup$1(subGroup, options.havingStyle(style.sub()), options);\n\n sub = {\n elem: _elem,\n kern: Math.max(options.fontMetrics().bigOpSpacing2, options.fontMetrics().bigOpSpacing4 - _elem.height)\n };\n } // Build the final group as a vlist of the possible subscript, base,\n // and possible superscript.\n\n\n var finalGroup;\n\n if (sup && sub) {\n var bottom = options.fontMetrics().bigOpSpacing5 + sub.elem.height + sub.elem.depth + sub.kern + base.depth + baseShift;\n finalGroup = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: bottom,\n children: [{\n type: \"kern\",\n size: options.fontMetrics().bigOpSpacing5\n }, {\n type: \"elem\",\n elem: sub.elem,\n marginLeft: makeEm(-slant)\n }, {\n type: \"kern\",\n size: sub.kern\n }, {\n type: \"elem\",\n elem: base\n }, {\n type: \"kern\",\n size: sup.kern\n }, {\n type: \"elem\",\n elem: sup.elem,\n marginLeft: makeEm(slant)\n }, {\n type: \"kern\",\n size: options.fontMetrics().bigOpSpacing5\n }]\n }, options);\n } else if (sub) {\n var top = base.height - baseShift; // Shift the limits by the slant of the symbol. Note\n // that we are supposed to shift the limits by 1/2 of the slant,\n // but since we are centering the limits adding a full slant of\n // margin will shift by 1/2 that.\n\n finalGroup = buildCommon.makeVList({\n positionType: \"top\",\n positionData: top,\n children: [{\n type: \"kern\",\n size: options.fontMetrics().bigOpSpacing5\n }, {\n type: \"elem\",\n elem: sub.elem,\n marginLeft: makeEm(-slant)\n }, {\n type: \"kern\",\n size: sub.kern\n }, {\n type: \"elem\",\n elem: base\n }]\n }, options);\n } else if (sup) {\n var _bottom = base.depth + baseShift;\n\n finalGroup = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: _bottom,\n children: [{\n type: \"elem\",\n elem: base\n }, {\n type: \"kern\",\n size: sup.kern\n }, {\n type: \"elem\",\n elem: sup.elem,\n marginLeft: makeEm(slant)\n }, {\n type: \"kern\",\n size: options.fontMetrics().bigOpSpacing5\n }]\n }, options);\n } else {\n // This case probably shouldn't occur (this would mean the\n // supsub was sending us a group with no superscript or\n // subscript) but be safe.\n return base;\n }\n\n var parts = [finalGroup];\n\n if (sub && slant !== 0 && !subIsSingleCharacter) {\n // A negative margin-left was applied to the lower limit.\n // Avoid an overlap by placing a spacer on the left on the group.\n var spacer = buildCommon.makeSpan([\"mspace\"], [], options);\n spacer.style.marginRight = makeEm(slant);\n parts.unshift(spacer);\n }\n\n return buildCommon.makeSpan([\"mop\", \"op-limits\"], parts, options);\n};\n\n// Limits, symbols\n// Most operators have a large successor symbol, but these don't.\nvar noSuccessor = [\"\\\\smallint\"]; // NOTE: Unlike most `htmlBuilder`s, this one handles not only \"op\", but also\n// \"supsub\" since some of them (like \\int) can affect super/subscripting.\n\nvar htmlBuilder$2 = (grp, options) => {\n // Operators are handled in the TeXbook pg. 443-444, rule 13(a).\n var supGroup;\n var subGroup;\n var hasLimits = false;\n var group;\n\n if (grp.type === \"supsub\") {\n // If we have limits, supsub will pass us its group to handle. Pull\n // out the superscript and subscript and set the group to the op in\n // its base.\n supGroup = grp.sup;\n subGroup = grp.sub;\n group = assertNodeType(grp.base, \"op\");\n hasLimits = true;\n } else {\n group = assertNodeType(grp, \"op\");\n }\n\n var style = options.style;\n var large = false;\n\n if (style.size === Style$1.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name)) {\n // Most symbol operators get larger in displaystyle (rule 13)\n large = true;\n }\n\n var base;\n\n if (group.symbol) {\n // If this is a symbol, create the symbol.\n var fontName = large ? \"Size2-Regular\" : \"Size1-Regular\";\n var stash = \"\";\n\n if (group.name === \"\\\\oiint\" || group.name === \"\\\\oiiint\") {\n // No font glyphs yet, so use a glyph w/o the oval.\n // TODO: When font glyphs are available, delete this code.\n stash = group.name.slice(1);\n group.name = stash === \"oiint\" ? \"\\\\iint\" : \"\\\\iiint\";\n }\n\n base = buildCommon.makeSymbol(group.name, fontName, \"math\", options, [\"mop\", \"op-symbol\", large ? \"large-op\" : \"small-op\"]);\n\n if (stash.length > 0) {\n // We're in \\oiint or \\oiiint. Overlay the oval.\n // TODO: When font glyphs are available, delete this code.\n var italic = base.italic;\n var oval = buildCommon.staticSvg(stash + \"Size\" + (large ? \"2\" : \"1\"), options);\n base = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: base,\n shift: 0\n }, {\n type: \"elem\",\n elem: oval,\n shift: large ? 0.08 : 0\n }]\n }, options);\n group.name = \"\\\\\" + stash;\n base.classes.unshift(\"mop\"); // $FlowFixMe\n\n base.italic = italic;\n }\n } else if (group.body) {\n // If this is a list, compose that list.\n var inner = buildExpression$1(group.body, options, true);\n\n if (inner.length === 1 && inner[0] instanceof SymbolNode) {\n base = inner[0];\n base.classes[0] = \"mop\"; // replace old mclass\n } else {\n base = buildCommon.makeSpan([\"mop\"], inner, options);\n }\n } else {\n // Otherwise, this is a text operator. Build the text from the\n // operator's name.\n var output = [];\n\n for (var i = 1; i < group.name.length; i++) {\n output.push(buildCommon.mathsym(group.name[i], group.mode, options));\n }\n\n base = buildCommon.makeSpan([\"mop\"], output, options);\n } // If content of op is a single symbol, shift it vertically.\n\n\n var baseShift = 0;\n var slant = 0;\n\n if ((base instanceof SymbolNode || group.name === \"\\\\oiint\" || group.name === \"\\\\oiiint\") && !group.suppressBaseShift) {\n // We suppress the shift of the base of \\overset and \\underset. Otherwise,\n // shift the symbol so its center lies on the axis (rule 13). It\n // appears that our fonts have the centers of the symbols already\n // almost on the axis, so these numbers are very small. Note we\n // don't actually apply this here, but instead it is used either in\n // the vlist creation or separately when there are no limits.\n baseShift = (base.height - base.depth) / 2 - options.fontMetrics().axisHeight; // The slant of the symbol is just its italic correction.\n // $FlowFixMe\n\n slant = base.italic;\n }\n\n if (hasLimits) {\n return assembleSupSub(base, supGroup, subGroup, options, style, slant, baseShift);\n } else {\n if (baseShift) {\n base.style.position = \"relative\";\n base.style.top = makeEm(baseShift);\n }\n\n return base;\n }\n};\n\nvar mathmlBuilder$1 = (group, options) => {\n var node;\n\n if (group.symbol) {\n // This is a symbol. Just add the symbol.\n node = new MathNode(\"mo\", [makeText(group.name, group.mode)]);\n\n if (utils.contains(noSuccessor, group.name)) {\n node.setAttribute(\"largeop\", \"false\");\n }\n } else if (group.body) {\n // This is an operator with children. Add them.\n node = new MathNode(\"mo\", buildExpression(group.body, options));\n } else {\n // This is a text operator. Add all of the characters from the\n // operator's name.\n node = new MathNode(\"mi\", [new TextNode(group.name.slice(1))]); // Append an .\n // ref: https://www.w3.org/TR/REC-MathML/chap3_2.html#sec3.2.4\n\n var operator = new MathNode(\"mo\", [makeText(\"\\u2061\", \"text\")]);\n\n if (group.parentIsSupSub) {\n node = new MathNode(\"mrow\", [node, operator]);\n } else {\n node = newDocumentFragment([node, operator]);\n }\n }\n\n return node;\n};\n\nvar singleCharBigOps = {\n \"\\u220F\": \"\\\\prod\",\n \"\\u2210\": \"\\\\coprod\",\n \"\\u2211\": \"\\\\sum\",\n \"\\u22c0\": \"\\\\bigwedge\",\n \"\\u22c1\": \"\\\\bigvee\",\n \"\\u22c2\": \"\\\\bigcap\",\n \"\\u22c3\": \"\\\\bigcup\",\n \"\\u2a00\": \"\\\\bigodot\",\n \"\\u2a01\": \"\\\\bigoplus\",\n \"\\u2a02\": \"\\\\bigotimes\",\n \"\\u2a04\": \"\\\\biguplus\",\n \"\\u2a06\": \"\\\\bigsqcup\"\n};\ndefineFunction({\n type: \"op\",\n names: [\"\\\\coprod\", \"\\\\bigvee\", \"\\\\bigwedge\", \"\\\\biguplus\", \"\\\\bigcap\", \"\\\\bigcup\", \"\\\\intop\", \"\\\\prod\", \"\\\\sum\", \"\\\\bigotimes\", \"\\\\bigoplus\", \"\\\\bigodot\", \"\\\\bigsqcup\", \"\\\\smallint\", \"\\u220F\", \"\\u2210\", \"\\u2211\", \"\\u22c0\", \"\\u22c1\", \"\\u22c2\", \"\\u22c3\", \"\\u2a00\", \"\\u2a01\", \"\\u2a02\", \"\\u2a04\", \"\\u2a06\"],\n props: {\n numArgs: 0\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var fName = funcName;\n\n if (fName.length === 1) {\n fName = singleCharBigOps[fName];\n }\n\n return {\n type: \"op\",\n mode: parser.mode,\n limits: true,\n parentIsSupSub: false,\n symbol: true,\n name: fName\n };\n },\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n}); // Note: calling defineFunction with a type that's already been defined only\n// works because the same htmlBuilder and mathmlBuilder are being used.\n\ndefineFunction({\n type: \"op\",\n names: [\"\\\\mathop\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n handler: (_ref2, args) => {\n var {\n parser\n } = _ref2;\n var body = args[0];\n return {\n type: \"op\",\n mode: parser.mode,\n limits: false,\n parentIsSupSub: false,\n symbol: false,\n body: ordargument(body)\n };\n },\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n}); // There are 2 flags for operators; whether they produce limits in\n// displaystyle, and whether they are symbols and should grow in\n// displaystyle. These four groups cover the four possible choices.\n\nvar singleCharIntegrals = {\n \"\\u222b\": \"\\\\int\",\n \"\\u222c\": \"\\\\iint\",\n \"\\u222d\": \"\\\\iiint\",\n \"\\u222e\": \"\\\\oint\",\n \"\\u222f\": \"\\\\oiint\",\n \"\\u2230\": \"\\\\oiiint\"\n}; // No limits, not symbols\n\ndefineFunction({\n type: \"op\",\n names: [\"\\\\arcsin\", \"\\\\arccos\", \"\\\\arctan\", \"\\\\arctg\", \"\\\\arcctg\", \"\\\\arg\", \"\\\\ch\", \"\\\\cos\", \"\\\\cosec\", \"\\\\cosh\", \"\\\\cot\", \"\\\\cotg\", \"\\\\coth\", \"\\\\csc\", \"\\\\ctg\", \"\\\\cth\", \"\\\\deg\", \"\\\\dim\", \"\\\\exp\", \"\\\\hom\", \"\\\\ker\", \"\\\\lg\", \"\\\\ln\", \"\\\\log\", \"\\\\sec\", \"\\\\sin\", \"\\\\sinh\", \"\\\\sh\", \"\\\\tan\", \"\\\\tanh\", \"\\\\tg\", \"\\\\th\"],\n props: {\n numArgs: 0\n },\n\n handler(_ref3) {\n var {\n parser,\n funcName\n } = _ref3;\n return {\n type: \"op\",\n mode: parser.mode,\n limits: false,\n parentIsSupSub: false,\n symbol: false,\n name: funcName\n };\n },\n\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n}); // Limits, not symbols\n\ndefineFunction({\n type: \"op\",\n names: [\"\\\\det\", \"\\\\gcd\", \"\\\\inf\", \"\\\\lim\", \"\\\\max\", \"\\\\min\", \"\\\\Pr\", \"\\\\sup\"],\n props: {\n numArgs: 0\n },\n\n handler(_ref4) {\n var {\n parser,\n funcName\n } = _ref4;\n return {\n type: \"op\",\n mode: parser.mode,\n limits: true,\n parentIsSupSub: false,\n symbol: false,\n name: funcName\n };\n },\n\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n}); // No limits, symbols\n\ndefineFunction({\n type: \"op\",\n names: [\"\\\\int\", \"\\\\iint\", \"\\\\iiint\", \"\\\\oint\", \"\\\\oiint\", \"\\\\oiiint\", \"\\u222b\", \"\\u222c\", \"\\u222d\", \"\\u222e\", \"\\u222f\", \"\\u2230\"],\n props: {\n numArgs: 0\n },\n\n handler(_ref5) {\n var {\n parser,\n funcName\n } = _ref5;\n var fName = funcName;\n\n if (fName.length === 1) {\n fName = singleCharIntegrals[fName];\n }\n\n return {\n type: \"op\",\n mode: parser.mode,\n limits: false,\n parentIsSupSub: false,\n symbol: true,\n name: fName\n };\n },\n\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n});\n\n// NOTE: Unlike most `htmlBuilder`s, this one handles not only\n// \"operatorname\", but also \"supsub\" since \\operatorname* can\n// affect super/subscripting.\nvar htmlBuilder$1 = (grp, options) => {\n // Operators are handled in the TeXbook pg. 443-444, rule 13(a).\n var supGroup;\n var subGroup;\n var hasLimits = false;\n var group;\n\n if (grp.type === \"supsub\") {\n // If we have limits, supsub will pass us its group to handle. Pull\n // out the superscript and subscript and set the group to the op in\n // its base.\n supGroup = grp.sup;\n subGroup = grp.sub;\n group = assertNodeType(grp.base, \"operatorname\");\n hasLimits = true;\n } else {\n group = assertNodeType(grp, \"operatorname\");\n }\n\n var base;\n\n if (group.body.length > 0) {\n var body = group.body.map(child => {\n // $FlowFixMe: Check if the node has a string `text` property.\n var childText = child.text;\n\n if (typeof childText === \"string\") {\n return {\n type: \"textord\",\n mode: child.mode,\n text: childText\n };\n } else {\n return child;\n }\n }); // Consolidate function names into symbol characters.\n\n var expression = buildExpression$1(body, options.withFont(\"mathrm\"), true);\n\n for (var i = 0; i < expression.length; i++) {\n var child = expression[i];\n\n if (child instanceof SymbolNode) {\n // Per amsopn package,\n // change minus to hyphen and \\ast to asterisk\n child.text = child.text.replace(/\\u2212/, \"-\").replace(/\\u2217/, \"*\");\n }\n }\n\n base = buildCommon.makeSpan([\"mop\"], expression, options);\n } else {\n base = buildCommon.makeSpan([\"mop\"], [], options);\n }\n\n if (hasLimits) {\n return assembleSupSub(base, supGroup, subGroup, options, options.style, 0, 0);\n } else {\n return base;\n }\n};\n\nvar mathmlBuilder = (group, options) => {\n // The steps taken here are similar to the html version.\n var expression = buildExpression(group.body, options.withFont(\"mathrm\")); // Is expression a string or has it something like a fraction?\n\n var isAllString = true; // default\n\n for (var i = 0; i < expression.length; i++) {\n var node = expression[i];\n\n if (node instanceof mathMLTree.SpaceNode) ; else if (node instanceof mathMLTree.MathNode) {\n switch (node.type) {\n case \"mi\":\n case \"mn\":\n case \"ms\":\n case \"mspace\":\n case \"mtext\":\n break;\n // Do nothing yet.\n\n case \"mo\":\n {\n var child = node.children[0];\n\n if (node.children.length === 1 && child instanceof mathMLTree.TextNode) {\n child.text = child.text.replace(/\\u2212/, \"-\").replace(/\\u2217/, \"*\");\n } else {\n isAllString = false;\n }\n\n break;\n }\n\n default:\n isAllString = false;\n }\n } else {\n isAllString = false;\n }\n }\n\n if (isAllString) {\n // Write a single TextNode instead of multiple nested tags.\n var word = expression.map(node => node.toText()).join(\"\");\n expression = [new mathMLTree.TextNode(word)];\n }\n\n var identifier = new mathMLTree.MathNode(\"mi\", expression);\n identifier.setAttribute(\"mathvariant\", \"normal\"); // \\u2061 is the same as ⁡\n // ref: https://www.w3schools.com/charsets/ref_html_entities_a.asp\n\n var operator = new mathMLTree.MathNode(\"mo\", [makeText(\"\\u2061\", \"text\")]);\n\n if (group.parentIsSupSub) {\n return new mathMLTree.MathNode(\"mrow\", [identifier, operator]);\n } else {\n return mathMLTree.newDocumentFragment([identifier, operator]);\n }\n}; // \\operatorname\n// amsopn.dtx: \\mathop{#1\\kern\\z@\\operator@font#3}\\newmcodes@\n\n\ndefineFunction({\n type: \"operatorname\",\n names: [\"\\\\operatorname@\", \"\\\\operatornamewithlimits\"],\n props: {\n numArgs: 1\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var body = args[0];\n return {\n type: \"operatorname\",\n mode: parser.mode,\n body: ordargument(body),\n alwaysHandleSupSub: funcName === \"\\\\operatornamewithlimits\",\n limits: false,\n parentIsSupSub: false\n };\n },\n htmlBuilder: htmlBuilder$1,\n mathmlBuilder\n});\ndefineMacro(\"\\\\operatorname\", \"\\\\@ifstar\\\\operatornamewithlimits\\\\operatorname@\");\n\ndefineFunctionBuilders({\n type: \"ordgroup\",\n\n htmlBuilder(group, options) {\n if (group.semisimple) {\n return buildCommon.makeFragment(buildExpression$1(group.body, options, false));\n }\n\n return buildCommon.makeSpan([\"mord\"], buildExpression$1(group.body, options, true), options);\n },\n\n mathmlBuilder(group, options) {\n return buildExpressionRow(group.body, options, true);\n }\n\n});\n\ndefineFunction({\n type: \"overline\",\n names: [\"\\\\overline\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n var body = args[0];\n return {\n type: \"overline\",\n mode: parser.mode,\n body\n };\n },\n\n htmlBuilder(group, options) {\n // Overlines are handled in the TeXbook pg 443, Rule 9.\n // Build the inner group in the cramped style.\n var innerGroup = buildGroup$1(group.body, options.havingCrampedStyle()); // Create the line above the body\n\n var line = buildCommon.makeLineSpan(\"overline-line\", options); // Generate the vlist, with the appropriate kerns\n\n var defaultRuleThickness = options.fontMetrics().defaultRuleThickness;\n var vlist = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: innerGroup\n }, {\n type: \"kern\",\n size: 3 * defaultRuleThickness\n }, {\n type: \"elem\",\n elem: line\n }, {\n type: \"kern\",\n size: defaultRuleThickness\n }]\n }, options);\n return buildCommon.makeSpan([\"mord\", \"overline\"], [vlist], options);\n },\n\n mathmlBuilder(group, options) {\n var operator = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(\"\\u203e\")]);\n operator.setAttribute(\"stretchy\", \"true\");\n var node = new mathMLTree.MathNode(\"mover\", [buildGroup(group.body, options), operator]);\n node.setAttribute(\"accent\", \"true\");\n return node;\n }\n\n});\n\ndefineFunction({\n type: \"phantom\",\n names: [\"\\\\phantom\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser\n } = _ref;\n var body = args[0];\n return {\n type: \"phantom\",\n mode: parser.mode,\n body: ordargument(body)\n };\n },\n htmlBuilder: (group, options) => {\n var elements = buildExpression$1(group.body, options.withPhantom(), false); // \\phantom isn't supposed to affect the elements it contains.\n // See \"color\" for more details.\n\n return buildCommon.makeFragment(elements);\n },\n mathmlBuilder: (group, options) => {\n var inner = buildExpression(group.body, options);\n return new mathMLTree.MathNode(\"mphantom\", inner);\n }\n});\ndefineFunction({\n type: \"hphantom\",\n names: [\"\\\\hphantom\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n handler: (_ref2, args) => {\n var {\n parser\n } = _ref2;\n var body = args[0];\n return {\n type: \"hphantom\",\n mode: parser.mode,\n body\n };\n },\n htmlBuilder: (group, options) => {\n var node = buildCommon.makeSpan([], [buildGroup$1(group.body, options.withPhantom())]);\n node.height = 0;\n node.depth = 0;\n\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n node.children[i].height = 0;\n node.children[i].depth = 0;\n }\n } // See smash for comment re: use of makeVList\n\n\n node = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: node\n }]\n }, options); // For spacing, TeX treats \\smash as a math group (same spacing as ord).\n\n return buildCommon.makeSpan([\"mord\"], [node], options);\n },\n mathmlBuilder: (group, options) => {\n var inner = buildExpression(ordargument(group.body), options);\n var phantom = new mathMLTree.MathNode(\"mphantom\", inner);\n var node = new mathMLTree.MathNode(\"mpadded\", [phantom]);\n node.setAttribute(\"height\", \"0px\");\n node.setAttribute(\"depth\", \"0px\");\n return node;\n }\n});\ndefineFunction({\n type: \"vphantom\",\n names: [\"\\\\vphantom\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n handler: (_ref3, args) => {\n var {\n parser\n } = _ref3;\n var body = args[0];\n return {\n type: \"vphantom\",\n mode: parser.mode,\n body\n };\n },\n htmlBuilder: (group, options) => {\n var inner = buildCommon.makeSpan([\"inner\"], [buildGroup$1(group.body, options.withPhantom())]);\n var fix = buildCommon.makeSpan([\"fix\"], []);\n return buildCommon.makeSpan([\"mord\", \"rlap\"], [inner, fix], options);\n },\n mathmlBuilder: (group, options) => {\n var inner = buildExpression(ordargument(group.body), options);\n var phantom = new mathMLTree.MathNode(\"mphantom\", inner);\n var node = new mathMLTree.MathNode(\"mpadded\", [phantom]);\n node.setAttribute(\"width\", \"0px\");\n return node;\n }\n});\n\ndefineFunction({\n type: \"raisebox\",\n names: [\"\\\\raisebox\"],\n props: {\n numArgs: 2,\n argTypes: [\"size\", \"hbox\"],\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n var amount = assertNodeType(args[0], \"size\").value;\n var body = args[1];\n return {\n type: \"raisebox\",\n mode: parser.mode,\n dy: amount,\n body\n };\n },\n\n htmlBuilder(group, options) {\n var body = buildGroup$1(group.body, options);\n var dy = calculateSize(group.dy, options);\n return buildCommon.makeVList({\n positionType: \"shift\",\n positionData: -dy,\n children: [{\n type: \"elem\",\n elem: body\n }]\n }, options);\n },\n\n mathmlBuilder(group, options) {\n var node = new mathMLTree.MathNode(\"mpadded\", [buildGroup(group.body, options)]);\n var dy = group.dy.number + group.dy.unit;\n node.setAttribute(\"voffset\", dy);\n return node;\n }\n\n});\n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\relax\"],\n props: {\n numArgs: 0,\n allowedInText: true\n },\n\n handler(_ref) {\n var {\n parser\n } = _ref;\n return {\n type: \"internal\",\n mode: parser.mode\n };\n }\n\n});\n\ndefineFunction({\n type: \"rule\",\n names: [\"\\\\rule\"],\n props: {\n numArgs: 2,\n numOptionalArgs: 1,\n argTypes: [\"size\", \"size\", \"size\"]\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser\n } = _ref;\n var shift = optArgs[0];\n var width = assertNodeType(args[0], \"size\");\n var height = assertNodeType(args[1], \"size\");\n return {\n type: \"rule\",\n mode: parser.mode,\n shift: shift && assertNodeType(shift, \"size\").value,\n width: width.value,\n height: height.value\n };\n },\n\n htmlBuilder(group, options) {\n // Make an empty span for the rule\n var rule = buildCommon.makeSpan([\"mord\", \"rule\"], [], options); // Calculate the shift, width, and height of the rule, and account for units\n\n var width = calculateSize(group.width, options);\n var height = calculateSize(group.height, options);\n var shift = group.shift ? calculateSize(group.shift, options) : 0; // Style the rule to the right size\n\n rule.style.borderRightWidth = makeEm(width);\n rule.style.borderTopWidth = makeEm(height);\n rule.style.bottom = makeEm(shift); // Record the height and width\n\n rule.width = width;\n rule.height = height + shift;\n rule.depth = -shift; // Font size is the number large enough that the browser will\n // reserve at least `absHeight` space above the baseline.\n // The 1.125 factor was empirically determined\n\n rule.maxFontSize = height * 1.125 * options.sizeMultiplier;\n return rule;\n },\n\n mathmlBuilder(group, options) {\n var width = calculateSize(group.width, options);\n var height = calculateSize(group.height, options);\n var shift = group.shift ? calculateSize(group.shift, options) : 0;\n var color = options.color && options.getColor() || \"black\";\n var rule = new mathMLTree.MathNode(\"mspace\");\n rule.setAttribute(\"mathbackground\", color);\n rule.setAttribute(\"width\", makeEm(width));\n rule.setAttribute(\"height\", makeEm(height));\n var wrapper = new mathMLTree.MathNode(\"mpadded\", [rule]);\n\n if (shift >= 0) {\n wrapper.setAttribute(\"height\", makeEm(shift));\n } else {\n wrapper.setAttribute(\"height\", makeEm(shift));\n wrapper.setAttribute(\"depth\", makeEm(-shift));\n }\n\n wrapper.setAttribute(\"voffset\", makeEm(shift));\n return wrapper;\n }\n\n});\n\nfunction sizingGroup(value, options, baseOptions) {\n var inner = buildExpression$1(value, options, false);\n var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier; // Add size-resetting classes to the inner list and set maxFontSize\n // manually. Handle nested size changes.\n\n for (var i = 0; i < inner.length; i++) {\n var pos = inner[i].classes.indexOf(\"sizing\");\n\n if (pos < 0) {\n Array.prototype.push.apply(inner[i].classes, options.sizingClasses(baseOptions));\n } else if (inner[i].classes[pos + 1] === \"reset-size\" + options.size) {\n // This is a nested size change: e.g., inner[i] is the \"b\" in\n // `\\Huge a \\small b`. Override the old size (the `reset-` class)\n // but not the new size.\n inner[i].classes[pos + 1] = \"reset-size\" + baseOptions.size;\n }\n\n inner[i].height *= multiplier;\n inner[i].depth *= multiplier;\n }\n\n return buildCommon.makeFragment(inner);\n}\nvar sizeFuncs = [\"\\\\tiny\", \"\\\\sixptsize\", \"\\\\scriptsize\", \"\\\\footnotesize\", \"\\\\small\", \"\\\\normalsize\", \"\\\\large\", \"\\\\Large\", \"\\\\LARGE\", \"\\\\huge\", \"\\\\Huge\"];\nvar htmlBuilder = (group, options) => {\n // Handle sizing operators like \\Huge. Real TeX doesn't actually allow\n // these functions inside of math expressions, so we do some special\n // handling.\n var newOptions = options.havingSize(group.size);\n return sizingGroup(group.body, newOptions, options);\n};\ndefineFunction({\n type: \"sizing\",\n names: sizeFuncs,\n props: {\n numArgs: 0,\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n breakOnTokenText,\n funcName,\n parser\n } = _ref;\n var body = parser.parseExpression(false, breakOnTokenText);\n return {\n type: \"sizing\",\n mode: parser.mode,\n // Figure out what size to use based on the list of functions above\n size: sizeFuncs.indexOf(funcName) + 1,\n body\n };\n },\n htmlBuilder,\n mathmlBuilder: (group, options) => {\n var newOptions = options.havingSize(group.size);\n var inner = buildExpression(group.body, newOptions);\n var node = new mathMLTree.MathNode(\"mstyle\", inner); // TODO(emily): This doesn't produce the correct size for nested size\n // changes, because we don't keep state of what style we're currently\n // in, so we can't reset the size to normal before changing it. Now\n // that we're passing an options parameter we should be able to fix\n // this.\n\n node.setAttribute(\"mathsize\", makeEm(newOptions.sizeMultiplier));\n return node;\n }\n});\n\n// smash, with optional [tb], as in AMS\ndefineFunction({\n type: \"smash\",\n names: [\"\\\\smash\"],\n props: {\n numArgs: 1,\n numOptionalArgs: 1,\n allowedInText: true\n },\n handler: (_ref, args, optArgs) => {\n var {\n parser\n } = _ref;\n var smashHeight = false;\n var smashDepth = false;\n var tbArg = optArgs[0] && assertNodeType(optArgs[0], \"ordgroup\");\n\n if (tbArg) {\n // Optional [tb] argument is engaged.\n // ref: amsmath: \\renewcommand{\\smash}[1][tb]{%\n // def\\mb@t{\\ht}\\def\\mb@b{\\dp}\\def\\mb@tb{\\ht\\z@\\z@\\dp}%\n var letter = \"\";\n\n for (var i = 0; i < tbArg.body.length; ++i) {\n var node = tbArg.body[i]; // $FlowFixMe: Not every node type has a `text` property.\n\n letter = node.text;\n\n if (letter === \"t\") {\n smashHeight = true;\n } else if (letter === \"b\") {\n smashDepth = true;\n } else {\n smashHeight = false;\n smashDepth = false;\n break;\n }\n }\n } else {\n smashHeight = true;\n smashDepth = true;\n }\n\n var body = args[0];\n return {\n type: \"smash\",\n mode: parser.mode,\n body,\n smashHeight,\n smashDepth\n };\n },\n htmlBuilder: (group, options) => {\n var node = buildCommon.makeSpan([], [buildGroup$1(group.body, options)]);\n\n if (!group.smashHeight && !group.smashDepth) {\n return node;\n }\n\n if (group.smashHeight) {\n node.height = 0; // In order to influence makeVList, we have to reset the children.\n\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n node.children[i].height = 0;\n }\n }\n }\n\n if (group.smashDepth) {\n node.depth = 0;\n\n if (node.children) {\n for (var _i = 0; _i < node.children.length; _i++) {\n node.children[_i].depth = 0;\n }\n }\n } // At this point, we've reset the TeX-like height and depth values.\n // But the span still has an HTML line height.\n // makeVList applies \"display: table-cell\", which prevents the browser\n // from acting on that line height. So we'll call makeVList now.\n\n\n var smashedNode = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: node\n }]\n }, options); // For spacing, TeX treats \\hphantom as a math group (same spacing as ord).\n\n return buildCommon.makeSpan([\"mord\"], [smashedNode], options);\n },\n mathmlBuilder: (group, options) => {\n var node = new mathMLTree.MathNode(\"mpadded\", [buildGroup(group.body, options)]);\n\n if (group.smashHeight) {\n node.setAttribute(\"height\", \"0px\");\n }\n\n if (group.smashDepth) {\n node.setAttribute(\"depth\", \"0px\");\n }\n\n return node;\n }\n});\n\ndefineFunction({\n type: \"sqrt\",\n names: [\"\\\\sqrt\"],\n props: {\n numArgs: 1,\n numOptionalArgs: 1\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser\n } = _ref;\n var index = optArgs[0];\n var body = args[0];\n return {\n type: \"sqrt\",\n mode: parser.mode,\n body,\n index\n };\n },\n\n htmlBuilder(group, options) {\n // Square roots are handled in the TeXbook pg. 443, Rule 11.\n // First, we do the same steps as in overline to build the inner group\n // and line\n var inner = buildGroup$1(group.body, options.havingCrampedStyle());\n\n if (inner.height === 0) {\n // Render a small surd.\n inner.height = options.fontMetrics().xHeight;\n } // Some groups can return document fragments. Handle those by wrapping\n // them in a span.\n\n\n inner = buildCommon.wrapFragment(inner, options); // Calculate the minimum size for the \\surd delimiter\n\n var metrics = options.fontMetrics();\n var theta = metrics.defaultRuleThickness;\n var phi = theta;\n\n if (options.style.id < Style$1.TEXT.id) {\n phi = options.fontMetrics().xHeight;\n } // Calculate the clearance between the body and line\n\n\n var lineClearance = theta + phi / 4;\n var minDelimiterHeight = inner.height + inner.depth + lineClearance + theta; // Create a sqrt SVG of the required minimum size\n\n var {\n span: img,\n ruleWidth,\n advanceWidth\n } = delimiter.sqrtImage(minDelimiterHeight, options);\n var delimDepth = img.height - ruleWidth; // Adjust the clearance based on the delimiter size\n\n if (delimDepth > inner.height + inner.depth + lineClearance) {\n lineClearance = (lineClearance + delimDepth - inner.height - inner.depth) / 2;\n } // Shift the sqrt image\n\n\n var imgShift = img.height - inner.height - lineClearance - ruleWidth;\n inner.style.paddingLeft = makeEm(advanceWidth); // Overlay the image and the argument.\n\n var body = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: inner,\n wrapperClasses: [\"svg-align\"]\n }, {\n type: \"kern\",\n size: -(inner.height + imgShift)\n }, {\n type: \"elem\",\n elem: img\n }, {\n type: \"kern\",\n size: ruleWidth\n }]\n }, options);\n\n if (!group.index) {\n return buildCommon.makeSpan([\"mord\", \"sqrt\"], [body], options);\n } else {\n // Handle the optional root index\n // The index is always in scriptscript style\n var newOptions = options.havingStyle(Style$1.SCRIPTSCRIPT);\n var rootm = buildGroup$1(group.index, newOptions, options); // The amount the index is shifted by. This is taken from the TeX\n // source, in the definition of `\\r@@t`.\n\n var toShift = 0.6 * (body.height - body.depth); // Build a VList with the superscript shifted up correctly\n\n var rootVList = buildCommon.makeVList({\n positionType: \"shift\",\n positionData: -toShift,\n children: [{\n type: \"elem\",\n elem: rootm\n }]\n }, options); // Add a class surrounding it so we can add on the appropriate\n // kerning\n\n var rootVListWrap = buildCommon.makeSpan([\"root\"], [rootVList]);\n return buildCommon.makeSpan([\"mord\", \"sqrt\"], [rootVListWrap, body], options);\n }\n },\n\n mathmlBuilder(group, options) {\n var {\n body,\n index\n } = group;\n return index ? new mathMLTree.MathNode(\"mroot\", [buildGroup(body, options), buildGroup(index, options)]) : new mathMLTree.MathNode(\"msqrt\", [buildGroup(body, options)]);\n }\n\n});\n\nvar styleMap = {\n \"display\": Style$1.DISPLAY,\n \"text\": Style$1.TEXT,\n \"script\": Style$1.SCRIPT,\n \"scriptscript\": Style$1.SCRIPTSCRIPT\n};\ndefineFunction({\n type: \"styling\",\n names: [\"\\\\displaystyle\", \"\\\\textstyle\", \"\\\\scriptstyle\", \"\\\\scriptscriptstyle\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref, args) {\n var {\n breakOnTokenText,\n funcName,\n parser\n } = _ref;\n // parse out the implicit body\n var body = parser.parseExpression(true, breakOnTokenText); // TODO: Refactor to avoid duplicating styleMap in multiple places (e.g.\n // here and in buildHTML and de-dupe the enumeration of all the styles).\n // $FlowFixMe: The names above exactly match the styles.\n\n var style = funcName.slice(1, funcName.length - 5);\n return {\n type: \"styling\",\n mode: parser.mode,\n // Figure out what style to use by pulling out the style from\n // the function name\n style,\n body\n };\n },\n\n htmlBuilder(group, options) {\n // Style changes are handled in the TeXbook on pg. 442, Rule 3.\n var newStyle = styleMap[group.style];\n var newOptions = options.havingStyle(newStyle).withFont('');\n return sizingGroup(group.body, newOptions, options);\n },\n\n mathmlBuilder(group, options) {\n // Figure out what style we're changing to.\n var newStyle = styleMap[group.style];\n var newOptions = options.havingStyle(newStyle);\n var inner = buildExpression(group.body, newOptions);\n var node = new mathMLTree.MathNode(\"mstyle\", inner);\n var styleAttributes = {\n \"display\": [\"0\", \"true\"],\n \"text\": [\"0\", \"false\"],\n \"script\": [\"1\", \"false\"],\n \"scriptscript\": [\"2\", \"false\"]\n };\n var attr = styleAttributes[group.style];\n node.setAttribute(\"scriptlevel\", attr[0]);\n node.setAttribute(\"displaystyle\", attr[1]);\n return node;\n }\n\n});\n\n/**\n * Sometimes, groups perform special rules when they have superscripts or\n * subscripts attached to them. This function lets the `supsub` group know that\n * Sometimes, groups perform special rules when they have superscripts or\n * its inner element should handle the superscripts and subscripts instead of\n * handling them itself.\n */\nvar htmlBuilderDelegate = function htmlBuilderDelegate(group, options) {\n var base = group.base;\n\n if (!base) {\n return null;\n } else if (base.type === \"op\") {\n // Operators handle supsubs differently when they have limits\n // (e.g. `\\displaystyle\\sum_2^3`)\n var delegate = base.limits && (options.style.size === Style$1.DISPLAY.size || base.alwaysHandleSupSub);\n return delegate ? htmlBuilder$2 : null;\n } else if (base.type === \"operatorname\") {\n var _delegate = base.alwaysHandleSupSub && (options.style.size === Style$1.DISPLAY.size || base.limits);\n\n return _delegate ? htmlBuilder$1 : null;\n } else if (base.type === \"accent\") {\n return utils.isCharacterBox(base.base) ? htmlBuilder$a : null;\n } else if (base.type === \"horizBrace\") {\n var isSup = !group.sub;\n return isSup === base.isOver ? htmlBuilder$3 : null;\n } else {\n return null;\n }\n}; // Super scripts and subscripts, whose precise placement can depend on other\n// functions that precede them.\n\n\ndefineFunctionBuilders({\n type: \"supsub\",\n\n htmlBuilder(group, options) {\n // Superscript and subscripts are handled in the TeXbook on page\n // 445-446, rules 18(a-f).\n // Here is where we defer to the inner group if it should handle\n // superscripts and subscripts itself.\n var builderDelegate = htmlBuilderDelegate(group, options);\n\n if (builderDelegate) {\n return builderDelegate(group, options);\n }\n\n var {\n base: valueBase,\n sup: valueSup,\n sub: valueSub\n } = group;\n var base = buildGroup$1(valueBase, options);\n var supm;\n var subm;\n var metrics = options.fontMetrics(); // Rule 18a\n\n var supShift = 0;\n var subShift = 0;\n var isCharacterBox = valueBase && utils.isCharacterBox(valueBase);\n\n if (valueSup) {\n var newOptions = options.havingStyle(options.style.sup());\n supm = buildGroup$1(valueSup, newOptions, options);\n\n if (!isCharacterBox) {\n supShift = base.height - newOptions.fontMetrics().supDrop * newOptions.sizeMultiplier / options.sizeMultiplier;\n }\n }\n\n if (valueSub) {\n var _newOptions = options.havingStyle(options.style.sub());\n\n subm = buildGroup$1(valueSub, _newOptions, options);\n\n if (!isCharacterBox) {\n subShift = base.depth + _newOptions.fontMetrics().subDrop * _newOptions.sizeMultiplier / options.sizeMultiplier;\n }\n } // Rule 18c\n\n\n var minSupShift;\n\n if (options.style === Style$1.DISPLAY) {\n minSupShift = metrics.sup1;\n } else if (options.style.cramped) {\n minSupShift = metrics.sup3;\n } else {\n minSupShift = metrics.sup2;\n } // scriptspace is a font-size-independent size, so scale it\n // appropriately for use as the marginRight.\n\n\n var multiplier = options.sizeMultiplier;\n var marginRight = makeEm(0.5 / metrics.ptPerEm / multiplier);\n var marginLeft = null;\n\n if (subm) {\n // Subscripts shouldn't be shifted by the base's italic correction.\n // Account for that by shifting the subscript back the appropriate\n // amount. Note we only do this when the base is a single symbol.\n var isOiint = group.base && group.base.type === \"op\" && group.base.name && (group.base.name === \"\\\\oiint\" || group.base.name === \"\\\\oiiint\");\n\n if (base instanceof SymbolNode || isOiint) {\n // $FlowFixMe\n marginLeft = makeEm(-base.italic);\n }\n }\n\n var supsub;\n\n if (supm && subm) {\n supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);\n subShift = Math.max(subShift, metrics.sub2);\n var ruleWidth = metrics.defaultRuleThickness; // Rule 18e\n\n var maxWidth = 4 * ruleWidth;\n\n if (supShift - supm.depth - (subm.height - subShift) < maxWidth) {\n subShift = maxWidth - (supShift - supm.depth) + subm.height;\n var psi = 0.8 * metrics.xHeight - (supShift - supm.depth);\n\n if (psi > 0) {\n supShift += psi;\n subShift -= psi;\n }\n }\n\n var vlistElem = [{\n type: \"elem\",\n elem: subm,\n shift: subShift,\n marginRight,\n marginLeft\n }, {\n type: \"elem\",\n elem: supm,\n shift: -supShift,\n marginRight\n }];\n supsub = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: vlistElem\n }, options);\n } else if (subm) {\n // Rule 18b\n subShift = Math.max(subShift, metrics.sub1, subm.height - 0.8 * metrics.xHeight);\n var _vlistElem = [{\n type: \"elem\",\n elem: subm,\n marginLeft,\n marginRight\n }];\n supsub = buildCommon.makeVList({\n positionType: \"shift\",\n positionData: subShift,\n children: _vlistElem\n }, options);\n } else if (supm) {\n // Rule 18c, d\n supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);\n supsub = buildCommon.makeVList({\n positionType: \"shift\",\n positionData: -supShift,\n children: [{\n type: \"elem\",\n elem: supm,\n marginRight\n }]\n }, options);\n } else {\n throw new Error(\"supsub must have either sup or sub.\");\n } // Wrap the supsub vlist in a span.msupsub to reset text-align.\n\n\n var mclass = getTypeOfDomTree(base, \"right\") || \"mord\";\n return buildCommon.makeSpan([mclass], [base, buildCommon.makeSpan([\"msupsub\"], [supsub])], options);\n },\n\n mathmlBuilder(group, options) {\n // Is the inner group a relevant horizonal brace?\n var isBrace = false;\n var isOver;\n var isSup;\n\n if (group.base && group.base.type === \"horizBrace\") {\n isSup = !!group.sup;\n\n if (isSup === group.base.isOver) {\n isBrace = true;\n isOver = group.base.isOver;\n }\n }\n\n if (group.base && (group.base.type === \"op\" || group.base.type === \"operatorname\")) {\n group.base.parentIsSupSub = true;\n }\n\n var children = [buildGroup(group.base, options)];\n\n if (group.sub) {\n children.push(buildGroup(group.sub, options));\n }\n\n if (group.sup) {\n children.push(buildGroup(group.sup, options));\n }\n\n var nodeType;\n\n if (isBrace) {\n nodeType = isOver ? \"mover\" : \"munder\";\n } else if (!group.sub) {\n var base = group.base;\n\n if (base && base.type === \"op\" && base.limits && (options.style === Style$1.DISPLAY || base.alwaysHandleSupSub)) {\n nodeType = \"mover\";\n } else if (base && base.type === \"operatorname\" && base.alwaysHandleSupSub && (base.limits || options.style === Style$1.DISPLAY)) {\n nodeType = \"mover\";\n } else {\n nodeType = \"msup\";\n }\n } else if (!group.sup) {\n var _base = group.base;\n\n if (_base && _base.type === \"op\" && _base.limits && (options.style === Style$1.DISPLAY || _base.alwaysHandleSupSub)) {\n nodeType = \"munder\";\n } else if (_base && _base.type === \"operatorname\" && _base.alwaysHandleSupSub && (_base.limits || options.style === Style$1.DISPLAY)) {\n nodeType = \"munder\";\n } else {\n nodeType = \"msub\";\n }\n } else {\n var _base2 = group.base;\n\n if (_base2 && _base2.type === \"op\" && _base2.limits && options.style === Style$1.DISPLAY) {\n nodeType = \"munderover\";\n } else if (_base2 && _base2.type === \"operatorname\" && _base2.alwaysHandleSupSub && (options.style === Style$1.DISPLAY || _base2.limits)) {\n nodeType = \"munderover\";\n } else {\n nodeType = \"msubsup\";\n }\n }\n\n return new mathMLTree.MathNode(nodeType, children);\n }\n\n});\n\ndefineFunctionBuilders({\n type: \"atom\",\n\n htmlBuilder(group, options) {\n return buildCommon.mathsym(group.text, group.mode, options, [\"m\" + group.family]);\n },\n\n mathmlBuilder(group, options) {\n var node = new mathMLTree.MathNode(\"mo\", [makeText(group.text, group.mode)]);\n\n if (group.family === \"bin\") {\n var variant = getVariant(group, options);\n\n if (variant === \"bold-italic\") {\n node.setAttribute(\"mathvariant\", variant);\n }\n } else if (group.family === \"punct\") {\n node.setAttribute(\"separator\", \"true\");\n } else if (group.family === \"open\" || group.family === \"close\") {\n // Delims built here should not stretch vertically.\n // See delimsizing.js for stretchy delims.\n node.setAttribute(\"stretchy\", \"false\");\n }\n\n return node;\n }\n\n});\n\n// \"mathord\" and \"textord\" ParseNodes created in Parser.js from symbol Groups in\n// src/symbols.js.\nvar defaultVariant = {\n \"mi\": \"italic\",\n \"mn\": \"normal\",\n \"mtext\": \"normal\"\n};\ndefineFunctionBuilders({\n type: \"mathord\",\n\n htmlBuilder(group, options) {\n return buildCommon.makeOrd(group, options, \"mathord\");\n },\n\n mathmlBuilder(group, options) {\n var node = new mathMLTree.MathNode(\"mi\", [makeText(group.text, group.mode, options)]);\n var variant = getVariant(group, options) || \"italic\";\n\n if (variant !== defaultVariant[node.type]) {\n node.setAttribute(\"mathvariant\", variant);\n }\n\n return node;\n }\n\n});\ndefineFunctionBuilders({\n type: \"textord\",\n\n htmlBuilder(group, options) {\n return buildCommon.makeOrd(group, options, \"textord\");\n },\n\n mathmlBuilder(group, options) {\n var text = makeText(group.text, group.mode, options);\n var variant = getVariant(group, options) || \"normal\";\n var node;\n\n if (group.mode === 'text') {\n node = new mathMLTree.MathNode(\"mtext\", [text]);\n } else if (/[0-9]/.test(group.text)) {\n node = new mathMLTree.MathNode(\"mn\", [text]);\n } else if (group.text === \"\\\\prime\") {\n node = new mathMLTree.MathNode(\"mo\", [text]);\n } else {\n node = new mathMLTree.MathNode(\"mi\", [text]);\n }\n\n if (variant !== defaultVariant[node.type]) {\n node.setAttribute(\"mathvariant\", variant);\n }\n\n return node;\n }\n\n});\n\nvar cssSpace = {\n \"\\\\nobreak\": \"nobreak\",\n \"\\\\allowbreak\": \"allowbreak\"\n}; // A lookup table to determine whether a spacing function/symbol should be\n// treated like a regular space character. If a symbol or command is a key\n// in this table, then it should be a regular space character. Furthermore,\n// the associated value may have a `className` specifying an extra CSS class\n// to add to the created `span`.\n\nvar regularSpace = {\n \" \": {},\n \"\\\\ \": {},\n \"~\": {\n className: \"nobreak\"\n },\n \"\\\\space\": {},\n \"\\\\nobreakspace\": {\n className: \"nobreak\"\n }\n}; // ParseNode<\"spacing\"> created in Parser.js from the \"spacing\" symbol Groups in\n// src/symbols.js.\n\ndefineFunctionBuilders({\n type: \"spacing\",\n\n htmlBuilder(group, options) {\n if (regularSpace.hasOwnProperty(group.text)) {\n var className = regularSpace[group.text].className || \"\"; // Spaces are generated by adding an actual space. Each of these\n // things has an entry in the symbols table, so these will be turned\n // into appropriate outputs.\n\n if (group.mode === \"text\") {\n var ord = buildCommon.makeOrd(group, options, \"textord\");\n ord.classes.push(className);\n return ord;\n } else {\n return buildCommon.makeSpan([\"mspace\", className], [buildCommon.mathsym(group.text, group.mode, options)], options);\n }\n } else if (cssSpace.hasOwnProperty(group.text)) {\n // Spaces based on just a CSS class.\n return buildCommon.makeSpan([\"mspace\", cssSpace[group.text]], [], options);\n } else {\n throw new ParseError(\"Unknown type of space \\\"\" + group.text + \"\\\"\");\n }\n },\n\n mathmlBuilder(group, options) {\n var node;\n\n if (regularSpace.hasOwnProperty(group.text)) {\n node = new mathMLTree.MathNode(\"mtext\", [new mathMLTree.TextNode(\"\\u00a0\")]);\n } else if (cssSpace.hasOwnProperty(group.text)) {\n // CSS-based MathML spaces (\\nobreak, \\allowbreak) are ignored\n return new mathMLTree.MathNode(\"mspace\");\n } else {\n throw new ParseError(\"Unknown type of space \\\"\" + group.text + \"\\\"\");\n }\n\n return node;\n }\n\n});\n\nvar pad = () => {\n var padNode = new mathMLTree.MathNode(\"mtd\", []);\n padNode.setAttribute(\"width\", \"50%\");\n return padNode;\n};\n\ndefineFunctionBuilders({\n type: \"tag\",\n\n mathmlBuilder(group, options) {\n var table = new mathMLTree.MathNode(\"mtable\", [new mathMLTree.MathNode(\"mtr\", [pad(), new mathMLTree.MathNode(\"mtd\", [buildExpressionRow(group.body, options)]), pad(), new mathMLTree.MathNode(\"mtd\", [buildExpressionRow(group.tag, options)])])]);\n table.setAttribute(\"width\", \"100%\");\n return table; // TODO: Left-aligned tags.\n // Currently, the group and options passed here do not contain\n // enough info to set tag alignment. `leqno` is in Settings but it is\n // not passed to Options. On the HTML side, leqno is\n // set by a CSS class applied in buildTree.js. That would have worked\n // in MathML if browsers supported . Since they don't, we\n // need to rewrite the way this function is called.\n }\n\n});\n\nvar textFontFamilies = {\n \"\\\\text\": undefined,\n \"\\\\textrm\": \"textrm\",\n \"\\\\textsf\": \"textsf\",\n \"\\\\texttt\": \"texttt\",\n \"\\\\textnormal\": \"textrm\"\n};\nvar textFontWeights = {\n \"\\\\textbf\": \"textbf\",\n \"\\\\textmd\": \"textmd\"\n};\nvar textFontShapes = {\n \"\\\\textit\": \"textit\",\n \"\\\\textup\": \"textup\"\n};\n\nvar optionsWithFont = (group, options) => {\n var font = group.font; // Checks if the argument is a font family or a font style.\n\n if (!font) {\n return options;\n } else if (textFontFamilies[font]) {\n return options.withTextFontFamily(textFontFamilies[font]);\n } else if (textFontWeights[font]) {\n return options.withTextFontWeight(textFontWeights[font]);\n } else if (font === \"\\\\emph\") {\n return options.fontShape === \"textit\" ? options.withTextFontShape(\"textup\") : options.withTextFontShape(\"textit\");\n }\n\n return options.withTextFontShape(textFontShapes[font]);\n};\n\ndefineFunction({\n type: \"text\",\n names: [// Font families\n \"\\\\text\", \"\\\\textrm\", \"\\\\textsf\", \"\\\\texttt\", \"\\\\textnormal\", // Font weights\n \"\\\\textbf\", \"\\\\textmd\", // Font Shapes\n \"\\\\textit\", \"\\\\textup\", \"\\\\emph\"],\n props: {\n numArgs: 1,\n argTypes: [\"text\"],\n allowedInArgument: true,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n var body = args[0];\n return {\n type: \"text\",\n mode: parser.mode,\n body: ordargument(body),\n font: funcName\n };\n },\n\n htmlBuilder(group, options) {\n var newOptions = optionsWithFont(group, options);\n var inner = buildExpression$1(group.body, newOptions, true);\n return buildCommon.makeSpan([\"mord\", \"text\"], inner, newOptions);\n },\n\n mathmlBuilder(group, options) {\n var newOptions = optionsWithFont(group, options);\n return buildExpressionRow(group.body, newOptions);\n }\n\n});\n\ndefineFunction({\n type: \"underline\",\n names: [\"\\\\underline\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n return {\n type: \"underline\",\n mode: parser.mode,\n body: args[0]\n };\n },\n\n htmlBuilder(group, options) {\n // Underlines are handled in the TeXbook pg 443, Rule 10.\n // Build the inner group.\n var innerGroup = buildGroup$1(group.body, options); // Create the line to go below the body\n\n var line = buildCommon.makeLineSpan(\"underline-line\", options); // Generate the vlist, with the appropriate kerns\n\n var defaultRuleThickness = options.fontMetrics().defaultRuleThickness;\n var vlist = buildCommon.makeVList({\n positionType: \"top\",\n positionData: innerGroup.height,\n children: [{\n type: \"kern\",\n size: defaultRuleThickness\n }, {\n type: \"elem\",\n elem: line\n }, {\n type: \"kern\",\n size: 3 * defaultRuleThickness\n }, {\n type: \"elem\",\n elem: innerGroup\n }]\n }, options);\n return buildCommon.makeSpan([\"mord\", \"underline\"], [vlist], options);\n },\n\n mathmlBuilder(group, options) {\n var operator = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(\"\\u203e\")]);\n operator.setAttribute(\"stretchy\", \"true\");\n var node = new mathMLTree.MathNode(\"munder\", [buildGroup(group.body, options), operator]);\n node.setAttribute(\"accentunder\", \"true\");\n return node;\n }\n\n});\n\ndefineFunction({\n type: \"vcenter\",\n names: [\"\\\\vcenter\"],\n props: {\n numArgs: 1,\n argTypes: [\"original\"],\n // In LaTeX, \\vcenter can act only on a box.\n allowedInText: false\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n return {\n type: \"vcenter\",\n mode: parser.mode,\n body: args[0]\n };\n },\n\n htmlBuilder(group, options) {\n var body = buildGroup$1(group.body, options);\n var axisHeight = options.fontMetrics().axisHeight;\n var dy = 0.5 * (body.height - axisHeight - (body.depth + axisHeight));\n return buildCommon.makeVList({\n positionType: \"shift\",\n positionData: dy,\n children: [{\n type: \"elem\",\n elem: body\n }]\n }, options);\n },\n\n mathmlBuilder(group, options) {\n // There is no way to do this in MathML.\n // Write a class as a breadcrumb in case some post-processor wants\n // to perform a vcenter adjustment.\n return new mathMLTree.MathNode(\"mpadded\", [buildGroup(group.body, options)], [\"vcenter\"]);\n }\n\n});\n\ndefineFunction({\n type: \"verb\",\n names: [\"\\\\verb\"],\n props: {\n numArgs: 0,\n allowedInText: true\n },\n\n handler(context, args, optArgs) {\n // \\verb and \\verb* are dealt with directly in Parser.js.\n // If we end up here, it's because of a failure to match the two delimiters\n // in the regex in Lexer.js. LaTeX raises the following error when \\verb is\n // terminated by end of line (or file).\n throw new ParseError(\"\\\\verb ended by end of line instead of matching delimiter\");\n },\n\n htmlBuilder(group, options) {\n var text = makeVerb(group);\n var body = []; // \\verb enters text mode and therefore is sized like \\textstyle\n\n var newOptions = options.havingStyle(options.style.text());\n\n for (var i = 0; i < text.length; i++) {\n var c = text[i];\n\n if (c === '~') {\n c = '\\\\textasciitilde';\n }\n\n body.push(buildCommon.makeSymbol(c, \"Typewriter-Regular\", group.mode, newOptions, [\"mord\", \"texttt\"]));\n }\n\n return buildCommon.makeSpan([\"mord\", \"text\"].concat(newOptions.sizingClasses(options)), buildCommon.tryCombineChars(body), newOptions);\n },\n\n mathmlBuilder(group, options) {\n var text = new mathMLTree.TextNode(makeVerb(group));\n var node = new mathMLTree.MathNode(\"mtext\", [text]);\n node.setAttribute(\"mathvariant\", \"monospace\");\n return node;\n }\n\n});\n/**\n * Converts verb group into body string.\n *\n * \\verb* replaces each space with an open box \\u2423\n * \\verb replaces each space with a no-break space \\xA0\n */\n\nvar makeVerb = group => group.body.replace(/ /g, group.star ? '\\u2423' : '\\xA0');\n\n/** Include this to ensure that all functions are defined. */\nvar functions = _functions;\n\n/**\n * The Lexer class handles tokenizing the input in various ways. Since our\n * parser expects us to be able to backtrack, the lexer allows lexing from any\n * given starting point.\n *\n * Its main exposed function is the `lex` function, which takes a position to\n * lex from and a type of token to lex. It defers to the appropriate `_innerLex`\n * function.\n *\n * The various `_innerLex` functions perform the actual lexing of different\n * kinds.\n */\n\n/* The following tokenRegex\n * - matches typical whitespace (but not NBSP etc.) using its first group\n * - does not match any control character \\x00-\\x1f except whitespace\n * - does not match a bare backslash\n * - matches any ASCII character except those just mentioned\n * - does not match the BMP private use area \\uE000-\\uF8FF\n * - does not match bare surrogate code units\n * - matches any BMP character except for those just described\n * - matches any valid Unicode surrogate pair\n * - matches a backslash followed by one or more whitespace characters\n * - matches a backslash followed by one or more letters then whitespace\n * - matches a backslash followed by any BMP character\n * Capturing groups:\n * [1] regular whitespace\n * [2] backslash followed by whitespace\n * [3] anything else, which may include:\n * [4] left character of \\verb*\n * [5] left character of \\verb\n * [6] backslash followed by word, excluding any trailing whitespace\n * Just because the Lexer matches something doesn't mean it's valid input:\n * If there is no matching function or symbol definition, the Parser will\n * still reject the input.\n */\nvar spaceRegexString = \"[ \\r\\n\\t]\";\nvar controlWordRegexString = \"\\\\\\\\[a-zA-Z@]+\";\nvar controlSymbolRegexString = \"\\\\\\\\[^\\uD800-\\uDFFF]\";\nvar controlWordWhitespaceRegexString = \"(\" + controlWordRegexString + \")\" + spaceRegexString + \"*\";\nvar controlSpaceRegexString = \"\\\\\\\\(\\n|[ \\r\\t]+\\n?)[ \\r\\t]*\";\nvar combiningDiacriticalMarkString = \"[\\u0300-\\u036f]\";\nvar combiningDiacriticalMarksEndRegex = new RegExp(combiningDiacriticalMarkString + \"+$\");\nvar tokenRegexString = \"(\" + spaceRegexString + \"+)|\" + ( // whitespace\ncontrolSpaceRegexString + \"|\") + // \\whitespace\n\"([!-\\\\[\\\\]-\\u2027\\u202A-\\uD7FF\\uF900-\\uFFFF]\" + ( // single codepoint\ncombiningDiacriticalMarkString + \"*\") + // ...plus accents\n\"|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]\" + ( // surrogate pair\ncombiningDiacriticalMarkString + \"*\") + // ...plus accents\n\"|\\\\\\\\verb\\\\*([^]).*?\\\\4\" + // \\verb*\n\"|\\\\\\\\verb([^*a-zA-Z]).*?\\\\5\" + ( // \\verb unstarred\n\"|\" + controlWordWhitespaceRegexString) + ( // \\macroName + spaces\n\"|\" + controlSymbolRegexString + \")\"); // \\\\, \\', etc.\n\n/** Main Lexer class */\n\nclass Lexer {\n // Category codes. The lexer only supports comment characters (14) for now.\n // MacroExpander additionally distinguishes active (13).\n constructor(input, settings) {\n this.input = void 0;\n this.settings = void 0;\n this.tokenRegex = void 0;\n this.catcodes = void 0;\n // Separate accents from characters\n this.input = input;\n this.settings = settings;\n this.tokenRegex = new RegExp(tokenRegexString, 'g');\n this.catcodes = {\n \"%\": 14,\n // comment character\n \"~\": 13 // active character\n\n };\n }\n\n setCatcode(char, code) {\n this.catcodes[char] = code;\n }\n /**\n * This function lexes a single token.\n */\n\n\n lex() {\n var input = this.input;\n var pos = this.tokenRegex.lastIndex;\n\n if (pos === input.length) {\n return new Token(\"EOF\", new SourceLocation(this, pos, pos));\n }\n\n var match = this.tokenRegex.exec(input);\n\n if (match === null || match.index !== pos) {\n throw new ParseError(\"Unexpected character: '\" + input[pos] + \"'\", new Token(input[pos], new SourceLocation(this, pos, pos + 1)));\n }\n\n var text = match[6] || match[3] || (match[2] ? \"\\\\ \" : \" \");\n\n if (this.catcodes[text] === 14) {\n // comment character\n var nlIndex = input.indexOf('\\n', this.tokenRegex.lastIndex);\n\n if (nlIndex === -1) {\n this.tokenRegex.lastIndex = input.length; // EOF\n\n this.settings.reportNonstrict(\"commentAtEnd\", \"% comment has no terminating newline; LaTeX would \" + \"fail because of commenting the end of math mode (e.g. $)\");\n } else {\n this.tokenRegex.lastIndex = nlIndex + 1;\n }\n\n return this.lex();\n }\n\n return new Token(text, new SourceLocation(this, pos, this.tokenRegex.lastIndex));\n }\n\n}\n\n/**\n * A `Namespace` refers to a space of nameable things like macros or lengths,\n * which can be `set` either globally or local to a nested group, using an\n * undo stack similar to how TeX implements this functionality.\n * Performance-wise, `get` and local `set` take constant time, while global\n * `set` takes time proportional to the depth of group nesting.\n */\nclass Namespace {\n /**\n * Both arguments are optional. The first argument is an object of\n * built-in mappings which never change. The second argument is an object\n * of initial (global-level) mappings, which will constantly change\n * according to any global/top-level `set`s done.\n */\n constructor(builtins, globalMacros) {\n if (builtins === void 0) {\n builtins = {};\n }\n\n if (globalMacros === void 0) {\n globalMacros = {};\n }\n\n this.current = void 0;\n this.builtins = void 0;\n this.undefStack = void 0;\n this.current = globalMacros;\n this.builtins = builtins;\n this.undefStack = [];\n }\n /**\n * Start a new nested group, affecting future local `set`s.\n */\n\n\n beginGroup() {\n this.undefStack.push({});\n }\n /**\n * End current nested group, restoring values before the group began.\n */\n\n\n endGroup() {\n if (this.undefStack.length === 0) {\n throw new ParseError(\"Unbalanced namespace destruction: attempt \" + \"to pop global namespace; please report this as a bug\");\n }\n\n var undefs = this.undefStack.pop();\n\n for (var undef in undefs) {\n if (undefs.hasOwnProperty(undef)) {\n if (undefs[undef] == null) {\n delete this.current[undef];\n } else {\n this.current[undef] = undefs[undef];\n }\n }\n }\n }\n /**\n * Ends all currently nested groups (if any), restoring values before the\n * groups began. Useful in case of an error in the middle of parsing.\n */\n\n\n endGroups() {\n while (this.undefStack.length > 0) {\n this.endGroup();\n }\n }\n /**\n * Detect whether `name` has a definition. Equivalent to\n * `get(name) != null`.\n */\n\n\n has(name) {\n return this.current.hasOwnProperty(name) || this.builtins.hasOwnProperty(name);\n }\n /**\n * Get the current value of a name, or `undefined` if there is no value.\n *\n * Note: Do not use `if (namespace.get(...))` to detect whether a macro\n * is defined, as the definition may be the empty string which evaluates\n * to `false` in JavaScript. Use `if (namespace.get(...) != null)` or\n * `if (namespace.has(...))`.\n */\n\n\n get(name) {\n if (this.current.hasOwnProperty(name)) {\n return this.current[name];\n } else {\n return this.builtins[name];\n }\n }\n /**\n * Set the current value of a name, and optionally set it globally too.\n * Local set() sets the current value and (when appropriate) adds an undo\n * operation to the undo stack. Global set() may change the undo\n * operation at every level, so takes time linear in their number.\n * A value of undefined means to delete existing definitions.\n */\n\n\n set(name, value, global) {\n if (global === void 0) {\n global = false;\n }\n\n if (global) {\n // Global set is equivalent to setting in all groups. Simulate this\n // by destroying any undos currently scheduled for this name,\n // and adding an undo with the *new* value (in case it later gets\n // locally reset within this environment).\n for (var i = 0; i < this.undefStack.length; i++) {\n delete this.undefStack[i][name];\n }\n\n if (this.undefStack.length > 0) {\n this.undefStack[this.undefStack.length - 1][name] = value;\n }\n } else {\n // Undo this set at end of this group (possibly to `undefined`),\n // unless an undo is already in place, in which case that older\n // value is the correct one.\n var top = this.undefStack[this.undefStack.length - 1];\n\n if (top && !top.hasOwnProperty(name)) {\n top[name] = this.current[name];\n }\n }\n\n if (value == null) {\n delete this.current[name];\n } else {\n this.current[name] = value;\n }\n }\n\n}\n\n/**\n * Predefined macros for KaTeX.\n * This can be used to define some commands in terms of others.\n */\nvar macros = _macros;\n// macro tools\n\ndefineMacro(\"\\\\noexpand\", function (context) {\n // The expansion is the token itself; but that token is interpreted\n // as if its meaning were \u2018\\relax\u2019 if it is a control sequence that\n // would ordinarily be expanded by TeX\u2019s expansion rules.\n var t = context.popToken();\n\n if (context.isExpandable(t.text)) {\n t.noexpand = true;\n t.treatAsRelax = true;\n }\n\n return {\n tokens: [t],\n numArgs: 0\n };\n});\ndefineMacro(\"\\\\expandafter\", function (context) {\n // TeX first reads the token that comes immediately after \\expandafter,\n // without expanding it; let\u2019s call this token t. Then TeX reads the\n // token that comes after t (and possibly more tokens, if that token\n // has an argument), replacing it by its expansion. Finally TeX puts\n // t back in front of that expansion.\n var t = context.popToken();\n context.expandOnce(true); // expand only an expandable token\n\n return {\n tokens: [t],\n numArgs: 0\n };\n}); // LaTeX's \\@firstoftwo{#1}{#2} expands to #1, skipping #2\n// TeX source: \\long\\def\\@firstoftwo#1#2{#1}\n\ndefineMacro(\"\\\\@firstoftwo\", function (context) {\n var args = context.consumeArgs(2);\n return {\n tokens: args[0],\n numArgs: 0\n };\n}); // LaTeX's \\@secondoftwo{#1}{#2} expands to #2, skipping #1\n// TeX source: \\long\\def\\@secondoftwo#1#2{#2}\n\ndefineMacro(\"\\\\@secondoftwo\", function (context) {\n var args = context.consumeArgs(2);\n return {\n tokens: args[1],\n numArgs: 0\n };\n}); // LaTeX's \\@ifnextchar{#1}{#2}{#3} looks ahead to the next (unexpanded)\n// symbol that isn't a space, consuming any spaces but not consuming the\n// first nonspace character. If that nonspace character matches #1, then\n// the macro expands to #2; otherwise, it expands to #3.\n\ndefineMacro(\"\\\\@ifnextchar\", function (context) {\n var args = context.consumeArgs(3); // symbol, if, else\n\n context.consumeSpaces();\n var nextToken = context.future();\n\n if (args[0].length === 1 && args[0][0].text === nextToken.text) {\n return {\n tokens: args[1],\n numArgs: 0\n };\n } else {\n return {\n tokens: args[2],\n numArgs: 0\n };\n }\n}); // LaTeX's \\@ifstar{#1}{#2} looks ahead to the next (unexpanded) symbol.\n// If it is `*`, then it consumes the symbol, and the macro expands to #1;\n// otherwise, the macro expands to #2 (without consuming the symbol).\n// TeX source: \\def\\@ifstar#1{\\@ifnextchar *{\\@firstoftwo{#1}}}\n\ndefineMacro(\"\\\\@ifstar\", \"\\\\@ifnextchar *{\\\\@firstoftwo{#1}}\"); // LaTeX's \\TextOrMath{#1}{#2} expands to #1 in text mode, #2 in math mode\n\ndefineMacro(\"\\\\TextOrMath\", function (context) {\n var args = context.consumeArgs(2);\n\n if (context.mode === 'text') {\n return {\n tokens: args[0],\n numArgs: 0\n };\n } else {\n return {\n tokens: args[1],\n numArgs: 0\n };\n }\n}); // Lookup table for parsing numbers in base 8 through 16\n\nvar digitToNumber = {\n \"0\": 0,\n \"1\": 1,\n \"2\": 2,\n \"3\": 3,\n \"4\": 4,\n \"5\": 5,\n \"6\": 6,\n \"7\": 7,\n \"8\": 8,\n \"9\": 9,\n \"a\": 10,\n \"A\": 10,\n \"b\": 11,\n \"B\": 11,\n \"c\": 12,\n \"C\": 12,\n \"d\": 13,\n \"D\": 13,\n \"e\": 14,\n \"E\": 14,\n \"f\": 15,\n \"F\": 15\n}; // TeX \\char makes a literal character (catcode 12) using the following forms:\n// (see The TeXBook, p. 43)\n// \\char123 -- decimal\n// \\char'123 -- octal\n// \\char\"123 -- hex\n// \\char`x -- character that can be written (i.e. isn't active)\n// \\char`\\x -- character that cannot be written (e.g. %)\n// These all refer to characters from the font, so we turn them into special\n// calls to a function \\@char dealt with in the Parser.\n\ndefineMacro(\"\\\\char\", function (context) {\n var token = context.popToken();\n var base;\n var number = '';\n\n if (token.text === \"'\") {\n base = 8;\n token = context.popToken();\n } else if (token.text === '\"') {\n base = 16;\n token = context.popToken();\n } else if (token.text === \"`\") {\n token = context.popToken();\n\n if (token.text[0] === \"\\\\\") {\n number = token.text.charCodeAt(1);\n } else if (token.text === \"EOF\") {\n throw new ParseError(\"\\\\char` missing argument\");\n } else {\n number = token.text.charCodeAt(0);\n }\n } else {\n base = 10;\n }\n\n if (base) {\n // Parse a number in the given base, starting with first `token`.\n number = digitToNumber[token.text];\n\n if (number == null || number >= base) {\n throw new ParseError(\"Invalid base-\" + base + \" digit \" + token.text);\n }\n\n var digit;\n\n while ((digit = digitToNumber[context.future().text]) != null && digit < base) {\n number *= base;\n number += digit;\n context.popToken();\n }\n }\n\n return \"\\\\@char{\" + number + \"}\";\n}); // \\newcommand{\\macro}[args]{definition}\n// \\renewcommand{\\macro}[args]{definition}\n// TODO: Optional arguments: \\newcommand{\\macro}[args][default]{definition}\n\nvar newcommand = (context, existsOK, nonexistsOK) => {\n var arg = context.consumeArg().tokens;\n\n if (arg.length !== 1) {\n throw new ParseError(\"\\\\newcommand's first argument must be a macro name\");\n }\n\n var name = arg[0].text;\n var exists = context.isDefined(name);\n\n if (exists && !existsOK) {\n throw new ParseError(\"\\\\newcommand{\" + name + \"} attempting to redefine \" + (name + \"; use \\\\renewcommand\"));\n }\n\n if (!exists && !nonexistsOK) {\n throw new ParseError(\"\\\\renewcommand{\" + name + \"} when command \" + name + \" \" + \"does not yet exist; use \\\\newcommand\");\n }\n\n var numArgs = 0;\n arg = context.consumeArg().tokens;\n\n if (arg.length === 1 && arg[0].text === \"[\") {\n var argText = '';\n var token = context.expandNextToken();\n\n while (token.text !== \"]\" && token.text !== \"EOF\") {\n // TODO: Should properly expand arg, e.g., ignore {}s\n argText += token.text;\n token = context.expandNextToken();\n }\n\n if (!argText.match(/^\\s*[0-9]+\\s*$/)) {\n throw new ParseError(\"Invalid number of arguments: \" + argText);\n }\n\n numArgs = parseInt(argText);\n arg = context.consumeArg().tokens;\n } // Final arg is the expansion of the macro\n\n\n context.macros.set(name, {\n tokens: arg,\n numArgs\n });\n return '';\n};\n\ndefineMacro(\"\\\\newcommand\", context => newcommand(context, false, true));\ndefineMacro(\"\\\\renewcommand\", context => newcommand(context, true, false));\ndefineMacro(\"\\\\providecommand\", context => newcommand(context, true, true)); // terminal (console) tools\n\ndefineMacro(\"\\\\message\", context => {\n var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console\n\n console.log(arg.reverse().map(token => token.text).join(\"\"));\n return '';\n});\ndefineMacro(\"\\\\errmessage\", context => {\n var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console\n\n console.error(arg.reverse().map(token => token.text).join(\"\"));\n return '';\n});\ndefineMacro(\"\\\\show\", context => {\n var tok = context.popToken();\n var name = tok.text; // eslint-disable-next-line no-console\n\n console.log(tok, context.macros.get(name), functions[name], symbols.math[name], symbols.text[name]);\n return '';\n}); //////////////////////////////////////////////////////////////////////\n// Grouping\n// \\let\\bgroup={ \\let\\egroup=}\n\ndefineMacro(\"\\\\bgroup\", \"{\");\ndefineMacro(\"\\\\egroup\", \"}\"); // Symbols from latex.ltx:\n// \\def~{\\nobreakspace{}}\n// \\def\\lq{`}\n// \\def\\rq{'}\n// \\def \\aa {\\r a}\n// \\def \\AA {\\r A}\n\ndefineMacro(\"~\", \"\\\\nobreakspace\");\ndefineMacro(\"\\\\lq\", \"`\");\ndefineMacro(\"\\\\rq\", \"'\");\ndefineMacro(\"\\\\aa\", \"\\\\r a\");\ndefineMacro(\"\\\\AA\", \"\\\\r A\"); // Copyright (C) and registered (R) symbols. Use raw symbol in MathML.\n// \\DeclareTextCommandDefault{\\textcopyright}{\\textcircled{c}}\n// \\DeclareTextCommandDefault{\\textregistered}{\\textcircled{%\n// \\check@mathfonts\\fontsize\\sf@size\\z@\\math@fontsfalse\\selectfont R}}\n// \\DeclareRobustCommand{\\copyright}{%\n// \\ifmmode{\\nfss@text{\\textcopyright}}\\else\\textcopyright\\fi}\n\ndefineMacro(\"\\\\textcopyright\", \"\\\\html@mathml{\\\\textcircled{c}}{\\\\char`\u00A9}\");\ndefineMacro(\"\\\\copyright\", \"\\\\TextOrMath{\\\\textcopyright}{\\\\text{\\\\textcopyright}}\");\ndefineMacro(\"\\\\textregistered\", \"\\\\html@mathml{\\\\textcircled{\\\\scriptsize R}}{\\\\char`\u00AE}\"); // Characters omitted from Unicode range 1D400\u20131D7FF\n\ndefineMacro(\"\\u212C\", \"\\\\mathscr{B}\"); // script\n\ndefineMacro(\"\\u2130\", \"\\\\mathscr{E}\");\ndefineMacro(\"\\u2131\", \"\\\\mathscr{F}\");\ndefineMacro(\"\\u210B\", \"\\\\mathscr{H}\");\ndefineMacro(\"\\u2110\", \"\\\\mathscr{I}\");\ndefineMacro(\"\\u2112\", \"\\\\mathscr{L}\");\ndefineMacro(\"\\u2133\", \"\\\\mathscr{M}\");\ndefineMacro(\"\\u211B\", \"\\\\mathscr{R}\");\ndefineMacro(\"\\u212D\", \"\\\\mathfrak{C}\"); // Fraktur\n\ndefineMacro(\"\\u210C\", \"\\\\mathfrak{H}\");\ndefineMacro(\"\\u2128\", \"\\\\mathfrak{Z}\"); // Define \\Bbbk with a macro that works in both HTML and MathML.\n\ndefineMacro(\"\\\\Bbbk\", \"\\\\Bbb{k}\"); // Unicode middle dot\n// The KaTeX fonts do not contain U+00B7. Instead, \\cdotp displays\n// the dot at U+22C5 and gives it punct spacing.\n\ndefineMacro(\"\\u00b7\", \"\\\\cdotp\"); // \\llap and \\rlap render their contents in text mode\n\ndefineMacro(\"\\\\llap\", \"\\\\mathllap{\\\\textrm{#1}}\");\ndefineMacro(\"\\\\rlap\", \"\\\\mathrlap{\\\\textrm{#1}}\");\ndefineMacro(\"\\\\clap\", \"\\\\mathclap{\\\\textrm{#1}}\"); // \\mathstrut from the TeXbook, p 360\n\ndefineMacro(\"\\\\mathstrut\", \"\\\\vphantom{(}\"); // \\underbar from TeXbook p 353\n\ndefineMacro(\"\\\\underbar\", \"\\\\underline{\\\\text{#1}}\"); // \\not is defined by base/fontmath.ltx via\n// \\DeclareMathSymbol{\\not}{\\mathrel}{symbols}{\"36}\n// It's thus treated like a \\mathrel, but defined by a symbol that has zero\n// width but extends to the right. We use \\rlap to get that spacing.\n// For MathML we write U+0338 here. buildMathML.js will then do the overlay.\n\ndefineMacro(\"\\\\not\", '\\\\html@mathml{\\\\mathrel{\\\\mathrlap\\\\@not}}{\\\\char\"338}'); // Negated symbols from base/fontmath.ltx:\n// \\def\\neq{\\not=} \\let\\ne=\\neq\n// \\DeclareRobustCommand\n// \\notin{\\mathrel{\\m@th\\mathpalette\\c@ncel\\in}}\n// \\def\\c@ncel#1#2{\\m@th\\ooalign{$\\hfil#1\\mkern1mu/\\hfil$\\crcr$#1#2$}}\n\ndefineMacro(\"\\\\neq\", \"\\\\html@mathml{\\\\mathrel{\\\\not=}}{\\\\mathrel{\\\\char`\u2260}}\");\ndefineMacro(\"\\\\ne\", \"\\\\neq\");\ndefineMacro(\"\\u2260\", \"\\\\neq\");\ndefineMacro(\"\\\\notin\", \"\\\\html@mathml{\\\\mathrel{{\\\\in}\\\\mathllap{/\\\\mskip1mu}}}\" + \"{\\\\mathrel{\\\\char`\u2209}}\");\ndefineMacro(\"\\u2209\", \"\\\\notin\"); // Unicode stacked relations\n\ndefineMacro(\"\\u2258\", \"\\\\html@mathml{\" + \"\\\\mathrel{=\\\\kern{-1em}\\\\raisebox{0.4em}{$\\\\scriptsize\\\\frown$}}\" + \"}{\\\\mathrel{\\\\char`\\u2258}}\");\ndefineMacro(\"\\u2259\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\wedge}{=}}{\\\\mathrel{\\\\char`\\u2258}}\");\ndefineMacro(\"\\u225A\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\vee}{=}}{\\\\mathrel{\\\\char`\\u225A}}\");\ndefineMacro(\"\\u225B\", \"\\\\html@mathml{\\\\stackrel{\\\\scriptsize\\\\star}{=}}\" + \"{\\\\mathrel{\\\\char`\\u225B}}\");\ndefineMacro(\"\\u225D\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\mathrm{def}}{=}}\" + \"{\\\\mathrel{\\\\char`\\u225D}}\");\ndefineMacro(\"\\u225E\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\mathrm{m}}{=}}\" + \"{\\\\mathrel{\\\\char`\\u225E}}\");\ndefineMacro(\"\\u225F\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny?}{=}}{\\\\mathrel{\\\\char`\\u225F}}\"); // Misc Unicode\n\ndefineMacro(\"\\u27C2\", \"\\\\perp\");\ndefineMacro(\"\\u203C\", \"\\\\mathclose{!\\\\mkern-0.8mu!}\");\ndefineMacro(\"\\u220C\", \"\\\\notni\");\ndefineMacro(\"\\u231C\", \"\\\\ulcorner\");\ndefineMacro(\"\\u231D\", \"\\\\urcorner\");\ndefineMacro(\"\\u231E\", \"\\\\llcorner\");\ndefineMacro(\"\\u231F\", \"\\\\lrcorner\");\ndefineMacro(\"\\u00A9\", \"\\\\copyright\");\ndefineMacro(\"\\u00AE\", \"\\\\textregistered\");\ndefineMacro(\"\\uFE0F\", \"\\\\textregistered\"); // The KaTeX fonts have corners at codepoints that don't match Unicode.\n// For MathML purposes, use the Unicode code point.\n\ndefineMacro(\"\\\\ulcorner\", \"\\\\html@mathml{\\\\@ulcorner}{\\\\mathop{\\\\char\\\"231c}}\");\ndefineMacro(\"\\\\urcorner\", \"\\\\html@mathml{\\\\@urcorner}{\\\\mathop{\\\\char\\\"231d}}\");\ndefineMacro(\"\\\\llcorner\", \"\\\\html@mathml{\\\\@llcorner}{\\\\mathop{\\\\char\\\"231e}}\");\ndefineMacro(\"\\\\lrcorner\", \"\\\\html@mathml{\\\\@lrcorner}{\\\\mathop{\\\\char\\\"231f}}\"); //////////////////////////////////////////////////////////////////////\n// LaTeX_2\u03B5\n// \\vdots{\\vbox{\\baselineskip4\\p@ \\lineskiplimit\\z@\n// \\kern6\\p@\\hbox{.}\\hbox{.}\\hbox{.}}}\n// We'll call \\varvdots, which gets a glyph from symbols.js.\n// The zero-width rule gets us an equivalent to the vertical 6pt kern.\n\ndefineMacro(\"\\\\vdots\", \"\\\\mathord{\\\\varvdots\\\\rule{0pt}{15pt}}\");\ndefineMacro(\"\\u22ee\", \"\\\\vdots\"); //////////////////////////////////////////////////////////////////////\n// amsmath.sty\n// http://mirrors.concertpass.com/tex-archive/macros/latex/required/amsmath/amsmath.pdf\n// Italic Greek capital letters. AMS defines these with \\DeclareMathSymbol,\n// but they are equivalent to \\mathit{\\Letter}.\n\ndefineMacro(\"\\\\varGamma\", \"\\\\mathit{\\\\Gamma}\");\ndefineMacro(\"\\\\varDelta\", \"\\\\mathit{\\\\Delta}\");\ndefineMacro(\"\\\\varTheta\", \"\\\\mathit{\\\\Theta}\");\ndefineMacro(\"\\\\varLambda\", \"\\\\mathit{\\\\Lambda}\");\ndefineMacro(\"\\\\varXi\", \"\\\\mathit{\\\\Xi}\");\ndefineMacro(\"\\\\varPi\", \"\\\\mathit{\\\\Pi}\");\ndefineMacro(\"\\\\varSigma\", \"\\\\mathit{\\\\Sigma}\");\ndefineMacro(\"\\\\varUpsilon\", \"\\\\mathit{\\\\Upsilon}\");\ndefineMacro(\"\\\\varPhi\", \"\\\\mathit{\\\\Phi}\");\ndefineMacro(\"\\\\varPsi\", \"\\\\mathit{\\\\Psi}\");\ndefineMacro(\"\\\\varOmega\", \"\\\\mathit{\\\\Omega}\"); //\\newcommand{\\substack}[1]{\\subarray{c}#1\\endsubarray}\n\ndefineMacro(\"\\\\substack\", \"\\\\begin{subarray}{c}#1\\\\end{subarray}\"); // \\renewcommand{\\colon}{\\nobreak\\mskip2mu\\mathpunct{}\\nonscript\n// \\mkern-\\thinmuskip{:}\\mskip6muplus1mu\\relax}\n\ndefineMacro(\"\\\\colon\", \"\\\\nobreak\\\\mskip2mu\\\\mathpunct{}\" + \"\\\\mathchoice{\\\\mkern-3mu}{\\\\mkern-3mu}{}{}{:}\\\\mskip6mu\\\\relax\"); // \\newcommand{\\boxed}[1]{\\fbox{\\m@th$\\displaystyle#1$}}\n\ndefineMacro(\"\\\\boxed\", \"\\\\fbox{$\\\\displaystyle{#1}$}\"); // \\def\\iff{\\DOTSB\\;\\Longleftrightarrow\\;}\n// \\def\\implies{\\DOTSB\\;\\Longrightarrow\\;}\n// \\def\\impliedby{\\DOTSB\\;\\Longleftarrow\\;}\n\ndefineMacro(\"\\\\iff\", \"\\\\DOTSB\\\\;\\\\Longleftrightarrow\\\\;\");\ndefineMacro(\"\\\\implies\", \"\\\\DOTSB\\\\;\\\\Longrightarrow\\\\;\");\ndefineMacro(\"\\\\impliedby\", \"\\\\DOTSB\\\\;\\\\Longleftarrow\\\\;\"); // AMSMath's automatic \\dots, based on \\mdots@@ macro.\n\nvar dotsByToken = {\n ',': '\\\\dotsc',\n '\\\\not': '\\\\dotsb',\n // \\keybin@ checks for the following:\n '+': '\\\\dotsb',\n '=': '\\\\dotsb',\n '<': '\\\\dotsb',\n '>': '\\\\dotsb',\n '-': '\\\\dotsb',\n '*': '\\\\dotsb',\n ':': '\\\\dotsb',\n // Symbols whose definition starts with \\DOTSB:\n '\\\\DOTSB': '\\\\dotsb',\n '\\\\coprod': '\\\\dotsb',\n '\\\\bigvee': '\\\\dotsb',\n '\\\\bigwedge': '\\\\dotsb',\n '\\\\biguplus': '\\\\dotsb',\n '\\\\bigcap': '\\\\dotsb',\n '\\\\bigcup': '\\\\dotsb',\n '\\\\prod': '\\\\dotsb',\n '\\\\sum': '\\\\dotsb',\n '\\\\bigotimes': '\\\\dotsb',\n '\\\\bigoplus': '\\\\dotsb',\n '\\\\bigodot': '\\\\dotsb',\n '\\\\bigsqcup': '\\\\dotsb',\n '\\\\And': '\\\\dotsb',\n '\\\\longrightarrow': '\\\\dotsb',\n '\\\\Longrightarrow': '\\\\dotsb',\n '\\\\longleftarrow': '\\\\dotsb',\n '\\\\Longleftarrow': '\\\\dotsb',\n '\\\\longleftrightarrow': '\\\\dotsb',\n '\\\\Longleftrightarrow': '\\\\dotsb',\n '\\\\mapsto': '\\\\dotsb',\n '\\\\longmapsto': '\\\\dotsb',\n '\\\\hookrightarrow': '\\\\dotsb',\n '\\\\doteq': '\\\\dotsb',\n // Symbols whose definition starts with \\mathbin:\n '\\\\mathbin': '\\\\dotsb',\n // Symbols whose definition starts with \\mathrel:\n '\\\\mathrel': '\\\\dotsb',\n '\\\\relbar': '\\\\dotsb',\n '\\\\Relbar': '\\\\dotsb',\n '\\\\xrightarrow': '\\\\dotsb',\n '\\\\xleftarrow': '\\\\dotsb',\n // Symbols whose definition starts with \\DOTSI:\n '\\\\DOTSI': '\\\\dotsi',\n '\\\\int': '\\\\dotsi',\n '\\\\oint': '\\\\dotsi',\n '\\\\iint': '\\\\dotsi',\n '\\\\iiint': '\\\\dotsi',\n '\\\\iiiint': '\\\\dotsi',\n '\\\\idotsint': '\\\\dotsi',\n // Symbols whose definition starts with \\DOTSX:\n '\\\\DOTSX': '\\\\dotsx'\n};\ndefineMacro(\"\\\\dots\", function (context) {\n // TODO: If used in text mode, should expand to \\textellipsis.\n // However, in KaTeX, \\textellipsis and \\ldots behave the same\n // (in text mode), and it's unlikely we'd see any of the math commands\n // that affect the behavior of \\dots when in text mode. So fine for now\n // (until we support \\ifmmode ... \\else ... \\fi).\n var thedots = '\\\\dotso';\n var next = context.expandAfterFuture().text;\n\n if (next in dotsByToken) {\n thedots = dotsByToken[next];\n } else if (next.slice(0, 4) === '\\\\not') {\n thedots = '\\\\dotsb';\n } else if (next in symbols.math) {\n if (utils.contains(['bin', 'rel'], symbols.math[next].group)) {\n thedots = '\\\\dotsb';\n }\n }\n\n return thedots;\n});\nvar spaceAfterDots = {\n // \\rightdelim@ checks for the following:\n ')': true,\n ']': true,\n '\\\\rbrack': true,\n '\\\\}': true,\n '\\\\rbrace': true,\n '\\\\rangle': true,\n '\\\\rceil': true,\n '\\\\rfloor': true,\n '\\\\rgroup': true,\n '\\\\rmoustache': true,\n '\\\\right': true,\n '\\\\bigr': true,\n '\\\\biggr': true,\n '\\\\Bigr': true,\n '\\\\Biggr': true,\n // \\extra@ also tests for the following:\n '$': true,\n // \\extrap@ checks for the following:\n ';': true,\n '.': true,\n ',': true\n};\ndefineMacro(\"\\\\dotso\", function (context) {\n var next = context.future().text;\n\n if (next in spaceAfterDots) {\n return \"\\\\ldots\\\\,\";\n } else {\n return \"\\\\ldots\";\n }\n});\ndefineMacro(\"\\\\dotsc\", function (context) {\n var next = context.future().text; // \\dotsc uses \\extra@ but not \\extrap@, instead specially checking for\n // ';' and '.', but doesn't check for ','.\n\n if (next in spaceAfterDots && next !== ',') {\n return \"\\\\ldots\\\\,\";\n } else {\n return \"\\\\ldots\";\n }\n});\ndefineMacro(\"\\\\cdots\", function (context) {\n var next = context.future().text;\n\n if (next in spaceAfterDots) {\n return \"\\\\@cdots\\\\,\";\n } else {\n return \"\\\\@cdots\";\n }\n});\ndefineMacro(\"\\\\dotsb\", \"\\\\cdots\");\ndefineMacro(\"\\\\dotsm\", \"\\\\cdots\");\ndefineMacro(\"\\\\dotsi\", \"\\\\!\\\\cdots\"); // amsmath doesn't actually define \\dotsx, but \\dots followed by a macro\n// starting with \\DOTSX implies \\dotso, and then \\extra@ detects this case\n// and forces the added `\\,`.\n\ndefineMacro(\"\\\\dotsx\", \"\\\\ldots\\\\,\"); // \\let\\DOTSI\\relax\n// \\let\\DOTSB\\relax\n// \\let\\DOTSX\\relax\n\ndefineMacro(\"\\\\DOTSI\", \"\\\\relax\");\ndefineMacro(\"\\\\DOTSB\", \"\\\\relax\");\ndefineMacro(\"\\\\DOTSX\", \"\\\\relax\"); // Spacing, based on amsmath.sty's override of LaTeX defaults\n// \\DeclareRobustCommand{\\tmspace}[3]{%\n// \\ifmmode\\mskip#1#2\\else\\kern#1#3\\fi\\relax}\n\ndefineMacro(\"\\\\tmspace\", \"\\\\TextOrMath{\\\\kern#1#3}{\\\\mskip#1#2}\\\\relax\"); // \\renewcommand{\\,}{\\tmspace+\\thinmuskip{.1667em}}\n// TODO: math mode should use \\thinmuskip\n\ndefineMacro(\"\\\\,\", \"\\\\tmspace+{3mu}{.1667em}\"); // \\let\\thinspace\\,\n\ndefineMacro(\"\\\\thinspace\", \"\\\\,\"); // \\def\\>{\\mskip\\medmuskip}\n// \\renewcommand{\\:}{\\tmspace+\\medmuskip{.2222em}}\n// TODO: \\> and math mode of \\: should use \\medmuskip = 4mu plus 2mu minus 4mu\n\ndefineMacro(\"\\\\>\", \"\\\\mskip{4mu}\");\ndefineMacro(\"\\\\:\", \"\\\\tmspace+{4mu}{.2222em}\"); // \\let\\medspace\\:\n\ndefineMacro(\"\\\\medspace\", \"\\\\:\"); // \\renewcommand{\\;}{\\tmspace+\\thickmuskip{.2777em}}\n// TODO: math mode should use \\thickmuskip = 5mu plus 5mu\n\ndefineMacro(\"\\\\;\", \"\\\\tmspace+{5mu}{.2777em}\"); // \\let\\thickspace\\;\n\ndefineMacro(\"\\\\thickspace\", \"\\\\;\"); // \\renewcommand{\\!}{\\tmspace-\\thinmuskip{.1667em}}\n// TODO: math mode should use \\thinmuskip\n\ndefineMacro(\"\\\\!\", \"\\\\tmspace-{3mu}{.1667em}\"); // \\let\\negthinspace\\!\n\ndefineMacro(\"\\\\negthinspace\", \"\\\\!\"); // \\newcommand{\\negmedspace}{\\tmspace-\\medmuskip{.2222em}}\n// TODO: math mode should use \\medmuskip\n\ndefineMacro(\"\\\\negmedspace\", \"\\\\tmspace-{4mu}{.2222em}\"); // \\newcommand{\\negthickspace}{\\tmspace-\\thickmuskip{.2777em}}\n// TODO: math mode should use \\thickmuskip\n\ndefineMacro(\"\\\\negthickspace\", \"\\\\tmspace-{5mu}{.277em}\"); // \\def\\enspace{\\kern.5em }\n\ndefineMacro(\"\\\\enspace\", \"\\\\kern.5em \"); // \\def\\enskip{\\hskip.5em\\relax}\n\ndefineMacro(\"\\\\enskip\", \"\\\\hskip.5em\\\\relax\"); // \\def\\quad{\\hskip1em\\relax}\n\ndefineMacro(\"\\\\quad\", \"\\\\hskip1em\\\\relax\"); // \\def\\qquad{\\hskip2em\\relax}\n\ndefineMacro(\"\\\\qquad\", \"\\\\hskip2em\\\\relax\"); // \\tag@in@display form of \\tag\n\ndefineMacro(\"\\\\tag\", \"\\\\@ifstar\\\\tag@literal\\\\tag@paren\");\ndefineMacro(\"\\\\tag@paren\", \"\\\\tag@literal{({#1})}\");\ndefineMacro(\"\\\\tag@literal\", context => {\n if (context.macros.get(\"\\\\df@tag\")) {\n throw new ParseError(\"Multiple \\\\tag\");\n }\n\n return \"\\\\gdef\\\\df@tag{\\\\text{#1}}\";\n}); // \\renewcommand{\\bmod}{\\nonscript\\mskip-\\medmuskip\\mkern5mu\\mathbin\n// {\\operator@font mod}\\penalty900\n// \\mkern5mu\\nonscript\\mskip-\\medmuskip}\n// \\newcommand{\\pod}[1]{\\allowbreak\n// \\if@display\\mkern18mu\\else\\mkern8mu\\fi(#1)}\n// \\renewcommand{\\pmod}[1]{\\pod{{\\operator@font mod}\\mkern6mu#1}}\n// \\newcommand{\\mod}[1]{\\allowbreak\\if@display\\mkern18mu\n// \\else\\mkern12mu\\fi{\\operator@font mod}\\,\\,#1}\n// TODO: math mode should use \\medmuskip = 4mu plus 2mu minus 4mu\n\ndefineMacro(\"\\\\bmod\", \"\\\\mathchoice{\\\\mskip1mu}{\\\\mskip1mu}{\\\\mskip5mu}{\\\\mskip5mu}\" + \"\\\\mathbin{\\\\rm mod}\" + \"\\\\mathchoice{\\\\mskip1mu}{\\\\mskip1mu}{\\\\mskip5mu}{\\\\mskip5mu}\");\ndefineMacro(\"\\\\pod\", \"\\\\allowbreak\" + \"\\\\mathchoice{\\\\mkern18mu}{\\\\mkern8mu}{\\\\mkern8mu}{\\\\mkern8mu}(#1)\");\ndefineMacro(\"\\\\pmod\", \"\\\\pod{{\\\\rm mod}\\\\mkern6mu#1}\");\ndefineMacro(\"\\\\mod\", \"\\\\allowbreak\" + \"\\\\mathchoice{\\\\mkern18mu}{\\\\mkern12mu}{\\\\mkern12mu}{\\\\mkern12mu}\" + \"{\\\\rm mod}\\\\,\\\\,#1\"); //////////////////////////////////////////////////////////////////////\n// LaTeX source2e\n// \\expandafter\\let\\expandafter\\@normalcr\n// \\csname\\expandafter\\@gobble\\string\\\\ \\endcsname\n// \\DeclareRobustCommand\\newline{\\@normalcr\\relax}\n\ndefineMacro(\"\\\\newline\", \"\\\\\\\\\\\\relax\"); // \\def\\TeX{T\\kern-.1667em\\lower.5ex\\hbox{E}\\kern-.125emX\\@}\n// TODO: Doesn't normally work in math mode because \\@ fails. KaTeX doesn't\n// support \\@ yet, so that's omitted, and we add \\text so that the result\n// doesn't look funny in math mode.\n\ndefineMacro(\"\\\\TeX\", \"\\\\textrm{\\\\html@mathml{\" + \"T\\\\kern-.1667em\\\\raisebox{-.5ex}{E}\\\\kern-.125emX\" + \"}{TeX}}\"); // \\DeclareRobustCommand{\\LaTeX}{L\\kern-.36em%\n// {\\sbox\\z@ T%\n// \\vbox to\\ht\\z@{\\hbox{\\check@mathfonts\n// \\fontsize\\sf@size\\z@\n// \\math@fontsfalse\\selectfont\n// A}%\n// \\vss}%\n// }%\n// \\kern-.15em%\n// \\TeX}\n// This code aligns the top of the A with the T (from the perspective of TeX's\n// boxes, though visually the A appears to extend above slightly).\n// We compute the corresponding \\raisebox when A is rendered in \\normalsize\n// \\scriptstyle, which has a scale factor of 0.7 (see Options.js).\n\nvar latexRaiseA = makeEm(fontMetricsData['Main-Regular'][\"T\".charCodeAt(0)][1] - 0.7 * fontMetricsData['Main-Regular'][\"A\".charCodeAt(0)][1]);\ndefineMacro(\"\\\\LaTeX\", \"\\\\textrm{\\\\html@mathml{\" + (\"L\\\\kern-.36em\\\\raisebox{\" + latexRaiseA + \"}{\\\\scriptstyle A}\") + \"\\\\kern-.15em\\\\TeX}{LaTeX}}\"); // New KaTeX logo based on tweaking LaTeX logo\n\ndefineMacro(\"\\\\KaTeX\", \"\\\\textrm{\\\\html@mathml{\" + (\"K\\\\kern-.17em\\\\raisebox{\" + latexRaiseA + \"}{\\\\scriptstyle A}\") + \"\\\\kern-.15em\\\\TeX}{KaTeX}}\"); // \\DeclareRobustCommand\\hspace{\\@ifstar\\@hspacer\\@hspace}\n// \\def\\@hspace#1{\\hskip #1\\relax}\n// \\def\\@hspacer#1{\\vrule \\@width\\z@\\nobreak\n// \\hskip #1\\hskip \\z@skip}\n\ndefineMacro(\"\\\\hspace\", \"\\\\@ifstar\\\\@hspacer\\\\@hspace\");\ndefineMacro(\"\\\\@hspace\", \"\\\\hskip #1\\\\relax\");\ndefineMacro(\"\\\\@hspacer\", \"\\\\rule{0pt}{0pt}\\\\hskip #1\\\\relax\"); //////////////////////////////////////////////////////////////////////\n// mathtools.sty\n//\\providecommand\\ordinarycolon{:}\n\ndefineMacro(\"\\\\ordinarycolon\", \":\"); //\\def\\vcentcolon{\\mathrel{\\mathop\\ordinarycolon}}\n//TODO(edemaine): Not yet centered. Fix via \\raisebox or #726\n\ndefineMacro(\"\\\\vcentcolon\", \"\\\\mathrel{\\\\mathop\\\\ordinarycolon}\"); // \\providecommand*\\dblcolon{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}\n\ndefineMacro(\"\\\\dblcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-.9mu}\\\\vcentcolon}}\" + \"{\\\\mathop{\\\\char\\\"2237}}\"); // \\providecommand*\\coloneqq{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}\n\ndefineMacro(\"\\\\coloneqq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}=}}\" + \"{\\\\mathop{\\\\char\\\"2254}}\"); // \u2254\n// \\providecommand*\\Coloneqq{\\dblcolon\\mathrel{\\mkern-1.2mu}=}\n\ndefineMacro(\"\\\\Coloneqq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}=}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"3d}}\"); // \\providecommand*\\coloneq{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}\n\ndefineMacro(\"\\\\coloneq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}}}\" + \"{\\\\mathop{\\\\char\\\"3a\\\\char\\\"2212}}\"); // \\providecommand*\\Coloneq{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}\n\ndefineMacro(\"\\\\Coloneq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"2212}}\"); // \\providecommand*\\eqqcolon{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}\n\ndefineMacro(\"\\\\eqqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{=\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}}\" + \"{\\\\mathop{\\\\char\\\"2255}}\"); // \u2255\n// \\providecommand*\\Eqqcolon{=\\mathrel{\\mkern-1.2mu}\\dblcolon}\n\ndefineMacro(\"\\\\Eqqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{=\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}}\" + \"{\\\\mathop{\\\\char\\\"3d\\\\char\\\"2237}}\"); // \\providecommand*\\eqcolon{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}\n\ndefineMacro(\"\\\\eqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}}\" + \"{\\\\mathop{\\\\char\\\"2239}}\"); // \\providecommand*\\Eqcolon{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}\n\ndefineMacro(\"\\\\Eqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}}\" + \"{\\\\mathop{\\\\char\\\"2212\\\\char\\\"2237}}\"); // \\providecommand*\\colonapprox{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}\n\ndefineMacro(\"\\\\colonapprox\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx}}\" + \"{\\\\mathop{\\\\char\\\"3a\\\\char\\\"2248}}\"); // \\providecommand*\\Colonapprox{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}\n\ndefineMacro(\"\\\\Colonapprox\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"2248}}\"); // \\providecommand*\\colonsim{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}\n\ndefineMacro(\"\\\\colonsim\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim}}\" + \"{\\\\mathop{\\\\char\\\"3a\\\\char\\\"223c}}\"); // \\providecommand*\\Colonsim{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}\n\ndefineMacro(\"\\\\Colonsim\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"223c}}\"); // Some Unicode characters are implemented with macros to mathtools functions.\n\ndefineMacro(\"\\u2237\", \"\\\\dblcolon\"); // ::\n\ndefineMacro(\"\\u2239\", \"\\\\eqcolon\"); // -:\n\ndefineMacro(\"\\u2254\", \"\\\\coloneqq\"); // :=\n\ndefineMacro(\"\\u2255\", \"\\\\eqqcolon\"); // =:\n\ndefineMacro(\"\\u2A74\", \"\\\\Coloneqq\"); // ::=\n//////////////////////////////////////////////////////////////////////\n// colonequals.sty\n// Alternate names for mathtools's macros:\n\ndefineMacro(\"\\\\ratio\", \"\\\\vcentcolon\");\ndefineMacro(\"\\\\coloncolon\", \"\\\\dblcolon\");\ndefineMacro(\"\\\\colonequals\", \"\\\\coloneqq\");\ndefineMacro(\"\\\\coloncolonequals\", \"\\\\Coloneqq\");\ndefineMacro(\"\\\\equalscolon\", \"\\\\eqqcolon\");\ndefineMacro(\"\\\\equalscoloncolon\", \"\\\\Eqqcolon\");\ndefineMacro(\"\\\\colonminus\", \"\\\\coloneq\");\ndefineMacro(\"\\\\coloncolonminus\", \"\\\\Coloneq\");\ndefineMacro(\"\\\\minuscolon\", \"\\\\eqcolon\");\ndefineMacro(\"\\\\minuscoloncolon\", \"\\\\Eqcolon\"); // \\colonapprox name is same in mathtools and colonequals.\n\ndefineMacro(\"\\\\coloncolonapprox\", \"\\\\Colonapprox\"); // \\colonsim name is same in mathtools and colonequals.\n\ndefineMacro(\"\\\\coloncolonsim\", \"\\\\Colonsim\"); // Additional macros, implemented by analogy with mathtools definitions:\n\ndefineMacro(\"\\\\simcolon\", \"\\\\mathrel{\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}\");\ndefineMacro(\"\\\\simcoloncolon\", \"\\\\mathrel{\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}\");\ndefineMacro(\"\\\\approxcolon\", \"\\\\mathrel{\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}\");\ndefineMacro(\"\\\\approxcoloncolon\", \"\\\\mathrel{\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}\"); // Present in newtxmath, pxfonts and txfonts\n\ndefineMacro(\"\\\\notni\", \"\\\\html@mathml{\\\\not\\\\ni}{\\\\mathrel{\\\\char`\\u220C}}\");\ndefineMacro(\"\\\\limsup\", \"\\\\DOTSB\\\\operatorname*{lim\\\\,sup}\");\ndefineMacro(\"\\\\liminf\", \"\\\\DOTSB\\\\operatorname*{lim\\\\,inf}\"); //////////////////////////////////////////////////////////////////////\n// From amsopn.sty\n\ndefineMacro(\"\\\\injlim\", \"\\\\DOTSB\\\\operatorname*{inj\\\\,lim}\");\ndefineMacro(\"\\\\projlim\", \"\\\\DOTSB\\\\operatorname*{proj\\\\,lim}\");\ndefineMacro(\"\\\\varlimsup\", \"\\\\DOTSB\\\\operatorname*{\\\\overline{lim}}\");\ndefineMacro(\"\\\\varliminf\", \"\\\\DOTSB\\\\operatorname*{\\\\underline{lim}}\");\ndefineMacro(\"\\\\varinjlim\", \"\\\\DOTSB\\\\operatorname*{\\\\underrightarrow{lim}}\");\ndefineMacro(\"\\\\varprojlim\", \"\\\\DOTSB\\\\operatorname*{\\\\underleftarrow{lim}}\"); //////////////////////////////////////////////////////////////////////\n// MathML alternates for KaTeX glyphs in the Unicode private area\n\ndefineMacro(\"\\\\gvertneqq\", \"\\\\html@mathml{\\\\@gvertneqq}{\\u2269}\");\ndefineMacro(\"\\\\lvertneqq\", \"\\\\html@mathml{\\\\@lvertneqq}{\\u2268}\");\ndefineMacro(\"\\\\ngeqq\", \"\\\\html@mathml{\\\\@ngeqq}{\\u2271}\");\ndefineMacro(\"\\\\ngeqslant\", \"\\\\html@mathml{\\\\@ngeqslant}{\\u2271}\");\ndefineMacro(\"\\\\nleqq\", \"\\\\html@mathml{\\\\@nleqq}{\\u2270}\");\ndefineMacro(\"\\\\nleqslant\", \"\\\\html@mathml{\\\\@nleqslant}{\\u2270}\");\ndefineMacro(\"\\\\nshortmid\", \"\\\\html@mathml{\\\\@nshortmid}{\u2224}\");\ndefineMacro(\"\\\\nshortparallel\", \"\\\\html@mathml{\\\\@nshortparallel}{\u2226}\");\ndefineMacro(\"\\\\nsubseteqq\", \"\\\\html@mathml{\\\\@nsubseteqq}{\\u2288}\");\ndefineMacro(\"\\\\nsupseteqq\", \"\\\\html@mathml{\\\\@nsupseteqq}{\\u2289}\");\ndefineMacro(\"\\\\varsubsetneq\", \"\\\\html@mathml{\\\\@varsubsetneq}{\u228A}\");\ndefineMacro(\"\\\\varsubsetneqq\", \"\\\\html@mathml{\\\\@varsubsetneqq}{\u2ACB}\");\ndefineMacro(\"\\\\varsupsetneq\", \"\\\\html@mathml{\\\\@varsupsetneq}{\u228B}\");\ndefineMacro(\"\\\\varsupsetneqq\", \"\\\\html@mathml{\\\\@varsupsetneqq}{\u2ACC}\");\ndefineMacro(\"\\\\imath\", \"\\\\html@mathml{\\\\@imath}{\\u0131}\");\ndefineMacro(\"\\\\jmath\", \"\\\\html@mathml{\\\\@jmath}{\\u0237}\"); //////////////////////////////////////////////////////////////////////\n// stmaryrd and semantic\n// The stmaryrd and semantic packages render the next four items by calling a\n// glyph. Those glyphs do not exist in the KaTeX fonts. Hence the macros.\n\ndefineMacro(\"\\\\llbracket\", \"\\\\html@mathml{\" + \"\\\\mathopen{[\\\\mkern-3.2mu[}}\" + \"{\\\\mathopen{\\\\char`\\u27e6}}\");\ndefineMacro(\"\\\\rrbracket\", \"\\\\html@mathml{\" + \"\\\\mathclose{]\\\\mkern-3.2mu]}}\" + \"{\\\\mathclose{\\\\char`\\u27e7}}\");\ndefineMacro(\"\\u27e6\", \"\\\\llbracket\"); // blackboard bold [\n\ndefineMacro(\"\\u27e7\", \"\\\\rrbracket\"); // blackboard bold ]\n\ndefineMacro(\"\\\\lBrace\", \"\\\\html@mathml{\" + \"\\\\mathopen{\\\\{\\\\mkern-3.2mu[}}\" + \"{\\\\mathopen{\\\\char`\\u2983}}\");\ndefineMacro(\"\\\\rBrace\", \"\\\\html@mathml{\" + \"\\\\mathclose{]\\\\mkern-3.2mu\\\\}}}\" + \"{\\\\mathclose{\\\\char`\\u2984}}\");\ndefineMacro(\"\\u2983\", \"\\\\lBrace\"); // blackboard bold {\n\ndefineMacro(\"\\u2984\", \"\\\\rBrace\"); // blackboard bold }\n// TODO: Create variable sized versions of the last two items. I believe that\n// will require new font glyphs.\n// The stmaryrd function `\\minuso` provides a \"Plimsoll\" symbol that\n// superimposes the characters \\circ and \\mathminus. Used in chemistry.\n\ndefineMacro(\"\\\\minuso\", \"\\\\mathbin{\\\\html@mathml{\" + \"{\\\\mathrlap{\\\\mathchoice{\\\\kern{0.145em}}{\\\\kern{0.145em}}\" + \"{\\\\kern{0.1015em}}{\\\\kern{0.0725em}}\\\\circ}{-}}}\" + \"{\\\\char`\u29B5}}\");\ndefineMacro(\"\u29B5\", \"\\\\minuso\"); //////////////////////////////////////////////////////////////////////\n// texvc.sty\n// The texvc package contains macros available in mediawiki pages.\n// We omit the functions deprecated at\n// https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax\n// We also omit texvc's \\O, which conflicts with \\text{\\O}\n\ndefineMacro(\"\\\\darr\", \"\\\\downarrow\");\ndefineMacro(\"\\\\dArr\", \"\\\\Downarrow\");\ndefineMacro(\"\\\\Darr\", \"\\\\Downarrow\");\ndefineMacro(\"\\\\lang\", \"\\\\langle\");\ndefineMacro(\"\\\\rang\", \"\\\\rangle\");\ndefineMacro(\"\\\\uarr\", \"\\\\uparrow\");\ndefineMacro(\"\\\\uArr\", \"\\\\Uparrow\");\ndefineMacro(\"\\\\Uarr\", \"\\\\Uparrow\");\ndefineMacro(\"\\\\N\", \"\\\\mathbb{N}\");\ndefineMacro(\"\\\\R\", \"\\\\mathbb{R}\");\ndefineMacro(\"\\\\Z\", \"\\\\mathbb{Z}\");\ndefineMacro(\"\\\\alef\", \"\\\\aleph\");\ndefineMacro(\"\\\\alefsym\", \"\\\\aleph\");\ndefineMacro(\"\\\\Alpha\", \"\\\\mathrm{A}\");\ndefineMacro(\"\\\\Beta\", \"\\\\mathrm{B}\");\ndefineMacro(\"\\\\bull\", \"\\\\bullet\");\ndefineMacro(\"\\\\Chi\", \"\\\\mathrm{X}\");\ndefineMacro(\"\\\\clubs\", \"\\\\clubsuit\");\ndefineMacro(\"\\\\cnums\", \"\\\\mathbb{C}\");\ndefineMacro(\"\\\\Complex\", \"\\\\mathbb{C}\");\ndefineMacro(\"\\\\Dagger\", \"\\\\ddagger\");\ndefineMacro(\"\\\\diamonds\", \"\\\\diamondsuit\");\ndefineMacro(\"\\\\empty\", \"\\\\emptyset\");\ndefineMacro(\"\\\\Epsilon\", \"\\\\mathrm{E}\");\ndefineMacro(\"\\\\Eta\", \"\\\\mathrm{H}\");\ndefineMacro(\"\\\\exist\", \"\\\\exists\");\ndefineMacro(\"\\\\harr\", \"\\\\leftrightarrow\");\ndefineMacro(\"\\\\hArr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\Harr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\hearts\", \"\\\\heartsuit\");\ndefineMacro(\"\\\\image\", \"\\\\Im\");\ndefineMacro(\"\\\\infin\", \"\\\\infty\");\ndefineMacro(\"\\\\Iota\", \"\\\\mathrm{I}\");\ndefineMacro(\"\\\\isin\", \"\\\\in\");\ndefineMacro(\"\\\\Kappa\", \"\\\\mathrm{K}\");\ndefineMacro(\"\\\\larr\", \"\\\\leftarrow\");\ndefineMacro(\"\\\\lArr\", \"\\\\Leftarrow\");\ndefineMacro(\"\\\\Larr\", \"\\\\Leftarrow\");\ndefineMacro(\"\\\\lrarr\", \"\\\\leftrightarrow\");\ndefineMacro(\"\\\\lrArr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\Lrarr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\Mu\", \"\\\\mathrm{M}\");\ndefineMacro(\"\\\\natnums\", \"\\\\mathbb{N}\");\ndefineMacro(\"\\\\Nu\", \"\\\\mathrm{N}\");\ndefineMacro(\"\\\\Omicron\", \"\\\\mathrm{O}\");\ndefineMacro(\"\\\\plusmn\", \"\\\\pm\");\ndefineMacro(\"\\\\rarr\", \"\\\\rightarrow\");\ndefineMacro(\"\\\\rArr\", \"\\\\Rightarrow\");\ndefineMacro(\"\\\\Rarr\", \"\\\\Rightarrow\");\ndefineMacro(\"\\\\real\", \"\\\\Re\");\ndefineMacro(\"\\\\reals\", \"\\\\mathbb{R}\");\ndefineMacro(\"\\\\Reals\", \"\\\\mathbb{R}\");\ndefineMacro(\"\\\\Rho\", \"\\\\mathrm{P}\");\ndefineMacro(\"\\\\sdot\", \"\\\\cdot\");\ndefineMacro(\"\\\\sect\", \"\\\\S\");\ndefineMacro(\"\\\\spades\", \"\\\\spadesuit\");\ndefineMacro(\"\\\\sub\", \"\\\\subset\");\ndefineMacro(\"\\\\sube\", \"\\\\subseteq\");\ndefineMacro(\"\\\\supe\", \"\\\\supseteq\");\ndefineMacro(\"\\\\Tau\", \"\\\\mathrm{T}\");\ndefineMacro(\"\\\\thetasym\", \"\\\\vartheta\"); // TODO: defineMacro(\"\\\\varcoppa\", \"\\\\\\mbox{\\\\coppa}\");\n\ndefineMacro(\"\\\\weierp\", \"\\\\wp\");\ndefineMacro(\"\\\\Zeta\", \"\\\\mathrm{Z}\"); //////////////////////////////////////////////////////////////////////\n// statmath.sty\n// https://ctan.math.illinois.edu/macros/latex/contrib/statmath/statmath.pdf\n\ndefineMacro(\"\\\\argmin\", \"\\\\DOTSB\\\\operatorname*{arg\\\\,min}\");\ndefineMacro(\"\\\\argmax\", \"\\\\DOTSB\\\\operatorname*{arg\\\\,max}\");\ndefineMacro(\"\\\\plim\", \"\\\\DOTSB\\\\mathop{\\\\operatorname{plim}}\\\\limits\"); //////////////////////////////////////////////////////////////////////\n// braket.sty\n// http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/braket/braket.pdf\n\ndefineMacro(\"\\\\bra\", \"\\\\mathinner{\\\\langle{#1}|}\");\ndefineMacro(\"\\\\ket\", \"\\\\mathinner{|{#1}\\\\rangle}\");\ndefineMacro(\"\\\\braket\", \"\\\\mathinner{\\\\langle{#1}\\\\rangle}\");\ndefineMacro(\"\\\\Bra\", \"\\\\left\\\\langle#1\\\\right|\");\ndefineMacro(\"\\\\Ket\", \"\\\\left|#1\\\\right\\\\rangle\");\n\nvar braketHelper = one => context => {\n var left = context.consumeArg().tokens;\n var middle = context.consumeArg().tokens;\n var middleDouble = context.consumeArg().tokens;\n var right = context.consumeArg().tokens;\n var oldMiddle = context.macros.get(\"|\");\n var oldMiddleDouble = context.macros.get(\"\\\\|\");\n context.macros.beginGroup();\n\n var midMacro = double => context => {\n if (one) {\n // Only modify the first instance of | or \\|\n context.macros.set(\"|\", oldMiddle);\n\n if (middleDouble.length) {\n context.macros.set(\"\\\\|\", oldMiddleDouble);\n }\n }\n\n var doubled = double;\n\n if (!double && middleDouble.length) {\n // Mimic \\@ifnextchar\n var nextToken = context.future();\n\n if (nextToken.text === \"|\") {\n context.popToken();\n doubled = true;\n }\n }\n\n return {\n tokens: doubled ? middleDouble : middle,\n numArgs: 0\n };\n };\n\n context.macros.set(\"|\", midMacro(false));\n\n if (middleDouble.length) {\n context.macros.set(\"\\\\|\", midMacro(true));\n }\n\n var arg = context.consumeArg().tokens;\n var expanded = context.expandTokens([...right, ...arg, ...left // reversed\n ]);\n context.macros.endGroup();\n return {\n tokens: expanded.reverse(),\n numArgs: 0\n };\n};\n\ndefineMacro(\"\\\\bra@ket\", braketHelper(false));\ndefineMacro(\"\\\\bra@set\", braketHelper(true));\ndefineMacro(\"\\\\Braket\", \"\\\\bra@ket{\\\\left\\\\langle}\" + \"{\\\\,\\\\middle\\\\vert\\\\,}{\\\\,\\\\middle\\\\vert\\\\,}{\\\\right\\\\rangle}\");\ndefineMacro(\"\\\\Set\", \"\\\\bra@set{\\\\left\\\\{\\\\:}\" + \"{\\\\;\\\\middle\\\\vert\\\\;}{\\\\;\\\\middle\\\\Vert\\\\;}{\\\\:\\\\right\\\\}}\");\ndefineMacro(\"\\\\set\", \"\\\\bra@set{\\\\{\\\\,}{\\\\mid}{}{\\\\,\\\\}}\"); // has no support for special || or \\|\n//////////////////////////////////////////////////////////////////////\n// actuarialangle.dtx\n\ndefineMacro(\"\\\\angln\", \"{\\\\angl n}\"); // Custom Khan Academy colors, should be moved to an optional package\n\ndefineMacro(\"\\\\blue\", \"\\\\textcolor{##6495ed}{#1}\");\ndefineMacro(\"\\\\orange\", \"\\\\textcolor{##ffa500}{#1}\");\ndefineMacro(\"\\\\pink\", \"\\\\textcolor{##ff00af}{#1}\");\ndefineMacro(\"\\\\red\", \"\\\\textcolor{##df0030}{#1}\");\ndefineMacro(\"\\\\green\", \"\\\\textcolor{##28ae7b}{#1}\");\ndefineMacro(\"\\\\gray\", \"\\\\textcolor{gray}{#1}\");\ndefineMacro(\"\\\\purple\", \"\\\\textcolor{##9d38bd}{#1}\");\ndefineMacro(\"\\\\blueA\", \"\\\\textcolor{##ccfaff}{#1}\");\ndefineMacro(\"\\\\blueB\", \"\\\\textcolor{##80f6ff}{#1}\");\ndefineMacro(\"\\\\blueC\", \"\\\\textcolor{##63d9ea}{#1}\");\ndefineMacro(\"\\\\blueD\", \"\\\\textcolor{##11accd}{#1}\");\ndefineMacro(\"\\\\blueE\", \"\\\\textcolor{##0c7f99}{#1}\");\ndefineMacro(\"\\\\tealA\", \"\\\\textcolor{##94fff5}{#1}\");\ndefineMacro(\"\\\\tealB\", \"\\\\textcolor{##26edd5}{#1}\");\ndefineMacro(\"\\\\tealC\", \"\\\\textcolor{##01d1c1}{#1}\");\ndefineMacro(\"\\\\tealD\", \"\\\\textcolor{##01a995}{#1}\");\ndefineMacro(\"\\\\tealE\", \"\\\\textcolor{##208170}{#1}\");\ndefineMacro(\"\\\\greenA\", \"\\\\textcolor{##b6ffb0}{#1}\");\ndefineMacro(\"\\\\greenB\", \"\\\\textcolor{##8af281}{#1}\");\ndefineMacro(\"\\\\greenC\", \"\\\\textcolor{##74cf70}{#1}\");\ndefineMacro(\"\\\\greenD\", \"\\\\textcolor{##1fab54}{#1}\");\ndefineMacro(\"\\\\greenE\", \"\\\\textcolor{##0d923f}{#1}\");\ndefineMacro(\"\\\\goldA\", \"\\\\textcolor{##ffd0a9}{#1}\");\ndefineMacro(\"\\\\goldB\", \"\\\\textcolor{##ffbb71}{#1}\");\ndefineMacro(\"\\\\goldC\", \"\\\\textcolor{##ff9c39}{#1}\");\ndefineMacro(\"\\\\goldD\", \"\\\\textcolor{##e07d10}{#1}\");\ndefineMacro(\"\\\\goldE\", \"\\\\textcolor{##a75a05}{#1}\");\ndefineMacro(\"\\\\redA\", \"\\\\textcolor{##fca9a9}{#1}\");\ndefineMacro(\"\\\\redB\", \"\\\\textcolor{##ff8482}{#1}\");\ndefineMacro(\"\\\\redC\", \"\\\\textcolor{##f9685d}{#1}\");\ndefineMacro(\"\\\\redD\", \"\\\\textcolor{##e84d39}{#1}\");\ndefineMacro(\"\\\\redE\", \"\\\\textcolor{##bc2612}{#1}\");\ndefineMacro(\"\\\\maroonA\", \"\\\\textcolor{##ffbde0}{#1}\");\ndefineMacro(\"\\\\maroonB\", \"\\\\textcolor{##ff92c6}{#1}\");\ndefineMacro(\"\\\\maroonC\", \"\\\\textcolor{##ed5fa6}{#1}\");\ndefineMacro(\"\\\\maroonD\", \"\\\\textcolor{##ca337c}{#1}\");\ndefineMacro(\"\\\\maroonE\", \"\\\\textcolor{##9e034e}{#1}\");\ndefineMacro(\"\\\\purpleA\", \"\\\\textcolor{##ddd7ff}{#1}\");\ndefineMacro(\"\\\\purpleB\", \"\\\\textcolor{##c6b9fc}{#1}\");\ndefineMacro(\"\\\\purpleC\", \"\\\\textcolor{##aa87ff}{#1}\");\ndefineMacro(\"\\\\purpleD\", \"\\\\textcolor{##7854ab}{#1}\");\ndefineMacro(\"\\\\purpleE\", \"\\\\textcolor{##543b78}{#1}\");\ndefineMacro(\"\\\\mintA\", \"\\\\textcolor{##f5f9e8}{#1}\");\ndefineMacro(\"\\\\mintB\", \"\\\\textcolor{##edf2df}{#1}\");\ndefineMacro(\"\\\\mintC\", \"\\\\textcolor{##e0e5cc}{#1}\");\ndefineMacro(\"\\\\grayA\", \"\\\\textcolor{##f6f7f7}{#1}\");\ndefineMacro(\"\\\\grayB\", \"\\\\textcolor{##f0f1f2}{#1}\");\ndefineMacro(\"\\\\grayC\", \"\\\\textcolor{##e3e5e6}{#1}\");\ndefineMacro(\"\\\\grayD\", \"\\\\textcolor{##d6d8da}{#1}\");\ndefineMacro(\"\\\\grayE\", \"\\\\textcolor{##babec2}{#1}\");\ndefineMacro(\"\\\\grayF\", \"\\\\textcolor{##888d93}{#1}\");\ndefineMacro(\"\\\\grayG\", \"\\\\textcolor{##626569}{#1}\");\ndefineMacro(\"\\\\grayH\", \"\\\\textcolor{##3b3e40}{#1}\");\ndefineMacro(\"\\\\grayI\", \"\\\\textcolor{##21242c}{#1}\");\ndefineMacro(\"\\\\kaBlue\", \"\\\\textcolor{##314453}{#1}\");\ndefineMacro(\"\\\\kaGreen\", \"\\\\textcolor{##71B307}{#1}\");\n\n/**\n * This file contains the \u201Cgullet\u201D where macros are expanded\n * until only non-macro tokens remain.\n */\n// List of commands that act like macros but aren't defined as a macro,\n// function, or symbol. Used in `isDefined`.\nvar implicitCommands = {\n \"^\": true,\n // Parser.js\n \"_\": true,\n // Parser.js\n \"\\\\limits\": true,\n // Parser.js\n \"\\\\nolimits\": true // Parser.js\n\n};\nclass MacroExpander {\n constructor(input, settings, mode) {\n this.settings = void 0;\n this.expansionCount = void 0;\n this.lexer = void 0;\n this.macros = void 0;\n this.stack = void 0;\n this.mode = void 0;\n this.settings = settings;\n this.expansionCount = 0;\n this.feed(input); // Make new global namespace\n\n this.macros = new Namespace(macros, settings.macros);\n this.mode = mode;\n this.stack = []; // contains tokens in REVERSE order\n }\n /**\n * Feed a new input string to the same MacroExpander\n * (with existing macros etc.).\n */\n\n\n feed(input) {\n this.lexer = new Lexer(input, this.settings);\n }\n /**\n * Switches between \"text\" and \"math\" modes.\n */\n\n\n switchMode(newMode) {\n this.mode = newMode;\n }\n /**\n * Start a new group nesting within all namespaces.\n */\n\n\n beginGroup() {\n this.macros.beginGroup();\n }\n /**\n * End current group nesting within all namespaces.\n */\n\n\n endGroup() {\n this.macros.endGroup();\n }\n /**\n * Ends all currently nested groups (if any), restoring values before the\n * groups began. Useful in case of an error in the middle of parsing.\n */\n\n\n endGroups() {\n this.macros.endGroups();\n }\n /**\n * Returns the topmost token on the stack, without expanding it.\n * Similar in behavior to TeX's `\\futurelet`.\n */\n\n\n future() {\n if (this.stack.length === 0) {\n this.pushToken(this.lexer.lex());\n }\n\n return this.stack[this.stack.length - 1];\n }\n /**\n * Remove and return the next unexpanded token.\n */\n\n\n popToken() {\n this.future(); // ensure non-empty stack\n\n return this.stack.pop();\n }\n /**\n * Add a given token to the token stack. In particular, this get be used\n * to put back a token returned from one of the other methods.\n */\n\n\n pushToken(token) {\n this.stack.push(token);\n }\n /**\n * Append an array of tokens to the token stack.\n */\n\n\n pushTokens(tokens) {\n this.stack.push(...tokens);\n }\n /**\n * Find an macro argument without expanding tokens and append the array of\n * tokens to the token stack. Uses Token as a container for the result.\n */\n\n\n scanArgument(isOptional) {\n var start;\n var end;\n var tokens;\n\n if (isOptional) {\n this.consumeSpaces(); // \\@ifnextchar gobbles any space following it\n\n if (this.future().text !== \"[\") {\n return null;\n }\n\n start = this.popToken(); // don't include [ in tokens\n\n ({\n tokens,\n end\n } = this.consumeArg([\"]\"]));\n } else {\n ({\n tokens,\n start,\n end\n } = this.consumeArg());\n } // indicate the end of an argument\n\n\n this.pushToken(new Token(\"EOF\", end.loc));\n this.pushTokens(tokens);\n return start.range(end, \"\");\n }\n /**\n * Consume all following space tokens, without expansion.\n */\n\n\n consumeSpaces() {\n for (;;) {\n var token = this.future();\n\n if (token.text === \" \") {\n this.stack.pop();\n } else {\n break;\n }\n }\n }\n /**\n * Consume an argument from the token stream, and return the resulting array\n * of tokens and start/end token.\n */\n\n\n consumeArg(delims) {\n // The argument for a delimited parameter is the shortest (possibly\n // empty) sequence of tokens with properly nested {...} groups that is\n // followed ... by this particular list of non-parameter tokens.\n // The argument for an undelimited parameter is the next nonblank\n // token, unless that token is \u2018{\u2019, when the argument will be the\n // entire {...} group that follows.\n var tokens = [];\n var isDelimited = delims && delims.length > 0;\n\n if (!isDelimited) {\n // Ignore spaces between arguments. As the TeXbook says:\n // \"After you have said \u2018\\def\\row#1#2{...}\u2019, you are allowed to\n // put spaces between the arguments (e.g., \u2018\\row x n\u2019), because\n // TeX doesn\u2019t use single spaces as undelimited arguments.\"\n this.consumeSpaces();\n }\n\n var start = this.future();\n var tok;\n var depth = 0;\n var match = 0;\n\n do {\n tok = this.popToken();\n tokens.push(tok);\n\n if (tok.text === \"{\") {\n ++depth;\n } else if (tok.text === \"}\") {\n --depth;\n\n if (depth === -1) {\n throw new ParseError(\"Extra }\", tok);\n }\n } else if (tok.text === \"EOF\") {\n throw new ParseError(\"Unexpected end of input in a macro argument\" + \", expected '\" + (delims && isDelimited ? delims[match] : \"}\") + \"'\", tok);\n }\n\n if (delims && isDelimited) {\n if ((depth === 0 || depth === 1 && delims[match] === \"{\") && tok.text === delims[match]) {\n ++match;\n\n if (match === delims.length) {\n // don't include delims in tokens\n tokens.splice(-match, match);\n break;\n }\n } else {\n match = 0;\n }\n }\n } while (depth !== 0 || isDelimited); // If the argument found ... has the form \u2018{}\u2019,\n // ... the outermost braces enclosing the argument are removed\n\n\n if (start.text === \"{\" && tokens[tokens.length - 1].text === \"}\") {\n tokens.pop();\n tokens.shift();\n }\n\n tokens.reverse(); // to fit in with stack order\n\n return {\n tokens,\n start,\n end: tok\n };\n }\n /**\n * Consume the specified number of (delimited) arguments from the token\n * stream and return the resulting array of arguments.\n */\n\n\n consumeArgs(numArgs, delimiters) {\n if (delimiters) {\n if (delimiters.length !== numArgs + 1) {\n throw new ParseError(\"The length of delimiters doesn't match the number of args!\");\n }\n\n var delims = delimiters[0];\n\n for (var i = 0; i < delims.length; i++) {\n var tok = this.popToken();\n\n if (delims[i] !== tok.text) {\n throw new ParseError(\"Use of the macro doesn't match its definition\", tok);\n }\n }\n }\n\n var args = [];\n\n for (var _i = 0; _i < numArgs; _i++) {\n args.push(this.consumeArg(delimiters && delimiters[_i + 1]).tokens);\n }\n\n return args;\n }\n /**\n * Increment `expansionCount` by the specified amount.\n * Throw an error if it exceeds `maxExpand`.\n */\n\n\n countExpansion(amount) {\n this.expansionCount += amount;\n\n if (this.expansionCount > this.settings.maxExpand) {\n throw new ParseError(\"Too many expansions: infinite loop or \" + \"need to increase maxExpand setting\");\n }\n }\n /**\n * Expand the next token only once if possible.\n *\n * If the token is expanded, the resulting tokens will be pushed onto\n * the stack in reverse order, and the number of such tokens will be\n * returned. This number might be zero or positive.\n *\n * If not, the return value is `false`, and the next token remains at the\n * top of the stack.\n *\n * In either case, the next token will be on the top of the stack,\n * or the stack will be empty (in case of empty expansion\n * and no other tokens).\n *\n * Used to implement `expandAfterFuture` and `expandNextToken`.\n *\n * If expandableOnly, only expandable tokens are expanded and\n * an undefined control sequence results in an error.\n */\n\n\n expandOnce(expandableOnly) {\n var topToken = this.popToken();\n var name = topToken.text;\n var expansion = !topToken.noexpand ? this._getExpansion(name) : null;\n\n if (expansion == null || expandableOnly && expansion.unexpandable) {\n if (expandableOnly && expansion == null && name[0] === \"\\\\\" && !this.isDefined(name)) {\n throw new ParseError(\"Undefined control sequence: \" + name);\n }\n\n this.pushToken(topToken);\n return false;\n }\n\n this.countExpansion(1);\n var tokens = expansion.tokens;\n var args = this.consumeArgs(expansion.numArgs, expansion.delimiters);\n\n if (expansion.numArgs) {\n // paste arguments in place of the placeholders\n tokens = tokens.slice(); // make a shallow copy\n\n for (var i = tokens.length - 1; i >= 0; --i) {\n var tok = tokens[i];\n\n if (tok.text === \"#\") {\n if (i === 0) {\n throw new ParseError(\"Incomplete placeholder at end of macro body\", tok);\n }\n\n tok = tokens[--i]; // next token on stack\n\n if (tok.text === \"#\") {\n // ## \u2192 #\n tokens.splice(i + 1, 1); // drop first #\n } else if (/^[1-9]$/.test(tok.text)) {\n // replace the placeholder with the indicated argument\n tokens.splice(i, 2, ...args[+tok.text - 1]);\n } else {\n throw new ParseError(\"Not a valid argument number\", tok);\n }\n }\n }\n } // Concatenate expansion onto top of stack.\n\n\n this.pushTokens(tokens);\n return tokens.length;\n }\n /**\n * Expand the next token only once (if possible), and return the resulting\n * top token on the stack (without removing anything from the stack).\n * Similar in behavior to TeX's `\\expandafter\\futurelet`.\n * Equivalent to expandOnce() followed by future().\n */\n\n\n expandAfterFuture() {\n this.expandOnce();\n return this.future();\n }\n /**\n * Recursively expand first token, then return first non-expandable token.\n */\n\n\n expandNextToken() {\n for (;;) {\n if (this.expandOnce() === false) {\n // fully expanded\n var token = this.stack.pop(); // the token after \\noexpand is interpreted as if its meaning\n // were \u2018\\relax\u2019\n\n if (token.treatAsRelax) {\n token.text = \"\\\\relax\";\n }\n\n return token;\n }\n } // Flow unable to figure out that this pathway is impossible.\n // https://github.com/facebook/flow/issues/4808\n\n\n throw new Error(); // eslint-disable-line no-unreachable\n }\n /**\n * Fully expand the given macro name and return the resulting list of\n * tokens, or return `undefined` if no such macro is defined.\n */\n\n\n expandMacro(name) {\n return this.macros.has(name) ? this.expandTokens([new Token(name)]) : undefined;\n }\n /**\n * Fully expand the given token stream and return the resulting list of\n * tokens. Note that the input tokens are in reverse order, but the\n * output tokens are in forward order.\n */\n\n\n expandTokens(tokens) {\n var output = [];\n var oldStackLength = this.stack.length;\n this.pushTokens(tokens);\n\n while (this.stack.length > oldStackLength) {\n // Expand only expandable tokens\n if (this.expandOnce(true) === false) {\n // fully expanded\n var token = this.stack.pop();\n\n if (token.treatAsRelax) {\n // the expansion of \\noexpand is the token itself\n token.noexpand = false;\n token.treatAsRelax = false;\n }\n\n output.push(token);\n }\n } // Count all of these tokens as additional expansions, to prevent\n // exponential blowup from linearly many \\edef's.\n\n\n this.countExpansion(output.length);\n return output;\n }\n /**\n * Fully expand the given macro name and return the result as a string,\n * or return `undefined` if no such macro is defined.\n */\n\n\n expandMacroAsText(name) {\n var tokens = this.expandMacro(name);\n\n if (tokens) {\n return tokens.map(token => token.text).join(\"\");\n } else {\n return tokens;\n }\n }\n /**\n * Returns the expanded macro as a reversed array of tokens and a macro\n * argument count. Or returns `null` if no such macro.\n */\n\n\n _getExpansion(name) {\n var definition = this.macros.get(name);\n\n if (definition == null) {\n // mainly checking for undefined here\n return definition;\n } // If a single character has an associated catcode other than 13\n // (active character), then don't expand it.\n\n\n if (name.length === 1) {\n var catcode = this.lexer.catcodes[name];\n\n if (catcode != null && catcode !== 13) {\n return;\n }\n }\n\n var expansion = typeof definition === \"function\" ? definition(this) : definition;\n\n if (typeof expansion === \"string\") {\n var numArgs = 0;\n\n if (expansion.indexOf(\"#\") !== -1) {\n var stripped = expansion.replace(/##/g, \"\");\n\n while (stripped.indexOf(\"#\" + (numArgs + 1)) !== -1) {\n ++numArgs;\n }\n }\n\n var bodyLexer = new Lexer(expansion, this.settings);\n var tokens = [];\n var tok = bodyLexer.lex();\n\n while (tok.text !== \"EOF\") {\n tokens.push(tok);\n tok = bodyLexer.lex();\n }\n\n tokens.reverse(); // to fit in with stack using push and pop\n\n var expanded = {\n tokens,\n numArgs\n };\n return expanded;\n }\n\n return expansion;\n }\n /**\n * Determine whether a command is currently \"defined\" (has some\n * functionality), meaning that it's a macro (in the current group),\n * a function, a symbol, or one of the special commands listed in\n * `implicitCommands`.\n */\n\n\n isDefined(name) {\n return this.macros.has(name) || functions.hasOwnProperty(name) || symbols.math.hasOwnProperty(name) || symbols.text.hasOwnProperty(name) || implicitCommands.hasOwnProperty(name);\n }\n /**\n * Determine whether a command is expandable.\n */\n\n\n isExpandable(name) {\n var macro = this.macros.get(name);\n return macro != null ? typeof macro === \"string\" || typeof macro === \"function\" || !macro.unexpandable : functions.hasOwnProperty(name) && !functions[name].primitive;\n }\n\n}\n\n// Helpers for Parser.js handling of Unicode (sub|super)script characters.\nvar unicodeSubRegEx = /^[\u208A\u208B\u208C\u208D\u208E\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1D62\u2C7C\u2096\u2097\u2098\u2099\u2092\u209A\u1D63\u209B\u209C\u1D64\u1D65\u2093\u1D66\u1D67\u1D68\u1D69\u1D6A]/;\nvar uSubsAndSups = Object.freeze({\n '\u208A': '+',\n '\u208B': '-',\n '\u208C': '=',\n '\u208D': '(',\n '\u208E': ')',\n '\u2080': '0',\n '\u2081': '1',\n '\u2082': '2',\n '\u2083': '3',\n '\u2084': '4',\n '\u2085': '5',\n '\u2086': '6',\n '\u2087': '7',\n '\u2088': '8',\n '\u2089': '9',\n '\\u2090': 'a',\n '\\u2091': 'e',\n '\\u2095': 'h',\n '\\u1D62': 'i',\n '\\u2C7C': 'j',\n '\\u2096': 'k',\n '\\u2097': 'l',\n '\\u2098': 'm',\n '\\u2099': 'n',\n '\\u2092': 'o',\n '\\u209A': 'p',\n '\\u1D63': 'r',\n '\\u209B': 's',\n '\\u209C': 't',\n '\\u1D64': 'u',\n '\\u1D65': 'v',\n '\\u2093': 'x',\n '\\u1D66': '\u03B2',\n '\\u1D67': '\u03B3',\n '\\u1D68': '\u03C1',\n '\\u1D69': '\\u03d5',\n '\\u1D6A': '\u03C7',\n '\u207A': '+',\n '\u207B': '-',\n '\u207C': '=',\n '\u207D': '(',\n '\u207E': ')',\n '\u2070': '0',\n '\u00B9': '1',\n '\u00B2': '2',\n '\u00B3': '3',\n '\u2074': '4',\n '\u2075': '5',\n '\u2076': '6',\n '\u2077': '7',\n '\u2078': '8',\n '\u2079': '9',\n '\\u1D2C': 'A',\n '\\u1D2E': 'B',\n '\\u1D30': 'D',\n '\\u1D31': 'E',\n '\\u1D33': 'G',\n '\\u1D34': 'H',\n '\\u1D35': 'I',\n '\\u1D36': 'J',\n '\\u1D37': 'K',\n '\\u1D38': 'L',\n '\\u1D39': 'M',\n '\\u1D3A': 'N',\n '\\u1D3C': 'O',\n '\\u1D3E': 'P',\n '\\u1D3F': 'R',\n '\\u1D40': 'T',\n '\\u1D41': 'U',\n '\\u2C7D': 'V',\n '\\u1D42': 'W',\n '\\u1D43': 'a',\n '\\u1D47': 'b',\n '\\u1D9C': 'c',\n '\\u1D48': 'd',\n '\\u1D49': 'e',\n '\\u1DA0': 'f',\n '\\u1D4D': 'g',\n '\\u02B0': 'h',\n '\\u2071': 'i',\n '\\u02B2': 'j',\n '\\u1D4F': 'k',\n '\\u02E1': 'l',\n '\\u1D50': 'm',\n '\\u207F': 'n',\n '\\u1D52': 'o',\n '\\u1D56': 'p',\n '\\u02B3': 'r',\n '\\u02E2': 's',\n '\\u1D57': 't',\n '\\u1D58': 'u',\n '\\u1D5B': 'v',\n '\\u02B7': 'w',\n '\\u02E3': 'x',\n '\\u02B8': 'y',\n '\\u1DBB': 'z',\n '\\u1D5D': '\u03B2',\n '\\u1D5E': '\u03B3',\n '\\u1D5F': '\u03B4',\n '\\u1D60': '\\u03d5',\n '\\u1D61': '\u03C7',\n '\\u1DBF': '\u03B8'\n});\n\n/* eslint no-constant-condition:0 */\n\nvar unicodeAccents = {\n \"\u0301\": {\n \"text\": \"\\\\'\",\n \"math\": \"\\\\acute\"\n },\n \"\u0300\": {\n \"text\": \"\\\\`\",\n \"math\": \"\\\\grave\"\n },\n \"\u0308\": {\n \"text\": \"\\\\\\\"\",\n \"math\": \"\\\\ddot\"\n },\n \"\u0303\": {\n \"text\": \"\\\\~\",\n \"math\": \"\\\\tilde\"\n },\n \"\u0304\": {\n \"text\": \"\\\\=\",\n \"math\": \"\\\\bar\"\n },\n \"\u0306\": {\n \"text\": \"\\\\u\",\n \"math\": \"\\\\breve\"\n },\n \"\u030C\": {\n \"text\": \"\\\\v\",\n \"math\": \"\\\\check\"\n },\n \"\u0302\": {\n \"text\": \"\\\\^\",\n \"math\": \"\\\\hat\"\n },\n \"\u0307\": {\n \"text\": \"\\\\.\",\n \"math\": \"\\\\dot\"\n },\n \"\u030A\": {\n \"text\": \"\\\\r\",\n \"math\": \"\\\\mathring\"\n },\n \"\u030B\": {\n \"text\": \"\\\\H\"\n },\n \"\u0327\": {\n \"text\": \"\\\\c\"\n }\n};\nvar unicodeSymbols = {\n \"\u00E1\": \"a\u0301\",\n \"\u00E0\": \"a\u0300\",\n \"\u00E4\": \"a\u0308\",\n \"\u01DF\": \"a\u0308\u0304\",\n \"\u00E3\": \"a\u0303\",\n \"\u0101\": \"a\u0304\",\n \"\u0103\": \"a\u0306\",\n \"\u1EAF\": \"a\u0306\u0301\",\n \"\u1EB1\": \"a\u0306\u0300\",\n \"\u1EB5\": \"a\u0306\u0303\",\n \"\u01CE\": \"a\u030C\",\n \"\u00E2\": \"a\u0302\",\n \"\u1EA5\": \"a\u0302\u0301\",\n \"\u1EA7\": \"a\u0302\u0300\",\n \"\u1EAB\": \"a\u0302\u0303\",\n \"\u0227\": \"a\u0307\",\n \"\u01E1\": \"a\u0307\u0304\",\n \"\u00E5\": \"a\u030A\",\n \"\u01FB\": \"a\u030A\u0301\",\n \"\u1E03\": \"b\u0307\",\n \"\u0107\": \"c\u0301\",\n \"\u1E09\": \"c\u0327\u0301\",\n \"\u010D\": \"c\u030C\",\n \"\u0109\": \"c\u0302\",\n \"\u010B\": \"c\u0307\",\n \"\u00E7\": \"c\u0327\",\n \"\u010F\": \"d\u030C\",\n \"\u1E0B\": \"d\u0307\",\n \"\u1E11\": \"d\u0327\",\n \"\u00E9\": \"e\u0301\",\n \"\u00E8\": \"e\u0300\",\n \"\u00EB\": \"e\u0308\",\n \"\u1EBD\": \"e\u0303\",\n \"\u0113\": \"e\u0304\",\n \"\u1E17\": \"e\u0304\u0301\",\n \"\u1E15\": \"e\u0304\u0300\",\n \"\u0115\": \"e\u0306\",\n \"\u1E1D\": \"e\u0327\u0306\",\n \"\u011B\": \"e\u030C\",\n \"\u00EA\": \"e\u0302\",\n \"\u1EBF\": \"e\u0302\u0301\",\n \"\u1EC1\": \"e\u0302\u0300\",\n \"\u1EC5\": \"e\u0302\u0303\",\n \"\u0117\": \"e\u0307\",\n \"\u0229\": \"e\u0327\",\n \"\u1E1F\": \"f\u0307\",\n \"\u01F5\": \"g\u0301\",\n \"\u1E21\": \"g\u0304\",\n \"\u011F\": \"g\u0306\",\n \"\u01E7\": \"g\u030C\",\n \"\u011D\": \"g\u0302\",\n \"\u0121\": \"g\u0307\",\n \"\u0123\": \"g\u0327\",\n \"\u1E27\": \"h\u0308\",\n \"\u021F\": \"h\u030C\",\n \"\u0125\": \"h\u0302\",\n \"\u1E23\": \"h\u0307\",\n \"\u1E29\": \"h\u0327\",\n \"\u00ED\": \"i\u0301\",\n \"\u00EC\": \"i\u0300\",\n \"\u00EF\": \"i\u0308\",\n \"\u1E2F\": \"i\u0308\u0301\",\n \"\u0129\": \"i\u0303\",\n \"\u012B\": \"i\u0304\",\n \"\u012D\": \"i\u0306\",\n \"\u01D0\": \"i\u030C\",\n \"\u00EE\": \"i\u0302\",\n \"\u01F0\": \"j\u030C\",\n \"\u0135\": \"j\u0302\",\n \"\u1E31\": \"k\u0301\",\n \"\u01E9\": \"k\u030C\",\n \"\u0137\": \"k\u0327\",\n \"\u013A\": \"l\u0301\",\n \"\u013E\": \"l\u030C\",\n \"\u013C\": \"l\u0327\",\n \"\u1E3F\": \"m\u0301\",\n \"\u1E41\": \"m\u0307\",\n \"\u0144\": \"n\u0301\",\n \"\u01F9\": \"n\u0300\",\n \"\u00F1\": \"n\u0303\",\n \"\u0148\": \"n\u030C\",\n \"\u1E45\": \"n\u0307\",\n \"\u0146\": \"n\u0327\",\n \"\u00F3\": \"o\u0301\",\n \"\u00F2\": \"o\u0300\",\n \"\u00F6\": \"o\u0308\",\n \"\u022B\": \"o\u0308\u0304\",\n \"\u00F5\": \"o\u0303\",\n \"\u1E4D\": \"o\u0303\u0301\",\n \"\u1E4F\": \"o\u0303\u0308\",\n \"\u022D\": \"o\u0303\u0304\",\n \"\u014D\": \"o\u0304\",\n \"\u1E53\": \"o\u0304\u0301\",\n \"\u1E51\": \"o\u0304\u0300\",\n \"\u014F\": \"o\u0306\",\n \"\u01D2\": \"o\u030C\",\n \"\u00F4\": \"o\u0302\",\n \"\u1ED1\": \"o\u0302\u0301\",\n \"\u1ED3\": \"o\u0302\u0300\",\n \"\u1ED7\": \"o\u0302\u0303\",\n \"\u022F\": \"o\u0307\",\n \"\u0231\": \"o\u0307\u0304\",\n \"\u0151\": \"o\u030B\",\n \"\u1E55\": \"p\u0301\",\n \"\u1E57\": \"p\u0307\",\n \"\u0155\": \"r\u0301\",\n \"\u0159\": \"r\u030C\",\n \"\u1E59\": \"r\u0307\",\n \"\u0157\": \"r\u0327\",\n \"\u015B\": \"s\u0301\",\n \"\u1E65\": \"s\u0301\u0307\",\n \"\u0161\": \"s\u030C\",\n \"\u1E67\": \"s\u030C\u0307\",\n \"\u015D\": \"s\u0302\",\n \"\u1E61\": \"s\u0307\",\n \"\u015F\": \"s\u0327\",\n \"\u1E97\": \"t\u0308\",\n \"\u0165\": \"t\u030C\",\n \"\u1E6B\": \"t\u0307\",\n \"\u0163\": \"t\u0327\",\n \"\u00FA\": \"u\u0301\",\n \"\u00F9\": \"u\u0300\",\n \"\u00FC\": \"u\u0308\",\n \"\u01D8\": \"u\u0308\u0301\",\n \"\u01DC\": \"u\u0308\u0300\",\n \"\u01D6\": \"u\u0308\u0304\",\n \"\u01DA\": \"u\u0308\u030C\",\n \"\u0169\": \"u\u0303\",\n \"\u1E79\": \"u\u0303\u0301\",\n \"\u016B\": \"u\u0304\",\n \"\u1E7B\": \"u\u0304\u0308\",\n \"\u016D\": \"u\u0306\",\n \"\u01D4\": \"u\u030C\",\n \"\u00FB\": \"u\u0302\",\n \"\u016F\": \"u\u030A\",\n \"\u0171\": \"u\u030B\",\n \"\u1E7D\": \"v\u0303\",\n \"\u1E83\": \"w\u0301\",\n \"\u1E81\": \"w\u0300\",\n \"\u1E85\": \"w\u0308\",\n \"\u0175\": \"w\u0302\",\n \"\u1E87\": \"w\u0307\",\n \"\u1E98\": \"w\u030A\",\n \"\u1E8D\": \"x\u0308\",\n \"\u1E8B\": \"x\u0307\",\n \"\u00FD\": \"y\u0301\",\n \"\u1EF3\": \"y\u0300\",\n \"\u00FF\": \"y\u0308\",\n \"\u1EF9\": \"y\u0303\",\n \"\u0233\": \"y\u0304\",\n \"\u0177\": \"y\u0302\",\n \"\u1E8F\": \"y\u0307\",\n \"\u1E99\": \"y\u030A\",\n \"\u017A\": \"z\u0301\",\n \"\u017E\": \"z\u030C\",\n \"\u1E91\": \"z\u0302\",\n \"\u017C\": \"z\u0307\",\n \"\u00C1\": \"A\u0301\",\n \"\u00C0\": \"A\u0300\",\n \"\u00C4\": \"A\u0308\",\n \"\u01DE\": \"A\u0308\u0304\",\n \"\u00C3\": \"A\u0303\",\n \"\u0100\": \"A\u0304\",\n \"\u0102\": \"A\u0306\",\n \"\u1EAE\": \"A\u0306\u0301\",\n \"\u1EB0\": \"A\u0306\u0300\",\n \"\u1EB4\": \"A\u0306\u0303\",\n \"\u01CD\": \"A\u030C\",\n \"\u00C2\": \"A\u0302\",\n \"\u1EA4\": \"A\u0302\u0301\",\n \"\u1EA6\": \"A\u0302\u0300\",\n \"\u1EAA\": \"A\u0302\u0303\",\n \"\u0226\": \"A\u0307\",\n \"\u01E0\": \"A\u0307\u0304\",\n \"\u00C5\": \"A\u030A\",\n \"\u01FA\": \"A\u030A\u0301\",\n \"\u1E02\": \"B\u0307\",\n \"\u0106\": \"C\u0301\",\n \"\u1E08\": \"C\u0327\u0301\",\n \"\u010C\": \"C\u030C\",\n \"\u0108\": \"C\u0302\",\n \"\u010A\": \"C\u0307\",\n \"\u00C7\": \"C\u0327\",\n \"\u010E\": \"D\u030C\",\n \"\u1E0A\": \"D\u0307\",\n \"\u1E10\": \"D\u0327\",\n \"\u00C9\": \"E\u0301\",\n \"\u00C8\": \"E\u0300\",\n \"\u00CB\": \"E\u0308\",\n \"\u1EBC\": \"E\u0303\",\n \"\u0112\": \"E\u0304\",\n \"\u1E16\": \"E\u0304\u0301\",\n \"\u1E14\": \"E\u0304\u0300\",\n \"\u0114\": \"E\u0306\",\n \"\u1E1C\": \"E\u0327\u0306\",\n \"\u011A\": \"E\u030C\",\n \"\u00CA\": \"E\u0302\",\n \"\u1EBE\": \"E\u0302\u0301\",\n \"\u1EC0\": \"E\u0302\u0300\",\n \"\u1EC4\": \"E\u0302\u0303\",\n \"\u0116\": \"E\u0307\",\n \"\u0228\": \"E\u0327\",\n \"\u1E1E\": \"F\u0307\",\n \"\u01F4\": \"G\u0301\",\n \"\u1E20\": \"G\u0304\",\n \"\u011E\": \"G\u0306\",\n \"\u01E6\": \"G\u030C\",\n \"\u011C\": \"G\u0302\",\n \"\u0120\": \"G\u0307\",\n \"\u0122\": \"G\u0327\",\n \"\u1E26\": \"H\u0308\",\n \"\u021E\": \"H\u030C\",\n \"\u0124\": \"H\u0302\",\n \"\u1E22\": \"H\u0307\",\n \"\u1E28\": \"H\u0327\",\n \"\u00CD\": \"I\u0301\",\n \"\u00CC\": \"I\u0300\",\n \"\u00CF\": \"I\u0308\",\n \"\u1E2E\": \"I\u0308\u0301\",\n \"\u0128\": \"I\u0303\",\n \"\u012A\": \"I\u0304\",\n \"\u012C\": \"I\u0306\",\n \"\u01CF\": \"I\u030C\",\n \"\u00CE\": \"I\u0302\",\n \"\u0130\": \"I\u0307\",\n \"\u0134\": \"J\u0302\",\n \"\u1E30\": \"K\u0301\",\n \"\u01E8\": \"K\u030C\",\n \"\u0136\": \"K\u0327\",\n \"\u0139\": \"L\u0301\",\n \"\u013D\": \"L\u030C\",\n \"\u013B\": \"L\u0327\",\n \"\u1E3E\": \"M\u0301\",\n \"\u1E40\": \"M\u0307\",\n \"\u0143\": \"N\u0301\",\n \"\u01F8\": \"N\u0300\",\n \"\u00D1\": \"N\u0303\",\n \"\u0147\": \"N\u030C\",\n \"\u1E44\": \"N\u0307\",\n \"\u0145\": \"N\u0327\",\n \"\u00D3\": \"O\u0301\",\n \"\u00D2\": \"O\u0300\",\n \"\u00D6\": \"O\u0308\",\n \"\u022A\": \"O\u0308\u0304\",\n \"\u00D5\": \"O\u0303\",\n \"\u1E4C\": \"O\u0303\u0301\",\n \"\u1E4E\": \"O\u0303\u0308\",\n \"\u022C\": \"O\u0303\u0304\",\n \"\u014C\": \"O\u0304\",\n \"\u1E52\": \"O\u0304\u0301\",\n \"\u1E50\": \"O\u0304\u0300\",\n \"\u014E\": \"O\u0306\",\n \"\u01D1\": \"O\u030C\",\n \"\u00D4\": \"O\u0302\",\n \"\u1ED0\": \"O\u0302\u0301\",\n \"\u1ED2\": \"O\u0302\u0300\",\n \"\u1ED6\": \"O\u0302\u0303\",\n \"\u022E\": \"O\u0307\",\n \"\u0230\": \"O\u0307\u0304\",\n \"\u0150\": \"O\u030B\",\n \"\u1E54\": \"P\u0301\",\n \"\u1E56\": \"P\u0307\",\n \"\u0154\": \"R\u0301\",\n \"\u0158\": \"R\u030C\",\n \"\u1E58\": \"R\u0307\",\n \"\u0156\": \"R\u0327\",\n \"\u015A\": \"S\u0301\",\n \"\u1E64\": \"S\u0301\u0307\",\n \"\u0160\": \"S\u030C\",\n \"\u1E66\": \"S\u030C\u0307\",\n \"\u015C\": \"S\u0302\",\n \"\u1E60\": \"S\u0307\",\n \"\u015E\": \"S\u0327\",\n \"\u0164\": \"T\u030C\",\n \"\u1E6A\": \"T\u0307\",\n \"\u0162\": \"T\u0327\",\n \"\u00DA\": \"U\u0301\",\n \"\u00D9\": \"U\u0300\",\n \"\u00DC\": \"U\u0308\",\n \"\u01D7\": \"U\u0308\u0301\",\n \"\u01DB\": \"U\u0308\u0300\",\n \"\u01D5\": \"U\u0308\u0304\",\n \"\u01D9\": \"U\u0308\u030C\",\n \"\u0168\": \"U\u0303\",\n \"\u1E78\": \"U\u0303\u0301\",\n \"\u016A\": \"U\u0304\",\n \"\u1E7A\": \"U\u0304\u0308\",\n \"\u016C\": \"U\u0306\",\n \"\u01D3\": \"U\u030C\",\n \"\u00DB\": \"U\u0302\",\n \"\u016E\": \"U\u030A\",\n \"\u0170\": \"U\u030B\",\n \"\u1E7C\": \"V\u0303\",\n \"\u1E82\": \"W\u0301\",\n \"\u1E80\": \"W\u0300\",\n \"\u1E84\": \"W\u0308\",\n \"\u0174\": \"W\u0302\",\n \"\u1E86\": \"W\u0307\",\n \"\u1E8C\": \"X\u0308\",\n \"\u1E8A\": \"X\u0307\",\n \"\u00DD\": \"Y\u0301\",\n \"\u1EF2\": \"Y\u0300\",\n \"\u0178\": \"Y\u0308\",\n \"\u1EF8\": \"Y\u0303\",\n \"\u0232\": \"Y\u0304\",\n \"\u0176\": \"Y\u0302\",\n \"\u1E8E\": \"Y\u0307\",\n \"\u0179\": \"Z\u0301\",\n \"\u017D\": \"Z\u030C\",\n \"\u1E90\": \"Z\u0302\",\n \"\u017B\": \"Z\u0307\",\n \"\u03AC\": \"\u03B1\u0301\",\n \"\u1F70\": \"\u03B1\u0300\",\n \"\u1FB1\": \"\u03B1\u0304\",\n \"\u1FB0\": \"\u03B1\u0306\",\n \"\u03AD\": \"\u03B5\u0301\",\n \"\u1F72\": \"\u03B5\u0300\",\n \"\u03AE\": \"\u03B7\u0301\",\n \"\u1F74\": \"\u03B7\u0300\",\n \"\u03AF\": \"\u03B9\u0301\",\n \"\u1F76\": \"\u03B9\u0300\",\n \"\u03CA\": \"\u03B9\u0308\",\n \"\u0390\": \"\u03B9\u0308\u0301\",\n \"\u1FD2\": \"\u03B9\u0308\u0300\",\n \"\u1FD1\": \"\u03B9\u0304\",\n \"\u1FD0\": \"\u03B9\u0306\",\n \"\u03CC\": \"\u03BF\u0301\",\n \"\u1F78\": \"\u03BF\u0300\",\n \"\u03CD\": \"\u03C5\u0301\",\n \"\u1F7A\": \"\u03C5\u0300\",\n \"\u03CB\": \"\u03C5\u0308\",\n \"\u03B0\": \"\u03C5\u0308\u0301\",\n \"\u1FE2\": \"\u03C5\u0308\u0300\",\n \"\u1FE1\": \"\u03C5\u0304\",\n \"\u1FE0\": \"\u03C5\u0306\",\n \"\u03CE\": \"\u03C9\u0301\",\n \"\u1F7C\": \"\u03C9\u0300\",\n \"\u038E\": \"\u03A5\u0301\",\n \"\u1FEA\": \"\u03A5\u0300\",\n \"\u03AB\": \"\u03A5\u0308\",\n \"\u1FE9\": \"\u03A5\u0304\",\n \"\u1FE8\": \"\u03A5\u0306\",\n \"\u038F\": \"\u03A9\u0301\",\n \"\u1FFA\": \"\u03A9\u0300\"\n};\n\n/**\n * This file contains the parser used to parse out a TeX expression from the\n * input. Since TeX isn't context-free, standard parsers don't work particularly\n * well.\n *\n * The strategy of this parser is as such:\n *\n * The main functions (the `.parse...` ones) take a position in the current\n * parse string to parse tokens from. The lexer (found in Lexer.js, stored at\n * this.gullet.lexer) also supports pulling out tokens at arbitrary places. When\n * individual tokens are needed at a position, the lexer is called to pull out a\n * token, which is then used.\n *\n * The parser has a property called \"mode\" indicating the mode that\n * the parser is currently in. Currently it has to be one of \"math\" or\n * \"text\", which denotes whether the current environment is a math-y\n * one or a text-y one (e.g. inside \\text). Currently, this serves to\n * limit the functions which can be used in text mode.\n *\n * The main functions then return an object which contains the useful data that\n * was parsed at its given point, and a new position at the end of the parsed\n * data. The main functions can call each other and continue the parsing by\n * using the returned position as a new starting point.\n *\n * There are also extra `.handle...` functions, which pull out some reused\n * functionality into self-contained functions.\n *\n * The functions return ParseNodes.\n */\nclass Parser {\n constructor(input, settings) {\n this.mode = void 0;\n this.gullet = void 0;\n this.settings = void 0;\n this.leftrightDepth = void 0;\n this.nextToken = void 0;\n // Start in math mode\n this.mode = \"math\"; // Create a new macro expander (gullet) and (indirectly via that) also a\n // new lexer (mouth) for this parser (stomach, in the language of TeX)\n\n this.gullet = new MacroExpander(input, settings, this.mode); // Store the settings for use in parsing\n\n this.settings = settings; // Count leftright depth (for \\middle errors)\n\n this.leftrightDepth = 0;\n }\n /**\n * Checks a result to make sure it has the right type, and throws an\n * appropriate error otherwise.\n */\n\n\n expect(text, consume) {\n if (consume === void 0) {\n consume = true;\n }\n\n if (this.fetch().text !== text) {\n throw new ParseError(\"Expected '\" + text + \"', got '\" + this.fetch().text + \"'\", this.fetch());\n }\n\n if (consume) {\n this.consume();\n }\n }\n /**\n * Discards the current lookahead token, considering it consumed.\n */\n\n\n consume() {\n this.nextToken = null;\n }\n /**\n * Return the current lookahead token, or if there isn't one (at the\n * beginning, or if the previous lookahead token was consume()d),\n * fetch the next token as the new lookahead token and return it.\n */\n\n\n fetch() {\n if (this.nextToken == null) {\n this.nextToken = this.gullet.expandNextToken();\n }\n\n return this.nextToken;\n }\n /**\n * Switches between \"text\" and \"math\" modes.\n */\n\n\n switchMode(newMode) {\n this.mode = newMode;\n this.gullet.switchMode(newMode);\n }\n /**\n * Main parsing function, which parses an entire input.\n */\n\n\n parse() {\n if (!this.settings.globalGroup) {\n // Create a group namespace for the math expression.\n // (LaTeX creates a new group for every $...$, $$...$$, \\[...\\].)\n this.gullet.beginGroup();\n } // Use old \\color behavior (same as LaTeX's \\textcolor) if requested.\n // We do this within the group for the math expression, so it doesn't\n // pollute settings.macros.\n\n\n if (this.settings.colorIsTextColor) {\n this.gullet.macros.set(\"\\\\color\", \"\\\\textcolor\");\n }\n\n try {\n // Try to parse the input\n var parse = this.parseExpression(false); // If we succeeded, make sure there's an EOF at the end\n\n this.expect(\"EOF\"); // End the group namespace for the expression\n\n if (!this.settings.globalGroup) {\n this.gullet.endGroup();\n }\n\n return parse; // Close any leftover groups in case of a parse error.\n } finally {\n this.gullet.endGroups();\n }\n }\n /**\n * Fully parse a separate sequence of tokens as a separate job.\n * Tokens should be specified in reverse order, as in a MacroDefinition.\n */\n\n\n subparse(tokens) {\n // Save the next token from the current job.\n var oldToken = this.nextToken;\n this.consume(); // Run the new job, terminating it with an excess '}'\n\n this.gullet.pushToken(new Token(\"}\"));\n this.gullet.pushTokens(tokens);\n var parse = this.parseExpression(false);\n this.expect(\"}\"); // Restore the next token from the current job.\n\n this.nextToken = oldToken;\n return parse;\n }\n\n /**\n * Parses an \"expression\", which is a list of atoms.\n *\n * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This\n * happens when functions have higher precedence han infix\n * nodes in implicit parses.\n *\n * `breakOnTokenText`: The text of the token that the expression should end\n * with, or `null` if something else should end the\n * expression.\n */\n parseExpression(breakOnInfix, breakOnTokenText) {\n var body = []; // Keep adding atoms to the body until we can't parse any more atoms (either\n // we reached the end, a }, or a \\right)\n\n while (true) {\n // Ignore spaces in math mode\n if (this.mode === \"math\") {\n this.consumeSpaces();\n }\n\n var lex = this.fetch();\n\n if (Parser.endOfExpression.indexOf(lex.text) !== -1) {\n break;\n }\n\n if (breakOnTokenText && lex.text === breakOnTokenText) {\n break;\n }\n\n if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) {\n break;\n }\n\n var atom = this.parseAtom(breakOnTokenText);\n\n if (!atom) {\n break;\n } else if (atom.type === \"internal\") {\n continue;\n }\n\n body.push(atom);\n }\n\n if (this.mode === \"text\") {\n this.formLigatures(body);\n }\n\n return this.handleInfixNodes(body);\n }\n /**\n * Rewrites infix operators such as \\over with corresponding commands such\n * as \\frac.\n *\n * There can only be one infix operator per group. If there's more than one\n * then the expression is ambiguous. This can be resolved by adding {}.\n */\n\n\n handleInfixNodes(body) {\n var overIndex = -1;\n var funcName;\n\n for (var i = 0; i < body.length; i++) {\n if (body[i].type === \"infix\") {\n if (overIndex !== -1) {\n throw new ParseError(\"only one infix operator per group\", body[i].token);\n }\n\n overIndex = i;\n funcName = body[i].replaceWith;\n }\n }\n\n if (overIndex !== -1 && funcName) {\n var numerNode;\n var denomNode;\n var numerBody = body.slice(0, overIndex);\n var denomBody = body.slice(overIndex + 1);\n\n if (numerBody.length === 1 && numerBody[0].type === \"ordgroup\") {\n numerNode = numerBody[0];\n } else {\n numerNode = {\n type: \"ordgroup\",\n mode: this.mode,\n body: numerBody\n };\n }\n\n if (denomBody.length === 1 && denomBody[0].type === \"ordgroup\") {\n denomNode = denomBody[0];\n } else {\n denomNode = {\n type: \"ordgroup\",\n mode: this.mode,\n body: denomBody\n };\n }\n\n var node;\n\n if (funcName === \"\\\\\\\\abovefrac\") {\n node = this.callFunction(funcName, [numerNode, body[overIndex], denomNode], []);\n } else {\n node = this.callFunction(funcName, [numerNode, denomNode], []);\n }\n\n return [node];\n } else {\n return body;\n }\n }\n /**\n * Handle a subscript or superscript with nice errors.\n */\n\n\n handleSupSubscript(name // For error reporting.\n ) {\n var symbolToken = this.fetch();\n var symbol = symbolToken.text;\n this.consume();\n this.consumeSpaces(); // ignore spaces before sup/subscript argument\n\n var group = this.parseGroup(name);\n\n if (!group) {\n throw new ParseError(\"Expected group after '\" + symbol + \"'\", symbolToken);\n }\n\n return group;\n }\n /**\n * Converts the textual input of an unsupported command into a text node\n * contained within a color node whose color is determined by errorColor\n */\n\n\n formatUnsupportedCmd(text) {\n var textordArray = [];\n\n for (var i = 0; i < text.length; i++) {\n textordArray.push({\n type: \"textord\",\n mode: \"text\",\n text: text[i]\n });\n }\n\n var textNode = {\n type: \"text\",\n mode: this.mode,\n body: textordArray\n };\n var colorNode = {\n type: \"color\",\n mode: this.mode,\n color: this.settings.errorColor,\n body: [textNode]\n };\n return colorNode;\n }\n /**\n * Parses a group with optional super/subscripts.\n */\n\n\n parseAtom(breakOnTokenText) {\n // The body of an atom is an implicit group, so that things like\n // \\left(x\\right)^2 work correctly.\n var base = this.parseGroup(\"atom\", breakOnTokenText); // In text mode, we don't have superscripts or subscripts\n\n if (this.mode === \"text\") {\n return base;\n } // Note that base may be empty (i.e. null) at this point.\n\n\n var superscript;\n var subscript;\n\n while (true) {\n // Guaranteed in math mode, so eat any spaces first.\n this.consumeSpaces(); // Lex the first token\n\n var lex = this.fetch();\n\n if (lex.text === \"\\\\limits\" || lex.text === \"\\\\nolimits\") {\n // We got a limit control\n if (base && base.type === \"op\") {\n var limits = lex.text === \"\\\\limits\";\n base.limits = limits;\n base.alwaysHandleSupSub = true;\n } else if (base && base.type === \"operatorname\") {\n if (base.alwaysHandleSupSub) {\n base.limits = lex.text === \"\\\\limits\";\n }\n } else {\n throw new ParseError(\"Limit controls must follow a math operator\", lex);\n }\n\n this.consume();\n } else if (lex.text === \"^\") {\n // We got a superscript start\n if (superscript) {\n throw new ParseError(\"Double superscript\", lex);\n }\n\n superscript = this.handleSupSubscript(\"superscript\");\n } else if (lex.text === \"_\") {\n // We got a subscript start\n if (subscript) {\n throw new ParseError(\"Double subscript\", lex);\n }\n\n subscript = this.handleSupSubscript(\"subscript\");\n } else if (lex.text === \"'\") {\n // We got a prime\n if (superscript) {\n throw new ParseError(\"Double superscript\", lex);\n }\n\n var prime = {\n type: \"textord\",\n mode: this.mode,\n text: \"\\\\prime\"\n }; // Many primes can be grouped together, so we handle this here\n\n var primes = [prime];\n this.consume(); // Keep lexing tokens until we get something that's not a prime\n\n while (this.fetch().text === \"'\") {\n // For each one, add another prime to the list\n primes.push(prime);\n this.consume();\n } // If there's a superscript following the primes, combine that\n // superscript in with the primes.\n\n\n if (this.fetch().text === \"^\") {\n primes.push(this.handleSupSubscript(\"superscript\"));\n } // Put everything into an ordgroup as the superscript\n\n\n superscript = {\n type: \"ordgroup\",\n mode: this.mode,\n body: primes\n };\n } else if (uSubsAndSups[lex.text]) {\n // A Unicode subscript or superscript character.\n // We treat these similarly to the unicode-math package.\n // So we render a string of Unicode (sub|super)scripts the\n // same as a (sub|super)script of regular characters.\n var isSub = unicodeSubRegEx.test(lex.text);\n var subsupTokens = [];\n subsupTokens.push(new Token(uSubsAndSups[lex.text]));\n this.consume(); // Continue fetching tokens to fill out the string.\n\n while (true) {\n var token = this.fetch().text;\n\n if (!uSubsAndSups[token]) {\n break;\n }\n\n if (unicodeSubRegEx.test(token) !== isSub) {\n break;\n }\n\n subsupTokens.unshift(new Token(uSubsAndSups[token]));\n this.consume();\n } // Now create a (sub|super)script.\n\n\n var body = this.subparse(subsupTokens);\n\n if (isSub) {\n subscript = {\n type: \"ordgroup\",\n mode: \"math\",\n body\n };\n } else {\n superscript = {\n type: \"ordgroup\",\n mode: \"math\",\n body\n };\n }\n } else {\n // If it wasn't ^, _, or ', stop parsing super/subscripts\n break;\n }\n } // Base must be set if superscript or subscript are set per logic above,\n // but need to check here for type check to pass.\n\n\n if (superscript || subscript) {\n // If we got either a superscript or subscript, create a supsub\n return {\n type: \"supsub\",\n mode: this.mode,\n base: base,\n sup: superscript,\n sub: subscript\n };\n } else {\n // Otherwise return the original body\n return base;\n }\n }\n /**\n * Parses an entire function, including its base and all of its arguments.\n */\n\n\n parseFunction(breakOnTokenText, name // For determining its context\n ) {\n var token = this.fetch();\n var func = token.text;\n var funcData = functions[func];\n\n if (!funcData) {\n return null;\n }\n\n this.consume(); // consume command token\n\n if (name && name !== \"atom\" && !funcData.allowedInArgument) {\n throw new ParseError(\"Got function '\" + func + \"' with no arguments\" + (name ? \" as \" + name : \"\"), token);\n } else if (this.mode === \"text\" && !funcData.allowedInText) {\n throw new ParseError(\"Can't use function '\" + func + \"' in text mode\", token);\n } else if (this.mode === \"math\" && funcData.allowedInMath === false) {\n throw new ParseError(\"Can't use function '\" + func + \"' in math mode\", token);\n }\n\n var {\n args,\n optArgs\n } = this.parseArguments(func, funcData);\n return this.callFunction(func, args, optArgs, token, breakOnTokenText);\n }\n /**\n * Call a function handler with a suitable context and arguments.\n */\n\n\n callFunction(name, args, optArgs, token, breakOnTokenText) {\n var context = {\n funcName: name,\n parser: this,\n token,\n breakOnTokenText\n };\n var func = functions[name];\n\n if (func && func.handler) {\n return func.handler(context, args, optArgs);\n } else {\n throw new ParseError(\"No function handler for \" + name);\n }\n }\n /**\n * Parses the arguments of a function or environment\n */\n\n\n parseArguments(func, // Should look like \"\\name\" or \"\\begin{name}\".\n funcData) {\n var totalArgs = funcData.numArgs + funcData.numOptionalArgs;\n\n if (totalArgs === 0) {\n return {\n args: [],\n optArgs: []\n };\n }\n\n var args = [];\n var optArgs = [];\n\n for (var i = 0; i < totalArgs; i++) {\n var argType = funcData.argTypes && funcData.argTypes[i];\n var isOptional = i < funcData.numOptionalArgs;\n\n if (funcData.primitive && argType == null || // \\sqrt expands into primitive if optional argument doesn't exist\n funcData.type === \"sqrt\" && i === 1 && optArgs[0] == null) {\n argType = \"primitive\";\n }\n\n var arg = this.parseGroupOfType(\"argument to '\" + func + \"'\", argType, isOptional);\n\n if (isOptional) {\n optArgs.push(arg);\n } else if (arg != null) {\n args.push(arg);\n } else {\n // should be unreachable\n throw new ParseError(\"Null argument, please report this as a bug\");\n }\n }\n\n return {\n args,\n optArgs\n };\n }\n /**\n * Parses a group when the mode is changing.\n */\n\n\n parseGroupOfType(name, type, optional) {\n switch (type) {\n case \"color\":\n return this.parseColorGroup(optional);\n\n case \"size\":\n return this.parseSizeGroup(optional);\n\n case \"url\":\n return this.parseUrlGroup(optional);\n\n case \"math\":\n case \"text\":\n return this.parseArgumentGroup(optional, type);\n\n case \"hbox\":\n {\n // hbox argument type wraps the argument in the equivalent of\n // \\hbox, which is like \\text but switching to \\textstyle size.\n var group = this.parseArgumentGroup(optional, \"text\");\n return group != null ? {\n type: \"styling\",\n mode: group.mode,\n body: [group],\n style: \"text\" // simulate \\textstyle\n\n } : null;\n }\n\n case \"raw\":\n {\n var token = this.parseStringGroup(\"raw\", optional);\n return token != null ? {\n type: \"raw\",\n mode: \"text\",\n string: token.text\n } : null;\n }\n\n case \"primitive\":\n {\n if (optional) {\n throw new ParseError(\"A primitive argument cannot be optional\");\n }\n\n var _group = this.parseGroup(name);\n\n if (_group == null) {\n throw new ParseError(\"Expected group as \" + name, this.fetch());\n }\n\n return _group;\n }\n\n case \"original\":\n case null:\n case undefined:\n return this.parseArgumentGroup(optional);\n\n default:\n throw new ParseError(\"Unknown group type as \" + name, this.fetch());\n }\n }\n /**\n * Discard any space tokens, fetching the next non-space token.\n */\n\n\n consumeSpaces() {\n while (this.fetch().text === \" \") {\n this.consume();\n }\n }\n /**\n * Parses a group, essentially returning the string formed by the\n * brace-enclosed tokens plus some position information.\n */\n\n\n parseStringGroup(modeName, // Used to describe the mode in error messages.\n optional) {\n var argToken = this.gullet.scanArgument(optional);\n\n if (argToken == null) {\n return null;\n }\n\n var str = \"\";\n var nextToken;\n\n while ((nextToken = this.fetch()).text !== \"EOF\") {\n str += nextToken.text;\n this.consume();\n }\n\n this.consume(); // consume the end of the argument\n\n argToken.text = str;\n return argToken;\n }\n /**\n * Parses a regex-delimited group: the largest sequence of tokens\n * whose concatenated strings match `regex`. Returns the string\n * formed by the tokens plus some position information.\n */\n\n\n parseRegexGroup(regex, modeName // Used to describe the mode in error messages.\n ) {\n var firstToken = this.fetch();\n var lastToken = firstToken;\n var str = \"\";\n var nextToken;\n\n while ((nextToken = this.fetch()).text !== \"EOF\" && regex.test(str + nextToken.text)) {\n lastToken = nextToken;\n str += lastToken.text;\n this.consume();\n }\n\n if (str === \"\") {\n throw new ParseError(\"Invalid \" + modeName + \": '\" + firstToken.text + \"'\", firstToken);\n }\n\n return firstToken.range(lastToken, str);\n }\n /**\n * Parses a color description.\n */\n\n\n parseColorGroup(optional) {\n var res = this.parseStringGroup(\"color\", optional);\n\n if (res == null) {\n return null;\n }\n\n var match = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(res.text);\n\n if (!match) {\n throw new ParseError(\"Invalid color: '\" + res.text + \"'\", res);\n }\n\n var color = match[0];\n\n if (/^[0-9a-f]{6}$/i.test(color)) {\n // We allow a 6-digit HTML color spec without a leading \"#\".\n // This follows the xcolor package's HTML color model.\n // Predefined color names are all missed by this RegEx pattern.\n color = \"#\" + color;\n }\n\n return {\n type: \"color-token\",\n mode: this.mode,\n color\n };\n }\n /**\n * Parses a size specification, consisting of magnitude and unit.\n */\n\n\n parseSizeGroup(optional) {\n var res;\n var isBlank = false; // don't expand before parseStringGroup\n\n this.gullet.consumeSpaces();\n\n if (!optional && this.gullet.future().text !== \"{\") {\n res = this.parseRegexGroup(/^[-+]? *(?:$|\\d+|\\d+\\.\\d*|\\.\\d*) *[a-z]{0,2} *$/, \"size\");\n } else {\n res = this.parseStringGroup(\"size\", optional);\n }\n\n if (!res) {\n return null;\n }\n\n if (!optional && res.text.length === 0) {\n // Because we've tested for what is !optional, this block won't\n // affect \\kern, \\hspace, etc. It will capture the mandatory arguments\n // to \\genfrac and \\above.\n res.text = \"0pt\"; // Enable \\above{}\n\n isBlank = true; // This is here specifically for \\genfrac\n }\n\n var match = /([-+]?) *(\\d+(?:\\.\\d*)?|\\.\\d+) *([a-z]{2})/.exec(res.text);\n\n if (!match) {\n throw new ParseError(\"Invalid size: '\" + res.text + \"'\", res);\n }\n\n var data = {\n number: +(match[1] + match[2]),\n // sign + magnitude, cast to number\n unit: match[3]\n };\n\n if (!validUnit(data)) {\n throw new ParseError(\"Invalid unit: '\" + data.unit + \"'\", res);\n }\n\n return {\n type: \"size\",\n mode: this.mode,\n value: data,\n isBlank\n };\n }\n /**\n * Parses an URL, checking escaped letters and allowed protocols,\n * and setting the catcode of % as an active character (as in \\hyperref).\n */\n\n\n parseUrlGroup(optional) {\n this.gullet.lexer.setCatcode(\"%\", 13); // active character\n\n this.gullet.lexer.setCatcode(\"~\", 12); // other character\n\n var res = this.parseStringGroup(\"url\", optional);\n this.gullet.lexer.setCatcode(\"%\", 14); // comment character\n\n this.gullet.lexer.setCatcode(\"~\", 13); // active character\n\n if (res == null) {\n return null;\n } // hyperref package allows backslashes alone in href, but doesn't\n // generate valid links in such cases; we interpret this as\n // \"undefined\" behaviour, and keep them as-is. Some browser will\n // replace backslashes with forward slashes.\n\n\n var url = res.text.replace(/\\\\([#$%&~_^{}])/g, '$1');\n return {\n type: \"url\",\n mode: this.mode,\n url\n };\n }\n /**\n * Parses an argument with the mode specified.\n */\n\n\n parseArgumentGroup(optional, mode) {\n var argToken = this.gullet.scanArgument(optional);\n\n if (argToken == null) {\n return null;\n }\n\n var outerMode = this.mode;\n\n if (mode) {\n // Switch to specified mode\n this.switchMode(mode);\n }\n\n this.gullet.beginGroup();\n var expression = this.parseExpression(false, \"EOF\"); // TODO: find an alternative way to denote the end\n\n this.expect(\"EOF\"); // expect the end of the argument\n\n this.gullet.endGroup();\n var result = {\n type: \"ordgroup\",\n mode: this.mode,\n loc: argToken.loc,\n body: expression\n };\n\n if (mode) {\n // Switch mode back\n this.switchMode(outerMode);\n }\n\n return result;\n }\n /**\n * Parses an ordinary group, which is either a single nucleus (like \"x\")\n * or an expression in braces (like \"{x+y}\") or an implicit group, a group\n * that starts at the current position, and ends right before a higher explicit\n * group ends, or at EOF.\n */\n\n\n parseGroup(name, // For error reporting.\n breakOnTokenText) {\n var firstToken = this.fetch();\n var text = firstToken.text;\n var result; // Try to parse an open brace or \\begingroup\n\n if (text === \"{\" || text === \"\\\\begingroup\") {\n this.consume();\n var groupEnd = text === \"{\" ? \"}\" : \"\\\\endgroup\";\n this.gullet.beginGroup(); // If we get a brace, parse an expression\n\n var expression = this.parseExpression(false, groupEnd);\n var lastToken = this.fetch();\n this.expect(groupEnd); // Check that we got a matching closing brace\n\n this.gullet.endGroup();\n result = {\n type: \"ordgroup\",\n mode: this.mode,\n loc: SourceLocation.range(firstToken, lastToken),\n body: expression,\n // A group formed by \\begingroup...\\endgroup is a semi-simple group\n // which doesn't affect spacing in math mode, i.e., is transparent.\n // https://tex.stackexchange.com/questions/1930/when-should-one-\n // use-begingroup-instead-of-bgroup\n semisimple: text === \"\\\\begingroup\" || undefined\n };\n } else {\n // If there exists a function with this name, parse the function.\n // Otherwise, just return a nucleus\n result = this.parseFunction(breakOnTokenText, name) || this.parseSymbol();\n\n if (result == null && text[0] === \"\\\\\" && !implicitCommands.hasOwnProperty(text)) {\n if (this.settings.throwOnError) {\n throw new ParseError(\"Undefined control sequence: \" + text, firstToken);\n }\n\n result = this.formatUnsupportedCmd(text);\n this.consume();\n }\n }\n\n return result;\n }\n /**\n * Form ligature-like combinations of characters for text mode.\n * This includes inputs like \"--\", \"---\", \"``\" and \"''\".\n * The result will simply replace multiple textord nodes with a single\n * character in each value by a single textord node having multiple\n * characters in its value. The representation is still ASCII source.\n * The group will be modified in place.\n */\n\n\n formLigatures(group) {\n var n = group.length - 1;\n\n for (var i = 0; i < n; ++i) {\n var a = group[i]; // $FlowFixMe: Not every node type has a `text` property.\n\n var v = a.text;\n\n if (v === \"-\" && group[i + 1].text === \"-\") {\n if (i + 1 < n && group[i + 2].text === \"-\") {\n group.splice(i, 3, {\n type: \"textord\",\n mode: \"text\",\n loc: SourceLocation.range(a, group[i + 2]),\n text: \"---\"\n });\n n -= 2;\n } else {\n group.splice(i, 2, {\n type: \"textord\",\n mode: \"text\",\n loc: SourceLocation.range(a, group[i + 1]),\n text: \"--\"\n });\n n -= 1;\n }\n }\n\n if ((v === \"'\" || v === \"`\") && group[i + 1].text === v) {\n group.splice(i, 2, {\n type: \"textord\",\n mode: \"text\",\n loc: SourceLocation.range(a, group[i + 1]),\n text: v + v\n });\n n -= 1;\n }\n }\n }\n /**\n * Parse a single symbol out of the string. Here, we handle single character\n * symbols and special functions like \\verb.\n */\n\n\n parseSymbol() {\n var nucleus = this.fetch();\n var text = nucleus.text;\n\n if (/^\\\\verb[^a-zA-Z]/.test(text)) {\n this.consume();\n var arg = text.slice(5);\n var star = arg.charAt(0) === \"*\";\n\n if (star) {\n arg = arg.slice(1);\n } // Lexer's tokenRegex is constructed to always have matching\n // first/last characters.\n\n\n if (arg.length < 2 || arg.charAt(0) !== arg.slice(-1)) {\n throw new ParseError(\"\\\\verb assertion failed --\\n please report what input caused this bug\");\n }\n\n arg = arg.slice(1, -1); // remove first and last char\n\n return {\n type: \"verb\",\n mode: \"text\",\n body: arg,\n star\n };\n } // At this point, we should have a symbol, possibly with accents.\n // First expand any accented base symbol according to unicodeSymbols.\n\n\n if (unicodeSymbols.hasOwnProperty(text[0]) && !symbols[this.mode][text[0]]) {\n // This behavior is not strict (XeTeX-compatible) in math mode.\n if (this.settings.strict && this.mode === \"math\") {\n this.settings.reportNonstrict(\"unicodeTextInMathMode\", \"Accented Unicode text character \\\"\" + text[0] + \"\\\" used in \" + \"math mode\", nucleus);\n }\n\n text = unicodeSymbols[text[0]] + text.slice(1);\n } // Strip off any combining characters\n\n\n var match = combiningDiacriticalMarksEndRegex.exec(text);\n\n if (match) {\n text = text.substring(0, match.index);\n\n if (text === 'i') {\n text = '\\u0131'; // dotless i, in math and text mode\n } else if (text === 'j') {\n text = '\\u0237'; // dotless j, in math and text mode\n }\n } // Recognize base symbol\n\n\n var symbol;\n\n if (symbols[this.mode][text]) {\n if (this.settings.strict && this.mode === 'math' && extraLatin.indexOf(text) >= 0) {\n this.settings.reportNonstrict(\"unicodeTextInMathMode\", \"Latin-1/Unicode text character \\\"\" + text[0] + \"\\\" used in \" + \"math mode\", nucleus);\n }\n\n var group = symbols[this.mode][text].group;\n var loc = SourceLocation.range(nucleus);\n var s;\n\n if (ATOMS.hasOwnProperty(group)) {\n // $FlowFixMe\n var family = group;\n s = {\n type: \"atom\",\n mode: this.mode,\n family,\n loc,\n text\n };\n } else {\n // $FlowFixMe\n s = {\n type: group,\n mode: this.mode,\n loc,\n text\n };\n } // $FlowFixMe\n\n\n symbol = s;\n } else if (text.charCodeAt(0) >= 0x80) {\n // no symbol for e.g. ^\n if (this.settings.strict) {\n if (!supportedCodepoint(text.charCodeAt(0))) {\n this.settings.reportNonstrict(\"unknownSymbol\", \"Unrecognized Unicode character \\\"\" + text[0] + \"\\\"\" + (\" (\" + text.charCodeAt(0) + \")\"), nucleus);\n } else if (this.mode === \"math\") {\n this.settings.reportNonstrict(\"unicodeTextInMathMode\", \"Unicode text character \\\"\" + text[0] + \"\\\" used in math mode\", nucleus);\n }\n } // All nonmathematical Unicode characters are rendered as if they\n // are in text mode (wrapped in \\text) because that's what it\n // takes to render them in LaTeX. Setting `mode: this.mode` is\n // another natural choice (the user requested math mode), but\n // this makes it more difficult for getCharacterMetrics() to\n // distinguish Unicode characters without metrics and those for\n // which we want to simulate the letter M.\n\n\n symbol = {\n type: \"textord\",\n mode: \"text\",\n loc: SourceLocation.range(nucleus),\n text\n };\n } else {\n return null; // EOF, ^, _, {, }, etc.\n }\n\n this.consume(); // Transform combining characters into accents\n\n if (match) {\n for (var i = 0; i < match[0].length; i++) {\n var accent = match[0][i];\n\n if (!unicodeAccents[accent]) {\n throw new ParseError(\"Unknown accent ' \" + accent + \"'\", nucleus);\n }\n\n var command = unicodeAccents[accent][this.mode] || unicodeAccents[accent].text;\n\n if (!command) {\n throw new ParseError(\"Accent \" + accent + \" unsupported in \" + this.mode + \" mode\", nucleus);\n }\n\n symbol = {\n type: \"accent\",\n mode: this.mode,\n loc: SourceLocation.range(nucleus),\n label: command,\n isStretchy: false,\n isShifty: true,\n // $FlowFixMe\n base: symbol\n };\n }\n } // $FlowFixMe\n\n\n return symbol;\n }\n\n}\nParser.endOfExpression = [\"}\", \"\\\\endgroup\", \"\\\\end\", \"\\\\right\", \"&\"];\n\n/**\n * Provides a single function for parsing an expression using a Parser\n * TODO(emily): Remove this\n */\n\n/**\n * Parses an expression using a Parser, then returns the parsed result.\n */\nvar parseTree = function parseTree(toParse, settings) {\n if (!(typeof toParse === 'string' || toParse instanceof String)) {\n throw new TypeError('KaTeX can only parse string typed expression');\n }\n\n var parser = new Parser(toParse, settings); // Blank out any \\df@tag to avoid spurious \"Duplicate \\tag\" errors\n\n delete parser.gullet.macros.current[\"\\\\df@tag\"];\n var tree = parser.parse(); // Prevent a color definition from persisting between calls to katex.render().\n\n delete parser.gullet.macros.current[\"\\\\current@color\"];\n delete parser.gullet.macros.current[\"\\\\color\"]; // If the input used \\tag, it will set the \\df@tag macro to the tag.\n // In this case, we separately parse the tag and wrap the tree.\n\n if (parser.gullet.macros.get(\"\\\\df@tag\")) {\n if (!settings.displayMode) {\n throw new ParseError(\"\\\\tag works only in display equations\");\n }\n\n tree = [{\n type: \"tag\",\n mode: \"text\",\n body: tree,\n tag: parser.subparse([new Token(\"\\\\df@tag\")])\n }];\n }\n\n return tree;\n};\n\n/* eslint no-console:0 */\n\n/**\n * Parse and build an expression, and place that expression in the DOM node\n * given.\n */\nvar render = function render(expression, baseNode, options) {\n baseNode.textContent = \"\";\n var node = renderToDomTree(expression, options).toNode();\n baseNode.appendChild(node);\n}; // KaTeX's styles don't work properly in quirks mode. Print out an error, and\n// disable rendering.\n\n\nif (typeof document !== \"undefined\") {\n if (document.compatMode !== \"CSS1Compat\") {\n typeof console !== \"undefined\" && console.warn(\"Warning: KaTeX doesn't work in quirks mode. Make sure your \" + \"website has a suitable doctype.\");\n\n render = function render() {\n throw new ParseError(\"KaTeX doesn't work in quirks mode.\");\n };\n }\n}\n/**\n * Parse and build an expression, and return the markup for that.\n */\n\n\nvar renderToString = function renderToString(expression, options) {\n var markup = renderToDomTree(expression, options).toMarkup();\n return markup;\n};\n/**\n * Parse an expression and return the parse tree.\n */\n\n\nvar generateParseTree = function generateParseTree(expression, options) {\n var settings = new Settings(options);\n return parseTree(expression, settings);\n};\n/**\n * If the given error is a KaTeX ParseError and options.throwOnError is false,\n * renders the invalid LaTeX as a span with hover title giving the KaTeX\n * error message. Otherwise, simply throws the error.\n */\n\n\nvar renderError = function renderError(error, expression, options) {\n if (options.throwOnError || !(error instanceof ParseError)) {\n throw error;\n }\n\n var node = buildCommon.makeSpan([\"katex-error\"], [new SymbolNode(expression)]);\n node.setAttribute(\"title\", error.toString());\n node.setAttribute(\"style\", \"color:\" + options.errorColor);\n return node;\n};\n/**\n * Generates and returns the katex build tree. This is used for advanced\n * use cases (like rendering to custom output).\n */\n\n\nvar renderToDomTree = function renderToDomTree(expression, options) {\n var settings = new Settings(options);\n\n try {\n var tree = parseTree(expression, settings);\n return buildTree(tree, expression, settings);\n } catch (error) {\n return renderError(error, expression, settings);\n }\n};\n/**\n * Generates and returns the katex build tree, with just HTML (no MathML).\n * This is used for advanced use cases (like rendering to custom output).\n */\n\n\nvar renderToHTMLTree = function renderToHTMLTree(expression, options) {\n var settings = new Settings(options);\n\n try {\n var tree = parseTree(expression, settings);\n return buildHTMLTree(tree, expression, settings);\n } catch (error) {\n return renderError(error, expression, settings);\n }\n};\n\nvar katex = {\n /**\n * Current KaTeX version\n */\n version: \"0.16.11\",\n\n /**\n * Renders the given LaTeX into an HTML+MathML combination, and adds\n * it as a child to the specified DOM node.\n */\n render,\n\n /**\n * Renders the given LaTeX into an HTML+MathML combination string,\n * for sending to the client.\n */\n renderToString,\n\n /**\n * KaTeX error, usually during parsing.\n */\n ParseError,\n\n /**\n * The shema of Settings\n */\n SETTINGS_SCHEMA,\n\n /**\n * Parses the given LaTeX into KaTeX's internal parse tree structure,\n * without rendering to HTML or MathML.\n *\n * NOTE: This method is not currently recommended for public use.\n * The internal tree representation is unstable and is very likely\n * to change. Use at your own risk.\n */\n __parse: generateParseTree,\n\n /**\n * Renders the given LaTeX into an HTML+MathML internal DOM tree\n * representation, without flattening that representation to a string.\n *\n * NOTE: This method is not currently recommended for public use.\n * The internal tree representation is unstable and is very likely\n * to change. Use at your own risk.\n */\n __renderToDomTree: renderToDomTree,\n\n /**\n * Renders the given LaTeX into an HTML internal DOM tree representation,\n * without MathML and without flattening that representation to a string.\n *\n * NOTE: This method is not currently recommended for public use.\n * The internal tree representation is unstable and is very likely\n * to change. Use at your own risk.\n */\n __renderToHTMLTree: renderToHTMLTree,\n\n /**\n * extends internal font metrics object with a new object\n * each key in the new object represents a font name\n */\n __setFontMetrics: setFontMetrics,\n\n /**\n * adds a new symbol to builtin symbols table\n */\n __defineSymbol: defineSymbol,\n\n /**\n * adds a new function to builtin function list,\n * which directly produce parse tree elements\n * and have their own html/mathml builders\n */\n __defineFunction: defineFunction,\n\n /**\n * adds a new macro to builtin macro list\n */\n __defineMacro: defineMacro,\n\n /**\n * Expose the dom tree node types, which can be useful for type checking nodes.\n *\n * NOTE: This method is not currently recommended for public use.\n * The internal tree representation is unstable and is very likely\n * to change. Use at your own risk.\n */\n __domTree: {\n Span,\n Anchor,\n SymbolNode,\n SvgNode,\n PathNode,\n LineNode\n }\n};\n\nexport { katex as default };\n", "import DOMPurify from 'dompurify';\nimport type { MermaidConfig } from '../../config.type.js';\n\n// Remove and ignore br:s\nexport const lineBreakRegex = //gi;\n\n/**\n * Gets the rows of lines in a string\n *\n * @param s - The string to check the lines for\n * @returns The rows in that string\n */\nexport const getRows = (s?: string): string[] => {\n if (!s) {\n return [''];\n }\n const str = breakToPlaceholder(s).replace(/\\\\n/g, '#br#');\n return str.split('#br#');\n};\n\nconst setupDompurifyHooksIfNotSetup = (() => {\n let setup = false;\n\n return () => {\n if (!setup) {\n setupDompurifyHooks();\n setup = true;\n }\n };\n})();\n\nfunction setupDompurifyHooks() {\n const TEMPORARY_ATTRIBUTE = 'data-temp-href-target';\n\n DOMPurify.addHook('beforeSanitizeAttributes', (node: Element) => {\n if (node.tagName === 'A' && node.hasAttribute('target')) {\n node.setAttribute(TEMPORARY_ATTRIBUTE, node.getAttribute('target') ?? '');\n }\n });\n\n DOMPurify.addHook('afterSanitizeAttributes', (node: Element) => {\n if (node.tagName === 'A' && node.hasAttribute(TEMPORARY_ATTRIBUTE)) {\n node.setAttribute('target', node.getAttribute(TEMPORARY_ATTRIBUTE) ?? '');\n node.removeAttribute(TEMPORARY_ATTRIBUTE);\n if (node.getAttribute('target') === '_blank') {\n node.setAttribute('rel', 'noopener');\n }\n }\n });\n}\n\n/**\n * Removes script tags from a text\n *\n * @param txt - The text to sanitize\n * @returns The safer text\n */\nexport const removeScript = (txt: string): string => {\n setupDompurifyHooksIfNotSetup();\n\n const sanitizedText = DOMPurify.sanitize(txt);\n\n return sanitizedText;\n};\n\nconst sanitizeMore = (text: string, config: MermaidConfig) => {\n if (config.flowchart?.htmlLabels !== false) {\n const level = config.securityLevel;\n if (level === 'antiscript' || level === 'strict') {\n text = removeScript(text);\n } else if (level !== 'loose') {\n text = breakToPlaceholder(text);\n text = text.replace(//g, '>');\n text = text.replace(/=/g, '=');\n text = placeholderToBreak(text);\n }\n }\n return text;\n};\n\nexport const sanitizeText = (text: string, config: MermaidConfig): string => {\n if (!text) {\n return text;\n }\n if (config.dompurifyConfig) {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n text = DOMPurify.sanitize(sanitizeMore(text, config), config.dompurifyConfig).toString();\n } else {\n text = DOMPurify.sanitize(sanitizeMore(text, config), {\n FORBID_TAGS: ['style'],\n }).toString();\n }\n return text;\n};\n\nexport const sanitizeTextOrArray = (\n a: string | string[] | string[][],\n config: MermaidConfig\n): string | string[] => {\n if (typeof a === 'string') {\n return sanitizeText(a, config);\n }\n // TODO: Refactor to avoid flat.\n return a.flat().map((x: string) => sanitizeText(x, config));\n};\n\n/**\n * Whether or not a text has any line breaks\n *\n * @param text - The text to test\n * @returns Whether or not the text has breaks\n */\nexport const hasBreaks = (text: string): boolean => {\n return lineBreakRegex.test(text);\n};\n\n/**\n * Splits on
tags\n *\n * @param text - Text to split\n * @returns List of lines as strings\n */\nexport const splitBreaks = (text: string): string[] => {\n return text.split(lineBreakRegex);\n};\n\n/**\n * Converts placeholders to line breaks in HTML\n *\n * @param s - HTML with placeholders\n * @returns HTML with breaks instead of placeholders\n */\nconst placeholderToBreak = (s: string): string => {\n return s.replace(/#br#/g, '
');\n};\n\n/**\n * Opposite of `placeholderToBreak`, converts breaks to placeholders\n *\n * @param s - HTML string\n * @returns String with placeholders\n */\nconst breakToPlaceholder = (s: string): string => {\n return s.replace(lineBreakRegex, '#br#');\n};\n\n/**\n * Gets the current URL\n *\n * @param useAbsolute - Whether to return the absolute URL or not\n * @returns The current URL\n */\nconst getUrl = (useAbsolute: boolean): string => {\n let url = '';\n if (useAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replaceAll(/\\(/g, '\\\\(');\n url = url.replaceAll(/\\)/g, '\\\\)');\n }\n\n return url;\n};\n\n/**\n * Converts a string/boolean into a boolean\n *\n * @param val - String or boolean to convert\n * @returns The result from the input\n */\nexport const evaluate = (val?: string | boolean): boolean =>\n val === false || ['false', 'null', '0'].includes(String(val).trim().toLowerCase()) ? false : true;\n\n/**\n * Wrapper around Math.max which removes non-numeric values\n * Returns the larger of a set of supplied numeric expressions.\n * @param values - Numeric expressions to be evaluated\n * @returns The smaller value\n */\nexport const getMax = function (...values: number[]): number {\n const newValues: number[] = values.filter((value) => {\n return !isNaN(value);\n });\n return Math.max(...newValues);\n};\n\n/**\n * Wrapper around Math.min which removes non-numeric values\n * Returns the smaller of a set of supplied numeric expressions.\n * @param values - Numeric expressions to be evaluated\n * @returns The smaller value\n */\nexport const getMin = function (...values: number[]): number {\n const newValues: number[] = values.filter((value) => {\n return !isNaN(value);\n });\n return Math.min(...newValues);\n};\n\n/**\n * Makes generics in typescript syntax\n *\n * @example\n * Array of array of strings in typescript syntax\n *\n * ```js\n * // returns \"Array>\"\n * parseGenericTypes('Array~Array~string~~');\n * ```\n * @param text - The text to convert\n * @returns The converted string\n */\nexport const parseGenericTypes = function (input: string): string {\n const inputSets = input.split(/(,)/);\n const output = [];\n\n for (let i = 0; i < inputSets.length; i++) {\n let thisSet = inputSets[i];\n\n // if the original input included a value such as \"~K, V~\"\", these will be split into\n // an array of [\"~K\",\",\",\" V~\"].\n // This means that on each call of processSet, there will only be 1 ~ present\n // To account for this, if we encounter a \",\", we are checking the previous and next sets in the array\n // to see if they contain matching ~'s\n // in which case we are assuming that they should be rejoined and sent to be processed\n if (thisSet === ',' && i > 0 && i + 1 < inputSets.length) {\n const previousSet = inputSets[i - 1];\n const nextSet = inputSets[i + 1];\n\n if (shouldCombineSets(previousSet, nextSet)) {\n thisSet = previousSet + ',' + nextSet;\n i++; // Move the index forward to skip the next iteration since we're combining sets\n output.pop();\n }\n }\n\n output.push(processSet(thisSet));\n }\n\n return output.join('');\n};\n\nexport const countOccurrence = (string: string, substring: string): number => {\n return Math.max(0, string.split(substring).length - 1);\n};\n\nconst shouldCombineSets = (previousSet: string, nextSet: string): boolean => {\n const prevCount = countOccurrence(previousSet, '~');\n const nextCount = countOccurrence(nextSet, '~');\n\n return prevCount === 1 && nextCount === 1;\n};\n\nconst processSet = (input: string): string => {\n const tildeCount = countOccurrence(input, '~');\n let hasStartingTilde = false;\n\n if (tildeCount <= 1) {\n return input;\n }\n\n // If there is an odd number of tildes, and the input starts with a tilde, we need to remove it and add it back in later\n if (tildeCount % 2 !== 0 && input.startsWith('~')) {\n input = input.substring(1);\n hasStartingTilde = true;\n }\n\n const chars = [...input];\n\n let first = chars.indexOf('~');\n let last = chars.lastIndexOf('~');\n\n while (first !== -1 && last !== -1 && first !== last) {\n chars[first] = '<';\n chars[last] = '>';\n\n first = chars.indexOf('~');\n last = chars.lastIndexOf('~');\n }\n\n // Add the starting tilde back in if we removed it\n if (hasStartingTilde) {\n chars.unshift('~');\n }\n\n return chars.join('');\n};\n\n// TODO: find a better method for detecting support. This interface was added in the MathML 4 spec.\n// Firefox versions between [4,71] (0.47%) and Safari versions between [5,13.4] (0.17%) don't have this interface implemented but MathML is supported\nexport const isMathMLSupported = () => window.MathMLElement !== undefined;\n\nexport const katexRegex = /\\$\\$(.*)\\$\\$/g;\n\n/**\n * Whether or not a text has KaTeX delimiters\n *\n * @param text - The text to test\n * @returns Whether or not the text has KaTeX delimiters\n */\nexport const hasKatex = (text: string): boolean => (text.match(katexRegex)?.length ?? 0) > 0;\n\n/**\n * Computes the minimum dimensions needed to display a div containing MathML\n *\n * @param text - The text to test\n * @param config - Configuration for Mermaid\n * @returns Object containing \\{width, height\\}\n */\nexport const calculateMathMLDimensions = async (text: string, config: MermaidConfig) => {\n text = await renderKatex(text, config);\n const divElem = document.createElement('div');\n divElem.innerHTML = text;\n divElem.id = 'katex-temp';\n divElem.style.visibility = 'hidden';\n divElem.style.position = 'absolute';\n divElem.style.top = '0';\n const body = document.querySelector('body');\n body?.insertAdjacentElement('beforeend', divElem);\n const dim = { width: divElem.clientWidth, height: divElem.clientHeight };\n divElem.remove();\n return dim;\n};\n\n/**\n * Attempts to render and return the KaTeX portion of a string with MathML\n *\n * @param text - The text to test\n * @param config - Configuration for Mermaid\n * @returns String containing MathML if KaTeX is supported, or an error message if it is not and stylesheets aren't present\n */\nexport const renderKatex = async (text: string, config: MermaidConfig): Promise => {\n if (!hasKatex(text)) {\n return text;\n }\n\n if (!(isMathMLSupported() || config.legacyMathML || config.forceLegacyMathML)) {\n return text.replace(katexRegex, 'MathML is unsupported in this environment.');\n }\n\n const { default: katex } = await import('katex');\n const outputMode =\n config.forceLegacyMathML || (!isMathMLSupported() && config.legacyMathML)\n ? 'htmlAndMathml'\n : 'mathml';\n return text\n .split(lineBreakRegex)\n .map((line) =>\n hasKatex(line)\n ? `
${line}
`\n : `
${line}
`\n )\n .join('')\n .replace(katexRegex, (_, c) =>\n katex\n .renderToString(c, {\n throwOnError: true,\n displayMode: true,\n output: outputMode,\n })\n .replace(/\\n/g, ' ')\n .replace(//g, '')\n );\n};\n\nexport default {\n getRows,\n sanitizeText,\n sanitizeTextOrArray,\n hasBreaks,\n splitBreaks,\n lineBreakRegex,\n removeScript,\n getUrl,\n evaluate,\n getMax,\n getMin,\n};\n", "import { log } from './logger.js';\n\n/**\n * Applies d3 attributes\n *\n * @param {any} d3Elem D3 Element to apply the attributes onto\n * @param {[string, string][]} attrs Object.keys equivalent format of key to value mapping of attributes\n */\nconst d3Attrs = function (d3Elem, attrs) {\n for (let attr of attrs) {\n d3Elem.attr(attr[0], attr[1]);\n }\n};\n\n/**\n * Gives attributes for an SVG's size given arguments\n *\n * @param {number} height The height of the SVG\n * @param {number} width The width of the SVG\n * @param {boolean} useMaxWidth Whether or not to use max-width and set width to 100%\n * @returns {Map<'height' | 'width' | 'style', string>} Attributes for the SVG\n */\nexport const calculateSvgSizeAttrs = function (height, width, useMaxWidth) {\n let attrs = new Map();\n if (useMaxWidth) {\n attrs.set('width', '100%');\n attrs.set('style', `max-width: ${width}px;`);\n } else {\n attrs.set('height', height);\n attrs.set('width', width);\n }\n return attrs;\n};\n\n/**\n * Applies attributes from `calculateSvgSizeAttrs`\n *\n * @param {import('./diagram-api/types.js').SVG} svgElem The SVG Element to configure\n * @param {number} height The height of the SVG\n * @param {number} width The width of the SVG\n * @param {boolean} useMaxWidth Whether or not to use max-width and set width to 100%\n */\nexport const configureSvgSize = function (svgElem, height, width, useMaxWidth) {\n const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth);\n d3Attrs(svgElem, attrs);\n};\n\n// TODO v11: Remove the graph parameter. It is not used.\nexport const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth) {\n const svgBounds = svgElem.node().getBBox();\n const sWidth = svgBounds.width;\n const sHeight = svgBounds.height;\n\n log.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds);\n\n let width = 0;\n let height = 0;\n log.info(`Graph bounds: ${width}x${height}`, graph);\n\n width = sWidth + padding * 2;\n height = sHeight + padding * 2;\n\n log.info(`Calculated bounds: ${width}x${height}`);\n configureSvgSize(svgElem, height, width, useMaxWidth);\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${\n svgBounds.width + 2 * padding\n } ${svgBounds.height + 2 * padding}`;\n\n svgElem.attr('viewBox', vBox);\n};\n", "import type { FlowChartStyleOptions } from './diagrams/flowchart/styles.js';\nimport { log } from './logger.js';\nimport type { DiagramStylesProvider } from './diagram-api/types.js';\n\nconst themes: Record = {};\n\nconst getStyles = (\n type: string,\n userStyles: string,\n options: {\n fontFamily: string;\n fontSize: string;\n textColor: string;\n errorBkgColor: string;\n errorTextColor: string;\n lineColor: string;\n } & FlowChartStyleOptions\n) => {\n let diagramStyles = '';\n if (type in themes && themes[type]) {\n diagramStyles = themes[type](options);\n } else {\n log.warn(`No theme found for ${type}`);\n }\n return ` & {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n fill: ${options.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${options.errorBkgColor};\n }\n & .error-text {\n fill: ${options.errorTextColor};\n stroke: ${options.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${options.lineColor};\n stroke: ${options.lineColor};\n }\n & .marker.cross {\n stroke: ${options.lineColor};\n }\n\n & svg {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${diagramStyles}\n\n ${userStyles}\n`;\n};\n\nexport const addStylesForDiagram = (type: string, diagramTheme?: DiagramStylesProvider): void => {\n if (diagramTheme !== undefined) {\n themes[type] = diagramTheme;\n }\n};\n\nexport default getStyles;\n", "import { sanitizeText as _sanitizeText } from './common.js';\nimport { getConfig } from '../../config.js';\n\nlet accTitle = '';\nlet diagramTitle = '';\nlet accDescription = '';\n\nconst sanitizeText = (txt: string): string => _sanitizeText(txt, getConfig());\n\nexport const clear = (): void => {\n accTitle = '';\n accDescription = '';\n diagramTitle = '';\n};\n\nexport const setAccTitle = (txt: string): void => {\n accTitle = sanitizeText(txt).replace(/^\\s+/g, '');\n};\n\nexport const getAccTitle = (): string => accTitle;\n\nexport const setAccDescription = (txt: string): void => {\n accDescription = sanitizeText(txt).replace(/\\n\\s+/g, '\\n');\n};\n\nexport const getAccDescription = (): string => accDescription;\n\nexport const setDiagramTitle = (txt: string): void => {\n diagramTitle = sanitizeText(txt);\n};\n\nexport const getDiagramTitle = (): string => diagramTitle;\n", "import { addDetector } from './detectType.js';\nimport { log as _log, setLogLevel as _setLogLevel } from '../logger.js';\nimport {\n getConfig as _getConfig,\n setConfig as _setConfig,\n defaultConfig as _defaultConfig,\n setSiteConfig as _setSiteConfig,\n} from '../config.js';\nimport { sanitizeText as _sanitizeText } from '../diagrams/common/common.js';\nimport { setupGraphViewbox as _setupGraphViewbox } from '../setupGraphViewbox.js';\nimport { addStylesForDiagram } from '../styles.js';\nimport type { DiagramDefinition, DiagramDetector } from './types.js';\nimport * as _commonDb from '../diagrams/common/commonDb.js';\n\n/*\n Packaging and exposing resources for external diagrams so that they can import\n diagramAPI and have access to select parts of mermaid common code required to\n create diagrams working like the internal diagrams.\n*/\nexport const log = _log;\nexport const setLogLevel = _setLogLevel;\nexport const getConfig = _getConfig;\nexport const setConfig = _setConfig;\nexport const defaultConfig = _defaultConfig;\nexport const setSiteConfig = _setSiteConfig;\nexport const sanitizeText = (text: string) => _sanitizeText(text, getConfig());\nexport const setupGraphViewbox = _setupGraphViewbox;\nexport const getCommonDb = () => {\n return _commonDb;\n};\n\nconst diagrams: Record = {};\nexport type Detectors = Record;\n\n/**\n * Registers the given diagram with Mermaid.\n *\n * Can be used for third-party custom diagrams.\n *\n * @param id - A unique ID for the given diagram.\n * @param diagram - The diagram definition.\n * @param detector - Function that returns `true` if a given mermaid text is this diagram definition.\n */\nexport const registerDiagram = (\n id: string,\n diagram: DiagramDefinition,\n detector?: DiagramDetector\n) => {\n if (diagrams[id]) {\n log.warn(`Diagram with id ${id} already registered. Overwriting.`);\n }\n diagrams[id] = diagram;\n if (detector) {\n addDetector(id, detector);\n }\n addStylesForDiagram(id, diagram.styles);\n\n diagram.injectUtils?.(\n log,\n setLogLevel,\n getConfig,\n sanitizeText,\n setupGraphViewbox,\n getCommonDb(),\n () => {\n // parseDirective is removed in https://github.com/mermaid-js/mermaid/pull/4759.\n // This is a no-op for legacy support.\n }\n );\n};\n\nexport const getDiagram = (name: string): DiagramDefinition => {\n if (name in diagrams) {\n return diagrams[name];\n }\n throw new DiagramNotFoundError(name);\n};\n\nexport class DiagramNotFoundError extends Error {\n constructor(name: string) {\n super(`Diagram ${name} not found.`);\n }\n}\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { sanitizeText } from '../common/common.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n} from '../common/commonDb.js';\n\nlet c4ShapeArray = [];\nlet boundaryParseStack = [''];\nlet currentBoundaryParse = 'global';\nlet parentBoundaryParse = '';\nlet boundaries = [\n {\n alias: 'global',\n label: { text: 'global' },\n type: { text: 'global' },\n tags: null,\n link: null,\n parentBoundary: '',\n },\n];\nlet rels = [];\nlet title = '';\nlet wrapEnabled = false;\nlet c4ShapeInRow = 4;\nlet c4BoundaryInRow = 2;\nvar c4Type;\n\nexport const getC4Type = function () {\n return c4Type;\n};\n\nexport const setC4Type = function (c4TypeParam) {\n let sanitizedText = sanitizeText(c4TypeParam, getConfig());\n c4Type = sanitizedText;\n};\n\n//type, from, to, label, ?techn, ?descr, ?sprite, ?tags, $link\nexport const addRel = function (type, from, to, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (\n type === undefined ||\n type === null ||\n from === undefined ||\n from === null ||\n to === undefined ||\n to === null ||\n label === undefined ||\n label === null\n ) {\n return;\n }\n\n let rel = {};\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old) {\n rel = old;\n } else {\n rels.push(rel);\n }\n\n rel.type = type;\n rel.from = from;\n rel.to = to;\n rel.label = { text: label };\n\n if (techn === undefined || techn === null) {\n rel.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n rel[key] = { text: value };\n } else {\n rel.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n rel.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n rel[key] = { text: value };\n } else {\n rel.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n rel[key] = value;\n } else {\n rel.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n rel[key] = value;\n } else {\n rel.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n rel[key] = value;\n } else {\n rel.link = link;\n }\n rel.wrap = autoWrap();\n};\n\n//type, alias, label, ?descr, ?sprite, ?tags, $link\nexport const addPersonOrSystem = function (typeC4Shape, alias, label, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let personOrSystem = {};\n const old = c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n if (old && alias === old.alias) {\n personOrSystem = old;\n } else {\n personOrSystem.alias = alias;\n c4ShapeArray.push(personOrSystem);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n personOrSystem.label = { text: '' };\n } else {\n personOrSystem.label = { text: label };\n }\n\n if (descr === undefined || descr === null) {\n personOrSystem.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n personOrSystem[key] = { text: value };\n } else {\n personOrSystem.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.link = link;\n }\n personOrSystem.typeC4Shape = { text: typeC4Shape };\n personOrSystem.parentBoundary = currentBoundaryParse;\n personOrSystem.wrap = autoWrap();\n};\n\n//type, alias, label, ?techn, ?descr ?sprite, ?tags, $link\nexport const addContainer = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let container = {};\n const old = c4ShapeArray.find((container) => container.alias === alias);\n if (old && alias === old.alias) {\n container = old;\n } else {\n container.alias = alias;\n c4ShapeArray.push(container);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n container.label = { text: '' };\n } else {\n container.label = { text: label };\n }\n\n if (techn === undefined || techn === null) {\n container.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n container[key] = { text: value };\n } else {\n container.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n container.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n container[key] = { text: value };\n } else {\n container.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n container[key] = value;\n } else {\n container.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n container[key] = value;\n } else {\n container.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n container[key] = value;\n } else {\n container.link = link;\n }\n container.wrap = autoWrap();\n container.typeC4Shape = { text: typeC4Shape };\n container.parentBoundary = currentBoundaryParse;\n};\n\n//type, alias, label, ?techn, ?descr ?sprite, ?tags, $link\nexport const addComponent = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let component = {};\n const old = c4ShapeArray.find((component) => component.alias === alias);\n if (old && alias === old.alias) {\n component = old;\n } else {\n component.alias = alias;\n c4ShapeArray.push(component);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n component.label = { text: '' };\n } else {\n component.label = { text: label };\n }\n\n if (techn === undefined || techn === null) {\n component.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n component[key] = { text: value };\n } else {\n component.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n component.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n component[key] = { text: value };\n } else {\n component.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n component[key] = value;\n } else {\n component.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n component[key] = value;\n } else {\n component.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n component[key] = value;\n } else {\n component.link = link;\n }\n component.wrap = autoWrap();\n component.typeC4Shape = { text: typeC4Shape };\n component.parentBoundary = currentBoundaryParse;\n};\n\n//alias, label, ?type, ?tags, $link\nexport const addPersonOrSystemBoundary = function (alias, label, type, tags, link) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let boundary = {};\n const old = boundaries.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundaries.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'system' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//alias, label, ?type, ?tags, $link\nexport const addContainerBoundary = function (alias, label, type, tags, link) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let boundary = {};\n const old = boundaries.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundaries.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'container' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//alias, label, ?type, ?descr, ?sprite, ?tags, $link\nexport const addDeploymentNode = function (\n nodeType,\n alias,\n label,\n type,\n descr,\n sprite,\n tags,\n link\n) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let boundary = {};\n const old = boundaries.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundaries.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'node' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (descr === undefined || descr === null) {\n boundary.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n boundary[key] = { text: value };\n } else {\n boundary.descr = { text: descr };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.nodeType = nodeType;\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\nexport const popBoundaryParseStack = function () {\n currentBoundaryParse = parentBoundaryParse;\n boundaryParseStack.pop();\n parentBoundaryParse = boundaryParseStack.pop();\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite\nexport const updateElStyle = function (\n typeC4Shape,\n elementName,\n bgColor,\n fontColor,\n borderColor,\n shadowing,\n shape,\n sprite,\n techn,\n legendText,\n legendSprite\n) {\n let old = c4ShapeArray.find((element) => element.alias === elementName);\n if (old === undefined) {\n old = boundaries.find((element) => element.alias === elementName);\n if (old === undefined) {\n return;\n }\n }\n if (bgColor !== undefined && bgColor !== null) {\n if (typeof bgColor === 'object') {\n let [key, value] = Object.entries(bgColor)[0];\n old[key] = value;\n } else {\n old.bgColor = bgColor;\n }\n }\n if (fontColor !== undefined && fontColor !== null) {\n if (typeof fontColor === 'object') {\n let [key, value] = Object.entries(fontColor)[0];\n old[key] = value;\n } else {\n old.fontColor = fontColor;\n }\n }\n if (borderColor !== undefined && borderColor !== null) {\n if (typeof borderColor === 'object') {\n let [key, value] = Object.entries(borderColor)[0];\n old[key] = value;\n } else {\n old.borderColor = borderColor;\n }\n }\n if (shadowing !== undefined && shadowing !== null) {\n if (typeof shadowing === 'object') {\n let [key, value] = Object.entries(shadowing)[0];\n old[key] = value;\n } else {\n old.shadowing = shadowing;\n }\n }\n if (shape !== undefined && shape !== null) {\n if (typeof shape === 'object') {\n let [key, value] = Object.entries(shape)[0];\n old[key] = value;\n } else {\n old.shape = shape;\n }\n }\n if (sprite !== undefined && sprite !== null) {\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n old[key] = value;\n } else {\n old.sprite = sprite;\n }\n }\n if (techn !== undefined && techn !== null) {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n old[key] = value;\n } else {\n old.techn = techn;\n }\n }\n if (legendText !== undefined && legendText !== null) {\n if (typeof legendText === 'object') {\n let [key, value] = Object.entries(legendText)[0];\n old[key] = value;\n } else {\n old.legendText = legendText;\n }\n }\n if (legendSprite !== undefined && legendSprite !== null) {\n if (typeof legendSprite === 'object') {\n let [key, value] = Object.entries(legendSprite)[0];\n old[key] = value;\n } else {\n old.legendSprite = legendSprite;\n }\n }\n};\n\n//textColor, lineColor, ?offsetX, ?offsetY\nexport const updateRelStyle = function (\n typeC4Shape,\n from,\n to,\n textColor,\n lineColor,\n offsetX,\n offsetY\n) {\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old === undefined) {\n return;\n }\n if (textColor !== undefined && textColor !== null) {\n if (typeof textColor === 'object') {\n let [key, value] = Object.entries(textColor)[0];\n old[key] = value;\n } else {\n old.textColor = textColor;\n }\n }\n if (lineColor !== undefined && lineColor !== null) {\n if (typeof lineColor === 'object') {\n let [key, value] = Object.entries(lineColor)[0];\n old[key] = value;\n } else {\n old.lineColor = lineColor;\n }\n }\n if (offsetX !== undefined && offsetX !== null) {\n if (typeof offsetX === 'object') {\n let [key, value] = Object.entries(offsetX)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetX = parseInt(offsetX);\n }\n }\n if (offsetY !== undefined && offsetY !== null) {\n if (typeof offsetY === 'object') {\n let [key, value] = Object.entries(offsetY)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetY = parseInt(offsetY);\n }\n }\n};\n\n//?c4ShapeInRow, ?c4BoundaryInRow\nexport const updateLayoutConfig = function (typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {\n let c4ShapeInRowValue = c4ShapeInRow;\n let c4BoundaryInRowValue = c4BoundaryInRow;\n\n if (typeof c4ShapeInRowParam === 'object') {\n const value = Object.values(c4ShapeInRowParam)[0];\n c4ShapeInRowValue = parseInt(value);\n } else {\n c4ShapeInRowValue = parseInt(c4ShapeInRowParam);\n }\n if (typeof c4BoundaryInRowParam === 'object') {\n const value = Object.values(c4BoundaryInRowParam)[0];\n c4BoundaryInRowValue = parseInt(value);\n } else {\n c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);\n }\n\n if (c4ShapeInRowValue >= 1) {\n c4ShapeInRow = c4ShapeInRowValue;\n }\n if (c4BoundaryInRowValue >= 1) {\n c4BoundaryInRow = c4BoundaryInRowValue;\n }\n};\n\nexport const getC4ShapeInRow = function () {\n return c4ShapeInRow;\n};\nexport const getC4BoundaryInRow = function () {\n return c4BoundaryInRow;\n};\nexport const getCurrentBoundaryParse = function () {\n return currentBoundaryParse;\n};\n\nexport const getParentBoundaryParse = function () {\n return parentBoundaryParse;\n};\n\nexport const getC4ShapeArray = function (parentBoundary) {\n if (parentBoundary === undefined || parentBoundary === null) {\n return c4ShapeArray;\n } else {\n return c4ShapeArray.filter((personOrSystem) => {\n return personOrSystem.parentBoundary === parentBoundary;\n });\n }\n};\nexport const getC4Shape = function (alias) {\n return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n};\nexport const getC4ShapeKeys = function (parentBoundary) {\n return Object.keys(getC4ShapeArray(parentBoundary));\n};\n\nexport const getBoundaries = function (parentBoundary) {\n if (parentBoundary === undefined || parentBoundary === null) {\n return boundaries;\n } else {\n return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary);\n }\n};\n\n/**\n * @deprecated Use {@link getBoundaries} instead\n */\nexport const getBoundarys = getBoundaries;\n\nexport const getRels = function () {\n return rels;\n};\n\nexport const getTitle = function () {\n return title;\n};\n\nexport const setWrap = function (wrapSetting) {\n wrapEnabled = wrapSetting;\n};\n\nexport const autoWrap = function () {\n return wrapEnabled;\n};\n\nexport const clear = function () {\n c4ShapeArray = [];\n boundaries = [\n {\n alias: 'global',\n label: { text: 'global' },\n type: { text: 'global' },\n tags: null,\n link: null,\n parentBoundary: '',\n },\n ];\n parentBoundaryParse = '';\n currentBoundaryParse = 'global';\n boundaryParseStack = [''];\n rels = [];\n\n boundaryParseStack = [''];\n title = '';\n wrapEnabled = false;\n c4ShapeInRow = 4;\n c4BoundaryInRow = 2;\n};\n\nexport const LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25,\n};\n\nexport const ARROWTYPE = {\n FILLED: 0,\n OPEN: 1,\n};\n\nexport const PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2,\n};\n\nexport const setTitle = function (txt) {\n let sanitizedText = sanitizeText(txt, getConfig());\n title = sanitizedText;\n};\n\nexport default {\n addPersonOrSystem,\n addPersonOrSystemBoundary,\n addContainer,\n addContainerBoundary,\n addComponent,\n addDeploymentNode,\n popBoundaryParseStack,\n addRel,\n updateElStyle,\n updateRelStyle,\n updateLayoutConfig,\n autoWrap,\n setWrap,\n getC4ShapeArray,\n getC4Shape,\n getC4ShapeKeys,\n getBoundaries,\n getBoundarys,\n getCurrentBoundaryParse,\n getParentBoundaryParse,\n getRels,\n getTitle,\n getC4Type,\n getC4ShapeInRow,\n getC4BoundaryInRow,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n getConfig: () => getConfig().c4,\n clear,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n setTitle,\n setC4Type,\n // apply,\n};\n", "export default function ascending(a, b) {\n return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function descending(a, b) {\n return a == null || b == null ? NaN\n : b < a ? -1\n : b > a ? 1\n : b >= a ? 0\n : NaN;\n}\n", "import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n let compare1, compare2, delta;\n\n // If an accessor is specified, promote it to a comparator. In this case we\n // can test whether the search value is (self-) comparable. We can\u2019t do this\n // for a comparator (except for specific, known comparators) because we can\u2019t\n // tell if the comparator is symmetric, and an asymmetric comparator can\u2019t be\n // used to test whether a single value is comparable.\n if (f.length !== 2) {\n compare1 = ascending;\n compare2 = (d, x) => ascending(f(d), x);\n delta = (d, x) => f(d) - x;\n } else {\n compare1 = f === ascending || f === descending ? f : zero;\n compare2 = f;\n delta = f;\n }\n\n function left(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function right(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) <= 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function center(a, x, lo = 0, hi = a.length) {\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction zero() {\n return 0;\n}\n", "export default function number(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n", "import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n", "export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n", "const e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n const step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log10(step)),\n error = step / Math.pow(10, power),\n factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n let i1, i2, inc;\n if (power < 0) {\n inc = Math.pow(10, -power) / factor;\n i1 = Math.round(start * inc);\n i2 = Math.round(stop * inc);\n if (i1 / inc < start) ++i1;\n if (i2 / inc > stop) --i2;\n inc = -inc;\n } else {\n inc = Math.pow(10, power) * factor;\n i1 = Math.round(start / inc);\n i2 = Math.round(stop / inc);\n if (i1 * inc < start) ++i1;\n if (i2 * inc > stop) --i2;\n }\n if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n if (!(count > 0)) return [];\n if (start === stop) return [start];\n const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n if (!(i2 >= i1)) return [];\n const n = i2 - i1 + 1, ticks = new Array(n);\n if (reverse) {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n } else {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n }\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n", "export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n", "export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n", "export default function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n", "export {default as bisect, bisectRight, bisectLeft, bisectCenter} from \"./bisect.js\";\nexport {default as ascending} from \"./ascending.js\";\nexport {default as bisector} from \"./bisector.js\";\nexport {blur, blur2, blurImage} from \"./blur.js\";\nexport {default as count} from \"./count.js\";\nexport {default as cross} from \"./cross.js\";\nexport {default as cumsum} from \"./cumsum.js\";\nexport {default as descending} from \"./descending.js\";\nexport {default as deviation} from \"./deviation.js\";\nexport {default as extent} from \"./extent.js\";\nexport {Adder, fsum, fcumsum} from \"./fsum.js\";\nexport {default as group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups} from \"./group.js\";\nexport {default as groupSort} from \"./groupSort.js\";\nexport {default as bin, default as histogram} from \"./bin.js\"; // Deprecated; use bin.\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis.js\";\nexport {default as thresholdScott} from \"./threshold/scott.js\";\nexport {default as thresholdSturges} from \"./threshold/sturges.js\";\nexport {default as max} from \"./max.js\";\nexport {default as maxIndex} from \"./maxIndex.js\";\nexport {default as mean} from \"./mean.js\";\nexport {default as median, medianIndex} from \"./median.js\";\nexport {default as merge} from \"./merge.js\";\nexport {default as min} from \"./min.js\";\nexport {default as minIndex} from \"./minIndex.js\";\nexport {default as mode} from \"./mode.js\";\nexport {default as nice} from \"./nice.js\";\nexport {default as pairs} from \"./pairs.js\";\nexport {default as permute} from \"./permute.js\";\nexport {default as quantile, quantileIndex, quantileSorted} from \"./quantile.js\";\nexport {default as quickselect} from \"./quickselect.js\";\nexport {default as range} from \"./range.js\";\nexport {default as rank} from \"./rank.js\";\nexport {default as least} from \"./least.js\";\nexport {default as leastIndex} from \"./leastIndex.js\";\nexport {default as greatest} from \"./greatest.js\";\nexport {default as greatestIndex} from \"./greatestIndex.js\";\nexport {default as scan} from \"./scan.js\"; // Deprecated; use leastIndex.\nexport {default as shuffle, shuffler} from \"./shuffle.js\";\nexport {default as sum} from \"./sum.js\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks.js\";\nexport {default as transpose} from \"./transpose.js\";\nexport {default as variance} from \"./variance.js\";\nexport {default as zip} from \"./zip.js\";\nexport {default as every} from \"./every.js\";\nexport {default as some} from \"./some.js\";\nexport {default as filter} from \"./filter.js\";\nexport {default as map} from \"./map.js\";\nexport {default as reduce} from \"./reduce.js\";\nexport {default as reverse} from \"./reverse.js\";\nexport {default as sort} from \"./sort.js\";\nexport {default as difference} from \"./difference.js\";\nexport {default as disjoint} from \"./disjoint.js\";\nexport {default as intersection} from \"./intersection.js\";\nexport {default as subset} from \"./subset.js\";\nexport {default as superset} from \"./superset.js\";\nexport {default as union} from \"./union.js\";\nexport {InternMap, InternSet} from \"internmap\";\n", "export default function(x) {\n return x;\n}\n", "import identity from \"./identity.js\";\n\nvar top = 1,\n right = 2,\n bottom = 3,\n left = 4,\n epsilon = 1e-6;\n\nfunction translateX(x) {\n return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n if (scale.round()) offset = Math.round(offset);\n return d => +scale(d) + offset;\n}\n\nfunction entering() {\n return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n var tickArguments = [],\n tickValues = null,\n tickFormat = null,\n tickSizeInner = 6,\n tickSizeOuter = 6,\n tickPadding = 3,\n offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n k = orient === top || orient === left ? -1 : 1,\n x = orient === left || orient === right ? \"x\" : \"y\",\n transform = orient === top || orient === bottom ? translateX : translateY;\n\n function axis(context) {\n var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n spacing = Math.max(tickSizeInner, 0) + tickPadding,\n range = scale.range(),\n range0 = +range[0] + offset,\n range1 = +range[range.length - 1] + offset,\n position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n selection = context.selection ? context.selection() : context,\n path = selection.selectAll(\".domain\").data([null]),\n tick = selection.selectAll(\".tick\").data(values, scale).order(),\n tickExit = tick.exit(),\n tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n line = tick.select(\"line\"),\n text = tick.select(\"text\");\n\n path = path.merge(path.enter().insert(\"path\", \".tick\")\n .attr(\"class\", \"domain\")\n .attr(\"stroke\", \"currentColor\"));\n\n tick = tick.merge(tickEnter);\n\n line = line.merge(tickEnter.append(\"line\")\n .attr(\"stroke\", \"currentColor\")\n .attr(x + \"2\", k * tickSizeInner));\n\n text = text.merge(tickEnter.append(\"text\")\n .attr(\"fill\", \"currentColor\")\n .attr(x, k * spacing)\n .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n if (context !== selection) {\n path = path.transition(context);\n tick = tick.transition(context);\n line = line.transition(context);\n text = text.transition(context);\n\n tickExit = tickExit.transition(context)\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n tickEnter\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n }\n\n tickExit.remove();\n\n path\n .attr(\"d\", orient === left || orient === right\n ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n tick\n .attr(\"opacity\", 1)\n .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n line\n .attr(x + \"2\", k * tickSizeInner);\n\n text\n .attr(x, k * spacing)\n .text(format);\n\n selection.filter(entering)\n .attr(\"fill\", \"none\")\n .attr(\"font-size\", 10)\n .attr(\"font-family\", \"sans-serif\")\n .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n selection\n .each(function() { this.__axis = position; });\n }\n\n axis.scale = function(_) {\n return arguments.length ? (scale = _, axis) : scale;\n };\n\n axis.ticks = function() {\n return tickArguments = Array.from(arguments), axis;\n };\n\n axis.tickArguments = function(_) {\n return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n };\n\n axis.tickValues = function(_) {\n return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n };\n\n axis.tickFormat = function(_) {\n return arguments.length ? (tickFormat = _, axis) : tickFormat;\n };\n\n axis.tickSize = function(_) {\n return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeInner = function(_) {\n return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeOuter = function(_) {\n return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n };\n\n axis.tickPadding = function(_) {\n return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n };\n\n axis.offset = function(_) {\n return arguments.length ? (offset = +_, axis) : offset;\n };\n\n return axis;\n}\n\nexport function axisTop(scale) {\n return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n return axis(left, scale);\n}\n", "export {\n axisTop,\n axisRight,\n axisBottom,\n axisLeft\n} from \"./axis.js\";\n", "var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n", "export {default as dispatch} from \"./dispatch.js\";\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n", "import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n", "import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n", "// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don\u2019t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n", "function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n", "import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n", "import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n return new Array(update.length);\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n return function() {\n return x;\n };\n}\n", "import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don\u2019t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn\u2019t worried about \u201Clive\u201D collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don\u2019t; we\u2019d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n", "export default function() {\n return Array.from(this);\n}\n", "export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n", "export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n", "export default function() {\n return !this.node();\n}\n", "export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n", "import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n", "function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n", "function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n", "function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n", "function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n", "function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n", "import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n", "import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n", "function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n", "function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n", "function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n", "import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n", "export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n", "import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n", "export {default as create} from \"./create.js\";\nexport {default as creator} from \"./creator.js\";\nexport {default as local} from \"./local.js\";\nexport {default as matcher} from \"./matcher.js\";\nexport {default as namespace} from \"./namespace.js\";\nexport {default as namespaces} from \"./namespaces.js\";\nexport {default as pointer} from \"./pointer.js\";\nexport {default as pointers} from \"./pointers.js\";\nexport {default as select} from \"./select.js\";\nexport {default as selectAll} from \"./selectAll.js\";\nexport {default as selection} from \"./selection/index.js\";\nexport {default as selector} from \"./selector.js\";\nexport {default as selectorAll} from \"./selectorAll.js\";\nexport {styleValue as style} from \"./selection/style.js\";\nexport {default as window} from \"./window.js\";\n", "export {default as drag} from \"./drag.js\";\nexport {default as dragDisable, yesdrag as dragEnable} from \"./nodrag.js\";\n", "export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n", "import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n", "export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n brighter(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * degrees;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * radians;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb() {\n return hcl2lab(this).rgb();\n }\n}));\n", "export {default as color, rgb, hsl} from \"./color.js\";\nexport {default as lab, hcl, lch, gray} from \"./lab.js\";\nexport {default as cubehelix} from \"./cubehelix.js\";\n", "export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n", "export default x => () => x;\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n", "export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n", "export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n", "export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n", "var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n", "import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n", "import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n", "import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n", "export {default as interpolate} from \"./value.js\";\nexport {default as interpolateArray} from \"./array.js\";\nexport {default as interpolateBasis} from \"./basis.js\";\nexport {default as interpolateBasisClosed} from \"./basisClosed.js\";\nexport {default as interpolateDate} from \"./date.js\";\nexport {default as interpolateDiscrete} from \"./discrete.js\";\nexport {default as interpolateHue} from \"./hue.js\";\nexport {default as interpolateNumber} from \"./number.js\";\nexport {default as interpolateNumberArray} from \"./numberArray.js\";\nexport {default as interpolateObject} from \"./object.js\";\nexport {default as interpolateRound} from \"./round.js\";\nexport {default as interpolateString} from \"./string.js\";\nexport {interpolateTransformCss, interpolateTransformSvg} from \"./transform/index.js\";\nexport {default as interpolateZoom} from \"./zoom.js\";\nexport {default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed} from \"./rgb.js\";\nexport {default as interpolateHsl, hslLong as interpolateHslLong} from \"./hsl.js\";\nexport {default as interpolateLab} from \"./lab.js\";\nexport {default as interpolateHcl, hclLong as interpolateHclLong} from \"./hcl.js\";\nexport {default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong} from \"./cubehelix.js\";\nexport {default as piecewise} from \"./piecewise.js\";\nexport {default as quantize} from \"./quantize.js\";\n", "var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we\u2019ve set an alarm, if we haven\u2019t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n", "import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n", "export {\n now,\n timer,\n timerFlush\n} from \"./timer.js\";\n\nexport {\n default as timeout\n} from \"./timeout.js\";\n\nexport {\n default as interval\n} from \"./interval.js\";\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n", "import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n", "import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we\u2019re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we\u2019re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n", "import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n", "import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n", "import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n", "import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n", "import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n", "import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n", "import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n", "import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we\u2019re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n", "function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n", "import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n", "import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n", "import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we\u2019re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n", "function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n", "import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n", "function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n", "import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n", "import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we\u2019re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n", "import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n", "export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n", "export {\n linear as easeLinear\n} from \"./linear.js\";\n\nexport {\n quadInOut as easeQuad,\n quadIn as easeQuadIn,\n quadOut as easeQuadOut,\n quadInOut as easeQuadInOut\n} from \"./quad.js\";\n\nexport {\n cubicInOut as easeCubic,\n cubicIn as easeCubicIn,\n cubicOut as easeCubicOut,\n cubicInOut as easeCubicInOut\n} from \"./cubic.js\";\n\nexport {\n polyInOut as easePoly,\n polyIn as easePolyIn,\n polyOut as easePolyOut,\n polyInOut as easePolyInOut\n} from \"./poly.js\";\n\nexport {\n sinInOut as easeSin,\n sinIn as easeSinIn,\n sinOut as easeSinOut,\n sinInOut as easeSinInOut\n} from \"./sin.js\";\n\nexport {\n expInOut as easeExp,\n expIn as easeExpIn,\n expOut as easeExpOut,\n expInOut as easeExpInOut\n} from \"./exp.js\";\n\nexport {\n circleInOut as easeCircle,\n circleIn as easeCircleIn,\n circleOut as easeCircleOut,\n circleInOut as easeCircleInOut\n} from \"./circle.js\";\n\nexport {\n bounceOut as easeBounce,\n bounceIn as easeBounceIn,\n bounceOut as easeBounceOut,\n bounceInOut as easeBounceInOut\n} from \"./bounce.js\";\n\nexport {\n backInOut as easeBack,\n backIn as easeBackIn,\n backOut as easeBackOut,\n backInOut as easeBackInOut\n} from \"./back.js\";\n\nexport {\n elasticOut as easeElastic,\n elasticIn as easeElasticIn,\n elasticOut as easeElasticOut,\n elasticInOut as easeElasticInOut\n} from \"./elastic.js\";\n", "import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n", "import \"./selection/index.js\";\nexport {default as transition} from \"./transition/index.js\";\nexport {default as active} from \"./active.js\";\nexport {default as interrupt} from \"./interrupt.js\";\n", "export default x => () => x;\n", "export default function BrushEvent(type, {\n sourceEvent,\n target,\n selection,\n mode,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n selection: {value: selection, enumerable: true, configurable: true},\n mode: {value: mode, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n", "export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n MODE_SPACE = {name: \"space\"},\n MODE_HANDLE = {name: \"handle\"},\n MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n name: \"x\",\n handles: [\"w\", \"e\"].map(type),\n input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n name: \"y\",\n handles: [\"n\", \"s\"].map(type),\n input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n name: \"xy\",\n handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n input: function(xy) { return xy == null ? null : number2(xy); },\n output: function(xy) { return xy; }\n};\n\nvar cursors = {\n overlay: \"crosshair\",\n selection: \"move\",\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\n\nvar flipX = {\n e: \"w\",\n w: \"e\",\n nw: \"ne\",\n ne: \"nw\",\n se: \"sw\",\n sw: \"se\"\n};\n\nvar flipY = {\n n: \"s\",\n s: \"n\",\n nw: \"sw\",\n ne: \"se\",\n se: \"ne\",\n sw: \"nw\"\n};\n\nvar signsX = {\n overlay: +1,\n selection: +1,\n n: null,\n e: +1,\n s: null,\n w: -1,\n nw: -1,\n ne: +1,\n se: +1,\n sw: -1\n};\n\nvar signsY = {\n overlay: +1,\n selection: +1,\n n: -1,\n e: null,\n s: +1,\n w: null,\n nw: -1,\n ne: -1,\n se: +1,\n sw: +1\n};\n\nfunction type(t) {\n return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var svg = this.ownerSVGElement || this;\n if (svg.hasAttribute(\"viewBox\")) {\n svg = svg.viewBox.baseVal;\n return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n }\n return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name \u201C__brush\u201D rather than auto-generated.\nfunction local(node) {\n while (!node.__brush) if (!(node = node.parentNode)) return;\n return node.__brush;\n}\n\nfunction empty(extent) {\n return extent[0][0] === extent[1][0]\n || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n var state = node.__brush;\n return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n return brush(X);\n}\n\nexport function brushY() {\n return brush(Y);\n}\n\nexport default function() {\n return brush(XY);\n}\n\nfunction brush(dim) {\n var extent = defaultExtent,\n filter = defaultFilter,\n touchable = defaultTouchable,\n keys = true,\n listeners = dispatch(\"start\", \"brush\", \"end\"),\n handleSize = 6,\n touchending;\n\n function brush(group) {\n var overlay = group\n .property(\"__brush\", initialize)\n .selectAll(\".overlay\")\n .data([type(\"overlay\")]);\n\n overlay.enter().append(\"rect\")\n .attr(\"class\", \"overlay\")\n .attr(\"pointer-events\", \"all\")\n .attr(\"cursor\", cursors.overlay)\n .merge(overlay)\n .each(function() {\n var extent = local(this).extent;\n select(this)\n .attr(\"x\", extent[0][0])\n .attr(\"y\", extent[0][1])\n .attr(\"width\", extent[1][0] - extent[0][0])\n .attr(\"height\", extent[1][1] - extent[0][1]);\n });\n\n group.selectAll(\".selection\")\n .data([type(\"selection\")])\n .enter().append(\"rect\")\n .attr(\"class\", \"selection\")\n .attr(\"cursor\", cursors.selection)\n .attr(\"fill\", \"#777\")\n .attr(\"fill-opacity\", 0.3)\n .attr(\"stroke\", \"#fff\")\n .attr(\"shape-rendering\", \"crispEdges\");\n\n var handle = group.selectAll(\".handle\")\n .data(dim.handles, function(d) { return d.type; });\n\n handle.exit().remove();\n\n handle.enter().append(\"rect\")\n .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n group\n .each(redraw)\n .attr(\"fill\", \"none\")\n .attr(\"pointer-events\", \"all\")\n .on(\"mousedown.brush\", started)\n .filter(touchable)\n .on(\"touchstart.brush\", started)\n .on(\"touchmove.brush\", touchmoved)\n .on(\"touchend.brush touchcancel.brush\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n brush.move = function(group, selection, event) {\n if (group.tween) {\n group\n .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n .tween(\"brush\", function() {\n var that = this,\n state = that.__brush,\n emit = emitter(that, arguments),\n selection0 = state.selection,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n i = interpolate(selection0, selection1);\n\n function tween(t) {\n state.selection = t === 1 && selection1 === null ? null : i(t);\n redraw.call(that);\n emit.brush();\n }\n\n return selection0 !== null && selection1 !== null ? tween : tween(1);\n });\n } else {\n group\n .each(function() {\n var that = this,\n args = arguments,\n state = that.__brush,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n emit = emitter(that, args).beforestart();\n\n interrupt(that);\n state.selection = selection1 === null ? null : selection1;\n redraw.call(that);\n emit.start(event).brush(event).end(event);\n });\n }\n };\n\n brush.clear = function(group, event) {\n brush.move(group, null, event);\n };\n\n function redraw() {\n var group = select(this),\n selection = local(this).selection;\n\n if (selection) {\n group.selectAll(\".selection\")\n .style(\"display\", null)\n .attr(\"x\", selection[0][0])\n .attr(\"y\", selection[0][1])\n .attr(\"width\", selection[1][0] - selection[0][0])\n .attr(\"height\", selection[1][1] - selection[0][1]);\n\n group.selectAll(\".handle\")\n .style(\"display\", null)\n .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n }\n\n else {\n group.selectAll(\".selection,.handle\")\n .style(\"display\", \"none\")\n .attr(\"x\", null)\n .attr(\"y\", null)\n .attr(\"width\", null)\n .attr(\"height\", null);\n }\n }\n\n function emitter(that, args, clean) {\n var emit = that.__brush.emitter;\n return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n }\n\n function Emitter(that, args, clean) {\n this.that = that;\n this.args = args;\n this.state = that.__brush;\n this.active = 0;\n this.clean = clean;\n }\n\n Emitter.prototype = {\n beforestart: function() {\n if (++this.active === 1) this.state.emitter = this, this.starting = true;\n return this;\n },\n start: function(event, mode) {\n if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n else this.emit(\"brush\", event);\n return this;\n },\n brush: function(event, mode) {\n this.emit(\"brush\", event, mode);\n return this;\n },\n end: function(event, mode) {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n return this;\n },\n emit: function(type, event, mode) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new BrushEvent(type, {\n sourceEvent: event,\n target: brush,\n selection: dim.output(this.state.selection),\n mode,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function started(event) {\n if (touchending && !event.touches) return;\n if (!filter.apply(this, arguments)) return;\n\n var that = this,\n type = event.target.__data__.type,\n mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n signX = dim === Y ? null : signsX[type],\n signY = dim === X ? null : signsY[type],\n state = local(that),\n extent = state.extent,\n selection = state.selection,\n W = extent[0][0], w0, w1,\n N = extent[0][1], n0, n1,\n E = extent[1][0], e0, e1,\n S = extent[1][1], s0, s1,\n dx = 0,\n dy = 0,\n moving,\n shifting = signX && signY && keys && event.shiftKey,\n lockX,\n lockY,\n points = Array.from(event.touches || [event], t => {\n const i = t.identifier;\n t = pointer(t, that);\n t.point0 = t.slice();\n t.identifier = i;\n return t;\n });\n\n interrupt(that);\n var emit = emitter(that, arguments, true).beforestart();\n\n if (type === \"overlay\") {\n if (selection) moving = true;\n const pts = [points[0], points[1] || points[0]];\n state.selection = selection = [[\n w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n ], [\n e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n ]];\n if (points.length > 1) move(event);\n } else {\n w0 = selection[0][0];\n n0 = selection[0][1];\n e0 = selection[1][0];\n s0 = selection[1][1];\n }\n\n w1 = w0;\n n1 = n0;\n e1 = e0;\n s1 = s0;\n\n var group = select(that)\n .attr(\"pointer-events\", \"none\");\n\n var overlay = group.selectAll(\".overlay\")\n .attr(\"cursor\", cursors[type]);\n\n if (event.touches) {\n emit.moved = moved;\n emit.ended = ended;\n } else {\n var view = select(event.view)\n .on(\"mousemove.brush\", moved, true)\n .on(\"mouseup.brush\", ended, true);\n if (keys) view\n .on(\"keydown.brush\", keydowned, true)\n .on(\"keyup.brush\", keyupped, true)\n\n dragDisable(event.view);\n }\n\n redraw.call(that);\n emit.start(event, mode.name);\n\n function moved(event) {\n for (const p of event.changedTouches || [event]) {\n for (const d of points)\n if (d.identifier === p.identifier) d.cur = pointer(p, that);\n }\n if (shifting && !lockX && !lockY && points.length === 1) {\n const point = points[0];\n if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n lockY = true;\n else\n lockX = true;\n }\n for (const point of points)\n if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n moving = true;\n noevent(event);\n move(event);\n }\n\n function move(event) {\n const point = points[0], point0 = point.point0;\n var t;\n\n dx = point[0] - point0[0];\n dy = point[1] - point0[1];\n\n switch (mode) {\n case MODE_SPACE:\n case MODE_DRAG: {\n if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n case MODE_HANDLE: {\n if (points[1]) {\n if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n } else {\n if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n }\n break;\n }\n case MODE_CENTER: {\n if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n break;\n }\n }\n\n if (e1 < w1) {\n signX *= -1;\n t = w0, w0 = e0, e0 = t;\n t = w1, w1 = e1, e1 = t;\n if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n }\n\n if (s1 < n1) {\n signY *= -1;\n t = n0, n0 = s0, s0 = t;\n t = n1, n1 = s1, s1 = t;\n if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n }\n\n if (state.selection) selection = state.selection; // May be set by brush.move!\n if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n if (selection[0][0] !== w1\n || selection[0][1] !== n1\n || selection[1][0] !== e1\n || selection[1][1] !== s1) {\n state.selection = [[w1, n1], [e1, s1]];\n redraw.call(that);\n emit.brush(event, mode.name);\n }\n }\n\n function ended(event) {\n nopropagation(event);\n if (event.touches) {\n if (event.touches.length) return;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n } else {\n dragEnable(event.view, moving);\n view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n }\n group.attr(\"pointer-events\", \"all\");\n overlay.attr(\"cursor\", cursors.overlay);\n if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n if (empty(selection)) state.selection = null, redraw.call(that);\n emit.end(event, mode.name);\n }\n\n function keydowned(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n shifting = signX && signY;\n break;\n }\n case 18: { // ALT\n if (mode === MODE_HANDLE) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n move(event);\n }\n break;\n }\n case 32: { // SPACE; takes priority over ALT\n if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n mode = MODE_SPACE;\n overlay.attr(\"cursor\", cursors.selection);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n\n function keyupped(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move(event);\n }\n break;\n }\n case 18: { // ALT\n if (mode === MODE_CENTER) {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n move(event);\n }\n break;\n }\n case 32: { // SPACE\n if (mode === MODE_SPACE) {\n if (event.altKey) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n } else {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n }\n overlay.attr(\"cursor\", cursors[type]);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n }\n\n function touchmoved(event) {\n emitter(this, arguments).moved(event);\n }\n\n function touchended(event) {\n emitter(this, arguments).ended(event);\n }\n\n function initialize() {\n var state = this.__brush || {selection: null};\n state.extent = number2(extent.apply(this, arguments));\n state.dim = dim;\n return state;\n }\n\n brush.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n };\n\n brush.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n };\n\n brush.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n };\n\n brush.handleSize = function(_) {\n return arguments.length ? (handleSize = +_, brush) : handleSize;\n };\n\n brush.keyModifiers = function(_) {\n return arguments.length ? (keys = !!_, brush) : keys;\n };\n\n brush.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? brush : value;\n };\n\n return brush;\n}\n", "export {\n default as brush,\n brushX,\n brushY,\n brushSelection\n} from \"./brush.js\";\n", "const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We\u2019re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n", "export {Path, path, pathRound} from \"./path.js\";\n", "export {default as chord, chordTranspose, chordDirected} from \"./chord.js\";\nexport {default as ribbon, ribbonArrow} from \"./ribbon.js\";\n", "export {default as contours} from \"./contours.js\";\nexport {default as contourDensity} from \"./density.js\";\n", "export {default as Delaunay} from \"./delaunay.js\";\nexport {default as Voronoi} from \"./voronoi.js\";\n", "export {default as dsvFormat} from \"./dsv.js\";\nexport {csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue} from \"./csv.js\";\nexport {tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue} from \"./tsv.js\";\nexport {default as autoType} from \"./autoType.js\";\n", "export {default as blob} from \"./blob.js\";\nexport {default as buffer} from \"./buffer.js\";\nexport {default as dsv, csv, tsv} from \"./dsv.js\";\nexport {default as image} from \"./image.js\";\nexport {default as json} from \"./json.js\";\nexport {default as text} from \"./text.js\";\nexport {default as xml, html, svg} from \"./xml.js\";\n", "export {default as quadtree} from \"./quadtree.js\";\n", "export {default as forceCenter} from \"./center.js\";\nexport {default as forceCollide} from \"./collide.js\";\nexport {default as forceLink} from \"./link.js\";\nexport {default as forceManyBody} from \"./manyBody.js\";\nexport {default as forceRadial} from \"./radial.js\";\nexport {default as forceSimulation} from \"./simulation.js\";\nexport {default as forceX} from \"./x.js\";\nexport {default as forceY} from \"./y.js\";\n", "export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, \u00B1Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n", "export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n", "export default function(x) {\n return x;\n}\n", "import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u00B5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"\u2212\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer \u201Cvalue\u201D part that can be\n // grouped, and fractional or exponential \u201Csuffix\u201D part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n", "export {default as formatDefaultLocale, format, formatPrefix} from \"./defaultLocale.js\";\nexport {default as formatLocale} from \"./locale.js\";\nexport {default as formatSpecifier, FormatSpecifier} from \"./formatSpecifier.js\";\nexport {default as precisionFixed} from \"./precisionFixed.js\";\nexport {default as precisionPrefix} from \"./precisionPrefix.js\";\nexport {default as precisionRound} from \"./precisionRound.js\";\n", "export {default as geoArea} from \"./area.js\";\nexport {default as geoBounds} from \"./bounds.js\";\nexport {default as geoCentroid} from \"./centroid.js\";\nexport {default as geoCircle} from \"./circle.js\";\nexport {default as geoClipAntimeridian} from \"./clip/antimeridian.js\";\nexport {default as geoClipCircle} from \"./clip/circle.js\";\nexport {default as geoClipExtent} from \"./clip/extent.js\"; // DEPRECATED! Use d3.geoIdentity().clipExtent(\u2026).\nexport {default as geoClipRectangle} from \"./clip/rectangle.js\";\nexport {default as geoContains} from \"./contains.js\";\nexport {default as geoDistance} from \"./distance.js\";\nexport {default as geoGraticule, graticule10 as geoGraticule10} from \"./graticule.js\";\nexport {default as geoInterpolate} from \"./interpolate.js\";\nexport {default as geoLength} from \"./length.js\";\nexport {default as geoPath} from \"./path/index.js\";\nexport {default as geoAlbers} from \"./projection/albers.js\";\nexport {default as geoAlbersUsa} from \"./projection/albersUsa.js\";\nexport {default as geoAzimuthalEqualArea, azimuthalEqualAreaRaw as geoAzimuthalEqualAreaRaw} from \"./projection/azimuthalEqualArea.js\";\nexport {default as geoAzimuthalEquidistant, azimuthalEquidistantRaw as geoAzimuthalEquidistantRaw} from \"./projection/azimuthalEquidistant.js\";\nexport {default as geoConicConformal, conicConformalRaw as geoConicConformalRaw} from \"./projection/conicConformal.js\";\nexport {default as geoConicEqualArea, conicEqualAreaRaw as geoConicEqualAreaRaw} from \"./projection/conicEqualArea.js\";\nexport {default as geoConicEquidistant, conicEquidistantRaw as geoConicEquidistantRaw} from \"./projection/conicEquidistant.js\";\nexport {default as geoEqualEarth, equalEarthRaw as geoEqualEarthRaw} from \"./projection/equalEarth.js\";\nexport {default as geoEquirectangular, equirectangularRaw as geoEquirectangularRaw} from \"./projection/equirectangular.js\";\nexport {default as geoGnomonic, gnomonicRaw as geoGnomonicRaw} from \"./projection/gnomonic.js\";\nexport {default as geoIdentity} from \"./projection/identity.js\";\nexport {default as geoProjection, projectionMutator as geoProjectionMutator} from \"./projection/index.js\";\nexport {default as geoMercator, mercatorRaw as geoMercatorRaw} from \"./projection/mercator.js\";\nexport {default as geoNaturalEarth1, naturalEarth1Raw as geoNaturalEarth1Raw} from \"./projection/naturalEarth1.js\";\nexport {default as geoOrthographic, orthographicRaw as geoOrthographicRaw} from \"./projection/orthographic.js\";\nexport {default as geoStereographic, stereographicRaw as geoStereographicRaw} from \"./projection/stereographic.js\";\nexport {default as geoTransverseMercator, transverseMercatorRaw as geoTransverseMercatorRaw} from \"./projection/transverseMercator.js\";\nexport {default as geoRotation} from \"./rotation.js\";\nexport {default as geoStream} from \"./stream.js\";\nexport {default as geoTransform} from \"./transform.js\";\n", "export {default as cluster} from \"./cluster.js\";\nexport {default as hierarchy, Node} from \"./hierarchy/index.js\";\nexport {default as pack} from \"./pack/index.js\";\nexport {default as packSiblings} from \"./pack/siblings.js\";\nexport {default as packEnclose} from \"./pack/enclose.js\";\nexport {default as partition} from \"./partition.js\";\nexport {default as stratify} from \"./stratify.js\";\nexport {default as tree} from \"./tree.js\";\nexport {default as treemap} from \"./treemap/index.js\";\nexport {default as treemapBinary} from \"./treemap/binary.js\";\nexport {default as treemapDice} from \"./treemap/dice.js\";\nexport {default as treemapSlice} from \"./treemap/slice.js\";\nexport {default as treemapSliceDice} from \"./treemap/sliceDice.js\";\nexport {default as treemapSquarify} from \"./treemap/squarify.js\";\nexport {default as treemapResquarify} from \"./treemap/resquarify.js\";\n", "export {default as polygonArea} from \"./area.js\";\nexport {default as polygonCentroid} from \"./centroid.js\";\nexport {default as polygonHull} from \"./hull.js\";\nexport {default as polygonContains} from \"./contains.js\";\nexport {default as polygonLength} from \"./length.js\";\n", "export {default as randomUniform} from \"./uniform.js\";\nexport {default as randomInt} from \"./int.js\";\nexport {default as randomNormal} from \"./normal.js\";\nexport {default as randomLogNormal} from \"./logNormal.js\";\nexport {default as randomBates} from \"./bates.js\";\nexport {default as randomIrwinHall} from \"./irwinHall.js\";\nexport {default as randomExponential} from \"./exponential.js\";\nexport {default as randomPareto} from \"./pareto.js\";\nexport {default as randomBernoulli} from \"./bernoulli.js\";\nexport {default as randomGeometric} from \"./geometric.js\";\nexport {default as randomBinomial} from \"./binomial.js\";\nexport {default as randomGamma} from \"./gamma.js\";\nexport {default as randomBeta} from \"./beta.js\";\nexport {default as randomWeibull} from \"./weibull.js\";\nexport {default as randomCauchy} from \"./cauchy.js\";\nexport {default as randomLogistic} from \"./logistic.js\";\nexport {default as randomPoisson} from \"./poisson.js\";\nexport {default as randomLcg} from \"./lcg.js\";\n", "export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n", "import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n", "import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n r0 = 0,\n r1 = 1,\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n\n delete scale.unknown;\n\n function rescale() {\n var n = domain().length,\n reverse = r1 < r0,\n start = reverse ? r1 : r0,\n stop = reverse ? r0 : r1;\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (round) step = Math.floor(step);\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n var values = sequence(n).map(function(i) { return start + step * i; });\n return ordinalRange(reverse ? values.reverse() : values);\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.range = function(_) {\n return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n };\n\n scale.rangeRound = function(_) {\n return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n };\n\n scale.bandwidth = function() {\n return bandwidth;\n };\n\n scale.step = function() {\n return step;\n };\n\n scale.round = function(_) {\n return arguments.length ? (round = !!_, rescale()) : round;\n };\n\n scale.padding = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n };\n\n scale.paddingInner = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n };\n\n scale.paddingOuter = function(_) {\n return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n };\n\n scale.align = function(_) {\n return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n };\n\n scale.copy = function() {\n return band(domain(), [r0, r1])\n .round(round)\n .paddingInner(paddingInner)\n .paddingOuter(paddingOuter)\n .align(align);\n };\n\n return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n var copy = scale.copy;\n\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n\n scale.copy = function() {\n return pointish(copy());\n };\n\n return scale;\n}\n\nexport function point() {\n return pointish(band.apply(null, arguments).paddingInner(1));\n}\n", "export default function constants(x) {\n return function() {\n return x;\n };\n}\n", "export default function number(x) {\n return +x;\n}\n", "import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n", "import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n", "import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n", "export default function nice(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n", "const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = (date) => {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = (date) => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = (date) => {\n const d0 = interval(date), d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = (test) => {\n return timeInterval((date) => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = (step) => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? (d) => field(d) % step === 0\n : (d) => interval.count(0, d) % step === 0);\n };\n }\n\n return interval;\n}\n", "import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n // noop\n}, (date, step) => {\n date.setTime(+date + step);\n}, (start, end) => {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return timeInterval((date) => {\n date.setTime(Math.floor(date / k) * k);\n }, (date, step) => {\n date.setTime(+date + step * k);\n }, (start, end) => {\n return (end - start) / k;\n });\n};\n\nexport const milliseconds = millisecond.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n return (end - start) / durationSecond;\n}, (date) => {\n return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n date.setUTCSeconds(0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n return timeInterval((date) => {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setDate(date.getDate() + step * 7);\n }, (start, end) => {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n return timeInterval((date) => {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, (start, end) => {\n return (end - start) / durationWeek;\n });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n return end.getFullYear() - start.getFullYear();\n}, (date) => {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport const utcYears = utcYear.range;\n", "import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n", "export {\n timeInterval\n} from \"./interval.js\";\n\nexport {\n millisecond as utcMillisecond,\n milliseconds as utcMilliseconds,\n millisecond as timeMillisecond,\n milliseconds as timeMilliseconds\n} from \"./millisecond.js\";\n\nexport {\n second as utcSecond,\n seconds as utcSeconds,\n second as timeSecond,\n seconds as timeSeconds\n} from \"./second.js\";\n\nexport {\n timeMinute,\n timeMinutes,\n utcMinute,\n utcMinutes\n} from \"./minute.js\";\n\nexport {\n timeHour,\n timeHours,\n utcHour,\n utcHours\n} from \"./hour.js\";\n\nexport {\n timeDay,\n timeDays,\n utcDay,\n utcDays,\n unixDay,\n unixDays\n} from \"./day.js\";\n\nexport {\n timeSunday as timeWeek,\n timeSundays as timeWeeks,\n timeSunday,\n timeSundays,\n timeMonday,\n timeMondays,\n timeTuesday,\n timeTuesdays,\n timeWednesday,\n timeWednesdays,\n timeThursday,\n timeThursdays,\n timeFriday,\n timeFridays,\n timeSaturday,\n timeSaturdays,\n utcSunday as utcWeek,\n utcSundays as utcWeeks,\n utcSunday,\n utcSundays,\n utcMonday,\n utcMondays,\n utcTuesday,\n utcTuesdays,\n utcWednesday,\n utcWednesdays,\n utcThursday,\n utcThursdays,\n utcFriday,\n utcFridays,\n utcSaturday,\n utcSaturdays\n} from \"./week.js\";\n\nexport {\n timeMonth,\n timeMonths,\n utcMonth,\n utcMonths\n} from \"./month.js\";\n\nexport {\n timeYear,\n timeYears,\n utcYear,\n utcYears\n} from \"./year.js\";\n\nexport {\n utcTicks,\n utcTickInterval,\n timeTicks,\n timeTickInterval\n} from \"./ticks.js\";\n", "import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n", "export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from \"./defaultLocale.js\";\nexport {default as timeFormatLocale} from \"./locale.js\";\nexport {default as isoFormat} from \"./isoFormat.js\";\nexport {default as isoParse} from \"./isoParse.js\";\n", "import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n", "export {\n default as scaleBand,\n point as scalePoint\n} from \"./band.js\";\n\nexport {\n default as scaleIdentity\n} from \"./identity.js\";\n\nexport {\n default as scaleLinear\n} from \"./linear.js\";\n\nexport {\n default as scaleLog\n} from \"./log.js\";\n\nexport {\n default as scaleSymlog\n} from \"./symlog.js\";\n\nexport {\n default as scaleOrdinal,\n implicit as scaleImplicit\n} from \"./ordinal.js\";\n\nexport {\n default as scalePow,\n sqrt as scaleSqrt\n} from \"./pow.js\";\n\nexport {\n default as scaleRadial\n} from \"./radial.js\";\n\nexport {\n default as scaleQuantile\n} from \"./quantile.js\";\n\nexport {\n default as scaleQuantize\n} from \"./quantize.js\";\n\nexport {\n default as scaleThreshold\n} from \"./threshold.js\";\n\nexport {\n default as scaleTime\n} from \"./time.js\";\n\nexport {\n default as scaleUtc\n} from \"./utcTime.js\";\n\nexport {\n default as scaleSequential,\n sequentialLog as scaleSequentialLog,\n sequentialPow as scaleSequentialPow,\n sequentialSqrt as scaleSequentialSqrt,\n sequentialSymlog as scaleSequentialSymlog\n} from \"./sequential.js\";\n\nexport {\n default as scaleSequentialQuantile\n} from \"./sequentialQuantile.js\";\n\nexport {\n default as scaleDiverging,\n divergingLog as scaleDivergingLog,\n divergingPow as scaleDivergingPow,\n divergingSqrt as scaleDivergingSqrt,\n divergingSymlog as scaleDivergingSymlog\n} from \"./diverging.js\";\n\nexport {\n default as tickFormat\n} from \"./tickFormat.js\";\n", "export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n", "import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n", "export {default as schemeCategory10} from \"./categorical/category10.js\";\nexport {default as schemeAccent} from \"./categorical/Accent.js\";\nexport {default as schemeDark2} from \"./categorical/Dark2.js\";\nexport {default as schemeObservable10} from \"./categorical/observable10.js\";\nexport {default as schemePaired} from \"./categorical/Paired.js\";\nexport {default as schemePastel1} from \"./categorical/Pastel1.js\";\nexport {default as schemePastel2} from \"./categorical/Pastel2.js\";\nexport {default as schemeSet1} from \"./categorical/Set1.js\";\nexport {default as schemeSet2} from \"./categorical/Set2.js\";\nexport {default as schemeSet3} from \"./categorical/Set3.js\";\nexport {default as schemeTableau10} from \"./categorical/Tableau10.js\";\nexport {default as interpolateBrBG, scheme as schemeBrBG} from \"./diverging/BrBG.js\";\nexport {default as interpolatePRGn, scheme as schemePRGn} from \"./diverging/PRGn.js\";\nexport {default as interpolatePiYG, scheme as schemePiYG} from \"./diverging/PiYG.js\";\nexport {default as interpolatePuOr, scheme as schemePuOr} from \"./diverging/PuOr.js\";\nexport {default as interpolateRdBu, scheme as schemeRdBu} from \"./diverging/RdBu.js\";\nexport {default as interpolateRdGy, scheme as schemeRdGy} from \"./diverging/RdGy.js\";\nexport {default as interpolateRdYlBu, scheme as schemeRdYlBu} from \"./diverging/RdYlBu.js\";\nexport {default as interpolateRdYlGn, scheme as schemeRdYlGn} from \"./diverging/RdYlGn.js\";\nexport {default as interpolateSpectral, scheme as schemeSpectral} from \"./diverging/Spectral.js\";\nexport {default as interpolateBuGn, scheme as schemeBuGn} from \"./sequential-multi/BuGn.js\";\nexport {default as interpolateBuPu, scheme as schemeBuPu} from \"./sequential-multi/BuPu.js\";\nexport {default as interpolateGnBu, scheme as schemeGnBu} from \"./sequential-multi/GnBu.js\";\nexport {default as interpolateOrRd, scheme as schemeOrRd} from \"./sequential-multi/OrRd.js\";\nexport {default as interpolatePuBuGn, scheme as schemePuBuGn} from \"./sequential-multi/PuBuGn.js\";\nexport {default as interpolatePuBu, scheme as schemePuBu} from \"./sequential-multi/PuBu.js\";\nexport {default as interpolatePuRd, scheme as schemePuRd} from \"./sequential-multi/PuRd.js\";\nexport {default as interpolateRdPu, scheme as schemeRdPu} from \"./sequential-multi/RdPu.js\";\nexport {default as interpolateYlGnBu, scheme as schemeYlGnBu} from \"./sequential-multi/YlGnBu.js\";\nexport {default as interpolateYlGn, scheme as schemeYlGn} from \"./sequential-multi/YlGn.js\";\nexport {default as interpolateYlOrBr, scheme as schemeYlOrBr} from \"./sequential-multi/YlOrBr.js\";\nexport {default as interpolateYlOrRd, scheme as schemeYlOrRd} from \"./sequential-multi/YlOrRd.js\";\nexport {default as interpolateBlues, scheme as schemeBlues} from \"./sequential-single/Blues.js\";\nexport {default as interpolateGreens, scheme as schemeGreens} from \"./sequential-single/Greens.js\";\nexport {default as interpolateGreys, scheme as schemeGreys} from \"./sequential-single/Greys.js\";\nexport {default as interpolatePurples, scheme as schemePurples} from \"./sequential-single/Purples.js\";\nexport {default as interpolateReds, scheme as schemeReds} from \"./sequential-single/Reds.js\";\nexport {default as interpolateOranges, scheme as schemeOranges} from \"./sequential-single/Oranges.js\";\nexport {default as interpolateCividis} from \"./sequential-multi/cividis.js\";\nexport {default as interpolateCubehelixDefault} from \"./sequential-multi/cubehelix.js\";\nexport {default as interpolateRainbow, warm as interpolateWarm, cool as interpolateCool} from \"./sequential-multi/rainbow.js\";\nexport {default as interpolateSinebow} from \"./sequential-multi/sinebow.js\";\nexport {default as interpolateTurbo} from \"./sequential-multi/turbo.js\";\nexport {default as interpolateViridis, magma as interpolateMagma, inferno as interpolateInferno, plasma as interpolatePlasma} from \"./sequential-multi/viridis.js\";\n", "export default function(x) {\n return function constant() {\n return x;\n };\n}\n", "export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n", "import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n", "import constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\nimport {withPath} from \"./path.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null,\n path = withPath(arc);\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 \u2265 r0, da1 \u2265 da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle. If this\n // intersection fails, it\u2019s probably because the arc is too small, so\n // disable the corner radius entirely.\n if (da < pi) {\n if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n } else {\n rc0 = rc1 = 0;\n }\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector\u2019s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it\u2019s a circular sector?\n // Or perhaps it\u2019s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector\u2019s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n", "export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n", "function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n", "export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n", "import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n", "export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n", "export default function(d) {\n return d;\n}\n", "import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n", "import pointRadial from \"../pointRadial.js\";\n\nclass Bump {\n constructor(context, x) {\n this._context = context;\n this._x = x;\n }\n areaStart() {\n this._line = 0;\n }\n areaEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n }\n point(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: {\n this._point = 1;\n if (this._line) this._context.lineTo(x, y);\n else this._context.moveTo(x, y);\n break;\n }\n case 1: this._point = 2; // falls through\n default: {\n if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);\n else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);\n break;\n }\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nclass BumpRadial {\n constructor(context) {\n this._context = context;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {}\n point(x, y) {\n x = +x, y = +y;\n if (this._point === 0) {\n this._point = 1;\n } else {\n const p0 = pointRadial(this._x0, this._y0);\n const p1 = pointRadial(this._x0, this._y0 = (this._y0 + y) / 2);\n const p2 = pointRadial(x, this._y0);\n const p3 = pointRadial(x, y);\n this._context.moveTo(...p0);\n this._context.bezierCurveTo(...p1, ...p2, ...p3);\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nexport function bumpX(context) {\n return new Bump(context, true);\n}\n\nexport function bumpY(context) {\n return new Bump(context, false);\n}\n\nexport function bumpRadial(context) {\n return new BumpRadial(context);\n}\n", "export default function() {}\n", "export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // falls through\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n", "import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n", "import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n", "import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n", "export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n", "import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n", "import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n", "import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n", "import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n", "import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n", "import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n", "function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic B\u00E9zier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n", "function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n", "function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n", "export {default as arc} from \"./arc.js\";\nexport {default as area} from \"./area.js\";\nexport {default as line} from \"./line.js\";\nexport {default as pie} from \"./pie.js\";\nexport {default as areaRadial, default as radialArea} from \"./areaRadial.js\"; // Note: radialArea is deprecated!\nexport {default as lineRadial, default as radialLine} from \"./lineRadial.js\"; // Note: radialLine is deprecated!\nexport {default as pointRadial} from \"./pointRadial.js\";\nexport {link, linkHorizontal, linkVertical, linkRadial} from \"./link.js\";\n\nexport {default as symbol, symbolsStroke, symbolsFill, symbolsFill as symbols} from \"./symbol.js\";\nexport {default as symbolAsterisk} from \"./symbol/asterisk.js\";\nexport {default as symbolCircle} from \"./symbol/circle.js\";\nexport {default as symbolCross} from \"./symbol/cross.js\";\nexport {default as symbolDiamond} from \"./symbol/diamond.js\";\nexport {default as symbolDiamond2} from \"./symbol/diamond2.js\";\nexport {default as symbolPlus} from \"./symbol/plus.js\";\nexport {default as symbolSquare} from \"./symbol/square.js\";\nexport {default as symbolSquare2} from \"./symbol/square2.js\";\nexport {default as symbolStar} from \"./symbol/star.js\";\nexport {default as symbolTriangle} from \"./symbol/triangle.js\";\nexport {default as symbolTriangle2} from \"./symbol/triangle2.js\";\nexport {default as symbolWye} from \"./symbol/wye.js\";\nexport {default as symbolTimes, default as symbolX} from \"./symbol/times.js\";\n\nexport {default as curveBasisClosed} from \"./curve/basisClosed.js\";\nexport {default as curveBasisOpen} from \"./curve/basisOpen.js\";\nexport {default as curveBasis} from \"./curve/basis.js\";\nexport {bumpX as curveBumpX, bumpY as curveBumpY} from \"./curve/bump.js\";\nexport {default as curveBundle} from \"./curve/bundle.js\";\nexport {default as curveCardinalClosed} from \"./curve/cardinalClosed.js\";\nexport {default as curveCardinalOpen} from \"./curve/cardinalOpen.js\";\nexport {default as curveCardinal} from \"./curve/cardinal.js\";\nexport {default as curveCatmullRomClosed} from \"./curve/catmullRomClosed.js\";\nexport {default as curveCatmullRomOpen} from \"./curve/catmullRomOpen.js\";\nexport {default as curveCatmullRom} from \"./curve/catmullRom.js\";\nexport {default as curveLinearClosed} from \"./curve/linearClosed.js\";\nexport {default as curveLinear} from \"./curve/linear.js\";\nexport {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from \"./curve/monotone.js\";\nexport {default as curveNatural} from \"./curve/natural.js\";\nexport {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from \"./curve/step.js\";\n\nexport {default as stack} from \"./stack.js\";\nexport {default as stackOffsetExpand} from \"./offset/expand.js\";\nexport {default as stackOffsetDiverging} from \"./offset/diverging.js\";\nexport {default as stackOffsetNone} from \"./offset/none.js\";\nexport {default as stackOffsetSilhouette} from \"./offset/silhouette.js\";\nexport {default as stackOffsetWiggle} from \"./offset/wiggle.js\";\nexport {default as stackOrderAppearance} from \"./order/appearance.js\";\nexport {default as stackOrderAscending} from \"./order/ascending.js\";\nexport {default as stackOrderDescending} from \"./order/descending.js\";\nexport {default as stackOrderInsideOut} from \"./order/insideOut.js\";\nexport {default as stackOrderNone} from \"./order/none.js\";\nexport {default as stackOrderReverse} from \"./order/reverse.js\";\n", "export default x => () => x;\n", "export default function ZoomEvent(type, {\n sourceEvent,\n target,\n transform,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n transform: {value: transform, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n", "export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n", "export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {select, pointer} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === 'wheel') && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\n\nexport default function() {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchfirst,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0,\n tapDistance = 10;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled, {passive: false})\n .on(\"mousedown.zoom\", mousedowned)\n .on(\"dblclick.zoom\", dblclicked)\n .filter(touchable)\n .on(\"touchstart.zoom\", touchstarted)\n .on(\"touchmove.zoom\", touchmoved)\n .on(\"touchend.zoom touchcancel.zoom\", touchended)\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point, event) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point, event);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .event(event)\n .start()\n .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n .end();\n });\n }\n };\n\n zoom.scaleBy = function(selection, k, p, event) {\n zoom.scaleTo(selection, function() {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p, event);\n };\n\n zoom.scaleTo = function(selection, k, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p, event);\n };\n\n zoom.translateBy = function(selection, x, y, event) {\n zoom.transform(selection, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n }, null, event);\n };\n\n zoom.translateTo = function(selection, x, y, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p, event);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point, event) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args).event(event),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return (!clean && that.__zooming) || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n event: function(event) {\n if (event) this.sourceEvent = event;\n return this;\n },\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function wheeled(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, args).event(event),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = pointer(event);\n\n // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n }\n\n // If this wheel event won\u2019t trigger a transform change, ignore it.\n else if (t.k === k) return;\n\n // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent(event);\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned(event, ...args) {\n if (touchending || !filter.apply(this, arguments)) return;\n var currentTarget = event.currentTarget,\n g = gesture(this, args, true).event(event),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = pointer(event, currentTarget),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved(event) {\n noevent(event);\n if (!g.moved) {\n var dx = event.clientX - x0, dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.event(event)\n .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped(event) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent(event);\n g.event(event).end();\n }\n }\n\n function dblclicked(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n\n noevent(event);\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);\n else select(this).call(zoom.transform, t1, p0, event);\n }\n\n function touchstarted(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, args, event.changedTouches.length === n).event(event),\n started, i, t, p;\n\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1],\n p1 = g.touch1[0], l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n }\n else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n else return;\n\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation(event);\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n if (g.taps === 2) {\n t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n }\n\n zoom.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function(_) {\n return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n };\n\n zoom.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function(_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function(_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n zoom.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n };\n\n return zoom;\n}\n", "export {default as zoom} from \"./zoom.js\";\nexport {default as zoomTransform, identity as zoomIdentity, Transform as ZoomTransform} from \"./transform.js\";\n", "export * from \"d3-array\";\nexport * from \"d3-axis\";\nexport * from \"d3-brush\";\nexport * from \"d3-chord\";\nexport * from \"d3-color\";\nexport * from \"d3-contour\";\nexport * from \"d3-delaunay\";\nexport * from \"d3-dispatch\";\nexport * from \"d3-drag\";\nexport * from \"d3-dsv\";\nexport * from \"d3-ease\";\nexport * from \"d3-fetch\";\nexport * from \"d3-force\";\nexport * from \"d3-format\";\nexport * from \"d3-geo\";\nexport * from \"d3-hierarchy\";\nexport * from \"d3-interpolate\";\nexport * from \"d3-path\";\nexport * from \"d3-polygon\";\nexport * from \"d3-quadtree\";\nexport * from \"d3-random\";\nexport * from \"d3-scale\";\nexport * from \"d3-scale-chromatic\";\nexport * from \"d3-selection\";\nexport * from \"d3-shape\";\nexport * from \"d3-time\";\nexport * from \"d3-time-format\";\nexport * from \"d3-timer\";\nexport * from \"d3-transition\";\nexport * from \"d3-zoom\";\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BLANK_URL = exports.relativeFirstCharacters = exports.whitespaceEscapeCharsRegex = exports.urlSchemeRegex = exports.ctrlCharactersRegex = exports.htmlCtrlEntityRegex = exports.htmlEntitiesRegex = exports.invalidProtocolRegex = void 0;\nexports.invalidProtocolRegex = /^([^\\w]*)(javascript|data|vbscript)/im;\nexports.htmlEntitiesRegex = /&#(\\w+)(^\\w|;)?/g;\nexports.htmlCtrlEntityRegex = /&(newline|tab);/gi;\nexports.ctrlCharactersRegex = /[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim;\nexports.urlSchemeRegex = /^.+(:|:)/gim;\nexports.whitespaceEscapeCharsRegex = /(\\\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;\nexports.relativeFirstCharacters = [\".\", \"/\"];\nexports.BLANK_URL = \"about:blank\";\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sanitizeUrl = void 0;\nvar constants_1 = require(\"./constants\");\nfunction isRelativeUrlWithoutProtocol(url) {\n return constants_1.relativeFirstCharacters.indexOf(url[0]) > -1;\n}\nfunction decodeHtmlCharacters(str) {\n var removedNullByte = str.replace(constants_1.ctrlCharactersRegex, \"\");\n return removedNullByte.replace(constants_1.htmlEntitiesRegex, function (match, dec) {\n return String.fromCharCode(dec);\n });\n}\nfunction isValidUrl(url) {\n return URL.canParse(url);\n}\nfunction decodeURI(uri) {\n try {\n return decodeURIComponent(uri);\n }\n catch (e) {\n // Ignoring error\n // It is possible that the URI contains a `%` not associated\n // with URI/URL-encoding.\n return uri;\n }\n}\nfunction sanitizeUrl(url) {\n if (!url) {\n return constants_1.BLANK_URL;\n }\n var charsToDecode;\n var decodedUrl = decodeURI(url.trim());\n do {\n decodedUrl = decodeHtmlCharacters(decodedUrl)\n .replace(constants_1.htmlCtrlEntityRegex, \"\")\n .replace(constants_1.ctrlCharactersRegex, \"\")\n .replace(constants_1.whitespaceEscapeCharsRegex, \"\")\n .trim();\n decodedUrl = decodeURI(decodedUrl);\n charsToDecode =\n decodedUrl.match(constants_1.ctrlCharactersRegex) ||\n decodedUrl.match(constants_1.htmlEntitiesRegex) ||\n decodedUrl.match(constants_1.htmlCtrlEntityRegex) ||\n decodedUrl.match(constants_1.whitespaceEscapeCharsRegex);\n } while (charsToDecode && charsToDecode.length > 0);\n var sanitizedUrl = decodedUrl;\n if (!sanitizedUrl) {\n return constants_1.BLANK_URL;\n }\n if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {\n return sanitizedUrl;\n }\n // Remove any leading whitespace before checking the URL scheme\n var trimmedUrl = sanitizedUrl.trimStart();\n var urlSchemeParseResults = trimmedUrl.match(constants_1.urlSchemeRegex);\n if (!urlSchemeParseResults) {\n return sanitizedUrl;\n }\n var urlScheme = urlSchemeParseResults[0].toLowerCase().trim();\n if (constants_1.invalidProtocolRegex.test(urlScheme)) {\n return constants_1.BLANK_URL;\n }\n var backSanitized = trimmedUrl.replace(/\\\\/g, \"/\");\n // Handle special cases for mailto: and custom deep-link protocols\n if (urlScheme === \"mailto:\" || urlScheme.includes(\"://\")) {\n return backSanitized;\n }\n // For http and https URLs, perform additional validation\n if (urlScheme === \"http:\" || urlScheme === \"https:\") {\n if (!isValidUrl(backSanitized)) {\n return constants_1.BLANK_URL;\n }\n var url_1 = new URL(backSanitized);\n url_1.protocol = url_1.protocol.toLowerCase();\n url_1.hostname = url_1.hostname.toLowerCase();\n return url_1.toString();\n }\n return backSanitized;\n}\nexports.sanitizeUrl = sanitizeUrl;\n", "import { sanitizeUrl } from '@braintree/sanitize-url';\nimport type { SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { lineBreakRegex } from './common.js';\nimport type {\n Bound,\n D3ImageElement,\n D3RectElement,\n D3TSpanElement,\n D3TextElement,\n D3UseElement,\n RectData,\n TextData,\n TextObject,\n} from './commonTypes.js';\n\nexport const drawRect = (element: SVG | SVGGroup, rectData: RectData): D3RectElement => {\n const rectElement: D3RectElement = element.append('rect');\n rectElement.attr('x', rectData.x);\n rectElement.attr('y', rectData.y);\n rectElement.attr('fill', rectData.fill);\n rectElement.attr('stroke', rectData.stroke);\n rectElement.attr('width', rectData.width);\n rectElement.attr('height', rectData.height);\n if (rectData.name) {\n rectElement.attr('name', rectData.name);\n }\n if (rectData.rx) {\n rectElement.attr('rx', rectData.rx);\n }\n if (rectData.ry) {\n rectElement.attr('ry', rectData.ry);\n }\n\n if (rectData.attrs !== undefined) {\n for (const attrKey in rectData.attrs) {\n rectElement.attr(attrKey, rectData.attrs[attrKey]);\n }\n }\n\n if (rectData.class) {\n rectElement.attr('class', rectData.class);\n }\n\n return rectElement;\n};\n\n/**\n * Draws a background rectangle\n *\n * @param element - Diagram (reference for bounds)\n * @param bounds - Shape of the rectangle\n */\nexport const drawBackgroundRect = (element: SVG | SVGGroup, bounds: Bound): void => {\n const rectData: RectData = {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n stroke: bounds.stroke,\n class: 'rect',\n };\n const rectElement: D3RectElement = drawRect(element, rectData);\n rectElement.lower();\n};\n\nexport const drawText = (element: SVG | SVGGroup, textData: TextData): D3TextElement => {\n const nText: string = textData.text.replace(lineBreakRegex, ' ');\n\n const textElem: D3TextElement = element.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.attr('class', 'legend');\n\n textElem.style('text-anchor', textData.anchor);\n if (textData.class) {\n textElem.attr('class', textData.class);\n }\n\n const tspan: D3TSpanElement = textElem.append('tspan');\n tspan.attr('x', textData.x + textData.textMargin * 2);\n tspan.text(nText);\n\n return textElem;\n};\n\nexport const drawImage = (elem: SVG | SVGGroup, x: number, y: number, link: string): void => {\n const imageElement: D3ImageElement = elem.append('image');\n imageElement.attr('x', x);\n imageElement.attr('y', y);\n const sanitizedLink: string = sanitizeUrl(link);\n imageElement.attr('xlink:href', sanitizedLink);\n};\n\nexport const drawEmbeddedImage = (\n element: SVG | SVGGroup,\n x: number,\n y: number,\n link: string\n): void => {\n const imageElement: D3UseElement = element.append('use');\n imageElement.attr('x', x);\n imageElement.attr('y', y);\n const sanitizedLink: string = sanitizeUrl(link);\n imageElement.attr('xlink:href', `#${sanitizedLink}`);\n};\n\nexport const getNoteRect = (): RectData => {\n const noteRectData: RectData = {\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n fill: '#EDF2AE',\n stroke: '#666',\n anchor: 'start',\n rx: 0,\n ry: 0,\n };\n return noteRectData;\n};\n\nexport const getTextObj = (): TextObject => {\n const testObject: TextObject = {\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n 'text-anchor': 'start',\n style: '#666',\n textMargin: 0,\n rx: 0,\n ry: 0,\n tspan: true,\n };\n return testObject;\n};\n", "import common from '../common/common.js';\nimport * as svgDrawCommon from '../common/svgDrawCommon.js';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n\nexport const drawRect = function (elem, rectData) {\n return svgDrawCommon.drawRect(elem, rectData);\n};\n\nexport const drawImage = function (elem, width, height, x, y, link) {\n const imageElem = elem.append('image');\n imageElem.attr('width', width);\n imageElem.attr('height', height);\n imageElem.attr('x', x);\n imageElem.attr('y', y);\n let sanitizedLink = link.startsWith('data:image/png;base64') ? link : sanitizeUrl(link);\n imageElem.attr('xlink:href', sanitizedLink);\n};\n\nexport const drawRels = (elem, rels, conf) => {\n const relsElem = elem.append('g');\n let i = 0;\n for (let rel of rels) {\n let textColor = rel.textColor ? rel.textColor : '#444444';\n let strokeColor = rel.lineColor ? rel.lineColor : '#444444';\n let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;\n let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;\n\n let url = '';\n if (i === 0) {\n let line = relsElem.append('line');\n line.attr('x1', rel.startPoint.x);\n line.attr('y1', rel.startPoint.y);\n line.attr('x2', rel.endPoint.x);\n line.attr('y2', rel.endPoint.y);\n\n line.attr('stroke-width', '1');\n line.attr('stroke', strokeColor);\n line.style('fill', 'none');\n if (rel.type !== 'rel_b') {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (rel.type === 'birel' || rel.type === 'rel_b') {\n line.attr('marker-start', 'url(' + url + '#arrowend)');\n }\n i = -1;\n } else {\n let line = relsElem.append('path');\n line\n .attr('fill', 'none')\n .attr('stroke-width', '1')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,starty Qcontrolx,controly stopx,stopy '\n .replaceAll('startx', rel.startPoint.x)\n .replaceAll('starty', rel.startPoint.y)\n .replaceAll(\n 'controlx',\n rel.startPoint.x +\n (rel.endPoint.x - rel.startPoint.x) / 2 -\n (rel.endPoint.x - rel.startPoint.x) / 4\n )\n .replaceAll('controly', rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2)\n .replaceAll('stopx', rel.endPoint.x)\n .replaceAll('stopy', rel.endPoint.y)\n );\n if (rel.type !== 'rel_b') {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (rel.type === 'birel' || rel.type === 'rel_b') {\n line.attr('marker-start', 'url(' + url + '#arrowend)');\n }\n }\n\n let messageConf = conf.messageFont();\n _drawTextCandidateFunc(conf)(\n rel.label.text,\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) +\n Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 +\n offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) +\n Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 +\n offsetY,\n rel.label.width,\n rel.label.height,\n { fill: textColor },\n messageConf\n );\n\n if (rel.techn && rel.techn.text !== '') {\n messageConf = conf.messageFont();\n _drawTextCandidateFunc(conf)(\n '[' + rel.techn.text + ']',\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) +\n Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 +\n offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) +\n Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 +\n conf.messageFontSize +\n 5 +\n offsetY,\n Math.max(rel.label.width, rel.techn.width),\n rel.techn.height,\n { fill: textColor, 'font-style': 'italic' },\n messageConf\n );\n }\n }\n};\n\n/**\n * Draws an boundary in the diagram\n *\n * @param {any} elem - The diagram we'll draw to.\n * @param {any} boundary - The boundary to draw.\n * @param {any} conf - DrawText implementation discriminator object\n */\nconst drawBoundary = function (elem, boundary, conf) {\n const boundaryElem = elem.append('g');\n\n let fillColor = boundary.bgColor ? boundary.bgColor : 'none';\n let strokeColor = boundary.borderColor ? boundary.borderColor : '#444444';\n let fontColor = boundary.fontColor ? boundary.fontColor : 'black';\n\n let attrsValue = { 'stroke-width': 1.0, 'stroke-dasharray': '7.0,7.0' };\n if (boundary.nodeType) {\n attrsValue = { 'stroke-width': 1.0 };\n }\n let rectData = {\n x: boundary.x,\n y: boundary.y,\n fill: fillColor,\n stroke: strokeColor,\n width: boundary.width,\n height: boundary.height,\n rx: 2.5,\n ry: 2.5,\n attrs: attrsValue,\n };\n\n drawRect(boundaryElem, rectData);\n\n // draw label\n let boundaryConf = conf.boundaryFont();\n boundaryConf.fontWeight = 'bold';\n boundaryConf.fontSize = boundaryConf.fontSize + 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.label.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.label.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n\n // draw type\n if (boundary.type && boundary.type.text !== '') {\n boundaryConf = conf.boundaryFont();\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.type.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.type.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n }\n\n // draw descr\n if (boundary.descr && boundary.descr.text !== '') {\n boundaryConf = conf.boundaryFont();\n boundaryConf.fontSize = boundaryConf.fontSize - 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.descr.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.descr.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n }\n};\n\nexport const drawC4Shape = function (elem, c4Shape, conf) {\n let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf[c4Shape.typeC4Shape.text + '_bg_color'];\n let strokeColor = c4Shape.borderColor\n ? c4Shape.borderColor\n : conf[c4Shape.typeC4Shape.text + '_border_color'];\n let fontColor = c4Shape.fontColor ? c4Shape.fontColor : '#FFFFFF';\n\n let personImg =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiA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XoMX60zZ0AAAAASUVORK5CYII=';\n break;\n }\n\n const c4ShapeElem = elem.append('g');\n c4ShapeElem.attr('class', 'person-man');\n\n // \n // draw rect of c4Shape\n const rect = svgDrawCommon.getNoteRect();\n\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n case 'system':\n case 'external_system':\n case 'container':\n case 'external_container':\n case 'component':\n case 'external_component':\n rect.x = c4Shape.x;\n rect.y = c4Shape.y;\n rect.fill = fillColor;\n rect.width = c4Shape.width;\n rect.height = c4Shape.height;\n rect.stroke = strokeColor;\n rect.rx = 2.5;\n rect.ry = 2.5;\n rect.attrs = { 'stroke-width': 0.5 };\n drawRect(c4ShapeElem, rect);\n break;\n case 'system_db':\n case 'external_system_db':\n case 'container_db':\n case 'external_container_db':\n case 'component_db':\n case 'external_component_db':\n c4ShapeElem\n .append('path')\n .attr('fill', fillColor)\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.width / 2)\n .replaceAll('height', c4Shape.height)\n );\n c4ShapeElem\n .append('path')\n .attr('fill', 'none')\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.width / 2)\n );\n break;\n case 'system_queue':\n case 'external_system_queue':\n case 'container_queue':\n case 'external_container_queue':\n case 'component_queue':\n case 'external_component_queue':\n c4ShapeElem\n .append('path')\n .attr('fill', fillColor)\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('width', c4Shape.width)\n .replaceAll('half', c4Shape.height / 2)\n );\n c4ShapeElem\n .append('path')\n .attr('fill', 'none')\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half'\n .replaceAll('startx', c4Shape.x + c4Shape.width)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.height / 2)\n );\n break;\n }\n\n // draw type of c4Shape\n let c4ShapeFontConf = getC4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeElem\n .append('text')\n .attr('fill', fontColor)\n .attr('font-family', c4ShapeFontConf.fontFamily)\n .attr('font-size', c4ShapeFontConf.fontSize - 2)\n .attr('font-style', 'italic')\n .attr('lengthAdjust', 'spacing')\n .attr('textLength', c4Shape.typeC4Shape.width)\n .attr('x', c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2)\n .attr('y', c4Shape.y + c4Shape.typeC4Shape.Y)\n .text('<<' + c4Shape.typeC4Shape.text + '>>');\n\n // draw image/sprite\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n drawImage(\n c4ShapeElem,\n 48,\n 48,\n c4Shape.x + c4Shape.width / 2 - 24,\n c4Shape.y + c4Shape.image.Y,\n personImg\n );\n break;\n }\n\n // draw label\n let textFontConf = conf[c4Shape.typeC4Shape.text + 'Font']();\n textFontConf.fontWeight = 'bold';\n textFontConf.fontSize = textFontConf.fontSize + 2;\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n c4Shape.label.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.label.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n\n // draw techn/type\n textFontConf = conf[c4Shape.typeC4Shape.text + 'Font']();\n textFontConf.fontColor = fontColor;\n\n if (c4Shape.techn && c4Shape.techn?.text !== '') {\n _drawTextCandidateFunc(conf)(\n c4Shape.techn.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.techn.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, 'font-style': 'italic' },\n textFontConf\n );\n } else if (c4Shape.type && c4Shape.type.text !== '') {\n _drawTextCandidateFunc(conf)(\n c4Shape.type.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.type.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, 'font-style': 'italic' },\n textFontConf\n );\n }\n\n // draw descr\n if (c4Shape.descr && c4Shape.descr.text !== '') {\n textFontConf = conf.personFont();\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n c4Shape.descr.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.descr.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n }\n\n return c4Shape.height;\n};\n\nexport const insertDatabaseIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'database')\n .attr('fill-rule', 'evenodd')\n .attr('clip-rule', 'evenodd')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z'\n );\n};\n\nexport const insertComputerIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'computer')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z'\n );\n};\n\nexport const insertClockIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'clock')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z'\n );\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param elem\n */\nexport const insertArrowHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead\n};\n\nexport const insertArrowEnd = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowend')\n .attr('refX', 1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 10 0 L 0 5 L 10 10 z'); // this is actual shape for arrowhead\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowFilledHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'filled-head')\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Setup node number. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertDynamicNumber = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'sequencenumber')\n .attr('refX', 15)\n .attr('refY', 15)\n .attr('markerWidth', 60)\n .attr('markerHeight', 40)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', 15)\n .attr('cy', 15)\n .attr('r', 6);\n // .style(\"fill\", '#f00');\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowCrossHead = function (elem) {\n const defs = elem.append('defs');\n const marker = defs\n .append('marker')\n .attr('id', 'crosshead')\n .attr('markerWidth', 15)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .attr('refX', 16)\n .attr('refY', 4);\n\n // The arrow\n marker\n .append('path')\n .attr('fill', 'black')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 9,2 V 6 L16,4 Z');\n\n // The cross\n marker\n .append('path')\n .attr('fill', 'none')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7');\n // this is actual shape for arrowhead\n};\n\nconst getC4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + 'FontFamily'],\n fontSize: cnf[typeC4Shape + 'FontSize'],\n fontWeight: cnf[typeC4Shape + 'FontWeight'],\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { fontSize, fontFamily, fontWeight } = conf;\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * fontSize - (fontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .style('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .style('font-size', fontSize)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n text\n .append('tspan')\n // .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i])\n // .attr('y', y + height / 2)\n .attr('alignment-baseline', 'mathematical');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nexport default {\n drawRect,\n drawBoundary,\n drawC4Shape,\n drawRels,\n drawImage,\n insertArrowHead,\n insertArrowEnd,\n insertArrowFilledHead,\n insertDynamicNumber,\n insertArrowCrossHead,\n insertDatabaseIcon,\n insertComputerIcon,\n insertClockIcon,\n};\n\n// cspell:ignoreRegExp /'Mstartx.*/g\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n", "import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n", "import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n", "import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n", "import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n", "import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n", "import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n", "import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n", "import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n", "import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n", "import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n", "import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n", "import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n", "import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n", "import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n", "import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n", "import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n", "import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n", "import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nexport default stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nexport default stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nexport default stackHas;\n", "import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n", "import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n", "import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n", "import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n", "import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n", "import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n", "import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n", "import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n", "import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n", "import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n", "import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n", "import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n", "import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n", "import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n", "import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n", "import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n", "import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n", "import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n", "import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n", "/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n", "import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n", "import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n", "import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n", "import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n", "import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n", "import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n", "import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n", "import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n", "import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n", "import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n", "import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n", "import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n", "import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n", "import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n", "import { sanitizeUrl } from '@braintree/sanitize-url';\nimport type { BaseType, CurveFactory } from 'd3';\nimport {\n curveBasis,\n curveBasisClosed,\n curveBasisOpen,\n curveBumpX,\n curveBumpY,\n curveBundle,\n curveCardinalClosed,\n curveCardinalOpen,\n curveCardinal,\n curveCatmullRomClosed,\n curveCatmullRomOpen,\n curveCatmullRom,\n curveLinear,\n curveLinearClosed,\n curveMonotoneX,\n curveMonotoneY,\n curveNatural,\n curveStep,\n curveStepAfter,\n curveStepBefore,\n select,\n} from 'd3';\nimport common from './diagrams/common/common.js';\nimport { sanitizeDirective } from './utils/sanitizeDirective.js';\nimport { log } from './logger.js';\nimport { detectType } from './diagram-api/detectType.js';\nimport assignWithDepth from './assignWithDepth.js';\nimport type { MermaidConfig } from './config.type.js';\nimport memoize from 'lodash-es/memoize.js';\nimport merge from 'lodash-es/merge.js';\nimport { directiveRegex } from './diagram-api/regexes.js';\nimport type { D3Element, Point, TextDimensionConfig, TextDimensions } from './types.js';\n\nexport const ZERO_WIDTH_SPACE = '\\u200b';\n\n// Effectively an enum of the supported curve types, accessible by name\nconst d3CurveTypes = {\n curveBasis: curveBasis,\n curveBasisClosed: curveBasisClosed,\n curveBasisOpen: curveBasisOpen,\n curveBumpX: curveBumpX,\n curveBumpY: curveBumpY,\n curveBundle: curveBundle,\n curveCardinalClosed: curveCardinalClosed,\n curveCardinalOpen: curveCardinalOpen,\n curveCardinal: curveCardinal,\n curveCatmullRomClosed: curveCatmullRomClosed,\n curveCatmullRomOpen: curveCatmullRomOpen,\n curveCatmullRom: curveCatmullRom,\n curveLinear: curveLinear,\n curveLinearClosed: curveLinearClosed,\n curveMonotoneX: curveMonotoneX,\n curveMonotoneY: curveMonotoneY,\n curveNatural: curveNatural,\n curveStep: curveStep,\n curveStepAfter: curveStepAfter,\n curveStepBefore: curveStepBefore,\n} as const;\n\nconst directiveWithoutOpen =\n /\\s*(?:(\\w+)(?=:):|(\\w+))\\s*(?:(\\w+)|((?:(?!}%{2}).|\\r?\\n)*))?\\s*(?:}%{2})?/gi;\n/**\n * Detects the init config object from the text\n *\n * @param text - The text defining the graph. For example:\n *\n * ```mermaid\n * %%{init: {\"theme\": \"debug\", \"logLevel\": 1 }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * Or\n *\n * ```mermaid\n * %%{initialize: {\"theme\": \"dark\", logLevel: \"debug\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param config - Optional mermaid configuration object.\n * @returns The json object representing the init passed to mermaid.initialize()\n */\nexport const detectInit = function (\n text: string,\n config?: MermaidConfig\n): MermaidConfig | undefined {\n const inits = detectDirective(text, /(?:init\\b)|(?:initialize\\b)/);\n let results: MermaidConfig & { config?: unknown } = {};\n\n if (Array.isArray(inits)) {\n const args = inits.map((init) => init.args);\n sanitizeDirective(args);\n results = assignWithDepth(results, [...args]);\n } else {\n results = inits.args as MermaidConfig;\n }\n\n if (!results) {\n return;\n }\n\n let type = detectType(text, config);\n\n // Move the `config` value to appropriate diagram type value\n const prop = 'config';\n if (results[prop] !== undefined) {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n results[type as keyof MermaidConfig] = results[prop];\n delete results[prop];\n }\n\n return results;\n};\n\ninterface Directive {\n type?: string;\n args?: unknown;\n}\n/**\n * Detects the directive from the text.\n *\n * Text can be single line or multiline. If type is null or omitted,\n * the first directive encountered in text will be returned\n *\n * ```mermaid\n * graph LR\n * %%{someDirective}%%\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param text - The text defining the graph\n * @param type - The directive to return (default: `null`)\n * @returns An object or Array representing the directive(s) matched by the input type.\n * If a single directive was found, that directive object will be returned.\n */\nexport const detectDirective = function (\n text: string,\n type: string | RegExp | null = null\n): Directive | Directive[] {\n try {\n const commentWithoutDirectives = new RegExp(\n `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*\\n`,\n 'ig'\n );\n text = text.trim().replace(commentWithoutDirectives, '').replace(/'/gm, '\"');\n log.debug(\n `Detecting diagram directive${type !== null ? ' type:' + type : ''} based on the text:${text}`\n );\n let match: RegExpExecArray | null;\n const result: Directive[] = [];\n while ((match = directiveRegex.exec(text)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (match.index === directiveRegex.lastIndex) {\n directiveRegex.lastIndex++;\n }\n if ((match && !type) || (type && match[1]?.match(type)) || (type && match[2]?.match(type))) {\n const type = match[1] ? match[1] : match[2];\n const args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;\n result.push({ type, args });\n }\n }\n if (result.length === 0) {\n return { type: text, args: null };\n }\n\n return result.length === 1 ? result[0] : result;\n } catch (error) {\n log.error(\n `ERROR: ${\n (error as Error).message\n } - Unable to parse directive type: '${type}' based on the text: '${text}'`\n );\n return { type: undefined, args: null };\n }\n};\n\nexport const removeDirectives = function (text: string): string {\n return text.replace(directiveRegex, '');\n};\n\n/**\n * Detects whether a substring in present in a given array\n *\n * @param str - The substring to detect\n * @param arr - The array to search\n * @returns The array index containing the substring or -1 if not present\n */\nexport const isSubstringInArray = function (str: string, arr: string[]): number {\n for (const [i, element] of arr.entries()) {\n if (element.match(str)) {\n return i;\n }\n }\n return -1;\n};\n\n/**\n * Returns a d3 curve given a curve name\n *\n * @param interpolate - The interpolation name\n * @param defaultCurve - The default curve to return\n * @returns The curve factory to use\n */\nexport function interpolateToCurve(\n interpolate: string | undefined,\n defaultCurve: CurveFactory\n): CurveFactory {\n if (!interpolate) {\n return defaultCurve;\n }\n const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;\n\n // @ts-ignore TODO: Fix issue with curve type\n return d3CurveTypes[curveName as keyof typeof d3CurveTypes] ?? defaultCurve;\n}\n\n/**\n * Formats a URL string\n *\n * @param linkStr - String of the URL\n * @param config - Configuration passed to MermaidJS\n * @returns The formatted URL or `undefined`.\n */\nexport function formatUrl(linkStr: string, config: MermaidConfig): string | undefined {\n const url = linkStr.trim();\n\n if (!url) {\n return undefined;\n }\n\n if (config.securityLevel !== 'loose') {\n return sanitizeUrl(url);\n }\n\n return url;\n}\n\n/**\n * Runs a function\n *\n * @param functionName - A dot separated path to the function relative to the `window`\n * @param params - Parameters to pass to the function\n */\nexport const runFunc = (functionName: string, ...params: unknown[]) => {\n const arrPaths = functionName.split('.');\n\n const len = arrPaths.length - 1;\n const fnName = arrPaths[len];\n\n let obj = window;\n for (let i = 0; i < len; i++) {\n obj = obj[arrPaths[i] as keyof typeof obj];\n if (!obj) {\n log.error(`Function name: ${functionName} not found in window`);\n return;\n }\n }\n\n obj[fnName as keyof typeof obj](...params);\n};\n\n/**\n * Finds the distance between two points using the Distance Formula\n *\n * @param p1 - The first point\n * @param p2 - The second point\n * @returns The distance between the two points.\n */\nfunction distance(p1?: Point, p2?: Point): number {\n if (!p1 || !p2) {\n return 0;\n }\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}\n\n/**\n * TODO: Give this a description\n *\n * @param points - List of points\n */\nfunction traverseEdge(points: Point[]): Point {\n let prevPoint: Point | undefined;\n let totalDistance = 0;\n\n points.forEach((point) => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse half of total distance along points\n const remainingDistance = totalDistance / 2;\n return calculatePoint(points, remainingDistance);\n}\n\n/**\n * {@inheritdoc traverseEdge}\n */\nfunction calcLabelPosition(points: Point[]): Point {\n if (points.length === 1) {\n return points[0];\n }\n return traverseEdge(points);\n}\n\nexport const roundNumber = (num: number, precision = 2) => {\n const factor = Math.pow(10, precision);\n return Math.round(num * factor) / factor;\n};\n\nexport const calculatePoint = (points: Point[], distanceToTraverse: number): Point => {\n let prevPoint: Point | undefined = undefined;\n let remainingDistance = distanceToTraverse;\n for (const point of points) {\n if (prevPoint) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) {\n return prevPoint;\n }\n if (distanceRatio >= 1) {\n return { x: point.x, y: point.y };\n }\n if (distanceRatio > 0 && distanceRatio < 1) {\n return {\n x: roundNumber((1 - distanceRatio) * prevPoint.x + distanceRatio * point.x, 5),\n y: roundNumber((1 - distanceRatio) * prevPoint.y + distanceRatio * point.y, 5),\n };\n }\n }\n }\n prevPoint = point;\n }\n throw new Error('Could not find a suitable point for the given distance');\n};\n\nconst calcCardinalityPosition = (\n isRelationTypePresent: boolean,\n points: Point[],\n initialPosition: Point\n) => {\n log.info(`our points ${JSON.stringify(points)}`);\n if (points[0] !== initialPosition) {\n points = points.reverse();\n }\n // Traverse only 25 total distance along points to find cardinality point\n const distanceToCardinalityPoint = 25;\n const center = calculatePoint(points, distanceToCardinalityPoint);\n // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n const d = isRelationTypePresent ? 10 : 5;\n //Calculate Angle for x and y axis\n const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n const cardinalityPosition = { x: 0, y: 0 };\n //Calculation cardinality position using angle, center point on the line/curve but perpendicular and with offset-distance\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n return cardinalityPosition;\n};\n\n/**\n * Calculates the terminal label position.\n *\n * @param terminalMarkerSize - Terminal marker size.\n * @param position - Position of label relative to points.\n * @param _points - Array of points.\n * @returns - The `cardinalityPosition`.\n */\nfunction calcTerminalLabelPosition(\n terminalMarkerSize: number,\n position: 'start_left' | 'start_right' | 'end_left' | 'end_right',\n _points: Point[]\n): Point {\n const points = structuredClone(_points);\n log.info('our points', points);\n if (position !== 'start_left' && position !== 'start_right') {\n points.reverse();\n }\n\n // Traverse only 25 total distance along points to find cardinality point\n const distanceToCardinalityPoint = 25 + terminalMarkerSize;\n const center = calculatePoint(points, distanceToCardinalityPoint);\n\n // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n const d = 10 + terminalMarkerSize * 0.5;\n //Calculate Angle for x and y axis\n const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n\n const cardinalityPosition: Point = { x: 0, y: 0 };\n //Calculation cardinality position using angle, center point on the line/curve but perpendicular and with offset-distance\n\n if (position === 'start_left') {\n cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2;\n } else if (position === 'end_right') {\n cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5;\n cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5;\n } else if (position === 'end_left') {\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5;\n } else {\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n }\n return cardinalityPosition;\n}\n\n/**\n * Gets styles from an array of declarations\n *\n * @param arr - Declarations\n * @returns The styles grouped as strings\n */\nexport function getStylesFromArray(arr: string[]): { style: string; labelStyle: string } {\n let style = '';\n let labelStyle = '';\n\n for (const element of arr) {\n if (element !== undefined) {\n // add text properties to label style definition\n if (element.startsWith('color:') || element.startsWith('text-align:')) {\n labelStyle = labelStyle + element + ';';\n } else {\n style = style + element + ';';\n }\n }\n }\n\n return { style, labelStyle };\n}\n\nlet cnt = 0;\nexport const generateId = () => {\n cnt++;\n return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt;\n};\n\n/**\n * Generates a random hexadecimal id of the given length.\n *\n * @param length - Length of string.\n * @returns The generated string.\n */\nfunction makeRandomHex(length: number): string {\n let result = '';\n const characters = '0123456789abcdef';\n const charactersLength = characters.length;\n for (let i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\n\nexport const random = (options: { length: number }) => {\n return makeRandomHex(options.length);\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: 'start',\n style: '#666',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n valign: undefined,\n text: '',\n };\n};\n\n/**\n * Adds text to an element\n *\n * @param elem - SVG Element to add text to\n * @param textData - Text options.\n * @returns Text element with given styling and content\n */\nexport const drawSimpleText = function (\n elem: SVGElement,\n textData: {\n text: string;\n x: number;\n y: number;\n anchor: 'start' | 'middle' | 'end';\n fontFamily: string;\n fontSize: string | number;\n fontWeight: string | number;\n fill: string;\n class: string | undefined;\n textMargin: number;\n }\n): SVGTextElement {\n // Remove and ignore br:s\n const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n const [, _fontSizePx] = parseFontSize(textData.fontSize);\n\n const textElem = elem.append('text') as any;\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.style('font-family', textData.fontFamily);\n textElem.style('font-size', _fontSizePx);\n textElem.style('font-weight', textData.fontWeight);\n textElem.attr('fill', textData.fill);\n\n if (textData.class !== undefined) {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n\n return textElem;\n};\n\ninterface WrapLabelConfig {\n fontSize: number;\n fontFamily: string;\n fontWeight: number;\n joinWith: string;\n}\n\nexport const wrapLabel: (label: string, maxWidth: number, config: WrapLabelConfig) => string =\n memoize(\n (label: string, maxWidth: number, config: WrapLabelConfig): string => {\n if (!label) {\n return label;\n }\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', joinWith: '
' },\n config\n );\n if (common.lineBreakRegex.test(label)) {\n return label;\n }\n const words = label.split(' ').filter(Boolean);\n const completedLines: string[] = [];\n let nextLine = '';\n words.forEach((word, index) => {\n const wordLength = calculateTextWidth(`${word} `, config);\n const nextLineLength = calculateTextWidth(nextLine, config);\n if (wordLength > maxWidth) {\n const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, '-', config);\n completedLines.push(nextLine, ...hyphenatedStrings);\n nextLine = remainingWord;\n } else if (nextLineLength + wordLength >= maxWidth) {\n completedLines.push(nextLine);\n nextLine = word;\n } else {\n nextLine = [nextLine, word].filter(Boolean).join(' ');\n }\n const currentWord = index + 1;\n const isLastWord = currentWord === words.length;\n if (isLastWord) {\n completedLines.push(nextLine);\n }\n });\n return completedLines.filter((line) => line !== '').join(config.joinWith);\n },\n (label, maxWidth, config) =>\n `${label}${maxWidth}${config.fontSize}${config.fontWeight}${config.fontFamily}${config.joinWith}`\n );\n\ninterface BreakStringOutput {\n hyphenatedStrings: string[];\n remainingWord: string;\n}\n\nconst breakString: (\n word: string,\n maxWidth: number,\n hyphenCharacter: string,\n config: WrapLabelConfig\n) => BreakStringOutput = memoize(\n (\n word: string,\n maxWidth: number,\n hyphenCharacter = '-',\n config: WrapLabelConfig\n ): BreakStringOutput => {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 0 },\n config\n );\n const characters = [...word];\n const lines: string[] = [];\n let currentLine = '';\n characters.forEach((character, index) => {\n const nextLine = `${currentLine}${character}`;\n const lineWidth = calculateTextWidth(nextLine, config);\n if (lineWidth >= maxWidth) {\n const currentCharacter = index + 1;\n const isLastLine = characters.length === currentCharacter;\n const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`;\n lines.push(isLastLine ? nextLine : hyphenatedNextLine);\n currentLine = '';\n } else {\n currentLine = nextLine;\n }\n });\n return { hyphenatedStrings: lines, remainingWord: currentLine };\n },\n (word, maxWidth, hyphenCharacter = '-', config) =>\n `${word}${maxWidth}${hyphenCharacter}${config.fontSize}${config.fontWeight}${config.fontFamily}`\n);\n\n/**\n * This calculates the text's height, taking into account the wrap breaks and both the statically\n * configured height, width, and the length of the text (in pixels).\n *\n * If the wrapped text text has greater height, we extend the height, so it's value won't overflow.\n *\n * @param text - The text to measure\n * @param config - The config for fontSize, fontFamily, and fontWeight all impacting the\n * resulting size\n * @returns The height for the given text\n */\nexport function calculateTextHeight(\n text: Parameters[0],\n config: Parameters[1]\n): ReturnType['height'] {\n return calculateTextDimensions(text, config).height;\n}\n\n/**\n * This calculates the width of the given text, font size and family.\n *\n * @param text - The text to calculate the width of\n * @param config - The config for fontSize, fontFamily, and fontWeight all impacting the\n * resulting size\n * @returns The width for the given text\n */\nexport function calculateTextWidth(\n text: Parameters[0],\n config: Parameters[1]\n): ReturnType['width'] {\n return calculateTextDimensions(text, config).width;\n}\n\n/**\n * This calculates the dimensions of the given text, font size, font family, font weight, and\n * margins.\n *\n * @param text - The text to calculate the width of\n * @param config - The config for fontSize, fontFamily, fontWeight, and margin all impacting\n * the resulting size\n * @returns The dimensions for the given text\n */\nexport const calculateTextDimensions: (\n text: string,\n config: TextDimensionConfig\n) => TextDimensions = memoize(\n (text: string, config: TextDimensionConfig): TextDimensions => {\n const { fontSize = 12, fontFamily = 'Arial', fontWeight = 400 } = config;\n if (!text) {\n return { width: 0, height: 0 };\n }\n\n const [, _fontSizePx] = parseFontSize(fontSize);\n\n // We can't really know if the user supplied font family will render on the user agent;\n // thus, we'll take the max width between the user supplied font family, and a default\n // of sans-serif.\n const fontFamilies = ['sans-serif', fontFamily];\n const lines = text.split(common.lineBreakRegex);\n const dims = [];\n\n const body = select('body');\n // We don't want to leak DOM elements - if a removal operation isn't available\n // for any reason, do not continue.\n if (!body.remove) {\n return { width: 0, height: 0, lineHeight: 0 };\n }\n\n const g = body.append('svg');\n\n for (const fontFamily of fontFamilies) {\n let cHeight = 0;\n const dim = { width: 0, height: 0, lineHeight: 0 };\n for (const line of lines) {\n const textObj = getTextObj();\n textObj.text = line || ZERO_WIDTH_SPACE;\n // @ts-ignore TODO: Fix D3 types\n const textElem = drawSimpleText(g, textObj)\n // @ts-ignore TODO: Fix D3 types\n .style('font-size', _fontSizePx)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n\n const bBox = (textElem._groups || textElem)[0][0].getBBox();\n if (bBox.width === 0 && bBox.height === 0) {\n throw new Error('svg element not in render tree');\n }\n dim.width = Math.round(Math.max(dim.width, bBox.width));\n cHeight = Math.round(bBox.height);\n dim.height += cHeight;\n dim.lineHeight = Math.round(Math.max(dim.lineHeight, cHeight));\n }\n dims.push(dim);\n }\n\n g.remove();\n\n const index =\n isNaN(dims[1].height) ||\n isNaN(dims[1].width) ||\n isNaN(dims[1].lineHeight) ||\n (dims[0].height > dims[1].height &&\n dims[0].width > dims[1].width &&\n dims[0].lineHeight > dims[1].lineHeight)\n ? 0\n : 1;\n return dims[index];\n },\n (text, config) => `${text}${config.fontSize}${config.fontWeight}${config.fontFamily}`\n);\n\nexport class InitIDGenerator {\n private count = 0;\n public next: () => number;\n constructor(deterministic = false, seed?: string) {\n // TODO: Seed is only used for length?\n // v11: Use the actual value of seed string to generate an initial value for count.\n this.count = seed ? seed.length : 0;\n this.next = deterministic ? () => this.count++ : () => Date.now();\n }\n}\n\nlet decoder: HTMLDivElement;\n\n/**\n * Decodes HTML, source: {@link https://github.com/shrpne/entity-decode/blob/v2.0.1/browser.js}\n *\n * @param html - HTML as a string\n * @returns Unescaped HTML\n */\nexport const entityDecode = function (html: string): string {\n decoder = decoder || document.createElement('div');\n // Escape HTML before decoding for HTML Entities\n html = escape(html).replace(/%26/g, '&').replace(/%23/g, '#').replace(/%3B/g, ';');\n decoder.innerHTML = html;\n\n return unescape(decoder.textContent!);\n};\n\nexport interface DetailedError {\n str: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hash: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error?: any;\n message?: string;\n}\n\n/** @param error - The error to check */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isDetailedError(error: any): error is DetailedError {\n return 'str' in error;\n}\n\n/** @param error - The error to convert to an error message */\nexport function getErrorMessage(error: unknown): string {\n if (error instanceof Error) {\n return error.message;\n }\n return String(error);\n}\n\n/**\n * Appends element with the given title and css class.\n *\n * @param parent - d3 svg object to append title to\n * @param cssClass - CSS class for the element containing the title\n * @param titleTopMargin - Margin in pixels between title and rest of the graph\n * @param title - The title. If empty, returns immediately.\n */\nexport const insertTitle = (\n parent: D3Element,\n cssClass: string,\n titleTopMargin: number,\n title?: string\n): void => {\n if (!title) {\n return;\n }\n const bounds = parent.node()?.getBBox();\n if (!bounds) {\n return;\n }\n parent\n .append('text')\n .text(title)\n .attr('text-anchor', 'middle')\n .attr('x', bounds.x + bounds.width / 2)\n .attr('y', -titleTopMargin)\n .attr('class', cssClass);\n};\n\n/**\n * Parses a raw fontSize configuration value into a number and string value.\n *\n * @param fontSize - a string or number font size configuration value\n *\n * @returns parsed number and string style font size values, or nulls if a number value can't\n * be parsed from an input string.\n */\nexport const parseFontSize = (fontSize: string | number | undefined): [number?, string?] => {\n // if the font size is a number, assume a px string representation\n if (typeof fontSize === 'number') {\n return [fontSize, fontSize + 'px'];\n }\n\n const fontSizeNumber = parseInt(fontSize ?? '', 10);\n if (Number.isNaN(fontSizeNumber)) {\n // if a number value can't be parsed, return null for both values\n return [undefined, undefined];\n } else if (fontSize === String(fontSizeNumber)) {\n // if a string input doesn't contain any units, assume px units\n return [fontSizeNumber, fontSize + 'px'];\n } else {\n return [fontSizeNumber, fontSize];\n }\n};\n\nexport function cleanAndMerge(defaultData: T, data?: Partial): T {\n return merge({}, defaultData, data);\n}\n\nexport default {\n assignWithDepth,\n wrapLabel,\n calculateTextHeight,\n calculateTextWidth,\n calculateTextDimensions,\n cleanAndMerge,\n detectInit,\n detectDirective,\n isSubstringInArray,\n interpolateToCurve,\n calcLabelPosition,\n calcCardinalityPosition,\n calcTerminalLabelPosition,\n formatUrl,\n getStylesFromArray,\n generateId,\n random,\n runFunc,\n entityDecode,\n insertTitle,\n parseFontSize,\n InitIDGenerator,\n};\n\n/**\n * @param text - text to be encoded\n * @returns\n */\nexport const encodeEntities = function (text: string): string {\n let txt = text;\n\n txt = txt.replace(/style.*:\\S*#.*;/g, function (s): string {\n return s.substring(0, s.length - 1);\n });\n txt = txt.replace(/classDef.*:\\S*#.*;/g, function (s): string {\n return s.substring(0, s.length - 1);\n });\n\n txt = txt.replace(/#\\w+;/g, function (s) {\n const innerTxt = s.substring(1, s.length - 1);\n\n const isInt = /^\\+?\\d+$/.test(innerTxt);\n if (isInt) {\n return '\uFB02\u00B0\u00B0' + innerTxt + '\u00B6\u00DF';\n } else {\n return '\uFB02\u00B0' + innerTxt + '\u00B6\u00DF';\n }\n });\n\n return txt;\n};\n\n/**\n *\n * @param text - text to be decoded\n * @returns\n */\nexport const decodeEntities = function (text: string): string {\n return text.replace(/\uFB02\u00B0\u00B0/g, '&#').replace(/\uFB02\u00B0/g, '&').replace(/\u00B6\u00DF/g, ';');\n};\n\nexport const isString = (value: unknown): value is string => {\n return typeof value === 'string';\n};\n\nexport const getEdgeId = (\n from: string,\n to: string,\n {\n counter = 0,\n prefix,\n suffix,\n }: {\n counter?: number;\n prefix?: string;\n suffix?: string;\n }\n) => {\n return `${prefix ? `${prefix}_` : ''}${from}_${to}_${counter}${suffix ? `_${suffix}` : ''}`;\n};\n\n/**\n * D3's `selection.attr` method doesn't officially support `undefined`.\n *\n * However, it seems if you do pass `undefined`, it seems to be treated as `null`\n * (e.g. it removes the attribute).\n */\nexport function handleUndefinedAttr(\n attrValue: Parameters['attr']>[1] | undefined\n) {\n return attrValue ?? null;\n}\n", "import { select } from 'd3';\nimport svgDraw from './svgDraw.js';\nimport { log } from '../../logger.js';\nimport { parser } from './parser/c4Diagram.jison';\nimport common from '../common/common.js';\nimport c4Db from './c4Db.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport assignWithDepth from '../../assignWithDepth.js';\nimport { wrapLabel, calculateTextWidth, calculateTextHeight } from '../../utils.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\nlet globalBoundaryMaxX = 0,\n globalBoundaryMaxY = 0;\n\nlet c4ShapeInRow = 4;\nlet c4BoundaryInRow = 2;\n\nparser.yy = c4Db;\n\nlet conf = {};\n\nclass Bounds {\n constructor(diagObj) {\n this.name = '';\n this.data = {};\n this.data.startx = undefined;\n this.data.stopx = undefined;\n this.data.starty = undefined;\n this.data.stopy = undefined;\n this.data.widthLimit = undefined;\n\n this.nextData = {};\n this.nextData.startx = undefined;\n this.nextData.stopx = undefined;\n this.nextData.starty = undefined;\n this.nextData.stopy = undefined;\n this.nextData.cnt = 0;\n\n setConf(diagObj.db.getConfig());\n }\n\n setData(startx, stopx, starty, stopy) {\n this.nextData.startx = this.data.startx = startx;\n this.nextData.stopx = this.data.stopx = stopx;\n this.nextData.starty = this.data.starty = starty;\n this.nextData.stopy = this.data.stopy = stopy;\n }\n\n updateVal(obj, key, val, fun) {\n if (obj[key] === undefined) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n }\n\n insert(c4Shape) {\n this.nextData.cnt = this.nextData.cnt + 1;\n let _startx =\n this.nextData.startx === this.nextData.stopx\n ? this.nextData.stopx + c4Shape.margin\n : this.nextData.stopx + c4Shape.margin * 2;\n let _stopx = _startx + c4Shape.width;\n let _starty = this.nextData.starty + c4Shape.margin * 2;\n let _stopy = _starty + c4Shape.height;\n if (\n _startx >= this.data.widthLimit ||\n _stopx >= this.data.widthLimit ||\n this.nextData.cnt > c4ShapeInRow\n ) {\n _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;\n _starty = this.nextData.stopy + c4Shape.margin * 2;\n\n this.nextData.stopx = _stopx = _startx + c4Shape.width;\n this.nextData.starty = this.nextData.stopy;\n this.nextData.stopy = _stopy = _starty + c4Shape.height;\n this.nextData.cnt = 1;\n }\n\n c4Shape.x = _startx;\n c4Shape.y = _starty;\n\n this.updateVal(this.data, 'startx', _startx, Math.min);\n this.updateVal(this.data, 'starty', _starty, Math.min);\n this.updateVal(this.data, 'stopx', _stopx, Math.max);\n this.updateVal(this.data, 'stopy', _stopy, Math.max);\n\n this.updateVal(this.nextData, 'startx', _startx, Math.min);\n this.updateVal(this.nextData, 'starty', _starty, Math.min);\n this.updateVal(this.nextData, 'stopx', _stopx, Math.max);\n this.updateVal(this.nextData, 'stopy', _stopy, Math.max);\n }\n\n init(diagObj) {\n this.name = '';\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n widthLimit: undefined,\n };\n this.nextData = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n cnt: 0,\n };\n setConf(diagObj.db.getConfig());\n }\n\n bumpLastMargin(margin) {\n this.data.stopx += margin;\n this.data.stopy += margin;\n }\n}\n\nexport const setConf = function (cnf) {\n assignWithDepth(conf, cnf);\n\n if (cnf.fontFamily) {\n conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n};\n\nconst c4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + 'FontFamily'],\n fontSize: cnf[typeC4Shape + 'FontSize'],\n fontWeight: cnf[typeC4Shape + 'FontWeight'],\n };\n};\n\nconst boundaryFont = (cnf) => {\n return {\n fontFamily: cnf.boundaryFontFamily,\n fontSize: cnf.boundaryFontSize,\n fontWeight: cnf.boundaryFontWeight,\n };\n};\n\nconst messageFont = (cnf) => {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight,\n };\n};\n\n/**\n * @param textType\n * @param c4Shape\n * @param c4ShapeTextWrap\n * @param textConf\n * @param textLimitWidth\n */\nfunction calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {\n if (!c4Shape[textType].width) {\n if (c4ShapeTextWrap) {\n c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf);\n c4Shape[textType].textLines = c4Shape[textType].text.split(common.lineBreakRegex).length;\n // c4Shape[textType].width = calculateTextWidth(c4Shape[textType].text, textConf);\n c4Shape[textType].width = textLimitWidth;\n // c4Shape[textType].height = c4Shape[textType].textLines * textConf.fontSize;\n c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf);\n } else {\n let lines = c4Shape[textType].text.split(common.lineBreakRegex);\n c4Shape[textType].textLines = lines.length;\n let lineHeight = 0;\n c4Shape[textType].height = 0;\n c4Shape[textType].width = 0;\n for (const line of lines) {\n c4Shape[textType].width = Math.max(\n calculateTextWidth(line, textConf),\n c4Shape[textType].width\n );\n lineHeight = calculateTextHeight(line, textConf);\n c4Shape[textType].height = c4Shape[textType].height + lineHeight;\n }\n // c4Shapes[textType].height = c4Shapes[textType].textLines * textConf.fontSize;\n }\n }\n}\n\nexport const drawBoundary = function (diagram, boundary, bounds) {\n boundary.x = bounds.data.startx;\n boundary.y = bounds.data.starty;\n boundary.width = bounds.data.stopx - bounds.data.startx;\n boundary.height = bounds.data.stopy - bounds.data.starty;\n\n boundary.label.y = conf.c4ShapeMargin - 35;\n\n let boundaryTextWrap = boundary.wrap && conf.wrap;\n let boundaryLabelConf = boundaryFont(conf);\n boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;\n boundaryLabelConf.fontWeight = 'bold';\n let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf);\n calcC4ShapeTextWH('label', boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);\n\n svgDraw.drawBoundary(diagram, boundary, conf);\n};\n\nexport const drawC4ShapeArray = function (currentBounds, diagram, c4ShapeArray, c4ShapeKeys) {\n // Upper Y is relative point\n let Y = 0;\n // Draw the c4ShapeArray\n for (const c4ShapeKey of c4ShapeKeys) {\n Y = 0;\n const c4Shape = c4ShapeArray[c4ShapeKey];\n\n // calc c4 shape type width and height\n\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;\n c4Shape.typeC4Shape.width = calculateTextWidth(\n '\u00AB' + c4Shape.typeC4Shape.text + '\u00BB',\n c4ShapeTypeConf\n );\n c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;\n c4Shape.typeC4Shape.Y = conf.c4ShapePadding;\n Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;\n\n // set image width and height c4Shape.x + c4Shape.width / 2 - 24, c4Shape.y + 28\n // let imageWidth = 0,\n // imageHeight = 0,\n // imageY = 0;\n //\n c4Shape.image = { width: 0, height: 0, Y: 0 };\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n break;\n }\n if (c4Shape.sprite) {\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n }\n\n // Y = conf.c4ShapePadding + c4Shape.image.height;\n\n let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;\n let textLimitWidth = conf.width - conf.c4ShapePadding * 2;\n\n let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;\n c4ShapeLabelConf.fontWeight = 'bold';\n calcC4ShapeTextWH('label', c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);\n c4Shape.label.Y = Y + 8;\n Y = c4Shape.label.Y + c4Shape.label.height;\n\n if (c4Shape.type && c4Shape.type.text !== '') {\n c4Shape.type.text = '[' + c4Shape.type.text + ']';\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH('type', c4Shape, c4ShapeTextWrap, c4ShapeTypeConf, textLimitWidth);\n c4Shape.type.Y = Y + 5;\n Y = c4Shape.type.Y + c4Shape.type.height;\n } else if (c4Shape.techn && c4Shape.techn.text !== '') {\n c4Shape.techn.text = '[' + c4Shape.techn.text + ']';\n let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);\n calcC4ShapeTextWH('techn', c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);\n c4Shape.techn.Y = Y + 5;\n Y = c4Shape.techn.Y + c4Shape.techn.height;\n }\n\n let rectHeight = Y;\n let rectWidth = c4Shape.label.width;\n\n if (c4Shape.descr && c4Shape.descr.text !== '') {\n let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH('descr', c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);\n c4Shape.descr.Y = Y + 20;\n Y = c4Shape.descr.Y + c4Shape.descr.height;\n\n rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);\n rectHeight = Y - c4Shape.descr.textLines * 5;\n }\n\n rectWidth = rectWidth + conf.c4ShapePadding;\n // let rectHeight =\n\n c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);\n c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);\n c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;\n\n currentBounds.insert(c4Shape);\n\n svgDraw.drawC4Shape(diagram, c4Shape, conf);\n }\n\n currentBounds.bumpLastMargin(conf.c4ShapeMargin);\n};\n\nclass Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n}\n\n/* * *\n * Get the intersection of the line between the center point of a rectangle and a point outside the rectangle.\n * Algorithm idea.\n * Using a point outside the rectangle as the coordinate origin, the graph is divided into four quadrants, and each quadrant is divided into two cases, with separate treatment on the coordinate axes\n * 1. The case of coordinate axes.\n * 1. The case of the negative x-axis\n * 2. The case of the positive x-axis\n * 3. The case of the positive y-axis\n * 4. The negative y-axis case\n * 2. Quadrant cases.\n * 2.1. first quadrant: the case where the line intersects the left side of the rectangle; the case where it intersects the lower side of the rectangle\n * 2.2. second quadrant: the case where the line intersects the right side of the rectangle; the case where it intersects the lower edge of the rectangle\n * 2.3. third quadrant: the case where the line intersects the right side of the rectangle; the case where it intersects the upper edge of the rectangle\n * 2.4. fourth quadrant: the case where the line intersects the left side of the rectangle; the case where it intersects the upper side of the rectangle\n *\n */\nlet getIntersectPoint = function (fromNode, endPoint) {\n let x1 = fromNode.x;\n\n let y1 = fromNode.y;\n\n let x2 = endPoint.x;\n\n let y2 = endPoint.y;\n\n let fromCenterX = x1 + fromNode.width / 2;\n\n let fromCenterY = y1 + fromNode.height / 2;\n\n let dx = Math.abs(x1 - x2);\n\n let dy = Math.abs(y1 - y2);\n\n let tanDYX = dy / dx;\n\n let fromDYX = fromNode.height / fromNode.width;\n\n let returnPoint = null;\n\n if (y1 == y2 && x1 < x2) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY);\n } else if (y1 == y2 && x1 > x2) {\n returnPoint = new Point(x1, fromCenterY);\n } else if (x1 == x2 && y1 < y2) {\n returnPoint = new Point(fromCenterX, y1 + fromNode.height);\n } else if (x1 == x2 && y1 > y2) {\n returnPoint = new Point(fromCenterX, y1);\n }\n\n if (x1 > x2 && y1 < y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY + (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(\n fromCenterX - ((dx / dy) * fromNode.height) / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 < y2) {\n //\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY + (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(\n fromCenterX + ((dx / dy) * fromNode.height) / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY - (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(fromCenterX + ((fromNode.height / 2) * dx) / dy, y1);\n }\n } else if (x1 > x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY - (fromNode.width / 2) * tanDYX);\n } else {\n returnPoint = new Point(fromCenterX - ((fromNode.height / 2) * dx) / dy, y1);\n }\n }\n return returnPoint;\n};\n\nlet getIntersectPoints = function (fromNode, endNode) {\n let endIntersectPoint = { x: 0, y: 0 };\n endIntersectPoint.x = endNode.x + endNode.width / 2;\n endIntersectPoint.y = endNode.y + endNode.height / 2;\n let startPoint = getIntersectPoint(fromNode, endIntersectPoint);\n\n endIntersectPoint.x = fromNode.x + fromNode.width / 2;\n endIntersectPoint.y = fromNode.y + fromNode.height / 2;\n let endPoint = getIntersectPoint(endNode, endIntersectPoint);\n return { startPoint: startPoint, endPoint: endPoint };\n};\n\nexport const drawRels = function (diagram, rels, getC4ShapeObj, diagObj) {\n let i = 0;\n for (let rel of rels) {\n i = i + 1;\n let relTextWrap = rel.wrap && conf.wrap;\n let relConf = messageFont(conf);\n let diagramType = diagObj.db.getC4Type();\n if (diagramType === 'C4Dynamic') {\n rel.label.text = i + ': ' + rel.label.text;\n }\n let textLimitWidth = calculateTextWidth(rel.label.text, relConf);\n calcC4ShapeTextWH('label', rel, relTextWrap, relConf, textLimitWidth);\n\n if (rel.techn && rel.techn.text !== '') {\n textLimitWidth = calculateTextWidth(rel.techn.text, relConf);\n calcC4ShapeTextWH('techn', rel, relTextWrap, relConf, textLimitWidth);\n }\n\n if (rel.descr && rel.descr.text !== '') {\n textLimitWidth = calculateTextWidth(rel.descr.text, relConf);\n calcC4ShapeTextWH('descr', rel, relTextWrap, relConf, textLimitWidth);\n }\n\n let fromNode = getC4ShapeObj(rel.from);\n let endNode = getC4ShapeObj(rel.to);\n let points = getIntersectPoints(fromNode, endNode);\n rel.startPoint = points.startPoint;\n rel.endPoint = points.endPoint;\n }\n svgDraw.drawRels(diagram, rels, conf);\n};\n\n/**\n * @param diagram\n * @param parentBoundaryAlias\n * @param parentBounds\n * @param currentBoundaries\n * @param diagObj\n */\nfunction drawInsideBoundary(\n diagram,\n parentBoundaryAlias,\n parentBounds,\n currentBoundaries,\n diagObj\n) {\n let currentBounds = new Bounds(diagObj);\n // Calculate the width limit of the boundary. label/type \u7684\u957F\u5EA6\uFF0C\n currentBounds.data.widthLimit =\n parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length);\n // Math.min(\n // conf.width * conf.c4ShapeInRow + conf.c4ShapeMargin * conf.c4ShapeInRow * 2,\n // parentBounds.data.widthLimit / Math.min(conf.c4BoundaryInRow, currentBoundaries.length)\n // );\n for (let [i, currentBoundary] of currentBoundaries.entries()) {\n let Y = 0;\n currentBoundary.image = { width: 0, height: 0, Y: 0 };\n if (currentBoundary.sprite) {\n currentBoundary.image.width = 48;\n currentBoundary.image.height = 48;\n currentBoundary.image.Y = Y;\n Y = currentBoundary.image.Y + currentBoundary.image.height;\n }\n\n let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;\n\n let currentBoundaryLabelConf = boundaryFont(conf);\n currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;\n currentBoundaryLabelConf.fontWeight = 'bold';\n calcC4ShapeTextWH(\n 'label',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryLabelConf,\n currentBounds.data.widthLimit\n );\n currentBoundary.label.Y = Y + 8;\n Y = currentBoundary.label.Y + currentBoundary.label.height;\n\n if (currentBoundary.type && currentBoundary.type.text !== '') {\n currentBoundary.type.text = '[' + currentBoundary.type.text + ']';\n let currentBoundaryTypeConf = boundaryFont(conf);\n calcC4ShapeTextWH(\n 'type',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryTypeConf,\n currentBounds.data.widthLimit\n );\n currentBoundary.type.Y = Y + 5;\n Y = currentBoundary.type.Y + currentBoundary.type.height;\n }\n\n if (currentBoundary.descr && currentBoundary.descr.text !== '') {\n let currentBoundaryDescrConf = boundaryFont(conf);\n currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;\n calcC4ShapeTextWH(\n 'descr',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryDescrConf,\n currentBounds.data.widthLimit\n );\n currentBoundary.descr.Y = Y + 20;\n Y = currentBoundary.descr.Y + currentBoundary.descr.height;\n }\n\n if (i == 0 || i % c4BoundaryInRow === 0) {\n // Calculate the drawing start point of the currentBoundaries.\n let _x = parentBounds.data.startx + conf.diagramMarginX;\n let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;\n\n currentBounds.setData(_x, _x, _y, _y);\n } else {\n // Calculate the drawing start point of the currentBoundaries.\n let _x =\n currentBounds.data.stopx !== currentBounds.data.startx\n ? currentBounds.data.stopx + conf.diagramMarginX\n : currentBounds.data.startx;\n let _y = currentBounds.data.starty;\n\n currentBounds.setData(_x, _x, _y, _y);\n }\n currentBounds.name = currentBoundary.alias;\n let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);\n let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);\n\n if (currentPersonOrSystemKeys.length > 0) {\n drawC4ShapeArray(\n currentBounds,\n diagram,\n currentPersonOrSystemArray,\n currentPersonOrSystemKeys\n );\n }\n parentBoundaryAlias = currentBoundary.alias;\n let nextCurrentBoundaries = diagObj.db.getBoundarys(parentBoundaryAlias);\n\n if (nextCurrentBoundaries.length > 0) {\n // draw boundary inside currentBoundary\n drawInsideBoundary(\n diagram,\n parentBoundaryAlias,\n currentBounds,\n nextCurrentBoundaries,\n diagObj\n );\n }\n // draw boundary\n if (currentBoundary.alias !== 'global') {\n drawBoundary(diagram, currentBoundary, currentBounds);\n }\n parentBounds.data.stopy = Math.max(\n currentBounds.data.stopy + conf.c4ShapeMargin,\n parentBounds.data.stopy\n );\n parentBounds.data.stopx = Math.max(\n currentBounds.data.stopx + conf.c4ShapeMargin,\n parentBounds.data.stopx\n );\n globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);\n globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);\n }\n}\n\n/**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n *\n * @param {any} _text\n * @param {any} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (_text, id, _version, diagObj) {\n conf = getConfig().c4;\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n let db = diagObj.db;\n\n diagObj.db.setWrap(conf.wrap);\n\n c4ShapeInRow = db.getC4ShapeInRow();\n c4BoundaryInRow = db.getC4BoundaryInRow();\n\n log.debug(`C:${JSON.stringify(conf, null, 2)}`);\n\n const diagram =\n securityLevel === 'sandbox' ? root.select(`[id=\"${id}\"]`) : select(`[id=\"${id}\"]`);\n\n svgDraw.insertComputerIcon(diagram);\n svgDraw.insertDatabaseIcon(diagram);\n svgDraw.insertClockIcon(diagram);\n\n let screenBounds = new Bounds(diagObj);\n\n screenBounds.setData(\n conf.diagramMarginX,\n conf.diagramMarginX,\n conf.diagramMarginY,\n conf.diagramMarginY\n );\n\n screenBounds.data.widthLimit = screen.availWidth;\n globalBoundaryMaxX = conf.diagramMarginX;\n globalBoundaryMaxY = conf.diagramMarginY;\n\n const title = diagObj.db.getTitle();\n let currentBoundaries = diagObj.db.getBoundarys('');\n // switch (c4type) {\n // case 'C4Context':\n drawInsideBoundary(diagram, '', screenBounds, currentBoundaries, diagObj);\n // break;\n // }\n\n // The arrow head definition is attached to the svg once\n svgDraw.insertArrowHead(diagram);\n svgDraw.insertArrowEnd(diagram);\n svgDraw.insertArrowCrossHead(diagram);\n svgDraw.insertArrowFilledHead(diagram);\n\n drawRels(diagram, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);\n\n screenBounds.data.stopx = globalBoundaryMaxX;\n screenBounds.data.stopy = globalBoundaryMaxY;\n\n const box = screenBounds.data;\n\n // Make sure the height of the diagram supports long menus.\n let boxHeight = box.stopy - box.starty;\n\n let height = boxHeight + 2 * conf.diagramMarginY;\n\n // Make sure the width of the diagram supports wide menus.\n let boxWidth = box.stopx - box.startx;\n const width = boxWidth + 2 * conf.diagramMarginX;\n\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX)\n .attr('y', box.starty + conf.diagramMarginY);\n }\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n const extraVertForTitle = title ? 60 : 0;\n diagram.attr(\n 'viewBox',\n box.startx -\n conf.diagramMarginX +\n ' -' +\n (conf.diagramMarginY + extraVertForTitle) +\n ' ' +\n width +\n ' ' +\n (height + extraVertForTitle)\n );\n\n log.debug(`models:`, box);\n};\n\nexport default {\n drawPersonOrSystemArray: drawC4ShapeArray,\n drawBoundary,\n setConf,\n draw,\n};\n", "const getStyles = (options) =>\n `.person {\n stroke: ${options.personBorder};\n fill: ${options.personBkg};\n }\n`;\n\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport parser from './parser/c4Diagram.jison';\nimport db from './c4Db.js';\nimport renderer from './c4Renderer.js';\nimport styles from './styles.js';\nimport type { MermaidConfig } from '../../config.type.js';\nimport type { DiagramDefinition } from '../../diagram-api/types.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: ({ c4, wrap }: MermaidConfig) => {\n renderer.setConf(c4);\n db.setWrap(wrap);\n },\n};\n", "/**\n * Gets the original marked default options.\n */\nexport function _getDefaults() {\n return {\n async: false,\n breaks: false,\n extensions: null,\n gfm: true,\n hooks: null,\n pedantic: false,\n renderer: null,\n silent: false,\n tokenizer: null,\n walkTokens: null,\n };\n}\nexport let _defaults = _getDefaults();\nexport function changeDefaults(newDefaults) {\n _defaults = newDefaults;\n}\n", "/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n};\nconst getEscapeReplacement = (ch) => escapeReplacements[ch];\nexport function escape(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n }\n else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n return html;\n}\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\nexport function unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, (_, n) => {\n n = n.toLowerCase();\n if (n === 'colon')\n return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x'\n ? String.fromCharCode(parseInt(n.substring(2), 16))\n : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\nconst caret = /(^|[^\\[])\\^/g;\nexport function edit(regex, opt) {\n let source = typeof regex === 'string' ? regex : regex.source;\n opt = opt || '';\n const obj = {\n replace: (name, val) => {\n let valSource = typeof val === 'string' ? val : val.source;\n valSource = valSource.replace(caret, '$1');\n source = source.replace(name, valSource);\n return obj;\n },\n getRegex: () => {\n return new RegExp(source, opt);\n },\n };\n return obj;\n}\nexport function cleanUrl(href) {\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n }\n catch {\n return null;\n }\n return href;\n}\nexport const noopTest = { exec: () => null };\nexport function splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n let escaped = false;\n let curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\')\n escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n }\n else {\n // add space before unescaped |\n return ' |';\n }\n }), cells = row.split(/ \\|/);\n let i = 0;\n // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n if (!cells[0].trim()) {\n cells.shift();\n }\n if (cells.length > 0 && !cells[cells.length - 1].trim()) {\n cells.pop();\n }\n if (count) {\n if (cells.length > count) {\n cells.splice(count);\n }\n else {\n while (cells.length < count)\n cells.push('');\n }\n }\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param str\n * @param c\n * @param invert Remove suffix of non-c chars instead. Default falsey.\n */\nexport function rtrim(str, c, invert) {\n const l = str.length;\n if (l === 0) {\n return '';\n }\n // Length of suffix matching the invert condition.\n let suffLen = 0;\n // Step left until we fail to match the invert condition.\n while (suffLen < l) {\n const currChar = str.charAt(l - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n }\n else if (currChar !== c && invert) {\n suffLen++;\n }\n else {\n break;\n }\n }\n return str.slice(0, l - suffLen);\n}\nexport function findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n let level = 0;\n for (let i = 0; i < str.length; i++) {\n if (str[i] === '\\\\') {\n i++;\n }\n else if (str[i] === b[0]) {\n level++;\n }\n else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\n", "import { _defaults } from './defaults.ts';\nimport { rtrim, splitCells, escape, findClosingBracket, } from './helpers.ts';\nfunction outputLink(cap, link, raw, lexer) {\n const href = link.href;\n const title = link.title ? escape(link.title) : null;\n const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n if (cap[0].charAt(0) !== '!') {\n lexer.state.inLink = true;\n const token = {\n type: 'link',\n raw,\n href,\n title,\n text,\n tokens: lexer.inlineTokens(text),\n };\n lexer.state.inLink = false;\n return token;\n }\n return {\n type: 'image',\n raw,\n href,\n title,\n text: escape(text),\n };\n}\nfunction indentCodeCompensation(raw, text) {\n const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n if (matchIndentToCode === null) {\n return text;\n }\n const indentToCode = matchIndentToCode[1];\n return text\n .split('\\n')\n .map(node => {\n const matchIndentInNode = node.match(/^\\s+/);\n if (matchIndentInNode === null) {\n return node;\n }\n const [indentInNode] = matchIndentInNode;\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n return node;\n })\n .join('\\n');\n}\n/**\n * Tokenizer\n */\nexport class _Tokenizer {\n options;\n rules; // set by the lexer\n lexer; // set by the lexer\n constructor(options) {\n this.options = options || _defaults;\n }\n space(src) {\n const cap = this.rules.block.newline.exec(src);\n if (cap && cap[0].length > 0) {\n return {\n type: 'space',\n raw: cap[0],\n };\n }\n }\n code(src) {\n const cap = this.rules.block.code.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic\n ? rtrim(text, '\\n')\n : text,\n };\n }\n }\n fences(src) {\n const cap = this.rules.block.fences.exec(src);\n if (cap) {\n const raw = cap[0];\n const text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw,\n lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, '$1') : cap[2],\n text,\n };\n }\n }\n heading(src) {\n const cap = this.rules.block.heading.exec(src);\n if (cap) {\n let text = cap[2].trim();\n // remove trailing #s\n if (/#$/.test(text)) {\n const trimmed = rtrim(text, '#');\n if (this.options.pedantic) {\n text = trimmed.trim();\n }\n else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text,\n tokens: this.lexer.inline(text),\n };\n }\n }\n hr(src) {\n const cap = this.rules.block.hr.exec(src);\n if (cap) {\n return {\n type: 'hr',\n raw: rtrim(cap[0], '\\n'),\n };\n }\n }\n blockquote(src) {\n const cap = this.rules.block.blockquote.exec(src);\n if (cap) {\n let lines = rtrim(cap[0], '\\n').split('\\n');\n let raw = '';\n let text = '';\n const tokens = [];\n while (lines.length > 0) {\n let inBlockquote = false;\n const currentLines = [];\n let i;\n for (i = 0; i < lines.length; i++) {\n // get lines up to a continuation\n if (/^ {0,3}>/.test(lines[i])) {\n currentLines.push(lines[i]);\n inBlockquote = true;\n }\n else if (!inBlockquote) {\n currentLines.push(lines[i]);\n }\n else {\n break;\n }\n }\n lines = lines.slice(i);\n const currentRaw = currentLines.join('\\n');\n const currentText = currentRaw\n // precede setext continuation with 4 spaces so it isn't a setext\n .replace(/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g, '\\n $1')\n .replace(/^ {0,3}>[ \\t]?/gm, '');\n raw = raw ? `${raw}\\n${currentRaw}` : currentRaw;\n text = text ? `${text}\\n${currentText}` : currentText;\n // parse blockquote lines as top level tokens\n // merge paragraphs if this is a continuation\n const top = this.lexer.state.top;\n this.lexer.state.top = true;\n this.lexer.blockTokens(currentText, tokens, true);\n this.lexer.state.top = top;\n // if there is no continuation then we are done\n if (lines.length === 0) {\n break;\n }\n const lastToken = tokens[tokens.length - 1];\n if (lastToken?.type === 'code') {\n // blockquote continuation cannot be preceded by a code block\n break;\n }\n else if (lastToken?.type === 'blockquote') {\n // include continuation in nested blockquote\n const oldToken = lastToken;\n const newText = oldToken.raw + '\\n' + lines.join('\\n');\n const newToken = this.blockquote(newText);\n tokens[tokens.length - 1] = newToken;\n raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;\n text = text.substring(0, text.length - oldToken.text.length) + newToken.text;\n break;\n }\n else if (lastToken?.type === 'list') {\n // include continuation in nested list\n const oldToken = lastToken;\n const newText = oldToken.raw + '\\n' + lines.join('\\n');\n const newToken = this.list(newText);\n tokens[tokens.length - 1] = newToken;\n raw = raw.substring(0, raw.length - lastToken.raw.length) + newToken.raw;\n text = text.substring(0, text.length - oldToken.raw.length) + newToken.raw;\n lines = newText.substring(tokens[tokens.length - 1].raw.length).split('\\n');\n continue;\n }\n }\n return {\n type: 'blockquote',\n raw,\n tokens,\n text,\n };\n }\n }\n list(src) {\n let cap = this.rules.block.list.exec(src);\n if (cap) {\n let bull = cap[1].trim();\n const isordered = bull.length > 1;\n const list = {\n type: 'list',\n raw: '',\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: [],\n };\n bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n if (this.options.pedantic) {\n bull = isordered ? bull : '[*+-]';\n }\n // Get next list item\n const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n let endsWithBlankLine = false;\n // Check if current bullet point can start a new List Item\n while (src) {\n let endEarly = false;\n let raw = '';\n let itemContents = '';\n if (!(cap = itemRegex.exec(src))) {\n break;\n }\n if (this.rules.block.hr.test(src)) { // End list if bullet was actually HR (possibly move into itemRegex?)\n break;\n }\n raw = cap[0];\n src = src.substring(raw.length);\n let line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, (t) => ' '.repeat(3 * t.length));\n let nextLine = src.split('\\n', 1)[0];\n let blankLine = !line.trim();\n let indent = 0;\n if (this.options.pedantic) {\n indent = 2;\n itemContents = line.trimStart();\n }\n else if (blankLine) {\n indent = cap[1].length + 1;\n }\n else {\n indent = cap[2].search(/[^ ]/); // Find first non-space char\n indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n itemContents = line.slice(indent);\n indent += cap[1].length;\n }\n if (blankLine && /^ *$/.test(nextLine)) { // Items begin with at most one blank line\n raw += nextLine + '\\n';\n src = src.substring(nextLine.length + 1);\n endEarly = true;\n }\n if (!endEarly) {\n const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n // Check if following lines should be included in List Item\n while (src) {\n const rawLine = src.split('\\n', 1)[0];\n nextLine = rawLine;\n // Re-align to follow commonmark nesting rules\n if (this.options.pedantic) {\n nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');\n }\n // End list item if found code fences\n if (fencesBeginRegex.test(nextLine)) {\n break;\n }\n // End list item if found start of new heading\n if (headingBeginRegex.test(nextLine)) {\n break;\n }\n // End list item if found start of new bullet\n if (nextBulletRegex.test(nextLine)) {\n break;\n }\n // Horizontal rule found\n if (hrRegex.test(src)) {\n break;\n }\n if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) { // Dedent if possible\n itemContents += '\\n' + nextLine.slice(indent);\n }\n else {\n // not enough indentation\n if (blankLine) {\n break;\n }\n // paragraph continuation unless last line was a different block level element\n if (line.search(/[^ ]/) >= 4) { // indented code block\n break;\n }\n if (fencesBeginRegex.test(line)) {\n break;\n }\n if (headingBeginRegex.test(line)) {\n break;\n }\n if (hrRegex.test(line)) {\n break;\n }\n itemContents += '\\n' + nextLine;\n }\n if (!blankLine && !nextLine.trim()) { // Check if current line is blank\n blankLine = true;\n }\n raw += rawLine + '\\n';\n src = src.substring(rawLine.length + 1);\n line = nextLine.slice(indent);\n }\n }\n if (!list.loose) {\n // If the previous item ended with a blank line, the list is loose\n if (endsWithBlankLine) {\n list.loose = true;\n }\n else if (/\\n *\\n *$/.test(raw)) {\n endsWithBlankLine = true;\n }\n }\n let istask = null;\n let ischecked;\n // Check for task list items\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.exec(itemContents);\n if (istask) {\n ischecked = istask[0] !== '[ ] ';\n itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n list.items.push({\n type: 'list_item',\n raw,\n task: !!istask,\n checked: ischecked,\n loose: false,\n text: itemContents,\n tokens: [],\n });\n list.raw += raw;\n }\n // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n list.items[list.items.length - 1].raw = list.items[list.items.length - 1].raw.trimEnd();\n list.items[list.items.length - 1].text = list.items[list.items.length - 1].text.trimEnd();\n list.raw = list.raw.trimEnd();\n // Item child tokens handled here at end because we needed to have the final item to trim it first\n for (let i = 0; i < list.items.length; i++) {\n this.lexer.state.top = false;\n list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n if (!list.loose) {\n // Check if list should be loose\n const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n list.loose = hasMultipleLineBreaks;\n }\n }\n // Set all items to loose if list is loose\n if (list.loose) {\n for (let i = 0; i < list.items.length; i++) {\n list.items[i].loose = true;\n }\n }\n return list;\n }\n }\n html(src) {\n const cap = this.rules.block.html.exec(src);\n if (cap) {\n const token = {\n type: 'html',\n block: true,\n raw: cap[0],\n pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',\n text: cap[0],\n };\n return token;\n }\n }\n def(src) {\n const cap = this.rules.block.def.exec(src);\n if (cap) {\n const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline.anyPunctuation, '$1') : '';\n const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, '$1') : cap[3];\n return {\n type: 'def',\n tag,\n raw: cap[0],\n href,\n title,\n };\n }\n }\n table(src) {\n const cap = this.rules.block.table.exec(src);\n if (!cap) {\n return;\n }\n if (!/[:|]/.test(cap[2])) {\n // delimiter row must have a pipe (|) or colon (:) otherwise it is a setext heading\n return;\n }\n const headers = splitCells(cap[1]);\n const aligns = cap[2].replace(/^\\||\\| *$/g, '').split('|');\n const rows = cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : [];\n const item = {\n type: 'table',\n raw: cap[0],\n header: [],\n align: [],\n rows: [],\n };\n if (headers.length !== aligns.length) {\n // header and align columns must be equal, rows can be different.\n return;\n }\n for (const align of aligns) {\n if (/^ *-+: *$/.test(align)) {\n item.align.push('right');\n }\n else if (/^ *:-+: *$/.test(align)) {\n item.align.push('center');\n }\n else if (/^ *:-+ *$/.test(align)) {\n item.align.push('left');\n }\n else {\n item.align.push(null);\n }\n }\n for (let i = 0; i < headers.length; i++) {\n item.header.push({\n text: headers[i],\n tokens: this.lexer.inline(headers[i]),\n header: true,\n align: item.align[i],\n });\n }\n for (const row of rows) {\n item.rows.push(splitCells(row, item.header.length).map((cell, i) => {\n return {\n text: cell,\n tokens: this.lexer.inline(cell),\n header: false,\n align: item.align[i],\n };\n }));\n }\n return item;\n }\n lheading(src) {\n const cap = this.rules.block.lheading.exec(src);\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1],\n tokens: this.lexer.inline(cap[1]),\n };\n }\n }\n paragraph(src) {\n const cap = this.rules.block.paragraph.exec(src);\n if (cap) {\n const text = cap[1].charAt(cap[1].length - 1) === '\\n'\n ? cap[1].slice(0, -1)\n : cap[1];\n return {\n type: 'paragraph',\n raw: cap[0],\n text,\n tokens: this.lexer.inline(text),\n };\n }\n }\n text(src) {\n const cap = this.rules.block.text.exec(src);\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0],\n tokens: this.lexer.inline(cap[0]),\n };\n }\n }\n escape(src) {\n const cap = this.rules.inline.escape.exec(src);\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: escape(cap[1]),\n };\n }\n }\n tag(src) {\n const cap = this.rules.inline.tag.exec(src);\n if (cap) {\n if (!this.lexer.state.inLink && /^/i.test(cap[0])) {\n this.lexer.state.inLink = false;\n }\n if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = true;\n }\n else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = false;\n }\n return {\n type: 'html',\n raw: cap[0],\n inLink: this.lexer.state.inLink,\n inRawBlock: this.lexer.state.inRawBlock,\n block: false,\n text: cap[0],\n };\n }\n }\n link(src) {\n const cap = this.rules.inline.link.exec(src);\n if (cap) {\n const trimmedUrl = cap[2].trim();\n if (!this.options.pedantic && /^$/.test(trimmedUrl))) {\n return;\n }\n // ending angle bracket cannot be escaped\n const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n }\n else {\n // find closing parenthesis\n const lastParenIndex = findClosingBracket(cap[2], '()');\n if (lastParenIndex > -1) {\n const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n const linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n let href = cap[2];\n let title = '';\n if (this.options.pedantic) {\n // split pedantic href and title\n const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n if (link) {\n href = link[1];\n title = link[3];\n }\n }\n else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n href = href.trim();\n if (/^$/.test(trimmedUrl))) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n }\n else {\n href = href.slice(1, -1);\n }\n }\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline.anyPunctuation, '$1') : href,\n title: title ? title.replace(this.rules.inline.anyPunctuation, '$1') : title,\n }, cap[0], this.lexer);\n }\n }\n reflink(src, links) {\n let cap;\n if ((cap = this.rules.inline.reflink.exec(src))\n || (cap = this.rules.inline.nolink.exec(src))) {\n const linkString = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n const link = links[linkString.toLowerCase()];\n if (!link) {\n const text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text,\n };\n }\n return outputLink(cap, link, cap[0], this.lexer);\n }\n }\n emStrong(src, maskedSrc, prevChar = '') {\n let match = this.rules.inline.emStrongLDelim.exec(src);\n if (!match)\n return;\n // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u))\n return;\n const nextChar = match[1] || match[2] || '';\n if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {\n // unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)\n const lLength = [...match[0]].length - 1;\n let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;\n const endReg = match[0][0] === '*' ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;\n endReg.lastIndex = 0;\n // Clip maskedSrc to same section of string as src (move to lexer?)\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n if (!rDelim)\n continue; // skip single * in __abc*abc__\n rLength = [...rDelim].length;\n if (match[3] || match[4]) { // found another Left Delim\n delimTotal += rLength;\n continue;\n }\n else if (match[5] || match[6]) { // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n delimTotal -= rLength;\n if (delimTotal > 0)\n continue; // Haven't found enough closing delimiters\n // Remove extra characters. *a*** -> *a*\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n // char length can be >1 for unicode characters;\n const lastCharLength = [...match[0]][0].length;\n const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);\n // Create `em` if smallest delimiter has odd char count. *a***\n if (Math.min(lLength, rLength) % 2) {\n const text = raw.slice(1, -1);\n return {\n type: 'em',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text),\n };\n }\n // Create 'strong' if smallest delimiter has even char count. **a***\n const text = raw.slice(2, -2);\n return {\n type: 'strong',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text),\n };\n }\n }\n }\n codespan(src) {\n const cap = this.rules.inline.code.exec(src);\n if (cap) {\n let text = cap[2].replace(/\\n/g, ' ');\n const hasNonSpaceChars = /[^ ]/.test(text);\n const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n text = escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text,\n };\n }\n }\n br(src) {\n const cap = this.rules.inline.br.exec(src);\n if (cap) {\n return {\n type: 'br',\n raw: cap[0],\n };\n }\n }\n del(src) {\n const cap = this.rules.inline.del.exec(src);\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2],\n tokens: this.lexer.inlineTokens(cap[2]),\n };\n }\n }\n autolink(src) {\n const cap = this.rules.inline.autolink.exec(src);\n if (cap) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(cap[1]);\n href = 'mailto:' + text;\n }\n else {\n text = escape(cap[1]);\n href = text;\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [\n {\n type: 'text',\n raw: text,\n text,\n },\n ],\n };\n }\n }\n url(src) {\n let cap;\n if (cap = this.rules.inline.url.exec(src)) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(cap[0]);\n href = 'mailto:' + text;\n }\n else {\n // do extended autolink path validation\n let prevCapZero;\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? '';\n } while (prevCapZero !== cap[0]);\n text = escape(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + cap[0];\n }\n else {\n href = cap[0];\n }\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [\n {\n type: 'text',\n raw: text,\n text,\n },\n ],\n };\n }\n }\n inlineText(src) {\n const cap = this.rules.inline.text.exec(src);\n if (cap) {\n let text;\n if (this.lexer.state.inRawBlock) {\n text = cap[0];\n }\n else {\n text = escape(cap[0]);\n }\n return {\n type: 'text',\n raw: cap[0],\n text,\n };\n }\n }\n}\n", "import { edit, noopTest, } from './helpers.ts';\n/**\n * Block-Level Grammar\n */\nconst newline = /^(?: *(?:\\n|$))+/;\nconst blockCode = /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/;\nconst fences = /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/;\nconst hr = /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/;\nconst heading = /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/;\nconst bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nconst lheading = edit(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/)\n .replace(/bull/g, bullet) // lists can interrupt\n .replace(/blockCode/g, / {4}/) // indented code blocks can interrupt\n .replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt\n .replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt\n .replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt\n .replace(/html/g, / {0,3}<[^\\n>]+>\\n/) // block html can interrupt\n .getRegex();\nconst _paragraph = /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/;\nconst blockText = /^[^\\n]+/;\nconst _blockLabel = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nconst def = edit(/^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/)\n .replace('label', _blockLabel)\n .replace('title', /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/)\n .getRegex();\nconst list = edit(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/)\n .replace(/bull/g, bullet)\n .getRegex();\nconst _tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n + '|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title'\n + '|tr|track|ul';\nconst _comment = /|$))/;\nconst html = edit('^ {0,3}(?:' // optional indentation\n + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n + '|(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n + ')', 'i')\n .replace('comment', _comment)\n .replace('tag', _tag)\n .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n .getRegex();\nconst paragraph = edit(_paragraph)\n .replace('hr', hr)\n .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n .replace('|table', '')\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)')\n .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\nconst blockquote = edit(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/)\n .replace('paragraph', paragraph)\n .getRegex();\n/**\n * Normal Block Grammar\n */\nconst blockNormal = {\n blockquote,\n code: blockCode,\n def,\n fences,\n heading,\n hr,\n html,\n lheading,\n list,\n newline,\n paragraph,\n table: noopTest,\n text: blockText,\n};\n/**\n * GFM Block Grammar\n */\nconst gfmTable = edit('^ *([^\\\\n ].*)\\\\n' // Header\n + ' {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)' // Align\n + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)') // Cells\n .replace('hr', hr)\n .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n .replace('blockquote', ' {0,3}>')\n .replace('code', ' {4}[^\\\\n]')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)')\n .replace('tag', _tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\nconst blockGfm = {\n ...blockNormal,\n table: gfmTable,\n paragraph: edit(_paragraph)\n .replace('hr', hr)\n .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n .replace('table', gfmTable) // interrupt paragraphs with table\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)')\n .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n .getRegex(),\n};\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\nconst blockPedantic = {\n ...blockNormal,\n html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)'\n + '|<(tag)[\\\\s\\\\S]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n .replace('comment', _comment)\n .replace(/tag/g, '(?!(?:'\n + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n .getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest, // fences not supported\n lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n paragraph: edit(_paragraph)\n .replace('hr', hr)\n .replace('heading', ' *#{1,6} *[^\\n]')\n .replace('lheading', lheading)\n .replace('|table', '')\n .replace('blockquote', ' {0,3}>')\n .replace('|fences', '')\n .replace('|list', '')\n .replace('|html', '')\n .replace('|tag', '')\n .getRegex(),\n};\n/**\n * Inline-Level Grammar\n */\nconst escape = /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/;\nconst inlineCode = /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/;\nconst br = /^( {2,}|\\\\)\\n(?!\\s*$)/;\nconst inlineText = /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\\nconst blockSkip = /\\[[^[\\]]*?\\]\\([^\\(\\)]*?\\)|`[^`]*?`|<[^<>]*?>/g;\nconst emStrongLDelim = edit(/^(?:\\*+(?:((?!\\*)[punct])|[^\\s*]))|^_+(?:((?!_)[punct])|([^\\s_]))/, 'u')\n .replace(/punct/g, _punctuation)\n .getRegex();\nconst emStrongRDelimAst = edit('^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)' // Skip orphan inside strong\n + '|[^*]+(?=[^*])' // Consume to delim\n + '|(?!\\\\*)[punct](\\\\*+)(?=[\\\\s]|$)' // (1) #*** can only be a Right Delimiter\n + '|[^punct\\\\s](\\\\*+)(?!\\\\*)(?=[punct\\\\s]|$)' // (2) a***#, a*** can only be a Right Delimiter\n + '|(?!\\\\*)[punct\\\\s](\\\\*+)(?=[^punct\\\\s])' // (3) #***a, ***a can only be Left Delimiter\n + '|[\\\\s](\\\\*+)(?!\\\\*)(?=[punct])' // (4) ***# can only be Left Delimiter\n + '|(?!\\\\*)[punct](\\\\*+)(?!\\\\*)(?=[punct])' // (5) #***# can be either Left or Right Delimiter\n + '|[^punct\\\\s](\\\\*+)(?=[^punct\\\\s])', 'gu') // (6) a***a can be either Left or Right Delimiter\n .replace(/punct/g, _punctuation)\n .getRegex();\n// (6) Not allowed for _\nconst emStrongRDelimUnd = edit('^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)' // Skip orphan inside strong\n + '|[^_]+(?=[^_])' // Consume to delim\n + '|(?!_)[punct](_+)(?=[\\\\s]|$)' // (1) #___ can only be a Right Delimiter\n + '|[^punct\\\\s](_+)(?!_)(?=[punct\\\\s]|$)' // (2) a___#, a___ can only be a Right Delimiter\n + '|(?!_)[punct\\\\s](_+)(?=[^punct\\\\s])' // (3) #___a, ___a can only be Left Delimiter\n + '|[\\\\s](_+)(?!_)(?=[punct])' // (4) ___# can only be Left Delimiter\n + '|(?!_)[punct](_+)(?!_)(?=[punct])', 'gu') // (5) #___# can be either Left or Right Delimiter\n .replace(/punct/g, _punctuation)\n .getRegex();\nconst anyPunctuation = edit(/\\\\([punct])/, 'gu')\n .replace(/punct/g, _punctuation)\n .getRegex();\nconst autolink = edit(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/)\n .replace('scheme', /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/)\n .replace('email', /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/)\n .getRegex();\nconst _inlineComment = edit(_comment).replace('(?:-->|$)', '-->').getRegex();\nconst tag = edit('^comment'\n + '|^' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^') // CDATA section\n .replace('comment', _inlineComment)\n .replace('attribute', /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/)\n .getRegex();\nconst _inlineLabel = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\nconst link = edit(/^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/)\n .replace('label', _inlineLabel)\n .replace('href', /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/)\n .replace('title', /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/)\n .getRegex();\nconst reflink = edit(/^!?\\[(label)\\]\\[(ref)\\]/)\n .replace('label', _inlineLabel)\n .replace('ref', _blockLabel)\n .getRegex();\nconst nolink = edit(/^!?\\[(ref)\\](?:\\[\\])?/)\n .replace('ref', _blockLabel)\n .getRegex();\nconst reflinkSearch = edit('reflink|nolink(?!\\\\()', 'g')\n .replace('reflink', reflink)\n .replace('nolink', nolink)\n .getRegex();\n/**\n * Normal Inline Grammar\n */\nconst inlineNormal = {\n _backpedal: noopTest, // only used for GFM url\n anyPunctuation,\n autolink,\n blockSkip,\n br,\n code: inlineCode,\n del: noopTest,\n emStrongLDelim,\n emStrongRDelimAst,\n emStrongRDelimUnd,\n escape,\n link,\n nolink,\n punctuation,\n reflink,\n reflinkSearch,\n tag,\n text: inlineText,\n url: noopTest,\n};\n/**\n * Pedantic Inline Grammar\n */\nconst inlinePedantic = {\n ...inlineNormal,\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n .replace('label', _inlineLabel)\n .getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n .replace('label', _inlineLabel)\n .getRegex(),\n};\n/**\n * GFM Inline Grammar\n */\nconst inlineGfm = {\n ...inlineNormal,\n escape: edit(escape).replace('])', '~|])').getRegex(),\n url: edit(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/, 'i')\n .replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/)\n .getRegex(),\n _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\ {\n return leading + ' '.repeat(tabs.length);\n });\n }\n let token;\n let lastToken;\n let cutSrc;\n while (src) {\n if (this.options.extensions\n && this.options.extensions.block\n && this.options.extensions.block.some((extTokenizer) => {\n if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n if (token.raw.length === 1 && tokens.length > 0) {\n // if there's a single \\n as a spacer, it's terminating the last line,\n // so move it there so that we don't get unnecessary paragraph tags\n tokens[tokens.length - 1].raw += '\\n';\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n // code\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n // An indented code block cannot interrupt a paragraph.\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n // fences\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // heading\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // hr\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // blockquote\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // list\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // html\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // def\n if (token = this.tokenizer.def(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.raw;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n }\n else if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title,\n };\n }\n continue;\n }\n // table (gfm)\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // lheading\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // top-level paragraph\n // prevent paragraph consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startBlock) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startBlock.forEach((getStartIndex) => {\n tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n lastToken = tokens[tokens.length - 1];\n if (lastParagraphClipped && lastToken?.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n }\n else {\n tokens.push(token);\n }\n lastParagraphClipped = (cutSrc.length !== src.length);\n src = src.substring(token.raw.length);\n continue;\n }\n // text\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n }\n else {\n throw new Error(errMsg);\n }\n }\n }\n this.state.top = true;\n return tokens;\n }\n inline(src, tokens = []) {\n this.inlineQueue.push({ src, tokens });\n return tokens;\n }\n /**\n * Lexing/Compiling\n */\n inlineTokens(src, tokens = []) {\n let token, lastToken, cutSrc;\n // String with links masked to avoid interference with em and strong\n let maskedSrc = src;\n let match;\n let keepPrevChar, prevChar;\n // Mask out reflinks\n if (this.tokens.links) {\n const links = Object.keys(this.tokens.links);\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n }\n // Mask out other blocks\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n }\n // Mask out escaped characters\n while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);\n }\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n keepPrevChar = false;\n // extensions\n if (this.options.extensions\n && this.options.extensions.inline\n && this.options.extensions.inline.some((extTokenizer) => {\n if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n // escape\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // tag\n if (token = this.tokenizer.tag(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n // link\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // reflink, nolink\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n // em & strong\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // code\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // br\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // del (gfm)\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // autolink\n if (token = this.tokenizer.autolink(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // url (gfm)\n if (!this.state.inLink && (token = this.tokenizer.url(src))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // text\n // prevent inlineText consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startInline) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startInline.forEach((getStartIndex) => {\n tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (token = this.tokenizer.inlineText(cutSrc)) {\n src = src.substring(token.raw.length);\n if (token.raw.slice(-1) !== '_') { // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n }\n else {\n throw new Error(errMsg);\n }\n }\n }\n return tokens;\n }\n}\n", "import { _defaults } from './defaults.ts';\nimport { cleanUrl, escape, } from './helpers.ts';\n/**\n * Renderer\n */\nexport class _Renderer {\n options;\n parser; // set by the parser\n constructor(options) {\n this.options = options || _defaults;\n }\n space(token) {\n return '';\n }\n code({ text, lang, escaped }) {\n const langString = (lang || '').match(/^\\S*/)?.[0];\n const code = text.replace(/\\n$/, '') + '\\n';\n if (!langString) {\n return '
'\n                + (escaped ? code : escape(code, true))\n                + '
\\n';\n }\n return '
'\n            + (escaped ? code : escape(code, true))\n            + '
\\n';\n }\n blockquote({ tokens }) {\n const body = this.parser.parse(tokens);\n return `
\\n${body}
\\n`;\n }\n html({ text }) {\n return text;\n }\n heading({ tokens, depth }) {\n return `${this.parser.parseInline(tokens)}\\n`;\n }\n hr(token) {\n return '
\\n';\n }\n list(token) {\n const ordered = token.ordered;\n const start = token.start;\n let body = '';\n for (let j = 0; j < token.items.length; j++) {\n const item = token.items[j];\n body += this.listitem(item);\n }\n const type = ordered ? 'ol' : 'ul';\n const startAttr = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n return '<' + type + startAttr + '>\\n' + body + '\\n';\n }\n listitem(item) {\n let itemBody = '';\n if (item.task) {\n const checkbox = this.checkbox({ checked: !!item.checked });\n if (item.loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n }\n else {\n item.tokens.unshift({\n type: 'text',\n raw: checkbox + ' ',\n text: checkbox + ' ',\n });\n }\n }\n else {\n itemBody += checkbox + ' ';\n }\n }\n itemBody += this.parser.parse(item.tokens, !!item.loose);\n return `
  • ${itemBody}
  • \\n`;\n }\n checkbox({ checked }) {\n return '';\n }\n paragraph({ tokens }) {\n return `

    ${this.parser.parseInline(tokens)}

    \\n`;\n }\n table(token) {\n let header = '';\n // header\n let cell = '';\n for (let j = 0; j < token.header.length; j++) {\n cell += this.tablecell(token.header[j]);\n }\n header += this.tablerow({ text: cell });\n let body = '';\n for (let j = 0; j < token.rows.length; j++) {\n const row = token.rows[j];\n cell = '';\n for (let k = 0; k < row.length; k++) {\n cell += this.tablecell(row[k]);\n }\n body += this.tablerow({ text: cell });\n }\n if (body)\n body = `${body}`;\n return '\\n'\n + '\\n'\n + header\n + '\\n'\n + body\n + '
    \\n';\n }\n tablerow({ text }) {\n return `\\n${text}\\n`;\n }\n tablecell(token) {\n const content = this.parser.parseInline(token.tokens);\n const type = token.header ? 'th' : 'td';\n const tag = token.align\n ? `<${type} align=\"${token.align}\">`\n : `<${type}>`;\n return tag + content + `\\n`;\n }\n /**\n * span level renderer\n */\n strong({ tokens }) {\n return `${this.parser.parseInline(tokens)}`;\n }\n em({ tokens }) {\n return `${this.parser.parseInline(tokens)}`;\n }\n codespan({ text }) {\n return `${text}`;\n }\n br(token) {\n return '
    ';\n }\n del({ tokens }) {\n return `${this.parser.parseInline(tokens)}`;\n }\n link({ href, title, tokens }) {\n const text = this.parser.parseInline(tokens);\n const cleanHref = cleanUrl(href);\n if (cleanHref === null) {\n return text;\n }\n href = cleanHref;\n let out = '
    ';\n return out;\n }\n image({ href, title, text }) {\n const cleanHref = cleanUrl(href);\n if (cleanHref === null) {\n return text;\n }\n href = cleanHref;\n let out = `\"${text}\"`;\n {\n const tokens = genericToken[childTokens].flat(Infinity);\n values = values.concat(this.walkTokens(tokens, callback));\n });\n }\n else if (genericToken.tokens) {\n values = values.concat(this.walkTokens(genericToken.tokens, callback));\n }\n }\n }\n }\n return values;\n }\n use(...args) {\n const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };\n args.forEach((pack) => {\n // copy options to new object\n const opts = { ...pack };\n // set async to true if it was set to true before\n opts.async = this.defaults.async || opts.async || false;\n // ==-- Parse \"addon\" extensions --== //\n if (pack.extensions) {\n pack.extensions.forEach((ext) => {\n if (!ext.name) {\n throw new Error('extension name required');\n }\n if ('renderer' in ext) { // Renderer extensions\n const prevRenderer = extensions.renderers[ext.name];\n if (prevRenderer) {\n // Replace extension with func to run new extension but fall back if false\n extensions.renderers[ext.name] = function (...args) {\n let ret = ext.renderer.apply(this, args);\n if (ret === false) {\n ret = prevRenderer.apply(this, args);\n }\n return ret;\n };\n }\n else {\n extensions.renderers[ext.name] = ext.renderer;\n }\n }\n if ('tokenizer' in ext) { // Tokenizer Extensions\n if (!ext.level || (ext.level !== 'block' && ext.level !== 'inline')) {\n throw new Error(\"extension level must be 'block' or 'inline'\");\n }\n const extLevel = extensions[ext.level];\n if (extLevel) {\n extLevel.unshift(ext.tokenizer);\n }\n else {\n extensions[ext.level] = [ext.tokenizer];\n }\n if (ext.start) { // Function to check for start of token\n if (ext.level === 'block') {\n if (extensions.startBlock) {\n extensions.startBlock.push(ext.start);\n }\n else {\n extensions.startBlock = [ext.start];\n }\n }\n else if (ext.level === 'inline') {\n if (extensions.startInline) {\n extensions.startInline.push(ext.start);\n }\n else {\n extensions.startInline = [ext.start];\n }\n }\n }\n }\n if ('childTokens' in ext && ext.childTokens) { // Child tokens to be visited by walkTokens\n extensions.childTokens[ext.name] = ext.childTokens;\n }\n });\n opts.extensions = extensions;\n }\n // ==-- Parse \"overwrite\" extensions --== //\n if (pack.renderer) {\n const renderer = this.defaults.renderer || new _Renderer(this.defaults);\n for (const prop in pack.renderer) {\n if (!(prop in renderer)) {\n throw new Error(`renderer '${prop}' does not exist`);\n }\n if (['options', 'parser'].includes(prop)) {\n // ignore options property\n continue;\n }\n const rendererProp = prop;\n let rendererFunc = pack.renderer[rendererProp];\n if (!pack.useNewRenderer) {\n // TODO: Remove this in next major version\n rendererFunc = this.#convertRendererFunction(rendererFunc, rendererProp, renderer);\n }\n const prevRenderer = renderer[rendererProp];\n // Replace renderer with func to run extension, but fall back if false\n renderer[rendererProp] = (...args) => {\n let ret = rendererFunc.apply(renderer, args);\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n return ret || '';\n };\n }\n opts.renderer = renderer;\n }\n if (pack.tokenizer) {\n const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);\n for (const prop in pack.tokenizer) {\n if (!(prop in tokenizer)) {\n throw new Error(`tokenizer '${prop}' does not exist`);\n }\n if (['options', 'rules', 'lexer'].includes(prop)) {\n // ignore options, rules, and lexer properties\n continue;\n }\n const tokenizerProp = prop;\n const tokenizerFunc = pack.tokenizer[tokenizerProp];\n const prevTokenizer = tokenizer[tokenizerProp];\n // Replace tokenizer with func to run extension, but fall back if false\n // @ts-expect-error cannot type tokenizer function dynamically\n tokenizer[tokenizerProp] = (...args) => {\n let ret = tokenizerFunc.apply(tokenizer, args);\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n return ret;\n };\n }\n opts.tokenizer = tokenizer;\n }\n // ==-- Parse Hooks extensions --== //\n if (pack.hooks) {\n const hooks = this.defaults.hooks || new _Hooks();\n for (const prop in pack.hooks) {\n if (!(prop in hooks)) {\n throw new Error(`hook '${prop}' does not exist`);\n }\n if (prop === 'options') {\n // ignore options property\n continue;\n }\n const hooksProp = prop;\n const hooksFunc = pack.hooks[hooksProp];\n const prevHook = hooks[hooksProp];\n if (_Hooks.passThroughHooks.has(prop)) {\n // @ts-expect-error cannot type hook function dynamically\n hooks[hooksProp] = (arg) => {\n if (this.defaults.async) {\n return Promise.resolve(hooksFunc.call(hooks, arg)).then(ret => {\n return prevHook.call(hooks, ret);\n });\n }\n const ret = hooksFunc.call(hooks, arg);\n return prevHook.call(hooks, ret);\n };\n }\n else {\n // @ts-expect-error cannot type hook function dynamically\n hooks[hooksProp] = (...args) => {\n let ret = hooksFunc.apply(hooks, args);\n if (ret === false) {\n ret = prevHook.apply(hooks, args);\n }\n return ret;\n };\n }\n }\n opts.hooks = hooks;\n }\n // ==-- Parse WalkTokens extensions --== //\n if (pack.walkTokens) {\n const walkTokens = this.defaults.walkTokens;\n const packWalktokens = pack.walkTokens;\n opts.walkTokens = function (token) {\n let values = [];\n values.push(packWalktokens.call(this, token));\n if (walkTokens) {\n values = values.concat(walkTokens.call(this, token));\n }\n return values;\n };\n }\n this.defaults = { ...this.defaults, ...opts };\n });\n return this;\n }\n // TODO: Remove this in next major release\n #convertRendererFunction(func, prop, renderer) {\n switch (prop) {\n case 'heading':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, renderer.parser.parseInline(token.tokens), token.depth, unescape(renderer.parser.parseInline(token.tokens, renderer.parser.textRenderer)));\n };\n case 'code':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text, token.lang, !!token.escaped);\n };\n case 'table':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n let header = '';\n // header\n let cell = '';\n for (let j = 0; j < token.header.length; j++) {\n cell += this.tablecell({\n text: token.header[j].text,\n tokens: token.header[j].tokens,\n header: true,\n align: token.align[j],\n });\n }\n header += this.tablerow({ text: cell });\n let body = '';\n for (let j = 0; j < token.rows.length; j++) {\n const row = token.rows[j];\n cell = '';\n for (let k = 0; k < row.length; k++) {\n cell += this.tablecell({\n text: row[k].text,\n tokens: row[k].tokens,\n header: false,\n align: token.align[k],\n });\n }\n body += this.tablerow({ text: cell });\n }\n return func.call(this, header, body);\n };\n case 'blockquote':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n const body = this.parser.parse(token.tokens);\n return func.call(this, body);\n };\n case 'list':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n const ordered = token.ordered;\n const start = token.start;\n const loose = token.loose;\n let body = '';\n for (let j = 0; j < token.items.length; j++) {\n const item = token.items[j];\n const checked = item.checked;\n const task = item.task;\n let itemBody = '';\n if (item.task) {\n const checkbox = this.checkbox({ checked: !!checked });\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n }\n else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox + ' ',\n });\n }\n }\n else {\n itemBody += checkbox + ' ';\n }\n }\n itemBody += this.parser.parse(item.tokens, loose);\n body += this.listitem({\n type: 'list_item',\n raw: itemBody,\n text: itemBody,\n task,\n checked: !!checked,\n loose,\n tokens: item.tokens,\n });\n }\n return func.call(this, body, ordered, start);\n };\n case 'html':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text, token.block);\n };\n case 'paragraph':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, this.parser.parseInline(token.tokens));\n };\n case 'escape':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text);\n };\n case 'link':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.href, token.title, this.parser.parseInline(token.tokens));\n };\n case 'image':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.href, token.title, token.text);\n };\n case 'strong':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, this.parser.parseInline(token.tokens));\n };\n case 'em':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, this.parser.parseInline(token.tokens));\n };\n case 'codespan':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text);\n };\n case 'del':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, this.parser.parseInline(token.tokens));\n };\n case 'text':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text);\n };\n default:\n // do nothing\n }\n return func;\n }\n setOptions(opt) {\n this.defaults = { ...this.defaults, ...opt };\n return this;\n }\n lexer(src, options) {\n return _Lexer.lex(src, options ?? this.defaults);\n }\n parser(tokens, options) {\n return _Parser.parse(tokens, options ?? this.defaults);\n }\n #parseMarkdown(lexer, parser) {\n return (src, options) => {\n const origOpt = { ...options };\n const opt = { ...this.defaults, ...origOpt };\n // Show warning if an extension set async to true but the parse was called with async: false\n if (this.defaults.async === true && origOpt.async === false) {\n if (!opt.silent) {\n console.warn('marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored.');\n }\n opt.async = true;\n }\n const throwError = this.#onError(!!opt.silent, !!opt.async);\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n return throwError(new Error('marked(): input parameter is undefined or null'));\n }\n if (typeof src !== 'string') {\n return throwError(new Error('marked(): input parameter is of type '\n + Object.prototype.toString.call(src) + ', string expected'));\n }\n if (opt.hooks) {\n opt.hooks.options = opt;\n }\n if (opt.async) {\n return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src)\n .then(src => lexer(src, opt))\n .then(tokens => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens)\n .then(tokens => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens)\n .then(tokens => parser(tokens, opt))\n .then(html => opt.hooks ? opt.hooks.postprocess(html) : html)\n .catch(throwError);\n }\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n let tokens = lexer(src, opt);\n if (opt.hooks) {\n tokens = opt.hooks.processAllTokens(tokens);\n }\n if (opt.walkTokens) {\n this.walkTokens(tokens, opt.walkTokens);\n }\n let html = parser(tokens, opt);\n if (opt.hooks) {\n html = opt.hooks.postprocess(html);\n }\n return html;\n }\n catch (e) {\n return throwError(e);\n }\n };\n }\n #onError(silent, async) {\n return (e) => {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n if (silent) {\n const msg = '

    An error occurred:

    '\n                    + escape(e.message + '', true)\n                    + '
    ';\n if (async) {\n return Promise.resolve(msg);\n }\n return msg;\n }\n if (async) {\n return Promise.reject(e);\n }\n throw e;\n };\n }\n}\n", "import { _Lexer } from './Lexer.ts';\nimport { _Parser } from './Parser.ts';\nimport { _Tokenizer } from './Tokenizer.ts';\nimport { _Renderer } from './Renderer.ts';\nimport { _TextRenderer } from './TextRenderer.ts';\nimport { _Hooks } from './Hooks.ts';\nimport { Marked } from './Instance.ts';\nimport { _getDefaults, changeDefaults, _defaults, } from './defaults.ts';\nconst markedInstance = new Marked();\nexport function marked(src, opt) {\n return markedInstance.parse(src, opt);\n}\n/**\n * Sets the default options.\n *\n * @param options Hash of options\n */\nmarked.options =\n marked.setOptions = function (options) {\n markedInstance.setOptions(options);\n marked.defaults = markedInstance.defaults;\n changeDefaults(marked.defaults);\n return marked;\n };\n/**\n * Gets the original marked default options.\n */\nmarked.getDefaults = _getDefaults;\nmarked.defaults = _defaults;\n/**\n * Use Extension\n */\nmarked.use = function (...args) {\n markedInstance.use(...args);\n marked.defaults = markedInstance.defaults;\n changeDefaults(marked.defaults);\n return marked;\n};\n/**\n * Run callback for every token\n */\nmarked.walkTokens = function (tokens, callback) {\n return markedInstance.walkTokens(tokens, callback);\n};\n/**\n * Compiles markdown to HTML without enclosing `p` tag.\n *\n * @param src String of markdown source to be compiled\n * @param options Hash of options\n * @return String of compiled HTML\n */\nmarked.parseInline = markedInstance.parseInline;\n/**\n * Expose\n */\nmarked.Parser = _Parser;\nmarked.parser = _Parser.parse;\nmarked.Renderer = _Renderer;\nmarked.TextRenderer = _TextRenderer;\nmarked.Lexer = _Lexer;\nmarked.lexer = _Lexer.lex;\nmarked.Tokenizer = _Tokenizer;\nmarked.Hooks = _Hooks;\nmarked.parse = marked;\nexport const options = marked.options;\nexport const setOptions = marked.setOptions;\nexport const use = marked.use;\nexport const walkTokens = marked.walkTokens;\nexport const parseInline = marked.parseInline;\nexport const parse = marked;\nexport const parser = _Parser.parse;\nexport const lexer = _Lexer.lex;\nexport { _defaults as defaults, _getDefaults as getDefaults } from './defaults.ts';\nexport { _Lexer as Lexer } from './Lexer.ts';\nexport { _Parser as Parser } from './Parser.ts';\nexport { _Tokenizer as Tokenizer } from './Tokenizer.ts';\nexport { _Renderer as Renderer } from './Renderer.ts';\nexport { _TextRenderer as TextRenderer } from './TextRenderer.ts';\nexport { _Hooks as Hooks } from './Hooks.ts';\nexport { Marked } from './Instance.ts';\n", "import type { MarkedToken, Token } from 'marked';\nimport { marked } from 'marked';\nimport { dedent } from 'ts-dedent';\nimport type { MarkdownLine, MarkdownWordType } from './types.js';\nimport type { MermaidConfig } from '../config.type.js';\n\n/**\n * @param markdown - markdown to process\n * @returns processed markdown\n */\nfunction preprocessMarkdown(markdown: string, { markdownAutoWrap }: MermaidConfig): string {\n //Replace
    with \\n\n const withoutBR = markdown.replace(//g, '\\n');\n // Replace multiple newlines with a single newline\n const withoutMultipleNewlines = withoutBR.replace(/\\n{2,}/g, '\\n');\n // Remove extra spaces at the beginning of each line\n const withoutExtraSpaces = dedent(withoutMultipleNewlines);\n if (markdownAutoWrap === false) {\n return withoutExtraSpaces.replace(/ /g, ' ');\n }\n return withoutExtraSpaces;\n}\n\n/**\n * @param markdown - markdown to split into lines\n */\nexport function markdownToLines(markdown: string, config: MermaidConfig = {}): MarkdownLine[] {\n const preprocessedMarkdown = preprocessMarkdown(markdown, config);\n const nodes = marked.lexer(preprocessedMarkdown);\n const lines: MarkdownLine[] = [[]];\n let currentLine = 0;\n\n function processNode(node: MarkedToken, parentType: MarkdownWordType = 'normal') {\n if (node.type === 'text') {\n const textLines = node.text.split('\\n');\n textLines.forEach((textLine, index) => {\n if (index !== 0) {\n currentLine++;\n lines.push([]);\n }\n textLine.split(' ').forEach((word) => {\n word = word.replace(/'/g, `'`);\n if (word) {\n lines[currentLine].push({ content: word, type: parentType });\n }\n });\n });\n } else if (node.type === 'strong' || node.type === 'em') {\n node.tokens.forEach((contentNode) => {\n processNode(contentNode as MarkedToken, node.type);\n });\n } else if (node.type === 'html') {\n lines[currentLine].push({ content: node.text, type: 'normal' });\n }\n }\n\n nodes.forEach((treeNode) => {\n if (treeNode.type === 'paragraph') {\n treeNode.tokens?.forEach((contentNode) => {\n processNode(contentNode as MarkedToken);\n });\n } else if (treeNode.type === 'html') {\n lines[currentLine].push({ content: treeNode.text, type: 'normal' });\n }\n });\n\n return lines;\n}\n\nexport function markdownToHTML(markdown: string, { markdownAutoWrap }: MermaidConfig = {}) {\n const nodes = marked.lexer(markdown);\n\n function output(node: Token): string {\n if (node.type === 'text') {\n if (markdownAutoWrap === false) {\n return node.text.replace(/\\n */g, '
    ').replace(/ /g, ' ');\n }\n return node.text.replace(/\\n */g, '
    ');\n } else if (node.type === 'strong') {\n return `${node.tokens?.map(output).join('')}`;\n } else if (node.type === 'em') {\n return `${node.tokens?.map(output).join('')}`;\n } else if (node.type === 'paragraph') {\n return `

    ${node.tokens?.map(output).join('')}

    `;\n } else if (node.type === 'space') {\n return '';\n } else if (node.type === 'html') {\n return `${node.text}`;\n } else if (node.type === 'escape') {\n return node.text;\n }\n return `Unsupported markdown: ${node.type}`;\n }\n\n return nodes.map(output).join('');\n}\n", "import type { CheckFitFunction, MarkdownLine, MarkdownWord, MarkdownWordType } from './types.js';\n\n/**\n * Splits a string into graphemes if available, otherwise characters.\n */\nexport function splitTextToChars(text: string): string[] {\n if (Intl.Segmenter) {\n return [...new Intl.Segmenter().segment(text)].map((s) => s.segment);\n }\n return [...text];\n}\n\n/**\n * Splits a string into words by using `Intl.Segmenter` if available, or splitting by ' '.\n * `Intl.Segmenter` uses the default locale, which might be different across browsers.\n */\nexport function splitLineToWords(text: string): string[] {\n if (Intl.Segmenter) {\n return [...new Intl.Segmenter(undefined, { granularity: 'word' }).segment(text)].map(\n (s) => s.segment\n );\n }\n // Split by ' ' removes the ' 's from the result.\n const words = text.split(' ');\n // Add the ' 's back to the result.\n const wordsWithSpaces = words.flatMap((s) => [s, ' ']).filter((s) => s);\n // Remove last space.\n wordsWithSpaces.pop();\n return wordsWithSpaces;\n}\n\n/**\n * Splits a word into two parts, the first part fits the width and the remaining part.\n * @param checkFit - Function to check if word fits\n * @param word - Word to split\n * @returns [first part of word that fits, rest of word]\n */\nexport function splitWordToFitWidth(\n checkFit: CheckFitFunction,\n word: MarkdownWord\n): [MarkdownWord, MarkdownWord] {\n const characters = splitTextToChars(word.content);\n return splitWordToFitWidthRecursion(checkFit, [], characters, word.type);\n}\n\nfunction splitWordToFitWidthRecursion(\n checkFit: CheckFitFunction,\n usedChars: string[],\n remainingChars: string[],\n type: MarkdownWordType\n): [MarkdownWord, MarkdownWord] {\n if (remainingChars.length === 0) {\n return [\n { content: usedChars.join(''), type },\n { content: '', type },\n ];\n }\n const [nextChar, ...rest] = remainingChars;\n const newWord = [...usedChars, nextChar];\n if (checkFit([{ content: newWord.join(''), type }])) {\n return splitWordToFitWidthRecursion(checkFit, newWord, rest, type);\n }\n if (usedChars.length === 0 && nextChar) {\n // If the first character does not fit, split it anyway\n usedChars.push(nextChar);\n remainingChars.shift();\n }\n return [\n { content: usedChars.join(''), type },\n { content: remainingChars.join(''), type },\n ];\n}\n\n/**\n * Splits a line into multiple lines that satisfy the checkFit function.\n * @param line - Line to split\n * @param checkFit - Function to check if line fits\n * @returns Array of lines that fit\n */\nexport function splitLineToFitWidth(\n line: MarkdownLine,\n checkFit: CheckFitFunction\n): MarkdownLine[] {\n if (line.some(({ content }) => content.includes('\\n'))) {\n throw new Error('splitLineToFitWidth does not support newlines in the line');\n }\n return splitLineToFitWidthRecursion(line, checkFit);\n}\n\nfunction splitLineToFitWidthRecursion(\n words: MarkdownWord[],\n checkFit: CheckFitFunction,\n lines: MarkdownLine[] = [],\n newLine: MarkdownLine = []\n): MarkdownLine[] {\n // Return if there is nothing left to split\n if (words.length === 0) {\n // If there is a new line, add it to the lines\n if (newLine.length > 0) {\n lines.push(newLine);\n }\n return lines.length > 0 ? lines : [];\n }\n let joiner = '';\n if (words[0].content === ' ') {\n joiner = ' ';\n words.shift();\n }\n const nextWord: MarkdownWord = words.shift() ?? { content: ' ', type: 'normal' };\n const lineWithNextWord: MarkdownLine = [...newLine];\n if (joiner !== '') {\n lineWithNextWord.push({ content: joiner, type: 'normal' });\n }\n lineWithNextWord.push(nextWord);\n\n if (checkFit(lineWithNextWord)) {\n // nextWord fits, so we can add it to the new line and continue\n return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord);\n }\n\n // nextWord doesn't fit, so we need to split it\n if (newLine.length > 0) {\n // There was text in newLine, so add it to lines and push nextWord back into words.\n lines.push(newLine);\n words.unshift(nextWord);\n } else if (nextWord.content) {\n // There was no text in newLine, so we need to split nextWord\n const [line, rest] = splitWordToFitWidth(checkFit, nextWord);\n lines.push([line]);\n if (rest.content) {\n words.unshift(rest);\n }\n }\n return splitLineToFitWidthRecursion(words, checkFit, lines);\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n// @ts-nocheck TODO: Fix types\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport common, { hasKatex, renderKatex } from '../diagrams/common/common.js';\nimport { select } from 'd3';\nimport type { MermaidConfig } from '../config.type.js';\nimport type { SVGGroup } from '../diagram-api/types.js';\nimport type { D3TSpanElement, D3TextElement } from '../diagrams/common/commonTypes.js';\nimport { log } from '../logger.js';\nimport { markdownToHTML, markdownToLines } from '../rendering-util/handle-markdown-text.js';\nimport { decodeEntities } from '../utils.js';\nimport { splitLineToFitWidth } from './splitText.js';\nimport type { MarkdownLine, MarkdownWord } from './types.js';\n\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\nasync function addHtmlSpan(element, node, width, classes, addBackground = false) {\n const fo = element.append('foreignObject');\n // This is not the final width but used in order to make sure the foreign\n // object in firefox gets a width at all. The final width is fetched from the div\n fo.attr('width', `${10 * width}px`);\n fo.attr('height', `${10 * width}px`);\n\n const div = fo.append('xhtml:div');\n let label = node.label;\n if (node.label && hasKatex(node.label)) {\n label = await renderKatex(node.label.replace(common.lineBreakRegex, '\\n'), getConfig());\n }\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n const span = div.append('span');\n span.html(label);\n applyStyle(span, node.labelStyle);\n span.attr('class', `${labelClass} ${classes}`);\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'table-cell');\n div.style('white-space', 'nowrap');\n div.style('line-height', '1.5');\n div.style('max-width', width + 'px');\n div.style('text-align', 'center');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n if (addBackground) {\n div.attr('class', 'labelBkg');\n }\n\n let bbox = div.node().getBoundingClientRect();\n if (bbox.width === width) {\n div.style('display', 'table');\n div.style('white-space', 'break-spaces');\n div.style('width', width + 'px');\n bbox = div.node().getBoundingClientRect();\n }\n\n // fo.style('width', bbox.width);\n // fo.style('height', bbox.height);\n\n return fo.node();\n}\n\n/**\n * Creates a tspan element with the specified attributes for text positioning.\n *\n * @param textElement - The parent text element to append the tspan element.\n * @param lineIndex - The index of the current line in the structuredText array.\n * @param lineHeight - The line height value for the text.\n * @returns The created tspan element.\n */\nfunction createTspan(textElement: any, lineIndex: number, lineHeight: number) {\n return textElement\n .append('tspan')\n .attr('class', 'text-outer-tspan')\n .attr('x', 0)\n .attr('y', lineIndex * lineHeight - 0.1 + 'em')\n .attr('dy', lineHeight + 'em');\n}\n\nfunction computeWidthOfText(parentNode: any, lineHeight: number, line: MarkdownLine): number {\n const testElement = parentNode.append('text');\n const testSpan = createTspan(testElement, 1, lineHeight);\n updateTextContentAndStyles(testSpan, line);\n const textLength = testSpan.node().getComputedTextLength();\n testElement.remove();\n return textLength;\n}\n\nexport function computeDimensionOfText(\n parentNode: SVGGroup,\n lineHeight: number,\n text: string\n): DOMRect | undefined {\n const testElement: D3TextElement = parentNode.append('text');\n const testSpan: D3TSpanElement = createTspan(testElement, 1, lineHeight);\n updateTextContentAndStyles(testSpan, [{ content: text, type: 'normal' }]);\n const textDimension: DOMRect | undefined = testSpan.node()?.getBoundingClientRect();\n if (textDimension) {\n testElement.remove();\n }\n return textDimension;\n}\n\n/**\n * Creates a formatted text element by breaking lines and applying styles based on\n * the given structuredText.\n *\n * @param width - The maximum allowed width of the text.\n * @param g - The parent group element to append the formatted text.\n * @param structuredText - The structured text data to format.\n * @param addBackground - Whether to add a background to the text.\n */\nfunction createFormattedText(\n width: number,\n g: any,\n structuredText: MarkdownWord[][],\n addBackground = false\n) {\n const lineHeight = 1.1;\n const labelGroup = g.append('g');\n const bkg = labelGroup.insert('rect').attr('class', 'background').attr('style', 'stroke: none');\n const textElement = labelGroup.append('text').attr('y', '-10.1');\n let lineIndex = 0;\n for (const line of structuredText) {\n /**\n * Preprocess raw string content of line data\n * Creating an array of strings pre-split to satisfy width limit\n */\n const checkWidth = (line: MarkdownLine) =>\n computeWidthOfText(labelGroup, lineHeight, line) <= width;\n const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth);\n /** Add each prepared line as a tspan to the parent node */\n for (const preparedLine of linesUnderWidth) {\n const tspan = createTspan(textElement, lineIndex, lineHeight);\n updateTextContentAndStyles(tspan, preparedLine);\n lineIndex++;\n }\n }\n if (addBackground) {\n const bbox = textElement.node().getBBox();\n const padding = 2;\n bkg\n .attr('x', bbox.x - padding)\n .attr('y', bbox.y - padding)\n .attr('width', bbox.width + 2 * padding)\n .attr('height', bbox.height + 2 * padding);\n\n return labelGroup.node();\n } else {\n return textElement.node();\n }\n}\n\n/**\n * Updates the text content and styles of the given tspan element based on the\n * provided wrappedLine data.\n *\n * @param tspan - The tspan element to update.\n * @param wrappedLine - The line data to apply to the tspan element.\n */\nfunction updateTextContentAndStyles(tspan: any, wrappedLine: MarkdownWord[]) {\n tspan.text('');\n\n wrappedLine.forEach((word, index) => {\n const innerTspan = tspan\n .append('tspan')\n .attr('font-style', word.type === 'em' ? 'italic' : 'normal')\n .attr('class', 'text-inner-tspan')\n .attr('font-weight', word.type === 'strong' ? 'bold' : 'normal');\n if (index === 0) {\n innerTspan.text(word.content);\n } else {\n // TODO: check what joiner to use.\n innerTspan.text(' ' + word.content);\n }\n });\n}\n\n/**\n * Convert fontawesome labels into fontawesome icons by using a regex pattern\n * @param text - The raw string to convert\n * @returns string with fontawesome icons as i tags\n */\nexport function replaceIconSubstring(text: string) {\n // The letters 'bklrs' stand for possible endings of the fontawesome prefix (e.g. 'fab' for brands, 'fak' for fa-kit) // cspell: disable-line\n return text.replace(\n /fa[bklrs]?:fa-[\\w-]+/g, // cspell: disable-line\n (s) => ``\n );\n}\n\n// Note when using from flowcharts converting the API isNode means classes should be set accordingly. When using htmlLabels => to sett classes to'nodeLabel' when isNode=true otherwise 'edgeLabel'\n// When not using htmlLabels => to set classes to 'title-row' when isTitle=true otherwise 'title-row'\nexport const createText = async (\n el,\n text = '',\n {\n style = '',\n isTitle = false,\n classes = '',\n useHtmlLabels = true,\n isNode = true,\n width = 200,\n addSvgBackground = false,\n } = {},\n config?: MermaidConfig\n) => {\n log.debug(\n 'XYZ createText',\n text,\n style,\n isTitle,\n classes,\n useHtmlLabels,\n isNode,\n 'addSvgBackground: ',\n addSvgBackground\n );\n if (useHtmlLabels) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n\n const htmlText = markdownToHTML(text, config);\n const decodedReplacedText = replaceIconSubstring(decodeEntities(htmlText));\n\n //for Katex the text could contain escaped characters, \\\\relax that should be transformed to \\relax\n const inputForKatex = text.replace(/\\\\\\\\/g, '\\\\');\n\n const node = {\n isNode,\n label: hasKatex(text) ? inputForKatex : decodedReplacedText,\n labelStyle: style.replace('fill:', 'color:'),\n };\n const vertexNode = await addHtmlSpan(el, node, width, classes, addSvgBackground);\n return vertexNode;\n } else {\n //sometimes the user might add br tags with 1 or more spaces in between, so we need to replace them with
    \n const sanitizeBR = text.replace(//g, '
    ');\n const structuredText = markdownToLines(sanitizeBR.replace('
    ', '
    '), config);\n const svgLabel = createFormattedText(\n width,\n el,\n structuredText,\n text ? addSvgBackground : false\n );\n if (isNode) {\n if (/stroke:/.exec(style)) {\n style = style.replace('stroke:', 'lineColor:');\n }\n\n const nodeLabelTextStyle = style\n .replace(/stroke:[^;]+;?/g, '')\n .replace(/stroke-width:[^;]+;?/g, '')\n .replace(/fill:[^;]+;?/g, '')\n .replace(/color:/g, 'fill:');\n select(svgLabel).attr('style', nodeLabelTextStyle);\n // svgLabel.setAttribute('style', style);\n } else {\n //On style, assume `stroke`, `stroke-width` are used for edge path, so remove them\n // remove `fill`\n // use `background` as `fill` for label rect,\n\n const edgeLabelRectStyle = style\n .replace(/stroke:[^;]+;?/g, '')\n .replace(/stroke-width:[^;]+;?/g, '')\n .replace(/fill:[^;]+;?/g, '')\n .replace(/background:/g, 'fill:');\n select(svgLabel)\n .select('rect')\n .attr('style', edgeLabelRectStyle.replace(/background:/g, 'fill:'));\n\n // for text, update fill color with `color`\n const edgeLabelTextStyle = style\n .replace(/stroke:[^;]+;?/g, '')\n .replace(/stroke-width:[^;]+;?/g, '')\n .replace(/fill:[^;]+;?/g, '')\n .replace(/color:/g, 'fill:');\n select(svgLabel).select('text').attr('style', edgeLabelTextStyle);\n }\n return svgLabel;\n }\n};\n", "import { createText } from '../../createText.js';\nimport type { Node } from '../../types.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport { select } from 'd3';\nimport defaultConfig from '../../../defaultConfig.js';\nimport { evaluate, sanitizeText } from '../../../diagrams/common/common.js';\nimport { decodeEntities, handleUndefinedAttr, parseFontSize } from '../../../utils.js';\nimport type { D3Selection, Point } from '../../../types.js';\n\nexport const labelHelper = async (\n parent: D3Selection,\n node: Node,\n _classes?: string\n) => {\n let cssClasses;\n const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig()?.htmlLabels);\n if (!_classes) {\n cssClasses = 'node default';\n } else {\n cssClasses = _classes;\n }\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', cssClasses)\n .attr('id', node.domId || node.id);\n\n // Create the label and insert it after the rect\n const labelEl = shapeSvg\n .insert('g')\n .attr('class', 'label')\n .attr('style', handleUndefinedAttr(node.labelStyle));\n\n // Replace label with default value if undefined\n let label;\n if (node.label === undefined) {\n label = '';\n } else {\n label = typeof node.label === 'string' ? node.label : node.label[0];\n }\n\n const text = await createText(labelEl, sanitizeText(decodeEntities(label), getConfig()), {\n useHtmlLabels,\n width: node.width || getConfig().flowchart?.wrappingWidth,\n // @ts-expect-error -- This is currently not used. Should this be `classes` instead?\n cssClasses: 'markdown-node-label',\n style: node.labelStyle,\n addSvgBackground: !!node.icon || !!node.img,\n });\n // Get the size of the label\n let bbox = text.getBBox();\n const halfPadding = (node?.padding ?? 0) / 2;\n\n if (useHtmlLabels) {\n const div = text.children[0];\n const dv = select(text);\n\n // if there are images, need to wait for them to load before getting the bounding box\n const images = div.getElementsByTagName('img');\n if (images) {\n const noImgText = label.replace(/]*>/g, '').trim() === '';\n\n await Promise.all(\n [...images].map(\n (img) =>\n new Promise((res) => {\n /**\n *\n */\n function setupImage() {\n img.style.display = 'flex';\n img.style.flexDirection = 'column';\n\n if (noImgText) {\n // default size if no text\n const bodyFontSize = getConfig().fontSize\n ? getConfig().fontSize\n : window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const [parsedBodyFontSize = defaultConfig.fontSize] = parseFontSize(bodyFontSize);\n const width = parsedBodyFontSize * enlargingFactor + 'px';\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = '100%';\n }\n res(img);\n }\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener('error', setupImage);\n img.addEventListener('load', setupImage);\n })\n )\n );\n }\n\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Center the label\n if (useHtmlLabels) {\n labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n } else {\n labelEl.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n }\n if (node.centerLabel) {\n labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n }\n labelEl.insert('rect', ':first-child');\n return { shapeSvg, bbox, halfPadding, label: labelEl };\n};\nexport const insertLabel = async (\n parent: D3Selection,\n label: string,\n options: {\n labelStyle?: string | undefined;\n icon?: boolean | undefined;\n img?: string | undefined;\n useHtmlLabels?: boolean | undefined;\n padding: number;\n width?: number | undefined;\n centerLabel?: boolean | undefined;\n addSvgBackground?: boolean | undefined;\n }\n) => {\n const useHtmlLabels = options.useHtmlLabels || evaluate(getConfig()?.flowchart?.htmlLabels);\n\n // Create the label and insert it after the rect\n const labelEl = parent\n .insert('g')\n .attr('class', 'label')\n .attr('style', options.labelStyle || '');\n\n const text = await createText(labelEl, sanitizeText(decodeEntities(label), getConfig()), {\n useHtmlLabels,\n width: options.width || getConfig()?.flowchart?.wrappingWidth,\n style: options.labelStyle,\n addSvgBackground: !!options.icon || !!options.img,\n });\n // Get the size of the label\n let bbox = text.getBBox();\n const halfPadding = options.padding / 2;\n\n if (evaluate(getConfig()?.flowchart?.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Center the label\n if (useHtmlLabels) {\n labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n } else {\n labelEl.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n }\n if (options.centerLabel) {\n labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n }\n labelEl.insert('rect', ':first-child');\n return { shapeSvg: parent, bbox, halfPadding, label: labelEl };\n};\nexport const updateNodeBounds = (\n node: Node,\n // D3Selection is for the roughjs case, D3Selection is for the non-roughjs case\n element: D3Selection | D3Selection\n) => {\n const bbox = element.node()!.getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n};\n\n/**\n * @param parent - Parent element to append the polygon to\n * @param w - Width of the polygon\n * @param h - Height of the polygon\n * @param points - Array of points to create the polygon\n */\nexport function insertPolygonShape(\n parent: D3Selection,\n w: number,\n h: number,\n points: Point[]\n) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n\nexport const getNodeClasses = (node: Node, extra?: string) =>\n (node.look === 'handDrawn' ? 'rough-node' : 'node') + ' ' + node.cssClasses + ' ' + (extra || '');\n\nexport function createPathFromPoints(points: Point[]) {\n const pointStrings = points.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x},${p.y}`);\n pointStrings.push('Z');\n return pointStrings.join(' ');\n}\n\nexport function generateFullSineWavePoints(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n amplitude: number,\n numCycles: number\n) {\n const points = [];\n const steps = 50; // Number of segments to create a smooth curve\n const deltaX = x2 - x1;\n const deltaY = y2 - y1;\n const cycleLength = deltaX / numCycles;\n\n // Calculate frequency and phase shift\n const frequency = (2 * Math.PI) / cycleLength;\n const midY = y1 + deltaY / 2;\n\n for (let i = 0; i <= steps; i++) {\n const t = i / steps;\n const x = x1 + t * deltaX;\n const y = midY + amplitude * Math.sin(frequency * (x - x1));\n\n points.push({ x, y });\n }\n\n return points;\n}\n\n/**\n * @param centerX - x-coordinate of center of circle\n * @param centerY - y-coordinate of center of circle\n * @param radius - radius of circle\n * @param numPoints - total points required\n * @param startAngle - angle where arc will start\n * @param endAngle - angle where arc will end\n */\nexport function generateCirclePoints(\n centerX: number,\n centerY: number,\n radius: number,\n numPoints: number,\n startAngle: number,\n endAngle: number\n) {\n const points = [];\n\n // Convert angles to radians\n const startAngleRad = (startAngle * Math.PI) / 180;\n const endAngleRad = (endAngle * Math.PI) / 180;\n\n // Calculate the angle range in radians\n const angleRange = endAngleRad - startAngleRad;\n\n // Calculate the angle step\n const angleStep = angleRange / (numPoints - 1);\n\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x: -x, y: -y });\n }\n\n return points;\n}\n", "function intersectNode(node, point) {\n return node.intersect(point);\n}\n\nexport default intersectNode;\n", "function intersectEllipse(node, rx, ry, point) {\n // Formulae from: https://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n var cx = node.x;\n var cy = node.y;\n\n var px = cx - point.x;\n var py = cy - point.y;\n\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n var dx = Math.abs((rx * ry * px) / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs((rx * ry * py) / det);\n if (point.y < cy) {\n dy = -dy;\n }\n\n return { x: cx + dx, y: cy + dy };\n}\n\nexport default intersectEllipse;\n", "import intersectEllipse from './intersect-ellipse.js';\n\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}\n\nexport default intersectCircle;\n", "/**\n * Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.\n */\nfunction intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n\n // Compute r3 and r4.\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n\n // Compute r1 and r2\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return /*COLLINEAR*/;\n }\n\n offset = Math.abs(denom / 2);\n\n // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n return { x: x, y: y };\n}\n\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n\nexport default intersectLine;\n", "import intersectLine from './intersect-line.js';\n\n/**\n * Returns the point ({x, y}) at which the point argument intersects with the node argument assuming\n * that it has the shape specified by polygon.\n */\nfunction intersectPolygon(node, polyPoints, point) {\n let x1 = node.x;\n let y1 = node.y;\n\n let intersections = [];\n\n let minX = Number.POSITIVE_INFINITY;\n let minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === 'function') {\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n\n let left = x1 - node.width / 2 - minX;\n let top = y1 - node.height / 2 - minY;\n\n for (let i = 0; i < polyPoints.length; i++) {\n let p1 = polyPoints[i];\n let p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n let intersect = intersectLine(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n let pdx = p.x - point.x;\n let pdy = p.y - point.y;\n let distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n let qdx = q.x - point.x;\n let qdy = q.y - point.y;\n let distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n\nexport default intersectPolygon;\n", "const intersectRect = (node, point) => {\n var x = node.x;\n var y = node.y;\n\n // Rectangle intersection algorithm from:\n // https://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n};\n\nexport default intersectRect;\n", "/*\n * Borrowed with love from from dagre-d3. Many thanks to cpettitt!\n */\n\nimport node from './intersect-node.js';\nimport circle from './intersect-circle.js';\nimport ellipse from './intersect-ellipse.js';\nimport polygon from './intersect-polygon.js';\nimport rect from './intersect-rect.js';\n\nexport default {\n node,\n circle,\n ellipse,\n polygon,\n rect,\n};\n", "import { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport type { Node } from '../../types.js';\n\n// Striped fill like start or fork nodes in state diagrams\nexport const solidStateFill = (color: string) => {\n const { handDrawnSeed } = getConfig();\n return {\n fill: color,\n hachureAngle: 120, // angle of hachure,\n hachureGap: 4,\n fillWeight: 2,\n roughness: 0.7,\n stroke: color,\n seed: handDrawnSeed,\n };\n};\n\nexport const compileStyles = (node: Node) => {\n // node.cssCompiledStyles is an array of strings in the form of 'key: value' where jey is the css property and value is the value\n // the array is the styles of node node from the classes it is using\n // node.cssStyles is an array of styles directly set on the node\n // concat the arrays and remove duplicates such that the values from node.cssStyles are used if there are duplicates\n const stylesMap = styles2Map([...(node.cssCompiledStyles || []), ...(node.cssStyles || [])]);\n return { stylesMap, stylesArray: [...stylesMap] };\n};\n\nexport const styles2Map = (styles: string[]) => {\n const styleMap = new Map();\n styles.forEach((style) => {\n const [key, value] = style.split(':');\n styleMap.set(key.trim(), value?.trim());\n });\n return styleMap;\n};\n\nexport const styles2String = (node: Node) => {\n const { stylesArray } = compileStyles(node);\n const labelStyles: string[] = [];\n const nodeStyles: string[] = [];\n const borderStyles: string[] = [];\n const backgroundStyles: string[] = [];\n\n stylesArray.forEach((style) => {\n const key = style[0];\n if (\n key === 'color' ||\n key === 'font-size' ||\n key === 'font-family' ||\n key === 'font-weight' ||\n key === 'font-style' ||\n key === 'text-decoration' ||\n key === 'text-align' ||\n key === 'text-transform' ||\n key === 'line-height' ||\n key === 'letter-spacing' ||\n key === 'word-spacing' ||\n key === 'text-shadow' ||\n key === 'text-overflow' ||\n key === 'white-space' ||\n key === 'word-wrap' ||\n key === 'word-break' ||\n key === 'overflow-wrap' ||\n key === 'hyphens'\n ) {\n labelStyles.push(style.join(':') + ' !important');\n } else {\n nodeStyles.push(style.join(':') + ' !important');\n if (key.includes('stroke')) {\n borderStyles.push(style.join(':') + ' !important');\n }\n if (key === 'fill') {\n backgroundStyles.push(style.join(':') + ' !important');\n }\n }\n });\n\n return {\n labelStyles: labelStyles.join(';'),\n nodeStyles: nodeStyles.join(';'),\n stylesArray,\n borderStyles,\n backgroundStyles,\n };\n};\n\n// Striped fill like start or fork nodes in state diagrams\n// TODO remove any\nexport const userNodeOverrides = (node: Node, options: any) => {\n const { themeVariables, handDrawnSeed } = getConfig();\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n\n // index the style array to a map object\n const result = Object.assign(\n {\n roughness: 0.7,\n fill: stylesMap.get('fill') || mainBkg,\n fillStyle: 'hachure', // solid fill\n fillWeight: 4,\n hachureGap: 5.2,\n stroke: stylesMap.get('stroke') || nodeBorder,\n seed: handDrawnSeed,\n strokeWidth: stylesMap.get('stroke-width')?.replace('px', '') || 1.3,\n fillLineDash: [0, 0],\n },\n options\n );\n return result;\n};\n", "function t(t,e,s){if(t&&t.length){const[n,o]=e,a=Math.PI/180*s,h=Math.cos(a),r=Math.sin(a);for(const e of t){const[t,s]=e;e[0]=(t-n)*h-(s-o)*r+n,e[1]=(t-n)*r+(s-o)*h+o}}}function e(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(s,n,o,a=1){const h=o,r=Math.max(n,.1),i=s[0]&&s[0][0]&&\"number\"==typeof s[0][0]?[s]:s,c=[0,0];if(h)for(const e of i)t(e,c,h);const l=function(t,s,n){const o=[];for(const s of t){const t=[...s];e(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&o.push(t)}const a=[];s=Math.max(s,.1);const h=[];for(const t of o)for(let e=0;et.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!h.length)return a;let r=[],i=h[0].ymin,c=0;for(;r.length||h.length;){if(h.length){let t=-1;for(let e=0;ei);e++)t=e;h.splice(0,t+1).forEach((t=>{r.push({s:i,edge:t})}))}if(r=r.filter((t=>!(t.edge.ymax<=i))),r.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==n||c%s==0)&&r.length>1)for(let t=0;t=r.length)break;const s=r[t].edge,n=r[e].edge;a.push([[Math.round(s.x),i],[Math.round(n.x),i]])}i+=n,r.forEach((t=>{t.edge.x=t.edge.x+n*t.edge.islope})),c++}return a}(i,r,a);if(h){for(const e of i)t(e,c,-h);!function(e,s,n){const o=[];e.forEach((t=>o.push(...t))),t(o,s,n)}(l,c,-h)}return l}function n(t,e){var n;const o=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let h=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(h=a),s(t,a,o,h||1)}class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const s=n(t,e);return{type:\"fillSketch\",ops:this.renderLines(s,e)}}renderLines(t,e){const s=[];for(const n of t)s.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return s}}function a(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class h extends o{fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,.1);const o=n(t,Object.assign({},e,{hachureGap:s})),h=Math.PI/180*e.hachureAngle,r=[],i=.5*s*Math.cos(h),c=.5*s*Math.sin(h);for(const[t,e]of o)a([t,e])&&r.push([[t[0]-i,t[1]+c],[...e]],[[t[0]+i,t[1]-c],[...e]]);return{type:\"fillSketch\",ops:this.renderLines(r,e)}}}class r extends o{fillPolygons(t,e){const s=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,n);return s.ops=s.ops.concat(o.ops),s}}class i{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){const s=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const h=n/4;for(const r of t){const t=a(r),i=t/n,c=Math.ceil(i)-1,l=t-c*n,u=(r[0][0]+r[1][0])/2-n/4,p=Math.min(r[0][1],r[1][1]);for(let t=0;t{const h=a(t),r=Math.floor(h/(s+n)),i=(h+n-r*(s+n))/2;let c=t[0],l=t[1];c[0]>l[0]&&(c=t[1],l=t[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let t=0;t{const o=a(t),h=Math.round(o/(2*e));let r=t[0],i=t[1];r[0]>i[0]&&(r=t[1],i=t[0]);const c=Math.atan((i[1]-r[1])/(i[0]-r[0]));for(let t=0;tn%2?t+s:t+e));a.push({key:\"C\",data:t}),e=t[4],s=t[5];break}case\"Q\":a.push({key:\"Q\",data:[...r]}),e=r[2],s=r[3];break;case\"q\":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:\"Q\",data:t}),e=t[2],s=t[3];break}case\"A\":a.push({key:\"A\",data:[...r]}),e=r[5],s=r[6];break;case\"a\":e+=r[5],s+=r[6],a.push({key:\"A\",data:[r[0],r[1],r[2],r[3],r[4],e,s]});break;case\"H\":a.push({key:\"H\",data:[...r]}),e=r[0];break;case\"h\":e+=r[0],a.push({key:\"H\",data:[e]});break;case\"V\":a.push({key:\"V\",data:[...r]}),s=r[0];break;case\"v\":s+=r[0],a.push({key:\"V\",data:[s]});break;case\"S\":a.push({key:\"S\",data:[...r]}),e=r[2],s=r[3];break;case\"s\":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:\"S\",data:t}),e=t[2],s=t[3];break}case\"T\":a.push({key:\"T\",data:[...r]}),e=r[0],s=r[1];break;case\"t\":e+=r[0],s+=r[1],a.push({key:\"T\",data:[e,s]});break;case\"Z\":case\"z\":a.push({key:\"Z\",data:[]}),e=n,s=o}return a}function m(t){const e=[];let s=\"\",n=0,o=0,a=0,h=0,r=0,i=0;for(const{key:c,data:l}of t){switch(c){case\"M\":e.push({key:\"M\",data:[...l]}),[n,o]=l,[a,h]=l;break;case\"C\":e.push({key:\"C\",data:[...l]}),n=l[4],o=l[5],r=l[2],i=l[3];break;case\"L\":e.push({key:\"L\",data:[...l]}),[n,o]=l;break;case\"H\":n=l[0],e.push({key:\"L\",data:[n,o]});break;case\"V\":o=l[0],e.push({key:\"L\",data:[n,o]});break;case\"S\":{let t=0,a=0;\"C\"===s||\"S\"===s?(t=n+(n-r),a=o+(o-i)):(t=n,a=o),e.push({key:\"C\",data:[t,a,...l]}),r=l[0],i=l[1],n=l[2],o=l[3];break}case\"T\":{const[t,a]=l;let h=0,c=0;\"Q\"===s||\"T\"===s?(h=n+(n-r),c=o+(o-i)):(h=n,c=o);const u=n+2*(h-n)/3,p=o+2*(c-o)/3,f=t+2*(h-t)/3,d=a+2*(c-a)/3;e.push({key:\"C\",data:[u,p,f,d,t,a]}),r=h,i=c,n=t,o=a;break}case\"Q\":{const[t,s,a,h]=l,c=n+2*(t-n)/3,u=o+2*(s-o)/3,p=a+2*(t-a)/3,f=h+2*(s-h)/3;e.push({key:\"C\",data:[c,u,p,f,a,h]}),r=t,i=s,n=a,o=h;break}case\"A\":{const t=Math.abs(l[0]),s=Math.abs(l[1]),a=l[2],h=l[3],r=l[4],i=l[5],c=l[6];if(0===t||0===s)e.push({key:\"C\",data:[n,o,i,c,i,c]}),n=i,o=c;else if(n!==i||o!==c){x(n,o,i,c,t,s,a,h,r).forEach((function(t){e.push({key:\"C\",data:t})})),n=i,o=c}break}case\"Z\":e.push({key:\"Z\",data:[]}),n=a,o=h}s=c}return e}function w(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}function x(t,e,s,n,o,a,h,r,i,c){const l=(u=h,Math.PI*u/180);var u;let p=[],f=0,d=0,g=0,M=0;if(c)[f,d,g,M]=c;else{[t,e]=w(t,e,-l),[s,n]=w(s,n,-l);const h=(t-s)/2,c=(e-n)/2;let u=h*h/(o*o)+c*c/(a*a);u>1&&(u=Math.sqrt(u),o*=u,a*=u);const p=o*o,k=a*a,b=p*k-p*c*c-k*h*h,y=p*c*c+k*h*h,m=(r===i?-1:1)*Math.sqrt(Math.abs(b/y));g=m*o*c/a+(t+s)/2,M=m*-a*h/o+(e+n)/2,f=Math.asin(parseFloat(((e-M)/a).toFixed(9))),d=Math.asin(parseFloat(((n-M)/a).toFixed(9))),td&&(f-=2*Math.PI),!i&&d>f&&(d-=2*Math.PI)}let k=d-f;if(Math.abs(k)>120*Math.PI/180){const t=d,e=s,r=n;d=i&&d>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=x(s=g+o*Math.cos(d),n=M+a*Math.sin(d),e,r,o,a,h,0,i,[d,t,g,M])}k=d-f;const b=Math.cos(f),y=Math.sin(f),m=Math.cos(d),P=Math.sin(d),v=Math.tan(k/4),S=4/3*o*v,O=4/3*a*v,L=[t,e],T=[t+S*y,e-O*b],D=[s+S*P,n-O*m],A=[s,n];if(T[0]=2*L[0]-T[0],T[1]=2*L[1]-T[1],c)return[T,D,A].concat(p);{p=[T,D,A].concat(p);const t=[];for(let e=0;e2){const o=[];for(let e=0;e2*Math.PI&&(f=0,d=2*Math.PI);const g=2*Math.PI/i.curveStepCount,M=Math.min(g/2,(d-f)/2),k=V(M,c,l,u,p,f,d,1,i);if(!i.disableMultiStroke){const t=V(M,c,l,u,p,f,d,1.5,i);k.push(...t)}return h&&(r?k.push(...$(c,l,c+u*Math.cos(f),l+p*Math.sin(f),i),...$(c,l,c+u*Math.cos(d),l+p*Math.sin(d),i)):k.push({op:\"lineTo\",data:[c,l]},{op:\"lineTo\",data:[c+u*Math.cos(f),l+p*Math.sin(f)]})),{type:\"path\",ops:k}}function _(t,e){const s=m(y(b(t))),n=[];let o=[0,0],a=[0,0];for(const{key:t,data:h}of s)switch(t){case\"M\":a=[h[0],h[1]],o=[h[0],h[1]];break;case\"L\":n.push(...$(a[0],a[1],h[0],h[1],e)),a=[h[0],h[1]];break;case\"C\":{const[t,s,o,r,i,c]=h;n.push(...Z(t,s,o,r,i,c,a,e)),a=[i,c];break}case\"Z\":n.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:\"path\",ops:n}}function I(t,e){const s=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,o=n.length;if(o>2){s.push({op:\"move\",data:[n[0][0]+G(t,e),n[0][1]+G(t,e)]});for(let a=1;a500?.4:-.0016668*i+1.233334;let l=o.maxRandomnessOffset||0;l*l*100>r&&(l=i/10);const u=l/2,p=.2+.2*W(o);let f=o.bowing*o.maxRandomnessOffset*(n-e)/200,d=o.bowing*o.maxRandomnessOffset*(t-s)/200;f=G(f,o,c),d=G(d,o,c);const g=[],M=()=>G(u,o,c),k=()=>G(l,o,c),b=o.preserveVertices;return a&&(h?g.push({op:\"move\",data:[t+(b?0:M()),e+(b?0:M())]}):g.push({op:\"move\",data:[t+(b?0:G(l,o,c)),e+(b?0:G(l,o,c))]})),h?g.push({op:\"bcurveTo\",data:[f+t+(s-t)*p+M(),d+e+(n-e)*p+M(),f+t+2*(s-t)*p+M(),d+e+2*(n-e)*p+M(),s+(b?0:M()),n+(b?0:M())]}):g.push({op:\"bcurveTo\",data:[f+t+(s-t)*p+k(),d+e+(n-e)*p+k(),f+t+2*(s-t)*p+k(),d+e+2*(n-e)*p+k(),s+(b?0:k()),n+(b?0:k())]}),g}function j(t,e,s){if(!t.length)return[];const n=[];n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]),n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]);for(let o=1;o3){const a=[],h=1-s.curveTightness;o.push({op:\"move\",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&o.push(s)}else o.push(s);o.push(t[e+3])}else{const n=.5,a=t[e+0],h=t[e+1],r=t[e+2],i=t[e+3],c=J(a,h,n),l=J(h,r,n),u=J(r,i,n),p=J(c,l,n),f=J(l,u,n),d=J(p,f,n);K([a,c,p,d],0,s,o),K([d,f,u,i],0,s,o)}var a,h;return o}function U(t,e){return X(t,0,t.length,e)}function X(t,e,s,n,o){const a=o||[],h=t[e],r=t[s-1];let i=0,c=1;for(let n=e+1;ni&&(i=e,c=n)}return Math.sqrt(i)>n?(X(t,e,c+1,n,a),X(t,c,s,n,a)):(a.length||a.push(h),a.push(r)),a}function Y(t,e=.15,s){const n=[],o=(t.length-1)/3;for(let s=0;s0?X(n,0,n.length,s):n}const tt=\"none\";class et{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:\"#000\",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:\"hachure\",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,n,o){const a=this._o(o);return this._d(\"line\",[v(t,e,s,n,a)],a)}rectangle(t,e,s,n,o){const a=this._o(o),h=[],r=O(t,e,s,n,a);if(a.fill){const o=[[t,e],[t+s,e],[t+s,e+n],[t,e+n]];\"solid\"===a.fillStyle?h.push(I([o],a)):h.push(C([o],a))}return a.stroke!==tt&&h.push(r),this._d(\"rectangle\",h,a)}ellipse(t,e,s,n,o){const a=this._o(o),h=[],r=T(s,n,a),i=D(t,e,a,r);if(a.fill)if(\"solid\"===a.fillStyle){const s=D(t,e,a,r).opset;s.type=\"fillPath\",h.push(s)}else h.push(C([i.estimatedPoints],a));return a.stroke!==tt&&h.push(i.opset),this._d(\"ellipse\",h,a)}circle(t,e,s,n){const o=this.ellipse(t,e,s,s,n);return o.shape=\"circle\",o}linearPath(t,e){const s=this._o(e);return this._d(\"linearPath\",[S(t,!1,s)],s)}arc(t,e,s,n,o,a,h=!1,r){const i=this._o(r),c=[],l=A(t,e,s,n,o,a,h,!0,i);if(h&&i.fill)if(\"solid\"===i.fillStyle){const h=Object.assign({},i);h.disableMultiStroke=!0;const r=A(t,e,s,n,o,a,!0,!1,h);r.type=\"fillPath\",c.push(r)}else c.push(function(t,e,s,n,o,a,h){const r=t,i=e;let c=Math.abs(s/2),l=Math.abs(n/2);c+=G(.01*c,h),l+=G(.01*l,h);let u=o,p=a;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const f=(p-u)/h.curveStepCount,d=[];for(let t=u;t<=p;t+=f)d.push([r+c*Math.cos(t),i+l*Math.sin(t)]);return d.push([r+c*Math.cos(p),i+l*Math.sin(p)]),d.push([r,i]),C([d],h)}(t,e,s,n,o,a,i));return i.stroke!==tt&&c.push(l),this._d(\"arc\",c,i)}curve(t,e){const s=this._o(e),n=[],o=L(t,s);if(s.fill&&s.fill!==tt)if(\"solid\"===s.fillStyle){const e=L(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:\"fillPath\",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t=\"number\"==typeof o[0][0]?[o]:o;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Y(H([n[0],n[0],n[1],n[2]]),10,(1+s.roughness)/2)):e.push(...Y(H(n),10,(1+s.roughness)/2))}e.length&&n.push(C([e],s))}return s.stroke!==tt&&n.push(o),this._d(\"curve\",n,s)}polygon(t,e){const s=this._o(e),n=[],o=S(t,!0,s);return s.fill&&(\"solid\"===s.fillStyle?n.push(I([t],s)):n.push(C([t],s))),s.stroke!==tt&&n.push(o),this._d(\"polygon\",n,s)}path(t,e){const s=this._o(e),n=[];if(!t)return this._d(\"path\",n,s);t=(t||\"\").replace(/\\n/g,\" \").replace(/(-\\s)/g,\"-\").replace(\"/(ss)/g\",\" \");const o=s.fill&&\"transparent\"!==s.fill&&s.fill!==tt,a=s.stroke!==tt,h=!!(s.simplification&&s.simplification<1),r=function(t,e,s){const n=m(y(b(t))),o=[];let a=[],h=[0,0],r=[];const i=()=>{r.length>=4&&a.push(...Y(r,e)),r=[]},c=()=>{i(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of n)switch(t){case\"M\":c(),h=[e[0],e[1]],a.push(h);break;case\"L\":i(),a.push([e[0],e[1]]);break;case\"C\":if(!r.length){const t=a.length?a[a.length-1]:h;r.push([t[0],t[1]])}r.push([e[0],e[1]]),r.push([e[2],e[3]]),r.push([e[4],e[5]]);break;case\"Z\":i(),a.push([h[0],h[1]])}if(c(),!s)return o;const l=[];for(const t of o){const e=U(t,s);e.length&&l.push(e)}return l}(t,1,h?4-4*(s.simplification||1):(1+s.roughness)/2),i=_(t,s);if(o)if(\"solid\"===s.fillStyle)if(1===r.length){const e=_(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:\"fillPath\",ops:this._mergedShape(e.ops)})}else n.push(I(r,s));else n.push(C(r,s));return a&&(h?r.forEach((t=>{n.push(S(t,!1,s))})):n.push(i)),this._d(\"path\",n,s)}opsToPath(t,e){let s=\"\";for(const n of t.ops){const t=\"number\"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case\"move\":s+=`M${t[0]} ${t[1]} `;break;case\"bcurveTo\":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case\"lineTo\":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){const e=t.sets||[],s=t.options||this.defaultOptions,n=[];for(const t of e){let e=null;switch(t.type){case\"path\":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tt};break;case\"fillPath\":e={d:this.opsToPath(t),stroke:tt,strokeWidth:0,fill:s.fill||tt};break;case\"fillSketch\":e=this.fillSketch(t,s)}e&&n.push(e)}return n}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tt,strokeWidth:s,fill:tt}}_mergedShape(t){return t.filter(((t,e)=>0===e||\"move\"!==t.op))}}class st{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext(\"2d\"),this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case\"path\":n.save(),n.strokeStyle=\"none\"===s.stroke?\"transparent\":s.stroke,n.lineWidth=s.strokeWidth,s.strokeLineDash&&n.setLineDash(s.strokeLineDash),s.strokeLineDashOffset&&(n.lineDashOffset=s.strokeLineDashOffset),this._drawToContext(n,a,o),n.restore();break;case\"fillPath\":{n.save(),n.fillStyle=s.fill||\"\";const e=\"curve\"===t.shape||\"polygon\"===t.shape||\"path\"===t.shape?\"evenodd\":\"nonzero\";this._drawToContext(n,a,o,e),n.restore();break}case\"fillSketch\":this.fillSketch(n,a,s)}}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2),t.save(),s.fillLineDash&&t.setLineDash(s.fillLineDash),s.fillLineDashOffset&&(t.lineDashOffset=s.fillLineDashOffset),t.strokeStyle=s.fill||\"\",t.lineWidth=n,this._drawToContext(t,e,s.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,s,n=\"nonzero\"){t.beginPath();for(const n of e.ops){const e=\"number\"==typeof s&&s>=0?n.data.map((t=>+t.toFixed(s))):n.data;switch(n.op){case\"move\":t.moveTo(e[0],e[1]);break;case\"bcurveTo\":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case\"lineTo\":t.lineTo(e[0],e[1])}}\"fillPath\"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a),a}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a),a}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a),a}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o),o}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s),s}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s),s}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i),i}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s),s}path(t,e){const s=this.gen.path(t,e);return this.draw(s),s}}const nt=\"http://www.w3.org/2000/svg\";class ot{constructor(t,e){this.svg=t,this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(nt,\"g\"),a=t.options.fixedDecimalPlaceDigits;for(const h of e){let e=null;switch(h.type){case\"path\":e=n.createElementNS(nt,\"path\"),e.setAttribute(\"d\",this.opsToPath(h,a)),e.setAttribute(\"stroke\",s.stroke),e.setAttribute(\"stroke-width\",s.strokeWidth+\"\"),e.setAttribute(\"fill\",\"none\"),s.strokeLineDash&&e.setAttribute(\"stroke-dasharray\",s.strokeLineDash.join(\" \").trim()),s.strokeLineDashOffset&&e.setAttribute(\"stroke-dashoffset\",`${s.strokeLineDashOffset}`);break;case\"fillPath\":e=n.createElementNS(nt,\"path\"),e.setAttribute(\"d\",this.opsToPath(h,a)),e.setAttribute(\"stroke\",\"none\"),e.setAttribute(\"stroke-width\",\"0\"),e.setAttribute(\"fill\",s.fill||\"\"),\"curve\"!==t.shape&&\"polygon\"!==t.shape||e.setAttribute(\"fill-rule\",\"evenodd\");break;case\"fillSketch\":e=this.fillSketch(n,h,s)}e&&o.appendChild(e)}return o}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2);const o=t.createElementNS(nt,\"path\");return o.setAttribute(\"d\",this.opsToPath(e,s.fixedDecimalPlaceDigits)),o.setAttribute(\"stroke\",s.fill||\"\"),o.setAttribute(\"stroke-width\",n+\"\"),o.setAttribute(\"fill\",\"none\"),s.fillLineDash&&o.setAttribute(\"stroke-dasharray\",s.fillLineDash.join(\" \").trim()),s.fillLineDashOffset&&o.setAttribute(\"stroke-dashoffset\",`${s.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a)}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a)}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a)}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o)}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s)}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s)}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i)}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s)}path(t,e){const s=this.gen.path(t,e);return this.draw(s)}}var at={canvas:(t,e)=>new st(t,e),svg:(t,e)=>new ot(t,e),generator:t=>new et(t),newSeed:()=>et.newSeed()};export{at as default};\n", "import { log } from '../../../logger.js';\nimport { updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { handleUndefinedAttr } from '../../../utils.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function anchor(parent: D3Selection, node: Node) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const classes = getNodeClasses(node);\n let cssClasses = classes;\n if (!classes) {\n cssClasses = 'anchor';\n }\n const shapeSvg = parent\n .insert('g')\n .attr('class', cssClasses)\n .attr('id', node.domId || node.id);\n\n const radius = 1;\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: 'black', stroke: 'none', fillStyle: 'solid' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n }\n const roughNode = rc.circle(0, 0, radius * 2, options);\n const circleElem = shapeSvg.insert(() => roughNode, ':first-child');\n circleElem.attr('class', 'anchor').attr('style', handleUndefinedAttr(cssStyles));\n\n updateNodeBounds(node, circleElem);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, radius, point);\n return intersect.circle(node, radius, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateArcPoints(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n rx: number,\n ry: number,\n clockwise: boolean\n) {\n const numPoints = 20;\n // Calculate midpoint\n const midX = (x1 + x2) / 2;\n const midY = (y1 + y2) / 2;\n\n // Calculate the angle of the line connecting the points\n const angle = Math.atan2(y2 - y1, x2 - x1);\n\n // Calculate transformed coordinates for the ellipse\n const dx = (x2 - x1) / 2;\n const dy = (y2 - y1) / 2;\n\n // Scale to unit circle\n const transformedX = dx / rx;\n const transformedY = dy / ry;\n\n // Calculate the distance between points on the unit circle\n const distance = Math.sqrt(transformedX ** 2 + transformedY ** 2);\n\n // Check if the ellipse can be drawn with the given radii\n if (distance > 1) {\n throw new Error('The given radii are too small to create an arc between the points.');\n }\n\n // Calculate the distance from the midpoint to the center of the ellipse\n const scaledCenterDistance = Math.sqrt(1 - distance ** 2);\n\n // Calculate the center of the ellipse\n const centerX = midX + scaledCenterDistance * ry * Math.sin(angle) * (clockwise ? -1 : 1);\n const centerY = midY - scaledCenterDistance * rx * Math.cos(angle) * (clockwise ? -1 : 1);\n\n // Calculate the start and end angles on the ellipse\n const startAngle = Math.atan2((y1 - centerY) / ry, (x1 - centerX) / rx);\n const endAngle = Math.atan2((y2 - centerY) / ry, (x2 - centerX) / rx);\n\n // Adjust angles for clockwise/counterclockwise\n let angleRange = endAngle - startAngle;\n if (clockwise && angleRange < 0) {\n angleRange += 2 * Math.PI;\n }\n if (!clockwise && angleRange > 0) {\n angleRange -= 2 * Math.PI;\n }\n\n // Generate points\n const points = [];\n for (let i = 0; i < numPoints; i++) {\n const t = i / (numPoints - 1);\n const angle = startAngle + t * angleRange;\n const x = centerX + rx * Math.cos(angle);\n const y = centerY + ry * Math.sin(angle);\n points.push({ x, y });\n }\n\n return points;\n}\n\nexport async function bowTieRect(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + node.padding + 20;\n const h = bbox.height + node.padding;\n\n const ry = h / 2;\n const rx = ry / (2.5 + h / 50);\n\n // let shape: d3.Selection;\n const { cssStyles } = node;\n\n const points = [\n { x: w / 2, y: -h / 2 },\n { x: -w / 2, y: -h / 2 },\n ...generateArcPoints(-w / 2, -h / 2, -w / 2, h / 2, rx, ry, false),\n { x: w / 2, y: h / 2 },\n ...generateArcPoints(w / 2, h / 2, w / 2, -h / 2, rx, ry, true),\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const bowTieRectPath = createPathFromPoints(points);\n const bowTieRectShapePath = rc.path(bowTieRectPath, options);\n const bowTieRectShape = shapeSvg.insert(() => bowTieRectShapePath, ':first-child');\n\n bowTieRectShape.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n bowTieRectShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n bowTieRectShape.selectAll('path').attr('style', nodeStyles);\n }\n\n bowTieRectShape.attr('transform', `translate(${rx / 2}, 0)`);\n\n updateNodeBounds(node, bowTieRectShape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import type { D3Selection } from '../../../types.js';\n\nexport function insertPolygonShape(\n parent: D3Selection,\n w: number,\n h: number,\n points: { x: number; y: number }[]\n) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\n\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport { createPathFromPoints } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\n// const createPathFromPoints = (points: { x: number; y: number }[]): string => {\n// const pointStrings = points.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x},${p.y}`);\n// pointStrings.push('Z');\n// return pointStrings.join(' ');\n// };\n\nexport async function card(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const h = bbox.height + node.padding;\n const padding = 12;\n const w = bbox.width + node.padding + padding;\n const left = 0;\n const right = w;\n const top = -h;\n const bottom = 0;\n const points = [\n { x: left + padding, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom },\n { x: left, y: top + padding },\n { x: left + padding, y: top },\n ];\n\n let polygon: D3Selection | Awaited>;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { createPathFromPoints, getNodeClasses } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function choice(parent: D3Selection, node: Node) {\n const { nodeStyles } = styles2String(node);\n node.label = '';\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n const { cssStyles } = node;\n\n const s = Math.max(28, node.width ?? 0);\n\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 },\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const choicePath = createPathFromPoints(points);\n const roughNode = rc.path(choicePath, options);\n const choiceShape = shapeSvg.insert(() => roughNode, ':first-child');\n\n if (cssStyles && node.look !== 'handDrawn') {\n choiceShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n choiceShape.selectAll('path').attr('style', nodeStyles);\n }\n\n node.width = 28;\n node.height = 28;\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport async function circle(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));\n\n const radius = bbox.width / 2 + halfPadding;\n let circleElem;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.circle(0, 0, radius * 2, options);\n\n circleElem = shapeSvg.insert(() => roughNode, ':first-child');\n circleElem.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n } else {\n circleElem = shapeSvg\n .insert('circle', ':first-child')\n .attr('class', 'basic label-container')\n .attr('style', nodeStyles)\n .attr('r', radius)\n .attr('cx', 0)\n .attr('cy', 0);\n }\n\n updateNodeBounds(node, circleElem);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, radius, point);\n return intersect.circle(node, radius, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nfunction createLine(r: number) {\n const xAxis45 = Math.cos(Math.PI / 4); // cosine of 45 degrees\n const yAxis45 = Math.sin(Math.PI / 4); // sine of 45 degrees\n const lineLength = r * 2;\n\n const pointQ1 = { x: (lineLength / 2) * xAxis45, y: (lineLength / 2) * yAxis45 }; // Quadrant I\n const pointQ2 = { x: -(lineLength / 2) * xAxis45, y: (lineLength / 2) * yAxis45 }; // Quadrant II\n const pointQ3 = { x: -(lineLength / 2) * xAxis45, y: -(lineLength / 2) * yAxis45 }; // Quadrant III\n const pointQ4 = { x: (lineLength / 2) * xAxis45, y: -(lineLength / 2) * yAxis45 }; // Quadrant IV\n\n return `M ${pointQ2.x},${pointQ2.y} L ${pointQ4.x},${pointQ4.y}\n M ${pointQ1.x},${pointQ1.y} L ${pointQ3.x},${pointQ3.y}`;\n}\n\nexport function crossedCircle(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n node.label = '';\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n const radius = Math.max(30, node?.width ?? 0);\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const circleNode = rc.circle(0, 0, radius * 2, options);\n const linePath = createLine(radius);\n const lineNode = rc.path(linePath, options);\n\n const crossedCircle = shapeSvg.insert(() => circleNode, ':first-child');\n crossedCircle.insert(() => lineNode);\n\n if (cssStyles && node.look !== 'handDrawn') {\n crossedCircle.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n crossedCircle.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, crossedCircle);\n\n node.intersect = function (point) {\n log.info('crossedCircle intersect', node, { radius, point });\n const pos = intersect.circle(node, radius, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateCirclePoints(\n centerX: number,\n centerY: number,\n radius: number,\n numPoints = 100,\n startAngle = 0,\n endAngle = 180\n) {\n const points = [];\n\n // Convert angles to radians\n const startAngleRad = (startAngle * Math.PI) / 180;\n const endAngleRad = (endAngle * Math.PI) / 180;\n\n // Calculate the angle range in radians\n const angleRange = endAngleRad - startAngleRad;\n\n // Calculate the angle step\n const angleStep = angleRange / (numPoints - 1);\n\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x: -x, y: -y });\n }\n\n return points;\n}\n\nexport async function curlyBraceLeft(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + (node.padding ?? 0);\n const h = bbox.height + (node.padding ?? 0);\n const radius = Math.max(5, h * 0.1);\n\n const { cssStyles } = node;\n\n const points = [\n ...generateCirclePoints(w / 2, -h / 2, radius, 30, -90, 0),\n { x: -w / 2 - radius, y: radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n ];\n\n const rectPoints = [\n { x: w / 2, y: -h / 2 - radius },\n { x: -w / 2, y: -h / 2 - radius },\n ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n { x: -w / 2 - radius, y: -radius },\n ...generateCirclePoints(w / 2 + w * 0.1, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + w * 0.1, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n { x: -w / 2, y: h / 2 + radius },\n { x: w / 2, y: h / 2 + radius },\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: 'none' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const curlyBraceLeftPath = createPathFromPoints(points);\n const newCurlyBracePath = curlyBraceLeftPath.replace('Z', '');\n const curlyBraceLeftNode = rc.path(newCurlyBracePath, options);\n const rectPath = createPathFromPoints(rectPoints);\n const rectShape = rc.path(rectPath, { ...options });\n const curlyBraceLeftShape = shapeSvg.insert('g', ':first-child');\n curlyBraceLeftShape.insert(() => rectShape, ':first-child').attr('stroke-opacity', 0);\n curlyBraceLeftShape.insert(() => curlyBraceLeftNode, ':first-child');\n curlyBraceLeftShape.attr('class', 'text');\n\n if (cssStyles && node.look !== 'handDrawn') {\n curlyBraceLeftShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n curlyBraceLeftShape.selectAll('path').attr('style', nodeStyles);\n }\n\n curlyBraceLeftShape.attr('transform', `translate(${radius}, 0)`);\n\n label.attr(\n 'transform',\n `translate(${-w / 2 + radius - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, curlyBraceLeftShape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, rectPoints, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateCirclePoints(\n centerX: number,\n centerY: number,\n radius: number,\n numPoints = 100,\n startAngle = 0,\n endAngle = 180\n) {\n const points = [];\n\n // Convert angles to radians\n const startAngleRad = (startAngle * Math.PI) / 180;\n const endAngleRad = (endAngle * Math.PI) / 180;\n\n // Calculate the angle range in radians\n const angleRange = endAngleRad - startAngleRad;\n\n // Calculate the angle step\n const angleStep = angleRange / (numPoints - 1);\n\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x, y });\n }\n\n return points;\n}\n\nexport async function curlyBraceRight(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + (node.padding ?? 0);\n const h = bbox.height + (node.padding ?? 0);\n const radius = Math.max(5, h * 0.1);\n\n const { cssStyles } = node;\n\n const points = [\n ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n { x: w / 2 + radius, y: -radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: w / 2 + radius, y: h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n ];\n\n const rectPoints = [\n { x: -w / 2, y: -h / 2 - radius },\n { x: w / 2, y: -h / 2 - radius },\n ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n { x: w / 2 + radius, y: -radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: w / 2 + radius, y: h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n { x: w / 2, y: h / 2 + radius },\n { x: -w / 2, y: h / 2 + radius },\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: 'none' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const curlyBraceRightPath = createPathFromPoints(points);\n const newCurlyBracePath = curlyBraceRightPath.replace('Z', '');\n const curlyBraceRightNode = rc.path(newCurlyBracePath, options);\n const rectPath = createPathFromPoints(rectPoints);\n const rectShape = rc.path(rectPath, { ...options });\n const curlyBraceRightShape = shapeSvg.insert('g', ':first-child');\n curlyBraceRightShape.insert(() => rectShape, ':first-child').attr('stroke-opacity', 0);\n curlyBraceRightShape.insert(() => curlyBraceRightNode, ':first-child');\n curlyBraceRightShape.attr('class', 'text');\n\n if (cssStyles && node.look !== 'handDrawn') {\n curlyBraceRightShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n curlyBraceRightShape.selectAll('path').attr('style', nodeStyles);\n }\n\n curlyBraceRightShape.attr('transform', `translate(${-radius}, 0)`);\n\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, curlyBraceRightShape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, rectPoints, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateCirclePoints(\n centerX: number,\n centerY: number,\n radius: number,\n numPoints = 100,\n startAngle = 0,\n endAngle = 180\n) {\n const points = [];\n\n // Convert angles to radians\n const startAngleRad = (startAngle * Math.PI) / 180;\n const endAngleRad = (endAngle * Math.PI) / 180;\n\n // Calculate the angle range in radians\n const angleRange = endAngleRad - startAngleRad;\n\n // Calculate the angle step\n const angleStep = angleRange / (numPoints - 1);\n\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x: -x, y: -y });\n }\n\n return points;\n}\n\nexport async function curlyBraces(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + (node.padding ?? 0);\n const h = bbox.height + (node.padding ?? 0);\n const radius = Math.max(5, h * 0.1);\n\n const { cssStyles } = node;\n\n const leftCurlyBracePoints = [\n ...generateCirclePoints(w / 2, -h / 2, radius, 30, -90, 0),\n { x: -w / 2 - radius, y: radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n ];\n\n const rightCurlyBracePoints = [\n ...generateCirclePoints(-w / 2 + radius + radius / 2, -h / 2, radius, 20, -90, -180),\n { x: w / 2 - radius / 2, y: radius },\n ...generateCirclePoints(-w / 2 - radius / 2, -radius, radius, 20, 0, 90),\n ...generateCirclePoints(-w / 2 - radius / 2, radius, radius, 20, -90, 0),\n { x: w / 2 - radius / 2, y: -radius },\n ...generateCirclePoints(-w / 2 + radius + radius / 2, h / 2, radius, 30, -180, -270),\n ];\n\n const rectPoints = [\n { x: w / 2, y: -h / 2 - radius },\n { x: -w / 2, y: -h / 2 - radius },\n ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n { x: -w / 2 - radius, y: -radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n { x: -w / 2, y: h / 2 + radius },\n { x: w / 2 - radius - radius / 2, y: h / 2 + radius },\n ...generateCirclePoints(-w / 2 + radius + radius / 2, -h / 2, radius, 20, -90, -180),\n { x: w / 2 - radius / 2, y: radius },\n ...generateCirclePoints(-w / 2 - radius / 2, -radius, radius, 20, 0, 90),\n ...generateCirclePoints(-w / 2 - radius / 2, radius, radius, 20, -90, 0),\n { x: w / 2 - radius / 2, y: -radius },\n ...generateCirclePoints(-w / 2 + radius + radius / 2, h / 2, radius, 30, -180, -270),\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: 'none' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const leftCurlyBracePath = createPathFromPoints(leftCurlyBracePoints);\n const newLeftCurlyBracePath = leftCurlyBracePath.replace('Z', '');\n const leftCurlyBraceNode = rc.path(newLeftCurlyBracePath, options);\n const rightCurlyBracePath = createPathFromPoints(rightCurlyBracePoints);\n const newRightCurlyBracePath = rightCurlyBracePath.replace('Z', '');\n const rightCurlyBraceNode = rc.path(newRightCurlyBracePath, options);\n const rectPath = createPathFromPoints(rectPoints);\n const rectShape = rc.path(rectPath, { ...options });\n const curlyBracesShape = shapeSvg.insert('g', ':first-child');\n curlyBracesShape.insert(() => rectShape, ':first-child').attr('stroke-opacity', 0);\n curlyBracesShape.insert(() => leftCurlyBraceNode, ':first-child');\n curlyBracesShape.insert(() => rightCurlyBraceNode, ':first-child');\n curlyBracesShape.attr('class', 'text');\n\n if (cssStyles && node.look !== 'handDrawn') {\n curlyBracesShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n curlyBracesShape.selectAll('path').attr('style', nodeStyles);\n }\n\n curlyBracesShape.attr('transform', `translate(${radius - radius / 4}, 0)`);\n\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, curlyBracesShape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, rectPoints, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n createPathFromPoints,\n generateCirclePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function curvedTrapezoid(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const minWidth = 80,\n minHeight = 20;\n const w = Math.max(minWidth, (bbox.width + (node.padding ?? 0) * 2) * 1.25, node?.width ?? 0);\n const h = Math.max(minHeight, bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const radius = h / 2;\n\n const { cssStyles } = node;\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const totalWidth = w,\n totalHeight = h;\n const rw = totalWidth - radius;\n const tw = totalHeight / 4;\n\n const points = [\n { x: rw, y: 0 },\n { x: tw, y: 0 },\n { x: 0, y: totalHeight / 2 },\n { x: tw, y: totalHeight },\n { x: rw, y: totalHeight },\n ...generateCirclePoints(-rw, -totalHeight / 2, radius, 50, 270, 90),\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n polygon.attr('transform', `translate(${-w / 2}, ${-h / 2})`);\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n ].join(' ');\n};\nexport const createOuterCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `M${x + width},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [`M${x - width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 ${width},0`].join(' ');\n};\nexport async function cylinder(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + node.padding, node.width ?? 0);\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = Math.max(bbox.height + ry + node.padding, node.height ?? 0);\n\n let cylinder: D3Selection | D3Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry);\n const innerPathData = createInnerCylinderPathD(0, ry, w, h, rx, ry);\n const outerNode = rc.path(outerPathData, userNodeOverrides(node, {}));\n const innerLine = rc.path(innerPathData, userNodeOverrides(node, { fill: 'none' }));\n\n cylinder = shapeSvg.insert(() => innerLine, ':first-child');\n cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n cylinder.attr('class', 'basic label-container');\n if (cssStyles) {\n cylinder.attr('style', cssStyles);\n }\n } else {\n const pathData = createCylinderPathD(0, 0, w, h, rx, ry);\n cylinder = shapeSvg\n .insert('path', ':first-child')\n .attr('d', pathData)\n .attr('class', 'basic label-container')\n .attr('style', handleUndefinedAttr(cssStyles))\n .attr('style', nodeStyles);\n }\n\n cylinder.attr('label-offset-y', ry);\n cylinder.attr('transform', `translate(${-w / 2}, ${-(h / 2 + ry)})`);\n\n updateNodeBounds(node, cylinder);\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + (node.padding ?? 0) / 1.5 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - (node.x ?? 0);\n\n if (\n rx != 0 &&\n (Math.abs(x) < (node.width ?? 0) / 2 ||\n (Math.abs(x) == (node.width ?? 0) / 2 &&\n Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry))\n ) {\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y > 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - (node.y ?? 0) > 0) {\n y = -y;\n }\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function dividedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const rectOffset = h * 0.2;\n\n const x = -w / 2;\n const y = -h / 2 - rectOffset / 2;\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const pts = [\n { x, y: y + rectOffset },\n { x: -x, y: y + rectOffset },\n { x: -x, y: -y },\n { x, y: -y },\n { x, y },\n { x: -x, y },\n { x: -x, y: y + rectOffset },\n ];\n\n const poly = rc.polygon(\n pts.map((p) => [p.x, p.y]),\n options\n );\n\n const polygon = shapeSvg.insert(() => poly, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectAll('path').attr('style', nodeStyles);\n }\n\n label.attr(\n 'transform',\n `translate(${x + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))}, ${y + rectOffset + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport async function doublecircle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));\n const gap = 5;\n const outerRadius = bbox.width / 2 + halfPadding + gap;\n const innerRadius = bbox.width / 2 + halfPadding;\n\n let circleGroup;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const outerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 2.5 });\n\n const innerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 1.5 });\n const outerRoughNode = rc.circle(0, 0, outerRadius * 2, outerOptions);\n const innerRoughNode = rc.circle(0, 0, innerRadius * 2, innerOptions);\n\n circleGroup = shapeSvg.insert('g', ':first-child');\n // circleGroup = circleGroup.insert(() => outerRoughNode, ':first-child');\n circleGroup\n .attr('class', handleUndefinedAttr(node.cssClasses))\n .attr('style', handleUndefinedAttr(cssStyles));\n\n circleGroup.node()?.appendChild(outerRoughNode);\n circleGroup.node()?.appendChild(innerRoughNode);\n } else {\n circleGroup = shapeSvg.insert('g', ':first-child');\n\n const outerCircle = circleGroup.insert('circle', ':first-child');\n const innerCircle = circleGroup.insert('circle');\n circleGroup.attr('class', 'basic label-container').attr('style', nodeStyles);\n\n outerCircle\n .attr('class', 'outer-circle')\n .attr('style', nodeStyles)\n .attr('r', outerRadius)\n .attr('cx', 0)\n .attr('cy', 0);\n\n innerCircle\n .attr('class', 'inner-circle')\n .attr('style', nodeStyles)\n .attr('r', innerRadius)\n .attr('cx', 0)\n .attr('cy', 0);\n }\n\n updateNodeBounds(node, circleGroup);\n\n node.intersect = function (point) {\n log.info('DoubleCircle intersect', node, outerRadius, point);\n return intersect.circle(node, outerRadius, point);\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function filledCircle(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables } }: ShapeRenderOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.label = '';\n node.labelStyle = labelStyles;\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n const radius = 7;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const { nodeBorder } = themeVariables;\n const options = userNodeOverrides(node, { fillStyle: 'solid' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n }\n\n const circleNode = rc.circle(0, 0, radius * 2, options);\n\n const filledCircle = shapeSvg.insert(() => circleNode, ':first-child');\n\n filledCircle.selectAll('path').attr('style', `fill: ${nodeBorder} !important;`);\n\n if (cssStyles && cssStyles.length > 0 && node.look !== 'handDrawn') {\n filledCircle.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n filledCircle.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, filledCircle);\n\n node.intersect = function (point) {\n log.info('filledCircle intersect', node, { radius, point });\n const pos = intersect.circle(node, radius, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { createPathFromPoints } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function flippedTriangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + (node.padding ?? 0);\n const h = w + bbox.height;\n\n const tw = w + bbox.height;\n const points = [\n { x: 0, y: -h },\n { x: tw, y: -h },\n { x: tw / 2, y: 0 },\n ];\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n const flippedTriangle = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-h / 2}, ${h / 2})`);\n\n if (cssStyles && node.look !== 'handDrawn') {\n flippedTriangle.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n flippedTriangle.selectChildren('path').attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, flippedTriangle);\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-h / 2 + (node.padding ?? 0) / 2 + (bbox.y - (bbox.top ?? 0))})`\n );\n\n node.intersect = function (point) {\n log.info('Triangle intersect', node, points, point);\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function forkJoin(\n parent: D3Selection,\n node: Node,\n { dir, config: { state, themeVariables } }: ShapeRenderOptions\n) {\n const { nodeStyles } = styles2String(node);\n node.label = '';\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n\n const { cssStyles } = node;\n let width = Math.max(70, node?.width ?? 0);\n let height = Math.max(10, node?.height ?? 0);\n\n if (dir === 'LR') {\n width = Math.max(10, node?.width ?? 0);\n height = Math.max(70, node?.height ?? 0);\n }\n\n const x = (-1 * width) / 2;\n const y = (-1 * height) / 2;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n stroke: themeVariables.lineColor,\n fill: themeVariables.lineColor,\n });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const roughNode = rc.rectangle(x, y, width, height, options);\n\n const shape = shapeSvg.insert(() => roughNode, ':first-child');\n\n if (cssStyles && node.look !== 'handDrawn') {\n shape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n shape.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, shape);\n const padding = state?.padding ?? 0;\n if (node.width && node.height) {\n node.width += padding / 2 || 0;\n node.height += padding / 2 || 0;\n }\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n createPathFromPoints,\n generateCirclePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function halfRoundedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const minWidth = 80,\n minHeight = 50;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(minWidth, bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(minHeight, bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const radius = h / 2;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2, y: -h / 2 },\n { x: w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints(-w / 2 + radius, 0, radius, 50, 90, 270),\n { x: w / 2 - radius, y: h / 2 },\n { x: -w / 2, y: h / 2 },\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n // label.attr(\n // 'transform',\n // `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))}, ${-h / 2 + (node.padding ?? 0) - (bbox.y - (bbox.top ?? 0))})`\n // );\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n log.info('Pill intersect', node, { radius, point });\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport const createHexagonPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n m: number\n): string => {\n return [\n `M${x + m},${y}`,\n `L${x + width - m},${y}`,\n `L${x + width},${y - height / 2}`,\n `L${x + width - m},${y - height}`,\n `L${x + m},${y - height}`,\n `L${x},${y - height / 2}`,\n 'Z',\n ].join(' ');\n};\n\nexport async function hexagon(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n let polygon: D3Selection | Awaited>;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createHexagonPathD(0, 0, w, h, m);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function hourglass(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.label = '';\n node.labelStyle = labelStyles;\n const { shapeSvg } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = Math.max(30, node?.width ?? 0);\n const h = Math.max(30, node?.height ?? 0);\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: 0, y: h },\n { x: w, y: h },\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n polygon.attr('transform', `translate(${-w / 2}, ${-h / 2})`);\n\n updateNodeBounds(node, polygon);\n\n // label.attr('transform', `translate(${-bbox.width / 2}, ${(h/2)})`); // To transform text below hourglass shape\n\n node.intersect = function (point) {\n log.info('Pill intersect', node, { points });\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function icon(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'icon-shape default');\n\n const topLabel = node.pos === 't';\n\n const height = iconSize;\n const width = iconSize;\n const { nodeBorder } = themeVariables;\n const { stylesMap } = compileStyles(node);\n\n const x = -width / 2;\n const y = -height / 2;\n\n const labelPadding = node.label ? 8 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { stroke: 'none', fill: 'none' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const iconNode = rc.rectangle(x, y, width, height, options);\n\n const outerWidth = Math.max(width, bbox.width);\n const outerHeight = height + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'transparent',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => iconNode, ':first-child');\n const outerShape = shapeSvg.insert(() => outerNode);\n\n if (node.icon) {\n const iconElem = shapeSvg.append('g');\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: '',\n })}`\n );\n const iconBBox = iconElem.node()!.getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n iconElem.attr(\n 'transform',\n `translate(${-iconWidth / 2 - iconX},${\n topLabel\n ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n })`\n );\n iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n }\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n if (!node.label) {\n return intersect.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n ];\n } else {\n points = [\n { x: dx - width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + height },\n ];\n }\n\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function iconCircle(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'icon-shape default');\n\n const padding = 20;\n const labelPadding = node.label ? 8 : 0;\n\n const topLabel = node.pos === 't';\n\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const fill = stylesMap.get('fill');\n options.stroke = fill ?? mainBkg;\n\n const iconElem = shapeSvg.append('g');\n if (node.icon) {\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: '',\n })}`\n );\n }\n const iconBBox = iconElem.node()!.getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n\n const diameter = Math.max(iconWidth, iconHeight) * Math.SQRT2 + padding * 2;\n const iconNode = rc.circle(0, 0, diameter, options);\n\n const outerWidth = Math.max(diameter, bbox.width);\n const outerHeight = diameter + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'transparent',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => iconNode, ':first-child');\n const outerShape = shapeSvg.insert(() => outerNode);\n iconElem.attr(\n 'transform',\n `translate(${-iconWidth / 2 - iconX},${\n topLabel\n ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n })`\n );\n iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n const pos = intersect.rect(node, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "export const createRoundedRectPathD = (\n x: number,\n y: number,\n totalWidth: number,\n totalHeight: number,\n radius: number\n) =>\n [\n 'M',\n x + radius,\n y, // Move to the first point\n 'H',\n x + totalWidth - radius, // Draw horizontal line to the beginning of the right corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth,\n y + radius, // Draw arc to the right top corner\n 'V',\n y + totalHeight - radius, // Draw vertical line down to the beginning of the right bottom corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth - radius,\n y + totalHeight, // Draw arc to the right bottom corner\n 'H',\n x + radius, // Draw horizontal line to the beginning of the left bottom corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x,\n y + totalHeight - radius, // Draw arc to the left bottom corner\n 'V',\n y + radius, // Draw vertical line up to the beginning of the left top corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + radius,\n y, // Draw arc to the left top corner\n 'Z', // Close the path\n ].join(' ');\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function iconRounded(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n parent,\n node,\n 'icon-shape default'\n );\n\n const topLabel = node.pos === 't';\n\n const height = iconSize + halfPadding * 2;\n const width = iconSize + halfPadding * 2;\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n\n const x = -width / 2;\n const y = -height / 2;\n\n const labelPadding = node.label ? 8 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const fill = stylesMap.get('fill');\n options.stroke = fill ?? mainBkg;\n\n const iconNode = rc.path(createRoundedRectPathD(x, y, width, height, 5), options);\n\n const outerWidth = Math.max(width, bbox.width);\n const outerHeight = height + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'transparent',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => iconNode, ':first-child').attr('class', 'icon-shape2');\n const outerShape = shapeSvg.insert(() => outerNode);\n\n if (node.icon) {\n const iconElem = shapeSvg.append('g');\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: '',\n })}`\n );\n const iconBBox = iconElem.node()!.getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n iconElem.attr(\n 'transform',\n `translate(${-iconWidth / 2 - iconX},${\n topLabel\n ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n })`\n );\n iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n }\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n if (!node.label) {\n return intersect.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n ];\n } else {\n points = [\n { x: dx - width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + height },\n ];\n }\n\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function iconSquare(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n parent,\n node,\n 'icon-shape default'\n );\n\n const topLabel = node.pos === 't';\n\n const height = iconSize + halfPadding * 2;\n const width = iconSize + halfPadding * 2;\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n\n const x = -width / 2;\n const y = -height / 2;\n\n const labelPadding = node.label ? 8 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const fill = stylesMap.get('fill');\n options.stroke = fill ?? mainBkg;\n\n const iconNode = rc.path(createRoundedRectPathD(x, y, width, height, 0.1), options);\n\n const outerWidth = Math.max(width, bbox.width);\n const outerHeight = height + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'transparent',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => iconNode, ':first-child');\n const outerShape = shapeSvg.insert(() => outerNode);\n\n if (node.icon) {\n const iconElem = shapeSvg.append('g');\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: '',\n })}`\n );\n const iconBBox = iconElem.node()!.getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n iconElem.attr(\n 'transform',\n `translate(${-iconWidth / 2 - iconX},${\n topLabel\n ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n })`\n );\n iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n }\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n if (!node.label) {\n return intersect.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n ];\n } else {\n points = [\n { x: dx - width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + height },\n ];\n }\n\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function imageSquare(\n parent: D3Selection,\n node: Node,\n { config: { flowchart } }: ShapeRenderOptions\n) {\n const img = new Image();\n img.src = node?.img ?? '';\n await img.decode();\n\n const imageNaturalWidth = Number(img.naturalWidth.toString().replace('px', ''));\n const imageNaturalHeight = Number(img.naturalHeight.toString().replace('px', ''));\n node.imageAspectRatio = imageNaturalWidth / imageNaturalHeight;\n\n const { labelStyles } = styles2String(node);\n\n node.labelStyle = labelStyles;\n\n const defaultWidth = flowchart?.wrappingWidth;\n node.defaultWidth = flowchart?.wrappingWidth;\n\n const imageRawWidth = Math.max(\n node.label ? (defaultWidth ?? 0) : 0,\n node?.assetWidth ?? imageNaturalWidth\n );\n\n const imageWidth =\n node.constraint === 'on'\n ? node?.assetHeight\n ? node.assetHeight * node.imageAspectRatio\n : imageRawWidth\n : imageRawWidth;\n\n const imageHeight =\n node.constraint === 'on'\n ? imageWidth / node.imageAspectRatio\n : (node?.assetHeight ?? imageNaturalHeight);\n node.width = Math.max(imageWidth, defaultWidth ?? 0);\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'image-shape default');\n\n const topLabel = node.pos === 't';\n\n const x = -imageWidth / 2;\n const y = -imageHeight / 2;\n\n const labelPadding = node.label ? 8 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const imageNode = rc.rectangle(x, y, imageWidth, imageHeight, options);\n\n const outerWidth = Math.max(imageWidth, bbox.width);\n const outerHeight = imageHeight + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'none',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => imageNode, ':first-child');\n const outerShape = shapeSvg.insert(() => outerNode);\n\n if (node.img) {\n const image = shapeSvg.append('image');\n\n // Set the image attributes\n image.attr('href', node.img);\n image.attr('width', imageWidth);\n image.attr('height', imageHeight);\n image.attr('preserveAspectRatio', 'none');\n\n image.attr(\n 'transform',\n `translate(${-imageWidth / 2},${topLabel ? outerHeight / 2 - imageHeight : -outerHeight / 2})`\n );\n }\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel\n ? -imageHeight / 2 - bbox.height / 2 - labelPadding / 2\n : imageHeight / 2 - bbox.height / 2 + labelPadding / 2\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n if (!node.label) {\n return intersect.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + imageWidth / 2, y: dy + nodeHeight / 2 },\n { x: dx - imageWidth / 2, y: dy + nodeHeight / 2 },\n { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n ];\n } else {\n points = [\n { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 },\n { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 },\n { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 + imageHeight },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + imageHeight },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + imageHeight },\n { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 + imageHeight },\n ];\n }\n\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\n// export const createInvertedTrapezoidPathD = (\n// x: number,\n// y: number,\n// width: number,\n// height: number\n// ): string => {\n// return [\n// `M${x + height / 6},${y}`,\n// `L${x + width - height / 6},${y}`,\n// `L${x + width + (2 * height) / 6},${y - height}`,\n// `L${x - (2 * height) / 6},${y - height}`,\n// 'Z',\n// ].join(' ');\n// };\n\nexport async function inv_trapezoid(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w + (3 * h) / 6, y: -h },\n { x: (-3 * h) / 6, y: -h },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n // const pathData = createInvertedTrapezoidPathD(0, 0, w, h);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node, RectOptions } from '../../types.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { userNodeOverrides, styles2String } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport async function drawRect(\n parent: D3Selection,\n node: Node,\n options: RectOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n // console.log('IPI labelStyles:', labelStyles);\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const totalWidth = Math.max(bbox.width + options.labelPaddingX * 2, node?.width || 0);\n const totalHeight = Math.max(bbox.height + options.labelPaddingY * 2, node?.height || 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n\n // log.info('IPI node = ', node);\n\n let rect;\n let { rx, ry } = node;\n const { cssStyles } = node;\n\n //use options rx, ry overrides if present\n if (options?.rx && options.ry) {\n rx = options.rx;\n ry = options.ry;\n }\n\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const roughNode =\n rx || ry\n ? rc.path(createRoundedRectPathD(x, y, totalWidth, totalHeight, rx || 0), options)\n : rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n rect = shapeSvg.insert(() => roughNode, ':first-child');\n rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n } else {\n rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'basic label-container')\n .attr('style', nodeStyles)\n .attr('rx', handleUndefinedAttr(rx))\n .attr('ry', handleUndefinedAttr(ry))\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import type { Node, RectOptions } from '../../types.js';\nimport { drawRect } from './drawRect.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function roundedRect(\n parent: D3Selection,\n node: Node\n) {\n const options = {\n rx: 5,\n ry: 5,\n classes: '',\n labelPaddingX: (node?.padding || 0) * 1,\n labelPaddingY: (node?.padding || 0) * 1,\n } as RectOptions;\n\n return drawRect(parent, node, options);\n}\n\nexport async function labelRect(parent: D3Selection, node: Node) {\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'label');\n\n // log.trace('Classes = ', node.class);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Hide the rect we are only after the label\n const totalWidth = 0.1;\n const totalHeight = 0.1;\n rect.attr('width', totalWidth).attr('height', totalHeight);\n shapeSvg.attr('class', 'label edgeLabel');\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n\n // if (node.props) {\n // const propKeys = new Set(Object.keys(node.props));\n // if (node.props.borders) {\n // applyNodePropertyBorders(rect, node.borders, totalWidth, totalHeight);\n // propKeys.delete('borders');\n // }\n // propKeys.forEach((propKey) => {\n // log.warn(`Unknown node property ${propKey}`);\n // });\n // }\n\n updateNodeBounds(node, rect);\n // node.width = 1;\n // node.height = 1;\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function lean_left(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0), node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0), node?.height ?? 0);\n const points = [\n { x: 0, y: 0 },\n { x: w + (3 * h) / 6, y: 0 },\n { x: w, y: -h },\n { x: -(3 * h) / 6, y: -h },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n // const pathData = createLeanLeftPathD(0, 0, w, h);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function lean_right(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0), node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0), node?.height ?? 0);\n const points = [\n { x: (-3 * h) / 6, y: 0 },\n { x: w, y: 0 },\n { x: w + (3 * h) / 6, y: -h },\n { x: 0, y: -h },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport { createPathFromPoints } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function lightningBolt(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.label = '';\n node.labelStyle = labelStyles;\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n const { cssStyles } = node;\n const width = Math.max(35, node?.width ?? 0);\n const height = Math.max(35, node?.height ?? 0);\n const gap = 7;\n\n const points = [\n { x: width, y: 0 },\n { x: 0, y: height + gap / 2 },\n { x: width - 2 * gap, y: height + gap / 2 },\n { x: 0, y: 2 * height },\n { x: width, y: height - gap / 2 },\n { x: 2 * gap, y: height - gap / 2 },\n ];\n\n // @ts-expect-error shapeSvg d3 class is incorrect?\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const linePath = createPathFromPoints(points);\n const lineNode = rc.path(linePath, options);\n\n const lightningBolt = shapeSvg.insert(() => lineNode, ':first-child');\n\n if (cssStyles && node.look !== 'handDrawn') {\n lightningBolt.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n lightningBolt.selectAll('path').attr('style', nodeStyles);\n }\n\n lightningBolt.attr('transform', `translate(-${width / 2},${-height})`);\n\n updateNodeBounds(node, lightningBolt);\n\n node.intersect = function (point) {\n log.info('lightningBolt intersect', node, point);\n const pos = intersect.polygon(node, points, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number,\n outerOffset: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n `M${x},${y + ry + outerOffset}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n ].join(' ');\n};\nexport const createOuterCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number,\n outerOffset: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `M${x + width},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n `M${x},${y + ry + outerOffset}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [`M${x - width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 ${width},0`].join(' ');\n};\nexport async function linedCylinder(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0), node.width ?? 0);\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = Math.max(bbox.height + ry + (node.padding ?? 0), node.height ?? 0);\n const outerOffset = h * 0.1; // 10% of height\n\n let cylinder: typeof shapeSvg | D3Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry, outerOffset);\n const innerPathData = createInnerCylinderPathD(0, ry, w, h, rx, ry);\n const options = userNodeOverrides(node, {});\n\n const outerNode = rc.path(outerPathData, options);\n const innerLine = rc.path(innerPathData, options);\n\n const innerLineEl = shapeSvg.insert(() => innerLine, ':first-child');\n innerLineEl.attr('class', 'line');\n cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n cylinder.attr('class', 'basic label-container');\n if (cssStyles) {\n cylinder.attr('style', cssStyles);\n }\n } else {\n const pathData = createCylinderPathD(0, 0, w, h, rx, ry, outerOffset);\n cylinder = shapeSvg\n .insert('path', ':first-child')\n .attr('d', pathData)\n .attr('class', 'basic label-container')\n .attr('style', handleUndefinedAttr(cssStyles))\n .attr('style', nodeStyles);\n }\n\n // find label and move it down\n cylinder.attr('label-offset-y', ry);\n cylinder.attr('transform', `translate(${-w / 2}, ${-(h / 2 + ry)})`);\n\n updateNodeBounds(node, cylinder);\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + ry - (bbox.y - (bbox.top ?? 0))})`\n );\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - (node.x ?? 0);\n\n if (\n rx != 0 &&\n (Math.abs(x) < (node.width ?? 0) / 2 ||\n (Math.abs(x) == (node.width ?? 0) / 2 &&\n Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry))\n ) {\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y > 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - (node.y ?? 0) > 0) {\n y = -y;\n }\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n generateFullSineWavePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function linedWaveEdgedRect(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const waveAmplitude = h / 4;\n const finalH = h + waveAmplitude;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2 - (w / 2) * 0.1, y: -finalH / 2 },\n { x: -w / 2 - (w / 2) * 0.1, y: finalH / 2 },\n ...generateFullSineWavePoints(\n -w / 2 - (w / 2) * 0.1,\n finalH / 2,\n w / 2 + (w / 2) * 0.1,\n finalH / 2,\n waveAmplitude,\n 0.8\n ),\n { x: w / 2 + (w / 2) * 0.1, y: -finalH / 2 },\n { x: -w / 2 - (w / 2) * 0.1, y: -finalH / 2 },\n { x: -w / 2, y: -finalH / 2 },\n { x: -w / 2, y: (finalH / 2) * 1.1 },\n { x: -w / 2, y: -finalH / 2 },\n ];\n\n const poly = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n\n const waveEdgeRect = shapeSvg.insert(() => poly, ':first-child');\n\n waveEdgeRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', nodeStyles);\n }\n\n waveEdgeRect.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) + ((w / 2) * 0.1) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, waveEdgeRect);\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, getNodeClasses, updateNodeBounds, createPathFromPoints } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function multiRect(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const rectOffset = 5;\n const x = -w / 2;\n const y = -h / 2;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const outerPathPoints = [\n { x: x - rectOffset, y: y + rectOffset },\n { x: x - rectOffset, y: y + h + rectOffset },\n { x: x + w - rectOffset, y: y + h + rectOffset },\n { x: x + w - rectOffset, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y: y + h - rectOffset },\n { x: x + w + rectOffset, y: y + h - rectOffset },\n { x: x + w + rectOffset, y: y - rectOffset },\n { x: x + rectOffset, y: y - rectOffset },\n { x: x + rectOffset, y: y },\n { x, y },\n { x, y: y + rectOffset },\n ];\n\n const innerPathPoints = [\n { x, y: y + rectOffset },\n { x: x + w - rectOffset, y: y + rectOffset },\n { x: x + w - rectOffset, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y },\n { x, y },\n ];\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const outerPath = createPathFromPoints(outerPathPoints);\n const outerNode = rc.path(outerPath, options);\n const innerPath = createPathFromPoints(innerPathPoints);\n const innerNode = rc.path(innerPath, { ...options, fill: 'none' });\n\n const multiRect = shapeSvg.insert(() => innerNode, ':first-child');\n multiRect.insert(() => outerNode, ':first-child');\n\n multiRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n multiRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n multiRect.selectAll('path').attr('style', nodeStyles);\n }\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - rectOffset - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, multiRect);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, outerPathPoints, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n createPathFromPoints,\n generateFullSineWavePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function multiWaveEdgedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const waveAmplitude = h / 4;\n const finalH = h + waveAmplitude;\n const x = -w / 2;\n const y = -finalH / 2;\n const rectOffset = 5;\n\n const { cssStyles } = node;\n\n const wavePoints = generateFullSineWavePoints(\n x - rectOffset,\n y + finalH + rectOffset,\n x + w - rectOffset,\n y + finalH + rectOffset,\n waveAmplitude,\n 0.8\n );\n\n const lastWavePoint = wavePoints?.[wavePoints.length - 1];\n\n const outerPathPoints = [\n { x: x - rectOffset, y: y + rectOffset },\n { x: x - rectOffset, y: y + finalH + rectOffset },\n ...wavePoints,\n { x: x + w - rectOffset, y: lastWavePoint.y - rectOffset },\n { x: x + w, y: lastWavePoint.y - rectOffset },\n { x: x + w, y: lastWavePoint.y - 2 * rectOffset },\n { x: x + w + rectOffset, y: lastWavePoint.y - 2 * rectOffset },\n { x: x + w + rectOffset, y: y - rectOffset },\n { x: x + rectOffset, y: y - rectOffset },\n { x: x + rectOffset, y: y },\n { x, y },\n { x, y: y + rectOffset },\n ];\n\n const innerPathPoints = [\n { x, y: y + rectOffset },\n { x: x + w - rectOffset, y: y + rectOffset },\n { x: x + w - rectOffset, y: lastWavePoint.y - rectOffset },\n { x: x + w, y: lastWavePoint.y - rectOffset },\n { x: x + w, y },\n { x, y },\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const outerPath = createPathFromPoints(outerPathPoints);\n const outerNode = rc.path(outerPath, options);\n const innerPath = createPathFromPoints(innerPathPoints);\n const innerNode = rc.path(innerPath, options);\n\n const shape = shapeSvg.insert(() => outerNode, ':first-child');\n shape.insert(() => innerNode);\n\n shape.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n shape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n shape.selectAll('path').attr('style', nodeStyles);\n }\n\n shape.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - rectOffset - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, shape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, outerPathPoints, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\nimport { getConfig } from '../../../config.js';\n\nexport async function note(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables } }: ShapeRenderOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart?.htmlLabels !== false;\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const totalHeight = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n const { cssStyles } = node;\n\n // add the rect\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n fill: themeVariables.noteBkgColor,\n stroke: themeVariables.noteBorderColor,\n });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const noteShapeNode = rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n const rect = shapeSvg.insert(() => noteShapeNode, ':first-child');\n rect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n rect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n rect.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport const createDecisionBoxPathD = (x: number, y: number, size: number): string => {\n return [\n `M${x + size / 2},${y}`,\n `L${x + size},${y - size / 2}`,\n `L${x + size / 2},${y - size}`,\n `L${x},${y - size / 2}`,\n 'Z',\n ].join(' ');\n};\n\nexport async function question(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createDecisionBoxPathD(0, 0, s);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-s / 2}, ${s / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, s, s, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n log.debug(\n 'APA12 Intersect called SPLIT\\npoint:',\n point,\n '\\nnode:\\n',\n node,\n '\\nres:',\n intersect.polygon(node, points, point)\n );\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function rect_left_inv_arrow(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = Math.max(bbox.width + (node.padding ?? 0), node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0), node?.height ?? 0);\n\n const x = -w / 2;\n const y = -h / 2;\n const notch = y / 2;\n\n const points = [\n { x: x + notch, y },\n { x: x, y: 0 },\n { x: x + notch, y: -y },\n { x: -x, y: -y },\n { x: -x, y },\n ];\n\n const { cssStyles } = node;\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n const polygon = shapeSvg.insert(() => roughNode, ':first-child');\n\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectAll('path').attr('style', cssStyles);\n }\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectAll('path').attr('style', nodeStyles);\n }\n\n polygon.attr('transform', `translate(${-notch / 2},0)`);\n\n label.attr(\n 'transform',\n `translate(${-notch / 2 - bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { select } from 'd3';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport common, { evaluate, renderKatex, hasKatex } from '../../diagrams/common/common.js';\nimport { decodeEntities } from '../../utils.js';\n\n/**\n * @param dom\n * @param styleFn\n */\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\n/**\n * @param {any} node\n * @returns {Promise} Node\n */\nasync function addHtmlLabel(node) {\n const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n const div = fo.append('xhtml:div');\n\n let label = node.label;\n if (node.label && hasKatex(node.label)) {\n label = await renderKatex(node.label.replace(common.lineBreakRegex, '\\n'), getConfig());\n }\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n div.html(\n '' +\n label +\n ''\n );\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block');\n div.style('padding-right', '1px');\n // Fix for firefox\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n}\n/**\n * @param _vertexText\n * @param style\n * @param isTitle\n * @param isNode\n * @deprecated svg-util/createText instead\n */\nconst createLabel = async (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || '';\n if (typeof vertexText === 'object') {\n vertexText = vertexText[0];\n }\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
    ');\n log.info('vertexText' + vertexText);\n const node = {\n isNode,\n label: decodeEntities(vertexText).replace(\n /fa[blrs]?:fa-[\\w-]+/g,\n (s) => ``\n ),\n labelStyle: style ? style.replace('fill:', 'color:') : style,\n };\n let vertexNode = await addHtmlLabel(node);\n // vertexNode.parentNode.removeChild(vertexNode);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n let rows = [];\n if (typeof vertexText === 'string') {\n rows = vertexText.split(/\\\\n|\\n|/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n\n for (const row of rows) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n if (isTitle) {\n tspan.setAttribute('class', 'title-row');\n } else {\n tspan.setAttribute('class', 'row');\n }\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\n\nexport default createLabel;\n", "import type { Node } from '../../types.js';\nimport { select } from 'd3';\nimport { evaluate } from '../../../diagrams/common/common.js';\nimport { updateNodeBounds } from './util.js';\nimport createLabel from '../createLabel.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { log } from '../../../logger.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function rectWithTitle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n let classes;\n if (!node.cssClasses) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.cssClasses;\n }\n\n // Add outer g element\n const shapeSvg = parent\n // @ts-ignore - d3 typings are not correct\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const g = shapeSvg.insert('g');\n\n const label = shapeSvg.insert('g').attr('class', 'label').attr('style', nodeStyles);\n\n const description = node.description;\n\n const title = node.label;\n\n const text = label.node()!.appendChild(await createLabel(title, node.labelStyle, true, true));\n let bbox = { width: 0, height: 0 };\n if (evaluate(getConfig()?.flowchart?.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n log.info('Text 2', description);\n const textRows = description || [];\n const titleBox = text.getBBox();\n const descr = label\n .node()!\n .appendChild(\n await createLabel(\n textRows.join ? textRows.join('
    ') : textRows,\n node.labelStyle,\n true,\n true\n )\n );\n\n //if (evaluate(getConfig()?.flowchart?.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n // }\n\n const halfPadding = (node.padding || 0) / 2;\n select(descr).attr(\n 'transform',\n 'translate( ' +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n ', ' +\n (titleBox.height + halfPadding + 5) +\n ')'\n );\n select(text).attr(\n 'transform',\n 'translate( ' +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n ', ' +\n 0 +\n ')'\n );\n // Get the size of the label\n\n // Bounding box for title and text\n bbox = label.node()!.getBBox();\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n );\n\n const totalWidth = bbox.width + (node.padding || 0);\n const totalHeight = bbox.height + (node.padding || 0);\n const x = -bbox.width / 2 - halfPadding;\n const y = -bbox.height / 2 - halfPadding;\n let rect;\n let innerLine;\n if (node.look === 'handDrawn') {\n // @ts-ignore No typings for rough\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.path(\n createRoundedRectPathD(x, y, totalWidth, totalHeight, node.rx || 0),\n options\n );\n\n const roughLine = rc.line(\n -bbox.width / 2 - halfPadding,\n -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n bbox.width / 2 + halfPadding,\n -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n options\n );\n\n innerLine = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughLine;\n }, ':first-child');\n rect = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughNode;\n }, ':first-child');\n } else {\n rect = g.insert('rect', ':first-child');\n innerLine = g.insert('line');\n rect\n .attr('class', 'outer title-state')\n .attr('style', nodeStyles)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + (node.padding || 0))\n .attr('height', bbox.height + (node.padding || 0));\n\n innerLine\n .attr('class', 'divider')\n .attr('x1', -bbox.width / 2 - halfPadding)\n .attr('x2', bbox.width / 2 + halfPadding)\n .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n }\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import type { Node, RectOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\n\nexport async function roundedRect(\n parent: D3Selection,\n node: Node\n) {\n const options = {\n rx: 5,\n ry: 5,\n classes: '',\n labelPaddingX: (node?.padding || 0) * 1,\n labelPaddingY: (node?.padding || 0) * 1,\n } as RectOptions;\n\n return drawRect(parent, node, options);\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport async function shadedProcess(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const halfPadding = node?.padding ?? 0;\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const x = -bbox.width / 2 - halfPadding;\n const y = -bbox.height / 2 - halfPadding;\n\n const { cssStyles } = node;\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x, y },\n { x: x + w + 8, y },\n { x: x + w + 8, y: y + h },\n { x: x - 8, y: y + h },\n { x: x - 8, y: y },\n { x, y },\n { x, y: y + h },\n ];\n\n const roughNode = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n\n const rect = shapeSvg.insert(() => roughNode, ':first-child');\n\n rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n\n if (nodeStyles && node.look !== 'handDrawn') {\n rect.selectAll('path').attr('style', nodeStyles);\n }\n\n if (cssStyles && node.look !== 'handDrawn') {\n rect.selectAll('path').attr('style', nodeStyles);\n }\n\n label.attr(\n 'transform',\n `translate(${-w / 2 + 4 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function slopedRect(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const x = -w / 2;\n const y = -h / 2;\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x, y },\n { x, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y: y - h / 2 },\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n polygon.attr('transform', `translate(0, ${h / 4})`);\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))}, ${-h / 4 + (node.padding ?? 0) - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import type { Node, RectOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\n\nexport async function squareRect(parent: D3Selection, node: Node) {\n const options = {\n rx: 0,\n ry: 0,\n classes: '',\n labelPaddingX: (node?.padding || 0) * 2,\n labelPaddingY: (node?.padding || 0) * 1,\n } as RectOptions;\n return drawRect(parent, node, options);\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createStadiumPathD = (\n x: number,\n y: number,\n totalWidth: number,\n totalHeight: number\n) => {\n const radius = totalHeight / 2;\n return [\n 'M',\n x + radius,\n y, // Move to the start of the top-left arc\n 'H',\n x + totalWidth - radius, // Draw horizontal line to the start of the top-right arc\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth,\n y + radius, // Draw top-right arc\n 'H',\n x, // Draw horizontal line to the start of the bottom-right arc\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth - radius,\n y + totalHeight, // Draw bottom-right arc\n 'H',\n x + radius, // Draw horizontal line to the start of the bottom-left arc\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x,\n y + radius, // Draw bottom-left arc\n 'Z', // Close the path\n ].join(' ');\n};\n\nexport async function stadium(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n\n let rect;\n const { cssStyles } = node;\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const pathData = createRoundedRectPathD(-w / 2, -h / 2, w, h, h / 2);\n const roughNode = rc.path(pathData, options);\n\n rect = shapeSvg.insert(() => roughNode, ':first-child');\n rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n } else {\n rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'basic label-container')\n .attr('style', nodeStyles)\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import type { Node, RectOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\n\nexport async function state(parent: D3Selection, node: Node) {\n const options = {\n rx: 5,\n ry: 5,\n classes: 'flowchart-node',\n } as RectOptions;\n return drawRect(parent, node, options);\n}\n", "import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function stateEnd(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables } }: ShapeRenderOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { cssStyles } = node;\n const { lineColor, stateBorder, nodeBorder } = themeVariables;\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const roughNode = rc.circle(0, 0, 14, {\n ...options,\n stroke: lineColor,\n strokeWidth: 2,\n });\n const innerFill = stateBorder ?? nodeBorder;\n const roughInnerNode = rc.circle(0, 0, 5, {\n ...options,\n fill: innerFill,\n stroke: innerFill,\n strokeWidth: 2,\n fillStyle: 'solid',\n });\n const circle = shapeSvg.insert(() => roughNode, ':first-child');\n circle.insert(() => roughInnerNode);\n\n if (cssStyles) {\n circle.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles) {\n circle.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { solidStateFill } from './handDrawnShapeStyles.js';\nimport { updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function stateStart(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables } }: ShapeRenderOptions\n) {\n const { lineColor } = themeVariables;\n\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let circle: D3Selection | D3Selection;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const roughNode = rc.circle(0, 0, 14, solidStateFill(lineColor));\n circle = shapeSvg.insert(() => roughNode);\n // center the circle around its coordinate\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n } else {\n circle = shapeSvg.insert('circle', ':first-child');\n // center the circle around its coordinate\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n }\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createSubroutinePathD = (\n x: number,\n y: number,\n width: number,\n height: number\n): string => {\n const offset = 8;\n return [\n `M${x - offset},${y}`,\n `H${x + width + offset}`,\n `V${y + height}`,\n `H${x - offset}`,\n `V${y}`,\n 'M',\n x,\n y,\n 'H',\n x + width,\n 'V',\n y + height,\n 'H',\n x,\n 'Z',\n ].join(' ');\n};\n\nexport async function subroutine(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const halfPadding = (node?.padding || 0) / 2;\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const x = -bbox.width / 2 - halfPadding;\n const y = -bbox.height / 2 - halfPadding;\n\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 },\n ];\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const roughNode = rc.rectangle(x - 8, y, w + 16, h, options);\n const l1 = rc.line(x, y, x, y + h, options);\n const l2 = rc.line(x + w, y, x + w, y + h, options);\n\n shapeSvg.insert(() => l1, ':first-child');\n shapeSvg.insert(() => l2, ':first-child');\n const rect = shapeSvg.insert(() => roughNode, ':first-child');\n const { cssStyles } = node;\n rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n updateNodeBounds(node, rect);\n } else {\n const el = insertPolygonShape(shapeSvg, w, h, points);\n if (nodeStyles) {\n el.attr('style', nodeStyles);\n }\n updateNodeBounds(node, el);\n }\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, getNodeClasses, updateNodeBounds, createPathFromPoints } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function taggedRect(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const x = -w / 2;\n const y = -h / 2;\n const tagWidth = 0.2 * h;\n const tagHeight = 0.2 * h;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const rectPoints = [\n { x: x - tagWidth / 2, y },\n { x: x + w + tagWidth / 2, y },\n { x: x + w + tagWidth / 2, y: y + h },\n { x: x - tagWidth / 2, y: y + h },\n ];\n\n const tagPoints = [\n { x: x + w - tagWidth / 2, y: y + h },\n { x: x + w + tagWidth / 2, y: y + h },\n { x: x + w + tagWidth / 2, y: y + h - tagHeight },\n ];\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const rectPath = createPathFromPoints(rectPoints);\n const rectNode = rc.path(rectPath, options);\n\n const tagPath = createPathFromPoints(tagPoints);\n const tagNode = rc.path(tagPath, { ...options, fillStyle: 'solid' });\n\n const taggedRect = shapeSvg.insert(() => tagNode, ':first-child');\n taggedRect.insert(() => rectNode, ':first-child');\n\n taggedRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n taggedRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n taggedRect.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, taggedRect);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, rectPoints, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n generateFullSineWavePoints,\n createPathFromPoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function taggedWaveEdgedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const waveAmplitude = h / 4;\n const tagWidth = 0.2 * w;\n const tagHeight = 0.2 * h;\n const finalH = h + waveAmplitude;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2 - (w / 2) * 0.1, y: finalH / 2 },\n ...generateFullSineWavePoints(\n -w / 2 - (w / 2) * 0.1,\n finalH / 2,\n w / 2 + (w / 2) * 0.1,\n finalH / 2,\n waveAmplitude,\n 0.8\n ),\n\n { x: w / 2 + (w / 2) * 0.1, y: -finalH / 2 },\n { x: -w / 2 - (w / 2) * 0.1, y: -finalH / 2 },\n ];\n\n const x = -w / 2 + (w / 2) * 0.1;\n const y = -finalH / 2 - tagHeight * 0.4;\n\n const tagPoints = [\n { x: x + w - tagWidth, y: (y + h) * 1.4 },\n { x: x + w, y: y + h - tagHeight },\n { x: x + w, y: (y + h) * 0.9 },\n ...generateFullSineWavePoints(\n x + w,\n (y + h) * 1.3,\n x + w - tagWidth,\n (y + h) * 1.5,\n -h * 0.03,\n 0.5\n ),\n ];\n\n const waveEdgeRectPath = createPathFromPoints(points);\n const waveEdgeRectNode = rc.path(waveEdgeRectPath, options);\n\n const taggedWaveEdgeRectPath = createPathFromPoints(tagPoints);\n const taggedWaveEdgeRectNode = rc.path(taggedWaveEdgeRectPath, {\n ...options,\n fillStyle: 'solid',\n });\n\n const waveEdgeRect = shapeSvg.insert(() => taggedWaveEdgeRectNode, ':first-child');\n waveEdgeRect.insert(() => waveEdgeRectNode, ':first-child');\n\n waveEdgeRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', nodeStyles);\n }\n\n waveEdgeRect.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, waveEdgeRect);\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function text(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const totalWidth = Math.max(bbox.width + node.padding, node?.width || 0);\n const totalHeight = Math.max(bbox.height + node.padding, node?.height || 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n\n const rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'text')\n .attr('style', nodeStyles)\n .attr('rx', 0)\n .attr('ry', 0)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return `M${x},${y}\n a${rx},${ry} 0,0,1 ${0},${-height}\n l${width},${0}\n a${rx},${ry} 0,0,1 ${0},${height}\n M${width},${-height}\n a${rx},${ry} 0,0,0 ${0},${height}\n l${-width},${0}`;\n};\n\nexport const createOuterCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [\n `M${x},${y}`,\n `M${x + width},${y}`,\n `a${rx},${ry} 0,0,0 ${0},${-height}`,\n `l${-width},0`,\n `a${rx},${ry} 0,0,0 ${0},${height}`,\n `l${width},0`,\n ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [`M${x + width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 0,${height}`].join(' ');\n};\n\nexport async function tiltedCylinder(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label, halfPadding } = await labelHelper(\n parent,\n node,\n getNodeClasses(node)\n );\n const labelPadding = node.look === 'neo' ? halfPadding * 2 : halfPadding;\n const h = bbox.height + labelPadding;\n const ry = h / 2;\n const rx = ry / (2.5 + h / 50);\n const w = bbox.width + rx + labelPadding;\n const { cssStyles } = node;\n\n let cylinder: D3Selection | D3Selection;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry);\n const innerPathData = createInnerCylinderPathD(0, 0, w, h, rx, ry);\n const outerNode = rc.path(outerPathData, userNodeOverrides(node, {}));\n const innerLine = rc.path(innerPathData, userNodeOverrides(node, { fill: 'none' }));\n cylinder = shapeSvg.insert(() => innerLine, ':first-child');\n cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n cylinder.attr('class', 'basic label-container');\n if (cssStyles) {\n cylinder.attr('style', cssStyles);\n }\n } else {\n const pathData = createCylinderPathD(0, 0, w, h, rx, ry);\n cylinder = shapeSvg\n .insert('path', ':first-child')\n .attr('d', pathData)\n .attr('class', 'basic label-container')\n .attr('style', handleUndefinedAttr(cssStyles))\n .attr('style', nodeStyles);\n cylinder.attr('class', 'basic label-container');\n\n if (cssStyles) {\n cylinder.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles) {\n cylinder.selectAll('path').attr('style', nodeStyles);\n }\n }\n\n cylinder.attr('label-offset-x', rx);\n cylinder.attr('transform', `translate(${-w / 2}, ${h / 2} )`);\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - rx - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, cylinder);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const y = pos.y - (node.y ?? 0);\n\n if (\n ry != 0 &&\n (Math.abs(y) < (node.height ?? 0) / 2 ||\n (Math.abs(y) == (node.height ?? 0) / 2 &&\n Math.abs(pos.x - (node.x ?? 0)) > (node.width ?? 0) / 2 - rx))\n ) {\n let x = rx * rx * (1 - (y * y) / (ry * ry));\n if (x != 0) {\n x = Math.sqrt(x);\n }\n x = rx - x;\n if (point.x - (node.x ?? 0) > 0) {\n x = -x;\n }\n\n pos.x += x;\n }\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\n// export const createTrapezoidPathD = (\n// x: number,\n// y: number,\n// width: number,\n// height: number\n// ): string => {\n// return [\n// `M${x - (2 * height) / 6},${y}`,\n// `L${x + width + (2 * height) / 6},${y}`,\n// `L${x + width - height / 6},${y - height}`,\n// `L${x + height / 6},${y - height}`,\n// 'Z',\n// ].join(' ');\n// };\n\nexport async function trapezoid(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-3 * h) / 6, y: 0 },\n { x: w + (3 * h) / 6, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function trapezoidalPentagon(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const minWidth = 60,\n minHeight = 20;\n const w = Math.max(minWidth, bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(minHeight, bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n\n const { cssStyles } = node;\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: (-w / 2) * 0.8, y: -h / 2 },\n { x: (w / 2) * 0.8, y: -h / 2 },\n { x: w / 2, y: (-h / 2) * 0.6 },\n { x: w / 2, y: h / 2 },\n { x: -w / 2, y: h / 2 },\n { x: -w / 2, y: (-h / 2) * 0.6 },\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { createPathFromPoints } from './util.js';\nimport { evaluate } from '../../../diagrams/common/common.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function triangle(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const useHtmlLabels = evaluate(getConfig().flowchart?.htmlLabels);\n\n const w = bbox.width + (node.padding ?? 0);\n const h = w + bbox.height;\n\n const tw = w + bbox.height;\n const points = [\n { x: 0, y: 0 },\n { x: tw, y: 0 },\n { x: tw / 2, y: -h },\n ];\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n const polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-h / 2}, ${h / 2})`);\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${h / 2 - (bbox.height + (node.padding ?? 0) / (useHtmlLabels ? 2 : 1) - (bbox.y - (bbox.top ?? 0)))})`\n );\n\n node.intersect = function (point) {\n log.info('Triangle intersect', node, points, point);\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n generateFullSineWavePoints,\n createPathFromPoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function waveEdgedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const waveAmplitude = h / 8;\n const finalH = h + waveAmplitude;\n const { cssStyles } = node;\n\n // To maintain minimum width\n const minWidth = 70;\n const widthDif = minWidth - w;\n const extraW = widthDif > 0 ? widthDif / 2 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2 - extraW, y: finalH / 2 },\n ...generateFullSineWavePoints(\n -w / 2 - extraW,\n finalH / 2,\n w / 2 + extraW,\n finalH / 2,\n waveAmplitude,\n 0.8\n ),\n { x: w / 2 + extraW, y: -finalH / 2 },\n { x: -w / 2 - extraW, y: -finalH / 2 },\n ];\n\n const waveEdgeRectPath = createPathFromPoints(points);\n const waveEdgeRectNode = rc.path(waveEdgeRectPath, options);\n\n const waveEdgeRect = shapeSvg.insert(() => waveEdgeRectNode, ':first-child');\n\n waveEdgeRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', nodeStyles);\n }\n\n waveEdgeRect.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, waveEdgeRect);\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n createPathFromPoints,\n generateFullSineWavePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function waveRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const minWidth = 100; // Minimum width\n const minHeight = 50; // Minimum height\n\n const baseWidth = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const baseHeight = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n\n const aspectRatio = baseWidth / baseHeight;\n\n let w = baseWidth;\n let h = baseHeight;\n\n if (w > h * aspectRatio) {\n h = w / aspectRatio;\n } else {\n w = h * aspectRatio;\n }\n\n w = Math.max(w, minWidth);\n h = Math.max(h, minHeight);\n\n const waveAmplitude = Math.min(h * 0.2, h / 4);\n const finalH = h + waveAmplitude * 2;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2, y: finalH / 2 },\n ...generateFullSineWavePoints(-w / 2, finalH / 2, w / 2, finalH / 2, waveAmplitude, 1),\n { x: w / 2, y: -finalH / 2 },\n ...generateFullSineWavePoints(w / 2, -finalH / 2, -w / 2, -finalH / 2, waveAmplitude, -1),\n ];\n\n const waveRectPath = createPathFromPoints(points);\n const waveRectNode = rc.path(waveRectPath, options);\n\n const waveRect = shapeSvg.insert(() => waveRectNode, ':first-child');\n\n waveRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n waveRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n waveRect.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, waveRect);\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function windowPane(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const rectOffset = 5;\n const x = -w / 2;\n const y = -h / 2;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const outerPathPoints = [\n { x: x - rectOffset, y: y - rectOffset },\n { x: x - rectOffset, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y: y - rectOffset },\n ];\n\n const path = `M${x - rectOffset},${y - rectOffset} L${x + w},${y - rectOffset} L${x + w},${y + h} L${x - rectOffset},${y + h} L${x - rectOffset},${y - rectOffset}\n M${x - rectOffset},${y} L${x + w},${y}\n M${x},${y - rectOffset} L${x},${y + h}`;\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const no = rc.path(path, options);\n\n const windowPane = shapeSvg.insert(() => no, ':first-child');\n windowPane.attr('transform', `translate(${rectOffset / 2}, ${rectOffset / 2})`);\n\n windowPane.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n windowPane.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n windowPane.selectAll('path').attr('style', nodeStyles);\n }\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) + rectOffset / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, windowPane);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, outerPathPoints, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { select } from 'd3';\nimport { getConfig } from '../../config.js';\nimport { getNodeClasses } from '../../rendering-util/rendering-elements/shapes/util.js';\nimport { calculateTextWidth, decodeEntities } from '../../utils.js';\nimport type { ClassMember, ClassNode } from './classTypes.js';\nimport { sanitizeText } from '../../diagram-api/diagramAPI.js';\nimport { createText } from '../../rendering-util/createText.js';\nimport { evaluate, hasKatex } from '../common/common.js';\nimport type { Node } from '../../rendering-util/types.js';\nimport type { MermaidConfig } from '../../config.type.js';\nimport type { D3Selection } from '../../types.js';\n\n// Creates the shapeSvg and inserts text\nexport async function textHelper(\n parent: D3Selection,\n node: any,\n config: MermaidConfig,\n useHtmlLabels: boolean,\n GAP = config.class!.padding ?? 12\n) {\n const TEXT_PADDING = !useHtmlLabels ? 3 : 0;\n const shapeSvg = parent\n // @ts-ignore: Ignore error for using .insert on SVGAElement\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId || node.id);\n\n let annotationGroup = null;\n let labelGroup = null;\n let membersGroup = null;\n let methodsGroup = null;\n\n let annotationGroupHeight = 0;\n let labelGroupHeight = 0;\n let membersGroupHeight = 0;\n\n annotationGroup = shapeSvg.insert('g').attr('class', 'annotation-group text');\n if (node.annotations.length > 0) {\n const annotation = node.annotations[0];\n await addText(annotationGroup, { text: `\u00AB${annotation}\u00BB` } as unknown as ClassMember, 0);\n\n const annotationGroupBBox = annotationGroup.node()!.getBBox();\n annotationGroupHeight = annotationGroupBBox.height;\n }\n\n labelGroup = shapeSvg.insert('g').attr('class', 'label-group text');\n await addText(labelGroup, node, 0, ['font-weight: bolder']);\n const labelGroupBBox = labelGroup.node()!.getBBox();\n labelGroupHeight = labelGroupBBox.height;\n\n membersGroup = shapeSvg.insert('g').attr('class', 'members-group text');\n let yOffset = 0;\n for (const member of node.members) {\n const height = await addText(membersGroup, member, yOffset, [member.parseClassifier()]);\n yOffset += height + TEXT_PADDING;\n }\n membersGroupHeight = membersGroup.node()!.getBBox().height;\n if (membersGroupHeight <= 0) {\n membersGroupHeight = GAP / 2;\n }\n\n methodsGroup = shapeSvg.insert('g').attr('class', 'methods-group text');\n let methodsYOffset = 0;\n for (const method of node.methods) {\n const height = await addText(methodsGroup, method, methodsYOffset, [method.parseClassifier()]);\n methodsYOffset += height + TEXT_PADDING;\n }\n\n let bbox = shapeSvg.node()!.getBBox();\n\n // Center annotation\n if (annotationGroup !== null) {\n const annotationGroupBBox = annotationGroup.node()!.getBBox();\n annotationGroup.attr('transform', `translate(${-annotationGroupBBox.width / 2})`);\n }\n\n // Adjust label\n labelGroup.attr('transform', `translate(${-labelGroupBBox.width / 2}, ${annotationGroupHeight})`);\n\n bbox = shapeSvg.node()!.getBBox();\n\n membersGroup.attr(\n 'transform',\n `translate(${0}, ${annotationGroupHeight + labelGroupHeight + GAP * 2})`\n );\n bbox = shapeSvg.node()!.getBBox();\n methodsGroup.attr(\n 'transform',\n `translate(${0}, ${annotationGroupHeight + labelGroupHeight + (membersGroupHeight ? membersGroupHeight + GAP * 4 : GAP * 2)})`\n );\n\n bbox = shapeSvg.node()!.getBBox();\n\n return { shapeSvg, bbox };\n}\n\n// Modified version of labelHelper() to help create and place text for classes\nasync function addText(\n parentGroup: D3Selection,\n node: Node | ClassNode | ClassMember,\n yOffset: number,\n styles: string[] = []\n) {\n const textEl = parentGroup.insert('g').attr('class', 'label').attr('style', styles.join('; '));\n const config = getConfig();\n let useHtmlLabels =\n 'useHtmlLabels' in node ? node.useHtmlLabels : (evaluate(config.htmlLabels) ?? true);\n\n let textContent = '';\n // Support regular node type (.label) and classNodes (.text)\n if ('text' in node) {\n textContent = node.text;\n } else {\n textContent = node.label!;\n }\n\n // createText() will cause unwanted behavior because of classDiagram syntax so workarounds are needed\n\n if (!useHtmlLabels && textContent.startsWith('\\\\')) {\n textContent = textContent.substring(1);\n }\n\n if (hasKatex(textContent)) {\n useHtmlLabels = true;\n }\n\n const text = await createText(\n textEl,\n sanitizeText(decodeEntities(textContent)),\n {\n width: calculateTextWidth(textContent, config) + 50, // Add room for error when splitting text into multiple lines\n classes: 'markdown-node-label',\n useHtmlLabels,\n },\n config\n );\n let bbox;\n let numberOfLines = 1;\n\n if (!useHtmlLabels) {\n // Undo font-weight normal\n if (styles.includes('font-weight: bolder')) {\n select(text).selectAll('tspan').attr('font-weight', '');\n }\n\n numberOfLines = text.children.length;\n\n const textChild = text.children[0];\n if (text.textContent === '' || text.textContent.includes('>')) {\n textChild.textContent =\n textContent[0] +\n textContent.substring(1).replaceAll('>', '>').replaceAll('<', '<').trim();\n\n // Text was improperly removed due to spaces (preserve one space if present)\n const preserveSpace = textContent[1] === ' ';\n if (preserveSpace) {\n textChild.textContent = textChild.textContent[0] + ' ' + textChild.textContent.substring(1);\n }\n }\n\n // To support empty boxes\n if (textChild.textContent === 'undefined') {\n textChild.textContent = '';\n }\n\n // Get the bounding box after the text update\n bbox = text.getBBox();\n } else {\n const div = text.children[0];\n const dv = select(text);\n\n numberOfLines = div.innerHTML.split('
    ').length;\n // Katex math support\n if (div.innerHTML.includes('')) {\n numberOfLines += div.innerHTML.split('').length - 1;\n }\n\n // Support images\n const images = div.getElementsByTagName('img');\n if (images) {\n const noImgText = textContent.replace(/]*>/g, '').trim() === '';\n await Promise.all(\n [...images].map(\n (img) =>\n new Promise((res) => {\n function setupImage() {\n img.style.display = 'flex';\n img.style.flexDirection = 'column';\n\n if (noImgText) {\n // default size if no text\n const bodyFontSize =\n config.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const width = parseInt(bodyFontSize, 10) * enlargingFactor + 'px';\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = '100%';\n }\n res(img);\n }\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener('error', setupImage);\n img.addEventListener('load', setupImage);\n })\n )\n );\n }\n\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Center text and offset by yOffset\n textEl.attr('transform', 'translate(0,' + (-bbox.height / (2 * numberOfLines) + yOffset) + ')');\n return bbox.height;\n}\n", "import { updateNodeBounds } from './util.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport { select } from 'd3';\nimport type { Node } from '../../types.js';\nimport type { ClassNode } from '../../../diagrams/class/classTypes.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport intersect from '../intersect/index.js';\nimport { textHelper } from '../../../diagrams/class/shapeUtil.js';\nimport { evaluate } from '../../../diagrams/common/common.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function classBox(parent: D3Selection, node: Node) {\n const config = getConfig();\n const PADDING = config.class!.padding ?? 12;\n const GAP = PADDING;\n const useHtmlLabels = node.useHtmlLabels ?? evaluate(config.htmlLabels) ?? true;\n // Treat node as classNode\n const classNode = node as unknown as ClassNode;\n classNode.annotations = classNode.annotations ?? [];\n classNode.members = classNode.members ?? [];\n classNode.methods = classNode.methods ?? [];\n\n const { shapeSvg, bbox } = await textHelper(parent, node, config, useHtmlLabels, GAP);\n\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n\n node.cssStyles = classNode.styles || '';\n\n const styles = classNode.styles?.join(';') || nodeStyles || '';\n\n if (!node.cssStyles) {\n node.cssStyles = styles.replaceAll('!important', '').split(';');\n }\n\n const renderExtraBox =\n classNode.members.length === 0 &&\n classNode.methods.length === 0 &&\n !config.class?.hideEmptyMembersBox;\n\n // Setup roughjs\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const w = bbox.width;\n let h = bbox.height;\n if (classNode.members.length === 0 && classNode.methods.length === 0) {\n h += GAP;\n } else if (classNode.members.length > 0 && classNode.methods.length === 0) {\n h += GAP * 2;\n }\n const x = -w / 2;\n const y = -h / 2;\n\n // Create and center rectangle\n const roughRect = rc.rectangle(\n x - PADDING,\n y -\n PADDING -\n (renderExtraBox\n ? PADDING\n : classNode.members.length === 0 && classNode.methods.length === 0\n ? -PADDING / 2\n : 0),\n w + 2 * PADDING,\n h +\n 2 * PADDING +\n (renderExtraBox\n ? PADDING * 2\n : classNode.members.length === 0 && classNode.methods.length === 0\n ? -PADDING\n : 0),\n options\n );\n\n const rect = shapeSvg.insert(() => roughRect, ':first-child');\n rect.attr('class', 'basic label-container');\n const rectBBox = rect.node()!.getBBox();\n\n // Rect is centered so now adjust labels.\n // TODO: Fix types\n shapeSvg.selectAll('.text').each((_: any, i: number, nodes: any) => {\n const text = select(nodes[i]);\n // Get the current transform attribute\n const transform = text.attr('transform');\n // Initialize variables for the translation values\n let translateY = 0;\n // Check if the transform attribute exists\n if (transform) {\n const regex = RegExp(/translate\\(([^,]+),([^)]+)\\)/);\n const translate = regex.exec(transform);\n if (translate) {\n translateY = parseFloat(translate[2]);\n }\n }\n // Add to the y value\n let newTranslateY =\n translateY +\n y +\n PADDING -\n (renderExtraBox\n ? PADDING\n : classNode.members.length === 0 && classNode.methods.length === 0\n ? -PADDING / 2\n : 0);\n if (!useHtmlLabels) {\n // Fix so non html labels are better centered.\n // BBox of text seems to be slightly different when calculated so we offset\n newTranslateY -= 4;\n }\n let newTranslateX = x;\n if (\n text.attr('class').includes('label-group') ||\n text.attr('class').includes('annotation-group')\n ) {\n newTranslateX = -text.node()?.getBBox().width / 2 || 0;\n shapeSvg.selectAll('text').each(function (_: any, i: number, nodes: any) {\n if (window.getComputedStyle(nodes[i]).textAnchor === 'middle') {\n newTranslateX = 0;\n }\n });\n }\n // Set the updated transform attribute\n text.attr('transform', `translate(${newTranslateX}, ${newTranslateY})`);\n });\n\n // Render divider lines.\n const annotationGroupHeight =\n (shapeSvg.select('.annotation-group').node() as SVGGraphicsElement).getBBox().height -\n (renderExtraBox ? PADDING / 2 : 0) || 0;\n const labelGroupHeight =\n (shapeSvg.select('.label-group').node() as SVGGraphicsElement).getBBox().height -\n (renderExtraBox ? PADDING / 2 : 0) || 0;\n const membersGroupHeight =\n (shapeSvg.select('.members-group').node() as SVGGraphicsElement).getBBox().height -\n (renderExtraBox ? PADDING / 2 : 0) || 0;\n // First line (under label)\n if (classNode.members.length > 0 || classNode.methods.length > 0 || renderExtraBox) {\n const roughLine = rc.line(\n rectBBox.x,\n annotationGroupHeight + labelGroupHeight + y + PADDING,\n rectBBox.x + rectBBox.width,\n annotationGroupHeight + labelGroupHeight + y + PADDING,\n options\n );\n const line = shapeSvg.insert(() => roughLine);\n line.attr('class', 'divider').attr('style', styles);\n }\n\n // Second line (under members)\n if (renderExtraBox || classNode.members.length > 0 || classNode.methods.length > 0) {\n const roughLine = rc.line(\n rectBBox.x,\n annotationGroupHeight + labelGroupHeight + membersGroupHeight + y + GAP * 2 + PADDING,\n rectBBox.x + rectBBox.width,\n annotationGroupHeight + labelGroupHeight + membersGroupHeight + y + PADDING + GAP * 2,\n options\n );\n const line = shapeSvg.insert(() => roughLine);\n line.attr('class', 'divider').attr('style', styles);\n }\n\n /// Apply styles ///\n if (classNode.look !== 'handDrawn') {\n shapeSvg.selectAll('path').attr('style', styles);\n }\n // Apply other styles like stroke-width and stroke-dasharray to border (not background of shape)\n rect.select(':nth-child(2)').attr('style', styles);\n // Divider lines\n shapeSvg.selectAll('.divider').select('path').attr('style', styles);\n // Text elements\n if (node.labelStyle) {\n shapeSvg.selectAll('span').attr('style', node.labelStyle);\n } else {\n shapeSvg.selectAll('span').attr('style', styles);\n }\n // SVG text uses fill not color\n if (!useHtmlLabels) {\n // We just want to apply color to the text\n const colorRegex = RegExp(/color\\s*:\\s*([^;]*)/);\n const match = colorRegex.exec(styles);\n if (match) {\n const colorStyle = match[0].replace('color', 'fill');\n shapeSvg.selectAll('tspan').attr('style', colorStyle);\n } else if (labelStyles) {\n const match = colorRegex.exec(labelStyles);\n if (match) {\n const colorStyle = match[0].replace('color', 'fill');\n shapeSvg.selectAll('tspan').attr('style', colorStyle);\n }\n }\n }\n\n updateNodeBounds(node, rect);\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, insertLabel, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node, KanbanNode, ShapeRenderOptions } from '../../types.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { userNodeOverrides, styles2String } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nconst colorFromPriority = (priority: NonNullable) => {\n switch (priority) {\n case 'Very High':\n return 'red';\n case 'High':\n return 'orange';\n case 'Medium':\n return null; // no stroke\n case 'Low':\n return 'blue';\n case 'Very Low':\n return 'lightblue';\n }\n};\nexport async function kanbanItem(\n parent: D3Selection,\n // Omit the 'shape' prop since otherwise, it causes a TypeScript circular dependency error\n kanbanNode: Omit | Omit,\n { config }: ShapeRenderOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(kanbanNode);\n kanbanNode.labelStyle = labelStyles || '';\n\n const labelPaddingX = 10;\n const orgWidth = kanbanNode.width;\n kanbanNode.width = (kanbanNode.width ?? 200) - 10;\n\n const {\n shapeSvg,\n bbox,\n label: labelElTitle,\n } = await labelHelper(parent, kanbanNode, getNodeClasses(kanbanNode));\n const padding = kanbanNode.padding || 10;\n\n let ticketUrl = '';\n let link;\n\n if ('ticket' in kanbanNode && kanbanNode.ticket && config?.kanban?.ticketBaseUrl) {\n ticketUrl = config?.kanban?.ticketBaseUrl.replace('#TICKET#', kanbanNode.ticket);\n link = shapeSvg\n .insert('svg:a', ':first-child')\n .attr('class', 'kanban-ticket-link')\n .attr('xlink:href', ticketUrl)\n .attr('target', '_blank');\n }\n\n const options = {\n useHtmlLabels: kanbanNode.useHtmlLabels,\n labelStyle: kanbanNode.labelStyle || '',\n width: kanbanNode.width,\n img: kanbanNode.img,\n padding: kanbanNode.padding || 8,\n centerLabel: false,\n };\n let labelEl, bbox2;\n if (link) {\n ({ label: labelEl, bbox: bbox2 } = await insertLabel(\n link,\n ('ticket' in kanbanNode && kanbanNode.ticket) || '',\n options\n ));\n } else {\n ({ label: labelEl, bbox: bbox2 } = await insertLabel(\n shapeSvg,\n ('ticket' in kanbanNode && kanbanNode.ticket) || '',\n options\n ));\n }\n const { label: labelElAssigned, bbox: bboxAssigned } = await insertLabel(\n shapeSvg,\n ('assigned' in kanbanNode && kanbanNode.assigned) || '',\n options\n );\n kanbanNode.width = orgWidth;\n const labelPaddingY = 10;\n const totalWidth = kanbanNode?.width || 0;\n const heightAdj = Math.max(bbox2.height, bboxAssigned.height) / 2;\n const totalHeight =\n Math.max(bbox.height + labelPaddingY * 2, kanbanNode?.height || 0) + heightAdj;\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n labelElTitle.attr(\n 'transform',\n 'translate(' + (padding - totalWidth / 2) + ', ' + (-heightAdj - bbox.height / 2) + ')'\n );\n labelEl.attr(\n 'transform',\n 'translate(' + (padding - totalWidth / 2) + ', ' + (-heightAdj + bbox.height / 2) + ')'\n );\n labelElAssigned.attr(\n 'transform',\n 'translate(' +\n (padding + totalWidth / 2 - bboxAssigned.width - 2 * labelPaddingX) +\n ', ' +\n (-heightAdj + bbox.height / 2) +\n ')'\n );\n\n let rect;\n\n const { rx, ry } = kanbanNode;\n const { cssStyles } = kanbanNode;\n\n if (kanbanNode.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(kanbanNode, {});\n\n const roughNode =\n rx || ry\n ? rc.path(createRoundedRectPathD(x, y, totalWidth, totalHeight, rx || 0), options)\n : rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n rect = shapeSvg.insert(() => roughNode, ':first-child');\n rect.attr('class', 'basic label-container').attr('style', cssStyles ? cssStyles : null);\n } else {\n rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'basic label-container __APA__')\n .attr('style', nodeStyles)\n .attr('rx', rx ?? 5)\n .attr('ry', ry ?? 5)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n const priority = 'priority' in kanbanNode && kanbanNode.priority;\n if (priority) {\n const line = shapeSvg.append('line');\n const lineX = x + 2;\n\n const y1 = y + Math.floor((rx ?? 0) / 2);\n const y2 = y + totalHeight - Math.floor((rx ?? 0) / 2);\n line\n .attr('x1', lineX)\n .attr('y1', y1)\n .attr('x2', lineX)\n .attr('y2', y2)\n\n .attr('stroke-width', '4')\n .attr('stroke', colorFromPriority(priority));\n }\n }\n\n updateNodeBounds(kanbanNode, rect);\n kanbanNode.height = totalHeight;\n\n kanbanNode.intersect = function (point) {\n return intersect.rect(kanbanNode, point);\n };\n\n return shapeSvg;\n}\n", "import type { Entries } from 'type-fest';\nimport type { D3Selection, MaybePromise } from '../../types.js';\nimport type { Node, ShapeRenderOptions } from '../types.js';\nimport { anchor } from './shapes/anchor.js';\nimport { bowTieRect } from './shapes/bowTieRect.js';\nimport { card } from './shapes/card.js';\nimport { choice } from './shapes/choice.js';\nimport { circle } from './shapes/circle.js';\nimport { crossedCircle } from './shapes/crossedCircle.js';\nimport { curlyBraceLeft } from './shapes/curlyBraceLeft.js';\nimport { curlyBraceRight } from './shapes/curlyBraceRight.js';\nimport { curlyBraces } from './shapes/curlyBraces.js';\nimport { curvedTrapezoid } from './shapes/curvedTrapezoid.js';\nimport { cylinder } from './shapes/cylinder.js';\nimport { dividedRectangle } from './shapes/dividedRect.js';\nimport { doublecircle } from './shapes/doubleCircle.js';\nimport { filledCircle } from './shapes/filledCircle.js';\nimport { flippedTriangle } from './shapes/flippedTriangle.js';\nimport { forkJoin } from './shapes/forkJoin.js';\nimport { halfRoundedRectangle } from './shapes/halfRoundedRectangle.js';\nimport { hexagon } from './shapes/hexagon.js';\nimport { hourglass } from './shapes/hourglass.js';\nimport { icon } from './shapes/icon.js';\nimport { iconCircle } from './shapes/iconCircle.js';\nimport { iconRounded } from './shapes/iconRounded.js';\nimport { iconSquare } from './shapes/iconSquare.js';\nimport { imageSquare } from './shapes/imageSquare.js';\nimport { inv_trapezoid } from './shapes/invertedTrapezoid.js';\nimport { labelRect } from './shapes/labelRect.js';\nimport { lean_left } from './shapes/leanLeft.js';\nimport { lean_right } from './shapes/leanRight.js';\nimport { lightningBolt } from './shapes/lightningBolt.js';\nimport { linedCylinder } from './shapes/linedCylinder.js';\nimport { linedWaveEdgedRect } from './shapes/linedWaveEdgedRect.js';\nimport { multiRect } from './shapes/multiRect.js';\nimport { multiWaveEdgedRectangle } from './shapes/multiWaveEdgedRectangle.js';\nimport { note } from './shapes/note.js';\nimport { question } from './shapes/question.js';\nimport { rect_left_inv_arrow } from './shapes/rectLeftInvArrow.js';\nimport { rectWithTitle } from './shapes/rectWithTitle.js';\nimport { roundedRect } from './shapes/roundedRect.js';\nimport { shadedProcess } from './shapes/shadedProcess.js';\nimport { slopedRect } from './shapes/slopedRect.js';\nimport { squareRect } from './shapes/squareRect.js';\nimport { stadium } from './shapes/stadium.js';\nimport { state } from './shapes/state.js';\nimport { stateEnd } from './shapes/stateEnd.js';\nimport { stateStart } from './shapes/stateStart.js';\nimport { subroutine } from './shapes/subroutine.js';\nimport { taggedRect } from './shapes/taggedRect.js';\nimport { taggedWaveEdgedRectangle } from './shapes/taggedWaveEdgedRectangle.js';\nimport { text } from './shapes/text.js';\nimport { tiltedCylinder } from './shapes/tiltedCylinder.js';\nimport { trapezoid } from './shapes/trapezoid.js';\nimport { trapezoidalPentagon } from './shapes/trapezoidalPentagon.js';\nimport { triangle } from './shapes/triangle.js';\nimport { waveEdgedRectangle } from './shapes/waveEdgedRectangle.js';\nimport { waveRectangle } from './shapes/waveRectangle.js';\nimport { windowPane } from './shapes/windowPane.js';\nimport { classBox } from './shapes/classBox.js';\nimport { kanbanItem } from './shapes/kanbanItem.js';\n\ntype ShapeHandler = (\n parent: D3Selection,\n node: Node,\n options: ShapeRenderOptions\n) => MaybePromise>;\n\nexport interface ShapeDefinition {\n semanticName: string;\n name: string;\n shortName: string;\n description: string;\n /**\n * Aliases can include descriptive names, other short names, etc.\n */\n aliases?: string[];\n /**\n * These are names used by mermaid before the introduction of new shapes. These will not be in standard formats, and shouldn't be used by the users\n */\n internalAliases?: string[];\n handler: ShapeHandler;\n}\n\nexport const shapesDefs = [\n {\n semanticName: 'Process',\n name: 'Rectangle',\n shortName: 'rect',\n description: 'Standard process shape',\n aliases: ['proc', 'process', 'rectangle'],\n internalAliases: ['squareRect'],\n handler: squareRect,\n },\n {\n semanticName: 'Event',\n name: 'Rounded Rectangle',\n shortName: 'rounded',\n description: 'Represents an event',\n aliases: ['event'],\n internalAliases: ['roundedRect'],\n handler: roundedRect,\n },\n {\n semanticName: 'Terminal Point',\n name: 'Stadium',\n shortName: 'stadium',\n description: 'Terminal point',\n aliases: ['terminal', 'pill'],\n handler: stadium,\n },\n {\n semanticName: 'Subprocess',\n name: 'Framed Rectangle',\n shortName: 'fr-rect',\n description: 'Subprocess',\n aliases: ['subprocess', 'subproc', 'framed-rectangle', 'subroutine'],\n handler: subroutine,\n },\n {\n semanticName: 'Database',\n name: 'Cylinder',\n shortName: 'cyl',\n description: 'Database storage',\n aliases: ['db', 'database', 'cylinder'],\n handler: cylinder,\n },\n {\n semanticName: 'Start',\n name: 'Circle',\n shortName: 'circle',\n description: 'Starting point',\n aliases: ['circ'],\n handler: circle,\n },\n {\n semanticName: 'Decision',\n name: 'Diamond',\n shortName: 'diam',\n description: 'Decision-making step',\n aliases: ['decision', 'diamond', 'question'],\n handler: question,\n },\n {\n semanticName: 'Prepare Conditional',\n name: 'Hexagon',\n shortName: 'hex',\n description: 'Preparation or condition step',\n aliases: ['hexagon', 'prepare'],\n handler: hexagon,\n },\n {\n semanticName: 'Data Input/Output',\n name: 'Lean Right',\n shortName: 'lean-r',\n description: 'Represents input or output',\n aliases: ['lean-right', 'in-out'],\n internalAliases: ['lean_right'],\n handler: lean_right,\n },\n {\n semanticName: 'Data Input/Output',\n name: 'Lean Left',\n shortName: 'lean-l',\n description: 'Represents output or input',\n aliases: ['lean-left', 'out-in'],\n internalAliases: ['lean_left'],\n handler: lean_left,\n },\n {\n semanticName: 'Priority Action',\n name: 'Trapezoid Base Bottom',\n shortName: 'trap-b',\n description: 'Priority action',\n aliases: ['priority', 'trapezoid-bottom', 'trapezoid'],\n handler: trapezoid,\n },\n {\n semanticName: 'Manual Operation',\n name: 'Trapezoid Base Top',\n shortName: 'trap-t',\n description: 'Represents a manual task',\n aliases: ['manual', 'trapezoid-top', 'inv-trapezoid'],\n internalAliases: ['inv_trapezoid'],\n handler: inv_trapezoid,\n },\n {\n semanticName: 'Stop',\n name: 'Double Circle',\n shortName: 'dbl-circ',\n description: 'Represents a stop point',\n aliases: ['double-circle'],\n internalAliases: ['doublecircle'],\n handler: doublecircle,\n },\n {\n semanticName: 'Text Block',\n name: 'Text Block',\n shortName: 'text',\n description: 'Text block',\n handler: text,\n },\n {\n semanticName: 'Card',\n name: 'Notched Rectangle',\n shortName: 'notch-rect',\n description: 'Represents a card',\n aliases: ['card', 'notched-rectangle'],\n handler: card,\n },\n {\n semanticName: 'Lined/Shaded Process',\n name: 'Lined Rectangle',\n shortName: 'lin-rect',\n description: 'Lined process shape',\n aliases: ['lined-rectangle', 'lined-process', 'lin-proc', 'shaded-process'],\n handler: shadedProcess,\n },\n {\n semanticName: 'Start',\n name: 'Small Circle',\n shortName: 'sm-circ',\n description: 'Small starting point',\n aliases: ['start', 'small-circle'],\n internalAliases: ['stateStart'],\n handler: stateStart,\n },\n {\n semanticName: 'Stop',\n name: 'Framed Circle',\n shortName: 'fr-circ',\n description: 'Stop point',\n aliases: ['stop', 'framed-circle'],\n internalAliases: ['stateEnd'],\n handler: stateEnd,\n },\n {\n semanticName: 'Fork/Join',\n name: 'Filled Rectangle',\n shortName: 'fork',\n description: 'Fork or join in process flow',\n aliases: ['join'],\n internalAliases: ['forkJoin'],\n handler: forkJoin,\n },\n {\n semanticName: 'Collate',\n name: 'Hourglass',\n shortName: 'hourglass',\n description: 'Represents a collate operation',\n aliases: ['hourglass', 'collate'],\n handler: hourglass,\n },\n {\n semanticName: 'Comment',\n name: 'Curly Brace',\n shortName: 'brace',\n description: 'Adds a comment',\n aliases: ['comment', 'brace-l'],\n handler: curlyBraceLeft,\n },\n {\n semanticName: 'Comment Right',\n name: 'Curly Brace',\n shortName: 'brace-r',\n description: 'Adds a comment',\n handler: curlyBraceRight,\n },\n {\n semanticName: 'Comment with braces on both sides',\n name: 'Curly Braces',\n shortName: 'braces',\n description: 'Adds a comment',\n handler: curlyBraces,\n },\n {\n semanticName: 'Com Link',\n name: 'Lightning Bolt',\n shortName: 'bolt',\n description: 'Communication link',\n aliases: ['com-link', 'lightning-bolt'],\n handler: lightningBolt,\n },\n {\n semanticName: 'Document',\n name: 'Document',\n shortName: 'doc',\n description: 'Represents a document',\n aliases: ['doc', 'document'],\n handler: waveEdgedRectangle,\n },\n {\n semanticName: 'Delay',\n name: 'Half-Rounded Rectangle',\n shortName: 'delay',\n description: 'Represents a delay',\n aliases: ['half-rounded-rectangle'],\n handler: halfRoundedRectangle,\n },\n {\n semanticName: 'Direct Access Storage',\n name: 'Horizontal Cylinder',\n shortName: 'h-cyl',\n description: 'Direct access storage',\n aliases: ['das', 'horizontal-cylinder'],\n handler: tiltedCylinder,\n },\n {\n semanticName: 'Disk Storage',\n name: 'Lined Cylinder',\n shortName: 'lin-cyl',\n description: 'Disk storage',\n aliases: ['disk', 'lined-cylinder'],\n handler: linedCylinder,\n },\n {\n semanticName: 'Display',\n name: 'Curved Trapezoid',\n shortName: 'curv-trap',\n description: 'Represents a display',\n aliases: ['curved-trapezoid', 'display'],\n handler: curvedTrapezoid,\n },\n {\n semanticName: 'Divided Process',\n name: 'Divided Rectangle',\n shortName: 'div-rect',\n description: 'Divided process shape',\n aliases: ['div-proc', 'divided-rectangle', 'divided-process'],\n handler: dividedRectangle,\n },\n {\n semanticName: 'Extract',\n name: 'Triangle',\n shortName: 'tri',\n description: 'Extraction process',\n aliases: ['extract', 'triangle'],\n handler: triangle,\n },\n {\n semanticName: 'Internal Storage',\n name: 'Window Pane',\n shortName: 'win-pane',\n description: 'Internal storage',\n aliases: ['internal-storage', 'window-pane'],\n handler: windowPane,\n },\n {\n semanticName: 'Junction',\n name: 'Filled Circle',\n shortName: 'f-circ',\n description: 'Junction point',\n aliases: ['junction', 'filled-circle'],\n handler: filledCircle,\n },\n {\n semanticName: 'Loop Limit',\n name: 'Trapezoidal Pentagon',\n shortName: 'notch-pent',\n description: 'Loop limit step',\n aliases: ['loop-limit', 'notched-pentagon'],\n handler: trapezoidalPentagon,\n },\n {\n semanticName: 'Manual File',\n name: 'Flipped Triangle',\n shortName: 'flip-tri',\n description: 'Manual file operation',\n aliases: ['manual-file', 'flipped-triangle'],\n handler: flippedTriangle,\n },\n {\n semanticName: 'Manual Input',\n name: 'Sloped Rectangle',\n shortName: 'sl-rect',\n description: 'Manual input step',\n aliases: ['manual-input', 'sloped-rectangle'],\n handler: slopedRect,\n },\n {\n semanticName: 'Multi-Document',\n name: 'Stacked Document',\n shortName: 'docs',\n description: 'Multiple documents',\n aliases: ['documents', 'st-doc', 'stacked-document'],\n handler: multiWaveEdgedRectangle,\n },\n {\n semanticName: 'Multi-Process',\n name: 'Stacked Rectangle',\n shortName: 'st-rect',\n description: 'Multiple processes',\n aliases: ['procs', 'processes', 'stacked-rectangle'],\n handler: multiRect,\n },\n {\n semanticName: 'Stored Data',\n name: 'Bow Tie Rectangle',\n shortName: 'bow-rect',\n description: 'Stored data',\n aliases: ['stored-data', 'bow-tie-rectangle'],\n handler: bowTieRect,\n },\n {\n semanticName: 'Summary',\n name: 'Crossed Circle',\n shortName: 'cross-circ',\n description: 'Summary',\n aliases: ['summary', 'crossed-circle'],\n handler: crossedCircle,\n },\n {\n semanticName: 'Tagged Document',\n name: 'Tagged Document',\n shortName: 'tag-doc',\n description: 'Tagged document',\n aliases: ['tag-doc', 'tagged-document'],\n handler: taggedWaveEdgedRectangle,\n },\n {\n semanticName: 'Tagged Process',\n name: 'Tagged Rectangle',\n shortName: 'tag-rect',\n description: 'Tagged process',\n aliases: ['tagged-rectangle', 'tag-proc', 'tagged-process'],\n handler: taggedRect,\n },\n {\n semanticName: 'Paper Tape',\n name: 'Flag',\n shortName: 'flag',\n description: 'Paper tape',\n aliases: ['paper-tape'],\n handler: waveRectangle,\n },\n {\n semanticName: 'Odd',\n name: 'Odd',\n shortName: 'odd',\n description: 'Odd shape',\n internalAliases: ['rect_left_inv_arrow'],\n handler: rect_left_inv_arrow,\n },\n {\n semanticName: 'Lined Document',\n name: 'Lined Document',\n shortName: 'lin-doc',\n description: 'Lined document',\n aliases: ['lined-document'],\n handler: linedWaveEdgedRect,\n },\n] as const satisfies ShapeDefinition[];\n\nconst generateShapeMap = () => {\n // These are the shapes that didn't have documentation present\n const undocumentedShapes = {\n // States\n state,\n choice,\n note,\n\n // Rectangles\n rectWithTitle,\n labelRect,\n\n // Icons\n iconSquare,\n iconCircle,\n icon,\n iconRounded,\n imageSquare,\n anchor,\n\n // Kanban diagram\n kanbanItem,\n\n // class diagram\n classBox,\n } as const;\n\n const entries = [\n ...(Object.entries(undocumentedShapes) as Entries),\n ...shapesDefs.flatMap((shape) => {\n const aliases = [\n shape.shortName,\n ...('aliases' in shape ? shape.aliases : []),\n ...('internalAliases' in shape ? shape.internalAliases : []),\n ];\n return aliases.map((alias) => [alias, shape.handler] as const);\n }),\n ];\n return Object.fromEntries(entries) as Record<\n (typeof entries)[number][0],\n (typeof entries)[number][1]\n > satisfies Record;\n};\n\nexport const shapes = generateShapeMap();\n\nexport function isValidShape(shape: string): shape is ShapeID {\n return shape in shapes;\n}\n\nexport type ShapeID = keyof typeof shapes;\n", "\n/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nvar isNothing_1 = isNothing;\nvar isObject_1 = isObject;\nvar toArray_1 = toArray;\nvar repeat_1 = repeat;\nvar isNegativeZero_1 = isNegativeZero;\nvar extend_1 = extend;\n\nvar common = {\n\tisNothing: isNothing_1,\n\tisObject: isObject_1,\n\ttoArray: toArray_1,\n\trepeat: repeat_1,\n\tisNegativeZero: isNegativeZero_1,\n\textend: extend_1\n};\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n\n\nfunction formatError(exception, compact) {\n var where = '', message = exception.reason || '(unknown reason)';\n\n if (!exception.mark) return message;\n\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n\n return message + ' ' + where;\n}\n\n\nfunction YAMLException$1(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException$1.prototype = Object.create(Error.prototype);\nYAMLException$1.prototype.constructor = YAMLException$1;\n\n\nYAMLException$1.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\n\n\nvar exception = YAMLException$1;\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '\u2192') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\n\n\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n\n if (!mark.buffer) return null;\n\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [ 0 ];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n var result = '', i, line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n );\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n' + result;\n }\n\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n );\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n }\n\n return result.replace(/\\n$/, '');\n}\n\n\nvar snippet = makeSnippet;\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'multi',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'representName',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type$1(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new exception('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new exception('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nvar type = Type$1;\n\n/*eslint-disable max-len*/\n\n\n\n\n\nfunction compileList(schema, name) {\n var result = [];\n\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag &&\n previousType.kind === currentType.kind &&\n previousType.multi === currentType.multi) {\n\n newIndex = previousIndex;\n }\n });\n\n result[newIndex] = currentType;\n });\n\n return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n }, index, length;\n\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema$1(definition) {\n return this.extend(definition);\n}\n\n\nSchema$1.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n\n if (definition instanceof type) {\n // Schema.extend(type)\n explicit.push(definition);\n\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n } else {\n throw new exception('Schema.extend argument should be a Type, [ Type ], ' +\n 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n\n implicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n if (type$1.loadKind && type$1.loadKind !== 'scalar') {\n throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n\n if (type$1.multi) {\n throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n\n explicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n\n var result = Object.create(Schema$1.prototype);\n\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n return result;\n};\n\n\nvar schema = Schema$1;\n\nvar str = new type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n\nvar seq = new type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n\nvar map = new type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n\nvar failsafe = new schema({\n explicit: [\n str,\n seq,\n map\n ]\n});\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nvar _null = new type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; },\n empty: function () { return ''; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nvar bool = new type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'o') {\n // base 8\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n return true;\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch;\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nvar int = new type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nvar float = new type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n\nvar json = failsafe.extend({\n implicit: [\n _null,\n bool,\n int,\n float\n ]\n});\n\nvar core = json;\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nvar timestamp = new type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nvar merge = new type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n\n/*eslint-disable no-bitwise*/\n\n\n\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\n\nvar binary = new type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n\nvar _hasOwnProperty$3 = Object.prototype.hasOwnProperty;\nvar _toString$2 = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString$2.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty$3.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nvar omap = new type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n\nvar _toString$1 = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString$1.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nvar pairs = new type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n\nvar _hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty$2.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nvar set = new type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n\nvar _default = core.extend({\n implicit: [\n timestamp,\n merge\n ],\n explicit: [\n binary,\n omap,\n pairs,\n set\n ]\n});\n\n/*eslint-disable max-len,no-use-before-define*/\n\n\n\n\n\n\n\nvar _hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State$1(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || _default;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1), // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n\n mark.snippet = snippet(mark);\n\n return new exception(message, mark);\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty$1.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty$1.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n startLine, startLineStart, startPos) {\n\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty$1.call(overridableKeys, keyNode) &&\n _hasOwnProperty$1.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n // used for this specific key only because Object.defineProperty is slow\n if (keyNode === '__proto__') {\n Object.defineProperty(_result, keyNode, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: valueNode\n });\n } else {\n _result[keyNode] = valueNode;\n }\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C/* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"! [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for ! tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State$1(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll$1(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load$1(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new exception('expected a single document in the stream, but found more');\n}\n\n\nvar loadAll_1 = loadAll$1;\nvar load_1 = load$1;\n\nvar loader = {\n\tloadAll: loadAll_1,\n\tload: load_1\n};\n\n/*eslint-disable no-use-before-define*/\n\n\n\n\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new exception('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n this.schema = options['schema'] || _default;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn\u2019t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out \u21D2 ns-plain-safe-out\n// c = flow-in \u21D2 ns-plain-safe-in\n// c = block-key \u21D2 ns-plain-safe-out\n// c = flow-key \u21D2 ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - \u201C:\u201D - \u201C#\u201D )\n// | ( /* An ns-char preceding */ \u201C#\u201D )\n// | ( \u201C:\u201D /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ? // c = flow-in\n cIsNsCharOrWhitespace\n : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n )\n // ns-plain-char\n && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( \u201C?\u201D | \u201C:\u201D | \u201C-\u201D ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // \u201C-\u201D | \u201C?\u201D | \u201C:\u201D | \u201C,\u201D | \u201C[\u201D | \u201C]\u201D | \u201C{\u201D | \u201C}\u201D\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | \u201C#\u201D | \u201C&\u201D | \u201C*\u201D | \u201C!\u201D | \u201C|\u201D | \u201C=\u201D | \u201C>\u201D | \u201C'\u201D | \u201C\"\u201D\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | \u201C%\u201D | \u201C@\u201D | \u201C`\u201D)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos), second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0))\n && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// \u2022 No ending newline => unaffected; already using strip \"-\" chomping.\n// \u2022 Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = (function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n }\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth \u2264 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string) + '\"';\n default:\n throw new exception('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines\u2014\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) ||\n (typeof value === 'undefined' &&\n writeNode(state, level, null, false, false))) {\n\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) ||\n (typeof value === 'undefined' &&\n writeNode(state, level + 1, null, true, true, false, true))) {\n\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new exception('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new exception('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new exception('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | \u201C-\u201D\n // [39] ns-uri-char ::= \u201C%\u201D ns-hex-digit ns-hex-digit | ns-word-char | \u201C#\u201D\n // | \u201C;\u201D | \u201C/\u201D | \u201C?\u201D | \u201C:\u201D | \u201C@\u201D | \u201C&\u201D | \u201C=\u201D | \u201C+\u201D | \u201C$\u201D | \u201C,\u201D\n // | \u201C_\u201D | \u201C.\u201D | \u201C!\u201D | \u201C~\u201D | \u201C*\u201D | \u201C'\u201D | \u201C(\u201D | \u201C)\u201D | \u201C[\u201D | \u201C]\u201D\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(\n state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n ).replace(/!/g, '%21');\n\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump$1(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n var value = input;\n\n if (state.replacer) {\n value = state.replacer.call({ '': value }, '', value);\n }\n\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nvar dump_1 = dump$1;\n\nvar dumper = {\n\tdump: dump_1\n};\n\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\n\n\nvar Type = type;\nvar Schema = schema;\nvar FAILSAFE_SCHEMA = failsafe;\nvar JSON_SCHEMA = json;\nvar CORE_SCHEMA = core;\nvar DEFAULT_SCHEMA = _default;\nvar load = loader.load;\nvar loadAll = loader.loadAll;\nvar dump = dumper.dump;\nvar YAMLException = exception;\n\n// Re-export all types in case user wants to create custom schema\nvar types = {\n binary: binary,\n float: float,\n map: map,\n null: _null,\n pairs: pairs,\n set: set,\n timestamp: timestamp,\n bool: bool,\n int: int,\n merge: merge,\n omap: omap,\n seq: seq,\n str: str\n};\n\n// Removed functions from JS-YAML 3.0.x\nvar safeLoad = renamed('safeLoad', 'load');\nvar safeLoadAll = renamed('safeLoadAll', 'loadAll');\nvar safeDump = renamed('safeDump', 'dump');\n\nvar jsYaml = {\n\tType: Type,\n\tSchema: Schema,\n\tFAILSAFE_SCHEMA: FAILSAFE_SCHEMA,\n\tJSON_SCHEMA: JSON_SCHEMA,\n\tCORE_SCHEMA: CORE_SCHEMA,\n\tDEFAULT_SCHEMA: DEFAULT_SCHEMA,\n\tload: load,\n\tloadAll: loadAll,\n\tdump: dump,\n\tYAMLException: YAMLException,\n\ttypes: types,\n\tsafeLoad: safeLoad,\n\tsafeLoadAll: safeLoadAll,\n\tsafeDump: safeDump\n};\n\nexport default jsYaml;\nexport { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types };\n", "import { select } from 'd3';\nimport utils, { getEdgeId } from '../../utils.js';\nimport { getConfig, defaultConfig } from '../../diagram-api/diagramAPI.js';\nimport common from '../common/common.js';\nimport { isValidShape, type ShapeID } from '../../rendering-util/rendering-elements/shapes.js';\nimport type { Node, Edge } from '../../rendering-util/types.js';\nimport { log } from '../../logger.js';\nimport * as yaml from 'js-yaml';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\nimport type {\n FlowVertex,\n FlowClass,\n FlowSubGraph,\n FlowText,\n FlowEdge,\n FlowLink,\n FlowVertexTypeParam,\n} from './types.js';\nimport type { NodeMetaData } from '../../types.js';\n\nconst MERMAID_DOM_ID_PREFIX = 'flowchart-';\nlet vertexCounter = 0;\nlet config = getConfig();\nlet vertices = new Map();\nlet edges: FlowEdge[] & { defaultInterpolate?: string; defaultStyle?: string[] } = [];\nlet classes = new Map();\nlet subGraphs: FlowSubGraph[] = [];\nlet subGraphLookup = new Map();\nlet tooltips = new Map();\nlet subCount = 0;\nlet firstGraphFlag = true;\nlet direction: string;\n\nlet version: string; // As in graph\n\n// Functions to be run after graph rendering\nlet funs: ((element: Element) => void)[] = []; // cspell:ignore funs\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, config);\n\n/**\n * Function to lookup domId from id in the graph definition.\n *\n * @param id - id of the node\n */\nexport const lookUpDomId = function (id: string) {\n for (const vertex of vertices.values()) {\n if (vertex.id === id) {\n return vertex.domId;\n }\n }\n return id;\n};\n\n/**\n * Function called by parser when a node definition has been found\n */\nexport const addVertex = function (\n id: string,\n textObj: FlowText,\n type: FlowVertexTypeParam,\n style: string[],\n classes: string[],\n dir: string,\n props = {},\n shapeData: any\n) {\n // console.log('addVertex', id, shapeData);\n if (!id || id.trim().length === 0) {\n return;\n }\n let txt;\n\n let vertex = vertices.get(id);\n if (vertex === undefined) {\n vertex = {\n id,\n labelType: 'text',\n domId: MERMAID_DOM_ID_PREFIX + id + '-' + vertexCounter,\n styles: [],\n classes: [],\n };\n vertices.set(id, vertex);\n }\n vertexCounter++;\n\n if (textObj !== undefined) {\n config = getConfig();\n txt = sanitizeText(textObj.text.trim());\n vertex.labelType = textObj.type;\n // strip quotes if string starts and ends with a quote\n if (txt.startsWith('\"') && txt.endsWith('\"')) {\n txt = txt.substring(1, txt.length - 1);\n }\n vertex.text = txt;\n } else {\n if (vertex.text === undefined) {\n vertex.text = id;\n }\n }\n if (type !== undefined) {\n vertex.type = type;\n }\n if (style !== undefined && style !== null) {\n style.forEach(function (s) {\n vertex.styles.push(s);\n });\n }\n if (classes !== undefined && classes !== null) {\n classes.forEach(function (s) {\n vertex.classes.push(s);\n });\n }\n if (dir !== undefined) {\n vertex.dir = dir;\n }\n if (vertex.props === undefined) {\n vertex.props = props;\n } else if (props !== undefined) {\n Object.assign(vertex.props, props);\n }\n\n if (shapeData !== undefined) {\n let yamlData;\n // detect if shapeData contains a newline character\n // console.log('shapeData', shapeData);\n if (!shapeData.includes('\\n')) {\n // console.log('yamlData shapeData has no new lines', shapeData);\n yamlData = '{\\n' + shapeData + '\\n}';\n } else {\n // console.log('yamlData shapeData has new lines', shapeData);\n yamlData = shapeData + '\\n';\n }\n // console.log('yamlData', yamlData);\n const doc = yaml.load(yamlData, { schema: yaml.JSON_SCHEMA }) as NodeMetaData;\n if (doc.shape) {\n if (doc.shape !== doc.shape.toLowerCase() || doc.shape.includes('_')) {\n throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);\n } else if (!isValidShape(doc.shape)) {\n throw new Error(`No such shape: ${doc.shape}.`);\n }\n vertex.type = doc?.shape;\n }\n\n if (doc?.label) {\n vertex.text = doc?.label;\n }\n if (doc?.icon) {\n vertex.icon = doc?.icon;\n if (!doc.label?.trim() && vertex.text === id) {\n vertex.text = '';\n }\n }\n if (doc?.form) {\n vertex.form = doc?.form;\n }\n if (doc?.pos) {\n vertex.pos = doc?.pos;\n }\n if (doc?.img) {\n vertex.img = doc?.img;\n if (!doc.label?.trim() && vertex.text === id) {\n vertex.text = '';\n }\n }\n if (doc?.constraint) {\n vertex.constraint = doc.constraint;\n }\n if (doc.w) {\n vertex.assetWidth = Number(doc.w);\n }\n if (doc.h) {\n vertex.assetHeight = Number(doc.h);\n }\n }\n};\n\n/**\n * Function called by parser when a link/edge definition has been found\n *\n */\nexport const addSingleLink = function (_start: string, _end: string, type: any) {\n const start = _start;\n const end = _end;\n\n const edge: FlowEdge = { start: start, end: end, type: undefined, text: '', labelType: 'text' };\n log.info('abc78 Got edge...', edge);\n const linkTextObj = type.text;\n\n if (linkTextObj !== undefined) {\n edge.text = sanitizeText(linkTextObj.text.trim());\n\n // strip quotes if string starts and ends with a quote\n if (edge.text.startsWith('\"') && edge.text.endsWith('\"')) {\n edge.text = edge.text.substring(1, edge.text.length - 1);\n }\n edge.labelType = linkTextObj.type;\n }\n\n if (type !== undefined) {\n edge.type = type.type;\n edge.stroke = type.stroke;\n edge.length = type.length > 10 ? 10 : type.length;\n }\n\n if (edges.length < (config.maxEdges ?? 500)) {\n log.info('Pushing edge...');\n edges.push(edge);\n } else {\n throw new Error(\n `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`\n );\n }\n};\n\nexport const addLink = function (_start: string[], _end: string[], type: unknown) {\n log.info('addLink', _start, _end, type);\n for (const start of _start) {\n for (const end of _end) {\n addSingleLink(start, end, type);\n }\n }\n};\n\n/**\n * Updates a link's line interpolation algorithm\n *\n */\nexport const updateLinkInterpolate = function (\n positions: ('default' | number)[],\n interpolate: string\n) {\n positions.forEach(function (pos) {\n if (pos === 'default') {\n edges.defaultInterpolate = interpolate;\n } else {\n edges[pos].interpolate = interpolate;\n }\n });\n};\n\n/**\n * Updates a link with a style\n *\n */\nexport const updateLink = function (positions: ('default' | number)[], style: string[]) {\n positions.forEach(function (pos) {\n if (typeof pos === 'number' && pos >= edges.length) {\n throw new Error(\n `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${\n edges.length - 1\n }. (Help: Ensure that the index is within the range of existing edges.)`\n );\n }\n if (pos === 'default') {\n edges.defaultStyle = style;\n } else {\n // if (utils.isSubstringInArray('fill', style) === -1) {\n // style.push('fill:none');\n // }\n edges[pos].style = style;\n // if edges[pos].style does have fill not set, set it to none\n if (\n (edges[pos]?.style?.length ?? 0) > 0 &&\n !edges[pos]?.style?.some((s) => s?.startsWith('fill'))\n ) {\n edges[pos]?.style?.push('fill:none');\n }\n }\n });\n};\n\nexport const addClass = function (ids: string, style: string[]) {\n ids.split(',').forEach(function (id) {\n let classNode = classes.get(id);\n if (classNode === undefined) {\n classNode = { id, styles: [], textStyles: [] };\n classes.set(id, classNode);\n }\n\n if (style !== undefined && style !== null) {\n style.forEach(function (s) {\n if (/color/.exec(s)) {\n const newStyle = s.replace('fill', 'bgFill'); // .replace('color', 'fill');\n classNode.textStyles.push(newStyle);\n }\n classNode.styles.push(s);\n });\n }\n });\n};\n\n/**\n * Called by parser when a graph definition is found, stores the direction of the chart.\n *\n */\nexport const setDirection = function (dir: string) {\n direction = dir;\n if (/.*/.exec(direction)) {\n direction = 'LR';\n }\n if (/.*v/.exec(direction)) {\n direction = 'TB';\n }\n if (direction === 'TD') {\n direction = 'TB';\n }\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n *\n * @param ids - Comma separated list of ids\n * @param className - Class to add\n */\nexport const setClass = function (ids: string, className: string) {\n for (const id of ids.split(',')) {\n const vertex = vertices.get(id);\n if (vertex) {\n vertex.classes.push(className);\n }\n const subGraph = subGraphLookup.get(id);\n if (subGraph) {\n subGraph.classes.push(className);\n }\n }\n};\n\nconst setTooltip = function (ids: string, tooltip: string) {\n if (tooltip === undefined) {\n return;\n }\n tooltip = sanitizeText(tooltip);\n for (const id of ids.split(',')) {\n tooltips.set(version === 'gen-1' ? lookUpDomId(id) : id, tooltip);\n }\n};\n\nconst setClickFun = function (id: string, functionName: string, functionArgs: string) {\n const domId = lookUpDomId(id);\n // if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (getConfig().securityLevel !== 'loose') {\n return;\n }\n if (functionName === undefined) {\n return;\n }\n let argList: string[] = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.startsWith('\"') && item.endsWith('\"')) {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(id);\n }\n\n const vertex = vertices.get(id);\n if (vertex) {\n vertex.haveCallback = true;\n funs.push(function () {\n const elem = document.querySelector(`[id=\"${domId}\"]`);\n if (elem !== null) {\n elem.addEventListener(\n 'click',\n function () {\n utils.runFunc(functionName, ...argList);\n },\n false\n );\n }\n });\n }\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids - Comma separated list of ids\n * @param linkStr - URL to create a link for\n * @param target - Target attribute for the link\n */\nexport const setLink = function (ids: string, linkStr: string, target: string) {\n ids.split(',').forEach(function (id) {\n const vertex = vertices.get(id);\n if (vertex !== undefined) {\n vertex.link = utils.formatUrl(linkStr, config);\n vertex.linkTarget = target;\n }\n });\n setClass(ids, 'clickable');\n};\n\nexport const getTooltip = function (id: string) {\n return tooltips.get(id);\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids - Comma separated list of ids\n * @param functionName - Function to be called on click\n * @param functionArgs - Arguments to be passed to the function\n */\nexport const setClickEvent = function (ids: string, functionName: string, functionArgs: string) {\n ids.split(',').forEach(function (id) {\n setClickFun(id, functionName, functionArgs);\n });\n setClass(ids, 'clickable');\n};\n\nexport const bindFunctions = function (element: Element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n};\nexport const getDirection = function () {\n return direction.trim();\n};\n/**\n * Retrieval function for fetching the found nodes after parsing has completed.\n *\n */\nexport const getVertices = function () {\n return vertices;\n};\n\n/**\n * Retrieval function for fetching the found links after parsing has completed.\n *\n */\nexport const getEdges = function () {\n return edges;\n};\n\n/**\n * Retrieval function for fetching the found class definitions after parsing has completed.\n *\n */\nexport const getClasses = function () {\n return classes;\n};\n\nconst setupToolTips = function (element: Element) {\n let tooltipElem = select('.mermaidTooltip');\n // @ts-ignore TODO: fix this\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n // @ts-ignore TODO: fix this\n tooltipElem = select('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n }\n\n const svg = select(element).select('svg');\n\n const nodes = svg.selectAll('g.node');\n nodes\n .on('mouseover', function () {\n const el = select(this);\n const title = el.attr('title');\n\n // Don't try to draw a tooltip if no data is provided\n if (title === null) {\n return;\n }\n const rect = (this as Element)?.getBoundingClientRect();\n\n tooltipElem.transition().duration(200).style('opacity', '.9');\n tooltipElem\n .text(el.attr('title'))\n .style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')\n .style('top', window.scrollY + rect.bottom + 'px');\n tooltipElem.html(tooltipElem.html().replace(/<br\\/>/g, '
    '));\n el.classed('hover', true);\n })\n .on('mouseout', function () {\n tooltipElem.transition().duration(500).style('opacity', 0);\n const el = select(this);\n el.classed('hover', false);\n });\n};\nfuns.push(setupToolTips);\n\n/**\n * Clears the internal graph db so that a new graph can be parsed.\n *\n */\nexport const clear = function (ver = 'gen-1') {\n vertices = new Map();\n classes = new Map();\n edges = [];\n funs = [setupToolTips];\n subGraphs = [];\n subGraphLookup = new Map();\n subCount = 0;\n tooltips = new Map();\n firstGraphFlag = true;\n version = ver;\n config = getConfig();\n commonClear();\n};\n\nexport const setGen = (ver: string) => {\n version = ver || 'gen-2';\n};\n\nexport const defaultStyle = function () {\n return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';\n};\n\nexport const addSubGraph = function (\n _id: { text: string },\n list: string[],\n _title: { text: string; type: string }\n) {\n let id: string | undefined = _id.text.trim();\n let title = _title.text;\n if (_id === _title && /\\s/.exec(_title.text)) {\n id = undefined;\n }\n\n function uniq(a: any[]) {\n const prims: any = { boolean: {}, number: {}, string: {} };\n const objs: any[] = [];\n\n let dir; // = undefined; direction.trim();\n const nodeList = a.filter(function (item) {\n const type = typeof item;\n if (item.stmt && item.stmt === 'dir') {\n dir = item.value;\n return false;\n }\n if (item.trim() === '') {\n return false;\n }\n if (type in prims) {\n return prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true);\n } else {\n return objs.includes(item) ? false : objs.push(item);\n }\n });\n return { nodeList, dir };\n }\n\n const { nodeList, dir } = uniq(list.flat());\n if (version === 'gen-1') {\n for (let i = 0; i < nodeList.length; i++) {\n nodeList[i] = lookUpDomId(nodeList[i]);\n }\n }\n\n id = id ?? 'subGraph' + subCount;\n title = title || '';\n title = sanitizeText(title);\n subCount = subCount + 1;\n const subGraph = {\n id: id,\n nodes: nodeList,\n title: title.trim(),\n classes: [],\n dir,\n labelType: _title.type,\n };\n\n log.info('Adding', subGraph.id, subGraph.nodes, subGraph.dir);\n\n // Remove the members in the new subgraph if they already belong to another subgraph\n subGraph.nodes = makeUniq(subGraph, subGraphs).nodes;\n subGraphs.push(subGraph);\n subGraphLookup.set(id, subGraph);\n return id;\n};\n\nconst getPosForId = function (id: string) {\n for (const [i, subGraph] of subGraphs.entries()) {\n if (subGraph.id === id) {\n return i;\n }\n }\n return -1;\n};\nlet secCount = -1;\nconst posCrossRef: number[] = [];\nconst indexNodes2 = function (id: string, pos: number): { result: boolean; count: number } {\n const nodes = subGraphs[pos].nodes;\n secCount = secCount + 1;\n if (secCount > 2000) {\n return {\n result: false,\n count: 0,\n };\n }\n posCrossRef[secCount] = pos;\n // Check if match\n if (subGraphs[pos].id === id) {\n return {\n result: true,\n count: 0,\n };\n }\n\n let count = 0;\n let posCount = 1;\n while (count < nodes.length) {\n const childPos = getPosForId(nodes[count]);\n // Ignore regular nodes (pos will be -1)\n if (childPos >= 0) {\n const res = indexNodes2(id, childPos);\n if (res.result) {\n return {\n result: true,\n count: posCount + res.count,\n };\n } else {\n posCount = posCount + res.count;\n }\n }\n count = count + 1;\n }\n\n return {\n result: false,\n count: posCount,\n };\n};\n\nexport const getDepthFirstPos = function (pos: number) {\n return posCrossRef[pos];\n};\nexport const indexNodes = function () {\n secCount = -1;\n if (subGraphs.length > 0) {\n indexNodes2('none', subGraphs.length - 1);\n }\n};\n\nexport const getSubGraphs = function () {\n return subGraphs;\n};\n\nexport const firstGraph = () => {\n if (firstGraphFlag) {\n firstGraphFlag = false;\n return true;\n }\n return false;\n};\n\nconst destructStartLink = (_str: string): FlowLink => {\n let str = _str.trim();\n let type = 'arrow_open';\n\n switch (str[0]) {\n case '<':\n type = 'arrow_point';\n str = str.slice(1);\n break;\n case 'x':\n type = 'arrow_cross';\n str = str.slice(1);\n break;\n case 'o':\n type = 'arrow_circle';\n str = str.slice(1);\n break;\n }\n\n let stroke = 'normal';\n\n if (str.includes('=')) {\n stroke = 'thick';\n }\n\n if (str.includes('.')) {\n stroke = 'dotted';\n }\n\n return { type, stroke };\n};\n\nconst countChar = (char: string, str: string) => {\n const length = str.length;\n let count = 0;\n for (let i = 0; i < length; ++i) {\n if (str[i] === char) {\n ++count;\n }\n }\n return count;\n};\n\nconst destructEndLink = (_str: string) => {\n const str = _str.trim();\n let line = str.slice(0, -1);\n let type = 'arrow_open';\n\n switch (str.slice(-1)) {\n case 'x':\n type = 'arrow_cross';\n if (str.startsWith('x')) {\n type = 'double_' + type;\n line = line.slice(1);\n }\n break;\n case '>':\n type = 'arrow_point';\n if (str.startsWith('<')) {\n type = 'double_' + type;\n line = line.slice(1);\n }\n break;\n case 'o':\n type = 'arrow_circle';\n if (str.startsWith('o')) {\n type = 'double_' + type;\n line = line.slice(1);\n }\n break;\n }\n\n let stroke = 'normal';\n let length = line.length - 1;\n\n if (line.startsWith('=')) {\n stroke = 'thick';\n }\n\n if (line.startsWith('~')) {\n stroke = 'invisible';\n }\n\n const dots = countChar('.', line);\n\n if (dots) {\n stroke = 'dotted';\n length = dots;\n }\n\n return { type, stroke, length };\n};\n\nexport const destructLink = (_str: string, _startStr: string) => {\n const info = destructEndLink(_str);\n let startInfo;\n if (_startStr) {\n startInfo = destructStartLink(_startStr);\n\n if (startInfo.stroke !== info.stroke) {\n return { type: 'INVALID', stroke: 'INVALID' };\n }\n\n if (startInfo.type === 'arrow_open') {\n // -- xyz --> - take arrow type from ending\n startInfo.type = info.type;\n } else {\n // x-- xyz --> - not supported\n if (startInfo.type !== info.type) {\n return { type: 'INVALID', stroke: 'INVALID' };\n }\n\n startInfo.type = 'double_' + startInfo.type;\n }\n\n if (startInfo.type === 'double_arrow') {\n startInfo.type = 'double_arrow_point';\n }\n\n startInfo.length = info.length;\n return startInfo;\n }\n\n return info;\n};\n\n// Todo optimizer this by caching existing nodes\nconst exists = (allSgs: FlowSubGraph[], _id: string) => {\n for (const sg of allSgs) {\n if (sg.nodes.includes(_id)) {\n return true;\n }\n }\n return false;\n};\n/**\n * Deletes an id from all subgraphs\n *\n */\nconst makeUniq = (sg: FlowSubGraph, allSubgraphs: FlowSubGraph[]) => {\n const res: string[] = [];\n sg.nodes.forEach((_id, pos) => {\n if (!exists(allSubgraphs, _id)) {\n res.push(sg.nodes[pos]);\n }\n });\n return { nodes: res };\n};\n\nexport const lex = {\n firstGraph,\n};\n\nconst getTypeFromVertex = (vertex: FlowVertex): ShapeID => {\n if (vertex.img) {\n return 'imageSquare';\n }\n if (vertex.icon) {\n if (vertex.form === 'circle') {\n return 'iconCircle';\n }\n if (vertex.form === 'square') {\n return 'iconSquare';\n }\n if (vertex.form === 'rounded') {\n return 'iconRounded';\n }\n return 'icon';\n }\n switch (vertex.type) {\n case 'square':\n case undefined:\n return 'squareRect';\n case 'round':\n return 'roundedRect';\n case 'ellipse':\n // @ts-expect-error -- Ellipses are broken, see https://github.com/mermaid-js/mermaid/issues/5976\n return 'ellipse';\n default:\n return vertex.type;\n }\n};\n\nconst findNode = (nodes: Node[], id: string) => nodes.find((node) => node.id === id);\nconst destructEdgeType = (type: string | undefined) => {\n let arrowTypeStart = 'none';\n let arrowTypeEnd = 'arrow_point';\n switch (type) {\n case 'arrow_point':\n case 'arrow_circle':\n case 'arrow_cross':\n arrowTypeEnd = type;\n break;\n\n case 'double_arrow_point':\n case 'double_arrow_circle':\n case 'double_arrow_cross':\n arrowTypeStart = type.replace('double_', '');\n arrowTypeEnd = arrowTypeStart;\n break;\n }\n return { arrowTypeStart, arrowTypeEnd };\n};\n\nconst addNodeFromVertex = (\n vertex: FlowVertex,\n nodes: Node[],\n parentDB: Map,\n subGraphDB: Map,\n config: any,\n look: string\n) => {\n const parentId = parentDB.get(vertex.id);\n const isGroup = subGraphDB.get(vertex.id) ?? false;\n\n const node = findNode(nodes, vertex.id);\n if (node) {\n node.cssStyles = vertex.styles;\n node.cssCompiledStyles = getCompiledStyles(vertex.classes);\n node.cssClasses = vertex.classes.join(' ');\n } else {\n const baseNode = {\n id: vertex.id,\n label: vertex.text,\n labelStyle: '',\n parentId,\n padding: config.flowchart?.padding || 8,\n cssStyles: vertex.styles,\n cssCompiledStyles: getCompiledStyles(['default', 'node', ...vertex.classes]),\n cssClasses: 'default ' + vertex.classes.join(' '),\n dir: vertex.dir,\n domId: vertex.domId,\n look,\n link: vertex.link,\n linkTarget: vertex.linkTarget,\n tooltip: getTooltip(vertex.id),\n icon: vertex.icon,\n pos: vertex.pos,\n img: vertex.img,\n assetWidth: vertex.assetWidth,\n assetHeight: vertex.assetHeight,\n constraint: vertex.constraint,\n };\n if (isGroup) {\n nodes.push({\n ...baseNode,\n isGroup: true,\n shape: 'rect',\n });\n } else {\n nodes.push({\n ...baseNode,\n isGroup: false,\n shape: getTypeFromVertex(vertex),\n });\n }\n }\n};\n\nfunction getCompiledStyles(classDefs: string[]) {\n let compiledStyles: string[] = [];\n for (const customClass of classDefs) {\n const cssClass = classes.get(customClass);\n if (cssClass?.styles) {\n compiledStyles = [...compiledStyles, ...(cssClass.styles ?? [])].map((s) => s.trim());\n }\n if (cssClass?.textStyles) {\n compiledStyles = [...compiledStyles, ...(cssClass.textStyles ?? [])].map((s) => s.trim());\n }\n }\n return compiledStyles;\n}\n\nexport const getData = () => {\n const config = getConfig();\n const nodes: Node[] = [];\n const edges: Edge[] = [];\n\n const subGraphs = getSubGraphs();\n const parentDB = new Map();\n const subGraphDB = new Map();\n\n // Setup the subgraph data for adding nodes\n for (let i = subGraphs.length - 1; i >= 0; i--) {\n const subGraph = subGraphs[i];\n if (subGraph.nodes.length > 0) {\n subGraphDB.set(subGraph.id, true);\n }\n for (const id of subGraph.nodes) {\n parentDB.set(id, subGraph.id);\n }\n }\n\n // Data is setup, add the nodes\n for (let i = subGraphs.length - 1; i >= 0; i--) {\n const subGraph = subGraphs[i];\n nodes.push({\n id: subGraph.id,\n label: subGraph.title,\n labelStyle: '',\n parentId: parentDB.get(subGraph.id),\n padding: 8,\n cssCompiledStyles: getCompiledStyles(subGraph.classes),\n cssClasses: subGraph.classes.join(' '),\n shape: 'rect',\n dir: subGraph.dir,\n isGroup: true,\n look: config.look,\n });\n }\n\n const n = getVertices();\n n.forEach((vertex) => {\n addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look || 'classic');\n });\n\n const e = getEdges();\n e.forEach((rawEdge, index) => {\n const { arrowTypeStart, arrowTypeEnd } = destructEdgeType(rawEdge.type);\n const styles = [...(e.defaultStyle ?? [])];\n\n if (rawEdge.style) {\n styles.push(...rawEdge.style);\n }\n const edge: Edge = {\n id: getEdgeId(rawEdge.start, rawEdge.end, { counter: index, prefix: 'L' }),\n start: rawEdge.start,\n end: rawEdge.end,\n type: rawEdge.type ?? 'normal',\n label: rawEdge.text,\n labelpos: 'c',\n thickness: rawEdge.stroke,\n minlen: rawEdge.length,\n classes:\n rawEdge?.stroke === 'invisible'\n ? ''\n : 'edge-thickness-normal edge-pattern-solid flowchart-link',\n arrowTypeStart: rawEdge?.stroke === 'invisible' ? 'none' : arrowTypeStart,\n arrowTypeEnd: rawEdge?.stroke === 'invisible' ? 'none' : arrowTypeEnd,\n arrowheadStyle: 'fill: #333',\n labelStyle: styles,\n style: styles,\n pattern: rawEdge.stroke,\n look: config.look,\n };\n edges.push(edge);\n });\n\n return { nodes, edges, other: {}, config };\n};\n\nexport default {\n defaultConfig: () => defaultConfig.flowchart,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n getData,\n setAccDescription,\n addVertex,\n lookUpDomId,\n addLink,\n updateLinkInterpolate,\n updateLink,\n addClass,\n setDirection,\n setClass,\n setTooltip,\n getTooltip,\n setClickEvent,\n setLink,\n bindFunctions,\n getDirection,\n getVertices,\n getEdges,\n getClasses,\n clear,\n setGen,\n defaultStyle,\n addSubGraph,\n getDepthFirstPos,\n indexNodes,\n getSubGraphs,\n destructLink,\n lex,\n exists,\n makeUniq,\n setDiagramTitle,\n getDiagramTitle,\n};\n", "import { select } from 'd3';\n\nexport const getDiagramElement = (id, securityLevel) => {\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n\n return svg;\n};\n", "import type { FlowchartDiagramConfig } from '../config.type.js';\n\nexport const getSubGraphTitleMargins = ({\n flowchart,\n}: {\n flowchart: FlowchartDiagramConfig;\n}): {\n subGraphTitleTopMargin: number;\n subGraphTitleBottomMargin: number;\n subGraphTitleTotalMargin: number;\n} => {\n const subGraphTitleTopMargin = flowchart?.subGraphTitleMargin?.top ?? 0;\n const subGraphTitleBottomMargin = flowchart?.subGraphTitleMargin?.bottom ?? 0;\n const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin;\n\n return {\n subGraphTitleTopMargin,\n subGraphTitleBottomMargin,\n subGraphTitleTotalMargin,\n };\n};\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { evaluate } from '../../diagrams/common/common.js';\nimport { log } from '../../logger.js';\nimport { getSubGraphTitleMargins } from '../../utils/subGraphTitleMargins.js';\nimport { select } from 'd3';\nimport rough from 'roughjs';\nimport { createText } from '../createText.ts';\nimport intersectRect from '../rendering-elements/intersect/intersect-rect.js';\nimport createLabel from './createLabel.js';\nimport { createRoundedRectPathD } from './shapes/roundedRectPath.ts';\nimport { styles2String, userNodeOverrides } from './shapes/handDrawnShapeStyles.js';\n\nconst rect = async (parent, node) => {\n log.info('Creating subgraph rect for ', node.id, node);\n const siteConfig = getConfig();\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { clusterBkg, clusterBorder } = themeVariables;\n\n const { labelStyles, nodeStyles, borderStyles, backgroundStyles } = styles2String(node);\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster ' + node.cssClasses)\n .attr('id', node.id)\n .attr('data-look', node.look);\n\n const useHtmlLabels = evaluate(siteConfig.flowchart.htmlLabels);\n\n // Create the label and insert it after the rect\n const labelEl = shapeSvg.insert('g').attr('class', 'cluster-label ');\n\n const text = await createText(labelEl, node.label, {\n style: node.labelStyle,\n useHtmlLabels,\n isNode: true,\n });\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n\n const height = node.height;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n\n log.trace('Data ', node, JSON.stringify(node));\n let rect;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n roughness: 0.7,\n fill: clusterBkg,\n // fill: 'red',\n stroke: clusterBorder,\n fillWeight: 3,\n seed: handDrawnSeed,\n });\n const roughNode = rc.path(createRoundedRectPathD(x, y, width, height, 0), options);\n rect = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughNode;\n }, ':first-child');\n // Should we affect the options instead of doing this?\n rect.select('path:nth-child(2)').attr('style', borderStyles.join(';'));\n rect.select('path').attr('style', backgroundStyles.join(';').replace('fill', 'stroke'));\n } else {\n // add the rect\n rect = shapeSvg.insert('rect', ':first-child');\n // center the rect around its coordinate\n rect\n .attr('style', nodeStyles)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n }\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n labelEl.attr(\n 'transform',\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n\n if (labelStyles) {\n const span = labelEl.select('span');\n if (span) {\n span.attr('style', labelStyles);\n }\n }\n // Center the label\n\n const rectBox = rect.node().getBBox();\n node.offsetX = 0;\n node.width = rectBox.width;\n node.height = rectBox.height;\n // Used by layout engine to position subgraph in parent\n node.offsetY = bbox.height - node.padding / 2;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: bbox };\n};\n\n/**\n * Non visible cluster where the note is group with its\n *\n * @param {any} parent\n * @param {any} node\n * @returns {any} ShapeSvg\n */\nconst noteGroup = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding)\n .attr('fill', 'none');\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: { width: 0, height: 0 } };\n};\n\nconst roundedWithTitle = async (parent, node) => {\n const siteConfig = getConfig();\n\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { altBackground, compositeBackground, compositeTitleBackground, nodeBorder } =\n themeVariables;\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.cssClasses)\n .attr('id', node.id)\n .attr('data-id', node.id)\n .attr('data-look', node.look);\n\n // add the rect\n const outerRectG = shapeSvg.insert('g', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n let innerRect = shapeSvg.append('rect');\n\n const text = label\n .node()\n .appendChild(await createLabel(node.label, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Rounded With Title\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width =\n (node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width) + padding;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n\n const height = node.height + padding;\n // const height = node.height + padding;\n const innerHeight = node.height + padding - bbox.height - 6;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n node.width = width;\n const innerY = node.y - node.height / 2 - halfPadding + bbox.height + 2;\n\n // add the rect\n let rect;\n if (node.look === 'handDrawn') {\n const isAlt = node.cssClasses.includes('statediagram-cluster-alt');\n const rc = rough.svg(shapeSvg);\n const roughOuterNode =\n node.rx || node.ry\n ? rc.path(createRoundedRectPathD(x, y, width, height, 10), {\n roughness: 0.7,\n fill: compositeTitleBackground,\n fillStyle: 'solid',\n stroke: nodeBorder,\n seed: handDrawnSeed,\n })\n : rc.rectangle(x, y, width, height, { seed: handDrawnSeed });\n\n rect = shapeSvg.insert(() => roughOuterNode, ':first-child');\n const roughInnerNode = rc.rectangle(x, innerY, width, innerHeight, {\n fill: isAlt ? altBackground : compositeBackground,\n fillStyle: isAlt ? 'hachure' : 'solid',\n stroke: nodeBorder,\n seed: handDrawnSeed,\n });\n\n rect = shapeSvg.insert(() => roughOuterNode, ':first-child');\n innerRect = shapeSvg.insert(() => roughInnerNode);\n } else {\n rect = outerRectG.insert('rect', ':first-child');\n const outerRectClass = 'outer';\n\n // center the rect around its coordinate\n rect\n .attr('class', outerRectClass)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('data-look', node.look);\n innerRect\n .attr('class', 'inner')\n .attr('x', x)\n .attr('y', innerY)\n .attr('width', width)\n .attr('height', innerHeight);\n }\n\n label.attr(\n 'transform',\n `translate(${node.x - bbox.width / 2}, ${y + 1 - (evaluate(siteConfig.flowchart.htmlLabels) ? 0 : 3)})`\n );\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n node.offsetX = 0;\n // Used by layout engine to position subgraph in parent\n node.offsetY = bbox.height - node.padding / 2;\n node.labelBBox = bbox;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: bbox };\n};\nconst kanbanSection = async (parent, node) => {\n log.info('Creating subgraph rect for ', node.id, node);\n const siteConfig = getConfig();\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { clusterBkg, clusterBorder } = themeVariables;\n\n const { labelStyles, nodeStyles, borderStyles, backgroundStyles } = styles2String(node);\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster ' + node.cssClasses)\n .attr('id', node.id)\n .attr('data-look', node.look);\n\n const useHtmlLabels = evaluate(siteConfig.flowchart.htmlLabels);\n\n // Create the label and insert it after the rect\n const labelEl = shapeSvg.insert('g').attr('class', 'cluster-label ');\n\n const text = await createText(labelEl, node.label, {\n style: node.labelStyle,\n useHtmlLabels,\n isNode: true,\n width: node.width,\n });\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n\n const height = node.height;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n\n log.trace('Data ', node, JSON.stringify(node));\n let rect;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n roughness: 0.7,\n fill: clusterBkg,\n // fill: 'red',\n stroke: clusterBorder,\n fillWeight: 4,\n seed: handDrawnSeed,\n });\n const roughNode = rc.path(createRoundedRectPathD(x, y, width, height, node.rx), options);\n rect = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughNode;\n }, ':first-child');\n // Should we affect the options instead of doing this?\n rect.select('path:nth-child(2)').attr('style', borderStyles.join(';'));\n rect.select('path').attr('style', backgroundStyles.join(';').replace('fill', 'stroke'));\n } else {\n // add the rect\n rect = shapeSvg.insert('rect', ':first-child');\n // center the rect around its coordinate\n rect\n .attr('style', nodeStyles)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n }\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n labelEl.attr(\n 'transform',\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n\n if (labelStyles) {\n const span = labelEl.select('span');\n if (span) {\n span.attr('style', labelStyles);\n }\n }\n // Center the label\n\n const rectBox = rect.node().getBBox();\n node.offsetX = 0;\n node.width = rectBox.width;\n node.height = rectBox.height;\n // Used by layout engine to position subgraph in parent\n node.offsetY = bbox.height - node.padding / 2;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: bbox };\n};\nconst divider = (parent, node) => {\n const siteConfig = getConfig();\n\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { nodeBorder } = themeVariables;\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.cssClasses)\n .attr('id', node.id)\n .attr('data-look', node.look);\n\n // add the rect\n const outerRectG = shapeSvg.insert('g', ':first-child');\n\n const padding = 0 * node.padding;\n\n const width = node.width + padding;\n\n node.diff = -node.padding;\n\n const height = node.height + padding;\n // const height = node.height + padding;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n node.width = width;\n\n // add the rect\n let rect;\n if (node.look === 'handDrawn') {\n const rc = rough.svg(shapeSvg);\n const roughOuterNode = rc.rectangle(x, y, width, height, {\n fill: 'lightgrey',\n roughness: 0.5,\n strokeLineDash: [5],\n stroke: nodeBorder,\n seed: handDrawnSeed,\n });\n\n rect = shapeSvg.insert(() => roughOuterNode, ':first-child');\n } else {\n rect = outerRectG.insert('rect', ':first-child');\n const outerRectClass = 'divider';\n\n // center the rect around its coordinate\n rect\n .attr('class', outerRectClass)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('data-look', node.look);\n }\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n node.offsetX = 0;\n // Used by layout engine to position subgraph in parent\n node.offsetY = 0;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: {} };\n};\n\nconst squareRect = rect;\nconst shapes = {\n rect,\n squareRect,\n roundedWithTitle,\n noteGroup,\n divider,\n kanbanSection,\n};\n\nlet clusterElems = new Map();\n\n/**\n * @typedef {keyof typeof shapes} ClusterShapeID\n */\n\n/**\n * @param {import('../types.js').ClusterNode} node - Shape defaults to 'rect'\n */\nexport const insertCluster = async (elem, node) => {\n const shape = node.shape || 'rect';\n const cluster = await shapes[shape](elem, node);\n clusterElems.set(node.id, cluster);\n return cluster;\n};\n\nexport const getClusterTitleWidth = (elem, node) => {\n const label = createLabel(node.label, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n const width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n};\n\nexport const clear = () => {\n clusterElems = new Map();\n};\n\nexport const positionCluster = (node) => {\n log.info(\n 'Position cluster (' +\n node.id +\n ', ' +\n node.x +\n ', ' +\n node.y +\n ') (' +\n node?.width +\n ', ' +\n node?.height +\n ')',\n clusterElems.get(node.id)\n );\n const el = clusterElems.get(node.id);\n el.cluster.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n", "import type { EdgeData, Point } from '../types.js';\n\n// We need to draw the lines a bit shorter to avoid drawing\n// under any transparent markers.\n// The offsets are calculated from the markers' dimensions.\nconst markerOffsets = {\n aggregation: 18,\n extension: 18,\n composition: 18,\n dependency: 6,\n lollipop: 13.5,\n arrow_point: 4,\n} as const;\n\n/**\n * Calculate the deltas and angle between two points\n * @param point1 - First point\n * @param point2 - Second point\n * @returns The angle, deltaX and deltaY\n */\nfunction calculateDeltaAndAngle(\n point1?: Point | [number, number],\n point2?: Point | [number, number]\n): { angle: number; deltaX: number; deltaY: number } {\n if (point1 === undefined || point2 === undefined) {\n return { angle: 0, deltaX: 0, deltaY: 0 };\n }\n point1 = pointTransformer(point1);\n point2 = pointTransformer(point2);\n const [x1, y1] = [point1.x, point1.y];\n const [x2, y2] = [point2.x, point2.y];\n const deltaX = x2 - x1;\n const deltaY = y2 - y1;\n return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY };\n}\n\nconst pointTransformer = (data: Point | [number, number]) => {\n if (Array.isArray(data)) {\n return { x: data[0], y: data[1] };\n }\n return data;\n};\n\nexport const getLineFunctionsWithOffset = (\n edge: Pick\n) => {\n return {\n x: function (\n this: void,\n d: Point | [number, number],\n i: number,\n data: (Point | [number, number])[]\n ) {\n let offset = 0;\n const DIRECTION =\n pointTransformer(data[0]).x < pointTransformer(data[data.length - 1]).x ? 'left' : 'right';\n if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {\n const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]);\n offset =\n markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets] *\n Math.cos(angle) *\n (deltaX >= 0 ? 1 : -1);\n } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {\n const { angle, deltaX } = calculateDeltaAndAngle(\n data[data.length - 1],\n data[data.length - 2]\n );\n offset =\n markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets] *\n Math.cos(angle) *\n (deltaX >= 0 ? 1 : -1);\n }\n\n const differenceToEnd = Math.abs(\n pointTransformer(d).x - pointTransformer(data[data.length - 1]).x\n );\n const differenceInYEnd = Math.abs(\n pointTransformer(d).y - pointTransformer(data[data.length - 1]).y\n );\n const differenceToStart = Math.abs(pointTransformer(d).x - pointTransformer(data[0]).x);\n const differenceInYStart = Math.abs(pointTransformer(d).y - pointTransformer(data[0]).y);\n const startMarkerHeight = markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets];\n const endMarkerHeight = markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets];\n const extraRoom = 1;\n\n // Adjust the offset if the difference is smaller than the marker height\n if (\n differenceToEnd < endMarkerHeight &&\n differenceToEnd > 0 &&\n differenceInYEnd < endMarkerHeight\n ) {\n let adjustment = endMarkerHeight + extraRoom - differenceToEnd;\n adjustment *= DIRECTION === 'right' ? -1 : 1;\n // Adjust the offset by the amount needed to fit the marker\n offset -= adjustment;\n }\n\n if (\n differenceToStart < startMarkerHeight &&\n differenceToStart > 0 &&\n differenceInYStart < startMarkerHeight\n ) {\n let adjustment = startMarkerHeight + extraRoom - differenceToStart;\n adjustment *= DIRECTION === 'right' ? -1 : 1;\n offset += adjustment;\n }\n\n return pointTransformer(d).x + offset;\n },\n y: function (\n this: void,\n d: Point | [number, number],\n i: number,\n data: (Point | [number, number])[]\n ) {\n let offset = 0;\n const DIRECTION =\n pointTransformer(data[0]).y < pointTransformer(data[data.length - 1]).y ? 'down' : 'up';\n if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {\n const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]);\n offset =\n markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets] *\n Math.abs(Math.sin(angle)) *\n (deltaY >= 0 ? 1 : -1);\n } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {\n const { angle, deltaY } = calculateDeltaAndAngle(\n data[data.length - 1],\n data[data.length - 2]\n );\n offset =\n markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets] *\n Math.abs(Math.sin(angle)) *\n (deltaY >= 0 ? 1 : -1);\n }\n\n const differenceToEnd = Math.abs(\n pointTransformer(d).y - pointTransformer(data[data.length - 1]).y\n );\n const differenceInXEnd = Math.abs(\n pointTransformer(d).x - pointTransformer(data[data.length - 1]).x\n );\n const differenceToStart = Math.abs(pointTransformer(d).y - pointTransformer(data[0]).y);\n const differenceInXStart = Math.abs(pointTransformer(d).x - pointTransformer(data[0]).x);\n const startMarkerHeight = markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets];\n const endMarkerHeight = markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets];\n const extraRoom = 1;\n\n // Adjust the offset if the difference is smaller than the marker height\n if (\n differenceToEnd < endMarkerHeight &&\n differenceToEnd > 0 &&\n differenceInXEnd < endMarkerHeight\n ) {\n let adjustment = endMarkerHeight + extraRoom - differenceToEnd;\n adjustment *= DIRECTION === 'up' ? -1 : 1;\n // Adjust the offset by the amount needed to fit the marker\n offset -= adjustment;\n }\n\n if (\n differenceToStart < startMarkerHeight &&\n differenceToStart > 0 &&\n differenceInXStart < startMarkerHeight\n ) {\n let adjustment = startMarkerHeight + extraRoom - differenceToStart;\n adjustment *= DIRECTION === 'up' ? -1 : 1;\n offset += adjustment;\n }\n return pointTransformer(d).y + offset;\n },\n };\n};\n\nif (import.meta.vitest) {\n const { it, expect, describe } = import.meta.vitest;\n describe('calculateDeltaAndAngle', () => {\n it('should calculate the angle and deltas between two points', () => {\n expect(calculateDeltaAndAngle([0, 0], [0, 1])).toStrictEqual({\n angle: 1.5707963267948966,\n deltaX: 0,\n deltaY: 1,\n });\n expect(calculateDeltaAndAngle([1, 0], [0, -1])).toStrictEqual({\n angle: 0.7853981633974483,\n deltaX: -1,\n deltaY: -1,\n });\n expect(calculateDeltaAndAngle({ x: 1, y: 0 }, [0, -1])).toStrictEqual({\n angle: 0.7853981633974483,\n deltaX: -1,\n deltaY: -1,\n });\n expect(calculateDeltaAndAngle({ x: 1, y: 0 }, { x: 1, y: 0 })).toStrictEqual({\n angle: NaN,\n deltaX: 0,\n deltaY: 0,\n });\n });\n\n it('should calculate the angle and deltas if one point in undefined', () => {\n expect(calculateDeltaAndAngle(undefined, [0, 1])).toStrictEqual({\n angle: 0,\n deltaX: 0,\n deltaY: 0,\n });\n expect(calculateDeltaAndAngle([0, 1], undefined)).toStrictEqual({\n angle: 0,\n deltaX: 0,\n deltaY: 0,\n });\n });\n });\n}\n", "import type { SVG } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport type { EdgeData } from '../../types.js';\n/**\n * Adds SVG markers to a path element based on the arrow types specified in the edge.\n *\n * @param svgPath - The SVG path element to add markers to.\n * @param edge - The edge data object containing the arrow types.\n * @param url - The URL of the SVG marker definitions.\n * @param id - The ID prefix for the SVG marker definitions.\n * @param diagramType - The type of diagram being rendered.\n */\nexport const addEdgeMarkers = (\n svgPath: SVG,\n edge: Pick,\n url: string,\n id: string,\n diagramType: string\n) => {\n if (edge.arrowTypeStart) {\n addEdgeMarker(svgPath, 'start', edge.arrowTypeStart, url, id, diagramType);\n }\n if (edge.arrowTypeEnd) {\n addEdgeMarker(svgPath, 'end', edge.arrowTypeEnd, url, id, diagramType);\n }\n};\n\nconst arrowTypesMap = {\n arrow_cross: 'cross',\n arrow_point: 'point',\n arrow_barb: 'barb',\n arrow_circle: 'circle',\n aggregation: 'aggregation',\n extension: 'extension',\n composition: 'composition',\n dependency: 'dependency',\n lollipop: 'lollipop',\n} as const;\n\nconst addEdgeMarker = (\n svgPath: SVG,\n position: 'start' | 'end',\n arrowType: string,\n url: string,\n id: string,\n diagramType: string\n) => {\n const endMarkerType = arrowTypesMap[arrowType as keyof typeof arrowTypesMap];\n\n if (!endMarkerType) {\n log.warn(`Unknown arrow type: ${arrowType}`);\n return; // unknown arrow type, ignore\n }\n\n const suffix = position === 'start' ? 'Start' : 'End';\n svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);\n};\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { evaluate } from '../../diagrams/common/common.js';\nimport { log } from '../../logger.js';\nimport { createText } from '../createText.js';\nimport utils from '../../utils.js';\nimport { getLineFunctionsWithOffset } from '../../utils/lineWithOffset.js';\nimport { getSubGraphTitleMargins } from '../../utils/subGraphTitleMargins.js';\nimport { curveBasis, line, select } from 'd3';\nimport rough from 'roughjs';\nimport createLabel from './createLabel.js';\nimport { addEdgeMarkers } from './edgeMarker.ts';\n\nconst edgeLabels = new Map();\nconst terminalLabels = new Map();\n\nexport const clear = () => {\n edgeLabels.clear();\n terminalLabels.clear();\n};\n\nexport const getLabelStyles = (styleArray) => {\n let styles = styleArray ? styleArray.reduce((acc, style) => acc + ';' + style, '') : '';\n return styles;\n};\n\nexport const insertEdgeLabel = async (elem, edge) => {\n let useHtmlLabels = evaluate(getConfig().flowchart.htmlLabels);\n\n const labelElement = await createText(elem, edge.label, {\n style: getLabelStyles(edge.labelStyle),\n useHtmlLabels,\n addSvgBackground: true,\n isNode: false,\n });\n log.info('abc82', edge, edge.labelType);\n\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const edgeLabel = elem.insert('g').attr('class', 'edgeLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = edgeLabel.insert('g').attr('class', 'label');\n label.node().appendChild(labelElement);\n\n // Center the label\n let bbox = labelElement.getBBox();\n if (useHtmlLabels) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n\n // Make element accessible by id for positioning\n edgeLabels.set(edge.id, edgeLabel);\n\n // Update the abstract data of the edge with the new information about its width and height\n edge.width = bbox.width;\n edge.height = bbox.height;\n\n let fo;\n if (edge.startLabelLeft) {\n // Create the actual text element\n const startLabelElement = await createLabel(\n edge.startLabelLeft,\n getLabelStyles(edge.labelStyle)\n );\n const startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n if (!terminalLabels.get(edge.id)) {\n terminalLabels.set(edge.id, {});\n }\n terminalLabels.get(edge.id).startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, edge.startLabelLeft);\n }\n if (edge.startLabelRight) {\n // Create the actual text element\n const startLabelElement = await createLabel(\n edge.startLabelRight,\n getLabelStyles(edge.labelStyle)\n );\n const startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n fo = startEdgeLabelRight.node().appendChild(startLabelElement);\n inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n if (!terminalLabels.get(edge.id)) {\n terminalLabels.set(edge.id, {});\n }\n terminalLabels.get(edge.id).startRight = startEdgeLabelRight;\n setTerminalWidth(fo, edge.startLabelRight);\n }\n if (edge.endLabelLeft) {\n // Create the actual text element\n const endLabelElement = await createLabel(edge.endLabelLeft, getLabelStyles(edge.labelStyle));\n const endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n\n if (!terminalLabels.get(edge.id)) {\n terminalLabels.set(edge.id, {});\n }\n terminalLabels.get(edge.id).endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, edge.endLabelLeft);\n }\n if (edge.endLabelRight) {\n // Create the actual text element\n const endLabelElement = await createLabel(edge.endLabelRight, getLabelStyles(edge.labelStyle));\n const endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelRight.node().appendChild(endLabelElement);\n if (!terminalLabels.get(edge.id)) {\n terminalLabels.set(edge.id, {});\n }\n terminalLabels.get(edge.id).endRight = endEdgeLabelRight;\n setTerminalWidth(fo, edge.endLabelRight);\n }\n return labelElement;\n};\n\n/**\n * @param {any} fo\n * @param {any} value\n */\nfunction setTerminalWidth(fo, value) {\n if (getConfig().flowchart.htmlLabels && fo) {\n fo.style.width = value.length * 9 + 'px';\n fo.style.height = '12px';\n }\n}\n\nexport const positionEdgeLabel = (edge, paths) => {\n log.debug('Moving label abc88 ', edge.id, edge.label, edgeLabels.get(edge.id), paths);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n const siteConfig = getConfig();\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n if (edge.label) {\n const el = edgeLabels.get(edge.id);\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcLabelPosition(path);\n log.debug(\n 'Moving label ' + edge.label + ' from (',\n x,\n ',',\n y,\n ') to (',\n pos.x,\n ',',\n pos.y,\n ') abc88'\n );\n if (paths.updatedPath) {\n x = pos.x;\n y = pos.y;\n }\n }\n el.attr('transform', `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);\n }\n\n if (edge.startLabelLeft) {\n const el = terminalLabels.get(edge.id).startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.startLabelRight) {\n const el = terminalLabels.get(edge.id).startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(\n edge.arrowTypeStart ? 10 : 0,\n 'start_right',\n path\n );\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels.get(edge.id).endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelRight) {\n const el = terminalLabels.get(edge.id).endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_right', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n};\n\nconst outsideNode = (node, point) => {\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point.x - x);\n const dy = Math.abs(point.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n return dx >= w || dy >= h;\n};\n\nexport const intersection = (node, outsidePoint, insidePoint) => {\n log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n\n const dx = Math.abs(x - insidePoint.x);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n // Intersection is top or bottom of rect.\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = (R * q) / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q,\n };\n\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n\n log.debug(`abc89 top/bottom calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);\n\n return res;\n } else {\n // Intersection on sides of rect\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n r = x - w - outsidePoint.x;\n }\n let q = (Q * r) / R;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n\n return { x: _x, y: _y };\n }\n};\n\nconst cutPathAtIntersect = (_points, boundaryNode) => {\n log.warn('abc88 cutPathAtIntersect', _points, boundaryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point) => {\n log.info('abc88 checking point', point, boundaryNode);\n\n if (!outsideNode(boundaryNode, point) && !isInside) {\n const inter = intersection(boundaryNode, lastPointOutside, point);\n log.debug('abc88 inside', point, lastPointOutside, inter);\n log.debug('abc88 intersection', inter, boundaryNode);\n\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n });\n\n if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n } else {\n log.warn('abc88 no intersect', inter, points);\n }\n isInside = true;\n } else {\n log.warn('abc88 outside', point, lastPointOutside);\n lastPointOutside = point;\n if (!isInside) {\n points.push(point);\n }\n }\n });\n log.debug('returning points', points);\n return points;\n};\n\nfunction extractCornerPoints(points) {\n const cornerPoints = [];\n const cornerPointPositions = [];\n for (let i = 1; i < points.length - 1; i++) {\n const prev = points[i - 1];\n const curr = points[i];\n const next = points[i + 1];\n if (\n prev.x === curr.x &&\n curr.y === next.y &&\n Math.abs(curr.x - next.x) > 5 &&\n Math.abs(curr.y - prev.y) > 5\n ) {\n cornerPoints.push(curr);\n cornerPointPositions.push(i);\n } else if (\n prev.y === curr.y &&\n curr.x === next.x &&\n Math.abs(curr.x - prev.x) > 5 &&\n Math.abs(curr.y - next.y) > 5\n ) {\n cornerPoints.push(curr);\n cornerPointPositions.push(i);\n }\n }\n return { cornerPoints, cornerPointPositions };\n}\n\nconst findAdjacentPoint = function (pointA, pointB, distance) {\n const xDiff = pointB.x - pointA.x;\n const yDiff = pointB.y - pointA.y;\n const length = Math.sqrt(xDiff * xDiff + yDiff * yDiff);\n const ratio = distance / length;\n return { x: pointB.x - ratio * xDiff, y: pointB.y - ratio * yDiff };\n};\n\nconst fixCorners = function (lineData) {\n const { cornerPointPositions } = extractCornerPoints(lineData);\n const newLineData = [];\n for (let i = 0; i < lineData.length; i++) {\n if (cornerPointPositions.includes(i)) {\n const prevPoint = lineData[i - 1];\n const nextPoint = lineData[i + 1];\n const cornerPoint = lineData[i];\n\n const newPrevPoint = findAdjacentPoint(prevPoint, cornerPoint, 5);\n const newNextPoint = findAdjacentPoint(nextPoint, cornerPoint, 5);\n\n const xDiff = newNextPoint.x - newPrevPoint.x;\n const yDiff = newNextPoint.y - newPrevPoint.y;\n newLineData.push(newPrevPoint);\n\n const a = Math.sqrt(2) * 2;\n let newCornerPoint = { x: cornerPoint.x, y: cornerPoint.y };\n if (Math.abs(nextPoint.x - prevPoint.x) > 10 && Math.abs(nextPoint.y - prevPoint.y) >= 10) {\n log.debug(\n 'Corner point fixing',\n Math.abs(nextPoint.x - prevPoint.x),\n Math.abs(nextPoint.y - prevPoint.y)\n );\n const r = 5;\n if (cornerPoint.x === newPrevPoint.x) {\n newCornerPoint = {\n x: xDiff < 0 ? newPrevPoint.x - r + a : newPrevPoint.x + r - a,\n y: yDiff < 0 ? newPrevPoint.y - a : newPrevPoint.y + a,\n };\n } else {\n newCornerPoint = {\n x: xDiff < 0 ? newPrevPoint.x - a : newPrevPoint.x + a,\n y: yDiff < 0 ? newPrevPoint.y - r + a : newPrevPoint.y + r - a,\n };\n }\n } else {\n log.debug(\n 'Corner point skipping fixing',\n Math.abs(nextPoint.x - prevPoint.x),\n Math.abs(nextPoint.y - prevPoint.y)\n );\n }\n newLineData.push(newCornerPoint, newNextPoint);\n } else {\n newLineData.push(lineData[i]);\n }\n }\n return newLineData;\n};\n\nexport const insertEdge = function (elem, edge, clusterDb, diagramType, startNode, endNode, id) {\n const { handDrawnSeed } = getConfig();\n let points = edge.points;\n let pointsHasChanged = false;\n const tail = startNode;\n var head = endNode;\n\n if (head.intersect && tail.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n log.debug(\n 'Last point APA12',\n edge.start,\n '-->',\n edge.end,\n points[points.length - 1],\n head,\n head.intersect(points[points.length - 1])\n );\n points.push(head.intersect(points[points.length - 1]));\n }\n if (edge.toCluster) {\n log.info('to cluster abc88', clusterDb.get(edge.toCluster));\n points = cutPathAtIntersect(edge.points, clusterDb.get(edge.toCluster).node);\n\n pointsHasChanged = true;\n }\n\n if (edge.fromCluster) {\n log.debug(\n 'from cluster abc88',\n clusterDb.get(edge.fromCluster),\n JSON.stringify(points, null, 2)\n );\n points = cutPathAtIntersect(points.reverse(), clusterDb.get(edge.fromCluster).node).reverse();\n\n pointsHasChanged = true;\n }\n\n let lineData = points.filter((p) => !Number.isNaN(p.y));\n lineData = fixCorners(lineData);\n let curve = curveBasis;\n if (edge.curve) {\n curve = edge.curve;\n }\n\n const { x, y } = getLineFunctionsWithOffset(edge);\n const lineFunction = line().x(x).y(y).curve(curve);\n\n let strokeClasses;\n switch (edge.thickness) {\n case 'normal':\n strokeClasses = 'edge-thickness-normal';\n break;\n case 'thick':\n strokeClasses = 'edge-thickness-thick';\n break;\n case 'invisible':\n strokeClasses = 'edge-thickness-invisible';\n break;\n default:\n strokeClasses = 'edge-thickness-normal';\n }\n switch (edge.pattern) {\n case 'solid':\n strokeClasses += ' edge-pattern-solid';\n break;\n case 'dotted':\n strokeClasses += ' edge-pattern-dotted';\n break;\n case 'dashed':\n strokeClasses += ' edge-pattern-dashed';\n break;\n default:\n strokeClasses += ' edge-pattern-solid';\n }\n let svgPath;\n let linePath = lineFunction(lineData);\n const edgeStyles = Array.isArray(edge.style) ? edge.style : [edge.style];\n if (edge.look === 'handDrawn') {\n const rc = rough.svg(elem);\n Object.assign([], lineData);\n\n const svgPathNode = rc.path(linePath, {\n roughness: 0.3,\n seed: handDrawnSeed,\n });\n\n strokeClasses += ' transition';\n\n svgPath = select(svgPathNode)\n .select('path')\n .attr('id', edge.id)\n .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))\n .attr('style', edgeStyles ? edgeStyles.reduce((acc, style) => acc + ';' + style, '') : '');\n let d = svgPath.attr('d');\n svgPath.attr('d', d);\n elem.node().appendChild(svgPath.node());\n } else {\n svgPath = elem\n .append('path')\n .attr('d', linePath)\n .attr('id', edge.id)\n .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))\n .attr('style', edgeStyles ? edgeStyles.reduce((acc, style) => acc + ';' + style, '') : '');\n }\n\n // DEBUG code, DO NOT REMOVE\n // adds a red circle at each edge coordinate\n // cornerPoints.forEach((point) => {\n // elem\n // .append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 3)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n // lineData.forEach((point) => {\n // elem\n // .append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 3)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n\n let url = '';\n if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(').replace(/\\)/g, '\\\\)');\n }\n log.info('arrowTypeStart', edge.arrowTypeStart);\n log.info('arrowTypeEnd', edge.arrowTypeEnd);\n\n addEdgeMarkers(svgPath, edge, url, id, diagramType);\n\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n};\n", "/** Setup arrow head and define the marker. The result is appended to the svg. */\nimport { log } from '../../logger.js';\n\n// Only add the number of markers that the diagram needs\nconst insertMarkers = (elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n};\n\nconst extension = (elem, type, id) => {\n log.trace('Making markers for ', id);\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionStart')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionEnd')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n};\n\nconst composition = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionStart')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionEnd')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst aggregation = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationStart')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationEnd')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst dependency = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyStart')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 6)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyEnd')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\nconst lollipop = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopStart')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopEnd')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n};\nconst point = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 5)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 8)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 4.5)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 8)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 5 L 10 10 L 10 0 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst circle = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 11)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', -1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst cross = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossEnd')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', 12)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossStart')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', -1)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n};\nconst barb = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-barbEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 14)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n// TODO rename the class diagram markers to something shape descriptive and semantic free\nconst markers = {\n extension,\n composition,\n aggregation,\n dependency,\n lollipop,\n point,\n circle,\n cross,\n barb,\n};\nexport default insertMarkers;\n", "import { log } from '../../logger.js';\nimport { shapes } from './shapes.js';\nimport type { Node, NonClusterNode, ShapeRenderOptions } from '../types.js';\nimport type { SVGGroup } from '../../mermaid.js';\nimport type { D3Selection } from '../../types.js';\nimport type { graphlib } from 'dagre-d3-es';\n\ntype ShapeHandler = (typeof shapes)[keyof typeof shapes];\ntype NodeElement = D3Selection | Awaited>;\n\nconst nodeElems = new Map();\n\nexport async function insertNode(\n elem: SVGGroup,\n node: NonClusterNode,\n renderOptions: ShapeRenderOptions\n) {\n let newEl: NodeElement | undefined;\n let el;\n\n //special check for rect shape (with or without rounded corners)\n if (node.shape === 'rect') {\n if (node.rx && node.ry) {\n node.shape = 'roundedRect';\n } else {\n node.shape = 'squareRect';\n }\n }\n\n const shapeHandler = node.shape ? shapes[node.shape] : undefined;\n\n if (!shapeHandler) {\n throw new Error(`No such shape: ${node.shape}. Please check your syntax.`);\n }\n\n if (node.link) {\n // Add link when appropriate\n let target;\n if (renderOptions.config.securityLevel === 'sandbox') {\n target = '_top';\n } else if (node.linkTarget) {\n target = node.linkTarget || '_blank';\n }\n newEl = elem\n .insert('svg:a')\n .attr('xlink:href', node.link)\n .attr('target', target ?? null);\n el = await shapeHandler(newEl, node, renderOptions);\n } else {\n el = await shapeHandler(elem, node, renderOptions);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr('title', node.tooltip);\n }\n\n nodeElems.set(node.id, newEl);\n\n if (node.haveCallback) {\n newEl.attr('class', newEl.attr('class') + ' clickable');\n }\n return newEl;\n}\n\nexport const setNodeElem = (elem: NodeElement, node: Pick) => {\n nodeElems.set(node.id, elem);\n};\n\nexport const clear = () => {\n nodeElems.clear();\n};\n\nexport const positionNode = (node: ReturnType) => {\n const el = nodeElems.get(node.id)!;\n log.trace(\n 'Transforming node',\n node.diff,\n node,\n 'translate(' + (node.x - node.width / 2 - 5) + ', ' + node.width / 2 + ')'\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n 'transform',\n 'translate(' +\n (node.x + diff - node.width / 2) +\n ', ' +\n (node.y - node.height / 2 - padding) +\n ')'\n );\n } else {\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n }\n return diff;\n};\n", "import { getConfig } from './config.js';\nimport common from './diagrams/common/common.js';\nimport { log } from './logger.js';\nimport { insertCluster } from './rendering-util/rendering-elements/clusters.js';\nimport {\n insertEdge,\n insertEdgeLabel,\n positionEdgeLabel,\n} from './rendering-util/rendering-elements/edges.js';\nimport insertMarkers from './rendering-util/rendering-elements/markers.js';\nimport { insertNode } from './rendering-util/rendering-elements/nodes.js';\nimport { labelHelper } from './rendering-util/rendering-elements/shapes/util.js';\nimport { interpolateToCurve } from './utils.js';\n\n/**\n * Internal helpers for mermaid\n * @deprecated - This should not be used by external packages, as the definitions will change without notice.\n */\nexport const internalHelpers = {\n common,\n getConfig,\n insertCluster,\n insertEdge,\n insertEdgeLabel,\n insertMarkers,\n insertNode,\n interpolateToCurve,\n labelHelper,\n log,\n positionEdgeLabel,\n};\n\nexport type InternalHelpers = typeof internalHelpers;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n", "import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n", "import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n", "import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n", "import toNumber from './toNumber.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nexport default toFinite;\n", "import toFinite from './toFinite.js';\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nexport default toInteger;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nexport default noop;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEach;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default baseFindIndex;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nexport default baseIsNaN;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nexport default strictIndexOf;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictIndexOf from './_strictIndexOf.js';\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nexport default baseIndexOf;\n", "import baseIndexOf from './_baseIndexOf.js';\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nexport default arrayIncludes;\n", "import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n", "import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n", "import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n", "import assignValue from './_assignValue.js';\nimport copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport isArrayLike from './isArrayLike.js';\nimport isPrototype from './_isPrototype.js';\nimport keys from './keys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nexport default assign;\n", "import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nexport default isKey;\n", "import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nexport default memoizeCapped;\n", "import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nexport default stringToPath;\n", "import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n", "import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n", "import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default toKey;\n", "import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nexport default baseGet;\n", "import baseGet from './_baseGet.js';\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n", "import Symbol from './_Symbol.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nexport default isFlattenable;\n", "import arrayPush from './_arrayPush.js';\nimport isFlattenable from './_isFlattenable.js';\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nexport default baseFlatten;\n", "import baseFlatten from './_baseFlatten.js';\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nexport default flatten;\n", "import flatten from './flatten.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nexport default flatRest;\n", "/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexport default baseSlice;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nexport default hasUnicode;\n", "/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nexport default arrayReduce;\n", "import copyObject from './_copyObject.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nexport default baseAssign;\n", "import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nexport default baseAssignIn;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n", "import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n", "import copyObject from './_copyObject.js';\nimport getSymbols from './_getSymbols.js';\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nexport default copySymbols;\n", "import arrayPush from './_arrayPush.js';\nimport getPrototype from './_getPrototype.js';\nimport getSymbols from './_getSymbols.js';\nimport stubArray from './stubArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nexport default getSymbolsIn;\n", "import copyObject from './_copyObject.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nexport default copySymbolsIn;\n", "import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n", "import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n", "import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nexport default getAllKeysIn;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n", "import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nexport default initCloneArray;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nexport default cloneDataView;\n", "/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nexport default cloneRegExp;\n", "import Symbol from './_Symbol.js';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nexport default cloneSymbol;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\nimport cloneDataView from './_cloneDataView.js';\nimport cloneRegExp from './_cloneRegExp.js';\nimport cloneSymbol from './_cloneSymbol.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nexport default initCloneByTag;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nexport default baseIsMap;\n", "import baseIsMap from './_baseIsMap.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nexport default isMap;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nexport default baseIsSet;\n", "import baseIsSet from './_baseIsSet.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nexport default isSet;\n", "import Stack from './_Stack.js';\nimport arrayEach from './_arrayEach.js';\nimport assignValue from './_assignValue.js';\nimport baseAssign from './_baseAssign.js';\nimport baseAssignIn from './_baseAssignIn.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport copyArray from './_copyArray.js';\nimport copySymbols from './_copySymbols.js';\nimport copySymbolsIn from './_copySymbolsIn.js';\nimport getAllKeys from './_getAllKeys.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\nimport getTag from './_getTag.js';\nimport initCloneArray from './_initCloneArray.js';\nimport initCloneByTag from './_initCloneByTag.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isMap from './isMap.js';\nimport isObject from './isObject.js';\nimport isSet from './isSet.js';\nimport keys from './keys.js';\nimport keysIn from './keysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nexport default baseClone;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nexport default cloneDeep;\n", "/**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\nfunction compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default compact;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n", "import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n", "import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n", "import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n", "import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n", "import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n", "import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n", "import Stack from './_Stack.js';\nimport baseIsEqual from './_baseIsEqual.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nexport default baseIsMatch;\n", "import isObject from './isObject.js';\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nexport default isStrictComparable;\n", "import isStrictComparable from './_isStrictComparable.js';\nimport keys from './keys.js';\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nexport default getMatchData;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nexport default matchesStrictComparable;\n", "import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nexport default baseMatches;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nexport default baseHasIn;\n", "import castPath from './_castPath.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isIndex from './_isIndex.js';\nimport isLength from './isLength.js';\nimport toKey from './_toKey.js';\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nexport default hasPath;\n", "import baseHasIn from './_baseHasIn.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nexport default hasIn;\n", "import baseIsEqual from './_baseIsEqual.js';\nimport get from './get.js';\nimport hasIn from './hasIn.js';\nimport isKey from './_isKey.js';\nimport isStrictComparable from './_isStrictComparable.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\nimport toKey from './_toKey.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nexport default baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default baseProperty;\n", "import baseGet from './_baseGet.js';\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nexport default basePropertyDeep;\n", "import baseProperty from './_baseProperty.js';\nimport basePropertyDeep from './_basePropertyDeep.js';\nimport isKey from './_isKey.js';\nimport toKey from './_toKey.js';\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nexport default property;\n", "import baseMatches from './_baseMatches.js';\nimport baseMatchesProperty from './_baseMatchesProperty.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\nimport property from './property.js';\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nexport default baseIteratee;\n", "/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nexport default arrayAggregator;\n", "import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n", "import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n", "import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n", "import baseEach from './_baseEach.js';\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nexport default baseAggregator;\n", "import arrayAggregator from './_arrayAggregator.js';\nimport baseAggregator from './_baseAggregator.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nexport default createAggregator;\n", "import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n", "import baseRest from './_baseRest.js';\nimport eq from './eq.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport keysIn from './keysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nexport default defaults;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nexport default arrayIncludesWith;\n", "import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport arrayMap from './_arrayMap.js';\nimport baseUnary from './_baseUnary.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseDifference;\n", "import baseDifference from './_baseDifference.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nexport default difference;\n", "/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nexport default last;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n}\n\nexport default drop;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nexport default dropRight;\n", "import identity from './identity.js';\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nexport default castFunction;\n", "import arrayEach from './_arrayEach.js';\nimport baseEach from './_baseEach.js';\nimport castFunction from './_castFunction.js';\nimport isArray from './isArray.js';\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nexport default forEach;\n", "export { default } from './forEach.js'\n", "/**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\nfunction arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n}\n\nexport default arrayEvery;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\nfunction baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n}\n\nexport default baseEvery;\n", "import arrayEvery from './_arrayEvery.js';\nimport baseEvery from './_baseEvery.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default every;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nexport default baseFilter;\n", "import arrayFilter from './_arrayFilter.js';\nimport baseFilter from './_baseFilter.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default filter;\n", "import baseIteratee from './_baseIteratee.js';\nimport isArrayLike from './isArrayLike.js';\nimport keys from './keys.js';\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nexport default createFind;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIteratee from './_baseIteratee.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nexport default findIndex;\n", "import createFind from './_createFind.js';\nimport findIndex from './findIndex.js';\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nexport default find;\n", "/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nexport default head;\n", "export { default } from './head.js'\n", "import baseEach from './_baseEach.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nexport default baseMap;\n", "import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nexport default map;\n", "import baseFlatten from './_baseFlatten.js';\nimport map from './map.js';\n\n/**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nfunction flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n}\n\nexport default flatMap;\n", "import baseFor from './_baseFor.js';\nimport castFunction from './_castFunction.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\nfunction forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, castFunction(iteratee), keysIn);\n}\n\nexport default forIn;\n", "import baseForOwn from './_baseForOwn.js';\nimport castFunction from './_castFunction.js';\n\n/**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forOwn(object, iteratee) {\n return object && baseForOwn(object, castFunction(iteratee));\n}\n\nexport default forOwn;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nexport default groupBy;\n", "/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\nfunction baseGt(value, other) {\n return value > other;\n}\n\nexport default baseGt;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nexport default baseHas;\n", "import baseHas from './_baseHas.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nexport default has;\n", "import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n", "import arrayMap from './_arrayMap.js';\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n}\n\nexport default baseValues;\n", "import baseValues from './_baseValues.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n}\n\nexport default values;\n", "import baseIndexOf from './_baseIndexOf.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport toInteger from './toInteger.js';\nimport values from './values.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\nfunction includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n}\n\nexport default includes;\n", "import baseIndexOf from './_baseIndexOf.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\nfunction indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n}\n\nexport default indexOf;\n", "import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLike from './isArrayLike.js';\nimport isBuffer from './isBuffer.js';\nimport isPrototype from './_isPrototype.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar regexpTag = '[object RegExp]';\n\n/**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\nfunction baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n}\n\nexport default baseIsRegExp;\n", "import baseIsRegExp from './_baseIsRegExp.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;\n\n/**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\nvar isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\nexport default isRegExp;\n", "/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nexport default isUndefined;\n", "/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value, other) {\n return value < other;\n}\n\nexport default baseLt;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nexport default mapValues;\n", "import isSymbol from './isSymbol.js';\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n}\n\nexport default baseExtremum;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseGt from './_baseGt.js';\nimport identity from './identity.js';\n\n/**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\nfunction max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n}\n\nexport default max;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseLt from './_baseLt.js';\nimport identity from './identity.js';\n\n/**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\nfunction min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n}\n\nexport default min;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseLt from './_baseLt.js';\n\n/**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nfunction minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)\n : undefined;\n}\n\nexport default minBy;\n", "/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\nfunction negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n}\n\nexport default negate;\n", "import assignValue from './_assignValue.js';\nimport castPath from './_castPath.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nexport default baseSet;\n", "import baseGet from './_baseGet.js';\nimport baseSet from './_baseSet.js';\nimport castPath from './_castPath.js';\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nexport default basePickBy;\n", "import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport basePickBy from './_basePickBy.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\n\n/**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\nfunction pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = baseIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n}\n\nexport default pickBy;\n", "/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nexport default baseSortBy;\n", "import isSymbol from './isSymbol.js';\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nexport default compareAscending;\n", "import compareAscending from './_compareAscending.js';\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nexport default compareMultiple;\n", "import arrayMap from './_arrayMap.js';\nimport baseGet from './_baseGet.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport baseSortBy from './_baseSortBy.js';\nimport baseUnary from './_baseUnary.js';\nimport compareMultiple from './_compareMultiple.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nexport default baseOrderBy;\n", "import baseProperty from './_baseProperty.js';\n\n/**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nvar asciiSize = baseProperty('length');\n\nexport default asciiSize;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nfunction unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n}\n\nexport default unicodeSize;\n", "import asciiSize from './_asciiSize.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeSize from './_unicodeSize.js';\n\n/**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\nfunction stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n}\n\nexport default stringSize;\n", "import basePickBy from './_basePickBy.js';\nimport hasIn from './hasIn.js';\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nexport default basePick;\n", "import basePick from './_basePick.js';\nimport flatRest from './_flatRest.js';\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nexport default pick;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nexport default baseRange;\n", "import baseRange from './_baseRange.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toFinite from './toFinite.js';\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nexport default createRange;\n", "import createRange from './_createRange.js';\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nexport default range;\n", "/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n}\n\nexport default baseReduce;\n", "import arrayReduce from './_arrayReduce.js';\nimport baseEach from './_baseEach.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseReduce from './_baseReduce.js';\nimport isArray from './isArray.js';\n\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\nfunction reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\n\nexport default reduce;\n", "import arrayFilter from './_arrayFilter.js';\nimport baseFilter from './_baseFilter.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\nimport negate from './negate.js';\n\n/**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\nfunction reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(baseIteratee(predicate, 3)));\n}\n\nexport default reject;\n", "import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport stringSize from './_stringSize.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\nfunction size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n}\n\nexport default size;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n}\n\nexport default baseSome;\n", "import arraySome from './_arraySome.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseSome from './_baseSome.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\nfunction some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default some;\n", "import baseFlatten from './_baseFlatten.js';\nimport baseOrderBy from './_baseOrderBy.js';\nimport baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nexport default sortBy;\n", "import Set from './_Set.js';\nimport noop from './noop.js';\nimport setToArray from './_setToArray.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nexport default createSet;\n", "import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport cacheHas from './_cacheHas.js';\nimport createSet from './_createSet.js';\nimport setToArray from './_setToArray.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseUniq;\n", "import baseFlatten from './_baseFlatten.js';\nimport baseRest from './_baseRest.js';\nimport baseUniq from './_baseUniq.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nexport default union;\n", "import baseUniq from './_baseUniq.js';\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nexport default uniq;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseUniq from './_baseUniq.js';\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nexport default uniqBy;\n", "import toString from './toString.js';\n\n/** Used to generate unique IDs. */\nvar idCounter = 0;\n\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\nfunction uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n}\n\nexport default uniqueId;\n", "/**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\nfunction baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n}\n\nexport default baseZipObject;\n", "import assignValue from './_assignValue.js';\nimport baseZipObject from './_baseZipObject.js';\n\n/**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n}\n\nexport default zipObject;\n", "/**\n * @license\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"es\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\nexport { default as add } from './add.js';\nexport { default as after } from './after.js';\nexport { default as ary } from './ary.js';\nexport { default as assign } from './assign.js';\nexport { default as assignIn } from './assignIn.js';\nexport { default as assignInWith } from './assignInWith.js';\nexport { default as assignWith } from './assignWith.js';\nexport { default as at } from './at.js';\nexport { default as attempt } from './attempt.js';\nexport { default as before } from './before.js';\nexport { default as bind } from './bind.js';\nexport { default as bindAll } from './bindAll.js';\nexport { default as bindKey } from './bindKey.js';\nexport { default as camelCase } from './camelCase.js';\nexport { default as capitalize } from './capitalize.js';\nexport { default as castArray } from './castArray.js';\nexport { default as ceil } from './ceil.js';\nexport { default as chain } from './chain.js';\nexport { default as chunk } from './chunk.js';\nexport { default as clamp } from './clamp.js';\nexport { default as clone } from './clone.js';\nexport { default as cloneDeep } from './cloneDeep.js';\nexport { default as cloneDeepWith } from './cloneDeepWith.js';\nexport { default as cloneWith } from './cloneWith.js';\nexport { default as commit } from './commit.js';\nexport { default as compact } from './compact.js';\nexport { default as concat } from './concat.js';\nexport { default as cond } from './cond.js';\nexport { default as conforms } from './conforms.js';\nexport { default as conformsTo } from './conformsTo.js';\nexport { default as constant } from './constant.js';\nexport { default as countBy } from './countBy.js';\nexport { default as create } from './create.js';\nexport { default as curry } from './curry.js';\nexport { default as curryRight } from './curryRight.js';\nexport { default as debounce } from './debounce.js';\nexport { default as deburr } from './deburr.js';\nexport { default as defaultTo } from './defaultTo.js';\nexport { default as defaults } from './defaults.js';\nexport { default as defaultsDeep } from './defaultsDeep.js';\nexport { default as defer } from './defer.js';\nexport { default as delay } from './delay.js';\nexport { default as difference } from './difference.js';\nexport { default as differenceBy } from './differenceBy.js';\nexport { default as differenceWith } from './differenceWith.js';\nexport { default as divide } from './divide.js';\nexport { default as drop } from './drop.js';\nexport { default as dropRight } from './dropRight.js';\nexport { default as dropRightWhile } from './dropRightWhile.js';\nexport { default as dropWhile } from './dropWhile.js';\nexport { default as each } from './each.js';\nexport { default as eachRight } from './eachRight.js';\nexport { default as endsWith } from './endsWith.js';\nexport { default as entries } from './entries.js';\nexport { default as entriesIn } from './entriesIn.js';\nexport { default as eq } from './eq.js';\nexport { default as escape } from './escape.js';\nexport { default as escapeRegExp } from './escapeRegExp.js';\nexport { default as every } from './every.js';\nexport { default as extend } from './extend.js';\nexport { default as extendWith } from './extendWith.js';\nexport { default as fill } from './fill.js';\nexport { default as filter } from './filter.js';\nexport { default as find } from './find.js';\nexport { default as findIndex } from './findIndex.js';\nexport { default as findKey } from './findKey.js';\nexport { default as findLast } from './findLast.js';\nexport { default as findLastIndex } from './findLastIndex.js';\nexport { default as findLastKey } from './findLastKey.js';\nexport { default as first } from './first.js';\nexport { default as flatMap } from './flatMap.js';\nexport { default as flatMapDeep } from './flatMapDeep.js';\nexport { default as flatMapDepth } from './flatMapDepth.js';\nexport { default as flatten } from './flatten.js';\nexport { default as flattenDeep } from './flattenDeep.js';\nexport { default as flattenDepth } from './flattenDepth.js';\nexport { default as flip } from './flip.js';\nexport { default as floor } from './floor.js';\nexport { default as flow } from './flow.js';\nexport { default as flowRight } from './flowRight.js';\nexport { default as forEach } from './forEach.js';\nexport { default as forEachRight } from './forEachRight.js';\nexport { default as forIn } from './forIn.js';\nexport { default as forInRight } from './forInRight.js';\nexport { default as forOwn } from './forOwn.js';\nexport { default as forOwnRight } from './forOwnRight.js';\nexport { default as fromPairs } from './fromPairs.js';\nexport { default as functions } from './functions.js';\nexport { default as functionsIn } from './functionsIn.js';\nexport { default as get } from './get.js';\nexport { default as groupBy } from './groupBy.js';\nexport { default as gt } from './gt.js';\nexport { default as gte } from './gte.js';\nexport { default as has } from './has.js';\nexport { default as hasIn } from './hasIn.js';\nexport { default as head } from './head.js';\nexport { default as identity } from './identity.js';\nexport { default as inRange } from './inRange.js';\nexport { default as includes } from './includes.js';\nexport { default as indexOf } from './indexOf.js';\nexport { default as initial } from './initial.js';\nexport { default as intersection } from './intersection.js';\nexport { default as intersectionBy } from './intersectionBy.js';\nexport { default as intersectionWith } from './intersectionWith.js';\nexport { default as invert } from './invert.js';\nexport { default as invertBy } from './invertBy.js';\nexport { default as invoke } from './invoke.js';\nexport { default as invokeMap } from './invokeMap.js';\nexport { default as isArguments } from './isArguments.js';\nexport { default as isArray } from './isArray.js';\nexport { default as isArrayBuffer } from './isArrayBuffer.js';\nexport { default as isArrayLike } from './isArrayLike.js';\nexport { default as isArrayLikeObject } from './isArrayLikeObject.js';\nexport { default as isBoolean } from './isBoolean.js';\nexport { default as isBuffer } from './isBuffer.js';\nexport { default as isDate } from './isDate.js';\nexport { default as isElement } from './isElement.js';\nexport { default as isEmpty } from './isEmpty.js';\nexport { default as isEqual } from './isEqual.js';\nexport { default as isEqualWith } from './isEqualWith.js';\nexport { default as isError } from './isError.js';\nexport { default as isFinite } from './isFinite.js';\nexport { default as isFunction } from './isFunction.js';\nexport { default as isInteger } from './isInteger.js';\nexport { default as isLength } from './isLength.js';\nexport { default as isMap } from './isMap.js';\nexport { default as isMatch } from './isMatch.js';\nexport { default as isMatchWith } from './isMatchWith.js';\nexport { default as isNaN } from './isNaN.js';\nexport { default as isNative } from './isNative.js';\nexport { default as isNil } from './isNil.js';\nexport { default as isNull } from './isNull.js';\nexport { default as isNumber } from './isNumber.js';\nexport { default as isObject } from './isObject.js';\nexport { default as isObjectLike } from './isObjectLike.js';\nexport { default as isPlainObject } from './isPlainObject.js';\nexport { default as isRegExp } from './isRegExp.js';\nexport { default as isSafeInteger } from './isSafeInteger.js';\nexport { default as isSet } from './isSet.js';\nexport { default as isString } from './isString.js';\nexport { default as isSymbol } from './isSymbol.js';\nexport { default as isTypedArray } from './isTypedArray.js';\nexport { default as isUndefined } from './isUndefined.js';\nexport { default as isWeakMap } from './isWeakMap.js';\nexport { default as isWeakSet } from './isWeakSet.js';\nexport { default as iteratee } from './iteratee.js';\nexport { default as join } from './join.js';\nexport { default as kebabCase } from './kebabCase.js';\nexport { default as keyBy } from './keyBy.js';\nexport { default as keys } from './keys.js';\nexport { default as keysIn } from './keysIn.js';\nexport { default as last } from './last.js';\nexport { default as lastIndexOf } from './lastIndexOf.js';\nexport { default as lodash } from './wrapperLodash.js';\nexport { default as lowerCase } from './lowerCase.js';\nexport { default as lowerFirst } from './lowerFirst.js';\nexport { default as lt } from './lt.js';\nexport { default as lte } from './lte.js';\nexport { default as map } from './map.js';\nexport { default as mapKeys } from './mapKeys.js';\nexport { default as mapValues } from './mapValues.js';\nexport { default as matches } from './matches.js';\nexport { default as matchesProperty } from './matchesProperty.js';\nexport { default as max } from './max.js';\nexport { default as maxBy } from './maxBy.js';\nexport { default as mean } from './mean.js';\nexport { default as meanBy } from './meanBy.js';\nexport { default as memoize } from './memoize.js';\nexport { default as merge } from './merge.js';\nexport { default as mergeWith } from './mergeWith.js';\nexport { default as method } from './method.js';\nexport { default as methodOf } from './methodOf.js';\nexport { default as min } from './min.js';\nexport { default as minBy } from './minBy.js';\nexport { default as mixin } from './mixin.js';\nexport { default as multiply } from './multiply.js';\nexport { default as negate } from './negate.js';\nexport { default as next } from './next.js';\nexport { default as noop } from './noop.js';\nexport { default as now } from './now.js';\nexport { default as nth } from './nth.js';\nexport { default as nthArg } from './nthArg.js';\nexport { default as omit } from './omit.js';\nexport { default as omitBy } from './omitBy.js';\nexport { default as once } from './once.js';\nexport { default as orderBy } from './orderBy.js';\nexport { default as over } from './over.js';\nexport { default as overArgs } from './overArgs.js';\nexport { default as overEvery } from './overEvery.js';\nexport { default as overSome } from './overSome.js';\nexport { default as pad } from './pad.js';\nexport { default as padEnd } from './padEnd.js';\nexport { default as padStart } from './padStart.js';\nexport { default as parseInt } from './parseInt.js';\nexport { default as partial } from './partial.js';\nexport { default as partialRight } from './partialRight.js';\nexport { default as partition } from './partition.js';\nexport { default as pick } from './pick.js';\nexport { default as pickBy } from './pickBy.js';\nexport { default as plant } from './plant.js';\nexport { default as property } from './property.js';\nexport { default as propertyOf } from './propertyOf.js';\nexport { default as pull } from './pull.js';\nexport { default as pullAll } from './pullAll.js';\nexport { default as pullAllBy } from './pullAllBy.js';\nexport { default as pullAllWith } from './pullAllWith.js';\nexport { default as pullAt } from './pullAt.js';\nexport { default as random } from './random.js';\nexport { default as range } from './range.js';\nexport { default as rangeRight } from './rangeRight.js';\nexport { default as rearg } from './rearg.js';\nexport { default as reduce } from './reduce.js';\nexport { default as reduceRight } from './reduceRight.js';\nexport { default as reject } from './reject.js';\nexport { default as remove } from './remove.js';\nexport { default as repeat } from './repeat.js';\nexport { default as replace } from './replace.js';\nexport { default as rest } from './rest.js';\nexport { default as result } from './result.js';\nexport { default as reverse } from './reverse.js';\nexport { default as round } from './round.js';\nexport { default as sample } from './sample.js';\nexport { default as sampleSize } from './sampleSize.js';\nexport { default as set } from './set.js';\nexport { default as setWith } from './setWith.js';\nexport { default as shuffle } from './shuffle.js';\nexport { default as size } from './size.js';\nexport { default as slice } from './slice.js';\nexport { default as snakeCase } from './snakeCase.js';\nexport { default as some } from './some.js';\nexport { default as sortBy } from './sortBy.js';\nexport { default as sortedIndex } from './sortedIndex.js';\nexport { default as sortedIndexBy } from './sortedIndexBy.js';\nexport { default as sortedIndexOf } from './sortedIndexOf.js';\nexport { default as sortedLastIndex } from './sortedLastIndex.js';\nexport { default as sortedLastIndexBy } from './sortedLastIndexBy.js';\nexport { default as sortedLastIndexOf } from './sortedLastIndexOf.js';\nexport { default as sortedUniq } from './sortedUniq.js';\nexport { default as sortedUniqBy } from './sortedUniqBy.js';\nexport { default as split } from './split.js';\nexport { default as spread } from './spread.js';\nexport { default as startCase } from './startCase.js';\nexport { default as startsWith } from './startsWith.js';\nexport { default as stubArray } from './stubArray.js';\nexport { default as stubFalse } from './stubFalse.js';\nexport { default as stubObject } from './stubObject.js';\nexport { default as stubString } from './stubString.js';\nexport { default as stubTrue } from './stubTrue.js';\nexport { default as subtract } from './subtract.js';\nexport { default as sum } from './sum.js';\nexport { default as sumBy } from './sumBy.js';\nexport { default as tail } from './tail.js';\nexport { default as take } from './take.js';\nexport { default as takeRight } from './takeRight.js';\nexport { default as takeRightWhile } from './takeRightWhile.js';\nexport { default as takeWhile } from './takeWhile.js';\nexport { default as tap } from './tap.js';\nexport { default as template } from './template.js';\nexport { default as templateSettings } from './templateSettings.js';\nexport { default as throttle } from './throttle.js';\nexport { default as thru } from './thru.js';\nexport { default as times } from './times.js';\nexport { default as toArray } from './toArray.js';\nexport { default as toFinite } from './toFinite.js';\nexport { default as toInteger } from './toInteger.js';\nexport { default as toIterator } from './toIterator.js';\nexport { default as toJSON } from './toJSON.js';\nexport { default as toLength } from './toLength.js';\nexport { default as toLower } from './toLower.js';\nexport { default as toNumber } from './toNumber.js';\nexport { default as toPairs } from './toPairs.js';\nexport { default as toPairsIn } from './toPairsIn.js';\nexport { default as toPath } from './toPath.js';\nexport { default as toPlainObject } from './toPlainObject.js';\nexport { default as toSafeInteger } from './toSafeInteger.js';\nexport { default as toString } from './toString.js';\nexport { default as toUpper } from './toUpper.js';\nexport { default as transform } from './transform.js';\nexport { default as trim } from './trim.js';\nexport { default as trimEnd } from './trimEnd.js';\nexport { default as trimStart } from './trimStart.js';\nexport { default as truncate } from './truncate.js';\nexport { default as unary } from './unary.js';\nexport { default as unescape } from './unescape.js';\nexport { default as union } from './union.js';\nexport { default as unionBy } from './unionBy.js';\nexport { default as unionWith } from './unionWith.js';\nexport { default as uniq } from './uniq.js';\nexport { default as uniqBy } from './uniqBy.js';\nexport { default as uniqWith } from './uniqWith.js';\nexport { default as uniqueId } from './uniqueId.js';\nexport { default as unset } from './unset.js';\nexport { default as unzip } from './unzip.js';\nexport { default as unzipWith } from './unzipWith.js';\nexport { default as update } from './update.js';\nexport { default as updateWith } from './updateWith.js';\nexport { default as upperCase } from './upperCase.js';\nexport { default as upperFirst } from './upperFirst.js';\nexport { default as value } from './value.js';\nexport { default as valueOf } from './valueOf.js';\nexport { default as values } from './values.js';\nexport { default as valuesIn } from './valuesIn.js';\nexport { default as without } from './without.js';\nexport { default as words } from './words.js';\nexport { default as wrap } from './wrap.js';\nexport { default as wrapperAt } from './wrapperAt.js';\nexport { default as wrapperChain } from './wrapperChain.js';\nexport { default as wrapperCommit } from './commit.js';\nexport { default as wrapperLodash } from './wrapperLodash.js';\nexport { default as wrapperNext } from './next.js';\nexport { default as wrapperPlant } from './plant.js';\nexport { default as wrapperReverse } from './wrapperReverse.js';\nexport { default as wrapperToIterator } from './toIterator.js';\nexport { default as wrapperValue } from './wrapperValue.js';\nexport { default as xor } from './xor.js';\nexport { default as xorBy } from './xorBy.js';\nexport { default as xorWith } from './xorWith.js';\nexport { default as zip } from './zip.js';\nexport { default as zipObject } from './zipObject.js';\nexport { default as zipObjectDeep } from './zipObjectDeep.js';\nexport { default as zipWith } from './zipWith.js';\nexport { default } from './lodash.default.js';\n", "import * as _ from 'lodash-es';\n\nvar DEFAULT_EDGE_NAME = '\\x00';\nvar GRAPH_NODE = '\\x00';\nvar EDGE_KEY_DELIM = '\\x01';\n\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\n\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\nexport class Graph {\n constructor(opts = {}) {\n this._isDirected = Object.prototype.hasOwnProperty.call(opts, 'directed')\n ? opts.directed\n : true;\n this._isMultigraph = Object.prototype.hasOwnProperty.call(opts, 'multigraph')\n ? opts.multigraph\n : false;\n this._isCompound = Object.prototype.hasOwnProperty.call(opts, 'compound')\n ? opts.compound\n : false;\n\n // Label for the graph itself\n this._label = undefined;\n\n // Defaults to be set when creating a new node\n this._defaultNodeLabelFn = _.constant(undefined);\n\n // Defaults to be set when creating a new edge\n this._defaultEdgeLabelFn = _.constant(undefined);\n\n // v -> label\n this._nodes = {};\n\n if (this._isCompound) {\n // v -> parent\n this._parent = {};\n\n // v -> children\n this._children = {};\n this._children[GRAPH_NODE] = {};\n }\n\n // v -> edgeObj\n this._in = {};\n\n // u -> v -> Number\n this._preds = {};\n\n // v -> edgeObj\n this._out = {};\n\n // v -> w -> Number\n this._sucs = {};\n\n // e -> edgeObj\n this._edgeObjs = {};\n\n // e -> label\n this._edgeLabels = {};\n }\n /* === Graph functions ========= */\n isDirected() {\n return this._isDirected;\n }\n isMultigraph() {\n return this._isMultigraph;\n }\n isCompound() {\n return this._isCompound;\n }\n setGraph(label) {\n this._label = label;\n return this;\n }\n graph() {\n return this._label;\n }\n /* === Node functions ========== */\n setDefaultNodeLabel(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultNodeLabelFn = newDefault;\n return this;\n }\n nodeCount() {\n return this._nodeCount;\n }\n nodes() {\n return _.keys(this._nodes);\n }\n sources() {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._in[v]);\n });\n }\n sinks() {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._out[v]);\n });\n }\n setNodes(vs, value) {\n var args = arguments;\n var self = this;\n _.each(vs, function (v) {\n if (args.length > 1) {\n self.setNode(v, value);\n } else {\n self.setNode(v);\n }\n });\n return this;\n }\n setNode(v, value) {\n if (Object.prototype.hasOwnProperty.call(this._nodes, v)) {\n if (arguments.length > 1) {\n this._nodes[v] = value;\n }\n return this;\n }\n\n // @ts-expect-error\n this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);\n if (this._isCompound) {\n this._parent[v] = GRAPH_NODE;\n this._children[v] = {};\n this._children[GRAPH_NODE][v] = true;\n }\n this._in[v] = {};\n this._preds[v] = {};\n this._out[v] = {};\n this._sucs[v] = {};\n ++this._nodeCount;\n return this;\n }\n node(v) {\n return this._nodes[v];\n }\n hasNode(v) {\n return Object.prototype.hasOwnProperty.call(this._nodes, v);\n }\n removeNode(v) {\n if (Object.prototype.hasOwnProperty.call(this._nodes, v)) {\n var removeEdge = (e) => this.removeEdge(this._edgeObjs[e]);\n delete this._nodes[v];\n if (this._isCompound) {\n this._removeFromParentsChildList(v);\n delete this._parent[v];\n _.each(this.children(v), (child) => {\n this.setParent(child);\n });\n delete this._children[v];\n }\n _.each(_.keys(this._in[v]), removeEdge);\n delete this._in[v];\n delete this._preds[v];\n _.each(_.keys(this._out[v]), removeEdge);\n delete this._out[v];\n delete this._sucs[v];\n --this._nodeCount;\n }\n return this;\n }\n setParent(v, parent) {\n if (!this._isCompound) {\n throw new Error('Cannot set parent in a non-compound graph');\n }\n\n if (_.isUndefined(parent)) {\n parent = GRAPH_NODE;\n } else {\n // Coerce parent to string\n parent += '';\n for (var ancestor = parent; !_.isUndefined(ancestor); ancestor = this.parent(ancestor)) {\n if (ancestor === v) {\n throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle');\n }\n }\n\n this.setNode(parent);\n }\n\n this.setNode(v);\n this._removeFromParentsChildList(v);\n this._parent[v] = parent;\n this._children[parent][v] = true;\n return this;\n }\n _removeFromParentsChildList(v) {\n delete this._children[this._parent[v]][v];\n }\n parent(v) {\n if (this._isCompound) {\n var parent = this._parent[v];\n if (parent !== GRAPH_NODE) {\n return parent;\n }\n }\n }\n children(v) {\n if (_.isUndefined(v)) {\n v = GRAPH_NODE;\n }\n\n if (this._isCompound) {\n var children = this._children[v];\n if (children) {\n return _.keys(children);\n }\n } else if (v === GRAPH_NODE) {\n return this.nodes();\n } else if (this.hasNode(v)) {\n return [];\n }\n }\n predecessors(v) {\n var predsV = this._preds[v];\n if (predsV) {\n return _.keys(predsV);\n }\n }\n successors(v) {\n var sucsV = this._sucs[v];\n if (sucsV) {\n return _.keys(sucsV);\n }\n }\n neighbors(v) {\n var preds = this.predecessors(v);\n if (preds) {\n return _.union(preds, this.successors(v));\n }\n }\n isLeaf(v) {\n var neighbors;\n if (this.isDirected()) {\n neighbors = this.successors(v);\n } else {\n neighbors = this.neighbors(v);\n }\n return neighbors.length === 0;\n }\n filterNodes(filter) {\n // @ts-expect-error\n var copy = new this.constructor({\n directed: this._isDirected,\n multigraph: this._isMultigraph,\n compound: this._isCompound,\n });\n\n copy.setGraph(this.graph());\n\n var self = this;\n _.each(this._nodes, function (value, v) {\n if (filter(v)) {\n copy.setNode(v, value);\n }\n });\n\n _.each(this._edgeObjs, function (e) {\n // @ts-expect-error\n if (copy.hasNode(e.v) && copy.hasNode(e.w)) {\n copy.setEdge(e, self.edge(e));\n }\n });\n\n var parents = {};\n function findParent(v) {\n var parent = self.parent(v);\n if (parent === undefined || copy.hasNode(parent)) {\n parents[v] = parent;\n return parent;\n } else if (parent in parents) {\n return parents[parent];\n } else {\n return findParent(parent);\n }\n }\n\n if (this._isCompound) {\n _.each(copy.nodes(), function (v) {\n copy.setParent(v, findParent(v));\n });\n }\n\n return copy;\n }\n /* === Edge functions ========== */\n setDefaultEdgeLabel(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultEdgeLabelFn = newDefault;\n return this;\n }\n edgeCount() {\n return this._edgeCount;\n }\n edges() {\n return _.values(this._edgeObjs);\n }\n setPath(vs, value) {\n var self = this;\n var args = arguments;\n _.reduce(vs, function (v, w) {\n if (args.length > 1) {\n self.setEdge(v, w, value);\n } else {\n self.setEdge(v, w);\n }\n return w;\n });\n return this;\n }\n /*\n * setEdge(v, w, [value, [name]])\n * setEdge({ v, w, [name] }, [value])\n */\n setEdge() {\n var v, w, name, value;\n var valueSpecified = false;\n var arg0 = arguments[0];\n\n if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) {\n v = arg0.v;\n w = arg0.w;\n name = arg0.name;\n if (arguments.length === 2) {\n value = arguments[1];\n valueSpecified = true;\n }\n } else {\n v = arg0;\n w = arguments[1];\n name = arguments[3];\n if (arguments.length > 2) {\n value = arguments[2];\n valueSpecified = true;\n }\n }\n\n v = '' + v;\n w = '' + w;\n if (!_.isUndefined(name)) {\n name = '' + name;\n }\n\n var e = edgeArgsToId(this._isDirected, v, w, name);\n if (Object.prototype.hasOwnProperty.call(this._edgeLabels, e)) {\n if (valueSpecified) {\n this._edgeLabels[e] = value;\n }\n return this;\n }\n\n if (!_.isUndefined(name) && !this._isMultigraph) {\n throw new Error('Cannot set a named edge when isMultigraph = false');\n }\n\n // It didn't exist, so we need to create it.\n // First ensure the nodes exist.\n this.setNode(v);\n this.setNode(w);\n\n // @ts-expect-error\n this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);\n\n var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);\n // Ensure we add undirected edges in a consistent way.\n v = edgeObj.v;\n w = edgeObj.w;\n\n Object.freeze(edgeObj);\n this._edgeObjs[e] = edgeObj;\n incrementOrInitEntry(this._preds[w], v);\n incrementOrInitEntry(this._sucs[v], w);\n this._in[w][e] = edgeObj;\n this._out[v][e] = edgeObj;\n this._edgeCount++;\n return this;\n }\n edge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n return this._edgeLabels[e];\n }\n hasEdge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n return Object.prototype.hasOwnProperty.call(this._edgeLabels, e);\n }\n removeEdge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n var edge = this._edgeObjs[e];\n if (edge) {\n v = edge.v;\n w = edge.w;\n delete this._edgeLabels[e];\n delete this._edgeObjs[e];\n decrementOrRemoveEntry(this._preds[w], v);\n decrementOrRemoveEntry(this._sucs[v], w);\n delete this._in[w][e];\n delete this._out[v][e];\n this._edgeCount--;\n }\n return this;\n }\n inEdges(v, u) {\n var inV = this._in[v];\n if (inV) {\n var edges = _.values(inV);\n if (!u) {\n return edges;\n }\n return _.filter(edges, function (edge) {\n return edge.v === u;\n });\n }\n }\n outEdges(v, w) {\n var outV = this._out[v];\n if (outV) {\n var edges = _.values(outV);\n if (!w) {\n return edges;\n }\n return _.filter(edges, function (edge) {\n return edge.w === w;\n });\n }\n }\n nodeEdges(v, w) {\n var inEdges = this.inEdges(v, w);\n if (inEdges) {\n return inEdges.concat(this.outEdges(v, w));\n }\n }\n}\n\n/* Number of nodes in the graph. Should only be changed by the implementation. */\nGraph.prototype._nodeCount = 0;\n\n/* Number of edges in the graph. Should only be changed by the implementation. */\nGraph.prototype._edgeCount = 0;\n\nfunction incrementOrInitEntry(map, k) {\n if (map[k]) {\n map[k]++;\n } else {\n map[k] = 1;\n }\n}\n\nfunction decrementOrRemoveEntry(map, k) {\n if (!--map[k]) {\n delete map[k];\n }\n}\n\nfunction edgeArgsToId(isDirected, v_, w_, name) {\n var v = '' + v_;\n var w = '' + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name);\n}\n\nfunction edgeArgsToObj(isDirected, v_, w_, name) {\n var v = '' + v_;\n var w = '' + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n var edgeObj = { v: v, w: w };\n if (name) {\n edgeObj.name = name;\n }\n return edgeObj;\n}\n\nfunction edgeObjToId(isDirected, edgeObj) {\n return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);\n}\n", "// Includes only the \"core\" of graphlib\n\nimport { Graph } from './graph.js';\n\nconst version = '2.1.9-pre';\n\nexport { Graph, version };\n", "/*\n * Simple doubly linked list implementation derived from Cormen, et al.,\n * \"Introduction to Algorithms\".\n */\n\nexport { List };\n\nclass List {\n constructor() {\n var sentinel = {};\n sentinel._next = sentinel._prev = sentinel;\n this._sentinel = sentinel;\n }\n dequeue() {\n var sentinel = this._sentinel;\n var entry = sentinel._prev;\n if (entry !== sentinel) {\n unlink(entry);\n return entry;\n }\n }\n enqueue(entry) {\n var sentinel = this._sentinel;\n if (entry._prev && entry._next) {\n unlink(entry);\n }\n entry._next = sentinel._next;\n sentinel._next._prev = entry;\n sentinel._next = entry;\n entry._prev = sentinel;\n }\n toString() {\n var strs = [];\n var sentinel = this._sentinel;\n var curr = sentinel._prev;\n while (curr !== sentinel) {\n strs.push(JSON.stringify(curr, filterOutLinks));\n curr = curr._prev;\n }\n return '[' + strs.join(', ') + ']';\n }\n}\n\nfunction unlink(entry) {\n entry._prev._next = entry._next;\n entry._next._prev = entry._prev;\n delete entry._next;\n delete entry._prev;\n}\n\nfunction filterOutLinks(k, v) {\n if (k !== '_next' && k !== '_prev') {\n return v;\n }\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../graphlib/index.js';\nimport { List } from './data/list.js';\n\n/*\n * A greedy heuristic for finding a feedback arc set for a graph. A feedback\n * arc set is a set of edges that can be removed to make a graph acyclic.\n * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, \"A fast and\n * effective heuristic for the feedback arc set problem.\" This implementation\n * adjusts that from the paper to allow for weighted edges.\n */\nexport { greedyFAS };\n\nvar DEFAULT_WEIGHT_FN = _.constant(1);\n\nfunction greedyFAS(g, weightFn) {\n if (g.nodeCount() <= 1) {\n return [];\n }\n var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);\n var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);\n\n // Expand multi-edges\n return _.flatten(\n _.map(results, function (e) {\n return g.outEdges(e.v, e.w);\n }),\n );\n}\n\nfunction doGreedyFAS(g, buckets, zeroIdx) {\n var results = [];\n var sources = buckets[buckets.length - 1];\n var sinks = buckets[0];\n\n var entry;\n while (g.nodeCount()) {\n while ((entry = sinks.dequeue())) {\n removeNode(g, buckets, zeroIdx, entry);\n }\n while ((entry = sources.dequeue())) {\n removeNode(g, buckets, zeroIdx, entry);\n }\n if (g.nodeCount()) {\n for (var i = buckets.length - 2; i > 0; --i) {\n entry = buckets[i].dequeue();\n if (entry) {\n results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));\n break;\n }\n }\n }\n }\n\n return results;\n}\n\nfunction removeNode(g, buckets, zeroIdx, entry, collectPredecessors) {\n var results = collectPredecessors ? [] : undefined;\n\n _.forEach(g.inEdges(entry.v), function (edge) {\n var weight = g.edge(edge);\n var uEntry = g.node(edge.v);\n\n if (collectPredecessors) {\n results.push({ v: edge.v, w: edge.w });\n }\n\n uEntry.out -= weight;\n assignBucket(buckets, zeroIdx, uEntry);\n });\n\n _.forEach(g.outEdges(entry.v), function (edge) {\n var weight = g.edge(edge);\n var w = edge.w;\n var wEntry = g.node(w);\n wEntry['in'] -= weight;\n assignBucket(buckets, zeroIdx, wEntry);\n });\n\n g.removeNode(entry.v);\n\n return results;\n}\n\nfunction buildState(g, weightFn) {\n var fasGraph = new Graph();\n var maxIn = 0;\n var maxOut = 0;\n\n _.forEach(g.nodes(), function (v) {\n fasGraph.setNode(v, { v: v, in: 0, out: 0 });\n });\n\n // Aggregate weights on nodes, but also sum the weights across multi-edges\n // into a single edge for the fasGraph.\n _.forEach(g.edges(), function (e) {\n var prevWeight = fasGraph.edge(e.v, e.w) || 0;\n var weight = weightFn(e);\n var edgeWeight = prevWeight + weight;\n fasGraph.setEdge(e.v, e.w, edgeWeight);\n maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight));\n maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight));\n });\n\n var buckets = _.range(maxOut + maxIn + 3).map(function () {\n return new List();\n });\n var zeroIdx = maxIn + 1;\n\n _.forEach(fasGraph.nodes(), function (v) {\n assignBucket(buckets, zeroIdx, fasGraph.node(v));\n });\n\n return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx };\n}\n\nfunction assignBucket(buckets, zeroIdx, entry) {\n if (!entry.out) {\n buckets[0].enqueue(entry);\n } else if (!entry['in']) {\n buckets[buckets.length - 1].enqueue(entry);\n } else {\n buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry);\n }\n}\n", "import * as _ from 'lodash-es';\nimport { greedyFAS } from './greedy-fas.js';\n\nexport { run, undo };\n\nfunction run(g) {\n var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g);\n _.forEach(fas, function (e) {\n var label = g.edge(e);\n g.removeEdge(e);\n label.forwardName = e.name;\n label.reversed = true;\n g.setEdge(e.w, e.v, label, _.uniqueId('rev'));\n });\n\n function weightFn(g) {\n return function (e) {\n return g.edge(e).weight;\n };\n }\n}\n\nfunction dfsFAS(g) {\n var fas = [];\n var stack = {};\n var visited = {};\n\n function dfs(v) {\n if (Object.prototype.hasOwnProperty.call(visited, v)) {\n return;\n }\n visited[v] = true;\n stack[v] = true;\n _.forEach(g.outEdges(v), function (e) {\n if (Object.prototype.hasOwnProperty.call(stack, e.w)) {\n fas.push(e);\n } else {\n dfs(e.w);\n }\n });\n delete stack[v];\n }\n\n _.forEach(g.nodes(), dfs);\n return fas;\n}\n\nfunction undo(g) {\n _.forEach(g.edges(), function (e) {\n var label = g.edge(e);\n if (label.reversed) {\n g.removeEdge(e);\n\n var forwardName = label.forwardName;\n delete label.reversed;\n delete label.forwardName;\n g.setEdge(e.w, e.v, label, forwardName);\n }\n });\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../graphlib/index.js';\n\nexport {\n addDummyNode,\n simplify,\n asNonCompoundGraph,\n successorWeights,\n predecessorWeights,\n intersectRect,\n buildLayerMatrix,\n normalizeRanks,\n removeEmptyRanks,\n addBorderNode,\n maxRank,\n partition,\n time,\n notime,\n};\n\n/*\n * Adds a dummy node to the graph and return v.\n */\nfunction addDummyNode(g, type, attrs, name) {\n var v;\n do {\n v = _.uniqueId(name);\n } while (g.hasNode(v));\n\n attrs.dummy = type;\n g.setNode(v, attrs);\n return v;\n}\n\n/*\n * Returns a new graph with only simple edges. Handles aggregation of data\n * associated with multi-edges.\n */\nfunction simplify(g) {\n var simplified = new Graph().setGraph(g.graph());\n _.forEach(g.nodes(), function (v) {\n simplified.setNode(v, g.node(v));\n });\n _.forEach(g.edges(), function (e) {\n var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 };\n var label = g.edge(e);\n simplified.setEdge(e.v, e.w, {\n weight: simpleLabel.weight + label.weight,\n minlen: Math.max(simpleLabel.minlen, label.minlen),\n });\n });\n return simplified;\n}\n\nfunction asNonCompoundGraph(g) {\n var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph());\n _.forEach(g.nodes(), function (v) {\n if (!g.children(v).length) {\n simplified.setNode(v, g.node(v));\n }\n });\n _.forEach(g.edges(), function (e) {\n simplified.setEdge(e, g.edge(e));\n });\n return simplified;\n}\n\nfunction successorWeights(g) {\n var weightMap = _.map(g.nodes(), function (v) {\n var sucs = {};\n _.forEach(g.outEdges(v), function (e) {\n sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight;\n });\n return sucs;\n });\n return _.zipObject(g.nodes(), weightMap);\n}\n\nfunction predecessorWeights(g) {\n var weightMap = _.map(g.nodes(), function (v) {\n var preds = {};\n _.forEach(g.inEdges(v), function (e) {\n preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight;\n });\n return preds;\n });\n return _.zipObject(g.nodes(), weightMap);\n}\n\n/*\n * Finds where a line starting at point ({x, y}) would intersect a rectangle\n * ({x, y, width, height}) if it were pointing at the rectangle's center.\n */\nfunction intersectRect(rect, point) {\n var x = rect.x;\n var y = rect.y;\n\n // Rectangle intersection algorithm from:\n // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = rect.width / 2;\n var h = rect.height / 2;\n\n if (!dx && !dy) {\n throw new Error('Not possible to find intersection inside of the rectangle');\n }\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n}\n\n/*\n * Given a DAG with each node assigned \"rank\" and \"order\" properties, this\n * function will produce a matrix with the ids of each node.\n */\nfunction buildLayerMatrix(g) {\n var layering = _.map(_.range(maxRank(g) + 1), function () {\n return [];\n });\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n var rank = node.rank;\n if (!_.isUndefined(rank)) {\n layering[rank][node.order] = v;\n }\n });\n return layering;\n}\n\n/*\n * Adjusts the ranks for all nodes in the graph such that all nodes v have\n * rank(v) >= 0 and at least one node w has rank(w) = 0.\n */\nfunction normalizeRanks(g) {\n var min = _.min(\n _.map(g.nodes(), function (v) {\n return g.node(v).rank;\n }),\n );\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n if (_.has(node, 'rank')) {\n node.rank -= min;\n }\n });\n}\n\nfunction removeEmptyRanks(g) {\n // Ranks may not start at 0, so we need to offset them\n var offset = _.min(\n _.map(g.nodes(), function (v) {\n return g.node(v).rank;\n }),\n );\n\n var layers = [];\n _.forEach(g.nodes(), function (v) {\n var rank = g.node(v).rank - offset;\n if (!layers[rank]) {\n layers[rank] = [];\n }\n layers[rank].push(v);\n });\n\n var delta = 0;\n var nodeRankFactor = g.graph().nodeRankFactor;\n _.forEach(layers, function (vs, i) {\n if (_.isUndefined(vs) && i % nodeRankFactor !== 0) {\n --delta;\n } else if (delta) {\n _.forEach(vs, function (v) {\n g.node(v).rank += delta;\n });\n }\n });\n}\n\nfunction addBorderNode(g, prefix, rank, order) {\n var node = {\n width: 0,\n height: 0,\n };\n if (arguments.length >= 4) {\n node.rank = rank;\n node.order = order;\n }\n return addDummyNode(g, 'border', node, prefix);\n}\n\nfunction maxRank(g) {\n return _.max(\n _.map(g.nodes(), function (v) {\n var rank = g.node(v).rank;\n if (!_.isUndefined(rank)) {\n return rank;\n }\n }),\n );\n}\n\n/*\n * Partition a collection into two groups: `lhs` and `rhs`. If the supplied\n * function returns true for an entry it goes into `lhs`. Otherwise it goes\n * into `rhs.\n */\nfunction partition(collection, fn) {\n var result = { lhs: [], rhs: [] };\n _.forEach(collection, function (value) {\n if (fn(value)) {\n result.lhs.push(value);\n } else {\n result.rhs.push(value);\n }\n });\n return result;\n}\n\n/*\n * Returns a new function that wraps `fn` with a timer. The wrapper logs the\n * time it takes to execute the function.\n */\nfunction time(name, fn) {\n var start = _.now();\n try {\n return fn();\n } finally {\n console.log(name + ' time: ' + (_.now() - start) + 'ms');\n }\n}\n\nfunction notime(name, fn) {\n return fn();\n}\n", "import * as _ from 'lodash-es';\nimport * as util from './util.js';\n\nexport { addBorderSegments };\n\nfunction addBorderSegments(g) {\n function dfs(v) {\n var children = g.children(v);\n var node = g.node(v);\n if (children.length) {\n _.forEach(children, dfs);\n }\n\n if (Object.prototype.hasOwnProperty.call(node, 'minRank')) {\n node.borderLeft = [];\n node.borderRight = [];\n for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) {\n addBorderNode(g, 'borderLeft', '_bl', v, node, rank);\n addBorderNode(g, 'borderRight', '_br', v, node, rank);\n }\n }\n }\n\n _.forEach(g.children(), dfs);\n}\n\nfunction addBorderNode(g, prop, prefix, sg, sgNode, rank) {\n var label = { width: 0, height: 0, rank: rank, borderType: prop };\n var prev = sgNode[prop][rank - 1];\n var curr = util.addDummyNode(g, 'border', label, prefix);\n sgNode[prop][rank] = curr;\n g.setParent(curr, sg);\n if (prev) {\n g.setEdge(prev, curr, { weight: 1 });\n }\n}\n", "import * as _ from 'lodash-es';\n\nexport { adjust, undo };\n\nfunction adjust(g) {\n var rankDir = g.graph().rankdir.toLowerCase();\n if (rankDir === 'lr' || rankDir === 'rl') {\n swapWidthHeight(g);\n }\n}\n\nfunction undo(g) {\n var rankDir = g.graph().rankdir.toLowerCase();\n if (rankDir === 'bt' || rankDir === 'rl') {\n reverseY(g);\n }\n\n if (rankDir === 'lr' || rankDir === 'rl') {\n swapXY(g);\n swapWidthHeight(g);\n }\n}\n\nfunction swapWidthHeight(g) {\n _.forEach(g.nodes(), function (v) {\n swapWidthHeightOne(g.node(v));\n });\n _.forEach(g.edges(), function (e) {\n swapWidthHeightOne(g.edge(e));\n });\n}\n\nfunction swapWidthHeightOne(attrs) {\n var w = attrs.width;\n attrs.width = attrs.height;\n attrs.height = w;\n}\n\nfunction reverseY(g) {\n _.forEach(g.nodes(), function (v) {\n reverseYOne(g.node(v));\n });\n\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n _.forEach(edge.points, reverseYOne);\n if (Object.prototype.hasOwnProperty.call(edge, 'y')) {\n reverseYOne(edge);\n }\n });\n}\n\nfunction reverseYOne(attrs) {\n attrs.y = -attrs.y;\n}\n\nfunction swapXY(g) {\n _.forEach(g.nodes(), function (v) {\n swapXYOne(g.node(v));\n });\n\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n _.forEach(edge.points, swapXYOne);\n if (Object.prototype.hasOwnProperty.call(edge, 'x')) {\n swapXYOne(edge);\n }\n });\n}\n\nfunction swapXYOne(attrs) {\n var x = attrs.x;\n attrs.x = attrs.y;\n attrs.y = x;\n}\n", "/**\n * TypeScript type imports:\n *\n * @import { Graph } from '../graphlib/graph.js';\n */\nimport * as _ from 'lodash-es';\nimport * as util from './util.js';\n\nexport { run, undo };\n\n/*\n * Breaks any long edges in the graph into short segments that span 1 layer\n * each. This operation is undoable with the denormalize function.\n *\n * Pre-conditions:\n *\n * 1. The input graph is a DAG.\n * 2. Each node in the graph has a \"rank\" property.\n *\n * Post-condition:\n *\n * 1. All edges in the graph have a length of 1.\n * 2. Dummy nodes are added where edges have been split into segments.\n * 3. The graph is augmented with a \"dummyChains\" attribute which contains\n * the first dummy in each chain of dummy nodes produced.\n */\nfunction run(g) {\n g.graph().dummyChains = [];\n _.forEach(g.edges(), function (edge) {\n normalizeEdge(g, edge);\n });\n}\n\n/**\n * @param {Graph} g\n */\nfunction normalizeEdge(g, e) {\n var v = e.v;\n var vRank = g.node(v).rank;\n var w = e.w;\n var wRank = g.node(w).rank;\n var name = e.name;\n var edgeLabel = g.edge(e);\n var labelRank = edgeLabel.labelRank;\n\n if (wRank === vRank + 1) return;\n\n g.removeEdge(e);\n\n /**\n * @typedef {Object} Attrs\n * @property {number} width\n * @property {number} height\n * @property {ReturnType} edgeLabel\n * @property {any} edgeObj\n * @property {ReturnType[\"rank\"]} rank\n * @property {string} [dummy]\n * @property {ReturnType[\"labelpos\"]} [labelpos]\n */\n\n /** @type {Attrs | undefined} */\n var attrs = undefined;\n var dummy, i;\n for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {\n edgeLabel.points = [];\n attrs = {\n width: 0,\n height: 0,\n edgeLabel: edgeLabel,\n edgeObj: e,\n rank: vRank,\n };\n dummy = util.addDummyNode(g, 'edge', attrs, '_d');\n if (vRank === labelRank) {\n attrs.width = edgeLabel.width;\n attrs.height = edgeLabel.height;\n attrs.dummy = 'edge-label';\n attrs.labelpos = edgeLabel.labelpos;\n }\n g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);\n if (i === 0) {\n g.graph().dummyChains.push(dummy);\n }\n v = dummy;\n }\n\n g.setEdge(v, w, { weight: edgeLabel.weight }, name);\n}\n\nfunction undo(g) {\n _.forEach(g.graph().dummyChains, function (v) {\n var node = g.node(v);\n var origLabel = node.edgeLabel;\n var w;\n g.setEdge(node.edgeObj, origLabel);\n while (node.dummy) {\n w = g.successors(v)[0];\n g.removeNode(v);\n origLabel.points.push({ x: node.x, y: node.y });\n if (node.dummy === 'edge-label') {\n origLabel.x = node.x;\n origLabel.y = node.y;\n origLabel.width = node.width;\n origLabel.height = node.height;\n }\n v = w;\n node = g.node(v);\n }\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { longestPath, slack };\n\n/*\n * Initializes ranks for the input graph using the longest path algorithm. This\n * algorithm scales well and is fast in practice, it yields rather poor\n * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom\n * ranks wide and leaving edges longer than necessary. However, due to its\n * speed, this algorithm is good for getting an initial ranking that can be fed\n * into other algorithms.\n *\n * This algorithm does not normalize layers because it will be used by other\n * algorithms in most cases. If using this algorithm directly, be sure to\n * run normalize at the end.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG.\n * 2. Input graph node labels can be assigned properties.\n *\n * Post-conditions:\n *\n * 1. Each node will be assign an (unnormalized) \"rank\" property.\n */\nfunction longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n if (Object.prototype.hasOwnProperty.call(visited, v)) {\n return label.rank;\n }\n visited[v] = true;\n\n var rank = _.min(\n _.map(g.outEdges(v), function (e) {\n return dfs(e.w) - g.edge(e).minlen;\n }),\n );\n\n if (\n rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n rank === undefined || // return value of _.map([]) for Lodash 4\n rank === null\n ) {\n // return value of _.map([null])\n rank = 0;\n }\n\n return (label.rank = rank);\n }\n\n _.forEach(g.sources(), dfs);\n}\n\n/*\n * Returns the amount of slack for the given edge. The slack is defined as the\n * difference between the length of the edge and its minimum length.\n */\nfunction slack(g, e) {\n return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../../graphlib/index.js';\nimport { slack } from './util.js';\n\nexport { feasibleTree };\n\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\nfunction feasibleTree(g) {\n var t = new Graph({ directed: false });\n\n // Choose arbitrary node from which to start our tree\n var start = g.nodes()[0];\n var size = g.nodeCount();\n t.setNode(start, {});\n\n var edge, delta;\n while (tightTree(t, g) < size) {\n edge = findMinSlackEdge(t, g);\n delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);\n shiftRanks(t, g, delta);\n }\n\n return t;\n}\n\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\nfunction tightTree(t, g) {\n function dfs(v) {\n _.forEach(g.nodeEdges(v), function (e) {\n var edgeV = e.v,\n w = v === edgeV ? e.w : edgeV;\n if (!t.hasNode(w) && !slack(g, e)) {\n t.setNode(w, {});\n t.setEdge(v, w, {});\n dfs(w);\n }\n });\n }\n\n _.forEach(t.nodes(), dfs);\n return t.nodeCount();\n}\n\n/*\n * Finds the edge with the smallest slack that is incident on tree and returns\n * it.\n */\nfunction findMinSlackEdge(t, g) {\n return _.minBy(g.edges(), function (e) {\n if (t.hasNode(e.v) !== t.hasNode(e.w)) {\n return slack(g, e);\n }\n });\n}\n\nfunction shiftRanks(t, g, delta) {\n _.forEach(t.nodes(), function (v) {\n g.node(v).rank += delta;\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { components };\n\nfunction components(g) {\n var visited = {};\n var cmpts = [];\n var cmpt;\n\n function dfs(v) {\n if (Object.prototype.hasOwnProperty.call(visited, v)) return;\n visited[v] = true;\n cmpt.push(v);\n _.each(g.successors(v), dfs);\n _.each(g.predecessors(v), dfs);\n }\n\n _.each(g.nodes(), function (v) {\n cmpt = [];\n dfs(v);\n if (cmpt.length) {\n cmpts.push(cmpt);\n }\n });\n\n return cmpts;\n}\n", "export { PriorityQueue };\n\n/**\n * A min-priority queue data structure. This algorithm is derived from Cormen,\n * et al., \"Introduction to Algorithms\". The basic idea of a min-priority\n * queue is that you can efficiently (in O(1) time) get the smallest key in\n * the queue. Adding and removing elements takes O(log n) time. A key can\n * have its priority decreased in O(log n) time.\n */\nclass PriorityQueue {\n constructor() {\n this._arr = [];\n this._keyIndices = {};\n }\n /**\n * Returns the number of elements in the queue. Takes `O(1)` time.\n */\n size() {\n return this._arr.length;\n }\n /**\n * Returns the keys that are in the queue. Takes `O(n)` time.\n */\n keys() {\n return this._arr.map(function (x) {\n return x.key;\n });\n }\n /**\n * Returns `true` if **key** is in the queue and `false` if not.\n */\n has(key) {\n return Object.prototype.hasOwnProperty.call(this._keyIndices, key);\n }\n /**\n * Returns the priority for **key**. If **key** is not present in the queue\n * then this function returns `undefined`. Takes `O(1)` time.\n *\n * @param {Object} key\n */\n priority(key) {\n var index = this._keyIndices[key];\n if (index !== undefined) {\n return this._arr[index].priority;\n }\n }\n /**\n * Returns the key for the minimum element in this queue. If the queue is\n * empty this function throws an Error. Takes `O(1)` time.\n */\n min() {\n if (this.size() === 0) {\n throw new Error('Queue underflow');\n }\n return this._arr[0].key;\n }\n /**\n * Inserts a new key into the priority queue. If the key already exists in\n * the queue this function returns `false`; otherwise it will return `true`.\n * Takes `O(n)` time.\n *\n * @param {Object} key the key to add\n * @param {Number} priority the initial priority for the key\n */\n add(key, priority) {\n var keyIndices = this._keyIndices;\n key = String(key);\n if (!Object.prototype.hasOwnProperty.call(keyIndices, key)) {\n var arr = this._arr;\n var index = arr.length;\n keyIndices[key] = index;\n arr.push({ key: key, priority: priority });\n this._decrease(index);\n return true;\n }\n return false;\n }\n /**\n * Removes and returns the smallest key in the queue. Takes `O(log n)` time.\n */\n removeMin() {\n this._swap(0, this._arr.length - 1);\n var min = this._arr.pop();\n delete this._keyIndices[min.key];\n this._heapify(0);\n return min.key;\n }\n /**\n * Decreases the priority for **key** to **priority**. If the new priority is\n * greater than the previous priority, this function will throw an Error.\n *\n * @param {Object} key the key for which to raise priority\n * @param {Number} priority the new priority for the key\n */\n decrease(key, priority) {\n var index = this._keyIndices[key];\n if (priority > this._arr[index].priority) {\n throw new Error(\n 'New priority is greater than current priority. ' +\n 'Key: ' +\n key +\n ' Old: ' +\n this._arr[index].priority +\n ' New: ' +\n priority,\n );\n }\n this._arr[index].priority = priority;\n this._decrease(index);\n }\n _heapify(i) {\n var arr = this._arr;\n var l = 2 * i;\n var r = l + 1;\n var largest = i;\n if (l < arr.length) {\n largest = arr[l].priority < arr[largest].priority ? l : largest;\n if (r < arr.length) {\n largest = arr[r].priority < arr[largest].priority ? r : largest;\n }\n if (largest !== i) {\n this._swap(i, largest);\n this._heapify(largest);\n }\n }\n }\n _decrease(index) {\n var arr = this._arr;\n var priority = arr[index].priority;\n var parent;\n while (index !== 0) {\n parent = index >> 1;\n if (arr[parent].priority < priority) {\n break;\n }\n this._swap(index, parent);\n index = parent;\n }\n }\n _swap(i, j) {\n var arr = this._arr;\n var keyIndices = this._keyIndices;\n var origArrI = arr[i];\n var origArrJ = arr[j];\n arr[i] = origArrJ;\n arr[j] = origArrI;\n keyIndices[origArrJ.key] = i;\n keyIndices[origArrI.key] = j;\n }\n}\n", "import * as _ from 'lodash-es';\nimport { PriorityQueue } from '../data/priority-queue.js';\n\nexport { dijkstra };\n\nvar DEFAULT_WEIGHT_FUNC = _.constant(1);\n\nfunction dijkstra(g, source, weightFn, edgeFn) {\n return runDijkstra(\n g,\n String(source),\n weightFn || DEFAULT_WEIGHT_FUNC,\n edgeFn ||\n function (v) {\n return g.outEdges(v);\n },\n );\n}\n\nfunction runDijkstra(g, source, weightFn, edgeFn) {\n var results = {};\n var pq = new PriorityQueue();\n var v, vEntry;\n\n var updateNeighbors = function (edge) {\n var w = edge.v !== v ? edge.v : edge.w;\n var wEntry = results[w];\n var weight = weightFn(edge);\n var distance = vEntry.distance + weight;\n\n if (weight < 0) {\n throw new Error(\n 'dijkstra does not allow negative edge weights. ' +\n 'Bad edge: ' +\n edge +\n ' Weight: ' +\n weight,\n );\n }\n\n if (distance < wEntry.distance) {\n wEntry.distance = distance;\n wEntry.predecessor = v;\n pq.decrease(w, distance);\n }\n };\n\n g.nodes().forEach(function (v) {\n var distance = v === source ? 0 : Number.POSITIVE_INFINITY;\n results[v] = { distance: distance };\n pq.add(v, distance);\n });\n\n while (pq.size() > 0) {\n v = pq.removeMin();\n vEntry = results[v];\n if (vEntry.distance === Number.POSITIVE_INFINITY) {\n break;\n }\n\n edgeFn(v).forEach(updateNeighbors);\n }\n\n return results;\n}\n", "import * as _ from 'lodash-es';\nimport { dijkstra } from './dijkstra.js';\n\nexport { dijkstraAll };\n\nfunction dijkstraAll(g, weightFunc, edgeFunc) {\n return _.transform(\n g.nodes(),\n function (acc, v) {\n acc[v] = dijkstra(g, v, weightFunc, edgeFunc);\n },\n {},\n );\n}\n", "export { tarjan };\n\nfunction tarjan(g) {\n var index = 0;\n var stack = [];\n var visited = {}; // node id -> { onStack, lowlink, index }\n var results = [];\n\n function dfs(v) {\n var entry = (visited[v] = {\n onStack: true,\n lowlink: index,\n index: index++,\n });\n stack.push(v);\n\n g.successors(v).forEach(function (w) {\n if (!Object.prototype.hasOwnProperty.call(visited, w)) {\n dfs(w);\n entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink);\n } else if (visited[w].onStack) {\n entry.lowlink = Math.min(entry.lowlink, visited[w].index);\n }\n });\n\n if (entry.lowlink === entry.index) {\n var cmpt = [];\n var w;\n do {\n w = stack.pop();\n visited[w].onStack = false;\n cmpt.push(w);\n } while (v !== w);\n results.push(cmpt);\n }\n }\n\n g.nodes().forEach(function (v) {\n if (!Object.prototype.hasOwnProperty.call(visited, v)) {\n dfs(v);\n }\n });\n\n return results;\n}\n", "import * as _ from 'lodash-es';\nimport { tarjan } from './tarjan.js';\n\nexport { findCycles };\n\nfunction findCycles(g) {\n return _.filter(tarjan(g), function (cmpt) {\n return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0]));\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { floydWarshall };\n\nvar DEFAULT_WEIGHT_FUNC = _.constant(1);\n\nfunction floydWarshall(g, weightFn, edgeFn) {\n return runFloydWarshall(\n g,\n weightFn || DEFAULT_WEIGHT_FUNC,\n edgeFn ||\n function (v) {\n return g.outEdges(v);\n },\n );\n}\n\nfunction runFloydWarshall(g, weightFn, edgeFn) {\n var results = {};\n var nodes = g.nodes();\n\n nodes.forEach(function (v) {\n results[v] = {};\n results[v][v] = { distance: 0 };\n nodes.forEach(function (w) {\n if (v !== w) {\n results[v][w] = { distance: Number.POSITIVE_INFINITY };\n }\n });\n edgeFn(v).forEach(function (edge) {\n var w = edge.v === v ? edge.w : edge.v;\n var d = weightFn(edge);\n results[v][w] = { distance: d, predecessor: v };\n });\n });\n\n nodes.forEach(function (k) {\n var rowK = results[k];\n nodes.forEach(function (i) {\n var rowI = results[i];\n nodes.forEach(function (j) {\n var ik = rowI[k];\n var kj = rowK[j];\n var ij = rowI[j];\n var altDistance = ik.distance + kj.distance;\n if (altDistance < ij.distance) {\n ij.distance = altDistance;\n ij.predecessor = kj.predecessor;\n }\n });\n });\n });\n\n return results;\n}\n", "import * as _ from 'lodash-es';\n\nexport { topsort, CycleException };\n\ntopsort.CycleException = CycleException;\n\nfunction topsort(g) {\n var visited = {};\n var stack = {};\n var results = [];\n\n function visit(node) {\n if (Object.prototype.hasOwnProperty.call(stack, node)) {\n throw new CycleException();\n }\n\n if (!Object.prototype.hasOwnProperty.call(visited, node)) {\n stack[node] = true;\n visited[node] = true;\n _.each(g.predecessors(node), visit);\n delete stack[node];\n results.push(node);\n }\n }\n\n _.each(g.sinks(), visit);\n\n if (_.size(visited) !== g.nodeCount()) {\n throw new CycleException();\n }\n\n return results;\n}\n\nfunction CycleException() {}\nCycleException.prototype = new Error(); // must be an instance of Error to pass testing\n", "import { topsort, CycleException } from './topsort.js';\n\nexport { isAcyclic };\n\nfunction isAcyclic(g) {\n try {\n topsort(g);\n } catch (e) {\n if (e instanceof CycleException) {\n return false;\n }\n throw e;\n }\n return true;\n}\n", "import * as _ from 'lodash-es';\n\nexport { dfs };\n\n/*\n * A helper that preforms a pre- or post-order traversal on the input graph\n * and returns the nodes in the order they were visited. If the graph is\n * undirected then this algorithm will navigate using neighbors. If the graph\n * is directed then this algorithm will navigate using successors.\n *\n * Order must be one of \"pre\" or \"post\".\n */\nfunction dfs(g, vs, order) {\n if (!_.isArray(vs)) {\n vs = [vs];\n }\n\n var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g);\n\n var acc = [];\n var visited = {};\n _.each(vs, function (v) {\n if (!g.hasNode(v)) {\n throw new Error('Graph does not have node: ' + v);\n }\n\n doDfs(g, v, order === 'post', visited, navigation, acc);\n });\n return acc;\n}\n\nfunction doDfs(g, v, postorder, visited, navigation, acc) {\n if (!Object.prototype.hasOwnProperty.call(visited, v)) {\n visited[v] = true;\n\n if (!postorder) {\n acc.push(v);\n }\n _.each(navigation(v), function (w) {\n doDfs(g, w, postorder, visited, navigation, acc);\n });\n if (postorder) {\n acc.push(v);\n }\n }\n}\n", "import { dfs } from './dfs.js';\n\nexport { postorder };\n\nfunction postorder(g, vs) {\n return dfs(g, vs, 'post');\n}\n", "import { dfs } from './dfs.js';\n\nexport { preorder };\n\nfunction preorder(g, vs) {\n return dfs(g, vs, 'pre');\n}\n", "import * as _ from 'lodash-es';\nimport { PriorityQueue } from '../data/priority-queue.js';\nimport { Graph } from '../graph.js';\n\nexport { prim };\n\nfunction prim(g, weightFunc) {\n var result = new Graph();\n var parents = {};\n var pq = new PriorityQueue();\n var v;\n\n function updateNeighbors(edge) {\n var w = edge.v === v ? edge.w : edge.v;\n var pri = pq.priority(w);\n if (pri !== undefined) {\n var edgeWeight = weightFunc(edge);\n if (edgeWeight < pri) {\n parents[w] = v;\n pq.decrease(w, edgeWeight);\n }\n }\n }\n\n if (g.nodeCount() === 0) {\n return result;\n }\n\n _.each(g.nodes(), function (v) {\n pq.add(v, Number.POSITIVE_INFINITY);\n result.setNode(v);\n });\n\n // Start from an arbitrary node\n pq.decrease(g.nodes()[0], 0);\n\n var init = false;\n while (pq.size() > 0) {\n v = pq.removeMin();\n if (Object.prototype.hasOwnProperty.call(parents, v)) {\n result.setEdge(v, parents[v]);\n } else if (init) {\n throw new Error('Input graph is not connected: ' + g);\n } else {\n init = true;\n }\n\n g.nodeEdges(v).forEach(updateNeighbors);\n }\n\n return result;\n}\n", "import { components } from './components.js';\nimport { dijkstra } from './dijkstra.js';\nimport { dijkstraAll } from './dijkstra-all.js';\nimport { findCycles } from './find-cycles.js';\nimport { floydWarshall } from './floyd-warshall.js';\nimport { isAcyclic } from './is-acyclic.js';\nimport { postorder } from './postorder.js';\nimport { preorder } from './preorder.js';\nimport { prim } from './prim.js';\nimport { tarjan } from './tarjan.js';\nimport { topsort } from './topsort.js';\n\nexport {\n components,\n dijkstra,\n dijkstraAll,\n findCycles,\n floydWarshall,\n isAcyclic,\n postorder,\n preorder,\n prim,\n tarjan,\n topsort,\n};\n", "import * as _ from 'lodash-es';\nimport * as alg from '../../graphlib/alg/index.js';\nimport { simplify } from '../util.js';\nimport { feasibleTree } from './feasible-tree.js';\nimport { longestPath, slack } from './util.js';\n\nexport { networkSimplex };\n\n// Expose some internals for testing purposes\nnetworkSimplex.initLowLimValues = initLowLimValues;\nnetworkSimplex.initCutValues = initCutValues;\nnetworkSimplex.calcCutValue = calcCutValue;\nnetworkSimplex.leaveEdge = leaveEdge;\nnetworkSimplex.enterEdge = enterEdge;\nnetworkSimplex.exchangeEdges = exchangeEdges;\n\n/*\n * The network simplex algorithm assigns ranks to each node in the input graph\n * and iteratively improves the ranking to reduce the length of edges.\n *\n * Preconditions:\n *\n * 1. The input graph must be a DAG.\n * 2. All nodes in the graph must have an object value.\n * 3. All edges in the graph must have \"minlen\" and \"weight\" attributes.\n *\n * Postconditions:\n *\n * 1. All nodes in the graph will have an assigned \"rank\" attribute that has\n * been optimized by the network simplex algorithm. Ranks start at 0.\n *\n *\n * A rough sketch of the algorithm is as follows:\n *\n * 1. Assign initial ranks to each node. We use the longest path algorithm,\n * which assigns ranks to the lowest position possible. In general this\n * leads to very wide bottom ranks and unnecessarily long edges.\n * 2. Construct a feasible tight tree. A tight tree is one such that all\n * edges in the tree have no slack (difference between length of edge\n * and minlen for the edge). This by itself greatly improves the assigned\n * rankings by shorting edges.\n * 3. Iteratively find edges that have negative cut values. Generally a\n * negative cut value indicates that the edge could be removed and a new\n * tree edge could be added to produce a more compact graph.\n *\n * Much of the algorithms here are derived from Gansner, et al., \"A Technique\n * for Drawing Directed Graphs.\" The structure of the file roughly follows the\n * structure of the overall algorithm.\n */\nfunction networkSimplex(g) {\n g = simplify(g);\n longestPath(g);\n var t = feasibleTree(g);\n initLowLimValues(t);\n initCutValues(t, g);\n\n var e, f;\n while ((e = leaveEdge(t))) {\n f = enterEdge(t, g, e);\n exchangeEdges(t, g, e, f);\n }\n}\n\n/*\n * Initializes cut values for all edges in the tree.\n */\nfunction initCutValues(t, g) {\n var vs = alg.postorder(t, t.nodes());\n vs = vs.slice(0, vs.length - 1);\n _.forEach(vs, function (v) {\n assignCutValue(t, g, v);\n });\n}\n\nfunction assignCutValue(t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n t.edge(child, parent).cutvalue = calcCutValue(t, g, child);\n}\n\n/*\n * Given the tight tree, its graph, and a child in the graph calculate and\n * return the cut value for the edge between the child and its parent.\n */\nfunction calcCutValue(t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n // True if the child is on the tail end of the edge in the directed graph\n var childIsTail = true;\n // The graph's view of the tree edge we're inspecting\n var graphEdge = g.edge(child, parent);\n // The accumulated cut value for the edge between this node and its parent\n var cutValue = 0;\n\n if (!graphEdge) {\n childIsTail = false;\n graphEdge = g.edge(parent, child);\n }\n\n cutValue = graphEdge.weight;\n\n _.forEach(g.nodeEdges(child), function (e) {\n var isOutEdge = e.v === child,\n other = isOutEdge ? e.w : e.v;\n\n if (other !== parent) {\n var pointsToHead = isOutEdge === childIsTail,\n otherWeight = g.edge(e).weight;\n\n cutValue += pointsToHead ? otherWeight : -otherWeight;\n if (isTreeEdge(t, child, other)) {\n var otherCutValue = t.edge(child, other).cutvalue;\n cutValue += pointsToHead ? -otherCutValue : otherCutValue;\n }\n }\n });\n\n return cutValue;\n}\n\nfunction initLowLimValues(tree, root) {\n if (arguments.length < 2) {\n root = tree.nodes()[0];\n }\n dfsAssignLowLim(tree, {}, 1, root);\n}\n\nfunction dfsAssignLowLim(tree, visited, nextLim, v, parent) {\n var low = nextLim;\n var label = tree.node(v);\n\n visited[v] = true;\n _.forEach(tree.neighbors(v), function (w) {\n if (!Object.prototype.hasOwnProperty.call(visited, w)) {\n nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v);\n }\n });\n\n label.low = low;\n label.lim = nextLim++;\n if (parent) {\n label.parent = parent;\n } else {\n // TODO should be able to remove this when we incrementally update low lim\n delete label.parent;\n }\n\n return nextLim;\n}\n\nfunction leaveEdge(tree) {\n return _.find(tree.edges(), function (e) {\n return tree.edge(e).cutvalue < 0;\n });\n}\n\nfunction enterEdge(t, g, edge) {\n var v = edge.v;\n var w = edge.w;\n\n // For the rest of this function we assume that v is the tail and w is the\n // head, so if we don't have this edge in the graph we should flip it to\n // match the correct orientation.\n if (!g.hasEdge(v, w)) {\n v = edge.w;\n w = edge.v;\n }\n\n var vLabel = t.node(v);\n var wLabel = t.node(w);\n var tailLabel = vLabel;\n var flip = false;\n\n // If the root is in the tail of the edge then we need to flip the logic that\n // checks for the head and tail nodes in the candidates function below.\n if (vLabel.lim > wLabel.lim) {\n tailLabel = wLabel;\n flip = true;\n }\n\n var candidates = _.filter(g.edges(), function (edge) {\n return (\n flip === isDescendant(t, t.node(edge.v), tailLabel) &&\n flip !== isDescendant(t, t.node(edge.w), tailLabel)\n );\n });\n\n return _.minBy(candidates, function (edge) {\n return slack(g, edge);\n });\n}\n\nfunction exchangeEdges(t, g, e, f) {\n var v = e.v;\n var w = e.w;\n t.removeEdge(v, w);\n t.setEdge(f.v, f.w, {});\n initLowLimValues(t);\n initCutValues(t, g);\n updateRanks(t, g);\n}\n\nfunction updateRanks(t, g) {\n var root = _.find(t.nodes(), function (v) {\n return !g.node(v).parent;\n });\n var vs = alg.preorder(t, root);\n vs = vs.slice(1);\n _.forEach(vs, function (v) {\n var parent = t.node(v).parent,\n edge = g.edge(v, parent),\n flipped = false;\n\n if (!edge) {\n edge = g.edge(parent, v);\n flipped = true;\n }\n\n g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);\n });\n}\n\n/*\n * Returns true if the edge is in the tree.\n */\nfunction isTreeEdge(tree, u, v) {\n return tree.hasEdge(u, v);\n}\n\n/*\n * Returns true if the specified node is descendant of the root node per the\n * assigned low and lim attributes in the tree.\n */\nfunction isDescendant(tree, vLabel, rootLabel) {\n return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;\n}\n", "import { feasibleTree } from './feasible-tree.js';\nimport { networkSimplex } from './network-simplex.js';\nimport { longestPath } from './util.js';\n\nexport { rank };\n\n/*\n * Assigns a rank to each node in the input graph that respects the \"minlen\"\n * constraint specified on edges between nodes.\n *\n * This basic structure is derived from Gansner, et al., \"A Technique for\n * Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a connected DAG\n * 2. Graph nodes must be objects\n * 3. Graph edges must have \"weight\" and \"minlen\" attributes\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have a \"rank\" attribute based on the results of the\n * algorithm. Ranks can start at any index (including negative), we'll\n * fix them up later.\n */\nfunction rank(g) {\n switch (g.graph().ranker) {\n case 'network-simplex':\n networkSimplexRanker(g);\n break;\n case 'tight-tree':\n tightTreeRanker(g);\n break;\n case 'longest-path':\n longestPathRanker(g);\n break;\n default:\n networkSimplexRanker(g);\n }\n}\n\n// A fast and simple ranker, but results are far from optimal.\nvar longestPathRanker = longestPath;\n\nfunction tightTreeRanker(g) {\n longestPath(g);\n feasibleTree(g);\n}\n\nfunction networkSimplexRanker(g) {\n networkSimplex(g);\n}\n", "import * as _ from 'lodash-es';\nimport * as util from './util.js';\n\nexport { run, cleanup };\n\n/*\n * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,\n * adds appropriate edges to ensure that all cluster nodes are placed between\n * these boundries, and ensures that the graph is connected.\n *\n * In addition we ensure, through the use of the minlen property, that nodes\n * and subgraph border nodes to not end up on the same rank.\n *\n * Preconditions:\n *\n * 1. Input graph is a DAG\n * 2. Nodes in the input graph has a minlen attribute\n *\n * Postconditions:\n *\n * 1. Input graph is connected.\n * 2. Dummy nodes are added for the tops and bottoms of subgraphs.\n * 3. The minlen attribute for nodes is adjusted to ensure nodes do not\n * get placed on the same rank as subgraph border nodes.\n *\n * The nesting graph idea comes from Sander, \"Layout of Compound Directed\n * Graphs.\"\n */\nfunction run(g) {\n var root = util.addDummyNode(g, 'root', {}, '_root');\n var depths = treeDepths(g);\n var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array\n var nodeSep = 2 * height + 1;\n\n g.graph().nestingRoot = root;\n\n // Multiply minlen by nodeSep to align nodes on non-border ranks.\n _.forEach(g.edges(), function (e) {\n g.edge(e).minlen *= nodeSep;\n });\n\n // Calculate a weight that is sufficient to keep subgraphs vertically compact\n var weight = sumWeights(g) + 1;\n\n // Create border nodes and link them up\n _.forEach(g.children(), function (child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n });\n\n // Save the multiplier for node layers for later removal of empty border\n // layers.\n g.graph().nodeRankFactor = nodeSep;\n}\n\nfunction dfs(g, root, nodeSep, weight, height, depths, v) {\n var children = g.children(v);\n if (!children.length) {\n if (v !== root) {\n g.setEdge(root, v, { weight: 0, minlen: nodeSep });\n }\n return;\n }\n\n var top = util.addBorderNode(g, '_bt');\n var bottom = util.addBorderNode(g, '_bb');\n var label = g.node(v);\n\n g.setParent(top, v);\n label.borderTop = top;\n g.setParent(bottom, v);\n label.borderBottom = bottom;\n\n _.forEach(children, function (child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n\n var childNode = g.node(child);\n var childTop = childNode.borderTop ? childNode.borderTop : child;\n var childBottom = childNode.borderBottom ? childNode.borderBottom : child;\n var thisWeight = childNode.borderTop ? weight : 2 * weight;\n var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;\n\n g.setEdge(top, childTop, {\n weight: thisWeight,\n minlen: minlen,\n nestingEdge: true,\n });\n\n g.setEdge(childBottom, bottom, {\n weight: thisWeight,\n minlen: minlen,\n nestingEdge: true,\n });\n });\n\n if (!g.parent(v)) {\n g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });\n }\n}\n\nfunction treeDepths(g) {\n var depths = {};\n function dfs(v, depth) {\n var children = g.children(v);\n if (children && children.length) {\n _.forEach(children, function (child) {\n dfs(child, depth + 1);\n });\n }\n depths[v] = depth;\n }\n _.forEach(g.children(), function (v) {\n dfs(v, 1);\n });\n return depths;\n}\n\nfunction sumWeights(g) {\n return _.reduce(\n g.edges(),\n function (acc, e) {\n return acc + g.edge(e).weight;\n },\n 0,\n );\n}\n\nfunction cleanup(g) {\n var graphLabel = g.graph();\n g.removeNode(graphLabel.nestingRoot);\n delete graphLabel.nestingRoot;\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (edge.nestingEdge) {\n g.removeEdge(e);\n }\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { addSubgraphConstraints };\n\nfunction addSubgraphConstraints(g, cg, vs) {\n var prev = {},\n rootPrev;\n\n _.forEach(vs, function (v) {\n var child = g.parent(v),\n parent,\n prevChild;\n while (child) {\n parent = g.parent(child);\n if (parent) {\n prevChild = prev[parent];\n prev[parent] = child;\n } else {\n prevChild = rootPrev;\n rootPrev = child;\n }\n if (prevChild && prevChild !== child) {\n cg.setEdge(prevChild, child);\n return;\n }\n child = parent;\n }\n });\n\n /*\n function dfs(v) {\n var children = v ? g.children(v) : g.children();\n if (children.length) {\n var min = Number.POSITIVE_INFINITY,\n subgraphs = [];\n _.each(children, function(child) {\n var childMin = dfs(child);\n if (g.children(child).length) {\n subgraphs.push({ v: child, order: childMin });\n }\n min = Math.min(min, childMin);\n });\n _.reduce(_.sortBy(subgraphs, \"order\"), function(prev, curr) {\n cg.setEdge(prev.v, curr.v);\n return curr;\n });\n return min;\n }\n return g.node(v).order;\n }\n dfs(undefined);\n */\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../../graphlib/index.js';\n\nexport { buildLayerGraph };\n\n/*\n * Constructs a graph that can be used to sort a layer of nodes. The graph will\n * contain all base and subgraph nodes from the request layer in their original\n * hierarchy and any edges that are incident on these nodes and are of the type\n * requested by the \"relationship\" parameter.\n *\n * Nodes from the requested rank that do not have parents are assigned a root\n * node in the output graph, which is set in the root graph attribute. This\n * makes it easy to walk the hierarchy of movable nodes during ordering.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG\n * 2. Base nodes in the input graph have a rank attribute\n * 3. Subgraph nodes in the input graph has minRank and maxRank attributes\n * 4. Edges have an assigned weight\n *\n * Post-conditions:\n *\n * 1. Output graph has all nodes in the movable rank with preserved\n * hierarchy.\n * 2. Root nodes in the movable layer are made children of the node\n * indicated by the root attribute of the graph.\n * 3. Non-movable nodes incident on movable nodes, selected by the\n * relationship parameter, are included in the graph (without hierarchy).\n * 4. Edges incident on movable nodes, selected by the relationship\n * parameter, are added to the output graph.\n * 5. The weights for copied edges are aggregated as need, since the output\n * graph is not a multi-graph.\n */\nfunction buildLayerGraph(g, rank, relationship) {\n var root = createRootNode(g),\n result = new Graph({ compound: true })\n .setGraph({ root: root })\n .setDefaultNodeLabel(function (v) {\n return g.node(v);\n });\n\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v),\n parent = g.parent(v);\n\n if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) {\n result.setNode(v);\n result.setParent(v, parent || root);\n\n // This assumes we have only short edges!\n _.forEach(g[relationship](v), function (e) {\n var u = e.v === v ? e.w : e.v,\n edge = result.edge(u, v),\n weight = !_.isUndefined(edge) ? edge.weight : 0;\n result.setEdge(u, v, { weight: g.edge(e).weight + weight });\n });\n\n if (Object.prototype.hasOwnProperty.call(node, 'minRank')) {\n result.setNode(v, {\n borderLeft: node.borderLeft[rank],\n borderRight: node.borderRight[rank],\n });\n }\n }\n });\n\n return result;\n}\n\nfunction createRootNode(g) {\n var v;\n while (g.hasNode((v = _.uniqueId('_root'))));\n return v;\n}\n", "import * as _ from 'lodash-es';\n\nexport { crossCount };\n\n/*\n * A function that takes a layering (an array of layers, each with an array of\n * ordererd nodes) and a graph and returns a weighted crossing count.\n *\n * Pre-conditions:\n *\n * 1. Input graph must be simple (not a multigraph), directed, and include\n * only simple edges.\n * 2. Edges in the input graph must have assigned weights.\n *\n * Post-conditions:\n *\n * 1. The graph and layering matrix are left unchanged.\n *\n * This algorithm is derived from Barth, et al., \"Bilayer Cross Counting.\"\n */\nfunction crossCount(g, layering) {\n var cc = 0;\n for (var i = 1; i < layering.length; ++i) {\n cc += twoLayerCrossCount(g, layering[i - 1], layering[i]);\n }\n return cc;\n}\n\nfunction twoLayerCrossCount(g, northLayer, southLayer) {\n // Sort all of the edges between the north and south layers by their position\n // in the north layer and then the south. Map these edges to the position of\n // their head in the south layer.\n var southPos = _.zipObject(\n southLayer,\n _.map(southLayer, function (v, i) {\n return i;\n }),\n );\n var southEntries = _.flatten(\n _.map(northLayer, function (v) {\n return _.sortBy(\n _.map(g.outEdges(v), function (e) {\n return { pos: southPos[e.w], weight: g.edge(e).weight };\n }),\n 'pos',\n );\n }),\n );\n\n // Build the accumulator tree\n var firstIndex = 1;\n while (firstIndex < southLayer.length) firstIndex <<= 1;\n var treeSize = 2 * firstIndex - 1;\n firstIndex -= 1;\n var tree = _.map(new Array(treeSize), function () {\n return 0;\n });\n\n // Calculate the weighted crossings\n var cc = 0;\n _.forEach(\n // @ts-expect-error\n southEntries.forEach(function (entry) {\n var index = entry.pos + firstIndex;\n tree[index] += entry.weight;\n var weightSum = 0;\n // @ts-expect-error\n while (index > 0) {\n // @ts-expect-error\n if (index % 2) {\n weightSum += tree[index + 1];\n }\n // @ts-expect-error\n index = (index - 1) >> 1;\n tree[index] += entry.weight;\n }\n cc += entry.weight * weightSum;\n }),\n );\n\n return cc;\n}\n", "import * as _ from 'lodash-es';\n\n/*\n * Assigns an initial order value for each node by performing a DFS search\n * starting from nodes in the first rank. Nodes are assigned an order in their\n * rank as they are first visited.\n *\n * This approach comes from Gansner, et al., \"A Technique for Drawing Directed\n * Graphs.\"\n *\n * Returns a layering matrix with an array per layer and each layer sorted by\n * the order of its nodes.\n */\nexport function initOrder(g) {\n var visited = {};\n var simpleNodes = _.filter(g.nodes(), function (v) {\n return !g.children(v).length;\n });\n var maxRank = _.max(\n _.map(simpleNodes, function (v) {\n return g.node(v).rank;\n }),\n );\n var layers = _.map(_.range(maxRank + 1), function () {\n return [];\n });\n\n function dfs(v) {\n if (_.has(visited, v)) return;\n visited[v] = true;\n var node = g.node(v);\n layers[node.rank].push(v);\n _.forEach(g.successors(v), dfs);\n }\n\n var orderedVs = _.sortBy(simpleNodes, function (v) {\n return g.node(v).rank;\n });\n _.forEach(orderedVs, dfs);\n\n return layers;\n}\n", "import * as _ from 'lodash-es';\n\nexport { barycenter };\n\nfunction barycenter(g, movable) {\n return _.map(movable, function (v) {\n var inV = g.inEdges(v);\n if (!inV.length) {\n return { v: v };\n } else {\n var result = _.reduce(\n inV,\n function (acc, e) {\n var edge = g.edge(e),\n nodeU = g.node(e.v);\n return {\n sum: acc.sum + edge.weight * nodeU.order,\n weight: acc.weight + edge.weight,\n };\n },\n { sum: 0, weight: 0 },\n );\n\n return {\n v: v,\n barycenter: result.sum / result.weight,\n weight: result.weight,\n };\n }\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { resolveConflicts };\n\n/*\n * Given a list of entries of the form {v, barycenter, weight} and a\n * constraint graph this function will resolve any conflicts between the\n * constraint graph and the barycenters for the entries. If the barycenters for\n * an entry would violate a constraint in the constraint graph then we coalesce\n * the nodes in the conflict into a new node that respects the contraint and\n * aggregates barycenter and weight information.\n *\n * This implementation is based on the description in Forster, \"A Fast and\n * Simple Hueristic for Constrained Two-Level Crossing Reduction,\" thought it\n * differs in some specific details.\n *\n * Pre-conditions:\n *\n * 1. Each entry has the form {v, barycenter, weight}, or if the node has\n * no barycenter, then {v}.\n *\n * Returns:\n *\n * A new list of entries of the form {vs, i, barycenter, weight}. The list\n * `vs` may either be a singleton or it may be an aggregation of nodes\n * ordered such that they do not violate constraints from the constraint\n * graph. The property `i` is the lowest original index of any of the\n * elements in `vs`.\n */\nfunction resolveConflicts(entries, cg) {\n var mappedEntries = {};\n _.forEach(entries, function (entry, i) {\n var tmp = (mappedEntries[entry.v] = {\n indegree: 0,\n in: [],\n out: [],\n vs: [entry.v],\n i: i,\n });\n if (!_.isUndefined(entry.barycenter)) {\n // @ts-expect-error\n tmp.barycenter = entry.barycenter;\n // @ts-expect-error\n tmp.weight = entry.weight;\n }\n });\n\n _.forEach(cg.edges(), function (e) {\n var entryV = mappedEntries[e.v];\n var entryW = mappedEntries[e.w];\n if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) {\n entryW.indegree++;\n entryV.out.push(mappedEntries[e.w]);\n }\n });\n\n var sourceSet = _.filter(mappedEntries, function (entry) {\n // @ts-expect-error\n return !entry.indegree;\n });\n\n return doResolveConflicts(sourceSet);\n}\n\nfunction doResolveConflicts(sourceSet) {\n var entries = [];\n\n function handleIn(vEntry) {\n return function (uEntry) {\n if (uEntry.merged) {\n return;\n }\n if (\n _.isUndefined(uEntry.barycenter) ||\n _.isUndefined(vEntry.barycenter) ||\n uEntry.barycenter >= vEntry.barycenter\n ) {\n mergeEntries(vEntry, uEntry);\n }\n };\n }\n\n function handleOut(vEntry) {\n return function (wEntry) {\n wEntry['in'].push(vEntry);\n if (--wEntry.indegree === 0) {\n sourceSet.push(wEntry);\n }\n };\n }\n\n while (sourceSet.length) {\n var entry = sourceSet.pop();\n entries.push(entry);\n _.forEach(entry['in'].reverse(), handleIn(entry));\n _.forEach(entry.out, handleOut(entry));\n }\n\n return _.map(\n _.filter(entries, function (entry) {\n return !entry.merged;\n }),\n function (entry) {\n return _.pick(entry, ['vs', 'i', 'barycenter', 'weight']);\n },\n );\n}\n\nfunction mergeEntries(target, source) {\n var sum = 0;\n var weight = 0;\n\n if (target.weight) {\n sum += target.barycenter * target.weight;\n weight += target.weight;\n }\n\n if (source.weight) {\n sum += source.barycenter * source.weight;\n weight += source.weight;\n }\n\n target.vs = source.vs.concat(target.vs);\n target.barycenter = sum / weight;\n target.weight = weight;\n target.i = Math.min(source.i, target.i);\n source.merged = true;\n}\n", "import * as _ from 'lodash-es';\nimport * as util from '../util.js';\n\nexport { sort };\n\nfunction sort(entries, biasRight) {\n var parts = util.partition(entries, function (entry) {\n return Object.prototype.hasOwnProperty.call(entry, 'barycenter');\n });\n var sortable = parts.lhs,\n unsortable = _.sortBy(parts.rhs, function (entry) {\n return -entry.i;\n }),\n vs = [],\n sum = 0,\n weight = 0,\n vsIndex = 0;\n\n sortable.sort(compareWithBias(!!biasRight));\n\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n\n _.forEach(sortable, function (entry) {\n vsIndex += entry.vs.length;\n vs.push(entry.vs);\n sum += entry.barycenter * entry.weight;\n weight += entry.weight;\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n });\n\n var result = { vs: _.flatten(vs) };\n if (weight) {\n result.barycenter = sum / weight;\n result.weight = weight;\n }\n return result;\n}\n\nfunction consumeUnsortable(vs, unsortable, index) {\n var last;\n while (unsortable.length && (last = _.last(unsortable)).i <= index) {\n unsortable.pop();\n vs.push(last.vs);\n index++;\n }\n return index;\n}\n\nfunction compareWithBias(bias) {\n return function (entryV, entryW) {\n if (entryV.barycenter < entryW.barycenter) {\n return -1;\n } else if (entryV.barycenter > entryW.barycenter) {\n return 1;\n }\n\n return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;\n };\n}\n", "import * as _ from 'lodash-es';\nimport { barycenter } from './barycenter.js';\nimport { resolveConflicts } from './resolve-conflicts.js';\nimport { sort } from './sort.js';\n\nexport { sortSubgraph };\n\nfunction sortSubgraph(g, v, cg, biasRight) {\n var movable = g.children(v);\n var node = g.node(v);\n var bl = node ? node.borderLeft : undefined;\n var br = node ? node.borderRight : undefined;\n var subgraphs = {};\n\n if (bl) {\n movable = _.filter(movable, function (w) {\n return w !== bl && w !== br;\n });\n }\n\n var barycenters = barycenter(g, movable);\n _.forEach(barycenters, function (entry) {\n if (g.children(entry.v).length) {\n var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight);\n subgraphs[entry.v] = subgraphResult;\n if (Object.prototype.hasOwnProperty.call(subgraphResult, 'barycenter')) {\n mergeBarycenters(entry, subgraphResult);\n }\n }\n });\n\n var entries = resolveConflicts(barycenters, cg);\n expandSubgraphs(entries, subgraphs);\n\n var result = sort(entries, biasRight);\n\n if (bl) {\n result.vs = _.flatten([bl, result.vs, br]);\n if (g.predecessors(bl).length) {\n var blPred = g.node(g.predecessors(bl)[0]),\n brPred = g.node(g.predecessors(br)[0]);\n if (!Object.prototype.hasOwnProperty.call(result, 'barycenter')) {\n result.barycenter = 0;\n result.weight = 0;\n }\n result.barycenter =\n (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2);\n result.weight += 2;\n }\n }\n\n return result;\n}\n\nfunction expandSubgraphs(entries, subgraphs) {\n _.forEach(entries, function (entry) {\n entry.vs = _.flatten(\n entry.vs.map(function (v) {\n if (subgraphs[v]) {\n return subgraphs[v].vs;\n }\n return v;\n }),\n );\n });\n}\n\nfunction mergeBarycenters(target, other) {\n if (!_.isUndefined(target.barycenter)) {\n target.barycenter =\n (target.barycenter * target.weight + other.barycenter * other.weight) /\n (target.weight + other.weight);\n target.weight += other.weight;\n } else {\n target.barycenter = other.barycenter;\n target.weight = other.weight;\n }\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../../graphlib/index.js';\nimport * as util from '../util.js';\nimport { addSubgraphConstraints } from './add-subgraph-constraints.js';\nimport { buildLayerGraph } from './build-layer-graph.js';\nimport { crossCount } from './cross-count.js';\nimport { initOrder } from './init-order.js';\nimport { sortSubgraph } from './sort-subgraph.js';\n\nexport { order };\n\n/*\n * Applies heuristics to minimize edge crossings in the graph and sets the best\n * order solution as an order attribute on each node.\n *\n * Pre-conditions:\n *\n * 1. Graph must be DAG\n * 2. Graph nodes must be objects with a \"rank\" attribute\n * 3. Graph edges must have the \"weight\" attribute\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have an \"order\" attribute based on the results of the\n * algorithm.\n */\nfunction order(g) {\n var maxRank = util.maxRank(g),\n downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), 'inEdges'),\n upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), 'outEdges');\n\n var layering = initOrder(g);\n assignOrder(g, layering);\n\n var bestCC = Number.POSITIVE_INFINITY,\n best;\n\n for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {\n sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2);\n\n layering = util.buildLayerMatrix(g);\n var cc = crossCount(g, layering);\n if (cc < bestCC) {\n lastBest = 0;\n best = _.cloneDeep(layering);\n bestCC = cc;\n }\n }\n\n assignOrder(g, best);\n}\n\nfunction buildLayerGraphs(g, ranks, relationship) {\n return _.map(ranks, function (rank) {\n return buildLayerGraph(g, rank, relationship);\n });\n}\n\nfunction sweepLayerGraphs(layerGraphs, biasRight) {\n var cg = new Graph();\n _.forEach(layerGraphs, function (lg) {\n var root = lg.graph().root;\n var sorted = sortSubgraph(lg, root, cg, biasRight);\n _.forEach(sorted.vs, function (v, i) {\n lg.node(v).order = i;\n });\n addSubgraphConstraints(lg, cg, sorted.vs);\n });\n}\n\nfunction assignOrder(g, layering) {\n _.forEach(layering, function (layer) {\n _.forEach(layer, function (v, i) {\n g.node(v).order = i;\n });\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { parentDummyChains };\n\nfunction parentDummyChains(g) {\n var postorderNums = postorder(g);\n\n _.forEach(g.graph().dummyChains, function (v) {\n var node = g.node(v);\n var edgeObj = node.edgeObj;\n var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);\n var path = pathData.path;\n var lca = pathData.lca;\n var pathIdx = 0;\n var pathV = path[pathIdx];\n var ascending = true;\n\n while (v !== edgeObj.w) {\n node = g.node(v);\n\n if (ascending) {\n while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) {\n pathIdx++;\n }\n\n if (pathV === lca) {\n ascending = false;\n }\n }\n\n if (!ascending) {\n while (\n pathIdx < path.length - 1 &&\n g.node((pathV = path[pathIdx + 1])).minRank <= node.rank\n ) {\n pathIdx++;\n }\n pathV = path[pathIdx];\n }\n\n g.setParent(v, pathV);\n v = g.successors(v)[0];\n }\n });\n}\n\n// Find a path from v to w through the lowest common ancestor (LCA). Return the\n// full path and the LCA.\nfunction findPath(g, postorderNums, v, w) {\n var vPath = [];\n var wPath = [];\n var low = Math.min(postorderNums[v].low, postorderNums[w].low);\n var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);\n var parent;\n var lca;\n\n // Traverse up from v to find the LCA\n parent = v;\n do {\n parent = g.parent(parent);\n vPath.push(parent);\n } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim));\n lca = parent;\n\n // Traverse from w to LCA\n parent = w;\n while ((parent = g.parent(parent)) !== lca) {\n wPath.push(parent);\n }\n\n return { path: vPath.concat(wPath.reverse()), lca: lca };\n}\n\nfunction postorder(g) {\n var result = {};\n var lim = 0;\n\n function dfs(v) {\n var low = lim;\n _.forEach(g.children(v), dfs);\n result[v] = { low: low, lim: lim++ };\n }\n _.forEach(g.children(), dfs);\n\n return result;\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../../graphlib/index.js';\nimport * as util from '../util.js';\n\n/*\n * This module provides coordinate assignment based on Brandes and K\u00F6pf, \"Fast\n * and Simple Horizontal Coordinate Assignment.\"\n */\n\nexport {\n positionX,\n findType1Conflicts,\n findType2Conflicts,\n addConflict,\n hasConflict,\n verticalAlignment,\n horizontalCompaction,\n alignCoordinates,\n findSmallestWidthAlignment,\n balance,\n};\n\n/*\n * Marks all edges in the graph with a type-1 conflict with the \"type1Conflict\"\n * property. A type-1 conflict is one where a non-inner segment crosses an\n * inner segment. An inner segment is an edge with both incident nodes marked\n * with the \"dummy\" property.\n *\n * This algorithm scans layer by layer, starting with the second, for type-1\n * conflicts between the current layer and the previous layer. For each layer\n * it scans the nodes from left to right until it reaches one that is incident\n * on an inner segment. It then scans predecessors to determine if they have\n * edges that cross that inner segment. At the end a final scan is done for all\n * nodes on the current rank to see if they cross the last visited inner\n * segment.\n *\n * This algorithm (safely) assumes that a dummy node will only be incident on a\n * single node in the layers being scanned.\n */\nfunction findType1Conflicts(g, layering) {\n var conflicts = {};\n\n function visitLayer(prevLayer, layer) {\n var // last visited node in the previous layer that is incident on an inner\n // segment.\n k0 = 0,\n // Tracks the last node in this layer scanned for crossings with a type-1\n // segment.\n scanPos = 0,\n prevLayerLength = prevLayer.length,\n lastNode = _.last(layer);\n\n _.forEach(layer, function (v, i) {\n var w = findOtherInnerSegmentNode(g, v),\n k1 = w ? g.node(w).order : prevLayerLength;\n\n if (w || v === lastNode) {\n _.forEach(layer.slice(scanPos, i + 1), function (scanNode) {\n _.forEach(g.predecessors(scanNode), function (u) {\n var uLabel = g.node(u),\n uPos = uLabel.order;\n if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) {\n addConflict(conflicts, u, scanNode);\n }\n });\n });\n // @ts-expect-error\n scanPos = i + 1;\n k0 = k1;\n }\n });\n\n return layer;\n }\n\n _.reduce(layering, visitLayer);\n return conflicts;\n}\n\nfunction findType2Conflicts(g, layering) {\n var conflicts = {};\n\n function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {\n var v;\n _.forEach(_.range(southPos, southEnd), function (i) {\n v = south[i];\n if (g.node(v).dummy) {\n _.forEach(g.predecessors(v), function (u) {\n var uNode = g.node(u);\n if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) {\n addConflict(conflicts, u, v);\n }\n });\n }\n });\n }\n\n function visitLayer(north, south) {\n var prevNorthPos = -1,\n nextNorthPos,\n southPos = 0;\n\n _.forEach(south, function (v, southLookahead) {\n if (g.node(v).dummy === 'border') {\n var predecessors = g.predecessors(v);\n if (predecessors.length) {\n nextNorthPos = g.node(predecessors[0]).order;\n scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos);\n // @ts-expect-error\n southPos = southLookahead;\n prevNorthPos = nextNorthPos;\n }\n }\n scan(south, southPos, south.length, nextNorthPos, north.length);\n });\n\n return south;\n }\n\n _.reduce(layering, visitLayer);\n return conflicts;\n}\n\nfunction findOtherInnerSegmentNode(g, v) {\n if (g.node(v).dummy) {\n return _.find(g.predecessors(v), function (u) {\n return g.node(u).dummy;\n });\n }\n}\n\nfunction addConflict(conflicts, v, w) {\n if (v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n\n var conflictsV = conflicts[v];\n if (!conflictsV) {\n conflicts[v] = conflictsV = {};\n }\n conflictsV[w] = true;\n}\n\nfunction hasConflict(conflicts, v, w) {\n if (v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n return !!conflicts[v] && Object.prototype.hasOwnProperty.call(conflicts[v], w);\n}\n\n/*\n * Try to align nodes into vertical \"blocks\" where possible. This algorithm\n * attempts to align a node with one of its median neighbors. If the edge\n * connecting a neighbor is a type-1 conflict then we ignore that possibility.\n * If a previous node has already formed a block with a node after the node\n * we're trying to form a block with, we also ignore that possibility - our\n * blocks would be split in that scenario.\n */\nfunction verticalAlignment(g, layering, conflicts, neighborFn) {\n var root = {},\n align = {},\n pos = {};\n\n // We cache the position here based on the layering because the graph and\n // layering may be out of sync. The layering matrix is manipulated to\n // generate different extreme alignments.\n _.forEach(layering, function (layer) {\n _.forEach(layer, function (v, order) {\n root[v] = v;\n align[v] = v;\n pos[v] = order;\n });\n });\n\n _.forEach(layering, function (layer) {\n var prevIdx = -1;\n _.forEach(layer, function (v) {\n var ws = neighborFn(v);\n if (ws.length) {\n ws = _.sortBy(ws, function (w) {\n return pos[w];\n });\n var mp = (ws.length - 1) / 2;\n for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {\n var w = ws[i];\n if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) {\n align[w] = v;\n align[v] = root[v] = root[w];\n prevIdx = pos[w];\n }\n }\n }\n });\n });\n\n return { root: root, align: align };\n}\n\nfunction horizontalCompaction(g, layering, root, align, reverseSep) {\n // This portion of the algorithm differs from BK due to a number of problems.\n // Instead of their algorithm we construct a new block graph and do two\n // sweeps. The first sweep places blocks with the smallest possible\n // coordinates. The second sweep removes unused space by moving blocks to the\n // greatest coordinates without violating separation.\n var xs = {},\n blockG = buildBlockGraph(g, layering, root, reverseSep),\n borderType = reverseSep ? 'borderLeft' : 'borderRight';\n\n function iterate(setXsFunc, nextNodesFunc) {\n var stack = blockG.nodes();\n var elem = stack.pop();\n var visited = {};\n while (elem) {\n if (visited[elem]) {\n setXsFunc(elem);\n } else {\n visited[elem] = true;\n stack.push(elem);\n stack = stack.concat(nextNodesFunc(elem));\n }\n\n elem = stack.pop();\n }\n }\n\n // First pass, assign smallest coordinates\n function pass1(elem) {\n xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) {\n return Math.max(acc, xs[e.v] + blockG.edge(e));\n }, 0);\n }\n\n // Second pass, assign greatest coordinates\n function pass2(elem) {\n var min = blockG.outEdges(elem).reduce(function (acc, e) {\n return Math.min(acc, xs[e.w] - blockG.edge(e));\n }, Number.POSITIVE_INFINITY);\n\n var node = g.node(elem);\n if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {\n xs[elem] = Math.max(xs[elem], min);\n }\n }\n\n iterate(pass1, blockG.predecessors.bind(blockG));\n iterate(pass2, blockG.successors.bind(blockG));\n\n // Assign x coordinates to all nodes\n _.forEach(align, function (v) {\n xs[v] = xs[root[v]];\n });\n\n return xs;\n}\n\nfunction buildBlockGraph(g, layering, root, reverseSep) {\n var blockGraph = new Graph(),\n graphLabel = g.graph(),\n sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep);\n\n _.forEach(layering, function (layer) {\n var u;\n _.forEach(layer, function (v) {\n var vRoot = root[v];\n blockGraph.setNode(vRoot);\n if (u) {\n var uRoot = root[u],\n prevMax = blockGraph.edge(uRoot, vRoot);\n blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));\n }\n u = v;\n });\n });\n\n return blockGraph;\n}\n\n/*\n * Returns the alignment that has the smallest width of the given alignments.\n */\nfunction findSmallestWidthAlignment(g, xss) {\n return _.minBy(_.values(xss), function (xs) {\n var max = Number.NEGATIVE_INFINITY;\n var min = Number.POSITIVE_INFINITY;\n\n _.forIn(xs, function (x, v) {\n var halfWidth = width(g, v) / 2;\n\n max = Math.max(x + halfWidth, max);\n min = Math.min(x - halfWidth, min);\n });\n\n return max - min;\n });\n}\n\n/*\n * Align the coordinates of each of the layout alignments such that\n * left-biased alignments have their minimum coordinate at the same point as\n * the minimum coordinate of the smallest width alignment and right-biased\n * alignments have their maximum coordinate at the same point as the maximum\n * coordinate of the smallest width alignment.\n */\nfunction alignCoordinates(xss, alignTo) {\n var alignToVals = _.values(alignTo),\n alignToMin = _.min(alignToVals),\n alignToMax = _.max(alignToVals);\n\n _.forEach(['u', 'd'], function (vert) {\n _.forEach(['l', 'r'], function (horiz) {\n var alignment = vert + horiz,\n xs = xss[alignment],\n delta;\n if (xs === alignTo) return;\n\n var xsVals = _.values(xs);\n delta = horiz === 'l' ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals);\n\n if (delta) {\n xss[alignment] = _.mapValues(xs, function (x) {\n return x + delta;\n });\n }\n });\n });\n}\n\nfunction balance(xss, align) {\n return _.mapValues(xss.ul, function (ignore, v) {\n if (align) {\n return xss[align.toLowerCase()][v];\n } else {\n var xs = _.sortBy(_.map(xss, v));\n return (xs[1] + xs[2]) / 2;\n }\n });\n}\n\nfunction positionX(g) {\n var layering = util.buildLayerMatrix(g);\n var conflicts = _.merge(findType1Conflicts(g, layering), findType2Conflicts(g, layering));\n\n var xss = {};\n var adjustedLayering;\n _.forEach(['u', 'd'], function (vert) {\n adjustedLayering = vert === 'u' ? layering : _.values(layering).reverse();\n _.forEach(['l', 'r'], function (horiz) {\n if (horiz === 'r') {\n adjustedLayering = _.map(adjustedLayering, function (inner) {\n return _.values(inner).reverse();\n });\n }\n\n var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g);\n var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn);\n var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r');\n if (horiz === 'r') {\n xs = _.mapValues(xs, function (x) {\n return -x;\n });\n }\n xss[vert + horiz] = xs;\n });\n });\n\n var smallestWidth = findSmallestWidthAlignment(g, xss);\n alignCoordinates(xss, smallestWidth);\n return balance(xss, g.graph().align);\n}\n\nfunction sep(nodeSep, edgeSep, reverseSep) {\n return function (g, v, w) {\n var vLabel = g.node(v);\n var wLabel = g.node(w);\n var sum = 0;\n var delta;\n\n sum += vLabel.width / 2;\n if (Object.prototype.hasOwnProperty.call(vLabel, 'labelpos')) {\n switch (vLabel.labelpos.toLowerCase()) {\n case 'l':\n delta = -vLabel.width / 2;\n break;\n case 'r':\n delta = vLabel.width / 2;\n break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n\n sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;\n sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;\n\n sum += wLabel.width / 2;\n if (Object.prototype.hasOwnProperty.call(wLabel, 'labelpos')) {\n switch (wLabel.labelpos.toLowerCase()) {\n case 'l':\n delta = wLabel.width / 2;\n break;\n case 'r':\n delta = -wLabel.width / 2;\n break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n\n return sum;\n };\n}\n\nfunction width(g, v) {\n return g.node(v).width;\n}\n", "import * as _ from 'lodash-es';\nimport * as util from '../util.js';\nimport { positionX } from './bk.js';\n\nexport { position };\n\nfunction position(g) {\n g = util.asNonCompoundGraph(g);\n\n positionY(g);\n _.forOwn(positionX(g), function (x, v) {\n g.node(v).x = x;\n });\n}\n\nfunction positionY(g) {\n var layering = util.buildLayerMatrix(g);\n var rankSep = g.graph().ranksep;\n var prevY = 0;\n _.forEach(layering, function (layer) {\n var maxHeight = _.max(\n _.map(layer, function (v) {\n return g.node(v).height;\n }),\n );\n _.forEach(layer, function (v) {\n g.node(v).y = prevY + maxHeight / 2;\n });\n prevY += maxHeight + rankSep;\n });\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../graphlib/index.js';\nimport { addBorderSegments } from './add-border-segments.js';\nimport * as coordinateSystem from './coordinate-system.js';\nimport * as acyclic from './acyclic.js';\nimport * as normalize from './normalize.js';\nimport { rank } from './rank/index.js';\nimport * as nestingGraph from './nesting-graph.js';\nimport { order } from './order/index.js';\nimport { parentDummyChains } from './parent-dummy-chains.js';\nimport { position } from './position/index.js';\nimport * as util from './util.js';\n\nexport { layout };\n\nfunction layout(g, opts) {\n var time = opts && opts.debugTiming ? util.time : util.notime;\n time('layout', () => {\n var layoutGraph = time(' buildLayoutGraph', () => buildLayoutGraph(g));\n time(' runLayout', () => runLayout(layoutGraph, time));\n time(' updateInputGraph', () => updateInputGraph(g, layoutGraph));\n });\n}\n\nfunction runLayout(g, time) {\n time(' makeSpaceForEdgeLabels', () => makeSpaceForEdgeLabels(g));\n time(' removeSelfEdges', () => removeSelfEdges(g));\n time(' acyclic', () => acyclic.run(g));\n time(' nestingGraph.run', () => nestingGraph.run(g));\n time(' rank', () => rank(util.asNonCompoundGraph(g)));\n time(' injectEdgeLabelProxies', () => injectEdgeLabelProxies(g));\n time(' removeEmptyRanks', () => util.removeEmptyRanks(g));\n time(' nestingGraph.cleanup', () => nestingGraph.cleanup(g));\n time(' normalizeRanks', () => util.normalizeRanks(g));\n time(' assignRankMinMax', () => assignRankMinMax(g));\n time(' removeEdgeLabelProxies', () => removeEdgeLabelProxies(g));\n time(' normalize.run', () => normalize.run(g));\n time(' parentDummyChains', () => parentDummyChains(g));\n time(' addBorderSegments', () => addBorderSegments(g));\n time(' order', () => order(g));\n time(' insertSelfEdges', () => insertSelfEdges(g));\n time(' adjustCoordinateSystem', () => coordinateSystem.adjust(g));\n time(' position', () => position(g));\n time(' positionSelfEdges', () => positionSelfEdges(g));\n time(' removeBorderNodes', () => removeBorderNodes(g));\n time(' normalize.undo', () => normalize.undo(g));\n time(' fixupEdgeLabelCoords', () => fixupEdgeLabelCoords(g));\n time(' undoCoordinateSystem', () => coordinateSystem.undo(g));\n time(' translateGraph', () => translateGraph(g));\n time(' assignNodeIntersects', () => assignNodeIntersects(g));\n time(' reversePoints', () => reversePointsForReversedEdges(g));\n time(' acyclic.undo', () => acyclic.undo(g));\n}\n\n/*\n * Copies final layout information from the layout graph back to the input\n * graph. This process only copies whitelisted attributes from the layout graph\n * to the input graph, so it serves as a good place to determine what\n * attributes can influence layout.\n */\nfunction updateInputGraph(inputGraph, layoutGraph) {\n _.forEach(inputGraph.nodes(), function (v) {\n var inputLabel = inputGraph.node(v);\n var layoutLabel = layoutGraph.node(v);\n\n if (inputLabel) {\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n\n if (layoutGraph.children(v).length) {\n inputLabel.width = layoutLabel.width;\n inputLabel.height = layoutLabel.height;\n }\n }\n });\n\n _.forEach(inputGraph.edges(), function (e) {\n var inputLabel = inputGraph.edge(e);\n var layoutLabel = layoutGraph.edge(e);\n\n inputLabel.points = layoutLabel.points;\n if (Object.prototype.hasOwnProperty.call(layoutLabel, 'x')) {\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n }\n });\n\n inputGraph.graph().width = layoutGraph.graph().width;\n inputGraph.graph().height = layoutGraph.graph().height;\n}\n\nvar graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy'];\nvar graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' };\nvar graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align'];\nvar nodeNumAttrs = ['width', 'height'];\nvar nodeDefaults = { width: 0, height: 0 };\nvar edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset'];\nvar edgeDefaults = {\n minlen: 1,\n weight: 1,\n width: 0,\n height: 0,\n labeloffset: 10,\n labelpos: 'r',\n};\nvar edgeAttrs = ['labelpos'];\n\n/*\n * Constructs a new graph from the input graph, which can be used for layout.\n * This process copies only whitelisted attributes from the input graph to the\n * layout graph. Thus this function serves as a good place to determine what\n * attributes can influence layout.\n */\nfunction buildLayoutGraph(inputGraph) {\n var g = new Graph({ multigraph: true, compound: true });\n var graph = canonicalize(inputGraph.graph());\n\n g.setGraph(\n _.merge({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), _.pick(graph, graphAttrs)),\n );\n\n _.forEach(inputGraph.nodes(), function (v) {\n var node = canonicalize(inputGraph.node(v));\n g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults));\n g.setParent(v, inputGraph.parent(v));\n });\n\n _.forEach(inputGraph.edges(), function (e) {\n var edge = canonicalize(inputGraph.edge(e));\n g.setEdge(\n e,\n _.merge({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), _.pick(edge, edgeAttrs)),\n );\n });\n\n return g;\n}\n\n/*\n * This idea comes from the Gansner paper: to account for edge labels in our\n * layout we split each rank in half by doubling minlen and halving ranksep.\n * Then we can place labels at these mid-points between nodes.\n *\n * We also add some minimal padding to the width to push the label for the edge\n * away from the edge itself a bit.\n */\nfunction makeSpaceForEdgeLabels(g) {\n var graph = g.graph();\n graph.ranksep /= 2;\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n edge.minlen *= 2;\n if (edge.labelpos.toLowerCase() !== 'c') {\n if (graph.rankdir === 'TB' || graph.rankdir === 'BT') {\n edge.width += edge.labeloffset;\n } else {\n edge.height += edge.labeloffset;\n }\n }\n });\n}\n\n/*\n * Creates temporary dummy nodes that capture the rank in which each edge's\n * label is going to, if it has one of non-zero width and height. We do this\n * so that we can safely remove empty ranks while preserving balance for the\n * label's position.\n */\nfunction injectEdgeLabelProxies(g) {\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (edge.width && edge.height) {\n var v = g.node(e.v);\n var w = g.node(e.w);\n var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e };\n util.addDummyNode(g, 'edge-proxy', label, '_ep');\n }\n });\n}\n\nfunction assignRankMinMax(g) {\n var maxRank = 0;\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n if (node.borderTop) {\n node.minRank = g.node(node.borderTop).rank;\n node.maxRank = g.node(node.borderBottom).rank;\n // @ts-expect-error\n maxRank = _.max(maxRank, node.maxRank);\n }\n });\n g.graph().maxRank = maxRank;\n}\n\nfunction removeEdgeLabelProxies(g) {\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n if (node.dummy === 'edge-proxy') {\n g.edge(node.e).labelRank = node.rank;\n g.removeNode(v);\n }\n });\n}\n\nfunction translateGraph(g) {\n var minX = Number.POSITIVE_INFINITY;\n var maxX = 0;\n var minY = Number.POSITIVE_INFINITY;\n var maxY = 0;\n var graphLabel = g.graph();\n var marginX = graphLabel.marginx || 0;\n var marginY = graphLabel.marginy || 0;\n\n function getExtremes(attrs) {\n var x = attrs.x;\n var y = attrs.y;\n var w = attrs.width;\n var h = attrs.height;\n minX = Math.min(minX, x - w / 2);\n maxX = Math.max(maxX, x + w / 2);\n minY = Math.min(minY, y - h / 2);\n maxY = Math.max(maxY, y + h / 2);\n }\n\n _.forEach(g.nodes(), function (v) {\n getExtremes(g.node(v));\n });\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (Object.prototype.hasOwnProperty.call(edge, 'x')) {\n getExtremes(edge);\n }\n });\n\n minX -= marginX;\n minY -= marginY;\n\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n node.x -= minX;\n node.y -= minY;\n });\n\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n _.forEach(edge.points, function (p) {\n p.x -= minX;\n p.y -= minY;\n });\n if (Object.prototype.hasOwnProperty.call(edge, 'x')) {\n edge.x -= minX;\n }\n if (Object.prototype.hasOwnProperty.call(edge, 'y')) {\n edge.y -= minY;\n }\n });\n\n graphLabel.width = maxX - minX + marginX;\n graphLabel.height = maxY - minY + marginY;\n}\n\nfunction assignNodeIntersects(g) {\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n var nodeV = g.node(e.v);\n var nodeW = g.node(e.w);\n var p1, p2;\n if (!edge.points) {\n edge.points = [];\n p1 = nodeW;\n p2 = nodeV;\n } else {\n p1 = edge.points[0];\n p2 = edge.points[edge.points.length - 1];\n }\n edge.points.unshift(util.intersectRect(nodeV, p1));\n edge.points.push(util.intersectRect(nodeW, p2));\n });\n}\n\nfunction fixupEdgeLabelCoords(g) {\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (Object.prototype.hasOwnProperty.call(edge, 'x')) {\n if (edge.labelpos === 'l' || edge.labelpos === 'r') {\n edge.width -= edge.labeloffset;\n }\n switch (edge.labelpos) {\n case 'l':\n edge.x -= edge.width / 2 + edge.labeloffset;\n break;\n case 'r':\n edge.x += edge.width / 2 + edge.labeloffset;\n break;\n }\n }\n });\n}\n\nfunction reversePointsForReversedEdges(g) {\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (edge.reversed) {\n edge.points.reverse();\n }\n });\n}\n\nfunction removeBorderNodes(g) {\n _.forEach(g.nodes(), function (v) {\n if (g.children(v).length) {\n var node = g.node(v);\n var t = g.node(node.borderTop);\n var b = g.node(node.borderBottom);\n var l = g.node(_.last(node.borderLeft));\n var r = g.node(_.last(node.borderRight));\n\n node.width = Math.abs(r.x - l.x);\n node.height = Math.abs(b.y - t.y);\n node.x = l.x + node.width / 2;\n node.y = t.y + node.height / 2;\n }\n });\n\n _.forEach(g.nodes(), function (v) {\n if (g.node(v).dummy === 'border') {\n g.removeNode(v);\n }\n });\n}\n\nfunction removeSelfEdges(g) {\n _.forEach(g.edges(), function (e) {\n if (e.v === e.w) {\n var node = g.node(e.v);\n if (!node.selfEdges) {\n node.selfEdges = [];\n }\n node.selfEdges.push({ e: e, label: g.edge(e) });\n g.removeEdge(e);\n }\n });\n}\n\nfunction insertSelfEdges(g) {\n var layers = util.buildLayerMatrix(g);\n _.forEach(layers, function (layer) {\n var orderShift = 0;\n _.forEach(layer, function (v, i) {\n var node = g.node(v);\n node.order = i + orderShift;\n _.forEach(node.selfEdges, function (selfEdge) {\n util.addDummyNode(\n g,\n 'selfedge',\n {\n width: selfEdge.label.width,\n height: selfEdge.label.height,\n rank: node.rank,\n order: i + ++orderShift,\n e: selfEdge.e,\n label: selfEdge.label,\n },\n '_se',\n );\n });\n delete node.selfEdges;\n });\n });\n}\n\nfunction positionSelfEdges(g) {\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n if (node.dummy === 'selfedge') {\n var selfNode = g.node(node.e.v);\n var x = selfNode.x + selfNode.width / 2;\n var y = selfNode.y;\n var dx = node.x - x;\n var dy = selfNode.height / 2;\n g.setEdge(node.e, node.label);\n g.removeNode(v);\n node.label.points = [\n { x: x + (2 * dx) / 3, y: y - dy },\n { x: x + (5 * dx) / 6, y: y - dy },\n { x: x + dx, y: y },\n { x: x + (5 * dx) / 6, y: y + dy },\n { x: x + (2 * dx) / 3, y: y + dy },\n ];\n node.label.x = node.x;\n node.label.y = node.y;\n }\n });\n}\n\nfunction selectNumberAttrs(obj, attrs) {\n return _.mapValues(_.pick(obj, attrs), Number);\n}\n\nfunction canonicalize(attrs) {\n var newAttrs = {};\n _.forEach(attrs, function (v, k) {\n newAttrs[k.toLowerCase()] = v;\n });\n return newAttrs;\n}\n", "import * as acyclic from './acyclic.js';\nimport { layout } from './layout.js';\nimport * as normalize from './normalize.js';\nimport { rank } from './rank/index.js';\n\nexport { acyclic, normalize, rank, layout };\n", "import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\nexport { write, read };\n\nfunction write(g) {\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n", "/** Decorates with functions required by mermaids dagre-wrapper. */\nimport { log } from '../../../logger.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\n\nexport let clusterDb = new Map();\nlet descendants = new Map();\nlet parents = new Map();\n\nexport const clear = () => {\n descendants.clear();\n parents.clear();\n clusterDb.clear();\n};\n\nconst isDescendant = (id, ancestorId) => {\n const ancestorDescendants = descendants.get(ancestorId) || [];\n log.trace('In isDescendant', ancestorId, ' ', id, ' = ', ancestorDescendants.includes(id));\n return ancestorDescendants.includes(id);\n};\n\nconst edgeInCluster = (edge, clusterId) => {\n const clusterDescendants = descendants.get(clusterId) || [];\n log.info('Descendants of ', clusterId, ' is ', clusterDescendants);\n log.info('Edge is ', edge);\n if (edge.v === clusterId || edge.w === clusterId) {\n return false;\n }\n\n if (!clusterDescendants) {\n log.debug('Tilt, ', clusterId, ',not in descendants');\n return false;\n }\n\n return (\n clusterDescendants.includes(edge.v) ||\n isDescendant(edge.v, clusterId) ||\n isDescendant(edge.w, clusterId) ||\n clusterDescendants.includes(edge.w)\n );\n};\n\nconst copy = (clusterId, graph, newGraph, rootId) => {\n log.warn(\n 'Copying children of ',\n clusterId,\n 'root',\n rootId,\n 'data',\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n\n log.warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes);\n\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info('cp ', node, ' to ', rootId, ' with parent ', clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn('Setting parent', node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n\n if (clusterId !== rootId && node !== clusterId) {\n log.debug('Setting parent', node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n log.debug(\n 'Not Setting parent for node=',\n node,\n 'cluster!==rootId',\n clusterId !== rootId,\n 'node!==clusterId',\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug('Copying Edges', edges);\n edges.forEach((edge) => {\n log.info('Edge', edge);\n const data = graph.edge(edge.v, edge.w, edge.name);\n log.info('Edge data', data, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info('Copying as ', edge.v, edge.w, data, edge.name);\n newGraph.setEdge(edge.v, edge.w, data, edge.name);\n log.info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n 'Skipping copy of edge ',\n edge.v,\n '-->',\n edge.w,\n ' rootId: ',\n rootId,\n ' clusterId:',\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug('Removing node', node);\n graph.removeNode(node);\n });\n};\n\nexport const extractDescendants = (id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n\n for (const child of children) {\n parents.set(child, id);\n res = [...res, ...extractDescendants(child, graph)];\n }\n\n return res;\n};\n\nexport const validate = (graph) => {\n const edges = graph.edges();\n log.trace('Edges: ', edges);\n for (const edge of edges) {\n if (graph.children(edge.v).length > 0) {\n log.trace('The node ', edge.v, ' is part of and edge even though it has children');\n return false;\n }\n if (graph.children(edge.w).length > 0) {\n log.trace('The node ', edge.w, ' is part of and edge even though it has children');\n return false;\n }\n }\n return true;\n};\n\nconst findCommonEdges = (graph, id1, id2) => {\n const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);\n const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);\n const edges1Prim = edges1.map((edge) => {\n return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };\n });\n const edges2Prim = edges2.map((edge) => {\n return { v: edge.v, w: edge.w };\n });\n const result = edges1Prim.filter((edgeIn1) => {\n return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);\n });\n\n return result;\n};\n\nexport const findNonClusterChild = (id, graph, clusterId) => {\n const children = graph.children(id);\n log.trace('Searching children of id ', id, children);\n if (children.length < 1) {\n return id;\n }\n let reserve;\n for (const child of children) {\n const _id = findNonClusterChild(child, graph, clusterId);\n\n const commonEdges = findCommonEdges(graph, clusterId, _id);\n\n if (_id) {\n if (commonEdges.length > 0) {\n reserve = _id;\n } else {\n return _id;\n }\n }\n }\n return reserve;\n};\n\nconst getAnchorId = (id) => {\n if (!clusterDb.has(id)) {\n return id;\n }\n if (!clusterDb.get(id).externalConnections) {\n return id;\n }\n\n if (clusterDb.has(id)) {\n return clusterDb.get(id).id;\n }\n return id;\n};\n\nexport const adjustClustersAndEdges = (graph, depth) => {\n if (!graph || depth > 10) {\n log.debug('Opting out, no graph ');\n return;\n } else {\n log.debug('Opting in, graph ');\n }\n\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n 'Cluster identified',\n id,\n ' Replacement id in edges: ',\n findNonClusterChild(id, graph, id)\n );\n descendants.set(id, extractDescendants(id, graph));\n clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });\n }\n });\n\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug('Cluster identified', id, descendants);\n edges.forEach((edge) => {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n\n if (d1 ^ d2) {\n log.warn('Edge: ', edge, ' leaves cluster ', id);\n log.warn('Descendants of XXX ', id, ': ', descendants.get(id));\n clusterDb.get(id).externalConnections = true;\n }\n });\n } else {\n log.debug('Not a cluster ', id, descendants);\n }\n });\n\n for (let id of clusterDb.keys()) {\n const nonClusterChild = clusterDb.get(id).id;\n const parent = graph.parent(nonClusterChild);\n\n if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {\n clusterDb.get(id).id = parent;\n }\n }\n\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n\n let v = e.v;\n let w = e.w;\n log.warn(\n 'Fix XXX',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translating: ',\n clusterDb.get(e.v),\n ' --- ',\n clusterDb.get(e.w)\n );\n if (clusterDb.get(e.v) || clusterDb.get(e.w)) {\n log.warn('Fixing and trying - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb.get(parent).externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb.get(parent).externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn('Fix Replacing with XXX', v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn('Adjusted Graph', graphlibJson.write(graph));\n extractor(graph, 0);\n\n log.trace(clusterDb);\n};\n\nexport const extractor = (graph, depth) => {\n log.warn('extractor - ', depth, graphlibJson.write(graph), graph.children('D'));\n if (depth > 10) {\n log.error('Bailing out');\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n\n if (!hasChildren) {\n log.debug('Done, no node has children', graph.nodes());\n return;\n }\n log.debug('Nodes = ', nodes, depth);\n for (const node of nodes) {\n log.debug(\n 'Extracting node',\n node,\n clusterDb,\n clusterDb.has(node) && !clusterDb.get(node).externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children('D'),\n ' Depth ',\n depth\n );\n if (!clusterDb.has(node)) {\n log.debug('Not a cluster', node, depth);\n } else if (\n !clusterDb.get(node).externalConnections &&\n graph.children(node) &&\n graph.children(node).length > 0\n ) {\n log.warn(\n 'Cluster without external connections, without a parent and with children',\n node,\n depth\n );\n\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === 'TB' ? 'LR' : 'TB';\n if (clusterDb.get(node)?.clusterData?.dir) {\n dir = clusterDb.get(node).clusterData.dir;\n log.warn('Fixing dir', clusterDb.get(node).clusterData.dir, dir);\n }\n\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir,\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n log.warn('Old graph before copy', graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb.get(node).clusterData,\n label: clusterDb.get(node).label,\n graph: clusterGraph,\n });\n log.warn('New graph after copy node: (', node, ')', graphlibJson.write(clusterGraph));\n log.debug('Old graph after copy', graphlibJson.write(graph));\n } else {\n log.warn(\n 'Cluster ** ',\n node,\n ' **not meeting the criteria !externalConnections:',\n !clusterDb.get(node).externalConnections,\n ' no parent: ',\n !graph.parent(node),\n ' children ',\n graph.children(node) && graph.children(node).length > 0,\n graph.children('D'),\n depth\n );\n log.debug(clusterDb);\n }\n }\n\n nodes = graph.nodes();\n log.warn('New list of nodes', nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(' Now next level', node, data);\n if (data?.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n};\n\nconst sorter = (graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign([], nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n\n return result;\n};\n\nexport const sortNodesByHierarchy = (graph) => sorter(graph, graph.children());\n", "import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport insertMarkers from '../../rendering-elements/markers.js';\nimport { updateNodeBounds } from '../../rendering-elements/shapes/util.js';\nimport {\n clear as clearGraphlib,\n clusterDb,\n adjustClustersAndEdges,\n findNonClusterChild,\n sortNodesByHierarchy,\n} from './mermaid-graphlib.js';\nimport {\n insertNode,\n positionNode,\n clear as clearNodes,\n setNodeElem,\n} from '../../rendering-elements/nodes.js';\nimport { insertCluster, clear as clearClusters } from '../../rendering-elements/clusters.js';\nimport {\n insertEdgeLabel,\n positionEdgeLabel,\n insertEdge,\n clear as clearEdges,\n} from '../../rendering-elements/edges.js';\nimport { log } from '../../../logger.js';\nimport { getSubGraphTitleMargins } from '../../../utils/subGraphTitleMargins.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\n\nconst recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.warn('Graph in recursive render:XAX', graphlibJson.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace('Dir in recursive render - dir:', dir);\n\n const elem = _elem.insert('g').attr('class', 'root');\n if (!graph.nodes()) {\n log.info('No nodes found for', graph);\n } else {\n log.info('Recursive render XXX', graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.info('Recursive edges', graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert('g').attr('class', 'clusters');\n const edgePaths = elem.insert('g').attr('class', 'edgePaths');\n const edgeLabels = elem.insert('g').attr('class', 'edgeLabels');\n const nodes = elem.insert('g').attr('class', 'nodes');\n\n // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated\n // to the abstract node and is later used by dagre for the layout\n await Promise.all(\n graph.nodes().map(async function (v) {\n const node = graph.node(v);\n if (parentCluster !== undefined) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n // data.clusterPositioning = true;\n log.trace(\n 'Setting data for parent cluster XXX\\n Node.id = ',\n v,\n '\\n data=',\n data.height,\n '\\nParent cluster',\n parentCluster.height\n );\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace('Setting parent', v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n // const children = graph.children(v);\n log.info('Cluster identified XBX', v, node.width, graph.node(v));\n\n // `node.graph.setGraph` applies the graph configurations such as nodeSpacing to subgraphs as without this the default values would be used\n // We override only the `ranksep` and `nodesep` configurations to allow for setting subgraph spacing while avoiding overriding other properties\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep: ranksep + 25,\n nodesep,\n });\n\n // \"o\" will contain the full cluster not just the children\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n // node.height = o.diff;\n node.diff = o.diff || 0;\n log.info(\n 'New compound node after recursive render XAX',\n v,\n 'width',\n // node,\n node.width,\n 'height',\n node.height\n // node.x,\n // node.y\n );\n setNodeElem(newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n // This is a cluster but not to be rendered recursively\n // Render as before\n log.trace(\n 'Cluster - the non recursive path XBX',\n v,\n node.id,\n node,\n node.width,\n 'Graph:',\n graph\n );\n log.trace(findNonClusterChild(node.id, graph));\n clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });\n // insertCluster(clusters, graph.node(v));\n } else {\n log.trace('Node - the non recursive path XAX', v, nodes, graph.node(v), dir);\n await insertNode(nodes, graph.node(v), { config: siteConfig, dir });\n }\n }\n })\n );\n\n const processEdges = async () => {\n const edgePromises = graph.edges().map(async function (e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e)));\n\n // Check if link is either from or to a cluster\n log.info(\n 'Fix',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translating: ',\n clusterDb.get(e.v),\n clusterDb.get(e.w)\n );\n await insertEdgeLabel(edgeLabels, edge);\n });\n\n await Promise.all(edgePromises);\n };\n\n await processEdges();\n\n log.info('Graph before layout:', JSON.stringify(graphlibJson.write(graph)));\n\n log.info('############################################# XXX');\n log.info('### Layout ### XXX');\n log.info('############################################# XXX');\n\n dagreLayout(graph);\n\n log.info('Graph after layout:', JSON.stringify(graphlibJson.write(graph)));\n // Move the nodes to the correct place\n let diff = 0;\n let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n await Promise.all(\n sortNodesByHierarchy(graph).map(async function (v) {\n const node = graph.node(v);\n log.info(\n 'Position XBX => ' + v + ': (' + node.x,\n ',' + node.y,\n ') width: ',\n node.width,\n ' height: ',\n node.height\n );\n if (node?.clusterNode) {\n // Adjust for padding when on root level\n node.y += subGraphTitleTotalMargin;\n\n log.info(\n 'A tainted cluster node XBX1',\n v,\n node.id,\n node.width,\n node.height,\n node.x,\n node.y,\n graph.parent(v)\n );\n clusterDb.get(node.id).node = node;\n positionNode(node);\n } else {\n // A tainted cluster node\n if (graph.children(v).length > 0) {\n log.info(\n 'A pure cluster node XBX1',\n v,\n node.id,\n node.x,\n node.y,\n node.width,\n node.height,\n graph.parent(v)\n );\n node.height += subGraphTitleTotalMargin;\n graph.node(node.parentId);\n const halfPadding = node?.padding / 2 || 0;\n const labelHeight = node?.labelBBox?.height || 0;\n const offsetY = labelHeight - halfPadding || 0;\n log.debug('OffsetY', offsetY, 'labelHeight', labelHeight, 'halfPadding', halfPadding);\n await insertCluster(clusters, node);\n\n // A cluster in the non-recursive way\n clusterDb.get(node.id).node = node;\n } else {\n // Regular node\n const parent = graph.node(node.parentId);\n node.y += subGraphTitleTotalMargin / 2;\n log.info(\n 'A regular node XBX1 - using the padding',\n node.id,\n 'parent',\n node.parentId,\n node.width,\n node.height,\n node.x,\n node.y,\n 'offsetY',\n node.offsetY,\n 'parent',\n parent,\n parent?.offsetY,\n node\n );\n\n positionNode(node);\n }\n }\n })\n );\n\n // Move the edge labels to the correct place after layout\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge);\n\n edge.points.forEach((point) => (point.y += subGraphTitleTotalMargin / 2));\n const startNode = graph.node(e.v);\n var endNode = graph.node(e.w);\n const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);\n positionEdgeLabel(edge, paths);\n });\n\n graph.nodes().forEach(function (v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.isGroup) {\n diff = n.diff;\n }\n });\n log.warn('Returning from recursive render XAX', elem, diff);\n return { elem, diff };\n};\n\nexport const render = async (data4Layout, svg) => {\n const graph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: data4Layout.direction,\n nodesep:\n data4Layout.config?.nodeSpacing ||\n data4Layout.config?.flowchart?.nodeSpacing ||\n data4Layout.nodeSpacing,\n ranksep:\n data4Layout.config?.rankSpacing ||\n data4Layout.config?.flowchart?.rankSpacing ||\n data4Layout.rankSpacing,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n const element = svg.select('g');\n insertMarkers(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);\n clearNodes();\n clearEdges();\n clearClusters();\n clearGraphlib();\n\n data4Layout.nodes.forEach((node) => {\n graph.setNode(node.id, { ...node });\n if (node.parentId) {\n graph.setParent(node.id, node.parentId);\n }\n });\n\n log.debug('Edges:', data4Layout.edges);\n data4Layout.edges.forEach((edge) => {\n // Handle self-loops\n if (edge.start === edge.end) {\n const nodeId = edge.start;\n const specialId1 = nodeId + '---' + nodeId + '---1';\n const specialId2 = nodeId + '---' + nodeId + '---2';\n const node = graph.node(nodeId);\n graph.setNode(specialId1, {\n domId: specialId1,\n id: specialId1,\n parentId: node.parentId,\n labelStyle: '',\n label: '',\n padding: 0,\n shape: 'labelRect',\n // shape: 'rect',\n style: '',\n width: 10,\n height: 10,\n });\n graph.setParent(specialId1, node.parentId);\n graph.setNode(specialId2, {\n domId: specialId2,\n id: specialId2,\n parentId: node.parentId,\n labelStyle: '',\n padding: 0,\n // shape: 'rect',\n shape: 'labelRect',\n label: '',\n style: '',\n width: 10,\n height: 10,\n });\n graph.setParent(specialId2, node.parentId);\n\n const edge1 = structuredClone(edge);\n const edgeMid = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = '';\n edge1.arrowTypeEnd = 'none';\n edge1.id = nodeId + '-cyclic-special-1';\n edgeMid.arrowTypeEnd = 'none';\n edgeMid.id = nodeId + '-cyclic-special-mid';\n edge2.label = '';\n if (node.isGroup) {\n edge1.fromCluster = nodeId;\n edge2.toCluster = nodeId;\n }\n edge2.id = nodeId + '-cyclic-special-2';\n graph.setEdge(nodeId, specialId1, edge1, nodeId + '-cyclic-special-0');\n graph.setEdge(specialId1, specialId2, edgeMid, nodeId + '-cyclic-special-1');\n graph.setEdge(specialId2, nodeId, edge2, nodeId + '-cyc;\n}\n\nexport type LayoutLoader = () => Promise;\nexport interface LayoutLoaderDefinition {\n name: string;\n loader: LayoutLoader;\n algorithm?: string;\n}\n\nconst layoutAlgorithms: Record = {};\n\nexport const registerLayoutLoaders = (loaders: LayoutLoaderDefinition[]) => {\n for (const loader of loaders) {\n layoutAlgorithms[loader.name] = loader;\n }\n};\n\n// TODO: Should we load dagre without lazy loading?\nconst registerDefaultLayoutLoaders = () => {\n registerLayoutLoaders([\n {\n name: 'dagre',\n loader: async () => await import('./layout-algorithms/dagre/index.js'),\n },\n ]);\n};\n\nregisterDefaultLayoutLoaders();\n\nexport const render = async (data4Layout: LayoutData, svg: SVG) => {\n if (!(data4Layout.layoutAlgorithm in layoutAlgorithms)) {\n throw new Error(`Unknown layout algorithm: ${data4Layout.layoutAlgorithm}`);\n }\n\n const layoutDefinition = layoutAlgorithms[data4Layout.layoutAlgorithm];\n const layoutRenderer = await layoutDefinition.loader();\n return layoutRenderer.render(data4Layout, svg, internalHelpers, {\n algorithm: layoutDefinition.algorithm,\n });\n};\n\n/**\n * Get the registered layout algorithm. If the algorithm is not registered, use the fallback algorithm.\n */\nexport const getRegisteredLayoutAlgorithm = (algorithm = '', { fallback = 'dagre' } = {}) => {\n if (algorithm in layoutAlgorithms) {\n return algorithm;\n }\n if (fallback in layoutAlgorithms) {\n log.warn(`Layout algorithm ${algorithm} is not registered. Using ${fallback} as fallback.`);\n return fallback;\n }\n throw new Error(`Both layout algorithms ${algorithm} and ${fallback} are not registered.`);\n};\n", "import { configureSvgSize } from '../setupGraphViewbox.js';\nimport type { SVG } from '../diagram-api/types.js';\nimport { log } from '../logger.js';\n\nexport const setupViewPortForSVG = (\n svg: SVG,\n padding: number,\n cssDiagram: string,\n useMaxWidth: boolean\n) => {\n // Initialize the SVG element and set the diagram class\n svg.attr('class', cssDiagram);\n\n // Calculate the dimensions and position with padding\n const { width, height, x, y } = calculateDimensionsWithPadding(svg, padding);\n\n // Configure the size and aspect ratio of the SVG\n configureSvgSize(svg, height, width, useMaxWidth);\n\n // Update the viewBox to ensure all content is visible with padding\n const viewBox = createViewBox(x, y, width, height, padding);\n svg.attr('viewBox', viewBox);\n\n // Log the viewBox configuration for debugging\n log.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);\n};\n\nconst calculateDimensionsWithPadding = (svg: SVG, padding: number) => {\n const bounds = svg.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };\n return {\n width: bounds.width + padding * 2,\n height: bounds.height + padding * 2,\n x: bounds.x,\n y: bounds.y,\n };\n};\n\nconst createViewBox = (x: number, y: number, width: number, height: number, padding: number) => {\n return `${x - padding} ${y - padding} ${width} ${height}`;\n};\n", "import { select } from 'd3';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DiagramStyleClassDef } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { getDiagramElement } from '../../rendering-util/insertElementsForSize.js';\nimport { getRegisteredLayoutAlgorithm, render } from '../../rendering-util/render.js';\nimport { setupViewPortForSVG } from '../../rendering-util/setupViewPortForSVG.js';\nimport type { LayoutData } from '../../rendering-util/types.js';\nimport utils from '../../utils.js';\nimport { getDirection } from './flowDb.js';\n\nexport const getClasses = function (\n text: string,\n diagramObj: any\n): Map {\n return diagramObj.db.getClasses();\n};\n\nexport const draw = async function (text: string, id: string, _version: string, diag: any) {\n log.info('REF0:');\n log.info('Drawing state diagram (v2)', id);\n const { securityLevel, flowchart: conf, layout } = getConfig();\n\n // Handle root and document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n\n // @ts-ignore - document is always available\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // The getData method provided in all supported diagrams is used to extract the data from the parsed structure\n // into the Layout data format\n log.debug('Before getData: ');\n const data4Layout = diag.db.getData() as LayoutData;\n log.debug('Data: ', data4Layout);\n // Create the root SVG\n const svg = getDiagramElement(id, securityLevel);\n const direction = getDirection();\n\n data4Layout.type = diag.type;\n data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);\n if (data4Layout.layoutAlgorithm === 'dagre' && layout === 'elk') {\n log.warn(\n 'flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.'\n );\n }\n data4Layout.direction = direction;\n data4Layout.nodeSpacing = conf?.nodeSpacing || 50;\n data4Layout.rankSpacing = conf?.rankSpacing || 50;\n data4Layout.markers = ['point', 'circle', 'cross'];\n\n data4Layout.diagramId = id;\n log.debug('REF1:', data4Layout);\n await render(data4Layout, svg);\n const padding = data4Layout.config.flowchart?.diagramPadding ?? 8;\n utils.insertTitle(\n svg,\n 'flowchartTitleText',\n conf?.titleTopMargin || 0,\n diag.db.getDiagramTitle()\n );\n setupViewPortForSVG(svg, padding, 'flowchart', conf?.useMaxWidth || false);\n\n // If node has a link, wrap it in an anchor SVG object.\n for (const vertex of data4Layout.nodes) {\n const node = select(`#${id} [id=\"${vertex.id}\"]`);\n if (!node || !vertex.link) {\n continue;\n }\n const link = doc.createElementNS('http://www.w3.org/2000/svg', 'a');\n link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.cssClasses);\n link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n if (securityLevel === 'sandbox') {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', '_top');\n } else if (vertex.linkTarget) {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);\n }\n\n const linkNode = node.insert(function () {\n return link;\n }, ':first-child');\n\n const shape = node.select('.label-container');\n if (shape) {\n linkNode.append(function () {\n return shape.node();\n });\n }\n\n const label = node.select('.label');\n if (label) {\n linkNode.append(function () {\n return label.node();\n });\n }\n }\n};\n\nexport default {\n getClasses,\n draw,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,3],$V2=[1,5],$V3=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],$V4=[2,2],$V5=[1,13],$V6=[1,14],$V7=[1,15],$V8=[1,16],$V9=[1,23],$Va=[1,25],$Vb=[1,26],$Vc=[1,27],$Vd=[1,49],$Ve=[1,48],$Vf=[1,29],$Vg=[1,30],$Vh=[1,31],$Vi=[1,32],$Vj=[1,33],$Vk=[1,44],$Vl=[1,46],$Vm=[1,42],$Vn=[1,47],$Vo=[1,43],$Vp=[1,50],$Vq=[1,45],$Vr=[1,51],$Vs=[1,52],$Vt=[1,34],$Vu=[1,35],$Vv=[1,36],$Vw=[1,37],$Vx=[1,57],$Vy=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],$Vz=[1,61],$VA=[1,60],$VB=[1,62],$VC=[8,9,11,75,77],$VD=[1,77],$VE=[1,90],$VF=[1,95],$VG=[1,94],$VH=[1,91],$VI=[1,87],$VJ=[1,93],$VK=[1,89],$VL=[1,96],$VM=[1,92],$VN=[1,97],$VO=[1,88],$VP=[8,9,10,11,40,75,77],$VQ=[8,9,10,11,40,46,75,77],$VR=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],$VS=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],$VT=[44,60,88,101,104,105,108,110,113,114,115],$VU=[1,123],$VV=[1,122],$VW=[1,130],$VX=[1,144],$VY=[1,145],$VZ=[1,146],$V_=[1,147],$V$=[1,132],$V01=[1,134],$V11=[1,138],$V21=[1,139],$V31=[1,140],$V41=[1,141],$V51=[1,142],$V61=[1,143],$V71=[1,148],$V81=[1,149],$V91=[1,128],$Va1=[1,129],$Vb1=[1,136],$Vc1=[1,131],$Vd1=[1,135],$Ve1=[1,133],$Vf1=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],$Vg1=[1,151],$Vh1=[1,153],$Vi1=[8,9,11],$Vj1=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],$Vk1=[1,173],$Vl1=[1,169],$Vm1=[1,170],$Vn1=[1,174],$Vo1=[1,171],$Vp1=[1,172],$Vq1=[77,115,118],$Vr1=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],$Vs1=[10,105],$Vt1=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],$Vu1=[1,242],$Vv1=[1,240],$Vw1=[1,244],$Vx1=[1,238],$Vy1=[1,239],$Vz1=[1,241],$VA1=[1,243],$VB1=[1,245],$VC1=[1,263],$VD1=[8,9,11,105],$VE1=[8,9,10,11,60,83,104,105,108,109,110,111];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"graphConfig\":4,\"document\":5,\"line\":6,\"statement\":7,\"SEMI\":8,\"NEWLINE\":9,\"SPACE\":10,\"EOF\":11,\"GRAPH\":12,\"NODIR\":13,\"DIR\":14,\"FirstStmtSeparator\":15,\"ending\":16,\"endToken\":17,\"spaceList\":18,\"spaceListNewline\":19,\"vertexStatement\":20,\"separator\":21,\"styleStatement\":22,\"linkStyleStatement\":23,\"classDefStatement\":24,\"classStatement\":25,\"clickStatement\":26,\"subgraph\":27,\"textNoTags\":28,\"SQS\":29,\"text\":30,\"SQE\":31,\"end\":32,\"direction\":33,\"acc_title\":34,\"acc_title_value\":35,\"acc_descr\":36,\"acc_descr_value\":37,\"acc_descr_multiline_value\":38,\"shapeData\":39,\"SHAPE_DATA\":40,\"link\":41,\"node\":42,\"styledVertex\":43,\"AMP\":44,\"vertex\":45,\"STYLE_SEPARATOR\":46,\"idString\":47,\"DOUBLECIRCLESTART\":48,\"DOUBLECIRCLEEND\":49,\"PS\":50,\"PE\":51,\"(-\":52,\"-)\":53,\"STADIUMSTART\":54,\"STADIUMEND\":55,\"SUBROUTINESTART\":56,\"SUBROUTINEEND\":57,\"VERTEX_WITH_PROPS_START\":58,\"NODE_STRING[field]\":59,\"COLON\":60,\"NODE_STRING[value]\":61,\"PIPE\":62,\"CYLINDERSTART\":63,\"CYLINDEREND\":64,\"DIAMOND_START\":65,\"DIAMOND_STOP\":66,\"TAGEND\":67,\"TRAPSTART\":68,\"TRAPEND\":69,\"INVTRAPSTART\":70,\"INVTRAPEND\":71,\"linkStatement\":72,\"arrowText\":73,\"TESTSTR\":74,\"START_LINK\":75,\"edgeText\":76,\"LINK\":77,\"edgeTextToken\":78,\"STR\":79,\"MD_STR\":80,\"textToken\":81,\"keywords\":82,\"STYLE\":83,\"LINKSTYLE\":84,\"CLASSDEF\":85,\"CLASS\":86,\"CLICK\":87,\"DOWN\":88,\"UP\":89,\"textNoTagsToken\":90,\"stylesOpt\":91,\"idString[vertex]\":92,\"idString[class]\":93,\"CALLBACKNAME\":94,\"CALLBACKARGS\":95,\"HREF\":96,\"LINK_TARGET\":97,\"STR[link]\":98,\"STR[tooltip]\":99,\"alphaNum\":100,\"DEFAULT\":101,\"numList\":102,\"INTERPOLATE\":103,\"NUM\":104,\"COMMA\":105,\"style\":106,\"styleComponent\":107,\"NODE_STRING\":108,\"UNIT\":109,\"BRKT\":110,\"PCT\":111,\"idStringToken\":112,\"MINUS\":113,\"MULT\":114,\"UNICODE_TEXT\":115,\"TEXT\":116,\"TAGSTART\":117,\"EDGE_TEXT\":118,\"alphaNumToken\":119,\"direction_tb\":120,\"direction_bt\":121,\"direction_rl\":122,\"direction_lr\":123,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",8:\"SEMI\",9:\"NEWLINE\",10:\"SPACE\",11:\"EOF\",12:\"GRAPH\",13:\"NODIR\",14:\"DIR\",27:\"subgraph\",29:\"SQS\",31:\"SQE\",32:\"end\",34:\"acc_title\",35:\"acc_title_value\",36:\"acc_descr\",37:\"acc_descr_value\",38:\"acc_descr_multiline_value\",40:\"SHAPE_DATA\",44:\"AMP\",46:\"STYLE_SEPARATOR\",48:\"DOUBLECIRCLESTART\",49:\"DOUBLECIRCLEEND\",50:\"PS\",51:\"PE\",52:\"(-\",53:\"-)\",54:\"STADIUMSTART\",55:\"STADIUMEND\",56:\"SUBROUTINESTART\",57:\"SUBROUTINEEND\",58:\"VERTEX_WITH_PROPS_START\",59:\"NODE_STRING[field]\",60:\"COLON\",61:\"NODE_STRING[value]\",62:\"PIPE\",63:\"CYLINDERSTART\",64:\"CYLINDEREND\",65:\"DIAMOND_START\",66:\"DIAMOND_STOP\",67:\"TAGEND\",68:\"TRAPSTART\",69:\"TRAPEND\",70:\"INVTRAPSTART\",71:\"INVTRAPEND\",74:\"TESTSTR\",75:\"START_LINK\",77:\"LINK\",79:\"STR\",80:\"MD_STR\",83:\"STYLE\",84:\"LINKSTYLE\",85:\"CLASSDEF\",86:\"CLASS\",87:\"CLICK\",88:\"DOWN\",89:\"UP\",92:\"idString[vertex]\",93:\"idString[class]\",94:\"CALLBACKNAME\",95:\"CALLBACKARGS\",96:\"HREF\",97:\"LINK_TARGET\",98:\"STR[link]\",99:\"STR[tooltip]\",101:\"DEFAULT\",103:\"INTERPOLATE\",104:\"NUM\",105:\"COMMA\",108:\"NODE_STRING\",109:\"UNIT\",110:\"BRKT\",111:\"PCT\",113:\"MINUS\",114:\"MULT\",115:\"UNICODE_TEXT\",116:\"TEXT\",117:\"TAGSTART\",118:\"EDGE_TEXT\",120:\"direction_tb\",121:\"direction_bt\",122:\"direction_rl\",123:\"direction_lr\"},\nproductions_: [0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 2:\n this.$ = [];\nbreak;\ncase 3:\n\n\t if(!Array.isArray($$[$0]) || $$[$0].length > 0){\n\t $$[$0-1].push($$[$0]);\n\t }\n\t this.$=$$[$0-1];\nbreak;\ncase 4: case 181:\nthis.$=$$[$0];\nbreak;\ncase 11:\n yy.setDirection('TB');this.$ = 'TB';\nbreak;\ncase 12:\n yy.setDirection($$[$0-1]);this.$ = $$[$0-1];\nbreak;\ncase 27:\n /* console.warn('finat vs', $$[$0-1].nodes); */ this.$=$$[$0-1].nodes\nbreak;\ncase 28: case 29: case 30: case 31: case 32:\nthis.$=[];\nbreak;\ncase 33:\nthis.$=yy.addSubGraph($$[$0-6],$$[$0-1],$$[$0-4]);\nbreak;\ncase 34:\nthis.$=yy.addSubGraph($$[$0-3],$$[$0-1],$$[$0-3]);\nbreak;\ncase 35:\nthis.$=yy.addSubGraph(undefined,$$[$0-1],undefined);\nbreak;\ncase 37:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 38: case 39:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 43:\n this.$ = $$[$0-1] + $$[$0]; \nbreak;\ncase 44:\n this.$ = $$[$0]; \nbreak;\ncase 45:\n /* console.warn('vs shapeData',$$[$0-3].stmt,$$[$0-1], $$[$0]);*/ yy.addVertex($$[$0-1][0],undefined,undefined,undefined, undefined,undefined, undefined,$$[$0]); yy.addLink($$[$0-3].stmt,$$[$0-1],$$[$0-2]); this.$ = { stmt: $$[$0-1], nodes: $$[$0-1].concat($$[$0-3].nodes) } \nbreak;\ncase 46:\n /*console.warn('vs',$$[$0-2].stmt,$$[$0]);*/ yy.addLink($$[$0-2].stmt,$$[$0],$$[$0-1]); this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0-2].nodes) } \nbreak;\ncase 47:\n /* console.warn('vs',$$[$0-3].stmt,$$[$0-1]); */ yy.addLink($$[$0-3].stmt,$$[$0-1],$$[$0-2]); this.$ = { stmt: $$[$0-1], nodes: $$[$0-1].concat($$[$0-3].nodes) } \nbreak;\ncase 48:\n /*console.warn('vertexStatement: node spaceList', $$[$0-1]);*/ this.$ = {stmt: $$[$0-1], nodes:$$[$0-1] }\nbreak;\ncase 49:\n\n /*console.warn('vertexStatement: node shapeData', $$[$0-1][0], $$[$0]);*/\n yy.addVertex($$[$0-1][0],undefined,undefined,undefined, undefined,undefined, undefined,$$[$0]);\n this.$ = {stmt: $$[$0-1], nodes:$$[$0-1], shapeData: $$[$0]}\n \nbreak;\ncase 50:\n /* console.warn('vertexStatement: single node', $$[$0]); */ this.$ = {stmt: $$[$0], nodes:$$[$0] }\nbreak;\ncase 51:\n /*console.warn('nod', $$[$0]);*/ this.$ = [$$[$0]];\nbreak;\ncase 52:\n yy.addVertex($$[$0-5][0],undefined,undefined,undefined, undefined,undefined, undefined,$$[$0-4]); this.$ = $$[$0-5].concat($$[$0]); /*console.warn('pip2', $$[$0-5][0], $$[$0], this.$);*/ \nbreak;\ncase 53:\n this.$ = $$[$0-4].concat($$[$0]); /*console.warn('pip', $$[$0-4][0], $$[$0], this.$);*/ \nbreak;\ncase 54:\n /* console.warn('nodc', $$[$0]);*/ this.$ = $$[$0];\nbreak;\ncase 55:\nthis.$ = $$[$0-2];yy.setClass($$[$0-2],$$[$0])\nbreak;\ncase 56:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'square');\nbreak;\ncase 57:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'doublecircle');\nbreak;\ncase 58:\nthis.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'circle');\nbreak;\ncase 59:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'ellipse');\nbreak;\ncase 60:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'stadium');\nbreak;\ncase 61:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'subroutine');\nbreak;\ncase 62:\nthis.$ = $$[$0-7];yy.addVertex($$[$0-7],$$[$0-1],'rect',undefined,undefined,undefined, Object.fromEntries([[$$[$0-5], $$[$0-3]]]));\nbreak;\ncase 63:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'cylinder');\nbreak;\ncase 64:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'round');\nbreak;\ncase 65:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'diamond');\nbreak;\ncase 66:\nthis.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'hexagon');\nbreak;\ncase 67:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'odd');\nbreak;\ncase 68:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'trapezoid');\nbreak;\ncase 69:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'inv_trapezoid');\nbreak;\ncase 70:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_right');\nbreak;\ncase 71:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_left');\nbreak;\ncase 72:\n /*console.warn('h: ', $$[$0]);*/this.$ = $$[$0];yy.addVertex($$[$0]);\nbreak;\ncase 73:\n$$[$0-1].text = $$[$0];this.$ = $$[$0-1];\nbreak;\ncase 74: case 75:\n$$[$0-2].text = $$[$0-1];this.$ = $$[$0-2];\nbreak;\ncase 76:\nthis.$ = $$[$0];\nbreak;\ncase 77:\nvar inf = yy.destructLink($$[$0], $$[$0-2]); this.$ = {\"type\":inf.type,\"stroke\":inf.stroke,\"length\":inf.length,\"text\":$$[$0-1]};\nbreak;\ncase 78:\nthis.$={text:$$[$0], type:'text'};\nbreak;\ncase 79:\nthis.$={text:$$[$0-1].text+''+$$[$0], type:$$[$0-1].type};\nbreak;\ncase 80:\nthis.$={text: $$[$0], type: 'string'};\nbreak;\ncase 81:\nthis.$={text:$$[$0], type:'markdown'};\nbreak;\ncase 82:\nvar inf = yy.destructLink($$[$0]);this.$ = {\"type\":inf.type,\"stroke\":inf.stroke,\"length\":inf.length};\nbreak;\ncase 83:\nthis.$ = $$[$0-1];\nbreak;\ncase 84:\n this.$={text:$$[$0], type: 'text'};\nbreak;\ncase 85:\n this.$={text:$$[$0-1].text+''+$$[$0], type: $$[$0-1].type};\nbreak;\ncase 86:\n this.$ = {text: $$[$0], type: 'string'};\nbreak;\ncase 87: case 102:\n this.$={text: $$[$0], type: 'markdown'};\nbreak;\ncase 99:\nthis.$={text:$$[$0], type: 'text'};\nbreak;\ncase 100:\nthis.$={text:$$[$0-1].text+''+$$[$0], type: $$[$0-1].type};\nbreak;\ncase 101:\n this.$={text: $$[$0], type: 'text'};\nbreak;\ncase 103:\nthis.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);\nbreak;\ncase 104:\nthis.$ = $$[$0-4];yy.setClass($$[$0-2], $$[$0]);\nbreak;\ncase 105: case 113:\nthis.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0]);\nbreak;\ncase 106: case 114:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 107:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 108:\nthis.$ = $$[$0-4];yy.setClickEvent($$[$0-4], $$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-4], $$[$0]);\nbreak;\ncase 109:\nthis.$ = $$[$0-2];yy.setLink($$[$0-2], $$[$0]);\nbreak;\ncase 110:\nthis.$ = $$[$0-4];yy.setLink($$[$0-4], $$[$0-2]);yy.setTooltip($$[$0-4], $$[$0]);\nbreak;\ncase 111:\nthis.$ = $$[$0-4];yy.setLink($$[$0-4], $$[$0-2], $$[$0]);\nbreak;\ncase 112:\nthis.$ = $$[$0-6];yy.setLink($$[$0-6], $$[$0-4], $$[$0]);yy.setTooltip($$[$0-6], $$[$0-2]);\nbreak;\ncase 115:\nthis.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 116:\nthis.$ = $$[$0-3];yy.setLink($$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 117:\nthis.$ = $$[$0-3];yy.setLink($$[$0-3], $$[$0-2], $$[$0]);\nbreak;\ncase 118:\nthis.$ = $$[$0-5];yy.setLink($$[$0-5], $$[$0-4], $$[$0]);yy.setTooltip($$[$0-5], $$[$0-2]);\nbreak;\ncase 119:\nthis.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]);\nbreak;\ncase 120:\nthis.$ = $$[$0-4];yy.updateLink([$$[$0-2]],$$[$0]);\nbreak;\ncase 121:\nthis.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);\nbreak;\ncase 122:\nthis.$ = $$[$0-8];yy.updateLinkInterpolate([$$[$0-6]],$$[$0-2]);yy.updateLink([$$[$0-6]],$$[$0]);\nbreak;\ncase 123:\nthis.$ = $$[$0-8];yy.updateLinkInterpolate($$[$0-6],$$[$0-2]);yy.updateLink($$[$0-6],$$[$0]);\nbreak;\ncase 124:\nthis.$ = $$[$0-6];yy.updateLinkInterpolate([$$[$0-4]],$$[$0]);\nbreak;\ncase 125:\nthis.$ = $$[$0-6];yy.updateLinkInterpolate($$[$0-4],$$[$0]);\nbreak;\ncase 126: case 128:\nthis.$ = [$$[$0]]\nbreak;\ncase 127: case 129:\n$$[$0-2].push($$[$0]);this.$ = $$[$0-2];\nbreak;\ncase 131:\nthis.$ = $$[$0-1] + $$[$0];\nbreak;\ncase 179:\nthis.$=$$[$0]\nbreak;\ncase 180:\nthis.$=$$[$0-1]+''+$$[$0]\nbreak;\ncase 182:\nthis.$=$$[$0-1]+''+$$[$0];\nbreak;\ncase 183:\n this.$={stmt:'dir', value:'TB'};\nbreak;\ncase 184:\n this.$={stmt:'dir', value:'BT'};\nbreak;\ncase 185:\n this.$={stmt:'dir', value:'RL'};\nbreak;\ncase 186:\n this.$={stmt:'dir', value:'LR'};\nbreak;\n}\n},\ntable: [{3:1,4:2,9:$V0,10:$V1,12:$V2},{1:[3]},o($V3,$V4,{5:6}),{4:7,9:$V0,10:$V1,12:$V2},{4:8,9:$V0,10:$V1,12:$V2},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,33:24,34:$Va,36:$Vb,38:$Vc,42:28,43:38,44:$Vd,45:39,47:40,60:$Ve,83:$Vf,84:$Vg,85:$Vh,86:$Vi,87:$Vj,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs,120:$Vt,121:$Vu,122:$Vv,123:$Vw},o($V3,[2,9]),o($V3,[2,10]),o($V3,[2,11]),{8:[1,54],9:[1,55],10:$Vx,15:53,18:56},o($Vy,[2,3]),o($Vy,[2,4]),o($Vy,[2,5]),o($Vy,[2,6]),o($Vy,[2,7]),o($Vy,[2,8]),{8:$Vz,9:$VA,11:$VB,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:$Vz,9:$VA,11:$VB,21:66},{8:$Vz,9:$VA,11:$VB,21:67},{8:$Vz,9:$VA,11:$VB,21:68},{8:$Vz,9:$VA,11:$VB,21:69},{8:$Vz,9:$VA,11:$VB,21:70},{8:$Vz,9:$VA,10:[1,71],11:$VB,21:72},o($Vy,[2,36]),{35:[1,73]},{37:[1,74]},o($Vy,[2,39]),o($VC,[2,50],{18:75,39:76,10:$Vx,40:$VD}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:$VE,44:$VF,60:$VG,79:[1,85],88:$VH,94:[1,82],96:[1,83],100:84,104:$VI,105:$VJ,108:$VK,110:$VL,113:$VM,114:$VN,115:$VO,119:86},o($Vy,[2,183]),o($Vy,[2,184]),o($Vy,[2,185]),o($Vy,[2,186]),o($VP,[2,51]),o($VP,[2,54],{46:[1,98]}),o($VQ,[2,72],{112:111,29:[1,99],44:$Vd,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:$Ve,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,113:$Vq,114:$Vr,115:$Vs}),o($VR,[2,179]),o($VR,[2,140]),o($VR,[2,141]),o($VR,[2,142]),o($VR,[2,143]),o($VR,[2,144]),o($VR,[2,145]),o($VR,[2,146]),o($VR,[2,147]),o($VR,[2,148]),o($VR,[2,149]),o($VR,[2,150]),o($V3,[2,12]),o($V3,[2,18]),o($V3,[2,19]),{9:[1,112]},o($VS,[2,26],{18:113,10:$Vx}),o($Vy,[2,27]),{42:114,43:38,44:$Vd,45:39,47:40,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs},o($Vy,[2,40]),o($Vy,[2,41]),o($Vy,[2,42]),o($VT,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:$VU,118:$VV},o([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),o($Vy,[2,28]),o($Vy,[2,29]),o($Vy,[2,30]),o($Vy,[2,31]),o($Vy,[2,32]),{10:$VW,12:$VX,14:$VY,27:$VZ,28:124,32:$V_,44:$V$,60:$V01,75:$V11,79:[1,126],80:[1,127],82:137,83:$V21,84:$V31,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81,90:125,104:$V91,108:$Va1,110:$Vb1,113:$Vc1,114:$Vd1,115:$Ve1},o($Vf1,$V4,{5:150}),o($Vy,[2,37]),o($Vy,[2,38]),o($VC,[2,48],{44:$Vg1}),o($VC,[2,49],{18:152,10:$Vx,40:$Vh1}),o($VP,[2,44]),{44:$Vd,47:154,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs},{101:[1,155],102:156,104:[1,157]},{44:$Vd,47:158,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs},{44:$Vd,47:159,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs},o($Vi1,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},o($Vi1,[2,113],{119:164,10:[1,163],14:$VE,44:$VF,60:$VG,88:$VH,104:$VI,105:$VJ,108:$VK,110:$VL,113:$VM,114:$VN,115:$VO}),o($Vi1,[2,115],{10:[1,165]}),o($Vj1,[2,181]),o($Vj1,[2,168]),o($Vj1,[2,169]),o($Vj1,[2,170]),o($Vj1,[2,171]),o($Vj1,[2,172]),o($Vj1,[2,173]),o($Vj1,[2,174]),o($Vj1,[2,175]),o($Vj1,[2,176]),o($Vj1,[2,177]),o($Vj1,[2,178]),{44:$Vd,47:166,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs},{30:167,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{30:175,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{30:177,50:[1,176],67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{30:178,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{30:179,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{30:180,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{108:[1,181]},{30:182,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{30:183,65:[1,184],67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{30:185,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{30:186,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{30:187,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},o($VR,[2,180]),o($V3,[2,20]),o($VS,[2,25]),o($VC,[2,46],{39:188,18:189,10:$Vx,40:$VD}),o($VT,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{77:[1,193],78:194,115:$VU,118:$VV},o($Vq1,[2,78]),o($Vq1,[2,80]),o($Vq1,[2,81]),o($Vq1,[2,166]),o($Vq1,[2,167]),{8:$Vz,9:$VA,10:$VW,11:$VB,12:$VX,14:$VY,21:196,27:$VZ,29:[1,195],32:$V_,44:$V$,60:$V01,75:$V11,82:137,83:$V21,84:$V31,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81,90:197,104:$V91,108:$Va1,110:$Vb1,113:$Vc1,114:$Vd1,115:$Ve1},o($Vr1,[2,99]),o($Vr1,[2,101]),o($Vr1,[2,102]),o($Vr1,[2,155]),o($Vr1,[2,156]),o($Vr1,[2,157]),o($Vr1,[2,158]),o($Vr1,[2,159]),o($Vr1,[2,160]),o($Vr1,[2,161]),o($Vr1,[2,162]),o($Vr1,[2,163]),o($Vr1,[2,164]),o($Vr1,[2,165]),o($Vr1,[2,88]),o($Vr1,[2,89]),o($Vr1,[2,90]),o($Vr1,[2,91]),o($Vr1,[2,92]),o($Vr1,[2,93]),o($Vr1,[2,94]),o($Vr1,[2,95]),o($Vr1,[2,96]),o($Vr1,[2,97]),o($Vr1,[2,98]),{6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,32:[1,198],33:24,34:$Va,36:$Vb,38:$Vc,42:28,43:38,44:$Vd,45:39,47:40,60:$Ve,83:$Vf,84:$Vg,85:$Vh,86:$Vi,87:$Vj,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs,120:$Vt,121:$Vu,122:$Vv,123:$Vw},{10:$Vx,18:199},{44:[1,200]},o($VP,[2,43]),{10:[1,201],44:$Vd,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:111,113:$Vq,114:$Vr,115:$Vs},{10:[1,202]},{10:[1,203],105:[1,204]},o($Vs1,[2,126]),{10:[1,205],44:$Vd,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:111,113:$Vq,114:$Vr,115:$Vs},{10:[1,206],44:$Vd,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:111,113:$Vq,114:$Vr,115:$Vs},{79:[1,207]},o($Vi1,[2,107],{10:[1,208]}),o($Vi1,[2,109],{10:[1,209]}),{79:[1,210]},o($Vj1,[2,182]),{79:[1,211],97:[1,212]},o($VP,[2,55],{112:111,44:$Vd,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,113:$Vq,114:$Vr,115:$Vs}),{31:[1,213],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},o($Vt1,[2,84]),o($Vt1,[2,86]),o($Vt1,[2,87]),o($Vt1,[2,151]),o($Vt1,[2,152]),o($Vt1,[2,153]),o($Vt1,[2,154]),{49:[1,215],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{30:216,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{51:[1,217],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{53:[1,218],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{55:[1,219],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{57:[1,220],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{60:[1,221]},{64:[1,222],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{66:[1,223],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{30:224,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},{31:[1,225],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{67:$Vk1,69:[1,226],71:[1,227],81:214,115:$Vn1,116:$Vo1,117:$Vp1},{67:$Vk1,69:[1,229],71:[1,228],81:214,115:$Vn1,116:$Vo1,117:$Vp1},o($VC,[2,45],{18:152,10:$Vx,40:$Vh1}),o($VC,[2,47],{44:$Vg1}),o($VT,[2,75]),o($VT,[2,74]),{62:[1,230],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},o($VT,[2,77]),o($Vq1,[2,79]),{30:231,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},o($Vf1,$V4,{5:232}),o($Vr1,[2,100]),o($Vy,[2,35]),{43:233,44:$Vd,45:39,47:40,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs},{10:$Vx,18:234},{10:$Vu1,60:$Vv1,83:$Vw1,91:235,104:$Vx1,106:236,107:237,108:$Vy1,109:$Vz1,110:$VA1,111:$VB1},{10:$Vu1,60:$Vv1,83:$Vw1,91:246,103:[1,247],104:$Vx1,106:236,107:237,108:$Vy1,109:$Vz1,110:$VA1,111:$VB1},{10:$Vu1,60:$Vv1,83:$Vw1,91:248,103:[1,249],104:$Vx1,106:236,107:237,108:$Vy1,109:$Vz1,110:$VA1,111:$VB1},{104:[1,250]},{10:$Vu1,60:$Vv1,83:$Vw1,91:251,104:$Vx1,106:236,107:237,108:$Vy1,109:$Vz1,110:$VA1,111:$VB1},{44:$Vd,47:252,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs},o($Vi1,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},o($Vi1,[2,114]),o($Vi1,[2,116],{10:[1,256]}),o($Vi1,[2,117]),o($VQ,[2,56]),o($Vt1,[2,85]),o($VQ,[2,57]),{51:[1,257],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},o($VQ,[2,64]),o($VQ,[2,59]),o($VQ,[2,60]),o($VQ,[2,61]),{108:[1,258]},o($VQ,[2,63]),o($VQ,[2,65]),{66:[1,259],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},o($VQ,[2,67]),o($VQ,[2,68]),o($VQ,[2,70]),o($VQ,[2,69]),o($VQ,[2,71]),o([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,32:[1,261],33:24,34:$Va,36:$Vb,38:$Vc,42:28,43:38,44:$Vd,45:39,47:40,60:$Ve,83:$Vf,84:$Vg,85:$Vh,86:$Vi,87:$Vj,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs,120:$Vt,121:$Vu,122:$Vv,123:$Vw},o($VP,[2,53]),{43:262,44:$Vd,45:39,47:40,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs},o($Vi1,[2,119],{105:$VC1}),o($VD1,[2,128],{107:264,10:$Vu1,60:$Vv1,83:$Vw1,104:$Vx1,108:$Vy1,109:$Vz1,110:$VA1,111:$VB1}),o($VE1,[2,130]),o($VE1,[2,132]),o($VE1,[2,133]),o($VE1,[2,134]),o($VE1,[2,135]),o($VE1,[2,136]),o($VE1,[2,137]),o($VE1,[2,138]),o($VE1,[2,139]),o($Vi1,[2,120],{105:$VC1}),{10:[1,265]},o($Vi1,[2,121],{105:$VC1}),{10:[1,266]},o($Vs1,[2,127]),o($Vi1,[2,103],{105:$VC1}),o($Vi1,[2,104],{112:111,44:$Vd,60:$Ve,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,113:$Vq,114:$Vr,115:$Vs}),o($Vi1,[2,108]),o($Vi1,[2,110],{10:[1,267]}),o($Vi1,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:$Vz,9:$VA,11:$VB,21:272},o($Vy,[2,34]),o($VP,[2,52]),{10:$Vu1,60:$Vv1,83:$Vw1,104:$Vx1,106:273,107:237,108:$Vy1,109:$Vz1,110:$VA1,111:$VB1},o($VE1,[2,131]),{14:$VE,44:$VF,60:$VG,88:$VH,100:274,104:$VI,105:$VJ,108:$VK,110:$VL,113:$VM,114:$VN,115:$VO,119:86},{14:$VE,44:$VF,60:$VG,88:$VH,100:275,104:$VI,105:$VJ,108:$VK,110:$VL,113:$VM,114:$VN,115:$VO,119:86},{97:[1,276]},o($Vi1,[2,118]),o($VQ,[2,58]),{30:277,67:$Vk1,79:$Vl1,80:$Vm1,81:168,115:$Vn1,116:$Vo1,117:$Vp1},o($VQ,[2,66]),o($Vf1,$V4,{5:278}),o($VD1,[2,129],{107:264,10:$Vu1,60:$Vv1,83:$Vw1,104:$Vx1,108:$Vy1,109:$Vz1,110:$VA1,111:$VB1}),o($Vi1,[2,124],{119:164,10:[1,279],14:$VE,44:$VF,60:$VG,88:$VH,104:$VI,105:$VJ,108:$VK,110:$VL,113:$VM,114:$VN,115:$VO}),o($Vi1,[2,125],{119:164,10:[1,280],14:$VE,44:$VF,60:$VG,88:$VH,104:$VI,105:$VJ,108:$VK,110:$VL,113:$VM,114:$VN,115:$VO}),o($Vi1,[2,112]),{31:[1,281],67:$Vk1,81:214,115:$Vn1,116:$Vo1,117:$Vp1},{6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,32:[1,282],33:24,34:$Va,36:$Vb,38:$Vc,42:28,43:38,44:$Vd,45:39,47:40,60:$Ve,83:$Vf,84:$Vg,85:$Vh,86:$Vi,87:$Vj,88:$Vk,101:$Vl,104:$Vm,105:$Vn,108:$Vo,110:$Vp,112:41,113:$Vq,114:$Vr,115:$Vs,120:$Vt,121:$Vu,122:$Vv,123:$Vw},{10:$Vu1,60:$Vv1,83:$Vw1,91:283,104:$Vx1,106:236,107:237,108:$Vy1,109:$Vz1,110:$VA1,111:$VB1},{10:$Vu1,60:$Vv1,83:$Vw1,91:284,104:$Vx1,106:236,107:237,108:$Vy1,109:$Vz1,110:$VA1,111:$VB1},o($VQ,[2,62]),o($Vy,[2,33]),o($Vi1,[2,122],{105:$VC1}),o($Vi1,[2,123],{105:$VC1})],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin(\"acc_title\");return 34; \nbreak;\ncase 1: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 2: this.begin(\"acc_descr\");return 36; \nbreak;\ncase 3: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 4: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 5: this.popState(); \nbreak;\ncase 6:return \"acc_descr_multiline_value\";\nbreak;\ncase 7:\n // console.log('=> shapeData', yy_.yytext);\n this.pushState(\"shapeData\"); yy_.yytext=\"\"; return 40 \nbreak;\ncase 8:\n // console.log('=> shapeDataStr', yy_.yytext);\n this.pushState(\"shapeDataStr\");\n return 40;\n \nbreak;\ncase 9:\n // console.log('shapeData <==', yy_.yytext);\n this.popState(); return 40\nbreak;\ncase 10:\n // console.log('shapeData', yy_.yytext);\n const re = /\\n\\s*/g;\n yy_.yytext = yy_.yytext.replace(re,\"
    \");\n return 40\nbreak;\ncase 11:\n // console.log('shapeData', yy_.yytext);\n return 40;\n \nbreak;\ncase 12:\n // console.log('<== root', yy_.yytext)\n this.popState();\n \nbreak;\ncase 13:this.begin(\"callbackname\");\nbreak;\ncase 14:this.popState();\nbreak;\ncase 15:this.popState(); this.begin(\"callbackargs\");\nbreak;\ncase 16:return 94;\nbreak;\ncase 17:this.popState();\nbreak;\ncase 18:return 95;\nbreak;\ncase 19: return \"MD_STR\";\nbreak;\ncase 20: this.popState();\nbreak;\ncase 21: this.begin(\"md_string\");\nbreak;\ncase 22: return \"STR\"; \nbreak;\ncase 23:this.popState();\nbreak;\ncase 24:this.pushState(\"string\");\nbreak;\ncase 25:return 83;\nbreak;\ncase 26:return 101;\nbreak;\ncase 27:return 84;\nbreak;\ncase 28:return 103;\nbreak;\ncase 29:return 85;\nbreak;\ncase 30:return 86;\nbreak;\ncase 31:return 96;\nbreak;\ncase 32:this.begin(\"click\");\nbreak;\ncase 33:this.popState();\nbreak;\ncase 34:return 87;\nbreak;\ncase 35:if(yy.lex.firstGraph()){this.begin(\"dir\");} return 12;\nbreak;\ncase 36:if(yy.lex.firstGraph()){this.begin(\"dir\");} return 12;\nbreak;\ncase 37:if(yy.lex.firstGraph()){this.begin(\"dir\");} return 12;\nbreak;\ncase 38:return 27;\nbreak;\ncase 39:return 32;\nbreak;\ncase 40:return 97;\nbreak;\ncase 41:return 97;\nbreak;\ncase 42:return 97;\nbreak;\ncase 43:return 97;\nbreak;\ncase 44: this.popState(); return 13; \nbreak;\ncase 45: this.popState(); return 14; \nbreak;\ncase 46: this.popState(); return 14; \nbreak;\ncase 47: this.popState(); return 14; \nbreak;\ncase 48: this.popState(); return 14; \nbreak;\ncase 49: this.popState(); return 14; \nbreak;\ncase 50: this.popState(); return 14; \nbreak;\ncase 51: this.popState(); return 14; \nbreak;\ncase 52: this.popState(); return 14; \nbreak;\ncase 53: this.popState(); return 14; \nbreak;\ncase 54: this.popState(); return 14; \nbreak;\ncase 55:return 120;\nbreak;\ncase 56:return 121;\nbreak;\ncase 57:return 122;\nbreak;\ncase 58:return 123;\nbreak;\ncase 59:return 104;\nbreak;\ncase 60:return 110;\nbreak;\ncase 61:return 46;\nbreak;\ncase 62:return 60;\nbreak;\ncase 63:return 44;\nbreak;\ncase 64:return 8;\nbreak;\ncase 65:return 105;\nbreak;\ncase 66:return 114;\nbreak;\ncase 67: this.popState(); return 77; \nbreak;\ncase 68: this.pushState(\"edgeText\"); return 75; \nbreak;\ncase 69:return 118;\nbreak;\ncase 70: this.popState(); return 77; \nbreak;\ncase 71: this.pushState(\"thickEdgeText\"); return 75; \nbreak;\ncase 72:return 118;\nbreak;\ncase 73: this.popState(); return 77; \nbreak;\ncase 74: this.pushState(\"dottedEdgeText\"); return 75; \nbreak;\ncase 75:return 118;\nbreak;\ncase 76:return 77;\nbreak;\ncase 77: this.popState(); return 53; \nbreak;\ncase 78:return \"TEXT\"\nbreak;\ncase 79: this.pushState(\"ellipseText\"); return 52; \nbreak;\ncase 80: this.popState(); return 55; \nbreak;\ncase 81: this.pushState(\"text\"); return 54; \nbreak;\ncase 82: this.popState(); return 57; \nbreak;\ncase 83: this.pushState(\"text\"); return 56; \nbreak;\ncase 84: return 58; \nbreak;\ncase 85: this.pushState(\"text\"); return 67; \nbreak;\ncase 86: this.popState(); return 64; \nbreak;\ncase 87: this.pushState(\"text\") ;return 63; \nbreak;\ncase 88: this.popState(); return 49; \nbreak;\ncase 89: this.pushState(\"text\"); return 48; \nbreak;\ncase 90: this.popState(); return 69; \nbreak;\ncase 91: this.popState(); return 71; \nbreak;\ncase 92:return 116;\nbreak;\ncase 93: this.pushState(\"trapText\"); return 68; \nbreak;\ncase 94: this.pushState(\"trapText\"); return 70; \nbreak;\ncase 95:return 117;\nbreak;\ncase 96:return 67;\nbreak;\ncase 97:return 89;\nbreak;\ncase 98:return 'SEP';\nbreak;\ncase 99:return 88;\nbreak;\ncase 100:return 114;\nbreak;\ncase 101:return 110;\nbreak;\ncase 102:return 44;\nbreak;\ncase 103:return 108;\nbreak;\ncase 104:return 113\nbreak;\ncase 105:return 115;\nbreak;\ncase 106: this.popState(); return 62; \nbreak;\ncase 107: this.pushState(\"text\"); return 62; \nbreak;\ncase 108: this.popState(); return 51; \nbreak;\ncase 109: this.pushState(\"text\"); return 50; \nbreak;\ncase 110: this.popState(); return 31; \nbreak;\ncase 111: this.pushState(\"text\"); return 29; \nbreak;\ncase 112: this.popState(); return 66 \nbreak;\ncase 113: this.pushState(\"text\"); return 65 \nbreak;\ncase 114:return \"TEXT\";\nbreak;\ncase 115:return 'QUOTE';\nbreak;\ncase 116:return 9;\nbreak;\ncase 117:return 10;\nbreak;\ncase 118:return 11;\nbreak;\n}\n},\nrules: [/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:@\\{)/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\\\"]+)/,/^(?:[^}^\"]+)/,/^(?:\\})/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:[^`\"]+)/,/^(?:[`][\"])/,/^(?:[\"][`])/,/^(?:[^\"]+)/,/^(?:[\"])/,/^(?:[\"])/,/^(?:style\\b)/,/^(?:default\\b)/,/^(?:linkStyle\\b)/,/^(?:interpolate\\b)/,/^(?:classDef\\b)/,/^(?:class\\b)/,/^(?:href[\\s])/,/^(?:click[\\s]+)/,/^(?:[\\s\\n])/,/^(?:[^\\s\\n]*)/,/^(?:flowchart-elk\\b)/,/^(?:graph\\b)/,/^(?:flowchart\\b)/,/^(?:subgraph\\b)/,/^(?:end\\b\\s*)/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:(\\r?\\n)*\\s*\\n)/,/^(?:\\s*LR\\b)/,/^(?:\\s*RL\\b)/,/^(?:\\s*TB\\b)/,/^(?:\\s*BT\\b)/,/^(?:\\s*TD\\b)/,/^(?:\\s*BR\\b)/,/^(?:\\s*<)/,/^(?:\\s*>)/,/^(?:\\s*\\^)/,/^(?:\\s*v\\b)/,/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\\*)/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?--\\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?==\\s*)/,/^(?:[^=]|=(?!))/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?:\\s*[xo<]?-\\.\\s*)/,/^(?:[^\\.]|\\.(?!))/,/^(?:\\s*~~[\\~]+\\s*)/,/^(?:[-/\\)][\\)])/,/^(?:[^\\(\\)\\[\\]\\{\\}]|!\\)+)/,/^(?:\\(-)/,/^(?:\\]\\))/,/^(?:\\(\\[)/,/^(?:\\]\\])/,/^(?:\\[\\[)/,/^(?:\\[\\|)/,/^(?:>)/,/^(?:\\)\\])/,/^(?:\\[\\()/,/^(?:\\)\\)\\))/,/^(?:\\(\\(\\()/,/^(?:[\\\\(?=\\])][\\]])/,/^(?:\\/(?=\\])\\])/,/^(?:\\/(?!\\])|\\\\(?!\\])|[^\\\\\\[\\]\\(\\)\\{\\}\\/]+)/,/^(?:\\[\\/)/,/^(?:\\[\\\\)/,/^(?:<)/,/^(?:>)/,/^(?:\\^)/,/^(?:\\\\\\|)/,/^(?:v\\b)/,/^(?:\\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!\"\\#$%&'*+\\.`?\\\\_\\/]|-(?=[^\\>\\-\\.])|(?!))+)/,/^(?:-)/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0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0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\|)/,/^(?:\\|)/,/^(?:\\))/,/^(?:\\()/,/^(?:\\])/,/^(?:\\[)/,/^(?:(\\}))/,/^(?:\\{)/,/^(?:[^\\[\\]\\(\\)\\{\\}\\|\\\"]+)/,/^(?:\")/,/^(?:(\\r?\\n)+)/,/^(?:\\s)/,/^(?:$)/],\nconditions: {\"shapeDataEndBracket\":{\"rules\":[21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"shapeDataStr\":{\"rules\":[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"shapeData\":{\"rules\":[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"callbackargs\":{\"rules\":[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"callbackname\":{\"rules\":[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"href\":{\"rules\":[21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"click\":{\"rules\":[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"dottedEdgeText\":{\"rules\":[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"thickEdgeText\":{\"rules\":[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"edgeText\":{\"rules\":[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"trapText\":{\"rules\":[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],\"inclusive\":false},\"ellipseText\":{\"rules\":[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"text\":{\"rules\":[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],\"inclusive\":false},\"vertex\":{\"rules\":[21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"dir\":{\"rules\":[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"acc_descr\":{\"rules\":[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"acc_title\":{\"rules\":[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"md_string\":{\"rules\":[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"string\":{\"rules\":[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "// import khroma from 'khroma';\nimport * as khroma from 'khroma';\n\n/** Returns the styles given options */\nexport interface FlowChartStyleOptions {\n arrowheadColor: string;\n border2: string;\n clusterBkg: string;\n clusterBorder: string;\n edgeLabelBackground: string;\n fontFamily: string;\n lineColor: string;\n mainBkg: string;\n nodeBorder: string;\n nodeTextColor: string;\n tertiaryColor: string;\n textColor: string;\n titleColor: string;\n}\n\nconst fade = (color: string, opacity: number) => {\n // @ts-ignore TODO: incorrect types from khroma\n const channel = khroma.channel;\n\n const r = channel(color, 'r');\n const g = channel(color, 'g');\n const b = channel(color, 'b');\n\n // @ts-ignore incorrect types from khroma\n return khroma.rgba(r, g, b, opacity);\n};\n\nconst getStyles = (options: FlowChartStyleOptions) =>\n `.label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor || options.textColor};\n }\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span {\n color: ${options.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${options.nodeTextColor || options.textColor};\n color: ${options.nodeTextColor || options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${options.lineColor} !important;\n stroke-width: 0;\n stroke: ${options.lineColor};\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n p {\n background-color: ${options.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${fade(options.edgeLabelBackground, 0.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${options.clusterBkg};\n stroke: ${options.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span {\n color: ${options.titleColor};\n }\n /* .cluster div {\n color: ${options.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${options.edgeLabelBackground};\n p {\n background-color: ${options.edgeLabelBackground};\n padding: 2px;\n }\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n`;\n\nexport default getStyles;\n", "import type { MermaidConfig } from '../../config.type.js';\nimport { setConfig } from '../../diagram-api/diagramAPI.js';\nimport flowDb from './flowDb.js';\nimport renderer from './flowRenderer-v3-unified.js';\n// @ts-ignore: JISON doesn't support types\nimport flowParser from './parser/flow.jison';\nimport flowStyles from './styles.js';\n\nexport const diagram = {\n parser: flowParser,\n db: flowDb,\n renderer,\n styles: flowStyles,\n init: (cnf: MermaidConfig) => {\n if (!cnf.flowchart) {\n cnf.flowchart = {};\n }\n if (cnf.layout) {\n setConfig({ layout: cnf.layout });\n }\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });\n flowDb.clear();\n flowDb.setGen('gen-2');\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,20,22,24,26,27,28],$V1=[1,10],$V2=[1,11],$V3=[1,12],$V4=[1,13],$V5=[1,14],$V6=[1,15],$V7=[1,21],$V8=[1,22],$V9=[1,23],$Va=[1,24],$Vb=[1,25],$Vc=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],$Vd=[1,34],$Ve=[27,28,46,47],$Vf=[41,42,43,44,45],$Vg=[17,34],$Vh=[1,54],$Vi=[1,53],$Vj=[17,34,36,38];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"ER_DIAGRAM\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NEWLINE\":10,\"entityName\":11,\"relSpec\":12,\":\":13,\"role\":14,\"BLOCK_START\":15,\"attributes\":16,\"BLOCK_STOP\":17,\"SQS\":18,\"SQE\":19,\"title\":20,\"title_value\":21,\"acc_title\":22,\"acc_title_value\":23,\"acc_descr\":24,\"acc_descr_value\":25,\"acc_descr_multiline_value\":26,\"ALPHANUM\":27,\"ENTITY_NAME\":28,\"attribute\":29,\"attributeType\":30,\"attributeName\":31,\"attributeKeyTypeList\":32,\"attributeComment\":33,\"ATTRIBUTE_WORD\":34,\"attributeKeyType\":35,\"COMMA\":36,\"ATTRIBUTE_KEY\":37,\"COMMENT\":38,\"cardinality\":39,\"relType\":40,\"ZERO_OR_ONE\":41,\"ZERO_OR_MORE\":42,\"ONE_OR_MORE\":43,\"ONLY_ONE\":44,\"MD_PARENT\":45,\"NON_IDENTIFYING\":46,\"IDENTIFYING\":47,\"WORD\":48,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"ER_DIAGRAM\",6:\"EOF\",8:\"SPACE\",10:\"NEWLINE\",13:\":\",15:\"BLOCK_START\",17:\"BLOCK_STOP\",18:\"SQS\",19:\"SQE\",20:\"title\",21:\"title_value\",22:\"acc_title\",23:\"acc_title_value\",24:\"acc_descr\",25:\"acc_descr_value\",26:\"acc_descr_multiline_value\",27:\"ALPHANUM\",28:\"ENTITY_NAME\",34:\"ATTRIBUTE_WORD\",36:\"COMMA\",37:\"ATTRIBUTE_KEY\",38:\"COMMENT\",41:\"ZERO_OR_ONE\",42:\"ZERO_OR_MORE\",43:\"ONE_OR_MORE\",44:\"ONLY_ONE\",45:\"MD_PARENT\",46:\"NON_IDENTIFYING\",47:\"IDENTIFYING\",48:\"WORD\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n /*console.log('finished parsing');*/ \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\n\n yy.addEntity($$[$0-4]);\n yy.addEntity($$[$0-2]);\n yy.addRelationship($$[$0-4], $$[$0], $$[$0-2], $$[$0-3]);\n \nbreak;\ncase 9:\n\n yy.addEntity($$[$0-3]);\n yy.addAttributes($$[$0-3], $$[$0-1]);\n \nbreak;\ncase 10:\n yy.addEntity($$[$0-2]); \nbreak;\ncase 11:\n yy.addEntity($$[$0]); \nbreak;\ncase 12:\n\n yy.addEntity($$[$0-6], $$[$0-4]);\n yy.addAttributes($$[$0-6], $$[$0-1]);\n \nbreak;\ncase 13:\n yy.addEntity($$[$0-5], $$[$0-3]); \nbreak;\ncase 14:\n yy.addEntity($$[$0-3], $$[$0-1]); \nbreak;\ncase 15: case 16:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 17: case 18:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 19: case 43:\n this.$ = $$[$0]; \nbreak;\ncase 20: case 41: case 42:\n this.$ = $$[$0].replace(/\"/g, ''); \nbreak;\ncase 21: case 29:\n this.$ = [$$[$0]]; \nbreak;\ncase 22:\n $$[$0].push($$[$0-1]); this.$=$$[$0]; \nbreak;\ncase 23:\n this.$ = { attributeType: $$[$0-1], attributeName: $$[$0] }; \nbreak;\ncase 24:\n this.$ = { attributeType: $$[$0-2], attributeName: $$[$0-1], attributeKeyTypeList: $$[$0] }; \nbreak;\ncase 25:\n this.$ = { attributeType: $$[$0-2], attributeName: $$[$0-1], attributeComment: $$[$0] }; \nbreak;\ncase 26:\n this.$ = { attributeType: $$[$0-3], attributeName: $$[$0-2], attributeKeyTypeList: $$[$0-1], attributeComment: $$[$0] }; \nbreak;\ncase 27: case 28: case 31:\n this.$=$$[$0]; \nbreak;\ncase 30:\n $$[$0-2].push($$[$0]); this.$ = $$[$0-2]; \nbreak;\ncase 32:\n this.$=$$[$0].replace(/\"/g, ''); \nbreak;\ncase 33:\n\n this.$ = { cardA: $$[$0], relType: $$[$0-1], cardB: $$[$0-2] };\n /*console.log('relSpec: ' + $$[$0] + $$[$0-1] + $$[$0-2]);*/\n \nbreak;\ncase 34:\n this.$ = yy.Cardinality.ZERO_OR_ONE; \nbreak;\ncase 35:\n this.$ = yy.Cardinality.ZERO_OR_MORE; \nbreak;\ncase 36:\n this.$ = yy.Cardinality.ONE_OR_MORE; \nbreak;\ncase 37:\n this.$ = yy.Cardinality.ONLY_ONE; \nbreak;\ncase 38:\n this.$ = yy.Cardinality.MD_PARENT; \nbreak;\ncase 39:\n this.$ = yy.Identification.NON_IDENTIFYING; \nbreak;\ncase 40:\n this.$ = yy.Identification.IDENTIFYING; \nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:$V1,22:$V2,24:$V3,26:$V4,27:$V5,28:$V6},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:16,11:9,20:$V1,22:$V2,24:$V3,26:$V4,27:$V5,28:$V6},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:$V7,42:$V8,43:$V9,44:$Va,45:$Vb}),{21:[1,26]},{23:[1,27]},{25:[1,28]},o($V0,[2,18]),o($Vc,[2,19]),o($Vc,[2,20]),o($V0,[2,4]),{11:29,27:$V5,28:$V6},{16:30,17:[1,31],29:32,30:33,34:$Vd},{11:35,27:$V5,28:$V6},{40:36,46:[1,37],47:[1,38]},o($Ve,[2,34]),o($Ve,[2,35]),o($Ve,[2,36]),o($Ve,[2,37]),o($Ve,[2,38]),o($V0,[2,15]),o($V0,[2,16]),o($V0,[2,17]),{13:[1,39]},{17:[1,40]},o($V0,[2,10]),{16:41,17:[2,21],29:32,30:33,34:$Vd},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:$V7,42:$V8,43:$V9,44:$Va,45:$Vb},o($Vf,[2,39]),o($Vf,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},o($V0,[2,9]),{17:[2,22]},o($Vg,[2,23],{32:50,33:51,35:52,37:$Vh,38:$Vi}),o([17,34,37,38],[2,28]),o($V0,[2,14],{15:[1,55]}),o([27,28],[2,33]),o($V0,[2,8]),o($V0,[2,41]),o($V0,[2,42]),o($V0,[2,43]),o($Vg,[2,24],{33:56,36:[1,57],38:$Vi}),o($Vg,[2,25]),o($Vj,[2,29]),o($Vg,[2,32]),o($Vj,[2,31]),{16:58,17:[1,59],29:32,30:33,34:$Vd},o($Vg,[2,26]),{35:60,37:$Vh},{17:[1,61]},o($V0,[2,13]),o($Vj,[2,30]),o($V0,[2,12])],\ndefaultActions: {34:[2,27],41:[2,22]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin(\"acc_title\");return 22; \nbreak;\ncase 1: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 2: this.begin(\"acc_descr\");return 24; \nbreak;\ncase 3: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 4: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 5: this.popState(); \nbreak;\ncase 6:return \"acc_descr_multiline_value\";\nbreak;\ncase 7:return 10;\nbreak;\ncase 8:/* skip whitespace */\nbreak;\ncase 9:return 8;\nbreak;\ncase 10:return 28;\nbreak;\ncase 11:return 48;\nbreak;\ncase 12:return 4;\nbreak;\ncase 13: this.begin(\"block\"); return 15; \nbreak;\ncase 14:return 36;\nbreak;\ncase 15:/* skip whitespace in block */\nbreak;\ncase 16:return 37\nbreak;\ncase 17:return 34;\nbreak;\ncase 18:return 34\nbreak;\ncase 19:return 38;\nbreak;\ncase 20:/* nothing */\nbreak;\ncase 21: this.popState(); return 17; \nbreak;\ncase 22:return yy_.yytext[0];\nbreak;\ncase 23:return 18;\nbreak;\ncase 24:return 19;\nbreak;\ncase 25:return 41;\nbreak;\ncase 26:return 43;\nbreak;\ncase 27:return 43;\nbreak;\ncase 28:return 43;\nbreak;\ncase 29:return 41;\nbreak;\ncase 30:return 41;\nbreak;\ncase 31:return 42;\nbreak;\ncase 32:return 42;\nbreak;\ncase 33:return 42;\nbreak;\ncase 34:return 42;\nbreak;\ncase 35:return 42;\nbreak;\ncase 36:return 43;\nbreak;\ncase 37:return 42;\nbreak;\ncase 38:return 43;\nbreak;\ncase 39:return 44;\nbreak;\ncase 40:return 44;\nbreak;\ncase 41:return 44;\nbreak;\ncase 42:return 44;\nbreak;\ncase 43:return 41;\nbreak;\ncase 44:return 42;\nbreak;\ncase 45:return 43;\nbreak;\ncase 46:return 45;\nbreak;\ncase 47:return 46;\nbreak;\ncase 48:return 47;\nbreak;\ncase 49:return 47;\nbreak;\ncase 50:return 46;\nbreak;\ncase 51:return 46;\nbreak;\ncase 52:return 46;\nbreak;\ncase 53:return 27;\nbreak;\ncase 54:return yy_.yytext[0];\nbreak;\ncase 55:return 6;\nbreak;\n}\n},\nrules: [/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:[\\s]+)/i,/^(?:\"[^\"%\\r\\n\\v\\b\\\\]+\")/i,/^(?:\"[^\"]*\")/i,/^(?:erDiagram\\b)/i,/^(?:\\{)/i,/^(?:,)/i,/^(?:\\s+)/i,/^(?:\\b((?:PK)|(?:FK)|(?:UK))\\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\\*A-Za-z_][A-Za-z0-9\\-_\\[\\]\\(\\)]*)/i,/^(?:\"[^\"]*\")/i,/^(?:[\\n]+)/i,/^(?:\\})/i,/^(?:.)/i,/^(?:\\[)/i,/^(?:\\])/i,/^(?:one or zero\\b)/i,/^(?:one or more\\b)/i,/^(?:one or many\\b)/i,/^(?:1\\+)/i,/^(?:\\|o\\b)/i,/^(?:zero or one\\b)/i,/^(?:zero or more\\b)/i,/^(?:zero or many\\b)/i,/^(?:0\\+)/i,/^(?:\\}o\\b)/i,/^(?:many\\(0\\))/i,/^(?:many\\(1\\))/i,/^(?:many\\b)/i,/^(?:\\}\\|)/i,/^(?:one\\b)/i,/^(?:only one\\b)/i,/^(?:1\\b)/i,/^(?:\\|\\|)/i,/^(?:o\\|)/i,/^(?:o\\{)/i,/^(?:\\|\\{)/i,/^(?:\\s*u\\b)/i,/^(?:\\.\\.)/i,/^(?:--)/i,/^(?:to\\b)/i,/^(?:optionally to\\b)/i,/^(?:\\.-)/i,/^(?:-\\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\\-_]*)/i,/^(?:.)/i,/^(?:$)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[5,6],\"inclusive\":false},\"acc_descr\":{\"rules\":[3],\"inclusive\":false},\"acc_title\":{\"rules\":[1],\"inclusive\":false},\"block\":{\"rules\":[14,15,16,17,18,19,20,21,22],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\n\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\n\nlet entities = new Map();\nlet relationships = [];\n\nconst Cardinality = {\n ZERO_OR_ONE: 'ZERO_OR_ONE',\n ZERO_OR_MORE: 'ZERO_OR_MORE',\n ONE_OR_MORE: 'ONE_OR_MORE',\n ONLY_ONE: 'ONLY_ONE',\n MD_PARENT: 'MD_PARENT',\n};\n\nconst Identification = {\n NON_IDENTIFYING: 'NON_IDENTIFYING',\n IDENTIFYING: 'IDENTIFYING',\n};\n/**\n * Add entity\n * @param {string} name - The name of the entity\n * @param {string | undefined} alias - The alias of the entity\n */\nconst addEntity = function (name, alias = undefined) {\n if (!entities.has(name)) {\n entities.set(name, { attributes: [], alias });\n log.info('Added new entity :', name);\n } else if (!entities.get(name).alias && alias) {\n entities.get(name).alias = alias;\n log.info(`Add alias '${alias}' to entity '${name}'`);\n }\n\n return entities.get(name);\n};\n\nconst getEntities = () => entities;\n\nconst addAttributes = function (entityName, attribs) {\n let entity = addEntity(entityName); // May do nothing (if entity has already been added)\n\n // Process attribs in reverse order due to effect of recursive construction (last attribute is first)\n let i;\n for (i = attribs.length - 1; i >= 0; i--) {\n entity.attributes.push(attribs[i]);\n log.debug('Added attribute ', attribs[i].attributeName);\n }\n};\n\n/**\n * Add a relationship\n *\n * @param entA The first entity in the relationship\n * @param rolA The role played by the first entity in relation to the second\n * @param entB The second entity in the relationship\n * @param rSpec The details of the relationship between the two entities\n */\nconst addRelationship = function (entA, rolA, entB, rSpec) {\n let rel = {\n entityA: entA,\n roleA: rolA,\n entityB: entB,\n relSpec: rSpec,\n };\n\n relationships.push(rel);\n log.debug('Added new relationship :', rel);\n};\n\nconst getRelationships = () => relationships;\n\nconst clear = function () {\n entities = new Map();\n relationships = [];\n commonClear();\n};\n\nexport default {\n Cardinality,\n Identification,\n getConfig: () => getConfig().er,\n addEntity,\n addAttributes,\n getEntities,\n addRelationship,\n getRelationships,\n clear,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n setDiagramTitle,\n getDiagramTitle,\n};\n", "const ERMarkers = {\n ONLY_ONE_START: 'ONLY_ONE_START',\n ONLY_ONE_END: 'ONLY_ONE_END',\n ZERO_OR_ONE_START: 'ZERO_OR_ONE_START',\n ZERO_OR_ONE_END: 'ZERO_OR_ONE_END',\n ONE_OR_MORE_START: 'ONE_OR_MORE_START',\n ONE_OR_MORE_END: 'ONE_OR_MORE_END',\n ZERO_OR_MORE_START: 'ZERO_OR_MORE_START',\n ZERO_OR_MORE_END: 'ZERO_OR_MORE_END',\n MD_PARENT_END: 'MD_PARENT_END',\n MD_PARENT_START: 'MD_PARENT_START',\n};\n\n/**\n * Put the markers into the svg DOM for later use with edge paths\n *\n * @param elem\n * @param conf\n */\nconst insertMarkers = function (elem, conf) {\n let marker;\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.MD_PARENT_START)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.MD_PARENT_END)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONLY_ONE_START)\n .attr('refX', 0)\n .attr('refY', 9)\n .attr('markerWidth', 18)\n .attr('markerHeight', 18)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M9,0 L9,18 M15,0 L15,18');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONLY_ONE_END)\n .attr('refX', 18)\n .attr('refY', 9)\n .attr('markerWidth', 18)\n .attr('markerHeight', 18)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M3,0 L3,18 M9,0 L9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_ONE_START)\n .attr('refX', 0)\n .attr('refY', 9)\n .attr('markerWidth', 30)\n .attr('markerHeight', 18)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 21)\n .attr('cy', 9)\n .attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_ONE_END)\n .attr('refX', 30)\n .attr('refY', 9)\n .attr('markerWidth', 30)\n .attr('markerHeight', 18)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 9)\n .attr('cy', 9)\n .attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,0 L21,18');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONE_OR_MORE_START)\n .attr('refX', 18)\n .attr('refY', 18)\n .attr('markerWidth', 45)\n .attr('markerHeight', 36)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONE_OR_MORE_END)\n .attr('refX', 27)\n .attr('refY', 18)\n .attr('markerWidth', 45)\n .attr('markerHeight', 36)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_MORE_START)\n .attr('refX', 18)\n .attr('refY', 18)\n .attr('markerWidth', 57)\n .attr('markerHeight', 36)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 48)\n .attr('cy', 18)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M0,18 Q18,0 36,18 Q18,36 0,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_MORE_END)\n .attr('refX', 39)\n .attr('refY', 18)\n .attr('markerWidth', 57)\n .attr('markerHeight', 36)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 9)\n .attr('cy', 18)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M21,18 Q39,0 57,18 Q39,36 21,18');\n\n return;\n};\n\nexport default {\n ERMarkers,\n insertMarkers,\n};\n", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import { unsafeStringify } from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (let i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n\n for (let j = 0; j < 16; ++j) {\n arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n\n M[i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", "import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { line, curveBasis, select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport utils from '../../utils.js';\nimport erMarkers from './erMarkers.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport { parseGenericTypes } from '../common/common.js';\nimport { v5 as uuid5 } from 'uuid';\n\n/** Regex used to remove chars from the entity name so the result can be used in an id */\nconst BAD_ID_CHARS_REGEXP = /[^\\dA-Za-z](\\W)*/g;\n\n// Configuration\nlet conf = {};\n\n// Map so we can look up the id of an entity based on the name\nlet entityNameIds = new Map();\n\n/**\n * Allows the top-level API module to inject config specific to this renderer, storing it in the\n * local conf object. Note that generic config still needs to be retrieved using getConfig()\n * imported from the config module\n *\n * @param cnf\n */\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n for (const key of keys) {\n conf[key] = cnf[key];\n }\n};\n\n/**\n * Draw attributes for an entity\n *\n * @param groupNode The svg group node for the entity\n * @param entityTextNode The svg node for the entity label text\n * @param attributes An array of attributes defined for the entity (each attribute has a type and a\n * name)\n * @returns {object} The bounding box of the entity, after attributes have been added. The bounding\n * box has a .width and .height\n */\nconst drawAttributes = (groupNode, entityTextNode, attributes) => {\n const heightPadding = conf.entityPadding / 3; // Padding internal to attribute boxes\n const widthPadding = conf.entityPadding / 3; // Ditto\n const attrFontSize = conf.fontSize * 0.85;\n const labelBBox = entityTextNode.node().getBBox();\n const attributeNodes = []; // Intermediate storage for attribute nodes created so that we can do a second pass\n let hasKeyType = false;\n let hasComment = false;\n let maxTypeWidth = 0;\n let maxNameWidth = 0;\n let maxKeyWidth = 0;\n let maxCommentWidth = 0;\n let cumulativeHeight = labelBBox.height + heightPadding * 2;\n let attrNum = 1;\n\n // Check to see if any of the attributes has a key or a comment\n attributes.forEach((item) => {\n if (item.attributeKeyTypeList !== undefined && item.attributeKeyTypeList.length > 0) {\n hasKeyType = true;\n }\n\n if (item.attributeComment !== undefined) {\n hasComment = true;\n }\n });\n\n attributes.forEach((item) => {\n const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`;\n let nodeHeight = 0;\n\n const attributeType = parseGenericTypes(item.attributeType);\n\n // Add a text node for the attribute type\n const typeNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', `${attrPrefix}-type`)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'left')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', attrFontSize + 'px')\n .text(attributeType);\n\n // Add a text node for the attribute name\n const nameNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', `${attrPrefix}-name`)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'left')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', attrFontSize + 'px')\n .text(item.attributeName);\n\n const attributeNode = {};\n attributeNode.tn = typeNode;\n attributeNode.nn = nameNode;\n\n const typeBBox = typeNode.node().getBBox();\n const nameBBox = nameNode.node().getBBox();\n maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width);\n maxNameWidth = Math.max(maxNameWidth, nameBBox.width);\n\n nodeHeight = Math.max(typeBBox.height, nameBBox.height);\n\n if (hasKeyType) {\n const keyTypeNodeText =\n item.attributeKeyTypeList !== undefined ? item.attributeKeyTypeList.join(',') : '';\n\n const keyTypeNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', `${attrPrefix}-key`)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'left')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', attrFontSize + 'px')\n .text(keyTypeNodeText);\n\n attributeNode.kn = keyTypeNode;\n const keyTypeBBox = keyTypeNode.node().getBBox();\n maxKeyWidth = Math.max(maxKeyWidth, keyTypeBBox.width);\n nodeHeight = Math.max(nodeHeight, keyTypeBBox.height);\n }\n\n if (hasComment) {\n const commentNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', `${attrPrefix}-comment`)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'left')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', attrFontSize + 'px')\n .text(item.attributeComment || '');\n\n attributeNode.cn = commentNode;\n const commentNodeBBox = commentNode.node().getBBox();\n maxCommentWidth = Math.max(maxCommentWidth, commentNodeBBox.width);\n nodeHeight = Math.max(nodeHeight, commentNodeBBox.height);\n }\n\n attributeNode.height = nodeHeight;\n // Keep a reference to the nodes so that we can iterate through them later\n attributeNodes.push(attributeNode);\n cumulativeHeight += nodeHeight + heightPadding * 2;\n attrNum += 1;\n });\n\n let widthPaddingFactor = 4;\n if (hasKeyType) {\n widthPaddingFactor += 2;\n }\n if (hasComment) {\n widthPaddingFactor += 2;\n }\n\n const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth;\n\n // Calculate the new bounding box of the overall entity, now that attributes have been added\n const bBox = {\n width: Math.max(\n conf.minEntityWidth,\n Math.max(\n labelBBox.width + conf.entityPadding * 2,\n maxWidth + widthPadding * widthPaddingFactor\n )\n ),\n height:\n attributes.length > 0\n ? cumulativeHeight\n : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2),\n };\n\n if (attributes.length > 0) {\n // There might be some spare width for padding out attributes if the entity name is very long\n const spareColumnWidth = Math.max(\n 0,\n (bBox.width - maxWidth - widthPadding * widthPaddingFactor) / (widthPaddingFactor / 2)\n );\n\n // Position the entity label near the top of the entity bounding box\n entityTextNode.attr(\n 'transform',\n 'translate(' + bBox.width / 2 + ',' + (heightPadding + labelBBox.height / 2) + ')'\n );\n\n // Add rectangular boxes for the attribute types/names\n let heightOffset = labelBBox.height + heightPadding * 2; // Start at the bottom of the entity label\n let attribStyle = 'attributeBoxOdd'; // We will flip the style on alternate rows to achieve a banded effect\n\n attributeNodes.forEach((attributeNode) => {\n // Calculate the alignment y coordinate for the type/name of the attribute\n const alignY = heightOffset + heightPadding + attributeNode.height / 2;\n\n // Position the type attribute\n attributeNode.tn.attr('transform', 'translate(' + widthPadding + ',' + alignY + ')');\n\n // TODO Handle spareWidth in attr('width')\n // Insert a rectangle for the type\n const typeRect = groupNode\n .insert('rect', '#' + attributeNode.tn.node().id)\n .classed(`er ${attribStyle}`, true)\n .attr('x', 0)\n .attr('y', heightOffset)\n .attr('width', maxTypeWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n\n const nameXOffset = parseFloat(typeRect.attr('x')) + parseFloat(typeRect.attr('width'));\n\n // Position the name attribute\n attributeNode.nn.attr(\n 'transform',\n 'translate(' + (nameXOffset + widthPadding) + ',' + alignY + ')'\n );\n\n // Insert a rectangle for the name\n const nameRect = groupNode\n .insert('rect', '#' + attributeNode.nn.node().id)\n .classed(`er ${attribStyle}`, true)\n .attr('x', nameXOffset)\n .attr('y', heightOffset)\n .attr('width', maxNameWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n\n let keyTypeAndCommentXOffset =\n parseFloat(nameRect.attr('x')) + parseFloat(nameRect.attr('width'));\n\n if (hasKeyType) {\n // Position the key type attribute\n attributeNode.kn.attr(\n 'transform',\n 'translate(' + (keyTypeAndCommentXOffset + widthPadding) + ',' + alignY + ')'\n );\n\n // Insert a rectangle for the key type\n const keyTypeRect = groupNode\n .insert('rect', '#' + attributeNode.kn.node().id)\n .classed(`er ${attribStyle}`, true)\n .attr('x', keyTypeAndCommentXOffset)\n .attr('y', heightOffset)\n .attr('width', maxKeyWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n\n keyTypeAndCommentXOffset =\n parseFloat(keyTypeRect.attr('x')) + parseFloat(keyTypeRect.attr('width'));\n }\n\n if (hasComment) {\n // Position the comment attribute\n attributeNode.cn.attr(\n 'transform',\n 'translate(' + (keyTypeAndCommentXOffset + widthPadding) + ',' + alignY + ')'\n );\n\n // Insert a rectangle for the comment\n groupNode\n .insert('rect', '#' + attributeNode.cn.node().id)\n .classed(`er ${attribStyle}`, 'true')\n .attr('x', keyTypeAndCommentXOffset)\n .attr('y', heightOffset)\n .attr('width', maxCommentWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n }\n\n // Increment the height offset to move to the next row\n heightOffset += attributeNode.height + heightPadding * 2;\n\n // Flip the attribute style for row banding\n attribStyle = attribStyle === 'attributeBoxOdd' ? 'attributeBoxEven' : 'attributeBoxOdd';\n });\n } else {\n // Ensure the entity box is a decent size without any attributes\n bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight);\n\n // Position the entity label in the middle of the box\n entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + bBox.height / 2 + ')');\n }\n\n return bBox;\n};\n\n/**\n * Use D3 to construct the svg elements for the entities\n *\n * @param svgNode The svg node that contains the diagram\n * @param {Map} entities The entities to be drawn\n * @param graph The graph that contains the vertex and edge definitions post-layout\n * @returns {object} The first entity that was inserted\n */\nconst drawEntities = function (svgNode, entities, graph) {\n const keys = [...entities.keys()];\n let firstOne;\n\n keys.forEach(function (entityName) {\n const entityId = generateId(entityName, 'entity');\n entityNameIds.set(entityName, entityId);\n\n // Create a group for each entity\n const groupNode = svgNode.append('g').attr('id', entityId);\n\n firstOne = firstOne === undefined ? entityId : firstOne;\n\n // Label the entity - this is done first so that we can get the bounding box\n // which then determines the size of the rectangle\n const textId = 'text-' + entityId;\n const textNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', textId)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'middle')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', conf.fontSize + 'px')\n .text(entities.get(entityName).alias ?? entityName);\n\n const { width: entityWidth, height: entityHeight } = drawAttributes(\n groupNode,\n textNode,\n entities.get(entityName).attributes\n );\n\n // Draw the rectangle - insert it before the text so that the text is not obscured\n const rectNode = groupNode\n .insert('rect', '#' + textId)\n .classed('er entityBox', true)\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', entityWidth)\n .attr('height', entityHeight);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph using the entityId\n graph.setNode(entityId, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: entityId,\n });\n });\n return firstOne;\n}; // drawEntities\n\nconst adjustEntities = function (svgNode, graph) {\n graph.nodes().forEach(function (v) {\n if (v !== undefined && graph.node(v) !== undefined) {\n svgNode\n .select('#' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y - graph.node(v).height / 2) +\n ' )'\n );\n }\n });\n};\n\n/**\n * Construct a name for an edge based on the names of the 2 entities and the role (relationship)\n * between them. Remove any spaces from it\n *\n * @param rel - A (parsed) relationship (e.g. one of the objects in the list returned by\n * erDb.getRelationships)\n * @returns {string}\n */\nconst getEdgeName = function (rel) {\n return (rel.entityA + rel.roleA + rel.entityB).replace(/\\s/g, '');\n};\n\n/**\n * Add each relationship to the graph\n *\n * @param relationships The relationships to be added\n * @param g The graph\n * @returns {Array} The array of relationships\n */\nconst addRelationships = function (relationships, g) {\n relationships.forEach(function (r) {\n g.setEdge(\n entityNameIds.get(r.entityA),\n entityNameIds.get(r.entityB),\n { relationship: r },\n getEdgeName(r)\n );\n });\n return relationships;\n}; // addRelationships\n\nlet relCnt = 0;\n/**\n * Draw a relationship using edge information from the graph\n *\n * @param svg The svg node\n * @param rel The relationship to draw in the svg\n * @param g The graph containing the edge information\n * @param insert The insertion point in the svg DOM (because relationships have markers that need to\n * sit 'behind' opaque entity boxes)\n * @param diagObj\n */\nconst drawRelationshipFromLayout = function (svg, rel, g, insert, diagObj) {\n relCnt++;\n\n // Find the edge relating to this relationship\n const edge = g.edge(\n entityNameIds.get(rel.entityA),\n entityNameIds.get(rel.entityB),\n getEdgeName(rel)\n );\n\n // Get a function that will generate the line path\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n // Insert the line at the right place\n const svgPath = svg\n .insert('path', '#' + insert)\n .classed('er relationshipLine', true)\n .attr('d', lineFunction(edge.points))\n .style('stroke', conf.stroke)\n .style('fill', 'none');\n\n // ...and with dashes if necessary\n if (rel.relSpec.relType === diagObj.db.Identification.NON_IDENTIFYING) {\n svgPath.attr('stroke-dasharray', '8,8');\n }\n\n // TODO: Understand this better\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n // Decide which start and end markers it needs. It may be possible to be more concise here\n // by reversing a start marker to make an end marker...but this will do for now\n\n // Note that the 'A' entity's marker is at the end of the relationship and the 'B' entity's marker is at the start\n switch (rel.relSpec.cardA) {\n case diagObj.db.Cardinality.ZERO_OR_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_ONE_END + ')');\n break;\n case diagObj.db.Cardinality.ZERO_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_MORE_END + ')');\n break;\n case diagObj.db.Cardinality.ONE_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ONE_OR_MORE_END + ')');\n break;\n case diagObj.db.Cardinality.ONLY_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ONLY_ONE_END + ')');\n break;\n case diagObj.db.Cardinality.MD_PARENT:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.MD_PARENT_END + ')');\n break;\n }\n\n switch (rel.relSpec.cardB) {\n case diagObj.db.Cardinality.ZERO_OR_ONE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_ONE_START + ')'\n );\n break;\n case diagObj.db.Cardinality.ZERO_OR_MORE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_MORE_START + ')'\n );\n break;\n case diagObj.db.Cardinality.ONE_OR_MORE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ONE_OR_MORE_START + ')'\n );\n break;\n case diagObj.db.Cardinality.ONLY_ONE:\n svgPath.attr('marker-start', 'url(' + url + '#' + erMarkers.ERMarkers.ONLY_ONE_START + ')');\n break;\n case diagObj.db.Cardinality.MD_PARENT:\n svgPath.attr('marker-start', 'url(' + url + '#' + erMarkers.ERMarkers.MD_PARENT_START + ')');\n break;\n }\n\n // Now label the relationship\n\n // Find the half-way point\n const len = svgPath.node().getTotalLength();\n const labelPoint = svgPath.node().getPointAtLength(len * 0.5);\n\n // Append a text node containing the label\n const labelId = 'rel' + relCnt;\n\n const labelText = rel.roleA.split(/
    /g);\n\n const labelNode = svg\n .append('text')\n .classed('er relationshipLabel', true)\n .attr('id', labelId)\n .attr('x', labelPoint.x)\n .attr('y', labelPoint.y)\n .style('text-anchor', 'middle')\n .style('dominant-baseline', 'middle')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', conf.fontSize + 'px');\n\n if (labelText.length == 1) {\n labelNode.text(rel.roleA);\n } else {\n const firstShift = -(labelText.length - 1) * 0.5;\n labelText.forEach((txt, i) => {\n labelNode\n .append('tspan')\n .attr('x', labelPoint.x)\n .attr('dy', `${i === 0 ? firstShift : 1}em`)\n .text(txt);\n });\n }\n\n // Figure out how big the opaque 'container' rectangle needs to be\n const labelBBox = labelNode.node().getBBox();\n\n // Insert the opaque rectangle before the text label\n svg\n .insert('rect', '#' + labelId)\n .classed('er relationshipLabelBox', true)\n .attr('x', labelPoint.x - labelBBox.width / 2)\n .attr('y', labelPoint.y - labelBBox.height / 2)\n .attr('width', labelBBox.width)\n .attr('height', labelBBox.height);\n};\n\n/**\n * Draw en E-R diagram in the tag with id: id based on the text definition of the diagram\n *\n * @param text The text of the diagram\n * @param id The unique id of the DOM node that contains the diagram\n * @param _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n conf = getConfig().er;\n log.info('Drawing ER diagram');\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n // const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // Get a reference to the svg node that contains the text\n const svg = root.select(`[id='${id}']`);\n\n // Add cardinality marker definitions to the svg\n erMarkers.insertMarkers(svg, conf);\n\n // Now we have to construct the diagram in a specific way:\n // ---\n // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content)\n // 2. Make sure they are all added to the graph\n // 3. Add all the edges (relationships) to the graph as well\n // 4. Let dagre do its magic to lay out the graph. This assigns:\n // - the centre coordinates for each node, bearing in mind the dimensions and edge relationships\n // - the path coordinates for each edge\n // But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0\n // 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by\n // its centre point, which is obtained from the graph, and it's width and height\n // 6. And finally, create all the edges in the svg node using information from the graph\n // ---\n\n // Create the graph\n let g;\n\n // TODO: Explore directed vs undirected graphs, and how the layout is affected\n // An E-R diagram could be said to be undirected, but there is merit in setting\n // the direction from parent to child in a one-to-many as this influences graphlib to\n // put the parent above the child (does it?), which is intuitive. Most relationships\n // in ER diagrams are one-to-many.\n g = new graphlib.Graph({\n multigraph: true,\n directed: true,\n compound: false,\n })\n .setGraph({\n rankdir: conf.layoutDirection,\n marginx: 20,\n marginy: 20,\n nodesep: 100,\n edgesep: 100,\n ranksep: 100,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n // Draw the entities (at 0,0), returning the first svg node that got\n // inserted - this represents the insertion point for relationship paths\n const firstEntity = drawEntities(svg, diagObj.db.getEntities(), g);\n\n // TODO: externalize the addition of entities to the graph - it's a bit 'buried' in the above\n\n // Add all the relationships to the graph\n const relationships = addRelationships(diagObj.db.getRelationships(), g);\n\n dagreLayout(g); // Node and edge positions will be updated\n\n // Adjust the positions of the entities so that they adhere to the layout\n adjustEntities(svg, g);\n\n // Draw the relationships\n relationships.forEach(function (rel) {\n drawRelationshipFromLayout(svg, rel, g, firstEntity, diagObj);\n });\n\n const padding = conf.diagramPadding;\n\n utils.insertTitle(svg, 'entityTitleText', conf.titleTopMargin, diagObj.db.getDiagramTitle());\n\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(svg, height, width, conf.useMaxWidth);\n\n svg.attr('viewBox', `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);\n}; // draw\n\n/**\n * UUID namespace for ER diagram IDs\n *\n * This can be generated via running:\n *\n * ```js\n * const { v5: uuid5 } = await import('uuid');\n * uuid5(\n * 'https://mermaid-js.github.io/mermaid/syntax/entityRelationshipDiagram.html',\n * uuid5.URL\n * );\n * ```\n */\nconst MERMAID_ERDIAGRAM_UUID = '28e9f9db-3c8d-5aa5-9faf-44286ae5937c';\n\n/**\n * Return a unique id based on the given string. Start with the prefix, then a hyphen, then the\n * simplified str, then a hyphen, then a unique uuid based on the str. (Hyphens are only included if needed.)\n * Although the official XML standard for ids says that many more characters are valid in the id,\n * this keeps things simple by accepting only A-Za-z0-9.\n *\n * @param {string} str Given string to use as the basis for the id. Default is `''`\n * @param {string} prefix String to put at the start, followed by '-'. Default is `''`\n * @returns {string}\n * @see https://www.w3.org/TR/xml/#NT-Name\n */\nexport function generateId(str = '', prefix = '') {\n const simplifiedStr = str.replace(BAD_ID_CHARS_REGEXP, '');\n // we use `uuid v5` so that UUIDs are consistent given a string.\n return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${uuid5(\n str,\n MERMAID_ERDIAGRAM_UUID\n )}`;\n}\n\n/**\n * Append a hyphen to a string only if the string isn't empty\n *\n * @param {string} str\n * @returns {string}\n * @todo This could be moved into a string utility file/class.\n */\nfunction strWithHyphen(str = '') {\n return str.length > 0 ? `${str}-` : '';\n}\n\nexport default {\n setConf,\n draw,\n};\n", "const getStyles = (options) =>\n `\n .entityBox {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${options.attributeBackgroundColorOdd};\n stroke: ${options.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${options.attributeBackgroundColorEven};\n stroke: ${options.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${options.tertiaryColor};\n opacity: 0.7;\n background-color: ${options.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${options.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n }\n \n`;\n\nexport default getStyles;\n", "// @ts-ignore: TODO: Fix ts errors\nimport erParser from './parser/erDiagram.jison';\nimport erDb from './erDb.js';\nimport erRenderer from './erRenderer.js';\nimport erStyles from './styles.js';\n\nexport const diagram = {\n parser: erParser,\n db: erDb,\n renderer: erRenderer,\n styles: erStyles,\n};\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { TokenType } from 'chevrotain';\nimport type { URI } from './utils/uri-utils.js';\nimport type { AbstractElement } from './languages/generated/ast.js';\nimport type { DocumentSegment, LangiumDocument } from './workspace/documents.js';\n\n/**\n * A node in the Abstract Syntax Tree (AST).\n */\nexport interface AstNode {\n /** Every AST node has a type corresponding to what was specified in the grammar declaration. */\n readonly $type: string;\n /** The container node in the AST; every node except the root node has a container. */\n readonly $container?: AstNode;\n /** The property of the `$container` node that contains this node. This is either a direct reference or an array. */\n readonly $containerProperty?: string;\n /** In case `$containerProperty` is an array, the array index is stored here. */\n readonly $containerIndex?: number;\n /** The Concrete Syntax Tree (CST) node of the text range from which this node was parsed. */\n readonly $cstNode?: CstNode;\n /** The document containing the AST; only the root node has a direct reference to the document. */\n readonly $document?: LangiumDocument;\n}\n\nexport function isAstNode(obj: unknown): obj is AstNode {\n return typeof obj === 'object' && obj !== null && typeof (obj as AstNode).$type === 'string';\n}\n\nexport interface GenericAstNode extends AstNode {\n [key: string]: unknown\n}\n\ntype SpecificNodeProperties = keyof Omit;\n\n/**\n * The property names of a given AST node type.\n */\nexport type Properties = SpecificNodeProperties extends never ? string : SpecificNodeProperties\n\n/**\n * A cross-reference in the AST. Cross-references may or may not be successfully resolved.\n */\nexport interface Reference {\n /**\n * The target AST node of this reference. Accessing this property may trigger cross-reference\n * resolution by the `Linker` in case it has not been done yet. If the reference cannot be resolved,\n * the value is `undefined`.\n */\n readonly ref?: T;\n\n /** If any problem occurred while resolving the reference, it is described by this property. */\n readonly error?: LinkingError;\n /** The CST node from which the reference was parsed */\n readonly $refNode?: CstNode;\n /** The actual text used to look up in the surrounding scope */\n readonly $refText: string;\n /** The node description for the AstNode returned by `ref` */\n readonly $nodeDescription?: AstNodeDescription;\n}\n\nexport function isReference(obj: unknown): obj is Reference {\n return typeof obj === 'object' && obj !== null && typeof (obj as Reference).$refText === 'string';\n}\n\nexport type ResolvedReference = Reference & {\n readonly ref: T;\n}\n\n/**\n * A description of an AST node is used when constructing scopes and looking up cross-reference targets.\n */\nexport interface AstNodeDescription {\n /** The target node; should be present only for local references (linking to the same document). */\n node?: AstNode;\n /**\n * The document segment that represents the range of the name of the AST node.\n */\n nameSegment?: DocumentSegment;\n /**\n * The document segment that represents the full range of the AST node.\n */\n selectionSegment?: DocumentSegment;\n /** `$type` property value of the AST node */\n type: string;\n /** Name of the AST node; this is usually determined by the `NameProvider` service. */\n name: string;\n /** URI to the document containing the AST node */\n documentUri: URI;\n /** Navigation path inside the document */\n path: string;\n}\n\nexport function isAstNodeDescription(obj: unknown): obj is AstNodeDescription {\n return typeof obj === 'object' && obj !== null\n && typeof (obj as AstNodeDescription).name === 'string'\n && typeof (obj as AstNodeDescription).type === 'string'\n && typeof (obj as AstNodeDescription).path === 'string';\n}\n\n/**\n * Information about a cross-reference. This is used when traversing references in an AST or to describe\n * unresolved references.\n */\nexport interface ReferenceInfo {\n reference: Reference\n container: AstNode\n property: string\n index?: number\n}\n\n/**\n * Used to collect information when the `Linker` service fails to resolve a cross-reference.\n */\nexport interface LinkingError extends ReferenceInfo {\n message: string;\n targetDescription?: AstNodeDescription;\n}\n\nexport function isLinkingError(obj: unknown): obj is LinkingError {\n return typeof obj === 'object' && obj !== null\n && isAstNode((obj as LinkingError).container)\n && isReference((obj as LinkingError).reference)\n && typeof (obj as LinkingError).message === 'string';\n}\n\n/**\n * Service used for generic access to the structure of the AST. This service is shared between\n * all involved languages, so it operates on the superset of types of these languages.\n */\nexport interface AstReflection {\n getAllTypes(): string[]\n getAllSubTypes(type: string): string[]\n getReferenceType(refInfo: ReferenceInfo): string\n getTypeMetaData(type: string): TypeMetaData\n isInstance(node: unknown, type: string): boolean\n isSubtype(subtype: string, supertype: string): boolean\n}\n\n/**\n * An abstract implementation of the {@link AstReflection} interface.\n * Serves to cache subtype computation results to improve performance throughout different parts of Langium.\n */\nexport abstract class AbstractAstReflection implements AstReflection {\n\n protected subtypes: Record> = {};\n protected allSubtypes: Record = {};\n\n abstract getAllTypes(): string[];\n abstract getReferenceType(refInfo: ReferenceInfo): string;\n abstract getTypeMetaData(type: string): TypeMetaData;\n protected abstract computeIsSubtype(subtype: string, supertype: string): boolean;\n\n isInstance(node: unknown, type: string): boolean {\n return isAstNode(node) && this.isSubtype(node.$type, type);\n }\n\n isSubtype(subtype: string, supertype: string): boolean {\n if (subtype === supertype) {\n return true;\n }\n let nested = this.subtypes[subtype];\n if (!nested) {\n nested = this.subtypes[subtype] = {};\n }\n const existing = nested[supertype];\n if (existing !== undefined) {\n return existing;\n } else {\n const result = this.computeIsSubtype(subtype, supertype);\n nested[supertype] = result;\n return result;\n }\n }\n\n getAllSubTypes(type: string): string[] {\n const existing = this.allSubtypes[type];\n if (existing) {\n return existing;\n } else {\n const allTypes = this.getAllTypes();\n const types: string[] = [];\n for (const possibleSubType of allTypes) {\n if (this.isSubtype(possibleSubType, type)) {\n types.push(possibleSubType);\n }\n }\n this.allSubtypes[type] = types;\n return types;\n }\n }\n}\n\n/**\n * Represents runtime meta data about a meta model type.\n */\nexport interface TypeMetaData {\n /** The name of this meta model type. Corresponds to the `AstNode.$type` value. */\n name: string\n /** A list of properties. They can contain default values for their respective property in the AST. */\n properties: TypeProperty[]\n}\n\n/**\n * Describes the meta data of a property of an AST node.\n *\n * The optional `defaultValue` indicates that the property is mandatory in the AST node.\n * For example, if an AST node contains an array, but no elements of this array have been parsed, we still expect an empty array instead of `undefined`.\n */\nexport interface TypeProperty {\n name: string\n defaultValue?: PropertyType\n}\n\n/**\n * Represents a default value for an AST property.\n */\nexport type PropertyType = number | string | boolean | PropertyType[];\n\n/**\n * A node in the Concrete Syntax Tree (CST).\n */\nexport interface CstNode extends DocumentSegment {\n /** The container node in the CST */\n readonly container?: CompositeCstNode;\n /** @deprecated use `container` instead. */\n readonly parent?: CompositeCstNode;\n /** The actual text */\n readonly text: string;\n /** The root CST node */\n readonly root: RootCstNode;\n /** The grammar element from which this node was parsed */\n readonly grammarSource: AbstractElement;\n /** @deprecated use `grammarSource` instead. */\n readonly feature: AbstractElement;\n /** The AST node created from this CST node */\n readonly astNode: AstNode;\n /** @deprecated use `astNode` instead. */\n readonly element: AstNode;\n /** Whether the token is hidden, i.e. not explicitly part of the containing grammar rule */\n readonly hidden: boolean;\n}\n\n/**\n * A composite CST node contains other nodes, but no directly associated token.\n */\nexport interface CompositeCstNode extends CstNode {\n readonly content: CstNode[];\n /** @deprecated use `content` instead. */\n readonly children: CstNode[];\n}\n\nexport function isCompositeCstNode(node: unknown): node is CompositeCstNode {\n return typeof node === 'object' && node !== null && Array.isArray((node as CompositeCstNode).content);\n}\n\n/**\n * A leaf CST node corresponds to a token in the input token stream.\n */\nexport interface LeafCstNode extends CstNode {\n readonly tokenType: TokenType;\n}\n\nexport function isLeafCstNode(node: unknown): node is LeafCstNode {\n return typeof node === 'object' && node !== null && typeof (node as LeafCstNode).tokenType === 'object';\n}\n\nexport interface RootCstNode extends CompositeCstNode {\n readonly fullText: string\n}\n\nexport function isRootCstNode(node: unknown): node is RootCstNode {\n return isCompositeCstNode(node) && typeof (node as RootCstNode).fullText === 'string';\n}\n\n/**\n * Returns a type to have only properties names (!) of a type T whose property value is of a certain type K.\n */\ntype ExtractKeysOfValueType = { [I in keyof T]: T[I] extends K ? I : never }[keyof T];\n\n/**\n * Returns the property names (!) of an AstNode that are cross-references.\n * Meant to be used during cross-reference resolution in combination with `assertUnreachable(context.property)`.\n */\nexport type CrossReferencesOfAstNodeType = (\n ExtractKeysOfValueType\n | ExtractKeysOfValueType|undefined>\n// eslint-disable-next-line @typescript-eslint/ban-types\n) & {};\n\n/**\n * Represents the enumeration-like type, that lists all AstNode types of your grammar.\n */\nexport type AstTypeList = Record;\n\n/**\n * Returns all types that contain cross-references, A is meant to be the interface `XXXAstType` fromm your generated `ast.ts` file.\n * Meant to be used during cross-reference resolution in combination with `assertUnreachable(context.container)`.\n */\nexport type AstNodeTypesWithCrossReferences
    > = {\n [T in keyof A]: CrossReferencesOfAstNodeType extends never ? never : A[T]\n}[keyof A];\n\nexport type Mutable = {\n -readonly [P in keyof T]: T[P]\n};\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/**\n * A stream is a read-only sequence of values. While the contents of an array can be accessed\n * both sequentially and randomly (via index), a stream allows only sequential access.\n *\n * The advantage of this is that a stream can be evaluated lazily, so it does not require\n * to store intermediate values. This can boost performance when a large sequence is\n * processed via filtering, mapping etc. and accessed at most once. However, lazy\n * evaluation means that all processing is repeated when you access the sequence multiple\n * times; in such a case, it may be better to store the resulting sequence into an array.\n */\nexport interface Stream extends Iterable {\n\n /**\n * Returns an iterator for this stream. This is the same as calling the `Symbol.iterator` function property.\n */\n iterator(): IterableIterator;\n\n /**\n * Determines whether this stream contains no elements.\n */\n isEmpty(): boolean;\n\n /**\n * Determines the number of elements in this stream.\n */\n count(): number;\n\n /**\n * Collects all elements of this stream into an array.\n */\n toArray(): T[];\n\n /**\n * Collects all elements of this stream into a Set.\n */\n toSet(): Set;\n\n /**\n * Collects all elements of this stream into a Map, applying the provided functions to determine keys and values.\n *\n * @param keyFn The function to derive map keys. If omitted, the stream elements are used as keys.\n * @param valueFn The function to derive map values. If omitted, the stream elements are used as values.\n */\n toMap(keyFn?: (e: T) => K, valueFn?: (e: T) => V): Map;\n\n /**\n * Returns a string representation of a stream.\n */\n toString(): string;\n\n /**\n * Combines two streams by returning a new stream that yields all elements of this stream and the other stream.\n *\n * @param other Stream to be concatenated with this one.\n */\n concat(other: Iterable): Stream;\n\n /**\n * Adds all elements of the stream into a string, separated by the specified separator string.\n *\n * @param separator A string used to separate one element of the stream from the next in the resulting string.\n * If omitted, the steam elements are separated with a comma.\n */\n join(separator?: string): string\n\n /**\n * Returns the index of the first occurrence of a value in the stream, or -1 if it is not present.\n *\n * @param searchElement The value to locate in the array.\n * @param fromIndex The stream index at which to begin the search. If fromIndex is omitted, the search\n * starts at index 0.\n */\n indexOf(searchElement: T, fromIndex?: number): number;\n\n /**\n * Determines whether all members of the stream satisfy the specified test.\n *\n * @param predicate This method calls the predicate function for each element in the stream until the\n * predicate returns a value which is coercible to the Boolean value `false`, or until the end\n * of the stream.\n */\n every(predicate: (value: T) => value is S): this is Stream;\n every(predicate: (value: T) => unknown): boolean;\n\n /**\n * Determines whether any member of the stream satisfies the specified test.\n *\n * @param predicate This method calls the predicate function for each element in the stream until the\n * predicate returns a value which is coercible to the Boolean value `true`, or until the end\n * of the stream.\n */\n some(predicate: (value: T) => unknown): boolean;\n\n /**\n * Performs the specified action for each element in the stream.\n *\n * @param callbackfn Function called once for each element in the stream.\n */\n forEach(callbackfn: (value: T, index: number) => void): void;\n\n /**\n * Returns a stream that yields the results of calling the specified callback function on each element\n * of the stream. The function is called when the resulting stream elements are actually accessed, so\n * accessing the resulting stream multiple times means the function is also called multiple times for\n * each element of the stream.\n *\n * @param callbackfn Lazily evaluated function mapping stream elements.\n */\n map(callbackfn: (value: T) => U): Stream;\n\n /**\n * Returns the elements of the stream that meet the condition specified in a callback function.\n * The function is called when the resulting stream elements are actually accessed, so accessing the\n * resulting stream multiple times means the function is also called multiple times for each element\n * of the stream.\n *\n * @param predicate Lazily evaluated function checking a condition on stream elements.\n */\n filter(predicate: (value: T) => value is S): Stream;\n filter(predicate: (value: T) => unknown): Stream;\n\n /**\n * Returns the elements of the stream that are _non-nullable_, which means they are neither `undefined`\n * nor `null`.\n */\n nonNullable(): Stream>;\n\n /**\n * Calls the specified callback function for all elements in the stream. The return value of the\n * callback function is the accumulated result, and is provided as an argument in the next call to\n * the callback function.\n *\n * @param callbackfn This method calls the function once for each element in the stream, providing\n * the previous and current values of the reduction.\n * @param initialValue If specified, `initialValue` is used as the initial value to start the\n * accumulation. The first call to the function provides this value as an argument instead\n * of a stream value.\n */\n reduce(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;\n reduce(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;\n\n /**\n * Calls the specified callback function for all elements in the stream, in descending order.\n * The return value of the callback function is the accumulated result, and is provided as an\n * argument in the next call to the callback function.\n *\n * @param callbackfn This method calls the function once for each element in the stream, providing\n * the previous and current values of the reduction.\n * @param initialValue If specified, `initialValue` is used as the initial value to start the\n * accumulation. The first call to the function provides this value as an argument instead\n * of an array value.\n */\n reduceRight(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;\n reduceRight(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;\n\n /**\n * Returns the value of the first element in the stream that meets the condition, or `undefined`\n * if there is no such element.\n *\n * @param predicate This method calls `predicate` once for each element of the stream, in ascending\n * order, until it finds one where `predicate` returns a value which is coercible to the\n * Boolean value `true`.\n */\n find(predicate: (value: T) => value is S): S | undefined;\n find(predicate: (value: T) => unknown): T | undefined;\n\n /**\n * Returns the index of the first element in the stream that meets the condition, or `-1`\n * if there is no such element.\n *\n * @param predicate This method calls `predicate` once for each element of the stream, in ascending\n * order, until it finds one where `predicate` returns a value which is coercible to the\n * Boolean value `true`.\n */\n findIndex(predicate: (value: T) => unknown): number;\n\n /**\n * Determines whether the stream includes a certain element, returning `true` or `false` as appropriate.\n *\n * @param searchElement The element to search for.\n */\n includes(searchElement: T): boolean;\n\n /**\n * Calls a defined callback function on each element of the stream and then flattens the result into\n * a new stream. This is identical to a `map` followed by `flat` with depth 1.\n *\n * @param callbackfn Lazily evaluated function mapping stream elements.\n */\n flatMap(callbackfn: (value: T) => U | Iterable): Stream;\n\n /**\n * Returns a new stream with all sub-stream or sub-array elements concatenated into it recursively up\n * to the specified depth.\n *\n * @param depth The maximum recursion depth. Defaults to 1.\n */\n flat(depth?: D): FlatStream;\n\n /**\n * Returns the first element in the stream, or `undefined` if the stream is empty.\n */\n head(): T | undefined;\n\n /**\n * Returns a stream that skips the first `skipCount` elements from this stream.\n *\n * @param skipCount The number of elements to skip. If this is larger than the number of elements in\n * the stream, an empty stream is returned. Defaults to 1.\n */\n tail(skipCount?: number): Stream;\n\n /**\n * Returns a stream consisting of the elements of this stream, truncated to be no longer than `maxSize`\n * in length.\n *\n * @param maxSize The number of elements the stream should be limited to\n */\n limit(maxSize: number): Stream;\n\n /**\n * Returns a stream containing only the distinct elements from this stream.\n * Equality is determined with the same rules as a standard `Set`.\n *\n * @param by A function returning the key used to check equality with a previous stream element.\n * If omitted, the stream elements themselves are used for comparison.\n */\n distinct(by?: (element: T) => Key): Stream;\n\n /**\n * Returns a stream that contains all elements that don't exist in the {@link other} iterable.\n * Equality is determined with the same rules as a standard `Set`.\n * @param other The elements that should be exluded from this stream.\n * @param key A function returning the key used to check quality.\n * If omitted, the stream elements themselves are used for comparison.\n */\n exclude(other: Iterable, key?: (element: T) => Key): Stream;\n\n}\n\nexport type FlatStream = {\n 'done': Stream,\n 'recur': T extends Iterable\n ? FlatStream>\n : Stream\n}[Depth extends 0 ? 'done' : 'recur'];\n\nexport type MinusOne = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][N];\n\n/**\n * The default implementation of `Stream` works with two input functions:\n * - The first function creates the initial state of an iteration.\n * - The second function gets the current state as argument and returns an `IteratorResult`.\n */\nexport class StreamImpl implements Stream {\n protected readonly startFn: () => S;\n protected readonly nextFn: (state: S) => IteratorResult;\n\n constructor(startFn: () => S, nextFn: (state: S) => IteratorResult) {\n this.startFn = startFn;\n this.nextFn = nextFn;\n }\n\n iterator(): IterableIterator {\n const iterator = {\n state: this.startFn(),\n next: () => this.nextFn(iterator.state),\n [Symbol.iterator]: () => iterator\n };\n return iterator;\n }\n\n [Symbol.iterator](): Iterator {\n return this.iterator();\n }\n\n isEmpty(): boolean {\n const iterator = this.iterator();\n return Boolean(iterator.next().done);\n }\n\n count(): number {\n const iterator = this.iterator();\n let count = 0;\n let next = iterator.next();\n while (!next.done) {\n count++;\n next = iterator.next();\n }\n return count;\n }\n\n toArray(): T[] {\n const result: T[] = [];\n const iterator = this.iterator();\n let next: IteratorResult;\n do {\n next = iterator.next();\n if (next.value !== undefined) {\n result.push(next.value);\n }\n } while (!next.done);\n return result;\n }\n\n toSet(): Set {\n return new Set(this);\n }\n\n toMap(keyFn?: (e: T) => K, valueFn?: (e: T) => V): Map {\n const entryStream = this.map(element => <[K, V]>[\n keyFn ? keyFn(element) : element,\n valueFn ? valueFn(element) : element\n ]);\n return new Map(entryStream);\n }\n\n toString(): string {\n return this.join();\n }\n\n concat(other: Iterable): Stream {\n const iterator = other[Symbol.iterator]();\n return new StreamImpl<{ first: S, firstDone: boolean }, T | T2>(\n () => ({ first: this.startFn(), firstDone: false }),\n state => {\n let result: IteratorResult;\n if (!state.firstDone) {\n do {\n result = this.nextFn(state.first);\n if (!result.done) {\n return result;\n }\n } while (!result.done);\n state.firstDone = true;\n }\n do {\n result = iterator.next();\n if (!result.done) {\n return result;\n }\n } while (!result.done);\n return DONE_RESULT;\n }\n );\n }\n\n join(separator = ','): string {\n const iterator = this.iterator();\n let value = '';\n let result: IteratorResult;\n let addSeparator = false;\n do {\n result = iterator.next();\n if (!result.done) {\n if (addSeparator) {\n value += separator;\n }\n value += toString(result.value);\n }\n addSeparator = true;\n } while (!result.done);\n return value;\n }\n\n indexOf(searchElement: T, fromIndex = 0): number {\n const iterator = this.iterator();\n let index = 0;\n let next = iterator.next();\n while (!next.done) {\n if (index >= fromIndex && next.value === searchElement) {\n return index;\n }\n next = iterator.next();\n index++;\n }\n return -1;\n }\n\n // In the following definition the '& this' part in the return type is important\n // _and_ the order within 'Stream & this' is crucial!\n // Otherwise Typescript would infer the type of 'this' as 'StreamImpl & Stream'\n // (or ' & Stream') and usages like\n // ```\n // const stream = new StreamImpl(...);\n // ... stream.every() & stream....\n // ```\n // cannot benefit from '', as Typescript would priorize the signatures\n // of 'StreamImpl' (i.e. those of 'Stream') over those of 'Stream'.\n // With the order of 'Stream & this' the signatures of 'Stream' get precedence.\n every(predicate: (value: T) => value is U): this is Stream & this;\n every(predicate: (value: T) => unknown): boolean;\n every(predicate: (value: T) => unknown): boolean {\n const iterator = this.iterator();\n let next = iterator.next();\n while (!next.done) {\n if (!predicate(next.value)) {\n return false;\n }\n next = iterator.next();\n }\n return true;\n }\n\n some(predicate: (value: T) => unknown): boolean {\n const iterator = this.iterator();\n let next = iterator.next();\n while (!next.done) {\n if (predicate(next.value)) {\n return true;\n }\n next = iterator.next();\n }\n return false;\n }\n\n forEach(callbackfn: (value: T, index: number) => void): void {\n const iterator = this.iterator();\n let index = 0;\n let next = iterator.next();\n while (!next.done) {\n callbackfn(next.value, index);\n next = iterator.next();\n index++;\n }\n }\n\n map(callbackfn: (value: T) => U): Stream {\n return new StreamImpl(\n this.startFn,\n (state) => {\n const { done, value } = this.nextFn(state);\n if (done) {\n return DONE_RESULT;\n } else {\n return { done: false, value: callbackfn(value) };\n }\n }\n );\n }\n\n // for remarks on the return type definition refer to 'every(...)'\n filter(predicate: (value: T) => value is U): Stream & this;\n filter(predicate: (value: T) => unknown): Stream & this;\n filter(predicate: (value: T) => unknown): Stream {\n return new StreamImpl(\n this.startFn,\n state => {\n let result: IteratorResult;\n do {\n result = this.nextFn(state);\n if (!result.done && predicate(result.value)) {\n return result;\n }\n } while (!result.done);\n return DONE_RESULT;\n }\n );\n }\n\n nonNullable(): Stream> {\n return this.filter(e => e !== undefined && e !== null) as Stream>;\n }\n\n reduce(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;\n reduce(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;\n reduce(callbackfn: (previousValue: U | T, currentValue: T) => U, initialValue?: U): U | T | undefined {\n const iterator = this.iterator();\n let previousValue: U | T | undefined = initialValue;\n let next = iterator.next();\n while (!next.done) {\n if (previousValue === undefined) {\n previousValue = next.value;\n } else {\n previousValue = callbackfn(previousValue, next.value);\n }\n next = iterator.next();\n }\n return previousValue;\n }\n\n reduceRight(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;\n reduceRight(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;\n reduceRight(callbackfn: (previousValue: U | T, currentValue: T) => U, initialValue?: U): U | T | undefined {\n return this.recursiveReduce(this.iterator(), callbackfn, initialValue);\n }\n\n protected recursiveReduce(iterator: Iterator, callbackfn: (previousValue: U | T, currentValue: T) => U, initialValue?: U): U | T | undefined {\n const next = iterator.next();\n if (next.done) {\n return initialValue;\n }\n const previousValue = this.recursiveReduce(iterator, callbackfn, initialValue);\n if (previousValue === undefined) {\n return next.value;\n }\n return callbackfn(previousValue, next.value);\n }\n\n find(predicate: (value: T) => value is S): S | undefined;\n find(predicate: (value: T) => unknown): T | undefined;\n find(predicate: (value: T) => unknown): T | undefined {\n const iterator = this.iterator();\n let next = iterator.next();\n while (!next.done) {\n if (predicate(next.value)) {\n return next.value;\n }\n next = iterator.next();\n }\n return undefined;\n }\n\n findIndex(predicate: (value: T) => unknown): number {\n const iterator = this.iterator();\n let index = 0;\n let next = iterator.next();\n while (!next.done) {\n if (predicate(next.value)) {\n return index;\n }\n next = iterator.next();\n index++;\n }\n return -1;\n }\n\n includes(searchElement: T): boolean {\n const iterator = this.iterator();\n let next = iterator.next();\n while (!next.done) {\n if (next.value === searchElement) {\n return true;\n }\n next = iterator.next();\n }\n return false;\n }\n\n flatMap(callbackfn: (value: T) => U | Iterable): Stream {\n type FlatMapState = { this: S, iterator?: Iterator }\n return new StreamImpl(\n () => ({ this: this.startFn() }),\n (state) => {\n do {\n if (state.iterator) {\n const next = state.iterator.next();\n if (next.done) {\n state.iterator = undefined;\n } else {\n return next;\n }\n }\n const { done, value } = this.nextFn(state.this);\n if (!done) {\n const mapped = callbackfn(value);\n if (isIterable(mapped)) {\n state.iterator = mapped[Symbol.iterator]();\n } else {\n return { done: false, value: mapped };\n }\n }\n } while (state.iterator);\n return DONE_RESULT;\n }\n );\n }\n\n flat(depth?: D): FlatStream {\n if (depth === undefined) {\n depth = 1 as D;\n }\n if (depth <= 0) {\n return this as unknown as FlatStream;\n }\n const stream = depth > 1 ? this.flat(depth - 1) as unknown as StreamImpl : this;\n type FlatMapState = { this: S, iterator?: Iterator }\n return new StreamImpl(\n () => ({ this: stream.startFn() }),\n (state) => {\n do {\n if (state.iterator) {\n const next = state.iterator.next();\n if (next.done) {\n state.iterator = undefined;\n } else {\n return next;\n }\n }\n const { done, value } = stream.nextFn(state.this);\n if (!done) {\n if (isIterable(value)) {\n state.iterator = value[Symbol.iterator]() as Iterator;\n } else {\n return { done: false, value: value };\n }\n }\n } while (state.iterator);\n return DONE_RESULT;\n }\n ) as unknown as FlatStream;\n }\n\n head(): T | undefined {\n const iterator = this.iterator();\n const result = iterator.next();\n if (result.done) {\n return undefined;\n }\n return result.value;\n }\n\n tail(skipCount = 1): Stream {\n return new StreamImpl(\n () => {\n const state = this.startFn();\n for (let i = 0; i < skipCount; i++) {\n const next = this.nextFn(state);\n if (next.done) {\n return state;\n }\n }\n return state;\n },\n this.nextFn\n );\n }\n\n limit(maxSize: number): Stream {\n return new StreamImpl<{ size: number, state: S }, T>(\n () => ({ size: 0, state: this.startFn() }),\n state => {\n state.size++;\n if (state.size > maxSize) {\n return DONE_RESULT;\n }\n return this.nextFn(state.state);\n }\n );\n }\n\n distinct(by?: (element: T) => Key): Stream {\n const set = new Set();\n return this.filter(e => {\n const value = by ? by(e) : e;\n if (set.has(value)) {\n return false;\n } else {\n set.add(value);\n return true;\n }\n });\n }\n\n exclude(other: Iterable, key?: (element: T) => Key): Stream {\n const otherKeySet = new Set();\n for (const item of other) {\n const value = key ? key(item) : item;\n otherKeySet.add(value);\n }\n return this.filter(e => {\n const ownKey = key ? key(e) : e;\n return !otherKeySet.has(ownKey);\n });\n }\n}\n\nfunction toString(item: unknown): string {\n if (typeof item === 'string') {\n return item as string;\n }\n if (typeof item === 'undefined') {\n return 'undefined';\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (typeof (item as any).toString === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (item as any).toString();\n }\n return Object.prototype.toString.call(item);\n}\n\nfunction isIterable(obj: unknown): obj is Iterable {\n return !!obj && typeof (obj as Iterable)[Symbol.iterator] === 'function';\n}\n\n/**\n * An empty stream of any type.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const EMPTY_STREAM: Stream = new StreamImpl(() => undefined, () => DONE_RESULT);\n\n/**\n * Use this `IteratorResult` when implementing a `StreamImpl` to indicate that there are no more elements in the stream.\n */\nexport const DONE_RESULT: IteratorReturnResult = Object.freeze({ done: true, value: undefined });\n\n/**\n * Create a stream from one or more iterables or array-likes.\n */\nexport function stream(...collections: Array | ArrayLike>): Stream {\n if (collections.length === 1) {\n const collection = collections[0];\n if (collection instanceof StreamImpl) {\n return collection as Stream;\n }\n if (isIterable(collection)) {\n return new StreamImpl, T>(\n () => collection[Symbol.iterator](),\n (iterator) => iterator.next()\n );\n }\n if (typeof collection.length === 'number') {\n return new StreamImpl<{ index: number }, T>(\n () => ({ index: 0 }),\n (state) => {\n if (state.index < collection.length) {\n return { done: false, value: collection[state.index++] };\n } else {\n return DONE_RESULT;\n }\n }\n );\n }\n }\n if (collections.length > 1) {\n type State = { collIndex: number, iterator?: Iterator, array?: ArrayLike, arrIndex: number };\n return new StreamImpl(\n () => ({ collIndex: 0, arrIndex: 0 }),\n (state) => {\n do {\n if (state.iterator) {\n const next = state.iterator.next();\n if (!next.done) {\n return next;\n }\n state.iterator = undefined;\n }\n if (state.array) {\n if (state.arrIndex < state.array.length) {\n return { done: false, value: state.array[state.arrIndex++] };\n }\n state.array = undefined;\n state.arrIndex = 0;\n }\n if (state.collIndex < collections.length) {\n const collection = collections[state.collIndex++];\n if (isIterable(collection)) {\n state.iterator = collection[Symbol.iterator]();\n } else if (collection && typeof collection.length === 'number') {\n state.array = collection;\n }\n }\n } while (state.iterator || state.array || state.collIndex < collections.length);\n return DONE_RESULT;\n }\n );\n }\n return EMPTY_STREAM;\n}\n\n/**\n * A tree iterator adds the ability to prune the current iteration.\n */\nexport interface TreeIterator extends IterableIterator {\n /**\n * Skip the whole subtree below the last returned element. The iteration continues as if that\n * element had no children.\n */\n prune(): void\n}\n\n/**\n * A tree stream is used to stream the elements of a tree, for example an AST or CST.\n */\nexport interface TreeStream extends Stream {\n iterator(): TreeIterator\n}\n\n/**\n * The default implementation of `TreeStream` takes a root element and a function that computes the\n * children of its argument. Whether the root node included in the stream is controlled with the\n * `includeRoot` option, which defaults to `false`.\n */\nexport class TreeStreamImpl\n extends StreamImpl<{ iterators: Array>, pruned: boolean }, T>\n implements TreeStream {\n\n constructor(root: T, children: (node: T) => Iterable, options?: { includeRoot?: boolean }) {\n super(\n () => ({\n iterators: options?.includeRoot ? [[root][Symbol.iterator]()] : [children(root)[Symbol.iterator]()],\n pruned: false\n }),\n state => {\n if (state.pruned) {\n state.iterators.pop();\n state.pruned = false;\n }\n while (state.iterators.length > 0) {\n const iterator = state.iterators[state.iterators.length - 1];\n const next = iterator.next();\n if (next.done) {\n state.iterators.pop();\n } else {\n state.iterators.push(children(next.value)[Symbol.iterator]());\n return next;\n }\n }\n return DONE_RESULT;\n }\n );\n }\n\n override iterator(): TreeIterator {\n const iterator = {\n state: this.startFn(),\n next: () => this.nextFn(iterator.state),\n prune: () => {\n iterator.state.pruned = true;\n },\n [Symbol.iterator]: () => iterator\n };\n return iterator;\n }\n}\n\n/**\n * A set of utility functions that reduce a stream to a single value.\n */\nexport namespace Reduction {\n\n /**\n * Compute the sum of a number stream.\n */\n export function sum(stream: Stream): number {\n return stream.reduce((a, b) => a + b, 0);\n }\n\n /**\n * Compute the product of a number stream.\n */\n export function product(stream: Stream): number {\n return stream.reduce((a, b) => a * b, 0);\n }\n\n /**\n * Compute the minimum of a number stream. Returns `undefined` if the stream is empty.\n */\n export function min(stream: Stream): number | undefined {\n return stream.reduce((a, b) => Math.min(a, b));\n }\n\n /**\n * Compute the maximum of a number stream. Returns `undefined` if the stream is empty.\n */\n export function max(stream: Stream): number | undefined {\n return stream.reduce((a, b) => Math.max(a, b));\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { IToken } from '@chevrotain/types';\nimport type { Range } from 'vscode-languageserver-types';\nimport type { CstNode, CompositeCstNode, LeafCstNode } from '../syntax-tree.js';\nimport type { DocumentSegment } from '../workspace/documents.js';\nimport type { Stream, TreeStream } from './stream.js';\nimport { isCompositeCstNode, isLeafCstNode, isRootCstNode } from '../syntax-tree.js';\nimport { TreeStreamImpl } from './stream.js';\n\n/**\n * Create a stream of all CST nodes that are directly and indirectly contained in the given root node,\n * including the root node itself.\n */\nexport function streamCst(node: CstNode): TreeStream {\n return new TreeStreamImpl(node, element => {\n if (isCompositeCstNode(element)) {\n return element.content;\n } else {\n return [];\n }\n }, { includeRoot: true });\n}\n\n/**\n * Create a stream of all leaf nodes that are directly and indirectly contained in the given root node.\n */\nexport function flattenCst(node: CstNode): Stream {\n return streamCst(node).filter(isLeafCstNode);\n}\n\n/**\n * Determines whether the specified cst node is a child of the specified parent node.\n */\nexport function isChildNode(child: CstNode, parent: CstNode): boolean {\n while (child.container) {\n child = child.container;\n if (child === parent) {\n return true;\n }\n }\n return false;\n}\n\nexport function tokenToRange(token: IToken): Range {\n // Chevrotain uses 1-based indices everywhere\n // So we subtract 1 from every value to align with the LSP\n return {\n start: {\n character: token.startColumn! - 1,\n line: token.startLine! - 1\n },\n end: {\n character: token.endColumn!, // endColumn uses the correct index\n line: token.endLine! - 1\n }\n };\n}\n\nexport function toDocumentSegment(node: CstNode): DocumentSegment;\nexport function toDocumentSegment(node?: CstNode): DocumentSegment | undefined;\nexport function toDocumentSegment(node?: CstNode): DocumentSegment | undefined {\n if (!node) {\n return undefined;\n }\n const { offset, end, range } = node;\n return {\n range,\n offset,\n end,\n length: end - offset\n };\n}\n\nexport enum RangeComparison {\n Before = 0,\n After = 1,\n OverlapFront = 2,\n OverlapBack = 3,\n Inside = 4\n}\n\nexport function compareRange(range: Range, to: Range): RangeComparison {\n if (range.end.line < to.start.line || (range.end.line === to.start.line && range.end.character < range.start.character)) {\n return RangeComparison.Before;\n } else if (range.start.line > to.end.line || (range.start.line === to.end.line && range.start.character > to.end.character)) {\n return RangeComparison.After;\n }\n const startInside = range.start.line > to.start.line || (range.start.line === to.start.line && range.start.character >= to.start.character);\n const endInside = range.end.line < to.end.line || (range.end.line === to.end.line && range.end.character <= to.end.character);\n if (startInside && endInside) {\n return RangeComparison.Inside;\n } else if (startInside) {\n return RangeComparison.OverlapBack;\n } else {\n return RangeComparison.OverlapFront;\n }\n}\n\nexport function inRange(range: Range, to: Range): boolean {\n const comparison = compareRange(range, to);\n return comparison > RangeComparison.After;\n}\n\n// The \\p{L} regex matches any unicode letter character, i.e. characters from non-english alphabets\n// Together with \\w it matches any kind of character which can commonly appear in IDs\nexport const DefaultNameRegexp = /^[\\w\\p{L}]$/u;\n\n/**\n * Performs `findLeafNodeAtOffset` with a minor difference: When encountering a character that matches the `nameRegexp` argument,\n * it will instead return the leaf node at the `offset - 1` position.\n *\n * For LSP services, users expect that the declaration of an element is available if the cursor is directly after the element.\n */\nexport function findDeclarationNodeAtOffset(cstNode: CstNode | undefined, offset: number, nameRegexp = DefaultNameRegexp): LeafCstNode | undefined {\n if (cstNode) {\n if (offset > 0) {\n const localOffset = offset - cstNode.offset;\n const textAtOffset = cstNode.text.charAt(localOffset);\n if (!nameRegexp.test(textAtOffset)) {\n offset--;\n }\n }\n return findLeafNodeAtOffset(cstNode, offset);\n }\n return undefined;\n}\n\nexport function findCommentNode(cstNode: CstNode | undefined, commentNames: string[]): CstNode | undefined {\n if (cstNode) {\n const previous = getPreviousNode(cstNode, true);\n if (previous && isCommentNode(previous, commentNames)) {\n return previous;\n }\n if (isRootCstNode(cstNode)) {\n // Go from the first non-hidden node through all nodes in reverse order\n // We do this to find the comment node which directly precedes the root node\n const endIndex = cstNode.content.findIndex(e => !e.hidden);\n for (let i = endIndex - 1; i >= 0; i--) {\n const child = cstNode.content[i];\n if (isCommentNode(child, commentNames)) {\n return child;\n }\n }\n }\n }\n return undefined;\n}\n\nexport function isCommentNode(cstNode: CstNode, commentNames: string[]): boolean {\n return isLeafCstNode(cstNode) && commentNames.includes(cstNode.tokenType.name);\n}\n\n/**\n * Finds the leaf CST node at the specified 0-based string offset.\n * Note that the given offset will be within the range of the returned leaf node.\n *\n * If the offset does not point to a CST node (but just white space), this method will return `undefined`.\n *\n * @param node The CST node to search through.\n * @param offset The specified offset.\n * @returns The CST node at the specified offset.\n */\nexport function findLeafNodeAtOffset(node: CstNode, offset: number): LeafCstNode | undefined {\n if (isLeafCstNode(node)) {\n return node;\n } else if (isCompositeCstNode(node)) {\n const searchResult = binarySearch(node, offset, false);\n if (searchResult) {\n return findLeafNodeAtOffset(searchResult, offset);\n }\n }\n return undefined;\n}\n\n/**\n * Finds the leaf CST node at the specified 0-based string offset.\n * If no CST node exists at the specified position, it will return the leaf node before it.\n *\n * If there is no leaf node before the specified offset, this method will return `undefined`.\n *\n * @param node The CST node to search through.\n * @param offset The specified offset.\n * @returns The CST node closest to the specified offset.\n */\nexport function findLeafNodeBeforeOffset(node: CstNode, offset: number): LeafCstNode | undefined {\n if (isLeafCstNode(node)) {\n return node;\n } else if (isCompositeCstNode(node)) {\n const searchResult = binarySearch(node, offset, true);\n if (searchResult) {\n return findLeafNodeBeforeOffset(searchResult, offset);\n }\n }\n return undefined;\n}\n\nfunction binarySearch(node: CompositeCstNode, offset: number, closest: boolean): CstNode | undefined {\n let left = 0;\n let right = node.content.length - 1;\n let closestNode: CstNode | undefined = undefined;\n\n while (left <= right) {\n const middle = Math.floor((left + right) / 2);\n const middleNode = node.content[middle];\n\n if (middleNode.offset <= offset && middleNode.end > offset) {\n // Found an exact match\n return middleNode;\n }\n\n if (middleNode.end <= offset) {\n // Update the closest node (less than offset) and move to the right half\n closestNode = closest ? middleNode : undefined;\n left = middle + 1;\n } else {\n // Move to the left half\n right = middle - 1;\n }\n }\n\n return closestNode;\n}\n\nexport function getPreviousNode(node: CstNode, hidden = true): CstNode | undefined {\n while (node.container) {\n const parent = node.container;\n let index = parent.content.indexOf(node);\n while (index > 0) {\n index--;\n const previous = parent.content[index];\n if (hidden || !previous.hidden) {\n return previous;\n }\n }\n node = parent;\n }\n return undefined;\n}\n\nexport function getNextNode(node: CstNode, hidden = true): CstNode | undefined {\n while (node.container) {\n const parent = node.container;\n let index = parent.content.indexOf(node);\n const last = parent.content.length - 1;\n while (index < last) {\n index++;\n const next = parent.content[index];\n if (hidden || !next.hidden) {\n return next;\n }\n }\n node = parent;\n }\n return undefined;\n}\n\nexport function getStartlineNode(node: CstNode): CstNode {\n if (node.range.start.character === 0) {\n return node;\n }\n const line = node.range.start.line;\n let last = node;\n let index: number | undefined;\n while (node.container) {\n const parent = node.container;\n const selfIndex = index ?? parent.content.indexOf(node);\n if (selfIndex === 0) {\n node = parent;\n index = undefined;\n } else {\n index = selfIndex - 1;\n node = parent.content[index];\n }\n if (node.range.start.line !== line) {\n break;\n }\n last = node;\n }\n return last;\n}\n\nexport function getInteriorNodes(start: CstNode, end: CstNode): CstNode[] {\n const commonParent = getCommonParent(start, end);\n if (!commonParent) {\n return [];\n }\n return commonParent.parent.content.slice(commonParent.a + 1, commonParent.b);\n}\n\nfunction getCommonParent(a: CstNode, b: CstNode): CommonParent | undefined {\n const aParents = getParentChain(a);\n const bParents = getParentChain(b);\n let current: CommonParent | undefined;\n for (let i = 0; i < aParents.length && i < bParents.length; i++) {\n const aParent = aParents[i];\n const bParent = bParents[i];\n if (aParent.parent === bParent.parent) {\n current = {\n parent: aParent.parent,\n a: aParent.index,\n b: bParent.index\n };\n } else {\n break;\n }\n }\n return current;\n}\n\ninterface CommonParent {\n parent: CompositeCstNode\n a: number\n b: number\n}\n\nfunction getParentChain(node: CstNode): ParentLink[] {\n const chain: ParentLink[] = [];\n while (node.container) {\n const parent = node.container;\n const index = parent.content.indexOf(node);\n chain.push({\n parent,\n index\n });\n node = parent;\n }\n return chain.reverse();\n}\n\ninterface ParentLink {\n parent: CompositeCstNode\n index: number\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { CstNode } from '../syntax-tree.js';\n\nexport class ErrorWithLocation extends Error {\n constructor(node: CstNode | undefined, message: string) {\n super(node ? `${message} at ${node.range.start.line}:${node.range.start.character}` : message);\n }\n}\n\nexport function assertUnreachable(_: never): never {\n throw new Error('Error! The input value was not handled.');\n}\n", "/******************************************************************************\n * This file was generated by langium-cli 3.0.0.\n * DO NOT EDIT MANUALLY!\n ******************************************************************************/\n\n/* eslint-disable */\nimport type { AstNode, Reference, ReferenceInfo, TypeMetaData } from '../../syntax-tree.js';\nimport { AbstractAstReflection } from '../../syntax-tree.js';\n\nexport const LangiumGrammarTerminals = {\n ID: /\\^?[_a-zA-Z][\\w_]*/,\n STRING: /\"(\\\\.|[^\"\\\\])*\"|'(\\\\.|[^'\\\\])*'/,\n NUMBER: /NaN|-?((\\d*\\.\\d+|\\d+)([Ee][+-]?\\d+)?|Infinity)/,\n RegexLiteral: /\\/(?![*+?])(?:[^\\r\\n\\[/\\\\]|\\\\.|\\[(?:[^\\r\\n\\]\\\\]|\\\\.)*\\])+\\/[a-z]*/,\n WS: /\\s+/,\n ML_COMMENT: /\\/\\*[\\s\\S]*?\\*\\//,\n SL_COMMENT: /\\/\\/[^\\n\\r]*/,\n};\n\nexport type AbstractRule = ParserRule | TerminalRule;\n\nexport const AbstractRule = 'AbstractRule';\n\nexport function isAbstractRule(item: unknown): item is AbstractRule {\n return reflection.isInstance(item, AbstractRule);\n}\n\nexport type AbstractType = InferredType | Interface | ParserRule | Type;\n\nexport const AbstractType = 'AbstractType';\n\nexport function isAbstractType(item: unknown): item is AbstractType {\n return reflection.isInstance(item, AbstractType);\n}\n\nexport type Condition = BooleanLiteral | Conjunction | Disjunction | Negation | ParameterReference;\n\nexport const Condition = 'Condition';\n\nexport function isCondition(item: unknown): item is Condition {\n return reflection.isInstance(item, Condition);\n}\n\nexport type FeatureName = 'current' | 'entry' | 'extends' | 'false' | 'fragment' | 'grammar' | 'hidden' | 'import' | 'infer' | 'infers' | 'interface' | 'returns' | 'terminal' | 'true' | 'type' | 'with' | PrimitiveType | string;\n\nexport function isFeatureName(item: unknown): item is FeatureName {\n return isPrimitiveType(item) || item === 'current' || item === 'entry' || item === 'extends' || item === 'false' || item === 'fragment' || item === 'grammar' || item === 'hidden' || item === 'import' || item === 'interface' || item === 'returns' || item === 'terminal' || item === 'true' || item === 'type' || item === 'infer' || item === 'infers' || item === 'with' || (typeof item === 'string' && (/\\^?[_a-zA-Z][\\w_]*/.test(item)));\n}\n\nexport type PrimitiveType = 'Date' | 'bigint' | 'boolean' | 'number' | 'string';\n\nexport function isPrimitiveType(item: unknown): item is PrimitiveType {\n return item === 'string' || item === 'number' || item === 'boolean' || item === 'Date' || item === 'bigint';\n}\n\nexport type TypeDefinition = ArrayType | ReferenceType | SimpleType | UnionType;\n\nexport const TypeDefinition = 'TypeDefinition';\n\nexport function isTypeDefinition(item: unknown): item is TypeDefinition {\n return reflection.isInstance(item, TypeDefinition);\n}\n\nexport type ValueLiteral = ArrayLiteral | BooleanLiteral | NumberLiteral | StringLiteral;\n\nexport const ValueLiteral = 'ValueLiteral';\n\nexport function isValueLiteral(item: unknown): item is ValueLiteral {\n return reflection.isInstance(item, ValueLiteral);\n}\n\nexport interface AbstractElement extends AstNode {\n readonly $type: 'AbstractElement' | 'Action' | 'Alternatives' | 'Assignment' | 'CharacterRange' | 'CrossReference' | 'EndOfFile' | 'Group' | 'Keyword' | 'NegatedToken' | 'RegexToken' | 'RuleCall' | 'TerminalAlternatives' | 'TerminalGroup' | 'TerminalRuleCall' | 'UnorderedGroup' | 'UntilToken' | 'Wildcard';\n cardinality?: '*' | '+' | '?';\n lookahead?: '?!' | '?;\n}\n\nexport const ArrayLiteral = 'ArrayLiteral';\n\nexport function isArrayLiteral(item: unknown): item is ArrayLiteral {\n return reflection.isInstance(item, ArrayLiteral);\n}\n\nexport interface ArrayType extends AstNode {\n readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;\n readonly $type: 'ArrayType';\n elementType: TypeDefinition;\n}\n\nexport const ArrayType = 'ArrayType';\n\nexport function isArrayType(item: unknown): item is ArrayType {\n return reflection.isInstance(item, ArrayType);\n}\n\nexport interface BooleanLiteral extends AstNode {\n readonly $container: ArrayLiteral | Conjunction | Disjunction | Group | NamedArgument | Negation | TypeAttribute;\n readonly $type: 'BooleanLiteral';\n true: boolean;\n}\n\nexport const BooleanLiteral = 'BooleanLiteral';\n\nexport function isBooleanLiteral(item: unknown): item is BooleanLiteral {\n return reflection.isInstance(item, BooleanLiteral);\n}\n\nexport interface Conjunction extends AstNode {\n readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;\n readonly $type: 'Conjunction';\n left: Condition;\n right: Condition;\n}\n\nexport const Conjunction = 'Conjunction';\n\nexport function isConjunction(item: unknown): item is Conjunction {\n return reflection.isInstance(item, Conjunction);\n}\n\nexport interface Disjunction extends AstNode {\n readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;\n readonly $type: 'Disjunction';\n left: Condition;\n right: Condition;\n}\n\nexport const Disjunction = 'Disjunction';\n\nexport function isDisjunction(item: unknown): item is Disjunction {\n return reflection.isInstance(item, Disjunction);\n}\n\nexport interface Grammar extends AstNode {\n readonly $type: 'Grammar';\n definesHiddenTokens: boolean;\n hiddenTokens: Array>;\n imports: Array;\n interfaces: Array;\n isDeclared: boolean;\n name?: string;\n rules: Array;\n types: Array;\n usedGrammars: Array>;\n}\n\nexport const Grammar = 'Grammar';\n\nexport function isGrammar(item: unknown): item is Grammar {\n return reflection.isInstance(item, Grammar);\n}\n\nexport interface GrammarImport extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'GrammarImport';\n path: string;\n}\n\nexport const GrammarImport = 'GrammarImport';\n\nexport function isGrammarImport(item: unknown): item is GrammarImport {\n return reflection.isInstance(item, GrammarImport);\n}\n\nexport interface InferredType extends AstNode {\n readonly $container: Action | ParserRule;\n readonly $type: 'InferredType';\n name: string;\n}\n\nexport const InferredType = 'InferredType';\n\nexport function isInferredType(item: unknown): item is InferredType {\n return reflection.isInstance(item, InferredType);\n}\n\nexport interface Interface extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'Interface';\n attributes: Array;\n name: string;\n superTypes: Array>;\n}\n\nexport const Interface = 'Interface';\n\nexport function isInterface(item: unknown): item is Interface {\n return reflection.isInstance(item, Interface);\n}\n\nexport interface NamedArgument extends AstNode {\n readonly $container: RuleCall;\n readonly $type: 'NamedArgument';\n calledByName: boolean;\n parameter?: Reference;\n value: Condition;\n}\n\nexport const NamedArgument = 'NamedArgument';\n\nexport function isNamedArgument(item: unknown): item is NamedArgument {\n return reflection.isInstance(item, NamedArgument);\n}\n\nexport interface Negation extends AstNode {\n readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;\n readonly $type: 'Negation';\n value: Condition;\n}\n\nexport const Negation = 'Negation';\n\nexport function isNegation(item: unknown): item is Negation {\n return reflection.isInstance(item, Negation);\n}\n\nexport interface NumberLiteral extends AstNode {\n readonly $container: ArrayLiteral | TypeAttribute;\n readonly $type: 'NumberLiteral';\n value: number;\n}\n\nexport const NumberLiteral = 'NumberLiteral';\n\nexport function isNumberLiteral(item: unknown): item is NumberLiteral {\n return reflection.isInstance(item, NumberLiteral);\n}\n\nexport interface Parameter extends AstNode {\n readonly $container: ParserRule;\n readonly $type: 'Parameter';\n name: string;\n}\n\nexport const Parameter = 'Parameter';\n\nexport function isParameter(item: unknown): item is Parameter {\n return reflection.isInstance(item, Parameter);\n}\n\nexport interface ParameterReference extends AstNode {\n readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;\n readonly $type: 'ParameterReference';\n parameter: Reference;\n}\n\nexport const ParameterReference = 'ParameterReference';\n\nexport function isParameterReference(item: unknown): item is ParameterReference {\n return reflection.isInstance(item, ParameterReference);\n}\n\nexport interface ParserRule extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'ParserRule';\n dataType?: PrimitiveType;\n definesHiddenTokens: boolean;\n definition: AbstractElement;\n entry: boolean;\n fragment: boolean;\n hiddenTokens: Array>;\n inferredType?: InferredType;\n name: string;\n parameters: Array;\n returnType?: Reference;\n wildcard: boolean;\n}\n\nexport const ParserRule = 'ParserRule';\n\nexport function isParserRule(item: unknown): item is ParserRule {\n return reflection.isInstance(item, ParserRule);\n}\n\nexport interface ReferenceType extends AstNode {\n readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;\n readonly $type: 'ReferenceType';\n referenceType: TypeDefinition;\n}\n\nexport const ReferenceType = 'ReferenceType';\n\nexport function isReferenceType(item: unknown): item is ReferenceType {\n return reflection.isInstance(item, ReferenceType);\n}\n\nexport interface ReturnType extends AstNode {\n readonly $container: TerminalRule;\n readonly $type: 'ReturnType';\n name: PrimitiveType | string;\n}\n\nexport const ReturnType = 'ReturnType';\n\nexport function isReturnType(item: unknown): item is ReturnType {\n return reflection.isInstance(item, ReturnType);\n}\n\nexport interface SimpleType extends AstNode {\n readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;\n readonly $type: 'SimpleType';\n primitiveType?: PrimitiveType;\n stringType?: string;\n typeRef?: Reference;\n}\n\nexport const SimpleType = 'SimpleType';\n\nexport function isSimpleType(item: unknown): item is SimpleType {\n return reflection.isInstance(item, SimpleType);\n}\n\nexport interface StringLiteral extends AstNode {\n readonly $container: ArrayLiteral | TypeAttribute;\n readonly $type: 'StringLiteral';\n value: string;\n}\n\nexport const StringLiteral = 'StringLiteral';\n\nexport function isStringLiteral(item: unknown): item is StringLiteral {\n return reflection.isInstance(item, StringLiteral);\n}\n\nexport interface TerminalRule extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'TerminalRule';\n definition: AbstractElement;\n fragment: boolean;\n hidden: boolean;\n name: string;\n type?: ReturnType;\n}\n\nexport const TerminalRule = 'TerminalRule';\n\nexport function isTerminalRule(item: unknown): item is TerminalRule {\n return reflection.isInstance(item, TerminalRule);\n}\n\nexport interface Type extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'Type';\n name: string;\n type: TypeDefinition;\n}\n\nexport const Type = 'Type';\n\nexport function isType(item: unknown): item is Type {\n return reflection.isInstance(item, Type);\n}\n\nexport interface TypeAttribute extends AstNode {\n readonly $container: Interface;\n readonly $type: 'TypeAttribute';\n defaultValue?: ValueLiteral;\n isOptional: boolean;\n name: FeatureName;\n type: TypeDefinition;\n}\n\nexport const TypeAttribute = 'TypeAttribute';\n\nexport function isTypeAttribute(item: unknown): item is TypeAttribute {\n return reflection.isInstance(item, TypeAttribute);\n}\n\nexport interface UnionType extends AstNode {\n readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;\n readonly $type: 'UnionType';\n types: Array;\n}\n\nexport const UnionType = 'UnionType';\n\nexport function isUnionType(item: unknown): item is UnionType {\n return reflection.isInstance(item, UnionType);\n}\n\nexport interface Action extends AbstractElement {\n readonly $type: 'Action';\n feature?: FeatureName;\n inferredType?: InferredType;\n operator?: '+=' | '=';\n type?: Reference;\n}\n\nexport const Action = 'Action';\n\nexport function isAction(item: unknown): item is Action {\n return reflection.isInstance(item, Action);\n}\n\nexport interface Alternatives extends AbstractElement {\n readonly $type: 'Alternatives';\n elements: Array;\n}\n\nexport const Alternatives = 'Alternatives';\n\nexport function isAlternatives(item: unknown): item is Alternatives {\n return reflection.isInstance(item, Alternatives);\n}\n\nexport interface Assignment extends AbstractElement {\n readonly $type: 'Assignment';\n feature: FeatureName;\n operator: '+=' | '=' | '?=';\n terminal: AbstractElement;\n}\n\nexport const Assignment = 'Assignment';\n\nexport function isAssignment(item: unknown): item is Assignment {\n return reflection.isInstance(item, Assignment);\n}\n\nexport interface CharacterRange extends AbstractElement {\n readonly $type: 'CharacterRange';\n left: Keyword;\n right?: Keyword;\n}\n\nexport const CharacterRange = 'CharacterRange';\n\nexport function isCharacterRange(item: unknown): item is CharacterRange {\n return reflection.isInstance(item, CharacterRange);\n}\n\nexport interface CrossReference extends AbstractElement {\n readonly $type: 'CrossReference';\n deprecatedSyntax: boolean;\n terminal?: AbstractElement;\n type: Reference;\n}\n\nexport const CrossReference = 'CrossReference';\n\nexport function isCrossReference(item: unknown): item is CrossReference {\n return reflection.isInstance(item, CrossReference);\n}\n\nexport interface EndOfFile extends AbstractElement {\n readonly $type: 'EndOfFile';\n}\n\nexport const EndOfFile = 'EndOfFile';\n\nexport function isEndOfFile(item: unknown): item is EndOfFile {\n return reflection.isInstance(item, EndOfFile);\n}\n\nexport interface Group extends AbstractElement {\n readonly $type: 'Group';\n elements: Array;\n guardCondition?: Condition;\n}\n\nexport const Group = 'Group';\n\nexport function isGroup(item: unknown): item is Group {\n return reflection.isInstance(item, Group);\n}\n\nexport interface Keyword extends AbstractElement {\n readonly $container: CharacterRange;\n readonly $type: 'Keyword';\n value: string;\n}\n\nexport const Keyword = 'Keyword';\n\nexport function isKeyword(item: unknown): item is Keyword {\n return reflection.isInstance(item, Keyword);\n}\n\nexport interface NegatedToken extends AbstractElement {\n readonly $type: 'NegatedToken';\n terminal: AbstractElement;\n}\n\nexport const NegatedToken = 'NegatedToken';\n\nexport function isNegatedToken(item: unknown): item is NegatedToken {\n return reflection.isInstance(item, NegatedToken);\n}\n\nexport interface RegexToken extends AbstractElement {\n readonly $type: 'RegexToken';\n regex: string;\n}\n\nexport const RegexToken = 'RegexToken';\n\nexport function isRegexToken(item: unknown): item is RegexToken {\n return reflection.isInstance(item, RegexToken);\n}\n\nexport interface RuleCall extends AbstractElement {\n readonly $type: 'RuleCall';\n arguments: Array;\n rule: Reference;\n}\n\nexport const RuleCall = 'RuleCall';\n\nexport function isRuleCall(item: unknown): item is RuleCall {\n return reflection.isInstance(item, RuleCall);\n}\n\nexport interface TerminalAlternatives extends AbstractElement {\n readonly $type: 'TerminalAlternatives';\n elements: Array;\n}\n\nexport const TerminalAlternatives = 'TerminalAlternatives';\n\nexport function isTerminalAlternatives(item: unknown): item is TerminalAlternatives {\n return reflection.isInstance(item, TerminalAlternatives);\n}\n\nexport interface TerminalGroup extends AbstractElement {\n readonly $type: 'TerminalGroup';\n elements: Array;\n}\n\nexport const TerminalGroup = 'TerminalGroup';\n\nexport function isTerminalGroup(item: unknown): item is TerminalGroup {\n return reflection.isInstance(item, TerminalGroup);\n}\n\nexport interface TerminalRuleCall extends AbstractElement {\n readonly $type: 'TerminalRuleCall';\n rule: Reference;\n}\n\nexport const TerminalRuleCall = 'TerminalRuleCall';\n\nexport function isTerminalRuleCall(item: unknown): item is TerminalRuleCall {\n return reflection.isInstance(item, TerminalRuleCall);\n}\n\nexport interface UnorderedGroup extends AbstractElement {\n readonly $type: 'UnorderedGroup';\n elements: Array;\n}\n\nexport const UnorderedGroup = 'UnorderedGroup';\n\nexport function isUnorderedGroup(item: unknown): item is UnorderedGroup {\n return reflection.isInstance(item, UnorderedGroup);\n}\n\nexport interface UntilToken extends AbstractElement {\n readonly $type: 'UntilToken';\n terminal: AbstractElement;\n}\n\nexport const UntilToken = 'UntilToken';\n\nexport function isUntilToken(item: unknown): item is UntilToken {\n return reflection.isInstance(item, UntilToken);\n}\n\nexport interface Wildcard extends AbstractElement {\n readonly $type: 'Wildcard';\n}\n\nexport const Wildcard = 'Wildcard';\n\nexport function isWildcard(item: unknown): item is Wildcard {\n return reflection.isInstance(item, Wildcard);\n}\n\nexport type LangiumGrammarAstType = {\n AbstractElement: AbstractElement\n AbstractRule: AbstractRule\n AbstractType: AbstractType\n Action: Action\n Alternatives: Alternatives\n ArrayLiteral: ArrayLiteral\n ArrayType: ArrayType\n Assignment: Assignment\n BooleanLiteral: BooleanLiteral\n CharacterRange: CharacterRange\n Condition: Condition\n Conjunction: Conjunction\n CrossReference: CrossReference\n Disjunction: Disjunction\n EndOfFile: EndOfFile\n Grammar: Grammar\n GrammarImport: GrammarImport\n Group: Group\n InferredType: InferredType\n Interface: Interface\n Keyword: Keyword\n NamedArgument: NamedArgument\n NegatedToken: NegatedToken\n Negation: Negation\n NumberLiteral: NumberLiteral\n Parameter: Parameter\n ParameterReference: ParameterReference\n ParserRule: ParserRule\n ReferenceType: ReferenceType\n RegexToken: RegexToken\n ReturnType: ReturnType\n RuleCall: RuleCall\n SimpleType: SimpleType\n StringLiteral: StringLiteral\n TerminalAlternatives: TerminalAlternatives\n TerminalGroup: TerminalGroup\n TerminalRule: TerminalRule\n TerminalRuleCall: TerminalRuleCall\n Type: Type\n TypeAttribute: TypeAttribute\n TypeDefinition: TypeDefinition\n UnionType: UnionType\n UnorderedGroup: UnorderedGroup\n UntilToken: UntilToken\n ValueLiteral: ValueLiteral\n Wildcard: Wildcard\n}\n\nexport class LangiumGrammarAstReflection extends AbstractAstReflection {\n\n getAllTypes(): string[] {\n return ['AbstractElement', 'AbstractRule', 'AbstractType', 'Action', 'Alternatives', 'ArrayLiteral', 'ArrayType', 'Assignment', 'BooleanLiteral', 'CharacterRange', 'Condition', 'Conjunction', 'CrossReference', 'Disjunction', 'EndOfFile', 'Grammar', 'GrammarImport', 'Group', 'InferredType', 'Interface', 'Keyword', 'NamedArgument', 'NegatedToken', 'Negation', 'NumberLiteral', 'Parameter', 'ParameterReference', 'ParserRule', 'ReferenceType', 'RegexToken', 'ReturnType', 'RuleCall', 'SimpleType', 'StringLiteral', 'TerminalAlternatives', 'TerminalGroup', 'TerminalRule', 'TerminalRuleCall', 'Type', 'TypeAttribute', 'TypeDefinition', 'UnionType', 'UnorderedGroup', 'UntilToken', 'ValueLiteral', 'Wildcard'];\n }\n\n protected override computeIsSubtype(subtype: string, supertype: string): boolean {\n switch (subtype) {\n case Action:\n case Alternatives:\n case Assignment:\n case CharacterRange:\n case CrossReference:\n case EndOfFile:\n case Group:\n case Keyword:\n case NegatedToken:\n case RegexToken:\n case RuleCall:\n case TerminalAlternatives:\n case TerminalGroup:\n case TerminalRuleCall:\n case UnorderedGroup:\n case UntilToken:\n case Wildcard: {\n return this.isSubtype(AbstractElement, supertype);\n }\n case ArrayLiteral:\n case NumberLiteral:\n case StringLiteral: {\n return this.isSubtype(ValueLiteral, supertype);\n }\n case ArrayType:\n case ReferenceType:\n case SimpleType:\n case UnionType: {\n return this.isSubtype(TypeDefinition, supertype);\n }\n case BooleanLiteral: {\n return this.isSubtype(Condition, supertype) || this.isSubtype(ValueLiteral, supertype);\n }\n case Conjunction:\n case Disjunction:\n case Negation:\n case ParameterReference: {\n return this.isSubtype(Condition, supertype);\n }\n case InferredType:\n case Interface:\n case Type: {\n return this.isSubtype(AbstractType, supertype);\n }\n case ParserRule: {\n return this.isSubtype(AbstractRule, supertype) || this.isSubtype(AbstractType, supertype);\n }\n case TerminalRule: {\n return this.isSubtype(AbstractRule, supertype);\n }\n default: {\n return false;\n }\n }\n }\n\n getReferenceType(refInfo: ReferenceInfo): string {\n const referenceId = `${refInfo.container.$type}:${refInfo.property}`;\n switch (referenceId) {\n case 'Action:type':\n case 'CrossReference:type':\n case 'Interface:superTypes':\n case 'ParserRule:returnType':\n case 'SimpleType:typeRef': {\n return AbstractType;\n }\n case 'Grammar:hiddenTokens':\n case 'ParserRule:hiddenTokens':\n case 'RuleCall:rule': {\n return AbstractRule;\n }\n case 'Grammar:usedGrammars': {\n return Grammar;\n }\n case 'NamedArgument:parameter':\n case 'ParameterReference:parameter': {\n return Parameter;\n }\n case 'TerminalRuleCall:rule': {\n return TerminalRule;\n }\n default: {\n throw new Error(`${referenceId} is not a valid reference id.`);\n }\n }\n }\n\n getTypeMetaData(type: string): TypeMetaData {\n switch (type) {\n case 'AbstractElement': {\n return {\n name: 'AbstractElement',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' }\n ]\n };\n }\n case 'ArrayLiteral': {\n return {\n name: 'ArrayLiteral',\n properties: [\n { name: 'elements', defaultValue: [] }\n ]\n };\n }\n case 'ArrayType': {\n return {\n name: 'ArrayType',\n properties: [\n { name: 'elementType' }\n ]\n };\n }\n case 'BooleanLiteral': {\n return {\n name: 'BooleanLiteral',\n properties: [\n { name: 'true', defaultValue: false }\n ]\n };\n }\n case 'Conjunction': {\n return {\n name: 'Conjunction',\n properties: [\n { name: 'left' },\n { name: 'right' }\n ]\n };\n }\n case 'Disjunction': {\n return {\n name: 'Disjunction',\n properties: [\n { name: 'left' },\n { name: 'right' }\n ]\n };\n }\n case 'Grammar': {\n return {\n name: 'Grammar',\n properties: [\n { name: 'definesHiddenTokens', defaultValue: false },\n { name: 'hiddenTokens', defaultValue: [] },\n { name: 'imports', defaultValue: [] },\n { name: 'interfaces', defaultValue: [] },\n { name: 'isDeclared', defaultValue: false },\n { name: 'name' },\n { name: 'rules', defaultValue: [] },\n { name: 'types', defaultValue: [] },\n { name: 'usedGrammars', defaultValue: [] }\n ]\n };\n }\n case 'GrammarImport': {\n return {\n name: 'GrammarImport',\n properties: [\n { name: 'path' }\n ]\n };\n }\n case 'InferredType': {\n return {\n name: 'InferredType',\n properties: [\n { name: 'name' }\n ]\n };\n }\n case 'Interface': {\n return {\n name: 'Interface',\n properties: [\n { name: 'attributes', defaultValue: [] },\n { name: 'name' },\n { name: 'superTypes', defaultValue: [] }\n ]\n };\n }\n case 'NamedArgument': {\n return {\n name: 'NamedArgument',\n properties: [\n { name: 'calledByName', defaultValue: false },\n { name: 'parameter' },\n { name: 'value' }\n ]\n };\n }\n case 'Negation': {\n return {\n name: 'Negation',\n properties: [\n { name: 'value' }\n ]\n };\n }\n case 'NumberLiteral': {\n return {\n name: 'NumberLiteral',\n properties: [\n { name: 'value' }\n ]\n };\n }\n case 'Parameter': {\n return {\n name: 'Parameter',\n properties: [\n { name: 'name' }\n ]\n };\n }\n case 'ParameterReference': {\n return {\n name: 'ParameterReference',\n properties: [\n { name: 'parameter' }\n ]\n };\n }\n case 'ParserRule': {\n return {\n name: 'ParserRule',\n properties: [\n { name: 'dataType' },\n { name: 'definesHiddenTokens', defaultValue: false },\n { name: 'definition' },\n { name: 'entry', defaultValue: false },\n { name: 'fragment', defaultValue: false },\n { name: 'hiddenTokens', defaultValue: [] },\n { name: 'inferredType' },\n { name: 'name' },\n { name: 'parameters', defaultValue: [] },\n { name: 'returnType' },\n { name: 'wildcard', defaultValue: false }\n ]\n };\n }\n case 'ReferenceType': {\n return {\n name: 'ReferenceType',\n properties: [\n { name: 'referenceType' }\n ]\n };\n }\n case 'ReturnType': {\n return {\n name: 'ReturnType',\n properties: [\n { name: 'name' }\n ]\n };\n }\n case 'SimpleType': {\n return {\n name: 'SimpleType',\n properties: [\n { name: 'primitiveType' },\n { name: 'stringType' },\n { name: 'typeRef' }\n ]\n };\n }\n case 'StringLiteral': {\n return {\n name: 'StringLiteral',\n properties: [\n { name: 'value' }\n ]\n };\n }\n case 'TerminalRule': {\n return {\n name: 'TerminalRule',\n properties: [\n { name: 'definition' },\n { name: 'fragment', defaultValue: false },\n { name: 'hidden', defaultValue: false },\n { name: 'name' },\n { name: 'type' }\n ]\n };\n }\n case 'Type': {\n return {\n name: 'Type',\n properties: [\n { name: 'name' },\n { name: 'type' }\n ]\n };\n }\n case 'TypeAttribute': {\n return {\n name: 'TypeAttribute',\n properties: [\n { name: 'defaultValue' },\n { name: 'isOptional', defaultValue: false },\n { name: 'name' },\n { name: 'type' }\n ]\n };\n }\n case 'UnionType': {\n return {\n name: 'UnionType',\n properties: [\n { name: 'types', defaultValue: [] }\n ]\n };\n }\n case 'Action': {\n return {\n name: 'Action',\n properties: [\n { name: 'cardinality' },\n { name: 'feature' },\n { name: 'inferredType' },\n { name: 'lookahead' },\n { name: 'operator' },\n { name: 'type' }\n ]\n };\n }\n case 'Alternatives': {\n return {\n name: 'Alternatives',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'lookahead' }\n ]\n };\n }\n case 'Assignment': {\n return {\n name: 'Assignment',\n properties: [\n { name: 'cardinality' },\n { name: 'feature' },\n { name: 'lookahead' },\n { name: 'operator' },\n { name: 'terminal' }\n ]\n };\n }\n case 'CharacterRange': {\n return {\n name: 'CharacterRange',\n properties: [\n { name: 'cardinality' },\n { name: 'left' },\n { name: 'lookahead' },\n { name: 'right' }\n ]\n };\n }\n case 'CrossReference': {\n return {\n name: 'CrossReference',\n properties: [\n { name: 'cardinality' },\n { name: 'deprecatedSyntax', defaultValue: false },\n { name: 'lookahead' },\n { name: 'terminal' },\n { name: 'type' }\n ]\n };\n }\n case 'EndOfFile': {\n return {\n name: 'EndOfFile',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' }\n ]\n };\n }\n case 'Group': {\n return {\n name: 'Group',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'guardCondition' },\n { name: 'lookahead' }\n ]\n };\n }\n case 'Keyword': {\n return {\n name: 'Keyword',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'value' }\n ]\n };\n }\n case 'NegatedToken': {\n return {\n name: 'NegatedToken',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'terminal' }\n ]\n };\n }\n case 'RegexToken': {\n return {\n name: 'RegexToken',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'regex' }\n ]\n };\n }\n case 'RuleCall': {\n return {\n name: 'RuleCall',\n properties: [\n { name: 'arguments', defaultValue: [] },\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'rule' }\n ]\n };\n }\n case 'TerminalAlternatives': {\n return {\n name: 'TerminalAlternatives',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'lookahead' }\n ]\n };\n }\n case 'TerminalGroup': {\n return {\n name: 'TerminalGroup',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'lookahead' }\n ]\n };\n }\n case 'TerminalRuleCall': {\n return {\n name: 'TerminalRuleCall',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'rule' }\n ]\n };\n }\n case 'UnorderedGroup': {\n return {\n name: 'UnorderedGroup',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'lookahead' }\n ]\n };\n }\n case 'UntilToken': {\n return {\n name: 'UntilToken',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'terminal' }\n ]\n };\n }\n case 'Wildcard': {\n return {\n name: 'Wildcard',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' }\n ]\n };\n }\n default: {\n return {\n name: type,\n properties: []\n };\n }\n }\n }\n}\n\nexport const reflection = new LangiumGrammarAstReflection();\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { Range } from 'vscode-languageserver-types';\nimport type { AstNode, AstReflection, CstNode, GenericAstNode, Mutable, PropertyType, Reference, ReferenceInfo } from '../syntax-tree.js';\nimport type { Stream, TreeStream } from './stream.js';\nimport type { LangiumDocument } from '../workspace/documents.js';\nimport { isAstNode, isReference } from '../syntax-tree.js';\nimport { DONE_RESULT, stream, StreamImpl, TreeStreamImpl } from './stream.js';\nimport { inRange } from './cst-utils.js';\n\n/**\n * Link the `$container` and other related properties of every AST node that is directly contained\n * in the given `node`.\n */\nexport function linkContentToContainer(node: AstNode): void {\n for (const [name, value] of Object.entries(node)) {\n if (!name.startsWith('$')) {\n if (Array.isArray(value)) {\n value.forEach((item, index) => {\n if (isAstNode(item)) {\n (item as Mutable).$container = node;\n (item as Mutable).$containerProperty = name;\n (item as Mutable).$containerIndex = index;\n }\n });\n } else if (isAstNode(value)) {\n (value as Mutable).$container = node;\n (value as Mutable).$containerProperty = name;\n }\n }\n }\n}\n\n/**\n * Walk along the hierarchy of containers from the given AST node to the root and return the first\n * node that matches the type predicate. If the start node itself matches, it is returned.\n * If no container matches, `undefined` is returned.\n */\nexport function getContainerOfType(node: AstNode | undefined, typePredicate: (n: AstNode) => n is T): T | undefined {\n let item = node;\n while (item) {\n if (typePredicate(item)) {\n return item;\n }\n item = item.$container;\n }\n return undefined;\n}\n\n/**\n * Walk along the hierarchy of containers from the given AST node to the root and check for existence\n * of a container that matches the given predicate. The start node is included in the checks.\n */\nexport function hasContainerOfType(node: AstNode | undefined, predicate: (n: AstNode) => boolean): boolean {\n let item = node;\n while (item) {\n if (predicate(item)) {\n return true;\n }\n item = item.$container;\n }\n return false;\n}\n\n/**\n * Retrieve the document in which the given AST node is contained. A reference to the document is\n * usually held by the root node of the AST.\n *\n * @throws an error if the node is not contained in a document.\n */\nexport function getDocument(node: AstNode): LangiumDocument {\n const rootNode = findRootNode(node);\n const result = rootNode.$document;\n if (!result) {\n throw new Error('AST node has no document.');\n }\n return result as LangiumDocument;\n}\n\n/**\n * Returns the root node of the given AST node by following the `$container` references.\n */\nexport function findRootNode(node: AstNode): AstNode {\n while (node.$container) {\n node = node.$container;\n }\n return node;\n}\n\nexport interface AstStreamOptions {\n /**\n * Optional target range that the nodes in the stream need to intersect\n */\n range?: Range\n}\n\n/**\n * Create a stream of all AST nodes that are directly contained in the given node. This includes\n * single-valued as well as multi-valued (array) properties.\n */\nexport function streamContents(node: AstNode, options?: AstStreamOptions): Stream {\n if (!node) {\n throw new Error('Node must be an AstNode.');\n }\n const range = options?.range;\n type State = { keys: string[], keyIndex: number, arrayIndex: number };\n return new StreamImpl(() => ({\n keys: Object.keys(node),\n keyIndex: 0,\n arrayIndex: 0\n }), state => {\n while (state.keyIndex < state.keys.length) {\n const property = state.keys[state.keyIndex];\n if (!property.startsWith('$')) {\n const value = (node as GenericAstNode)[property];\n if (isAstNode(value)) {\n state.keyIndex++;\n if (isAstNodeInRange(value, range)) {\n return { done: false, value };\n }\n } else if (Array.isArray(value)) {\n while (state.arrayIndex < value.length) {\n const index = state.arrayIndex++;\n const element = value[index];\n if (isAstNode(element) && isAstNodeInRange(element, range)) {\n return { done: false, value: element };\n }\n }\n state.arrayIndex = 0;\n }\n }\n state.keyIndex++;\n }\n return DONE_RESULT;\n });\n}\n\n/**\n * Create a stream of all AST nodes that are directly and indirectly contained in the given root node.\n * This does not include the root node itself.\n */\nexport function streamAllContents(root: AstNode, options?: AstStreamOptions): TreeStream {\n if (!root) {\n throw new Error('Root node must be an AstNode.');\n }\n return new TreeStreamImpl(root, node => streamContents(node, options));\n}\n\n/**\n * Create a stream of all AST nodes that are directly and indirectly contained in the given root node,\n * including the root node itself.\n */\nexport function streamAst(root: AstNode, options?: AstStreamOptions): TreeStream {\n if (!root) {\n throw new Error('Root node must be an AstNode.');\n } else if (options?.range && !isAstNodeInRange(root, options.range)) {\n // Return an empty stream if the root node isn't in range\n return new TreeStreamImpl(root, () => []);\n }\n return new TreeStreamImpl(root, node => streamContents(node, options), { includeRoot: true });\n}\n\nfunction isAstNodeInRange(astNode: AstNode, range?: Range): boolean {\n if (!range) {\n return true;\n }\n const nodeRange = astNode.$cstNode?.range;\n if (!nodeRange) {\n return false;\n }\n return inRange(nodeRange, range);\n}\n\n/**\n * Create a stream of all cross-references that are held by the given AST node. This includes\n * single-valued as well as multi-valued (array) properties.\n */\nexport function streamReferences(node: AstNode): Stream {\n type State = { keys: string[], keyIndex: number, arrayIndex: number };\n return new StreamImpl(() => ({\n keys: Object.keys(node),\n keyIndex: 0,\n arrayIndex: 0\n }), state => {\n while (state.keyIndex < state.keys.length) {\n const property = state.keys[state.keyIndex];\n if (!property.startsWith('$')) {\n const value = (node as GenericAstNode)[property];\n if (isReference(value)) {\n state.keyIndex++;\n return { done: false, value: { reference: value, container: node, property } };\n } else if (Array.isArray(value)) {\n while (state.arrayIndex < value.length) {\n const index = state.arrayIndex++;\n const element = value[index];\n if (isReference(element)) {\n return { done: false, value: { reference: element, container: node, property, index } };\n }\n }\n state.arrayIndex = 0;\n }\n }\n state.keyIndex++;\n }\n return DONE_RESULT;\n });\n}\n\n/**\n * Returns a Stream of references to the target node from the AstNode tree\n *\n * @param targetNode AstNode we are looking for\n * @param lookup AstNode where we search for references. If not provided, the root node of the document is used as the default value\n */\nexport function findLocalReferences(targetNode: AstNode, lookup = getDocument(targetNode).parseResult.value): Stream {\n const refs: Reference[] = [];\n streamAst(lookup).forEach(node => {\n streamReferences(node).forEach(refInfo => {\n if (refInfo.reference.ref === targetNode) {\n refs.push(refInfo.reference);\n }\n });\n });\n return stream(refs);\n}\n\n/**\n * Assigns all mandatory AST properties to the specified node.\n *\n * @param reflection Reflection object used to gather mandatory properties for the node.\n * @param node Specified node is modified in place and properties are directly assigned.\n */\nexport function assignMandatoryProperties(reflection: AstReflection, node: AstNode): void {\n const typeMetaData = reflection.getTypeMetaData(node.$type);\n const genericNode = node as GenericAstNode;\n for (const property of typeMetaData.properties) {\n // Only set the value if the property is not already set and if it has a default value\n if (property.defaultValue !== undefined && genericNode[property.name] === undefined) {\n genericNode[property.name] = copyDefaultValue(property.defaultValue);\n }\n }\n}\n\nfunction copyDefaultValue(propertyType: PropertyType): PropertyType {\n if (Array.isArray(propertyType)) {\n return [...propertyType.map(copyDefaultValue)];\n } else {\n return propertyType;\n }\n}\n\n/**\n * Creates a deep copy of the specified AST node.\n * The resulting copy will only contain semantically relevant information, such as the `$type` property and AST properties.\n *\n * References are copied without resolved cross reference. The specified function is used to rebuild them.\n */\nexport function copyAstNode(node: T, buildReference: (node: AstNode, property: string, refNode: CstNode | undefined, refText: string) => Reference): T {\n const copy: GenericAstNode = { $type: node.$type };\n\n for (const [name, value] of Object.entries(node)) {\n if (!name.startsWith('$')) {\n if (isAstNode(value)) {\n copy[name] = copyAstNode(value, buildReference);\n } else if (isReference(value)) {\n copy[name] = buildReference(\n copy,\n name,\n value.$refNode,\n value.$refText\n );\n } else if (Array.isArray(value)) {\n const copiedArray: unknown[] = [];\n for (const element of value) {\n if (isAstNode(element)) {\n copiedArray.push(copyAstNode(element, buildReference));\n } else if (isReference(element)) {\n copiedArray.push(\n buildReference(\n copy,\n name,\n element.$refNode,\n element.$refText\n )\n );\n } else {\n copiedArray.push(element);\n }\n }\n copy[name] = copiedArray;\n } else {\n copy[name] = value;\n }\n }\n }\n\n linkContentToContainer(copy);\n return copy as unknown as T;\n}\n", "import type { Character, IRegExpAST, RegExpFlags } from \"../types\";\n\nexport function cc(char: string): number {\n return char.charCodeAt(0);\n}\n\nexport function insertToSet(item: T | T[], set: T[]) {\n if (Array.isArray(item)) {\n item.forEach(function (subItem) {\n set.push(subItem);\n });\n } else {\n set.push(item);\n }\n}\n\nexport function addFlag(\n flagObj: RegExpFlags,\n flagKey: keyof Omit,\n) {\n if (flagObj[flagKey] === true) {\n throw \"duplicate flag \" + flagKey;\n }\n\n const x: boolean = flagObj[flagKey];\n flagObj[flagKey] = true;\n}\n\nexport function ASSERT_EXISTS(obj: any): obj is T {\n // istanbul ignore next\n if (obj === undefined) {\n throw Error(\"Internal Error - Should never get here!\");\n }\n return true;\n}\n\n// istanbul ignore next\nexport function ASSERT_NEVER_REACH_HERE(): any {\n throw Error(\"Internal Error - Should never get here!\");\n}\n\nexport function isCharacter(obj: { type: string }): obj is Character {\n return obj[\"type\"] === \"Character\";\n}\n", "import { cc } from \"./utils.js\";\n\nexport const digitsCharCodes: number[] = [];\nfor (let i = cc(\"0\"); i <= cc(\"9\"); i++) {\n digitsCharCodes.push(i);\n}\n\nexport const wordCharCodes: number[] = [cc(\"_\")].concat(digitsCharCodes);\nfor (let i = cc(\"a\"); i <= cc(\"z\"); i++) {\n wordCharCodes.push(i);\n}\n\nfor (let i = cc(\"A\"); i <= cc(\"Z\"); i++) {\n wordCharCodes.push(i);\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#character-classes\nexport const whitespaceCodes: number[] = [\n cc(\" \"),\n cc(\"\\f\"),\n cc(\"\\n\"),\n cc(\"\\r\"),\n cc(\"\\t\"),\n cc(\"\\v\"),\n cc(\"\\t\"),\n cc(\"\\u00a0\"),\n cc(\"\\u1680\"),\n cc(\"\\u2000\"),\n cc(\"\\u2001\"),\n cc(\"\\u2002\"),\n cc(\"\\u2003\"),\n cc(\"\\u2004\"),\n cc(\"\\u2005\"),\n cc(\"\\u2006\"),\n cc(\"\\u2007\"),\n cc(\"\\u2008\"),\n cc(\"\\u2009\"),\n cc(\"\\u200a\"),\n cc(\"\\u2028\"),\n cc(\"\\u2029\"),\n cc(\"\\u202f\"),\n cc(\"\\u205f\"),\n cc(\"\\u3000\"),\n cc(\"\\ufeff\"),\n];\n", "import type {\n Alternative,\n Assertion,\n Atom,\n Character,\n Disjunction,\n Group,\n GroupBackReference,\n Location,\n Quantifier,\n Range,\n RegExpFlags,\n RegExpPattern,\n Set,\n Term,\n} from \"../types\";\nimport {\n addFlag,\n ASSERT_EXISTS,\n ASSERT_NEVER_REACH_HERE,\n cc,\n insertToSet,\n isCharacter,\n} from \"./utils.js\";\nimport {\n digitsCharCodes,\n whitespaceCodes,\n wordCharCodes,\n} from \"./character-classes.js\";\n\n// consts and utilities\nconst hexDigitPattern = /[0-9a-fA-F]/;\nconst decimalPattern = /[0-9]/;\nconst decimalPatternNoZero = /[1-9]/;\n\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\nexport class RegExpParser {\n protected idx: number = 0;\n protected input: string = \"\";\n protected groupIdx: number = 0;\n\n protected saveState() {\n return {\n idx: this.idx,\n input: this.input,\n groupIdx: this.groupIdx,\n };\n }\n\n protected restoreState(newState: {\n idx: number;\n input: string;\n groupIdx: number;\n }) {\n this.idx = newState.idx;\n this.input = newState.input;\n this.groupIdx = newState.groupIdx;\n }\n\n public pattern(input: string): RegExpPattern {\n // parser state\n this.idx = 0;\n this.input = input;\n this.groupIdx = 0;\n\n this.consumeChar(\"/\");\n const value = this.disjunction();\n this.consumeChar(\"/\");\n\n const flags: RegExpFlags = {\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\n while (this.isRegExpFlag()) {\n switch (this.popChar()) {\n case \"g\":\n addFlag(flags, \"global\");\n break;\n case \"i\":\n addFlag(flags, \"ignoreCase\");\n break;\n case \"m\":\n addFlag(flags, \"multiLine\");\n break;\n case \"u\":\n addFlag(flags, \"unicode\");\n break;\n case \"y\":\n addFlag(flags, \"sticky\");\n break;\n }\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\n protected disjunction(): Disjunction {\n const alts = [];\n const begin = this.idx;\n\n alts.push(this.alternative());\n\n while (this.peekChar() === \"|\") {\n this.consumeChar(\"|\");\n alts.push(this.alternative());\n }\n\n return { type: \"Disjunction\", value: alts, loc: this.loc(begin) };\n }\n\n protected alternative(): Alternative {\n const terms = [];\n const begin = this.idx;\n\n while (this.isTerm()) {\n terms.push(this.term());\n }\n\n return { type: \"Alternative\", value: terms, loc: this.loc(begin) };\n }\n\n protected term(): Term {\n if (this.isAssertion()) {\n return this.assertion();\n } else {\n return this.atom();\n }\n }\n\n protected assertion(): Assertion {\n const begin = this.idx;\n switch (this.popChar()) {\n case \"^\":\n return {\n type: \"StartAnchor\",\n loc: this.loc(begin),\n };\n case \"$\":\n return { type: \"EndAnchor\", loc: this.loc(begin) };\n // '\\b' or '\\B'\n case \"\\\\\":\n switch (this.popChar()) {\n case \"b\":\n return {\n type: \"WordBoundary\",\n loc: this.loc(begin),\n };\n case \"B\":\n return {\n type: \"NonWordBoundary\",\n loc: this.loc(begin),\n };\n }\n // istanbul ignore next\n throw Error(\"Invalid Assertion Escape\");\n // '(?=' or '(?!'\n case \"(\":\n this.consumeChar(\"?\");\n\n let type: \"Lookahead\" | \"NegativeLookahead\" | undefined;\n switch (this.popChar()) {\n case \"=\":\n type = \"Lookahead\";\n break;\n case \"!\":\n type = \"NegativeLookahead\";\n break;\n }\n ASSERT_EXISTS(type);\n\n const disjunction = this.disjunction();\n\n this.consumeChar(\")\");\n\n return {\n type: type!,\n value: disjunction,\n loc: this.loc(begin),\n };\n }\n // istanbul ignore next\n return ASSERT_NEVER_REACH_HERE();\n }\n\n protected quantifier(\n isBacktracking: boolean = false,\n ): Quantifier | undefined {\n let range: Partial | undefined = undefined;\n const begin = this.idx;\n switch (this.popChar()) {\n case \"*\":\n range = {\n atLeast: 0,\n atMost: Infinity,\n };\n break;\n case \"+\":\n range = {\n atLeast: 1,\n atMost: Infinity,\n };\n break;\n case \"?\":\n range = {\n atLeast: 0,\n atMost: 1,\n };\n break;\n case \"{\":\n const atLeast = this.integerIncludingZero();\n switch (this.popChar()) {\n case \"}\":\n range = {\n atLeast: atLeast,\n atMost: atLeast,\n };\n break;\n case \",\":\n let atMost;\n if (this.isDigit()) {\n atMost = this.integerIncludingZero();\n range = {\n atLeast: atLeast,\n atMost: atMost,\n };\n } else {\n range = {\n atLeast: atLeast,\n atMost: Infinity,\n };\n }\n this.consumeChar(\"}\");\n break;\n }\n // throwing exceptions from \"ASSERT_EXISTS\" during backtracking\n // causes severe performance degradations\n if (isBacktracking === true && range === undefined) {\n return undefined;\n }\n ASSERT_EXISTS(range);\n break;\n }\n\n // throwing exceptions from \"ASSERT_EXISTS\" during backtracking\n // causes severe performance degradations\n if (isBacktracking === true && range === undefined) {\n return undefined;\n }\n\n // istanbul ignore else\n if (ASSERT_EXISTS(range)) {\n if (this.peekChar(0) === \"?\") {\n this.consumeChar(\"?\");\n range.greedy = false;\n } else {\n range.greedy = true;\n }\n\n range.type = \"Quantifier\";\n range.loc = this.loc(begin);\n return range as Quantifier;\n }\n }\n\n protected atom(): Atom {\n let atom: Omit | undefined;\n const begin = this.idx;\n switch (this.peekChar()) {\n case \".\":\n atom = this.dotAll();\n break;\n case \"\\\\\":\n atom = this.atomEscape();\n break;\n case \"[\":\n atom = this.characterClass();\n break;\n case \"(\":\n atom = this.group();\n break;\n }\n\n if (atom === undefined && this.isPatternCharacter()) {\n atom = this.patternCharacter();\n }\n\n // istanbul ignore else\n if (ASSERT_EXISTS(atom)) {\n atom.loc = this.loc(begin);\n\n if (this.isQuantifier()) {\n atom.quantifier = this.quantifier();\n }\n\n return atom;\n }\n\n // istanbul ignore next\n return ASSERT_NEVER_REACH_HERE();\n }\n\n protected dotAll(): Omit {\n this.consumeChar(\".\");\n return {\n type: \"Set\",\n complement: true,\n value: [cc(\"\\n\"), cc(\"\\r\"), cc(\"\\u2028\"), cc(\"\\u2029\")],\n };\n }\n\n protected atomEscape(): Omit {\n this.consumeChar(\"\\\\\");\n\n switch (this.peekChar()) {\n case \"1\":\n case \"2\":\n case \"3\":\n case \"4\":\n case \"5\":\n case \"6\":\n case \"7\":\n case \"8\":\n case \"9\":\n return this.decimalEscapeAtom();\n case \"d\":\n case \"D\":\n case \"s\":\n case \"S\":\n case \"w\":\n case \"W\":\n return this.characterClassEscape();\n case \"f\":\n case \"n\":\n case \"r\":\n case \"t\":\n case \"v\":\n return this.controlEscapeAtom();\n case \"c\":\n return this.controlLetterEscapeAtom();\n case \"0\":\n return this.nulCharacterAtom();\n case \"x\":\n return this.hexEscapeSequenceAtom();\n case \"u\":\n return this.regExpUnicodeEscapeSequenceAtom();\n default:\n return this.identityEscapeAtom();\n }\n }\n\n protected decimalEscapeAtom(): Omit {\n const value = this.positiveInteger();\n\n return { type: \"GroupBackReference\", value: value };\n }\n\n protected characterClassEscape(): Omit {\n let set: (number | Range)[] | undefined;\n let complement = false;\n switch (this.popChar()) {\n case \"d\":\n set = digitsCharCodes;\n break;\n case \"D\":\n set = digitsCharCodes;\n complement = true;\n break;\n case \"s\":\n set = whitespaceCodes;\n break;\n case \"S\":\n set = whitespaceCodes;\n complement = true;\n break;\n case \"w\":\n set = wordCharCodes;\n break;\n case \"W\":\n set = wordCharCodes;\n complement = true;\n break;\n }\n\n // istanbul ignore else\n if (ASSERT_EXISTS(set)) {\n return { type: \"Set\", value: set, complement: complement };\n }\n // istanbul ignore next\n return ASSERT_NEVER_REACH_HERE();\n }\n\n protected controlEscapeAtom(): Omit {\n let escapeCode;\n switch (this.popChar()) {\n case \"f\":\n escapeCode = cc(\"\\f\");\n break;\n case \"n\":\n escapeCode = cc(\"\\n\");\n break;\n case \"r\":\n escapeCode = cc(\"\\r\");\n break;\n case \"t\":\n escapeCode = cc(\"\\t\");\n break;\n case \"v\":\n escapeCode = cc(\"\\v\");\n break;\n }\n\n // istanbul ignore else\n if (ASSERT_EXISTS(escapeCode)) {\n return { type: \"Character\", value: escapeCode };\n }\n // istanbul ignore next\n return ASSERT_NEVER_REACH_HERE();\n }\n\n protected controlLetterEscapeAtom(): Omit {\n this.consumeChar(\"c\");\n const letter = this.popChar();\n if (/[a-zA-Z]/.test(letter) === false) {\n throw Error(\"Invalid \");\n }\n\n const letterCode = letter.toUpperCase().charCodeAt(0) - 64;\n return { type: \"Character\", value: letterCode };\n }\n\n protected nulCharacterAtom(): Omit {\n // TODO implement '[lookahead \u2209 DecimalDigit]'\n // TODO: for the deprecated octal escape sequence\n this.consumeChar(\"0\");\n return { type: \"Character\", value: cc(\"\\0\") };\n }\n\n protected hexEscapeSequenceAtom(): Omit {\n this.consumeChar(\"x\");\n return this.parseHexDigits(2);\n }\n\n protected regExpUnicodeEscapeSequenceAtom(): Omit {\n this.consumeChar(\"u\");\n return this.parseHexDigits(4);\n }\n\n protected identityEscapeAtom(): Omit {\n // TODO: implement \"SourceCharacter but not UnicodeIDContinue\"\n // // http://unicode.org/reports/tr31/#Specific_Character_Adjustments\n const escapedChar = this.popChar();\n return { type: \"Character\", value: cc(escapedChar) };\n }\n\n protected classPatternCharacterAtom(): Omit {\n switch (this.peekChar()) {\n // istanbul ignore next\n case \"\\n\":\n // istanbul ignore next\n case \"\\r\":\n // istanbul ignore next\n case \"\\u2028\":\n // istanbul ignore next\n case \"\\u2029\":\n // istanbul ignore next\n case \"\\\\\":\n // istanbul ignore next\n case \"]\":\n throw Error(\"TBD\");\n default:\n const nextChar = this.popChar();\n return { type: \"Character\", value: cc(nextChar) };\n }\n }\n\n protected characterClass(): Omit {\n const set: (number | Range)[] = [];\n let complement = false;\n this.consumeChar(\"[\");\n if (this.peekChar(0) === \"^\") {\n this.consumeChar(\"^\");\n complement = true;\n }\n\n while (this.isClassAtom()) {\n const from = this.classAtom();\n const isFromSingleChar = from.type === \"Character\";\n if (isCharacter(from) && this.isRangeDash()) {\n this.consumeChar(\"-\");\n const to = this.classAtom();\n const isToSingleChar = to.type === \"Character\";\n\n // a range can only be used when both sides are single characters\n if (isCharacter(to)) {\n if (to.value < from.value) {\n throw Error(\"Range out of order in character class\");\n }\n set.push({ from: from.value, to: to.value });\n } else {\n // literal dash\n insertToSet(from.value, set);\n set.push(cc(\"-\"));\n insertToSet(to.value, set);\n }\n } else {\n insertToSet(from.value, set);\n }\n }\n\n this.consumeChar(\"]\");\n\n return { type: \"Set\", complement: complement, value: set };\n }\n\n protected classAtom(): Omit {\n switch (this.peekChar()) {\n // istanbul ignore next\n case \"]\":\n // istanbul ignore next\n case \"\\n\":\n // istanbul ignore next\n case \"\\r\":\n // istanbul ignore next\n case \"\\u2028\":\n // istanbul ignore next\n case \"\\u2029\":\n throw Error(\"TBD\");\n case \"\\\\\":\n return this.classEscape();\n default:\n return this.classPatternCharacterAtom();\n }\n }\n\n protected classEscape(): Omit {\n this.consumeChar(\"\\\\\");\n switch (this.peekChar()) {\n // Matches a backspace.\n // (Not to be confused with \\b word boundary outside characterClass)\n case \"b\":\n this.consumeChar(\"b\");\n return { type: \"Character\", value: cc(\"\\u0008\") };\n case \"d\":\n case \"D\":\n case \"s\":\n case \"S\":\n case \"w\":\n case \"W\":\n return this.characterClassEscape();\n case \"f\":\n case \"n\":\n case \"r\":\n case \"t\":\n case \"v\":\n return this.controlEscapeAtom();\n case \"c\":\n return this.controlLetterEscapeAtom();\n case \"0\":\n return this.nulCharacterAtom();\n case \"x\":\n return this.hexEscapeSequenceAtom();\n case \"u\":\n return this.regExpUnicodeEscapeSequenceAtom();\n default:\n return this.identityEscapeAtom();\n }\n }\n\n protected group(): Omit {\n let capturing = true;\n this.consumeChar(\"(\");\n switch (this.peekChar(0)) {\n case \"?\":\n this.consumeChar(\"?\");\n this.consumeChar(\":\");\n capturing = false;\n break;\n default:\n this.groupIdx++;\n break;\n }\n const value = this.disjunction();\n this.consumeChar(\")\");\n\n const groupAst: Omit = {\n type: \"Group\",\n capturing: capturing,\n value: value,\n };\n\n if (capturing) {\n groupAst[\"idx\"] = this.groupIdx;\n }\n\n return groupAst;\n }\n\n protected positiveInteger(): number {\n let number = this.popChar();\n\n // istanbul ignore next - can't ever get here due to previous lookahead checks\n // still implementing this error checking in case this ever changes.\n if (decimalPatternNoZero.test(number) === false) {\n throw Error(\"Expecting a positive integer\");\n }\n\n while (decimalPattern.test(this.peekChar(0))) {\n number += this.popChar();\n }\n\n return parseInt(number, 10);\n }\n\n protected integerIncludingZero(): number {\n let number = this.popChar();\n if (decimalPattern.test(number) === false) {\n throw Error(\"Expecting an integer\");\n }\n\n while (decimalPattern.test(this.peekChar(0))) {\n number += this.popChar();\n }\n\n return parseInt(number, 10);\n }\n\n protected patternCharacter(): Omit {\n const nextChar = this.popChar();\n switch (nextChar) {\n // istanbul ignore next\n case \"\\n\":\n // istanbul ignore next\n case \"\\r\":\n // istanbul ignore next\n case \"\\u2028\":\n // istanbul ignore next\n case \"\\u2029\":\n // istanbul ignore next\n case \"^\":\n // istanbul ignore next\n case \"$\":\n // istanbul ignore next\n case \"\\\\\":\n // istanbul ignore next\n case \".\":\n // istanbul ignore next\n case \"*\":\n // istanbul ignore next\n case \"+\":\n // istanbul ignore next\n case \"?\":\n // istanbul ignore next\n case \"(\":\n // istanbul ignore next\n case \")\":\n // istanbul ignore next\n case \"[\":\n // istanbul ignore next\n case \"|\":\n // istanbul ignore next\n throw Error(\"TBD\");\n default:\n return { type: \"Character\", value: cc(nextChar) };\n }\n }\n protected isRegExpFlag(): boolean {\n switch (this.peekChar(0)) {\n case \"g\":\n case \"i\":\n case \"m\":\n case \"u\":\n case \"y\":\n return true;\n default:\n return false;\n }\n }\n\n protected isRangeDash(): boolean {\n return this.peekChar() === \"-\" && this.isClassAtom(1);\n }\n\n protected isDigit(): boolean {\n return decimalPattern.test(this.peekChar(0));\n }\n\n protected isClassAtom(howMuch = 0): boolean {\n switch (this.peekChar(howMuch)) {\n case \"]\":\n case \"\\n\":\n case \"\\r\":\n case \"\\u2028\":\n case \"\\u2029\":\n return false;\n default:\n return true;\n }\n }\n\n protected isTerm() {\n return this.isAtom() || this.isAssertion();\n }\n\n protected isAtom(): boolean {\n if (this.isPatternCharacter()) {\n return true;\n }\n\n switch (this.peekChar(0)) {\n case \".\":\n case \"\\\\\": // atomEscape\n case \"[\": // characterClass\n // TODO: isAtom must be called before isAssertion - disambiguate\n case \"(\": // group\n return true;\n default:\n return false;\n }\n }\n\n protected isAssertion(): boolean {\n switch (this.peekChar(0)) {\n case \"^\":\n case \"$\":\n return true;\n // '\\b' or '\\B'\n case \"\\\\\":\n switch (this.peekChar(1)) {\n case \"b\":\n case \"B\":\n return true;\n default:\n return false;\n }\n // '(?=' or '(?!'\n case \"(\":\n return (\n this.peekChar(1) === \"?\" &&\n (this.peekChar(2) === \"=\" || this.peekChar(2) === \"!\")\n );\n default:\n return false;\n }\n }\n\n protected isQuantifier(): boolean {\n const prevState = this.saveState();\n try {\n return this.quantifier(true) !== undefined;\n } catch (e) {\n return false;\n } finally {\n this.restoreState(prevState);\n }\n }\n\n protected isPatternCharacter(): boolean {\n switch (this.peekChar()) {\n case \"^\":\n case \"$\":\n case \"\\\\\":\n case \".\":\n case \"*\":\n case \"+\":\n case \"?\":\n case \"(\":\n case \")\":\n case \"[\":\n case \"|\":\n case \"/\":\n case \"\\n\":\n case \"\\r\":\n case \"\\u2028\":\n case \"\\u2029\":\n return false;\n default:\n return true;\n }\n }\n\n protected parseHexDigits(howMany: number): Omit {\n let hexString = \"\";\n for (let i = 0; i < howMany; i++) {\n const hexChar = this.popChar();\n if (hexDigitPattern.test(hexChar) === false) {\n throw Error(\"Expecting a HexDecimal digits\");\n }\n hexString += hexChar;\n }\n const charCode = parseInt(hexString, 16);\n return { type: \"Character\", value: charCode };\n }\n\n protected peekChar(howMuch = 0): string {\n return this.input[this.idx + howMuch];\n }\n\n protected popChar(): string {\n const nextChar = this.peekChar(0);\n this.consumeChar(undefined);\n return nextChar;\n }\n\n protected consumeChar(char: string | undefined): void {\n if (char !== undefined && this.input[this.idx] !== char) {\n throw Error(\n \"Expected: '\" +\n char +\n \"' but found: '\" +\n this.input[this.idx] +\n \"' at offset: \" +\n this.idx,\n );\n }\n\n if (this.idx >= this.input.length) {\n throw Error(\"Unexpected end of input\");\n }\n this.idx++;\n }\n\n protected loc(begin: number): Location {\n return { begin: begin, end: this.idx };\n }\n}\n", "import type {\n Alternative,\n Assertion,\n Character,\n Disjunction,\n Group,\n GroupBackReference,\n IRegExpAST,\n Quantifier,\n RegExpAstPart,\n RegExpFlags,\n RegExpPattern,\n Set,\n} from \"../types\";\n\nexport class BaseRegExpVisitor {\n public visitChildren(node: IRegExpAST) {\n for (const key in node) {\n const child = (node as any)[key];\n /* istanbul ignore else */\n if (node.hasOwnProperty(key)) {\n if (child.type !== undefined) {\n this.visit(child);\n } else if (Array.isArray(child)) {\n child.forEach((subChild) => {\n this.visit(subChild);\n }, this);\n }\n }\n }\n }\n\n public visit(node: RegExpAstPart): void {\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\n this.visitChildren(node);\n }\n\n public visitPattern(node: RegExpPattern): void {}\n\n public visitFlags(node: RegExpFlags): void {}\n\n public visitDisjunction(node: Disjunction): void {}\n\n public visitAlternative(node: Alternative): void {}\n\n // Assertion\n public visitStartAnchor(node: Assertion): void {}\n\n public visitEndAnchor(node: Assertion): void {}\n\n public visitWordBoundary(node: Assertion): void {}\n\n public visitNonWordBoundary(node: Assertion): void {}\n\n public visitLookahead(node: Assertion): void {}\n\n public visitNegativeLookahead(node: Assertion): void {}\n\n // atoms\n public visitCharacter(node: Character): void {}\n\n public visitSet(node: Set): void {}\n\n public visitGroup(node: Group): void {}\n\n public visitGroupBackReference(node: GroupBackReference): void {}\n\n public visitQuantifier(node: Quantifier): void {}\n}\n", "export { RegExpParser } from \"./regexp-parser.js\";\nexport { BaseRegExpVisitor } from \"./base-regexp-visitor.js\";\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { Set, Group, Character, IRegExpAST } from '@chevrotain/regexp-to-ast';\nimport { RegExpParser, BaseRegExpVisitor } from '@chevrotain/regexp-to-ast';\n\nexport const NEWLINE_REGEXP = /\\r?\\n/gm;\n\nconst regexpParser = new RegExpParser();\n\n/**\n * This class is in charge of heuristically identifying start/end tokens of terminals.\n *\n * The way this works is by doing the following:\n * 1. Traverse the regular expression in the \"start state\"\n * 2. Add any encountered sets/single characters to the \"start regexp\"\n * 3. Once we encounter any variable-length content (i.e. with quantifiers such as +/?/*), we enter the \"end state\"\n * 4. In the end state, any sets/single characters are added to an \"end stack\".\n * 5. If we re-encounter any variable-length content we reset the end stack\n * 6. We continue visiting the regex until the end, reseting the end stack and rebuilding it as necessary\n *\n * After traversing a regular expression the `startRegexp/endRegexp` properties allow access to the stored start/end of the terminal\n */\nclass TerminalRegExpVisitor extends BaseRegExpVisitor {\n\n private isStarting = true;\n startRegexp: string;\n private endRegexpStack: string[] = [];\n multiline = false;\n regex: string;\n\n get endRegex(): string {\n return this.endRegexpStack.join('');\n }\n\n reset(regex: string): void {\n this.multiline = false;\n this.regex = regex;\n this.startRegexp = '';\n this.isStarting = true;\n this.endRegexpStack = [];\n }\n\n override visitGroup(node: Group) {\n if (node.quantifier) {\n this.isStarting = false;\n this.endRegexpStack = [];\n }\n }\n\n override visitCharacter(node: Character): void {\n const char = String.fromCharCode(node.value);\n if (!this.multiline && char === '\\n') {\n this.multiline = true;\n }\n if (node.quantifier) {\n this.isStarting = false;\n this.endRegexpStack = [];\n } else {\n const escapedChar = escapeRegExp(char);\n this.endRegexpStack.push(escapedChar);\n if (this.isStarting) {\n this.startRegexp += escapedChar;\n }\n }\n }\n\n override visitSet(node: Set): void {\n if (!this.multiline) {\n const set = this.regex.substring(node.loc.begin, node.loc.end);\n const regex = new RegExp(set);\n this.multiline = Boolean('\\n'.match(regex));\n }\n if (node.quantifier) {\n this.isStarting = false;\n this.endRegexpStack = [];\n } else {\n const set = this.regex.substring(node.loc.begin, node.loc.end);\n this.endRegexpStack.push(set);\n if (this.isStarting) {\n this.startRegexp += set;\n }\n }\n }\n\n override visitChildren(node: IRegExpAST): void {\n if (node.type === 'Group') {\n // Ignore children of groups with quantifier (+/*/?)\n // These groups are unrelated to start/end tokens of terminals\n const group = node as Group;\n if (group.quantifier) {\n return;\n }\n }\n super.visitChildren(node);\n }\n}\n\nconst visitor = new TerminalRegExpVisitor();\n\nexport function getTerminalParts(regexp: RegExp | string): Array<{ start: string, end: string }> {\n try {\n if (typeof regexp !== 'string') {\n regexp = regexp.source;\n }\n regexp = `/${regexp}/`;\n const pattern = regexpParser.pattern(regexp);\n const parts: Array<{ start: string, end: string }> = [];\n for (const alternative of pattern.value.value) {\n visitor.reset(regexp);\n visitor.visit(alternative);\n parts.push({\n start: visitor.startRegexp,\n end: visitor.endRegex\n });\n }\n return parts;\n } catch {\n return [];\n }\n}\n\nexport function isMultilineComment(regexp: RegExp | string): boolean {\n try {\n if (typeof regexp === 'string') {\n regexp = new RegExp(regexp);\n }\n regexp = regexp.toString();\n visitor.reset(regexp);\n // Parsing the pattern might fail (since it's user code)\n visitor.visit(regexpParser.pattern(regexp));\n return visitor.multiline;\n } catch {\n return false;\n }\n}\n\nexport function isWhitespace(value: RegExp | string): boolean {\n const regexp = typeof value === 'string' ? new RegExp(value) : value;\n return regexp.test(' ');\n}\n\nexport function escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nexport function getCaseInsensitivePattern(keyword: string): string {\n return Array.prototype.map.call(keyword, letter =>\n /\\w/.test(letter) ? `[${letter.toLowerCase()}${letter.toUpperCase()}]` : escapeRegExp(letter)\n ).join('');\n}\n\n/**\n * Determines whether the given input has a partial match with the specified regex.\n * @param regex The regex to partially match against\n * @param input The input string\n * @returns Whether any match exists.\n */\nexport function partialMatches(regex: RegExp | string, input: string): boolean {\n const partial = partialRegExp(regex);\n const match = input.match(partial);\n return !!match && match[0].length > 0;\n}\n\n/**\n * Builds a partial regex from the input regex. A partial regex is able to match incomplete input strings. E.g.\n * a partial regex constructed from `/ab/` is able to match the string `a` without needing a following `b` character. However it won't match `b` alone.\n * @param regex The input regex to be converted.\n * @returns A partial regex constructed from the input regex.\n */\nexport function partialRegExp(regex: RegExp | string): RegExp {\n if (typeof regex === 'string') {\n regex = new RegExp(regex);\n }\n const re = regex, source = regex.source;\n let i = 0;\n\n function process() {\n let result = '',\n tmp;\n\n function appendRaw(nbChars: number) {\n result += source.substr(i, nbChars);\n i += nbChars;\n }\n\n function appendOptional(nbChars: number) {\n result += '(?:' + source.substr(i, nbChars) + '|$)';\n i += nbChars;\n }\n\n while (i < source.length) {\n switch (source[i]) {\n case '\\\\':\n switch (source[i + 1]) {\n case 'c':\n appendOptional(3);\n break;\n case 'x':\n appendOptional(4);\n break;\n case 'u':\n if (re.unicode) {\n if (source[i + 2] === '{') {\n appendOptional(source.indexOf('}', i) - i + 1);\n } else {\n appendOptional(6);\n }\n } else {\n appendOptional(2);\n }\n break;\n case 'p':\n case 'P':\n if (re.unicode) {\n appendOptional(source.indexOf('}', i) - i + 1);\n } else {\n appendOptional(2);\n }\n break;\n case 'k':\n appendOptional(source.indexOf('>', i) - i + 1);\n break;\n default:\n appendOptional(2);\n break;\n }\n break;\n\n case '[':\n tmp = /\\[(?:\\\\.|.)*?\\]/g;\n tmp.lastIndex = i;\n tmp = tmp.exec(source) || [];\n appendOptional(tmp[0].length);\n break;\n\n case '|':\n case '^':\n case '$':\n case '*':\n case '+':\n case '?':\n appendRaw(1);\n break;\n case '{':\n tmp = /\\{\\d+,?\\d*\\}/g;\n tmp.lastIndex = i;\n tmp = tmp.exec(source);\n if (tmp) {\n appendRaw(tmp[0].length);\n } else {\n appendOptional(1);\n }\n break;\n case '(':\n if (source[i + 1] === '?') {\n switch (source[i + 2]) {\n case ':':\n result += '(?:';\n i += 3;\n result += process() + '|$)';\n break;\n case '=':\n result += '(?=';\n i += 3;\n result += process() + ')';\n break;\n case '!':\n tmp = i;\n i += 3;\n process();\n result += source.substr(tmp, i - tmp);\n break;\n case '<':\n switch (source[i + 3]) {\n case '=':\n case '!':\n tmp = i;\n i += 4;\n process();\n result += source.substr(tmp, i - tmp);\n break;\n default:\n appendRaw(source.indexOf('>', i) - i + 1);\n result += process() + '|$)';\n break;\n }\n break;\n }\n } else {\n appendRaw(1);\n result += process() + '|$)';\n }\n break;\n case ')':\n ++i;\n return result;\n default:\n appendOptional(1);\n break;\n }\n }\n\n return result;\n }\n\n return new RegExp(process(), regex.flags);\n}\n", "/******************************************************************************\n * Copyright 2021-2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { assertUnreachable } from '../utils/errors.js';\nimport * as ast from '../languages/generated/ast.js';\nimport type { AstNode, CstNode } from '../syntax-tree.js';\nimport { isCompositeCstNode } from '../syntax-tree.js';\nimport { getContainerOfType, streamAllContents } from './ast-utils.js';\nimport { streamCst } from './cst-utils.js';\nimport { escapeRegExp } from './regexp-utils.js';\n\n/**\n * Returns the entry rule of the given grammar, if any. If the grammar file does not contain an entry rule,\n * the result is `undefined`.\n */\nexport function getEntryRule(grammar: ast.Grammar): ast.ParserRule | undefined {\n return grammar.rules.find(e => ast.isParserRule(e) && e.entry) as ast.ParserRule;\n}\n\n/**\n * Returns all hidden terminal rules of the given grammar, if any.\n */\nexport function getHiddenRules(grammar: ast.Grammar) {\n return grammar.rules.filter((e): e is ast.TerminalRule => ast.isTerminalRule(e) && e.hidden);\n}\n\n/**\n * Returns all rules that can be reached from the topmost rules of the specified grammar (entry and hidden terminal rules).\n *\n * @param grammar The grammar that contains all rules\n * @param allTerminals Whether or not to include terminals that are referenced only by other terminals\n * @returns A list of referenced parser and terminal rules. If the grammar contains no entry rule,\n * this function returns all rules of the specified grammar.\n */\nexport function getAllReachableRules(grammar: ast.Grammar, allTerminals: boolean): Set {\n const ruleNames = new Set();\n const entryRule = getEntryRule(grammar);\n if (!entryRule) {\n return new Set(grammar.rules);\n }\n\n const topMostRules = [entryRule as ast.AbstractRule].concat(getHiddenRules(grammar));\n for (const rule of topMostRules) {\n ruleDfs(rule, ruleNames, allTerminals);\n }\n\n const rules = new Set();\n for (const rule of grammar.rules) {\n if (ruleNames.has(rule.name) || (ast.isTerminalRule(rule) && rule.hidden)) {\n rules.add(rule);\n }\n }\n return rules;\n}\n\nfunction ruleDfs(rule: ast.AbstractRule, visitedSet: Set, allTerminals: boolean): void {\n visitedSet.add(rule.name);\n streamAllContents(rule).forEach(node => {\n if (ast.isRuleCall(node) || (allTerminals && ast.isTerminalRuleCall(node))) {\n const refRule = node.rule.ref;\n if (refRule && !visitedSet.has(refRule.name)) {\n ruleDfs(refRule, visitedSet, allTerminals);\n }\n }\n });\n}\n\n/**\n * Determines the grammar expression used to parse a cross-reference (usually a reference to a terminal rule).\n * A cross-reference can declare this expression explicitly in the form `[Type : Terminal]`, but if `Terminal`\n * is omitted, this function attempts to infer it from the name of the referenced `Type` (using `findNameAssignment`).\n *\n * Returns the grammar expression used to parse the given cross-reference, or `undefined` if it is not declared\n * and cannot be inferred.\n */\nexport function getCrossReferenceTerminal(crossRef: ast.CrossReference): ast.AbstractElement | undefined {\n if (crossRef.terminal) {\n return crossRef.terminal;\n } else if (crossRef.type.ref) {\n const nameAssigment = findNameAssignment(crossRef.type.ref);\n return nameAssigment?.terminal;\n }\n return undefined;\n}\n\n/**\n * Determines whether the given terminal rule represents a comment. This is true if the rule is marked\n * as `hidden` and it does not match white space. This means every hidden token (i.e. excluded from the AST)\n * that contains visible characters is considered a comment.\n */\nexport function isCommentTerminal(terminalRule: ast.TerminalRule): boolean {\n return terminalRule.hidden && !terminalRegex(terminalRule).test(' ');\n}\n\n/**\n * Find all CST nodes within the given node that contribute to the specified property.\n *\n * @param node A CST node in which to look for property assignments. If this is undefined, the result is an empty array.\n * @param property A property name of the constructed AST node. If this is undefined, the result is an empty array.\n */\nexport function findNodesForProperty(node: CstNode | undefined, property: string | undefined): CstNode[] {\n if (!node || !property) {\n return [];\n }\n return findNodesForPropertyInternal(node, property, node.astNode, true);\n}\n\n/**\n * Find a single CST node within the given node that contributes to the specified property.\n *\n * @param node A CST node in which to look for property assignments. If this is undefined, the result is `undefined`.\n * @param property A property name of the constructed AST node. If this is undefined, the result is `undefined`.\n * @param index If no index is specified or the index is less than zero, the first found node is returned. If the\n * specified index exceeds the number of assignments to the property, the last found node is returned. Otherwise,\n * the node with the specified index is returned.\n */\nexport function findNodeForProperty(node: CstNode | undefined, property: string | undefined, index?: number): CstNode | undefined {\n if (!node || !property) {\n return undefined;\n }\n const nodes = findNodesForPropertyInternal(node, property, node.astNode, true);\n if (nodes.length === 0) {\n return undefined;\n }\n if (index !== undefined) {\n index = Math.max(0, Math.min(index, nodes.length - 1));\n } else {\n index = 0;\n }\n return nodes[index];\n}\n\nfunction findNodesForPropertyInternal(node: CstNode, property: string, element: AstNode | undefined, first: boolean): CstNode[] {\n if (!first) {\n const nodeFeature = getContainerOfType(node.grammarSource, ast.isAssignment);\n if (nodeFeature && nodeFeature.feature === property) {\n return [node];\n }\n }\n if (isCompositeCstNode(node) && node.astNode === element) {\n return node.content.flatMap(e => findNodesForPropertyInternal(e, property, element, false));\n }\n return [];\n}\n\n/**\n * Find all CST nodes within the given node that correspond to the specified keyword.\n *\n * @param node A CST node in which to look for keywords. If this is undefined, the result is an empty array.\n * @param keyword A keyword as specified in the grammar.\n */\nexport function findNodesForKeyword(node: CstNode | undefined, keyword: string): CstNode[] {\n if (!node) {\n return [];\n }\n return findNodesForKeywordInternal(node, keyword, node?.astNode);\n}\n\n/**\n * Find a single CST node within the given node that corresponds to the specified keyword.\n *\n * @param node A CST node in which to look for keywords. If this is undefined, the result is `undefined`.\n * @param keyword A keyword as specified in the grammar.\n * @param index If no index is specified or the index is less than zero, the first found node is returned. If the\n * specified index exceeds the number of keyword occurrences, the last found node is returned. Otherwise,\n * the node with the specified index is returned.\n */\nexport function findNodeForKeyword(node: CstNode | undefined, keyword: string, index?: number): CstNode | undefined {\n if (!node) {\n return undefined;\n }\n const nodes = findNodesForKeywordInternal(node, keyword, node?.astNode);\n if (nodes.length === 0) {\n return undefined;\n }\n if (index !== undefined) {\n index = Math.max(0, Math.min(index, nodes.length - 1));\n } else {\n index = 0;\n }\n return nodes[index];\n}\n\nexport function findNodesForKeywordInternal(node: CstNode, keyword: string, element: AstNode | undefined): CstNode[] {\n if (node.astNode !== element) {\n return [];\n }\n if (ast.isKeyword(node.grammarSource) && node.grammarSource.value === keyword) {\n return [node];\n }\n const treeIterator = streamCst(node).iterator();\n let result: IteratorResult;\n const keywordNodes: CstNode[] = [];\n do {\n result = treeIterator.next();\n if (!result.done) {\n const childNode = result.value;\n if (childNode.astNode === element) {\n if (ast.isKeyword(childNode.grammarSource) && childNode.grammarSource.value === keyword) {\n keywordNodes.push(childNode);\n }\n } else {\n treeIterator.prune();\n }\n }\n } while (!result.done);\n return keywordNodes;\n}\n\n/**\n * If the given CST node was parsed in the context of a property assignment, the respective `Assignment` grammar\n * node is returned. If no assignment is found, the result is `undefined`.\n *\n * @param cstNode A CST node for which to find a property assignment.\n */\nexport function findAssignment(cstNode: CstNode): ast.Assignment | undefined {\n const astNode = cstNode.astNode;\n // Only search until the ast node of the parent cst node is no longer the original ast node\n // This would make us jump to a preceding rule call, which contains only unrelated assignments\n while (astNode === cstNode.container?.astNode) {\n const assignment = getContainerOfType(cstNode.grammarSource, ast.isAssignment);\n if (assignment) {\n return assignment;\n }\n cstNode = cstNode.container;\n }\n return undefined;\n}\n\n/**\n * Find an assignment to the `name` property for the given grammar type. This requires the `type` to be inferred\n * from a parser rule, and that rule must contain an assignment to the `name` property. In all other cases,\n * this function returns `undefined`.\n */\nexport function findNameAssignment(type: ast.AbstractType): ast.Assignment | undefined {\n let startNode: AstNode = type;\n if (ast.isInferredType(startNode)) {\n // for inferred types, the location to start searching for the name-assignment is different\n if (ast.isAction(startNode.$container)) {\n // a type which is explicitly inferred by an action: investigate the sibbling of the Action node, i.e. start searching at the Action's parent\n startNode = startNode.$container.$container!;\n } else if (ast.isParserRule(startNode.$container)) {\n // investigate the parser rule with the explicitly inferred type\n startNode = startNode.$container;\n } else {\n assertUnreachable(startNode.$container);\n }\n }\n return findNameAssignmentInternal(type, startNode, new Map());\n}\n\nfunction findNameAssignmentInternal(type: ast.AbstractType, startNode: AstNode, cache: Map): ast.Assignment | undefined {\n // the cache is only required to prevent infinite loops\n function go(node: AstNode, refType: ast.AbstractType): ast.Assignment | undefined {\n let childAssignment: ast.Assignment | undefined = undefined;\n const parentAssignment = getContainerOfType(node, ast.isAssignment);\n // No parent assignment implies unassigned rule call\n if (!parentAssignment) {\n childAssignment = findNameAssignmentInternal(refType, refType, cache);\n }\n cache.set(type, childAssignment);\n return childAssignment;\n }\n\n if (cache.has(type)) {\n return cache.get(type);\n }\n cache.set(type, undefined);\n for (const node of streamAllContents(startNode)) {\n if (ast.isAssignment(node) && node.feature.toLowerCase() === 'name') {\n cache.set(type, node);\n return node;\n } else if (ast.isRuleCall(node) && ast.isParserRule(node.rule.ref)) {\n return go(node, node.rule.ref);\n } else if (ast.isSimpleType(node) && node.typeRef?.ref) {\n return go(node, node.typeRef.ref);\n }\n }\n return undefined;\n}\n\nexport function getActionAtElement(element: ast.AbstractElement): ast.Action | undefined {\n const parent = element.$container;\n if (ast.isGroup(parent)) {\n const elements = parent.elements;\n const index = elements.indexOf(element);\n for (let i = index - 1; i >= 0; i--) {\n const item = elements[i];\n if (ast.isAction(item)) {\n return item;\n } else {\n const action = streamAllContents(elements[i]).find(ast.isAction);\n if (action) {\n return action;\n }\n }\n }\n }\n if (ast.isAbstractElement(parent)) {\n return getActionAtElement(parent);\n } else {\n return undefined;\n }\n}\n\nexport type Cardinality = '?' | '*' | '+' | undefined;\nexport type Operator = '=' | '+=' | '?=' | undefined;\n\nexport function isOptionalCardinality(cardinality?: Cardinality, element?: ast.AbstractElement): boolean {\n return cardinality === '?' || cardinality === '*' || (ast.isGroup(element) && Boolean(element.guardCondition));\n}\n\nexport function isArrayCardinality(cardinality?: Cardinality): boolean {\n return cardinality === '*' || cardinality === '+';\n}\n\nexport function isArrayOperator(operator?: Operator): boolean {\n return operator === '+=';\n}\n\n/**\n * Determines whether the given parser rule is a _data type rule_, meaning that it has a\n * primitive return type like `number`, `boolean`, etc.\n */\nexport function isDataTypeRule(rule: ast.ParserRule): boolean {\n return isDataTypeRuleInternal(rule, new Set());\n}\n\nfunction isDataTypeRuleInternal(rule: ast.ParserRule, visited: Set): boolean {\n if (visited.has(rule)) {\n return true;\n } else {\n visited.add(rule);\n }\n for (const node of streamAllContents(rule)) {\n if (ast.isRuleCall(node)) {\n if (!node.rule.ref) {\n // RuleCall to unresolved rule. Don't assume `rule` is a DataType rule.\n return false;\n }\n if (ast.isParserRule(node.rule.ref) && !isDataTypeRuleInternal(node.rule.ref, visited)) {\n return false;\n }\n } else if (ast.isAssignment(node)) {\n return false;\n } else if (ast.isAction(node)) {\n return false;\n }\n }\n return Boolean(rule.definition);\n}\n\nexport function isDataType(type: ast.Type): boolean {\n return isDataTypeInternal(type.type, new Set());\n}\n\nfunction isDataTypeInternal(type: ast.TypeDefinition, visited: Set): boolean {\n if (visited.has(type)) {\n return true;\n } else {\n visited.add(type);\n }\n if (ast.isArrayType(type)) {\n return false;\n } else if (ast.isReferenceType(type)) {\n return false;\n } else if (ast.isUnionType(type)) {\n return type.types.every(e => isDataTypeInternal(e, visited));\n } else if (ast.isSimpleType(type)) {\n if (type.primitiveType !== undefined) {\n return true;\n } else if (type.stringType !== undefined) {\n return true;\n } else if (type.typeRef !== undefined) {\n const ref = type.typeRef.ref;\n if (ast.isType(ref)) {\n return isDataTypeInternal(ref.type, visited);\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n}\n\nexport function getExplicitRuleType(rule: ast.ParserRule): string | undefined {\n if (rule.inferredType) {\n return rule.inferredType.name;\n } else if (rule.dataType) {\n return rule.dataType;\n } else if (rule.returnType) {\n const refType = rule.returnType.ref;\n if(refType) {\n // check if we need to check Action as return type\n if (ast.isParserRule(refType)) {\n return refType.name;\n } else if(ast.isInterface(refType) || ast.isType(refType)) {\n return refType.name;\n }\n }\n }\n return undefined;\n}\n\nexport function getTypeName(type: ast.AbstractType | ast.Action): string {\n if (ast.isParserRule(type)) {\n return isDataTypeRule(type) ? type.name : getExplicitRuleType(type) ?? type.name;\n } else if (ast.isInterface(type) || ast.isType(type) || ast.isReturnType(type)) {\n return type.name;\n } else if (ast.isAction(type)) {\n const actionType = getActionType(type);\n if (actionType) {\n return actionType;\n }\n } else if (ast.isInferredType(type)) {\n return type.name;\n }\n throw new Error('Cannot get name of Unknown Type');\n}\n\nexport function getActionType(action: ast.Action): string | undefined {\n if (action.inferredType) {\n return action.inferredType.name;\n } else if (action.type?.ref) {\n return getTypeName(action.type.ref);\n }\n return undefined; // not inferring and not referencing a valid type\n}\n\nexport function getRuleType(rule: ast.AbstractRule): string {\n if (ast.isTerminalRule(rule)) {\n return rule.type?.name ?? 'string';\n } else {\n return isDataTypeRule(rule) ? rule.name : getExplicitRuleType(rule) ?? rule.name;\n }\n}\n\nexport function terminalRegex(terminalRule: ast.TerminalRule): RegExp {\n const flags: Flags = {\n s: false,\n i: false,\n u: false\n };\n const source = abstractElementToRegex(terminalRule.definition, flags);\n const flagText = Object.entries(flags).filter(([, value]) => value).map(([name]) => name).join('');\n return new RegExp(source, flagText);\n}\n\n// Using [\\s\\S]* allows to match everything, compared to . which doesn't match line terminators\nconst WILDCARD = /[\\s\\S]/.source;\n\ntype Flags = {\n s: boolean;\n i: boolean;\n u: boolean;\n}\n\nfunction abstractElementToRegex(element: ast.AbstractElement, flags?: Flags): string {\n if (ast.isTerminalAlternatives(element)) {\n return terminalAlternativesToRegex(element);\n } else if (ast.isTerminalGroup(element)) {\n return terminalGroupToRegex(element);\n } else if (ast.isCharacterRange(element)) {\n return characterRangeToRegex(element);\n } else if (ast.isTerminalRuleCall(element)) {\n const rule = element.rule.ref;\n if (!rule) {\n throw new Error('Missing rule reference.');\n }\n return withCardinality(abstractElementToRegex(rule.definition), {\n cardinality: element.cardinality,\n lookahead: element.lookahead\n });\n } else if (ast.isNegatedToken(element)) {\n return negateTokenToRegex(element);\n } else if (ast.isUntilToken(element)) {\n return untilTokenToRegex(element);\n } else if (ast.isRegexToken(element)) {\n const lastSlash = element.regex.lastIndexOf('/');\n const source = element.regex.substring(1, lastSlash);\n const regexFlags = element.regex.substring(lastSlash + 1);\n if (flags) {\n flags.i = regexFlags.includes('i');\n flags.s = regexFlags.includes('s');\n flags.u = regexFlags.includes('u');\n }\n return withCardinality(source, {\n cardinality: element.cardinality,\n lookahead: element.lookahead,\n wrap: false\n });\n } else if (ast.isWildcard(element)) {\n return withCardinality(WILDCARD, {\n cardinality: element.cardinality,\n lookahead: element.lookahead\n });\n } else {\n throw new Error(`Invalid terminal element: ${element?.$type}`);\n }\n}\n\nfunction terminalAlternativesToRegex(alternatives: ast.TerminalAlternatives): string {\n return withCardinality(alternatives.elements.map(e => abstractElementToRegex(e)).join('|'), {\n cardinality: alternatives.cardinality,\n lookahead: alternatives.lookahead\n });\n}\n\nfunction terminalGroupToRegex(group: ast.TerminalGroup): string {\n return withCardinality(group.elements.map(e => abstractElementToRegex(e)).join(''), {\n cardinality: group.cardinality,\n lookahead: group.lookahead\n });\n}\n\nfunction untilTokenToRegex(until: ast.UntilToken): string {\n return withCardinality(`${WILDCARD}*?${abstractElementToRegex(until.terminal)}`, {\n cardinality: until.cardinality,\n lookahead: until.lookahead\n });\n}\n\nfunction negateTokenToRegex(negate: ast.NegatedToken): string {\n return withCardinality(`(?!${abstractElementToRegex(negate.terminal)})${WILDCARD}*?`, {\n cardinality: negate.cardinality,\n lookahead: negate.lookahead\n });\n}\n\nfunction characterRangeToRegex(range: ast.CharacterRange): string {\n if (range.right) {\n return withCardinality(`[${keywordToRegex(range.left)}-${keywordToRegex(range.right)}]`, {\n cardinality: range.cardinality,\n lookahead: range.lookahead,\n wrap: false\n });\n }\n return withCardinality(keywordToRegex(range.left), {\n cardinality: range.cardinality,\n lookahead: range.lookahead,\n wrap: false\n });\n}\n\nfunction keywordToRegex(keyword: ast.Keyword): string {\n return escapeRegExp(keyword.value);\n}\n\nfunction withCardinality(regex: string, options: {\n cardinality?: string\n wrap?: boolean\n lookahead?: string\n}): string {\n if (options.wrap !== false || options.lookahead) {\n regex = `(${options.lookahead ?? ''}${regex})`;\n }\n if (options.cardinality) {\n return `${regex}${options.cardinality}`;\n }\n return regex;\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport { DefaultNameRegexp } from '../utils/cst-utils.js';\nimport { isCommentTerminal, terminalRegex } from '../utils/grammar-utils.js';\nimport { isMultilineComment } from '../utils/regexp-utils.js';\nimport { isTerminalRule } from './generated/ast.js';\n\nexport interface GrammarConfig {\n /**\n * Lists all rule names which are classified as multiline comment rules\n */\n multilineCommentRules: string[]\n /**\n * A regular expression which matches characters of names\n */\n nameRegexp: RegExp\n}\n\n/**\n * Create the default grammar configuration (used by `createDefaultModule`). This can be overridden in a\n * language-specific module.\n */\nexport function createGrammarConfig(services: LangiumCoreServices): GrammarConfig {\n const rules: string[] = [];\n const grammar = services.Grammar;\n for (const rule of grammar.rules) {\n if (isTerminalRule(rule) && isCommentTerminal(rule) && isMultilineComment(terminalRegex(rule))) {\n rules.push(rule.name);\n }\n }\n return {\n multilineCommentRules: rules,\n nameRegexp: DefaultNameRegexp\n };\n}\n", "// needs a separate module as this is required inside chevrotain productive code\n// and also in the entry point for webpack(api.ts).\n// A separate file avoids cyclic dependencies and webpack errors.\nexport const VERSION = \"11.0.3\";\n", "export function PRINT_ERROR(msg: string) {\n /* istanbul ignore else - can't override global.console in node.js */\n if (console && console.error) {\n console.error(`Error: ${msg}`);\n }\n}\n\nexport function PRINT_WARNING(msg: string) {\n /* istanbul ignore else - can't override global.console in node.js*/\n if (console && console.warn) {\n // TODO: modify docs accordingly\n console.warn(`Warning: ${msg}`);\n }\n}\n", "export function timer(func: () => T): { time: number; value: T } {\n const start = new Date().getTime();\n const val = func();\n const end = new Date().getTime();\n const total = end - start;\n return { time: total, value: val };\n}\n", "// based on: https://github.com/petkaantonov/bluebird/blob/b97c0d2d487e8c5076e8bd897e0dcd4622d31846/src/util.js#L201-L216\nexport function toFastProperties(toBecomeFast: any) {\n function FakeConstructor() {}\n\n // If our object is used as a constructor, it would receive\n FakeConstructor.prototype = toBecomeFast;\n const fakeInstance = new (FakeConstructor as any)();\n\n function fakeAccess() {\n return typeof fakeInstance.bar;\n }\n\n // help V8 understand this is a \"real\" prototype by actually using\n // the fake instance.\n fakeAccess();\n fakeAccess();\n\n // Always true condition to suppress the Firefox warning of unreachable\n // code after a return statement.\n if (1) return toBecomeFast;\n\n // Eval prevents optimization of this method (even though this is dead code)\n // - https://esbuild.github.io/content-types/#direct-eval\n /* istanbul ignore next */\n // tslint:disable-next-line\n (0, eval)(toBecomeFast);\n}\n", "export { PRINT_WARNING, PRINT_ERROR } from \"./print.js\";\nexport { timer } from \"./timer.js\";\nexport { toFastProperties } from \"./to-fast-properties.js\";\n", "import { assign, forEach, isRegExp, isString, map, pickBy } from \"lodash-es\";\nimport type {\n IGASTVisitor,\n IProduction,\n IProductionWithOccurrence,\n ISerializedGast,\n TokenType,\n} from \"@chevrotain/types\";\n\n// TODO: duplicated code to avoid extracting another sub-package -- how to avoid?\nfunction tokenLabel(tokType: TokenType): string {\n if (hasTokenLabel(tokType)) {\n return tokType.LABEL;\n } else {\n return tokType.name;\n }\n}\n\n// TODO: duplicated code to avoid extracting another sub-package -- how to avoid?\nfunction hasTokenLabel(\n obj: TokenType,\n): obj is TokenType & Pick, \"LABEL\"> {\n return isString(obj.LABEL) && obj.LABEL !== \"\";\n}\n\nexport abstract class AbstractProduction\n implements IProduction\n{\n public get definition(): T[] {\n return this._definition;\n }\n public set definition(value: T[]) {\n this._definition = value;\n }\n\n constructor(protected _definition: T[]) {}\n\n accept(visitor: IGASTVisitor): void {\n visitor.visit(this);\n forEach(this.definition, (prod) => {\n prod.accept(visitor);\n });\n }\n}\n\nexport class NonTerminal\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public nonTerminalName!: string;\n public label?: string;\n public referencedRule!: Rule;\n public idx: number = 1;\n\n constructor(options: {\n nonTerminalName: string;\n label?: string;\n referencedRule?: Rule;\n idx?: number;\n }) {\n super([]);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n\n set definition(definition: IProduction[]) {\n // immutable\n }\n\n get definition(): IProduction[] {\n if (this.referencedRule !== undefined) {\n return this.referencedRule.definition;\n }\n return [];\n }\n\n accept(visitor: IGASTVisitor): void {\n visitor.visit(this);\n // don't visit children of a reference, we will get cyclic infinite loops if we do so\n }\n}\n\nexport class Rule extends AbstractProduction {\n public name!: string;\n public orgText: string = \"\";\n\n constructor(options: {\n name: string;\n definition: IProduction[];\n orgText?: string;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Alternative extends AbstractProduction {\n public ignoreAmbiguities: boolean = false;\n\n constructor(options: {\n definition: IProduction[];\n ignoreAmbiguities?: boolean;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Option\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n idx?: number;\n maxLookahead?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class RepetitionMandatory\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n idx?: number;\n maxLookahead?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class RepetitionMandatoryWithSeparator\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public separator!: TokenType;\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n separator: TokenType;\n idx?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Repetition\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public separator!: TokenType;\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n idx?: number;\n maxLookahead?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class RepetitionWithSeparator\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public separator!: TokenType;\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n separator: TokenType;\n idx?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Alternation\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public idx: number = 1;\n public ignoreAmbiguities: boolean = false;\n public hasPredicates: boolean = false;\n public maxLookahead?: number;\n\n public get definition(): Alternative[] {\n return this._definition;\n }\n public set definition(value: Alternative[]) {\n this._definition = value;\n }\n\n constructor(options: {\n definition: Alternative[];\n idx?: number;\n ignoreAmbiguities?: boolean;\n hasPredicates?: boolean;\n maxLookahead?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Terminal implements IProductionWithOccurrence {\n public terminalType!: TokenType;\n public label?: string;\n public idx: number = 1;\n\n constructor(options: {\n terminalType: TokenType;\n label?: string;\n idx?: number;\n }) {\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n\n accept(visitor: IGASTVisitor): void {\n visitor.visit(this);\n }\n}\n\nexport interface ISerializedBasic extends ISerializedGast {\n type:\n | \"Alternative\"\n | \"Option\"\n | \"RepetitionMandatory\"\n | \"Repetition\"\n | \"Alternation\";\n idx?: number;\n}\n\nexport interface ISerializedGastRule extends ISerializedGast {\n type: \"Rule\";\n name: string;\n orgText: string;\n}\n\nexport interface ISerializedNonTerminal extends ISerializedGast {\n type: \"NonTerminal\";\n name: string;\n label?: string;\n idx: number;\n}\n\nexport interface ISerializedTerminal extends ISerializedGast {\n type: \"Terminal\";\n name: string;\n terminalLabel?: string;\n label?: string;\n pattern?: string;\n idx: number;\n}\n\nexport interface ISerializedTerminalWithSeparator extends ISerializedGast {\n type: \"RepetitionMandatoryWithSeparator\" | \"RepetitionWithSeparator\";\n idx: number;\n separator: ISerializedTerminal;\n}\n\nexport type ISerializedGastAny =\n | ISerializedBasic\n | ISerializedGastRule\n | ISerializedNonTerminal\n | ISerializedTerminal\n | ISerializedTerminalWithSeparator;\n\nexport function serializeGrammar(topRules: Rule[]): ISerializedGast[] {\n return map(topRules, serializeProduction);\n}\n\nexport function serializeProduction(node: IProduction): ISerializedGast {\n function convertDefinition(definition: IProduction[]): ISerializedGast[] {\n return map(definition, serializeProduction);\n }\n /* istanbul ignore else */\n if (node instanceof NonTerminal) {\n const serializedNonTerminal: ISerializedNonTerminal = {\n type: \"NonTerminal\",\n name: node.nonTerminalName,\n idx: node.idx,\n };\n\n if (isString(node.label)) {\n serializedNonTerminal.label = node.label;\n }\n\n return serializedNonTerminal;\n } else if (node instanceof Alternative) {\n return {\n type: \"Alternative\",\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof Option) {\n return {\n type: \"Option\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof RepetitionMandatory) {\n return {\n type: \"RepetitionMandatory\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof RepetitionMandatoryWithSeparator) {\n return {\n type: \"RepetitionMandatoryWithSeparator\",\n idx: node.idx,\n separator: (\n serializeProduction(new Terminal({ terminalType: node.separator }))\n ),\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof RepetitionWithSeparator) {\n return {\n type: \"RepetitionWithSeparator\",\n idx: node.idx,\n separator: (\n serializeProduction(new Terminal({ terminalType: node.separator }))\n ),\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof Repetition) {\n return {\n type: \"Repetition\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof Alternation) {\n return {\n type: \"Alternation\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\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\n if (isString(node.label)) {\n serializedTerminal.terminalLabel = node.label;\n }\n\n const pattern = node.terminalType.PATTERN;\n if (node.terminalType.PATTERN) {\n serializedTerminal.pattern = isRegExp(pattern)\n ? (pattern).source\n : pattern;\n }\n\n return serializedTerminal;\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 } else {\n throw Error(\"non exhaustive match\");\n }\n}\n", "import {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"./model.js\";\nimport type { IProduction } from \"@chevrotain/types\";\n\nexport abstract class GAstVisitor {\n public visit(node: IProduction): any {\n const nodeAny: any = node;\n switch (nodeAny.constructor) {\n case NonTerminal:\n return this.visitNonTerminal(nodeAny);\n case Alternative:\n return this.visitAlternative(nodeAny);\n case Option:\n return this.visitOption(nodeAny);\n case RepetitionMandatory:\n return this.visitRepetitionMandatory(nodeAny);\n case RepetitionMandatoryWithSeparator:\n return this.visitRepetitionMandatoryWithSeparator(nodeAny);\n case RepetitionWithSeparator:\n return this.visitRepetitionWithSeparator(nodeAny);\n case Repetition:\n return this.visitRepetition(nodeAny);\n case Alternation:\n return this.visitAlternation(nodeAny);\n case Terminal:\n return this.visitTerminal(nodeAny);\n case Rule:\n return this.visitRule(nodeAny);\n /* c8 ignore next 2 */\n default:\n throw Error(\"non exhaustive match\");\n }\n }\n\n /* c8 ignore next */\n public visitNonTerminal(node: NonTerminal): any {}\n\n /* c8 ignore next */\n public visitAlternative(node: Alternative): any {}\n\n /* c8 ignore next */\n public visitOption(node: Option): any {}\n\n /* c8 ignore next */\n public visitRepetition(node: Repetition): any {}\n\n /* c8 ignore next */\n public visitRepetitionMandatory(node: RepetitionMandatory): any {}\n\n /* c8 ignore next 3 */\n public visitRepetitionMandatoryWithSeparator(\n node: RepetitionMandatoryWithSeparator,\n ): any {}\n\n /* c8 ignore next */\n public visitRepetitionWithSeparator(node: RepetitionWithSeparator): any {}\n\n /* c8 ignore next */\n public visitAlternation(node: Alternation): any {}\n\n /* c8 ignore next */\n public visitTerminal(node: Terminal): any {}\n\n /* c8 ignore next */\n public visitRule(node: Rule): any {}\n}\n", "import { every, includes, some } from \"lodash-es\";\nimport {\n AbstractProduction,\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"./model.js\";\nimport type { IProduction, IProductionWithOccurrence } from \"@chevrotain/types\";\n\nexport function isSequenceProd(\n prod: IProduction,\n): prod is { definition: IProduction[] } & IProduction {\n return (\n prod instanceof Alternative ||\n prod instanceof Option ||\n prod instanceof Repetition ||\n prod instanceof RepetitionMandatory ||\n prod instanceof RepetitionMandatoryWithSeparator ||\n prod instanceof RepetitionWithSeparator ||\n prod instanceof Terminal ||\n prod instanceof Rule\n );\n}\n\nexport function isOptionalProd(\n prod: IProduction,\n alreadyVisited: NonTerminal[] = [],\n): boolean {\n const isDirectlyOptional =\n prod instanceof Option ||\n prod instanceof Repetition ||\n prod instanceof RepetitionWithSeparator;\n if (isDirectlyOptional) {\n return true;\n }\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 Alternation) {\n // for OR its enough for just one of the alternatives to be optional\n return some((prod).definition, (subProd: IProduction) => {\n return isOptionalProd(subProd, alreadyVisited);\n });\n } else if (prod instanceof NonTerminal && includes(alreadyVisited, prod)) {\n // avoiding stack overflow due to infinite recursion\n return false;\n } else if (prod instanceof AbstractProduction) {\n if (prod instanceof NonTerminal) {\n alreadyVisited.push(prod);\n }\n return every(\n (prod).definition,\n (subProd: IProduction) => {\n return isOptionalProd(subProd, alreadyVisited);\n },\n );\n } else {\n return false;\n }\n}\n\nexport function isBranchingProd(\n prod: IProduction,\n): prod is { definition: IProduction[] } & IProduction {\n return prod instanceof Alternation;\n}\n\nexport function getProductionDslName(prod: IProductionWithOccurrence): string {\n /* istanbul ignore else */\n if (prod instanceof NonTerminal) {\n return \"SUBRULE\";\n } else if (prod instanceof Option) {\n return \"OPTION\";\n } else if (prod instanceof Alternation) {\n return \"OR\";\n } else if (prod instanceof RepetitionMandatory) {\n return \"AT_LEAST_ONE\";\n } else if (prod instanceof RepetitionMandatoryWithSeparator) {\n return \"AT_LEAST_ONE_SEP\";\n } else if (prod instanceof RepetitionWithSeparator) {\n return \"MANY_SEP\";\n } else if (prod instanceof Repetition) {\n return \"MANY\";\n } else if (prod instanceof Terminal) {\n return \"CONSUME\";\n /* c8 ignore next 3 */\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n", "export {\n Rule,\n Terminal,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Alternation,\n Alternative,\n serializeGrammar,\n serializeProduction,\n} from \"./model.js\";\n\nexport { GAstVisitor } from \"./visitor.js\";\n\nexport {\n getProductionDslName,\n isOptionalProd,\n isBranchingProd,\n isSequenceProd,\n} from \"./helpers.js\";\n", "import { drop, forEach } from \"lodash-es\";\nimport {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Terminal,\n} from \"@chevrotain/gast\";\nimport { IProduction } from \"@chevrotain/types\";\n\n/**\n * A Grammar Walker that computes the \"remaining\" grammar \"after\" a productions in the grammar.\n */\nexport abstract class RestWalker {\n walk(prod: { definition: IProduction[] }, prevRest: any[] = []): void {\n forEach(prod.definition, (subProd: IProduction, index) => {\n const currRest = drop(prod.definition, index + 1);\n /* istanbul ignore else */\n if (subProd instanceof NonTerminal) {\n this.walkProdRef(subProd, currRest, prevRest);\n } else if (subProd instanceof Terminal) {\n this.walkTerminal(subProd, currRest, prevRest);\n } else if (subProd instanceof Alternative) {\n this.walkFlat(subProd, currRest, prevRest);\n } else if (subProd instanceof Option) {\n this.walkOption(subProd, currRest, prevRest);\n } else if (subProd instanceof RepetitionMandatory) {\n this.walkAtLeastOne(subProd, currRest, prevRest);\n } else if (subProd instanceof RepetitionMandatoryWithSeparator) {\n this.walkAtLeastOneSep(subProd, currRest, prevRest);\n } else if (subProd instanceof RepetitionWithSeparator) {\n this.walkManySep(subProd, currRest, prevRest);\n } else if (subProd instanceof Repetition) {\n this.walkMany(subProd, currRest, prevRest);\n } else if (subProd instanceof Alternation) {\n this.walkOr(subProd, currRest, prevRest);\n } else {\n throw Error(\"non exhaustive match\");\n }\n });\n }\n\n walkTerminal(\n terminal: Terminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {}\n\n walkProdRef(\n refProd: NonTerminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {}\n\n walkFlat(\n flatProd: Alternative,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABCDEF => after the D the rest is EF\n const fullOrRest = currRest.concat(prevRest);\n this.walk(flatProd, fullOrRest);\n }\n\n walkOption(\n optionProd: Option,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC(DE)?F => after the (DE)? the rest is F\n const fullOrRest = currRest.concat(prevRest);\n this.walk(optionProd, fullOrRest);\n }\n\n walkAtLeastOne(\n atLeastOneProd: RepetitionMandatory,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC(DE)+F => after the (DE)+ the rest is (DE)?F\n const fullAtLeastOneRest: IProduction[] = [\n new Option({ definition: atLeastOneProd.definition }),\n ].concat(currRest, prevRest);\n this.walk(atLeastOneProd, fullAtLeastOneRest);\n }\n\n walkAtLeastOneSep(\n atLeastOneSepProd: RepetitionMandatoryWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC DE(,DE)* F => after the (,DE)+ the rest is (,DE)?F\n const fullAtLeastOneSepRest = restForRepetitionWithSeparator(\n atLeastOneSepProd,\n currRest,\n prevRest,\n );\n this.walk(atLeastOneSepProd, fullAtLeastOneSepRest);\n }\n\n walkMany(\n manyProd: Repetition,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC(DE)*F => after the (DE)* the rest is (DE)?F\n const fullManyRest: IProduction[] = [\n new Option({ definition: manyProd.definition }),\n ].concat(currRest, prevRest);\n this.walk(manyProd, fullManyRest);\n }\n\n walkManySep(\n manySepProd: RepetitionWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC (DE(,DE)*)? F => after the (,DE)* the rest is (,DE)?F\n const fullManySepRest = restForRepetitionWithSeparator(\n manySepProd,\n currRest,\n prevRest,\n );\n this.walk(manySepProd, fullManySepRest);\n }\n\n walkOr(\n orProd: Alternation,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC(D|E|F)G => when finding the (D|E|F) the rest is G\n const fullOrRest = currRest.concat(prevRest);\n // walk all different alternatives\n forEach(orProd.definition, (alt) => {\n // wrapping each alternative in a single definition wrapper\n // to avoid errors in computing the rest of that alternative in the invocation to computeInProdFollows\n // (otherwise for OR([alt1,alt2]) alt2 will be considered in 'rest' of alt1\n const prodWrapper = new Alternative({ definition: [alt] });\n this.walk(prodWrapper, fullOrRest);\n });\n }\n}\n\nfunction restForRepetitionWithSeparator(\n repSepProd: RepetitionWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n) {\n const repSepRest = [\n new Option({\n definition: [\n new Terminal({ terminalType: repSepProd.separator }) as IProduction,\n ].concat(repSepProd.definition),\n }) as IProduction,\n ];\n const fullRepSepRest: IProduction[] = repSepRest.concat(currRest, prevRest);\n return fullRepSepRest;\n}\n", "import { flatten, map, uniq } from \"lodash-es\";\nimport {\n isBranchingProd,\n isOptionalProd,\n isSequenceProd,\n NonTerminal,\n Terminal,\n} from \"@chevrotain/gast\";\nimport { IProduction, TokenType } from \"@chevrotain/types\";\n\nexport function first(prod: IProduction): TokenType[] {\n /* istanbul ignore else */\n if (prod instanceof NonTerminal) {\n // this could in theory cause infinite loops if\n // (1) prod A refs prod B.\n // (2) prod B refs prod A\n // (3) AB can match the empty set\n // in other words a cycle where everything is optional so the first will keep\n // looking ahead for the next optional part and will never exit\n // currently there is no safeguard for this unique edge case because\n // (1) not sure a grammar in which this can happen is useful for anything (productive)\n return first((prod).referencedRule);\n } else if (prod instanceof Terminal) {\n return firstForTerminal(prod);\n } else if (isSequenceProd(prod)) {\n return firstForSequence(prod);\n } else if (isBranchingProd(prod)) {\n return firstForBranching(prod);\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nexport function firstForSequence(prod: {\n definition: IProduction[];\n}): TokenType[] {\n let firstSet: TokenType[] = [];\n const seq = prod.definition;\n let nextSubProdIdx = 0;\n let hasInnerProdsRemaining = seq.length > nextSubProdIdx;\n let currSubProd;\n // so we enter the loop at least once (if the definition is not empty\n let isLastInnerProdOptional = true;\n // scan a sequence until it's end or until we have found a NONE optional production in it\n while (hasInnerProdsRemaining && isLastInnerProdOptional) {\n currSubProd = seq[nextSubProdIdx];\n isLastInnerProdOptional = isOptionalProd(currSubProd);\n firstSet = firstSet.concat(first(currSubProd));\n nextSubProdIdx = nextSubProdIdx + 1;\n hasInnerProdsRemaining = seq.length > nextSubProdIdx;\n }\n\n return uniq(firstSet);\n}\n\nexport function firstForBranching(prod: {\n definition: IProduction[];\n}): TokenType[] {\n const allAlternativesFirsts: TokenType[][] = map(\n prod.definition,\n (innerProd) => {\n return first(innerProd);\n },\n );\n return uniq(flatten(allAlternativesFirsts));\n}\n\nexport function firstForTerminal(terminal: Terminal): TokenType[] {\n return [terminal.terminalType];\n}\n", "// TODO: can this be removed? where is it used?\nexport const IN = \"_~IN~_\";\n", "import { RestWalker } from \"./rest.js\";\nimport { first } from \"./first.js\";\nimport { assign, forEach } from \"lodash-es\";\nimport { IN } from \"../constants.js\";\nimport { Alternative, NonTerminal, Rule, Terminal } from \"@chevrotain/gast\";\nimport { IProduction, TokenType } from \"@chevrotain/types\";\n\n// This ResyncFollowsWalker computes all of the follows required for RESYNC\n// (skipping reference production).\nexport class ResyncFollowsWalker extends RestWalker {\n public follows: Record = {};\n\n constructor(private topProd: Rule) {\n super();\n }\n\n startWalking(): Record {\n this.walk(this.topProd);\n return this.follows;\n }\n\n walkTerminal(\n terminal: Terminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // do nothing! just like in the public sector after 13:00\n }\n\n walkProdRef(\n refProd: NonTerminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n const followName =\n buildBetweenProdsFollowPrefix(refProd.referencedRule, refProd.idx) +\n this.topProd.name;\n const fullRest: IProduction[] = currRest.concat(prevRest);\n const restProd = new Alternative({ definition: fullRest });\n const t_in_topProd_follows = first(restProd);\n this.follows[followName] = t_in_topProd_follows;\n }\n}\n\nexport function computeAllProdsFollows(\n topProductions: Rule[],\n): Record {\n const reSyncFollows = {};\n\n forEach(topProductions, (topProd) => {\n const currRefsFollow = new ResyncFollowsWalker(topProd).startWalking();\n assign(reSyncFollows, currRefsFollow);\n });\n return reSyncFollows;\n}\n\nexport function buildBetweenProdsFollowPrefix(\n inner: Rule,\n occurenceInParent: number,\n): string {\n return inner.name + occurenceInParent + IN;\n}\n\nexport function buildInProdFollowPrefix(terminal: Terminal): string {\n const terminalName = terminal.terminalType.name;\n return terminalName + terminal.idx + IN;\n}\n", "import {\n Alternative,\n Assertion,\n Atom,\n Disjunction,\n RegExpParser,\n RegExpPattern,\n} from \"@chevrotain/regexp-to-ast\";\n\nlet regExpAstCache: { [regex: string]: RegExpPattern } = {};\nconst regExpParser = new RegExpParser();\n\n// this should be moved to regexp-to-ast\nexport type ASTNode =\n | RegExpPattern\n | Disjunction\n | Alternative\n | Assertion\n | Atom;\n\nexport function getRegExpAst(regExp: RegExp): RegExpPattern {\n const regExpStr = regExp.toString();\n if (regExpAstCache.hasOwnProperty(regExpStr)) {\n return regExpAstCache[regExpStr];\n } else {\n const regExpAst = regExpParser.pattern(regExpStr);\n regExpAstCache[regExpStr] = regExpAst;\n return regExpAst;\n }\n}\n\nexport function clearRegExpParserCache() {\n regExpAstCache = {};\n}\n", "import {\n Alternative,\n Atom,\n BaseRegExpVisitor,\n Character,\n Disjunction,\n Group,\n Set,\n} from \"@chevrotain/regexp-to-ast\";\nimport { every, find, forEach, includes, isArray, values } from \"lodash-es\";\nimport { PRINT_ERROR, PRINT_WARNING } from \"@chevrotain/utils\";\nimport { ASTNode, getRegExpAst } from \"./reg_exp_parser.js\";\nimport { charCodeToOptimizedIndex, minOptimizationVal } from \"./lexer.js\";\n\nconst complementErrorMessage =\n \"Complement Sets are not supported for first char optimization\";\nexport const failedOptimizationPrefixMsg =\n 'Unable to use \"first char\" lexer optimizations:\\n';\n\nexport function getOptimizedStartCodesIndices(\n regExp: RegExp,\n ensureOptimizations = false,\n): number[] {\n try {\n const ast = getRegExpAst(regExp);\n const firstChars = firstCharOptimizedIndices(\n ast.value,\n {},\n ast.flags.ignoreCase,\n );\n return firstChars;\n } catch (e) {\n /* istanbul ignore next */\n // Testing this relies on the regexp-to-ast library having a bug... */\n // TODO: only the else branch needs to be ignored, try to fix with newer prettier / tsc\n if (e.message === complementErrorMessage) {\n if (ensureOptimizations) {\n PRINT_WARNING(\n `${failedOptimizationPrefixMsg}` +\n `\\tUnable to optimize: < ${regExp.toString()} >\\n` +\n \"\\tComplement Sets cannot be automatically optimized.\\n\" +\n \"\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.\",\n );\n }\n } else {\n let msgSuffix = \"\";\n if (ensureOptimizations) {\n msgSuffix =\n \"\\n\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.\";\n }\n PRINT_ERROR(\n `${failedOptimizationPrefixMsg}\\n` +\n `\\tFailed parsing: < ${regExp.toString()} >\\n` +\n `\\tUsing the @chevrotain/regexp-to-ast library\\n` +\n \"\\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues\" +\n msgSuffix,\n );\n }\n }\n\n return [];\n}\n\nexport function firstCharOptimizedIndices(\n ast: ASTNode,\n result: { [charCode: number]: number },\n ignoreCase: boolean,\n): number[] {\n switch (ast.type) {\n case \"Disjunction\":\n for (let i = 0; i < ast.value.length; i++) {\n firstCharOptimizedIndices(ast.value[i], result, ignoreCase);\n }\n break;\n case \"Alternative\":\n const terms = ast.value;\n for (let i = 0; i < terms.length; i++) {\n const term = terms[i];\n\n // skip terms that cannot effect the first char results\n switch (term.type) {\n case \"EndAnchor\":\n // A group back reference cannot affect potential starting char.\n // because if a back reference is the first production than automatically\n // the group being referenced has had to come BEFORE so its codes have already been added\n case \"GroupBackReference\":\n // assertions do not affect potential starting codes\n case \"Lookahead\":\n case \"NegativeLookahead\":\n case \"StartAnchor\":\n case \"WordBoundary\":\n case \"NonWordBoundary\":\n continue;\n }\n\n const atom = term;\n switch (atom.type) {\n case \"Character\":\n addOptimizedIdxToResult(atom.value, result, ignoreCase);\n break;\n case \"Set\":\n if (atom.complement === true) {\n throw Error(complementErrorMessage);\n }\n forEach(atom.value, (code) => {\n if (typeof code === \"number\") {\n addOptimizedIdxToResult(code, result, ignoreCase);\n } else {\n // range\n const range = code as any;\n // cannot optimize when ignoreCase is\n if (ignoreCase === true) {\n for (\n let rangeCode = range.from;\n rangeCode <= range.to;\n rangeCode++\n ) {\n addOptimizedIdxToResult(rangeCode, result, ignoreCase);\n }\n }\n // Optimization (2 orders of magnitude less work for very large ranges)\n else {\n // handle unoptimized values\n for (\n let rangeCode = range.from;\n rangeCode <= range.to && rangeCode < minOptimizationVal;\n rangeCode++\n ) {\n addOptimizedIdxToResult(rangeCode, result, ignoreCase);\n }\n\n // Less common charCode where we optimize for faster init time, by using larger \"buckets\"\n if (range.to >= minOptimizationVal) {\n const minUnOptVal =\n range.from >= minOptimizationVal\n ? range.from\n : minOptimizationVal;\n const maxUnOptVal = range.to;\n const minOptIdx = charCodeToOptimizedIndex(minUnOptVal);\n const maxOptIdx = charCodeToOptimizedIndex(maxUnOptVal);\n\n for (\n let currOptIdx = minOptIdx;\n currOptIdx <= maxOptIdx;\n currOptIdx++\n ) {\n result[currOptIdx] = currOptIdx;\n }\n }\n }\n }\n });\n break;\n case \"Group\":\n firstCharOptimizedIndices(atom.value, result, ignoreCase);\n break;\n /* istanbul ignore next */\n default:\n throw Error(\"Non Exhaustive Match\");\n }\n\n // reached a mandatory production, no more **start** codes can be found on this alternative\n const isOptionalQuantifier =\n atom.quantifier !== undefined && atom.quantifier.atLeast === 0;\n if (\n // A group may be optional due to empty contents /(?:)/\n // or if everything inside it is optional /((a)?)/\n (atom.type === \"Group\" && isWholeOptional(atom) === false) ||\n // If this term is not a group it may only be optional if it has an optional quantifier\n (atom.type !== \"Group\" && isOptionalQuantifier === false)\n ) {\n break;\n }\n }\n break;\n /* istanbul ignore next */\n default:\n throw Error(\"non exhaustive match!\");\n }\n\n // console.log(Object.keys(result).length)\n return values(result);\n}\n\nfunction addOptimizedIdxToResult(\n code: number,\n result: { [charCode: number]: number },\n ignoreCase: boolean,\n) {\n const optimizedCharIdx = charCodeToOptimizedIndex(code);\n result[optimizedCharIdx] = optimizedCharIdx;\n\n if (ignoreCase === true) {\n handleIgnoreCase(code, result);\n }\n}\n\nfunction handleIgnoreCase(\n code: number,\n result: { [charCode: number]: number },\n) {\n const char = String.fromCharCode(code);\n const upperChar = char.toUpperCase();\n /* istanbul ignore else */\n if (upperChar !== char) {\n const optimizedCharIdx = charCodeToOptimizedIndex(upperChar.charCodeAt(0));\n result[optimizedCharIdx] = optimizedCharIdx;\n } else {\n const lowerChar = char.toLowerCase();\n if (lowerChar !== char) {\n const optimizedCharIdx = charCodeToOptimizedIndex(\n lowerChar.charCodeAt(0),\n );\n result[optimizedCharIdx] = optimizedCharIdx;\n }\n }\n}\n\nfunction findCode(setNode: Set, targetCharCodes: number[]) {\n return find(setNode.value, (codeOrRange) => {\n if (typeof codeOrRange === \"number\") {\n return includes(targetCharCodes, codeOrRange);\n } else {\n // range\n const range = codeOrRange;\n return (\n find(\n targetCharCodes,\n (targetCode) => range.from <= targetCode && targetCode <= range.to,\n ) !== undefined\n );\n }\n });\n}\n\nfunction isWholeOptional(ast: any): boolean {\n const quantifier = (ast as Atom).quantifier;\n if (quantifier && quantifier.atLeast === 0) {\n return true;\n }\n\n if (!ast.value) {\n return false;\n }\n\n return isArray(ast.value)\n ? every(ast.value, isWholeOptional)\n : isWholeOptional(ast.value);\n}\n\nclass CharCodeFinder extends BaseRegExpVisitor {\n found: boolean = false;\n\n constructor(private targetCharCodes: number[]) {\n super();\n }\n\n visitChildren(node: ASTNode) {\n // No need to keep looking...\n if (this.found === true) {\n return;\n }\n\n // switch lookaheads as they do not actually consume any characters thus\n // finding a charCode at lookahead context does not mean that regexp can actually contain it in a match.\n switch (node.type) {\n case \"Lookahead\":\n this.visitLookahead(node);\n return;\n case \"NegativeLookahead\":\n this.visitNegativeLookahead(node);\n return;\n }\n\n super.visitChildren(node);\n }\n\n visitCharacter(node: Character) {\n if (includes(this.targetCharCodes, node.value)) {\n this.found = true;\n }\n }\n\n visitSet(node: Set) {\n if (node.complement) {\n if (findCode(node, this.targetCharCodes) === undefined) {\n this.found = true;\n }\n } else {\n if (findCode(node, this.targetCharCodes) !== undefined) {\n this.found = true;\n }\n }\n }\n}\n\nexport function canMatchCharCode(\n charCodes: number[],\n pattern: RegExp | string,\n) {\n if (pattern instanceof RegExp) {\n const ast = getRegExpAst(pattern);\n const charCodeFinder = new CharCodeFinder(charCodes);\n charCodeFinder.visit(ast);\n return charCodeFinder.found;\n } else {\n return (\n find(pattern, (char) => {\n return includes(charCodes, (char).charCodeAt(0));\n }) !== undefined\n );\n }\n}\n", "import { BaseRegExpVisitor } from \"@chevrotain/regexp-to-ast\";\nimport {\n IRegExpExec,\n Lexer,\n LexerDefinitionErrorType,\n} from \"./lexer_public.js\";\nimport {\n compact,\n defaults,\n difference,\n filter,\n find,\n first,\n flatten,\n forEach,\n has,\n includes,\n indexOf,\n isArray,\n isEmpty,\n isFunction,\n isRegExp,\n isString,\n isUndefined,\n keys,\n map,\n reduce,\n reject,\n values,\n} from \"lodash-es\";\nimport { PRINT_ERROR } from \"@chevrotain/utils\";\nimport {\n canMatchCharCode,\n failedOptimizationPrefixMsg,\n getOptimizedStartCodesIndices,\n} from \"./reg_exp.js\";\nimport {\n ILexerDefinitionError,\n ILineTerminatorsTester,\n IMultiModeLexerDefinition,\n IToken,\n TokenType,\n} from \"@chevrotain/types\";\nimport { getRegExpAst } from \"./reg_exp_parser.js\";\n\nconst PATTERN = \"PATTERN\";\nexport const DEFAULT_MODE = \"defaultMode\";\nexport const MODES = \"modes\";\n\nexport interface IPatternConfig {\n pattern: IRegExpExec | string;\n longerAlt: number[] | undefined;\n canLineTerminator: boolean;\n isCustom: boolean;\n short: number | false;\n group: string | undefined | false;\n push: string | undefined;\n pop: boolean;\n tokenType: TokenType;\n tokenTypeIdx: number;\n}\n\nexport interface IAnalyzeResult {\n patternIdxToConfig: IPatternConfig[];\n charCodeToPatternIdxToConfig: { [charCode: number]: IPatternConfig[] };\n emptyGroups: { [groupName: string]: IToken[] };\n hasCustom: boolean;\n canBeOptimized: boolean;\n}\n\nexport let SUPPORT_STICKY =\n typeof (new RegExp(\"(?:)\")).sticky === \"boolean\";\n\nexport function disableSticky() {\n SUPPORT_STICKY = false;\n}\n\nexport function enableSticky() {\n SUPPORT_STICKY = true;\n}\n\nexport function analyzeTokenTypes(\n tokenTypes: TokenType[],\n options: {\n positionTracking?: \"full\" | \"onlyStart\" | \"onlyOffset\";\n ensureOptimizations?: boolean;\n lineTerminatorCharacters?: (number | string)[];\n // TODO: should `useSticky` be an argument here?\n useSticky?: boolean;\n safeMode?: boolean;\n tracer?: (msg: string, action: () => void) => void;\n },\n): IAnalyzeResult {\n options = defaults(options, {\n useSticky: SUPPORT_STICKY,\n debug: false as boolean,\n safeMode: false as boolean,\n positionTracking: \"full\",\n lineTerminatorCharacters: [\"\\r\", \"\\n\"],\n tracer: (msg: string, action: Function) => action(),\n });\n\n const tracer = options.tracer!;\n\n tracer(\"initCharCodeToOptimizedIndexMap\", () => {\n initCharCodeToOptimizedIndexMap();\n });\n\n let onlyRelevantTypes: TokenType[];\n tracer(\"Reject Lexer.NA\", () => {\n onlyRelevantTypes = reject(tokenTypes, (currType) => {\n return currType[PATTERN] === Lexer.NA;\n });\n });\n\n let hasCustom = false;\n let allTransformedPatterns: (IRegExpExec | string)[];\n tracer(\"Transform Patterns\", () => {\n hasCustom = false;\n allTransformedPatterns = map(\n onlyRelevantTypes,\n (currType): IRegExpExec | string => {\n const currPattern = currType[PATTERN];\n\n /* istanbul ignore else */\n if (isRegExp(currPattern)) {\n const regExpSource = currPattern.source;\n if (\n regExpSource.length === 1 &&\n // only these regExp meta characters which can appear in a length one regExp\n regExpSource !== \"^\" &&\n regExpSource !== \"$\" &&\n regExpSource !== \".\" &&\n !currPattern.ignoreCase\n ) {\n return regExpSource;\n } else if (\n regExpSource.length === 2 &&\n regExpSource[0] === \"\\\\\" &&\n // not a meta character\n !includes(\n [\n \"d\",\n \"D\",\n \"s\",\n \"S\",\n \"t\",\n \"r\",\n \"n\",\n \"t\",\n \"0\",\n \"c\",\n \"b\",\n \"B\",\n \"f\",\n \"v\",\n \"w\",\n \"W\",\n ],\n regExpSource[1],\n )\n ) {\n // escaped meta Characters: /\\+/ /\\[/\n // or redundant escaping: /\\a/\n // without the escaping \"\\\"\n return regExpSource[1];\n } else {\n return options.useSticky\n ? addStickyFlag(currPattern)\n : addStartOfInput(currPattern);\n }\n } else if (isFunction(currPattern)) {\n hasCustom = true;\n // CustomPatternMatcherFunc - custom patterns do not require any transformations, only wrapping in a RegExp Like object\n return { exec: currPattern };\n } else if (typeof currPattern === \"object\") {\n hasCustom = true;\n // ICustomPattern\n return currPattern;\n } else if (typeof currPattern === \"string\") {\n if (currPattern.length === 1) {\n return currPattern;\n } else {\n const escapedRegExpString = currPattern.replace(\n /[\\\\^$.*+?()[\\]{}|]/g,\n \"\\\\$&\",\n );\n const wrappedRegExp = new RegExp(escapedRegExpString);\n return options.useSticky\n ? addStickyFlag(wrappedRegExp)\n : addStartOfInput(wrappedRegExp);\n }\n } else {\n throw Error(\"non exhaustive match\");\n }\n },\n );\n });\n\n let patternIdxToType: number[];\n let patternIdxToGroup: (string | undefined | false)[];\n let patternIdxToLongerAltIdxArr: (number[] | undefined)[];\n let patternIdxToPushMode: (string | undefined)[];\n let patternIdxToPopMode: boolean[];\n tracer(\"misc mapping\", () => {\n patternIdxToType = map(\n onlyRelevantTypes,\n (currType) => currType.tokenTypeIdx!,\n );\n\n patternIdxToGroup = map(onlyRelevantTypes, (clazz: any) => {\n const groupName = clazz.GROUP;\n /* istanbul ignore next */\n if (groupName === Lexer.SKIPPED) {\n return undefined;\n } else if (isString(groupName)) {\n return groupName;\n } else if (isUndefined(groupName)) {\n return false;\n } else {\n throw Error(\"non exhaustive match\");\n }\n });\n\n patternIdxToLongerAltIdxArr = map(onlyRelevantTypes, (clazz: any) => {\n const longerAltType = clazz.LONGER_ALT;\n\n if (longerAltType) {\n const longerAltIdxArr = isArray(longerAltType)\n ? map(longerAltType, (type: any) => indexOf(onlyRelevantTypes, type))\n : [indexOf(onlyRelevantTypes, longerAltType)];\n return longerAltIdxArr;\n }\n });\n\n patternIdxToPushMode = map(\n onlyRelevantTypes,\n (clazz: any) => clazz.PUSH_MODE,\n );\n\n patternIdxToPopMode = map(onlyRelevantTypes, (clazz: any) =>\n has(clazz, \"POP_MODE\"),\n );\n });\n\n let patternIdxToCanLineTerminator: boolean[];\n tracer(\"Line Terminator Handling\", () => {\n const lineTerminatorCharCodes = getCharCodes(\n options.lineTerminatorCharacters!,\n );\n patternIdxToCanLineTerminator = map(onlyRelevantTypes, (tokType) => false);\n if (options.positionTracking !== \"onlyOffset\") {\n patternIdxToCanLineTerminator = map(onlyRelevantTypes, (tokType) => {\n if (has(tokType, \"LINE_BREAKS\")) {\n return !!tokType.LINE_BREAKS;\n } else {\n return (\n checkLineBreaksIssues(tokType, lineTerminatorCharCodes) === false &&\n canMatchCharCode(\n lineTerminatorCharCodes,\n tokType.PATTERN as RegExp | string,\n )\n );\n }\n });\n }\n });\n\n let patternIdxToIsCustom: boolean[];\n let patternIdxToShort: (number | false)[];\n let emptyGroups!: { [groupName: string]: IToken[] };\n let patternIdxToConfig!: IPatternConfig[];\n tracer(\"Misc Mapping #2\", () => {\n patternIdxToIsCustom = map(onlyRelevantTypes, isCustomPattern);\n patternIdxToShort = map(allTransformedPatterns, isShortPattern);\n\n emptyGroups = reduce(\n onlyRelevantTypes,\n (acc, clazz: any) => {\n const groupName = clazz.GROUP;\n if (isString(groupName) && !(groupName === Lexer.SKIPPED)) {\n acc[groupName] = [];\n }\n return acc;\n },\n {} as { [groupName: string]: IToken[] },\n );\n\n patternIdxToConfig = map(\n allTransformedPatterns,\n (x, idx): IPatternConfig => {\n return {\n pattern: allTransformedPatterns[idx],\n longerAlt: patternIdxToLongerAltIdxArr[idx],\n canLineTerminator: patternIdxToCanLineTerminator[idx],\n isCustom: patternIdxToIsCustom[idx],\n short: patternIdxToShort[idx],\n group: patternIdxToGroup[idx],\n push: patternIdxToPushMode[idx],\n pop: patternIdxToPopMode[idx],\n tokenTypeIdx: patternIdxToType[idx],\n tokenType: onlyRelevantTypes[idx],\n };\n },\n );\n });\n\n let canBeOptimized = true;\n let charCodeToPatternIdxToConfig: { [charCode: number]: IPatternConfig[] } =\n [];\n\n if (!options.safeMode) {\n tracer(\"First Char Optimization\", () => {\n charCodeToPatternIdxToConfig = reduce(\n onlyRelevantTypes,\n (result, currTokType, idx) => {\n if (typeof currTokType.PATTERN === \"string\") {\n const charCode = currTokType.PATTERN.charCodeAt(0);\n const optimizedIdx = charCodeToOptimizedIndex(charCode);\n addToMapOfArrays(result, optimizedIdx, patternIdxToConfig[idx]);\n } else if (isArray(currTokType.START_CHARS_HINT)) {\n let lastOptimizedIdx: number;\n forEach(currTokType.START_CHARS_HINT, (charOrInt) => {\n const charCode =\n typeof charOrInt === \"string\"\n ? charOrInt.charCodeAt(0)\n : charOrInt;\n const currOptimizedIdx = charCodeToOptimizedIndex(charCode);\n // Avoid adding the config multiple times\n /* istanbul ignore else */\n // - Difficult to check this scenario effects as it is only a performance\n // optimization that does not change correctness\n if (lastOptimizedIdx !== currOptimizedIdx) {\n lastOptimizedIdx = currOptimizedIdx;\n addToMapOfArrays(\n result,\n currOptimizedIdx,\n patternIdxToConfig[idx],\n );\n }\n });\n } else if (isRegExp(currTokType.PATTERN)) {\n if (currTokType.PATTERN.unicode) {\n canBeOptimized = false;\n if (options.ensureOptimizations) {\n PRINT_ERROR(\n `${failedOptimizationPrefixMsg}` +\n `\\tUnable to analyze < ${currTokType.PATTERN.toString()} > pattern.\\n` +\n \"\\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\\n\" +\n \"\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE\",\n );\n }\n } else {\n const optimizedCodes = getOptimizedStartCodesIndices(\n currTokType.PATTERN,\n options.ensureOptimizations,\n );\n /* istanbul ignore if */\n // start code will only be empty given an empty regExp or failure of regexp-to-ast library\n // the first should be a different validation and the second cannot be tested.\n if (isEmpty(optimizedCodes)) {\n // we cannot understand what codes may start possible matches\n // The optimization correctness requires knowing start codes for ALL patterns.\n // Not actually sure this is an error, no debug message\n canBeOptimized = false;\n }\n forEach(optimizedCodes, (code) => {\n addToMapOfArrays(result, code, patternIdxToConfig[idx]);\n });\n }\n } else {\n if (options.ensureOptimizations) {\n PRINT_ERROR(\n `${failedOptimizationPrefixMsg}` +\n `\\tTokenType: <${currTokType.name}> is using a custom token pattern without providing parameter.\\n` +\n \"\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE\",\n );\n }\n canBeOptimized = false;\n }\n\n return result;\n },\n [] as { [charCode: number]: IPatternConfig[] },\n );\n });\n }\n\n return {\n emptyGroups: emptyGroups,\n patternIdxToConfig: patternIdxToConfig,\n charCodeToPatternIdxToConfig: charCodeToPatternIdxToConfig,\n hasCustom: hasCustom,\n canBeOptimized: canBeOptimized,\n };\n}\n\nexport function validatePatterns(\n tokenTypes: TokenType[],\n validModesNames: string[],\n): ILexerDefinitionError[] {\n let errors: ILexerDefinitionError[] = [];\n\n const missingResult = findMissingPatterns(tokenTypes);\n errors = errors.concat(missingResult.errors);\n\n const invalidResult = findInvalidPatterns(missingResult.valid);\n const validTokenTypes = invalidResult.valid;\n errors = errors.concat(invalidResult.errors);\n\n errors = errors.concat(validateRegExpPattern(validTokenTypes));\n\n errors = errors.concat(findInvalidGroupType(validTokenTypes));\n\n errors = errors.concat(\n findModesThatDoNotExist(validTokenTypes, validModesNames),\n );\n\n errors = errors.concat(findUnreachablePatterns(validTokenTypes));\n\n return errors;\n}\n\nfunction validateRegExpPattern(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n let errors: ILexerDefinitionError[] = [];\n const withRegExpPatterns = filter(tokenTypes, (currTokType) =>\n isRegExp(currTokType[PATTERN]),\n );\n\n errors = errors.concat(findEndOfInputAnchor(withRegExpPatterns));\n\n errors = errors.concat(findStartOfInputAnchor(withRegExpPatterns));\n\n errors = errors.concat(findUnsupportedFlags(withRegExpPatterns));\n\n errors = errors.concat(findDuplicatePatterns(withRegExpPatterns));\n\n errors = errors.concat(findEmptyMatchRegExps(withRegExpPatterns));\n\n return errors;\n}\n\nexport interface ILexerFilterResult {\n errors: ILexerDefinitionError[];\n valid: TokenType[];\n}\n\nexport function findMissingPatterns(\n tokenTypes: TokenType[],\n): ILexerFilterResult {\n const tokenTypesWithMissingPattern = filter(tokenTypes, (currType) => {\n return !has(currType, PATTERN);\n });\n\n const errors = map(tokenTypesWithMissingPattern, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- missing static 'PATTERN' property\",\n type: LexerDefinitionErrorType.MISSING_PATTERN,\n tokenTypes: [currType],\n };\n });\n\n const valid = difference(tokenTypes, tokenTypesWithMissingPattern);\n return { errors, valid };\n}\n\nexport function findInvalidPatterns(\n tokenTypes: TokenType[],\n): ILexerFilterResult {\n const tokenTypesWithInvalidPattern = filter(tokenTypes, (currType) => {\n const pattern = currType[PATTERN];\n return (\n !isRegExp(pattern) &&\n !isFunction(pattern) &&\n !has(pattern, \"exec\") &&\n !isString(pattern)\n );\n });\n\n const errors = map(tokenTypesWithInvalidPattern, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' can only be a RegExp, a\" +\n \" Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.\",\n type: LexerDefinitionErrorType.INVALID_PATTERN,\n tokenTypes: [currType],\n };\n });\n\n const valid = difference(tokenTypes, tokenTypesWithInvalidPattern);\n return { errors, valid };\n}\n\nconst end_of_input = /[^\\\\][$]/;\n\nexport function findEndOfInputAnchor(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n class EndAnchorFinder extends BaseRegExpVisitor {\n found = false;\n\n visitEndAnchor(node: unknown) {\n this.found = true;\n }\n }\n\n const invalidRegex = filter(tokenTypes, (currType) => {\n const pattern = currType.PATTERN;\n\n try {\n const regexpAst = getRegExpAst(pattern as RegExp);\n const endAnchorVisitor = new EndAnchorFinder();\n endAnchorVisitor.visit(regexpAst);\n\n return endAnchorVisitor.found;\n } catch (e) {\n // old behavior in case of runtime exceptions with regexp-to-ast.\n /* istanbul ignore next - cannot ensure an error in regexp-to-ast*/\n return end_of_input.test((pattern as RegExp).source);\n }\n });\n\n const errors = map(invalidRegex, (currType) => {\n return {\n message:\n \"Unexpected RegExp Anchor Error:\\n\" +\n \"\\tToken Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' cannot contain end of input anchor '$'\\n\" +\n \"\\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\" +\n \"\\tfor details.\",\n type: LexerDefinitionErrorType.EOI_ANCHOR_FOUND,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\nexport function findEmptyMatchRegExps(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const matchesEmptyString = filter(tokenTypes, (currType) => {\n const pattern = currType.PATTERN as RegExp;\n return pattern.test(\"\");\n });\n\n const errors = map(matchesEmptyString, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' must not match an empty string\",\n type: LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\nconst start_of_input = /[^\\\\[][\\^]|^\\^/;\n\nexport function findStartOfInputAnchor(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n class StartAnchorFinder extends BaseRegExpVisitor {\n found = false;\n\n visitStartAnchor(node: unknown) {\n this.found = true;\n }\n }\n\n const invalidRegex = filter(tokenTypes, (currType) => {\n const pattern = currType.PATTERN as RegExp;\n try {\n const regexpAst = getRegExpAst(pattern);\n const startAnchorVisitor = new StartAnchorFinder();\n startAnchorVisitor.visit(regexpAst);\n\n return startAnchorVisitor.found;\n } catch (e) {\n // old behavior in case of runtime exceptions with regexp-to-ast.\n /* istanbul ignore next - cannot ensure an error in regexp-to-ast*/\n return start_of_input.test(pattern.source);\n }\n });\n\n const errors = map(invalidRegex, (currType) => {\n return {\n message:\n \"Unexpected RegExp Anchor Error:\\n\" +\n \"\\tToken Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' cannot contain start of input anchor '^'\\n\" +\n \"\\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\" +\n \"\\tfor details.\",\n type: LexerDefinitionErrorType.SOI_ANCHOR_FOUND,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\nexport function findUnsupportedFlags(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const invalidFlags = filter(tokenTypes, (currType) => {\n const pattern = currType[PATTERN];\n return pattern instanceof RegExp && (pattern.multiline || pattern.global);\n });\n\n const errors = map(invalidFlags, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' may NOT contain global('g') or multiline('m')\",\n type: LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\n// This can only test for identical duplicate RegExps, not semantically equivalent ones.\nexport function findDuplicatePatterns(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const found: TokenType[] = [];\n let identicalPatterns = map(tokenTypes, (outerType: any) => {\n return reduce(\n tokenTypes,\n (result, innerType) => {\n if (\n outerType.PATTERN.source === (innerType.PATTERN as RegExp).source &&\n !includes(found, innerType) &&\n innerType.PATTERN !== Lexer.NA\n ) {\n // this avoids duplicates in the result, each Token Type may only appear in one \"set\"\n // in essence we are creating Equivalence classes on equality relation.\n found.push(innerType);\n result.push(innerType);\n return result;\n }\n return result;\n },\n [] as TokenType[],\n );\n });\n\n identicalPatterns = compact(identicalPatterns);\n\n const duplicatePatterns = filter(identicalPatterns, (currIdenticalSet) => {\n return currIdenticalSet.length > 1;\n });\n\n const errors = map(duplicatePatterns, (setOfIdentical: any) => {\n const tokenTypeNames = map(setOfIdentical, (currType: any) => {\n return currType.name;\n });\n\n const dupPatternSrc = (first(setOfIdentical)).PATTERN;\n return {\n message:\n `The same RegExp pattern ->${dupPatternSrc}<-` +\n `has been used in all of the following Token Types: ${tokenTypeNames.join(\n \", \",\n )} <-`,\n type: LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,\n tokenTypes: setOfIdentical,\n };\n });\n\n return errors;\n}\n\nexport function findInvalidGroupType(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const invalidTypes = filter(tokenTypes, (clazz: any) => {\n if (!has(clazz, \"GROUP\")) {\n return false;\n }\n const group = clazz.GROUP;\n\n return group !== Lexer.SKIPPED && group !== Lexer.NA && !isString(group);\n });\n\n const errors = map(invalidTypes, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String\",\n type: LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\nexport function findModesThatDoNotExist(\n tokenTypes: TokenType[],\n validModes: string[],\n): ILexerDefinitionError[] {\n const invalidModes = filter(tokenTypes, (clazz: any) => {\n return (\n clazz.PUSH_MODE !== undefined && !includes(validModes, clazz.PUSH_MODE)\n );\n });\n\n const errors = map(invalidModes, (tokType) => {\n const msg =\n `Token Type: ->${tokType.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${tokType.PUSH_MODE}<-` +\n `which does not exist`;\n return {\n message: msg,\n type: LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,\n tokenTypes: [tokType],\n };\n });\n\n return errors;\n}\n\nexport function findUnreachablePatterns(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const errors: ILexerDefinitionError[] = [];\n\n const canBeTested = reduce(\n tokenTypes,\n (result, tokType, idx) => {\n const pattern = tokType.PATTERN;\n\n if (pattern === Lexer.NA) {\n return result;\n }\n\n // a more comprehensive validation for all forms of regExps would require\n // deeper regExp analysis capabilities\n if (isString(pattern)) {\n result.push({ str: pattern, idx, tokenType: tokType });\n } else if (isRegExp(pattern) && noMetaChar(pattern)) {\n result.push({ str: pattern.source, idx, tokenType: tokType });\n }\n return result;\n },\n [] as { str: string; idx: number; tokenType: TokenType }[],\n );\n\n forEach(tokenTypes, (tokType, testIdx) => {\n forEach(canBeTested, ({ str, idx, tokenType }) => {\n if (testIdx < idx && testTokenType(str, tokType.PATTERN)) {\n const msg =\n `Token: ->${tokenType.name}<- can never be matched.\\n` +\n `Because it appears AFTER the Token Type ->${tokType.name}<-` +\n `in the lexer's definition.\\n` +\n `See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;\n errors.push({\n message: msg,\n type: LexerDefinitionErrorType.UNREACHABLE_PATTERN,\n tokenTypes: [tokType, tokenType],\n });\n }\n });\n });\n\n return errors;\n}\n\nfunction testTokenType(str: string, pattern: any): boolean {\n /* istanbul ignore else */\n if (isRegExp(pattern)) {\n const regExpArray = pattern.exec(str);\n return regExpArray !== null && regExpArray.index === 0;\n } else if (isFunction(pattern)) {\n // maintain the API of custom patterns\n return pattern(str, 0, [], {});\n } else if (has(pattern, \"exec\")) {\n // maintain the API of custom patterns\n return pattern.exec(str, 0, [], {});\n } else if (typeof pattern === \"string\") {\n return pattern === str;\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nfunction noMetaChar(regExp: RegExp): boolean {\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n const metaChars = [\n \".\",\n \"\\\\\",\n \"[\",\n \"]\",\n \"|\",\n \"^\",\n \"$\",\n \"(\",\n \")\",\n \"?\",\n \"*\",\n \"+\",\n \"{\",\n ];\n return (\n find(metaChars, (char) => regExp.source.indexOf(char) !== -1) === undefined\n );\n}\n\nexport function addStartOfInput(pattern: RegExp): RegExp {\n const flags = pattern.ignoreCase ? \"i\" : \"\";\n // always wrapping in a none capturing group preceded by '^' to make sure matching can only work on start of input.\n // duplicate/redundant start of input markers have no meaning (/^^^^A/ === /^A/)\n return new RegExp(`^(?:${pattern.source})`, flags);\n}\n\nexport function addStickyFlag(pattern: RegExp): RegExp {\n const flags = pattern.ignoreCase ? \"iy\" : \"y\";\n // always wrapping in a none capturing group preceded by '^' to make sure matching can only work on start of input.\n // duplicate/redundant start of input markers have no meaning (/^^^^A/ === /^A/)\n return new RegExp(`${pattern.source}`, flags);\n}\n\nexport function performRuntimeChecks(\n lexerDefinition: IMultiModeLexerDefinition,\n trackLines: boolean,\n lineTerminatorCharacters: (number | string)[],\n): ILexerDefinitionError[] {\n const errors: ILexerDefinitionError[] = [];\n\n // some run time checks to help the end users.\n if (!has(lexerDefinition, DEFAULT_MODE)) {\n errors.push({\n message:\n \"A MultiMode Lexer cannot be initialized without a <\" +\n DEFAULT_MODE +\n \"> property in its definition\\n\",\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE,\n });\n }\n if (!has(lexerDefinition, MODES)) {\n errors.push({\n message:\n \"A MultiMode Lexer cannot be initialized without a <\" +\n MODES +\n \"> property in its definition\\n\",\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY,\n });\n }\n\n if (\n has(lexerDefinition, MODES) &&\n has(lexerDefinition, DEFAULT_MODE) &&\n !has(lexerDefinition.modes, lexerDefinition.defaultMode)\n ) {\n errors.push({\n message:\n `A MultiMode Lexer cannot be initialized with a ${DEFAULT_MODE}: <${lexerDefinition.defaultMode}>` +\n `which does not exist\\n`,\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST,\n });\n }\n\n if (has(lexerDefinition, MODES)) {\n forEach(lexerDefinition.modes, (currModeValue, currModeName) => {\n forEach(currModeValue, (currTokType, currIdx) => {\n if (isUndefined(currTokType)) {\n errors.push({\n message:\n `A Lexer cannot be initialized using an undefined Token Type. Mode:` +\n `<${currModeName}> at index: <${currIdx}>\\n`,\n type: LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED,\n });\n } else if (has(currTokType, \"LONGER_ALT\")) {\n const longerAlt = isArray(currTokType.LONGER_ALT)\n ? currTokType.LONGER_ALT\n : [currTokType.LONGER_ALT];\n forEach(longerAlt, (currLongerAlt) => {\n if (\n !isUndefined(currLongerAlt) &&\n !includes(currModeValue, currLongerAlt)\n ) {\n errors.push({\n message: `A MultiMode Lexer cannot be initialized with a longer_alt <${currLongerAlt.name}> on token <${currTokType.name}> outside of mode <${currModeName}>\\n`,\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE,\n });\n }\n });\n }\n });\n });\n }\n\n return errors;\n}\n\nexport function performWarningRuntimeChecks(\n lexerDefinition: IMultiModeLexerDefinition,\n trackLines: boolean,\n lineTerminatorCharacters: (number | string)[],\n): ILexerDefinitionError[] {\n const warnings = [];\n let hasAnyLineBreak = false;\n const allTokenTypes = compact(flatten(values(lexerDefinition.modes)));\n\n const concreteTokenTypes = reject(\n allTokenTypes,\n (currType) => currType[PATTERN] === Lexer.NA,\n );\n const terminatorCharCodes = getCharCodes(lineTerminatorCharacters);\n if (trackLines) {\n forEach(concreteTokenTypes, (tokType) => {\n const currIssue = checkLineBreaksIssues(tokType, terminatorCharCodes);\n if (currIssue !== false) {\n const message = buildLineBreakIssueMessage(tokType, currIssue);\n const warningDescriptor = {\n message,\n type: currIssue.issue,\n tokenType: tokType,\n };\n warnings.push(warningDescriptor);\n } else {\n // we don't want to attempt to scan if the user explicitly specified the line_breaks option.\n if (has(tokType, \"LINE_BREAKS\")) {\n if (tokType.LINE_BREAKS === true) {\n hasAnyLineBreak = true;\n }\n } else {\n if (\n canMatchCharCode(terminatorCharCodes, tokType.PATTERN as RegExp)\n ) {\n hasAnyLineBreak = true;\n }\n }\n }\n });\n }\n\n if (trackLines && !hasAnyLineBreak) {\n warnings.push({\n message:\n \"Warning: No LINE_BREAKS Found.\\n\" +\n \"\\tThis Lexer has been defined to track line and column information,\\n\" +\n \"\\tBut none of the Token Types can be identified as matching a line terminator.\\n\" +\n \"\\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \\n\" +\n \"\\tfor details.\",\n type: LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS,\n });\n }\n return warnings;\n}\n\nexport function cloneEmptyGroups(emptyGroups: {\n [groupName: string]: IToken;\n}): { [groupName: string]: IToken } {\n const clonedResult: any = {};\n const groupKeys = keys(emptyGroups);\n\n forEach(groupKeys, (currKey) => {\n const currGroupValue = emptyGroups[currKey];\n\n /* istanbul ignore else */\n if (isArray(currGroupValue)) {\n clonedResult[currKey] = [];\n } else {\n throw Error(\"non exhaustive match\");\n }\n });\n\n return clonedResult;\n}\n\n// TODO: refactor to avoid duplication\nexport function isCustomPattern(tokenType: TokenType): boolean {\n const pattern = tokenType.PATTERN;\n /* istanbul ignore else */\n if (isRegExp(pattern)) {\n return false;\n } else if (isFunction(pattern)) {\n // CustomPatternMatcherFunc - custom patterns do not require any transformations, only wrapping in a RegExp Like object\n return true;\n } else if (has(pattern, \"exec\")) {\n // ICustomPattern\n return true;\n } else if (isString(pattern)) {\n return false;\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nexport function isShortPattern(pattern: any): number | false {\n if (isString(pattern) && pattern.length === 1) {\n return pattern.charCodeAt(0);\n } else {\n return false;\n }\n}\n\n/**\n * Faster than using a RegExp for default newline detection during lexing.\n */\nexport const LineTerminatorOptimizedTester: ILineTerminatorsTester = {\n // implements /\\n|\\r\\n?/g.test\n test: function (text) {\n const len = text.length;\n for (let i = this.lastIndex; i < len; i++) {\n const c = text.charCodeAt(i);\n if (c === 10) {\n this.lastIndex = i + 1;\n return true;\n } else if (c === 13) {\n if (text.charCodeAt(i + 1) === 10) {\n this.lastIndex = i + 2;\n } else {\n this.lastIndex = i + 1;\n }\n return true;\n }\n }\n return false;\n },\n\n lastIndex: 0,\n};\n\nfunction checkLineBreaksIssues(\n tokType: TokenType,\n lineTerminatorCharCodes: number[],\n):\n | {\n issue:\n | LexerDefinitionErrorType.IDENTIFY_TERMINATOR\n | LexerDefinitionErrorType.CUSTOM_LINE_BREAK;\n errMsg?: string;\n }\n | false {\n if (has(tokType, \"LINE_BREAKS\")) {\n // if the user explicitly declared the line_breaks option we will respect their choice\n // and assume it is correct.\n return false;\n } else {\n /* istanbul ignore else */\n if (isRegExp(tokType.PATTERN)) {\n try {\n // TODO: why is the casting suddenly needed?\n canMatchCharCode(lineTerminatorCharCodes, tokType.PATTERN as RegExp);\n } catch (e) {\n /* istanbul ignore next - to test this we would have to mock to throw an error */\n return {\n issue: LexerDefinitionErrorType.IDENTIFY_TERMINATOR,\n errMsg: (e as Error).message,\n };\n }\n return false;\n } else if (isString(tokType.PATTERN)) {\n // string literal patterns can always be analyzed to detect line terminator usage\n return false;\n } else if (isCustomPattern(tokType)) {\n // custom token types\n return { issue: LexerDefinitionErrorType.CUSTOM_LINE_BREAK };\n } else {\n throw Error(\"non exhaustive match\");\n }\n }\n}\n\nexport function buildLineBreakIssueMessage(\n tokType: TokenType,\n details: {\n issue:\n | LexerDefinitionErrorType.IDENTIFY_TERMINATOR\n | LexerDefinitionErrorType.CUSTOM_LINE_BREAK;\n errMsg?: string;\n },\n): string {\n /* istanbul ignore else */\n if (details.issue === LexerDefinitionErrorType.IDENTIFY_TERMINATOR) {\n return (\n \"Warning: unable to identify line terminator usage in pattern.\\n\" +\n `\\tThe problem is in the <${tokType.name}> Token Type\\n` +\n `\\t Root cause: ${details.errMsg}.\\n` +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR\"\n );\n } else if (details.issue === LexerDefinitionErrorType.CUSTOM_LINE_BREAK) {\n return (\n \"Warning: A Custom Token Pattern should specify the option.\\n\" +\n `\\tThe problem is in the <${tokType.name}> Token Type\\n` +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK\"\n );\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nfunction getCharCodes(charsOrCodes: (number | string)[]): number[] {\n const charCodes = map(charsOrCodes, (numOrString) => {\n if (isString(numOrString)) {\n return numOrString.charCodeAt(0);\n } else {\n return numOrString;\n }\n });\n\n return charCodes;\n}\n\nfunction addToMapOfArrays(\n map: Record,\n key: number,\n value: T,\n): void {\n if (map[key] === undefined) {\n map[key] = [value];\n } else {\n map[key].push(value);\n }\n}\n\nexport const minOptimizationVal = 256;\n\n/**\n * We are mapping charCode above ASCI (256) into buckets each in the size of 256.\n * This is because ASCI are the most common start chars so each one of those will get its own\n * possible token configs vector.\n *\n * Tokens starting with charCodes \"above\" ASCI are uncommon, so we can \"afford\"\n * to place these into buckets of possible token configs, What we gain from\n * this is avoiding the case of creating an optimization 'charCodeToPatternIdxToConfig'\n * which would contain 10,000+ arrays of small size (e.g unicode Identifiers scenario).\n * Our 'charCodeToPatternIdxToConfig' max size will now be:\n * 256 + (2^16 / 2^8) - 1 === 511\n *\n * note the hack for fast division integer part extraction\n * See: https://stackoverflow.com/a/4228528\n */\nlet charCodeToOptimizedIdxMap: number[] = [];\nexport function charCodeToOptimizedIndex(charCode: number): number {\n return charCode < minOptimizationVal\n ? charCode\n : charCodeToOptimizedIdxMap[charCode];\n}\n\n/**\n * This is a compromise between cold start / hot running performance\n * Creating this array takes ~3ms on a modern machine,\n * But if we perform the computation at runtime as needed the CSS Lexer benchmark\n * performance degrades by ~10%\n *\n * TODO: Perhaps it should be lazy initialized only if a charCode > 255 is used.\n */\nfunction initCharCodeToOptimizedIndexMap() {\n if (isEmpty(charCodeToOptimizedIdxMap)) {\n charCodeToOptimizedIdxMap = new Array(65536);\n for (let i = 0; i < 65536; i++) {\n charCodeToOptimizedIdxMap[i] = i > 255 ? 255 + ~~(i / 255) : i;\n }\n }\n}\n", "import {\n clone,\n compact,\n difference,\n flatten,\n forEach,\n has,\n includes,\n isArray,\n isEmpty,\n map,\n} from \"lodash-es\";\nimport { IToken, TokenType } from \"@chevrotain/types\";\n\nexport function tokenStructuredMatcher(\n tokInstance: IToken,\n tokConstructor: TokenType,\n) {\n const instanceType = tokInstance.tokenTypeIdx;\n if (instanceType === tokConstructor.tokenTypeIdx) {\n return true;\n } else {\n return (\n tokConstructor.isParent === true &&\n tokConstructor.categoryMatchesMap![instanceType] === true\n );\n }\n}\n\n// Optimized tokenMatcher in case our grammar does not use token categories\n// Being so tiny it is much more likely to be in-lined and this avoid the function call overhead\nexport function tokenStructuredMatcherNoCategories(\n token: IToken,\n tokType: TokenType,\n) {\n return token.tokenTypeIdx === tokType.tokenTypeIdx;\n}\n\nexport let tokenShortNameIdx = 1;\nexport const tokenIdxToClass: { [tokenIdx: number]: TokenType } = {};\n\nexport function augmentTokenTypes(tokenTypes: TokenType[]): void {\n // collect the parent Token Types as well.\n const tokenTypesAndParents = expandCategories(tokenTypes);\n\n // add required tokenType and categoryMatches properties\n assignTokenDefaultProps(tokenTypesAndParents);\n\n // fill up the categoryMatches\n assignCategoriesMapProp(tokenTypesAndParents);\n assignCategoriesTokensProp(tokenTypesAndParents);\n\n forEach(tokenTypesAndParents, (tokType) => {\n tokType.isParent = tokType.categoryMatches!.length > 0;\n });\n}\n\nexport function expandCategories(tokenTypes: TokenType[]): TokenType[] {\n let result = clone(tokenTypes);\n\n let categories = tokenTypes;\n let searching = true;\n while (searching) {\n categories = compact(\n flatten(map(categories, (currTokType) => currTokType.CATEGORIES)),\n );\n\n const newCategories = difference(categories, result);\n\n result = result.concat(newCategories);\n\n if (isEmpty(newCategories)) {\n searching = false;\n } else {\n categories = newCategories;\n }\n }\n return result;\n}\n\nexport function assignTokenDefaultProps(tokenTypes: TokenType[]): void {\n forEach(tokenTypes, (currTokType) => {\n if (!hasShortKeyProperty(currTokType)) {\n tokenIdxToClass[tokenShortNameIdx] = currTokType;\n (currTokType).tokenTypeIdx = tokenShortNameIdx++;\n }\n\n // CATEGORIES? : TokenType | TokenType[]\n if (\n hasCategoriesProperty(currTokType) &&\n !isArray(currTokType.CATEGORIES)\n // &&\n // !isUndefined(currTokType.CATEGORIES.PATTERN)\n ) {\n currTokType.CATEGORIES = [currTokType.CATEGORIES as unknown as TokenType];\n }\n\n if (!hasCategoriesProperty(currTokType)) {\n currTokType.CATEGORIES = [];\n }\n\n if (!hasExtendingTokensTypesProperty(currTokType)) {\n currTokType.categoryMatches = [];\n }\n\n if (!hasExtendingTokensTypesMapProperty(currTokType)) {\n currTokType.categoryMatchesMap = {};\n }\n });\n}\n\nexport function assignCategoriesTokensProp(tokenTypes: TokenType[]): void {\n forEach(tokenTypes, (currTokType) => {\n // avoid duplications\n currTokType.categoryMatches = [];\n forEach(currTokType.categoryMatchesMap!, (val, key) => {\n currTokType.categoryMatches!.push(\n tokenIdxToClass[key as unknown as number].tokenTypeIdx!,\n );\n });\n });\n}\n\nexport function assignCategoriesMapProp(tokenTypes: TokenType[]): void {\n forEach(tokenTypes, (currTokType) => {\n singleAssignCategoriesToksMap([], currTokType);\n });\n}\n\nexport function singleAssignCategoriesToksMap(\n path: TokenType[],\n nextNode: TokenType,\n): void {\n forEach(path, (pathNode) => {\n nextNode.categoryMatchesMap![pathNode.tokenTypeIdx!] = true;\n });\n\n forEach(nextNode.CATEGORIES, (nextCategory) => {\n const newPath = path.concat(nextNode);\n // avoids infinite loops due to cyclic categories.\n if (!includes(newPath, nextCategory)) {\n singleAssignCategoriesToksMap(newPath, nextCategory);\n }\n });\n}\n\nexport function hasShortKeyProperty(tokType: TokenType): boolean {\n return has(tokType, \"tokenTypeIdx\");\n}\n\nexport function hasCategoriesProperty(tokType: TokenType): boolean {\n return has(tokType, \"CATEGORIES\");\n}\n\nexport function hasExtendingTokensTypesProperty(tokType: TokenType): boolean {\n return has(tokType, \"categoryMatches\");\n}\n\nexport function hasExtendingTokensTypesMapProperty(\n tokType: TokenType,\n): boolean {\n return has(tokType, \"categoryMatchesMap\");\n}\n\nexport function isTokenType(tokType: TokenType): boolean {\n return has(tokType, \"tokenTypeIdx\");\n}\n", "import { ILexerErrorMessageProvider, IToken } from \"@chevrotain/types\";\n\nexport const defaultLexerErrorProvider: ILexerErrorMessageProvider = {\n buildUnableToPopLexerModeMessage(token: IToken): string {\n return `Unable to pop Lexer Mode after encountering Token ->${token.image}<- The Mode Stack is empty`;\n },\n\n buildUnexpectedCharactersMessage(\n fullText: string,\n startOffset: number,\n length: number,\n line?: number,\n column?: number,\n ): string {\n return (\n `unexpected character: ->${fullText.charAt(\n startOffset,\n )}<- at offset: ${startOffset},` + ` skipped ${length} characters.`\n );\n },\n};\n", "import {\n analyzeTokenTypes,\n charCodeToOptimizedIndex,\n cloneEmptyGroups,\n DEFAULT_MODE,\n IAnalyzeResult,\n IPatternConfig,\n LineTerminatorOptimizedTester,\n performRuntimeChecks,\n performWarningRuntimeChecks,\n SUPPORT_STICKY,\n validatePatterns,\n} from \"./lexer.js\";\nimport {\n assign,\n clone,\n forEach,\n identity,\n isArray,\n isEmpty,\n isUndefined,\n keys,\n last,\n map,\n noop,\n reduce,\n reject,\n} from \"lodash-es\";\nimport { PRINT_WARNING, timer, toFastProperties } from \"@chevrotain/utils\";\nimport { augmentTokenTypes } from \"./tokens.js\";\nimport {\n CustomPatternMatcherFunc,\n CustomPatternMatcherReturn,\n ILexerConfig,\n ILexerDefinitionError,\n ILexingError,\n IMultiModeLexerDefinition,\n IToken,\n TokenType,\n} from \"@chevrotain/types\";\nimport { defaultLexerErrorProvider } from \"./lexer_errors_public.js\";\nimport { clearRegExpParserCache } from \"./reg_exp_parser.js\";\n\nexport interface ILexingResult {\n tokens: IToken[];\n groups: { [groupName: string]: IToken[] };\n errors: ILexingError[];\n}\n\nexport enum LexerDefinitionErrorType {\n MISSING_PATTERN,\n INVALID_PATTERN,\n EOI_ANCHOR_FOUND,\n UNSUPPORTED_FLAGS_FOUND,\n DUPLICATE_PATTERNS_FOUND,\n INVALID_GROUP_TYPE_FOUND,\n PUSH_MODE_DOES_NOT_EXIST,\n MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE,\n MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY,\n MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST,\n LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED,\n SOI_ANCHOR_FOUND,\n EMPTY_MATCH_PATTERN,\n NO_LINE_BREAKS_FLAGS,\n UNREACHABLE_PATTERN,\n IDENTIFY_TERMINATOR,\n CUSTOM_LINE_BREAK,\n MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE,\n}\n\nexport interface IRegExpExec {\n exec: CustomPatternMatcherFunc;\n}\n\nconst DEFAULT_LEXER_CONFIG: Required = {\n deferDefinitionErrorsHandling: false,\n positionTracking: \"full\",\n lineTerminatorsPattern: /\\n|\\r\\n?/g,\n lineTerminatorCharacters: [\"\\n\", \"\\r\"],\n ensureOptimizations: false,\n safeMode: false,\n errorMessageProvider: defaultLexerErrorProvider,\n traceInitPerf: false,\n skipValidations: false,\n recoveryEnabled: true,\n};\n\nObject.freeze(DEFAULT_LEXER_CONFIG);\n\nexport class Lexer {\n public static SKIPPED =\n \"This marks a skipped Token pattern, this means each token identified by it will\" +\n \"be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.\";\n\n public static NA = /NOT_APPLICABLE/;\n public lexerDefinitionErrors: ILexerDefinitionError[] = [];\n public lexerDefinitionWarning: ILexerDefinitionError[] = [];\n\n protected patternIdxToConfig: Record = {};\n protected charCodeToPatternIdxToConfig: {\n [modeName: string]: { [charCode: number]: IPatternConfig[] };\n } = {};\n\n protected modes: string[] = [];\n protected defaultMode!: string;\n protected emptyGroups: { [groupName: string]: IToken } = {};\n\n private config: Required;\n private trackStartLines: boolean = true;\n private trackEndLines: boolean = true;\n private hasCustom: boolean = false;\n private canModeBeOptimized: Record = {};\n\n private traceInitPerf!: boolean | number;\n private traceInitMaxIdent!: number;\n private traceInitIndent: number;\n\n constructor(\n protected lexerDefinition: TokenType[] | IMultiModeLexerDefinition,\n config: ILexerConfig = DEFAULT_LEXER_CONFIG,\n ) {\n if (typeof config === \"boolean\") {\n throw Error(\n \"The second argument to the Lexer constructor is now an ILexerConfig Object.\\n\" +\n \"a boolean 2nd argument is no longer supported\",\n );\n }\n\n // todo: defaults func?\n this.config = assign({}, DEFAULT_LEXER_CONFIG, config) as any;\n\n const traceInitVal = this.config.traceInitPerf;\n if (traceInitVal === true) {\n this.traceInitMaxIdent = Infinity;\n this.traceInitPerf = true;\n } else if (typeof traceInitVal === \"number\") {\n this.traceInitMaxIdent = traceInitVal;\n this.traceInitPerf = true;\n }\n this.traceInitIndent = -1;\n\n this.TRACE_INIT(\"Lexer Constructor\", () => {\n let actualDefinition!: IMultiModeLexerDefinition;\n let hasOnlySingleMode = true;\n this.TRACE_INIT(\"Lexer Config handling\", () => {\n if (\n this.config.lineTerminatorsPattern ===\n DEFAULT_LEXER_CONFIG.lineTerminatorsPattern\n ) {\n // optimized built-in implementation for the defaults definition of lineTerminators\n this.config.lineTerminatorsPattern = LineTerminatorOptimizedTester;\n } else {\n if (\n this.config.lineTerminatorCharacters ===\n DEFAULT_LEXER_CONFIG.lineTerminatorCharacters\n ) {\n throw Error(\n \"Error: Missing property on the Lexer config.\\n\" +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS\",\n );\n }\n }\n\n if (config.safeMode && config.ensureOptimizations) {\n throw Error(\n '\"safeMode\" and \"ensureOptimizations\" flags are mutually exclusive.',\n );\n }\n\n this.trackStartLines = /full|onlyStart/i.test(\n this.config.positionTracking,\n );\n this.trackEndLines = /full/i.test(this.config.positionTracking);\n\n // Convert SingleModeLexerDefinition into a IMultiModeLexerDefinition.\n if (isArray(lexerDefinition)) {\n actualDefinition = {\n modes: { defaultMode: clone(lexerDefinition) },\n defaultMode: DEFAULT_MODE,\n };\n } else {\n // no conversion needed, input should already be a IMultiModeLexerDefinition\n hasOnlySingleMode = false;\n actualDefinition = clone(lexerDefinition);\n }\n });\n\n if (this.config.skipValidations === false) {\n this.TRACE_INIT(\"performRuntimeChecks\", () => {\n this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(\n performRuntimeChecks(\n actualDefinition,\n this.trackStartLines,\n this.config.lineTerminatorCharacters,\n ),\n );\n });\n\n this.TRACE_INIT(\"performWarningRuntimeChecks\", () => {\n this.lexerDefinitionWarning = this.lexerDefinitionWarning.concat(\n performWarningRuntimeChecks(\n actualDefinition,\n this.trackStartLines,\n this.config.lineTerminatorCharacters,\n ),\n );\n });\n }\n\n // for extra robustness to avoid throwing an none informative error message\n actualDefinition.modes = actualDefinition.modes\n ? actualDefinition.modes\n : {};\n\n // an error of undefined TokenTypes will be detected in \"performRuntimeChecks\" above.\n // this transformation is to increase robustness in the case of partially invalid lexer definition.\n forEach(actualDefinition.modes, (currModeValue, currModeName) => {\n actualDefinition.modes[currModeName] = reject(\n currModeValue,\n (currTokType) => isUndefined(currTokType),\n );\n });\n\n const allModeNames = keys(actualDefinition.modes);\n\n forEach(\n actualDefinition.modes,\n (currModDef: TokenType[], currModName) => {\n this.TRACE_INIT(`Mode: <${currModName}> processing`, () => {\n this.modes.push(currModName);\n\n if (this.config.skipValidations === false) {\n this.TRACE_INIT(`validatePatterns`, () => {\n this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(\n validatePatterns(currModDef, allModeNames),\n );\n });\n }\n\n // If definition errors were encountered, the analysis phase may fail unexpectedly/\n // Considering a lexer with definition errors may never be used, there is no point\n // to performing the analysis anyhow...\n if (isEmpty(this.lexerDefinitionErrors)) {\n augmentTokenTypes(currModDef);\n\n let currAnalyzeResult!: IAnalyzeResult;\n this.TRACE_INIT(`analyzeTokenTypes`, () => {\n currAnalyzeResult = analyzeTokenTypes(currModDef, {\n lineTerminatorCharacters:\n this.config.lineTerminatorCharacters,\n positionTracking: config.positionTracking,\n ensureOptimizations: config.ensureOptimizations,\n safeMode: config.safeMode,\n tracer: this.TRACE_INIT,\n });\n });\n\n this.patternIdxToConfig[currModName] =\n currAnalyzeResult.patternIdxToConfig;\n\n this.charCodeToPatternIdxToConfig[currModName] =\n currAnalyzeResult.charCodeToPatternIdxToConfig;\n\n this.emptyGroups = assign(\n {},\n this.emptyGroups,\n currAnalyzeResult.emptyGroups,\n ) as any;\n\n this.hasCustom = currAnalyzeResult.hasCustom || this.hasCustom;\n\n this.canModeBeOptimized[currModName] =\n currAnalyzeResult.canBeOptimized;\n }\n });\n },\n );\n\n this.defaultMode = actualDefinition.defaultMode;\n\n if (\n !isEmpty(this.lexerDefinitionErrors) &&\n !this.config.deferDefinitionErrorsHandling\n ) {\n const allErrMessages = map(this.lexerDefinitionErrors, (error) => {\n return error.message;\n });\n const allErrMessagesString = allErrMessages.join(\n \"-----------------------\\n\",\n );\n throw new Error(\n \"Errors detected in definition of Lexer:\\n\" + allErrMessagesString,\n );\n }\n\n // Only print warning if there are no errors, This will avoid pl\n forEach(this.lexerDefinitionWarning, (warningDescriptor) => {\n PRINT_WARNING(warningDescriptor.message);\n });\n\n this.TRACE_INIT(\"Choosing sub-methods implementations\", () => {\n // Choose the relevant internal implementations for this specific parser.\n // These implementations should be in-lined by the JavaScript engine\n // to provide optimal performance in each scenario.\n if (SUPPORT_STICKY) {\n this.chopInput = identity;\n this.match = this.matchWithTest;\n } else {\n this.updateLastIndex = noop;\n this.match = this.matchWithExec;\n }\n\n if (hasOnlySingleMode) {\n this.handleModes = noop;\n }\n\n if (this.trackStartLines === false) {\n this.computeNewColumn = identity;\n }\n\n if (this.trackEndLines === false) {\n this.updateTokenEndLineColumnLocation = noop;\n }\n\n if (/full/i.test(this.config.positionTracking)) {\n this.createTokenInstance = this.createFullToken;\n } else if (/onlyStart/i.test(this.config.positionTracking)) {\n this.createTokenInstance = this.createStartOnlyToken;\n } else if (/onlyOffset/i.test(this.config.positionTracking)) {\n this.createTokenInstance = this.createOffsetOnlyToken;\n } else {\n throw Error(\n `Invalid config option: \"${this.config.positionTracking}\"`,\n );\n }\n\n if (this.hasCustom) {\n this.addToken = this.addTokenUsingPush;\n this.handlePayload = this.handlePayloadWithCustom;\n } else {\n this.addToken = this.addTokenUsingMemberAccess;\n this.handlePayload = this.handlePayloadNoCustom;\n }\n });\n\n this.TRACE_INIT(\"Failed Optimization Warnings\", () => {\n const unOptimizedModes = reduce(\n this.canModeBeOptimized,\n (cannotBeOptimized, canBeOptimized, modeName) => {\n if (canBeOptimized === false) {\n cannotBeOptimized.push(modeName);\n }\n return cannotBeOptimized;\n },\n [] as string[],\n );\n\n if (config.ensureOptimizations && !isEmpty(unOptimizedModes)) {\n throw Error(\n `Lexer Modes: < ${unOptimizedModes.join(\n \", \",\n )} > cannot be optimized.\\n` +\n '\\t Disable the \"ensureOptimizations\" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\\n' +\n \"\\t Or inspect the console log for details on how to resolve these issues.\",\n );\n }\n });\n\n this.TRACE_INIT(\"clearRegExpParserCache\", () => {\n clearRegExpParserCache();\n });\n\n this.TRACE_INIT(\"toFastProperties\", () => {\n toFastProperties(this);\n });\n });\n }\n\n public tokenize(\n text: string,\n initialMode: string = this.defaultMode,\n ): ILexingResult {\n if (!isEmpty(this.lexerDefinitionErrors)) {\n const allErrMessages = map(this.lexerDefinitionErrors, (error) => {\n return error.message;\n });\n const allErrMessagesString = allErrMessages.join(\n \"-----------------------\\n\",\n );\n throw new Error(\n \"Unable to Tokenize because Errors detected in definition of Lexer:\\n\" +\n allErrMessagesString,\n );\n }\n\n return this.tokenizeInternal(text, initialMode);\n }\n\n // There is quite a bit of duplication between this and \"tokenizeInternalLazy\"\n // This is intentional due to performance considerations.\n // this method also used quite a bit of `!` none null assertions because it is too optimized\n // for `tsc` to always understand it is \"safe\"\n private tokenizeInternal(text: string, initialMode: string): ILexingResult {\n let i,\n j,\n k,\n matchAltImage,\n longerAlt,\n matchedImage: string | null,\n payload,\n altPayload,\n imageLength,\n group,\n tokType,\n newToken: IToken,\n errLength,\n droppedChar,\n msg,\n match;\n const orgText = text;\n const orgLength = orgText.length;\n let offset = 0;\n let matchedTokensIndex = 0;\n // initializing the tokensArray to the \"guessed\" size.\n // guessing too little will still reduce the number of array re-sizes on pushes.\n // guessing too large (Tested by guessing x4 too large) may cost a bit more of memory\n // but would still have a faster runtime by avoiding (All but one) array resizing.\n const guessedNumberOfTokens = this.hasCustom\n ? 0 // will break custom token pattern APIs the matchedTokens array will contain undefined elements.\n : Math.floor(text.length / 10);\n const matchedTokens = new Array(guessedNumberOfTokens);\n const errors: ILexingError[] = [];\n let line = this.trackStartLines ? 1 : undefined;\n let column = this.trackStartLines ? 1 : undefined;\n const groups: any = cloneEmptyGroups(this.emptyGroups);\n const trackLines = this.trackStartLines;\n const lineTerminatorPattern = this.config.lineTerminatorsPattern;\n\n let currModePatternsLength = 0;\n let patternIdxToConfig: IPatternConfig[] = [];\n let currCharCodeToPatternIdxToConfig: {\n [charCode: number]: IPatternConfig[];\n } = [];\n\n const modeStack: string[] = [];\n\n const emptyArray: IPatternConfig[] = [];\n Object.freeze(emptyArray);\n let getPossiblePatterns!: (charCode: number) => IPatternConfig[];\n\n function getPossiblePatternsSlow() {\n return patternIdxToConfig;\n }\n\n function getPossiblePatternsOptimized(charCode: number): IPatternConfig[] {\n const optimizedCharIdx = charCodeToOptimizedIndex(charCode);\n const possiblePatterns =\n currCharCodeToPatternIdxToConfig[optimizedCharIdx];\n if (possiblePatterns === undefined) {\n return emptyArray;\n } else {\n return possiblePatterns;\n }\n }\n\n const pop_mode = (popToken: IToken) => {\n // TODO: perhaps avoid this error in the edge case there is no more input?\n if (\n modeStack.length === 1 &&\n // if we have both a POP_MODE and a PUSH_MODE this is in-fact a \"transition\"\n // So no error should occur.\n popToken.tokenType.PUSH_MODE === undefined\n ) {\n // if we try to pop the last mode there lexer will no longer have ANY mode.\n // thus the pop is ignored, an error will be created and the lexer will continue parsing in the previous mode.\n const msg =\n this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(\n popToken,\n );\n\n errors.push({\n offset: popToken.startOffset,\n line: popToken.startLine,\n column: popToken.startColumn,\n length: popToken.image.length,\n message: msg,\n });\n } else {\n modeStack.pop();\n const newMode = last(modeStack)!;\n patternIdxToConfig = this.patternIdxToConfig[newMode];\n currCharCodeToPatternIdxToConfig =\n this.charCodeToPatternIdxToConfig[newMode];\n currModePatternsLength = patternIdxToConfig.length;\n const modeCanBeOptimized =\n this.canModeBeOptimized[newMode] && this.config.safeMode === false;\n\n if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) {\n getPossiblePatterns = getPossiblePatternsOptimized;\n } else {\n getPossiblePatterns = getPossiblePatternsSlow;\n }\n }\n };\n\n function push_mode(this: Lexer, newMode: string) {\n modeStack.push(newMode);\n currCharCodeToPatternIdxToConfig =\n this.charCodeToPatternIdxToConfig[newMode];\n\n patternIdxToConfig = this.patternIdxToConfig[newMode];\n currModePatternsLength = patternIdxToConfig.length;\n\n currModePatternsLength = patternIdxToConfig.length;\n const modeCanBeOptimized =\n this.canModeBeOptimized[newMode] && this.config.safeMode === false;\n\n if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) {\n getPossiblePatterns = getPossiblePatternsOptimized;\n } else {\n getPossiblePatterns = getPossiblePatternsSlow;\n }\n }\n\n // this pattern seems to avoid a V8 de-optimization, although that de-optimization does not\n // seem to matter performance wise.\n push_mode.call(this, initialMode);\n\n let currConfig!: IPatternConfig;\n\n const recoveryEnabled = this.config.recoveryEnabled;\n\n while (offset < orgLength) {\n matchedImage = null;\n\n const nextCharCode = orgText.charCodeAt(offset);\n const chosenPatternIdxToConfig = getPossiblePatterns(nextCharCode);\n const chosenPatternsLength = chosenPatternIdxToConfig.length;\n\n for (i = 0; i < chosenPatternsLength; i++) {\n currConfig = chosenPatternIdxToConfig[i];\n const currPattern = currConfig.pattern;\n payload = null;\n\n // manually in-lined because > 600 chars won't be in-lined in V8\n const singleCharCode = currConfig.short;\n if (singleCharCode !== false) {\n if (nextCharCode === singleCharCode) {\n // single character string\n matchedImage = currPattern as string;\n }\n } else if (currConfig.isCustom === true) {\n match = (currPattern as IRegExpExec).exec(\n orgText,\n offset,\n matchedTokens,\n groups,\n );\n if (match !== null) {\n matchedImage = match[0];\n if ((match as CustomPatternMatcherReturn).payload !== undefined) {\n payload = (match as CustomPatternMatcherReturn).payload;\n }\n } else {\n matchedImage = null;\n }\n } else {\n this.updateLastIndex(currPattern as RegExp, offset);\n matchedImage = this.match(currPattern as RegExp, text, offset);\n }\n\n if (matchedImage !== null) {\n // even though this pattern matched we must try a another longer alternative.\n // this can be used to prioritize keywords over identifiers\n longerAlt = currConfig.longerAlt;\n if (longerAlt !== undefined) {\n // TODO: micro optimize, avoid extra prop access\n // by saving/linking longerAlt on the original config?\n const longerAltLength = longerAlt.length;\n for (k = 0; k < longerAltLength; k++) {\n const longerAltConfig = patternIdxToConfig[longerAlt[k]];\n const longerAltPattern = longerAltConfig.pattern;\n altPayload = null;\n\n // single Char can never be a longer alt so no need to test it.\n // manually in-lined because > 600 chars won't be in-lined in V8\n if (longerAltConfig.isCustom === true) {\n match = (longerAltPattern as IRegExpExec).exec(\n orgText,\n offset,\n matchedTokens,\n groups,\n );\n if (match !== null) {\n matchAltImage = match[0];\n if (\n (match as CustomPatternMatcherReturn).payload !== undefined\n ) {\n altPayload = (match as CustomPatternMatcherReturn).payload;\n }\n } else {\n matchAltImage = null;\n }\n } else {\n this.updateLastIndex(longerAltPattern as RegExp, offset);\n matchAltImage = this.match(\n longerAltPattern as RegExp,\n text,\n offset,\n );\n }\n\n if (matchAltImage && matchAltImage.length > matchedImage.length) {\n matchedImage = matchAltImage;\n payload = altPayload;\n currConfig = longerAltConfig;\n // Exit the loop early after matching one of the longer alternatives\n // The first matched alternative takes precedence\n break;\n }\n }\n }\n break;\n }\n }\n\n // successful match\n if (matchedImage !== null) {\n imageLength = matchedImage.length;\n group = currConfig.group;\n if (group !== undefined) {\n tokType = currConfig.tokenTypeIdx;\n // TODO: \"offset + imageLength\" and the new column may be computed twice in case of \"full\" location information inside\n // createFullToken method\n newToken = this.createTokenInstance(\n matchedImage,\n offset,\n tokType,\n currConfig.tokenType,\n line,\n column,\n imageLength,\n );\n\n this.handlePayload(newToken, payload);\n\n // TODO: optimize NOOP in case there are no special groups?\n if (group === false) {\n matchedTokensIndex = this.addToken(\n matchedTokens,\n matchedTokensIndex,\n newToken,\n );\n } else {\n groups[group].push(newToken);\n }\n }\n text = this.chopInput(text, imageLength);\n offset = offset + imageLength;\n\n // TODO: with newlines the column may be assigned twice\n column = this.computeNewColumn(column!, imageLength);\n\n if (trackLines === true && currConfig.canLineTerminator === true) {\n let numOfLTsInMatch = 0;\n let foundTerminator;\n let lastLTEndOffset: number;\n lineTerminatorPattern.lastIndex = 0;\n do {\n foundTerminator = lineTerminatorPattern.test(matchedImage);\n if (foundTerminator === true) {\n lastLTEndOffset = lineTerminatorPattern.lastIndex - 1;\n numOfLTsInMatch++;\n }\n } while (foundTerminator === true);\n\n if (numOfLTsInMatch !== 0) {\n line = line! + numOfLTsInMatch;\n column = imageLength - lastLTEndOffset!;\n this.updateTokenEndLineColumnLocation(\n newToken!,\n group!,\n lastLTEndOffset!,\n numOfLTsInMatch,\n line,\n column,\n imageLength,\n );\n }\n }\n // will be NOOP if no modes present\n this.handleModes(currConfig, pop_mode, push_mode, newToken!);\n } else {\n // error recovery, drop characters until we identify a valid token's start point\n const errorStartOffset = offset;\n const errorLine = line;\n const errorColumn = column;\n let foundResyncPoint = recoveryEnabled === false;\n\n while (foundResyncPoint === false && offset < orgLength) {\n // Identity Func (when sticky flag is enabled)\n text = this.chopInput(text, 1);\n offset++;\n for (j = 0; j < currModePatternsLength; j++) {\n const currConfig = patternIdxToConfig[j];\n const currPattern = currConfig.pattern;\n\n // manually in-lined because > 600 chars won't be in-lined in V8\n const singleCharCode = currConfig.short;\n if (singleCharCode !== false) {\n if (orgText.charCodeAt(offset) === singleCharCode) {\n // single character string\n foundResyncPoint = true;\n }\n } else if (currConfig.isCustom === true) {\n foundResyncPoint =\n (currPattern as IRegExpExec).exec(\n orgText,\n offset,\n matchedTokens,\n groups,\n ) !== null;\n } else {\n this.updateLastIndex(currPattern as RegExp, offset);\n foundResyncPoint = (currPattern as RegExp).exec(text) !== null;\n }\n\n if (foundResyncPoint === true) {\n break;\n }\n }\n }\n\n errLength = offset - errorStartOffset;\n column = this.computeNewColumn(column!, errLength);\n // at this point we either re-synced or reached the end of the input text\n msg = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(\n orgText,\n errorStartOffset,\n errLength,\n errorLine,\n errorColumn,\n );\n errors.push({\n offset: errorStartOffset,\n line: errorLine,\n column: errorColumn,\n length: errLength,\n message: msg,\n });\n\n if (recoveryEnabled === false) {\n break;\n }\n }\n }\n\n // if we do have custom patterns which push directly into the\n // TODO: custom tokens should not push directly??\n if (!this.hasCustom) {\n // if we guessed a too large size for the tokens array this will shrink it to the right size.\n matchedTokens.length = matchedTokensIndex;\n }\n\n return {\n tokens: matchedTokens,\n groups: groups,\n errors: errors,\n };\n }\n\n private handleModes(\n config: IPatternConfig,\n pop_mode: (tok: IToken) => void,\n push_mode: (this: Lexer, pushMode: string) => void,\n newToken: IToken,\n ) {\n if (config.pop === true) {\n // need to save the PUSH_MODE property as if the mode is popped\n // patternIdxToPopMode is updated to reflect the new mode after popping the stack\n const pushMode = config.push;\n pop_mode(newToken);\n if (pushMode !== undefined) {\n push_mode.call(this, pushMode);\n }\n } else if (config.push !== undefined) {\n push_mode.call(this, config.push);\n }\n }\n\n private chopInput(text: string, length: number): string {\n return text.substring(length);\n }\n\n private updateLastIndex(regExp: RegExp, newLastIndex: number): void {\n regExp.lastIndex = newLastIndex;\n }\n\n // TODO: decrease this under 600 characters? inspect stripping comments option in TSC compiler\n private updateTokenEndLineColumnLocation(\n newToken: IToken,\n group: string | false,\n lastLTIdx: number,\n numOfLTsInMatch: number,\n line: number,\n column: number,\n imageLength: number,\n ): void {\n let lastCharIsLT, fixForEndingInLT;\n if (group !== undefined) {\n // a none skipped multi line Token, need to update endLine/endColumn\n lastCharIsLT = lastLTIdx === imageLength - 1;\n fixForEndingInLT = lastCharIsLT ? -1 : 0;\n if (!(numOfLTsInMatch === 1 && lastCharIsLT === true)) {\n // if a token ends in a LT that last LT only affects the line numbering of following Tokens\n newToken.endLine = line + fixForEndingInLT;\n // the last LT in a token does not affect the endColumn either as the [columnStart ... columnEnd)\n // inclusive to exclusive range.\n newToken.endColumn = column - 1 + -fixForEndingInLT;\n }\n // else single LT in the last character of a token, no need to modify the endLine/EndColumn\n }\n }\n\n private computeNewColumn(oldColumn: number, imageLength: number) {\n return oldColumn + imageLength;\n }\n\n // Place holder, will be replaced by the correct variant according to the locationTracking option at runtime.\n /* istanbul ignore next - place holder */\n private createTokenInstance!: (...args: any[]) => IToken;\n\n private createOffsetOnlyToken(\n image: string,\n startOffset: number,\n tokenTypeIdx: number,\n tokenType: TokenType,\n ) {\n return {\n image,\n startOffset,\n tokenTypeIdx,\n tokenType,\n };\n }\n\n private createStartOnlyToken(\n image: string,\n startOffset: number,\n tokenTypeIdx: number,\n tokenType: TokenType,\n startLine: number,\n startColumn: number,\n ) {\n return {\n image,\n startOffset,\n startLine,\n startColumn,\n tokenTypeIdx,\n tokenType,\n };\n }\n\n private createFullToken(\n image: string,\n startOffset: number,\n tokenTypeIdx: number,\n tokenType: TokenType,\n startLine: number,\n startColumn: number,\n imageLength: number,\n ): IToken {\n return {\n image,\n startOffset,\n endOffset: startOffset + imageLength - 1,\n startLine,\n endLine: startLine,\n startColumn,\n endColumn: startColumn + imageLength - 1,\n tokenTypeIdx,\n tokenType,\n };\n }\n\n // Place holder, will be replaced by the correct variant according to the locationTracking option at runtime.\n /* istanbul ignore next - place holder */\n private addToken!: (\n tokenVector: IToken[],\n index: number,\n tokenToAdd: IToken,\n ) => number;\n\n private addTokenUsingPush(\n tokenVector: IToken[],\n index: number,\n tokenToAdd: IToken,\n ): number {\n tokenVector.push(tokenToAdd);\n return index;\n }\n\n private addTokenUsingMemberAccess(\n tokenVector: IToken[],\n index: number,\n tokenToAdd: IToken,\n ): number {\n tokenVector[index] = tokenToAdd;\n index++;\n return index;\n }\n\n // Place holder, will be replaced by the correct variant according to the hasCustom flag option at runtime.\n private handlePayload: (token: IToken, payload: any) => void;\n\n private handlePayloadNoCustom(token: IToken, payload: any): void {}\n\n private handlePayloadWithCustom(token: IToken, payload: any): void {\n if (payload !== null) {\n token.payload = payload;\n }\n }\n\n // place holder to be replaced with chosen alternative at runtime\n private match!: (\n pattern: RegExp,\n text: string,\n offset: number,\n ) => string | null;\n\n private matchWithTest(\n pattern: RegExp,\n text: string,\n offset: number,\n ): string | null {\n const found = pattern.test(text);\n if (found === true) {\n return text.substring(offset, pattern.lastIndex);\n }\n return null;\n }\n\n private matchWithExec(pattern: RegExp, text: string): string | null {\n const regExpArray = pattern.exec(text);\n return regExpArray !== null ? regExpArray[0] : null;\n }\n\n // Duplicated from the parser's perf trace trait to allow future extraction\n // of the lexer to a separate package.\n TRACE_INIT = (phaseDesc: string, phaseImpl: () => T): T => {\n // No need to optimize this using NOOP pattern because\n // It is not called in a hot spot...\n if (this.traceInitPerf === true) {\n this.traceInitIndent++;\n const indent = new Array(this.traceInitIndent + 1).join(\"\\t\");\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n console.log(`${indent}--> <${phaseDesc}>`);\n }\n const { time, value } = timer(phaseImpl);\n /* istanbul ignore next - Difficult to reproduce specific performance behavior (>10ms) in tests */\n const traceMethod = time > 10 ? console.warn : console.log;\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n traceMethod(`${indent}<-- <${phaseDesc}> time: ${time}ms`);\n }\n this.traceInitIndent--;\n return value;\n } else {\n return phaseImpl();\n }\n };\n}\n", "import { has, isString, isUndefined } from \"lodash-es\";\nimport { Lexer } from \"./lexer_public.js\";\nimport { augmentTokenTypes, tokenStructuredMatcher } from \"./tokens.js\";\nimport { IToken, ITokenConfig, TokenType } from \"@chevrotain/types\";\n\nexport function tokenLabel(tokType: TokenType): string {\n if (hasTokenLabel(tokType)) {\n return tokType.LABEL;\n } else {\n return tokType.name;\n }\n}\n\nexport function tokenName(tokType: TokenType): string {\n return tokType.name;\n}\n\nexport function hasTokenLabel(\n obj: TokenType,\n): obj is TokenType & Pick, \"LABEL\"> {\n return isString(obj.LABEL) && obj.LABEL !== \"\";\n}\n\nconst PARENT = \"parent\";\nconst CATEGORIES = \"categories\";\nconst LABEL = \"label\";\nconst GROUP = \"group\";\nconst PUSH_MODE = \"push_mode\";\nconst POP_MODE = \"pop_mode\";\nconst LONGER_ALT = \"longer_alt\";\nconst LINE_BREAKS = \"line_breaks\";\nconst START_CHARS_HINT = \"start_chars_hint\";\n\nexport function createToken(config: ITokenConfig): TokenType {\n return createTokenInternal(config);\n}\n\nfunction createTokenInternal(config: ITokenConfig): TokenType {\n const pattern = config.pattern;\n\n const tokenType: TokenType = {};\n tokenType.name = config.name;\n\n if (!isUndefined(pattern)) {\n tokenType.PATTERN = pattern;\n }\n\n if (has(config, PARENT)) {\n throw (\n \"The parent property is no longer supported.\\n\" +\n \"See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.\"\n );\n }\n\n if (has(config, CATEGORIES)) {\n // casting to ANY as this will be fixed inside `augmentTokenTypes``\n tokenType.CATEGORIES = config[CATEGORIES];\n }\n\n augmentTokenTypes([tokenType]);\n\n if (has(config, LABEL)) {\n tokenType.LABEL = config[LABEL];\n }\n\n if (has(config, GROUP)) {\n tokenType.GROUP = config[GROUP];\n }\n\n if (has(config, POP_MODE)) {\n tokenType.POP_MODE = config[POP_MODE];\n }\n\n if (has(config, PUSH_MODE)) {\n tokenType.PUSH_MODE = config[PUSH_MODE];\n }\n\n if (has(config, LONGER_ALT)) {\n tokenType.LONGER_ALT = config[LONGER_ALT];\n }\n\n if (has(config, LINE_BREAKS)) {\n tokenType.LINE_BREAKS = config[LINE_BREAKS];\n }\n\n if (has(config, START_CHARS_HINT)) {\n tokenType.START_CHARS_HINT = config[START_CHARS_HINT];\n }\n\n return tokenType;\n}\n\nexport const EOF = createToken({ name: \"EOF\", pattern: Lexer.NA });\naugmentTokenTypes([EOF]);\n\nexport function createTokenInstance(\n tokType: TokenType,\n image: string,\n startOffset: number,\n endOffset: number,\n startLine: number,\n endLine: number,\n startColumn: number,\n endColumn: number,\n): IToken {\n return {\n image,\n startOffset,\n endOffset,\n startLine,\n endLine,\n startColumn,\n endColumn,\n tokenTypeIdx: (tokType).tokenTypeIdx,\n tokenType: tokType,\n };\n}\n\nexport function tokenMatcher(token: IToken, tokType: TokenType): boolean {\n return tokenStructuredMatcher(token, tokType);\n}\n", "import { hasTokenLabel, tokenLabel } from \"../scan/tokens_public.js\";\nimport { first, map, reduce } from \"lodash-es\";\nimport {\n Alternation,\n getProductionDslName,\n NonTerminal,\n Rule,\n Terminal,\n} from \"@chevrotain/gast\";\nimport {\n IParserErrorMessageProvider,\n IProductionWithOccurrence,\n TokenType,\n} from \"@chevrotain/types\";\nimport {\n IGrammarResolverErrorMessageProvider,\n IGrammarValidatorErrorMessageProvider,\n} from \"./grammar/types.js\";\n\nexport const defaultParserErrorProvider: IParserErrorMessageProvider = {\n buildMismatchTokenMessage({ expected, actual, previous, ruleName }): string {\n const hasLabel = hasTokenLabel(expected);\n const expectedMsg = hasLabel\n ? `--> ${tokenLabel(expected)} <--`\n : `token of type --> ${expected.name} <--`;\n\n const msg = `Expecting ${expectedMsg} but found --> '${actual.image}' <--`;\n\n return msg;\n },\n\n buildNotAllInputParsedMessage({ firstRedundant, ruleName }): string {\n return \"Redundant input, expecting EOF but found: \" + firstRedundant.image;\n },\n\n buildNoViableAltMessage({\n expectedPathsPerAlt,\n actual,\n previous,\n customUserDescription,\n ruleName,\n }): string {\n const errPrefix = \"Expecting: \";\n // TODO: issue: No Viable Alternative Error may have incomplete details. #502\n const actualText = first(actual)!.image;\n const errSuffix = \"\\nbut found: '\" + actualText + \"'\";\n\n if (customUserDescription) {\n return errPrefix + customUserDescription + errSuffix;\n } else {\n const allLookAheadPaths = reduce(\n expectedPathsPerAlt,\n (result, currAltPaths) => result.concat(currAltPaths),\n [] as TokenType[][],\n );\n const nextValidTokenSequences = map(\n allLookAheadPaths,\n (currPath) =>\n `[${map(currPath, (currTokenType) => tokenLabel(currTokenType)).join(\n \", \",\n )}]`,\n );\n const nextValidSequenceItems = map(\n nextValidTokenSequences,\n (itemMsg, idx) => ` ${idx + 1}. ${itemMsg}`,\n );\n const calculatedDescription = `one of these possible Token sequences:\\n${nextValidSequenceItems.join(\n \"\\n\",\n )}`;\n\n return errPrefix + calculatedDescription + errSuffix;\n }\n },\n\n buildEarlyExitMessage({\n expectedIterationPaths,\n actual,\n customUserDescription,\n ruleName,\n }): string {\n const errPrefix = \"Expecting: \";\n // TODO: issue: No Viable Alternative Error may have incomplete details. #502\n const actualText = first(actual)!.image;\n const errSuffix = \"\\nbut found: '\" + actualText + \"'\";\n\n if (customUserDescription) {\n return errPrefix + customUserDescription + errSuffix;\n } else {\n const nextValidTokenSequences = map(\n expectedIterationPaths,\n (currPath) =>\n `[${map(currPath, (currTokenType) => tokenLabel(currTokenType)).join(\n \",\",\n )}]`,\n );\n const calculatedDescription =\n `expecting at least one iteration which starts with one of these possible Token sequences::\\n ` +\n `<${nextValidTokenSequences.join(\" ,\")}>`;\n\n return errPrefix + calculatedDescription + errSuffix;\n }\n },\n};\n\nObject.freeze(defaultParserErrorProvider);\n\nexport const defaultGrammarResolverErrorProvider: IGrammarResolverErrorMessageProvider =\n {\n buildRuleNotFoundError(\n topLevelRule: Rule,\n undefinedRule: NonTerminal,\n ): string {\n const msg =\n \"Invalid grammar, reference to a rule which is not defined: ->\" +\n undefinedRule.nonTerminalName +\n \"<-\\n\" +\n \"inside top level rule: ->\" +\n topLevelRule.name +\n \"<-\";\n return msg;\n },\n };\n\nexport const defaultGrammarValidatorErrorProvider: IGrammarValidatorErrorMessageProvider =\n {\n buildDuplicateFoundError(\n topLevelRule: Rule,\n duplicateProds: IProductionWithOccurrence[],\n ): string {\n function getExtraProductionArgument(\n prod: IProductionWithOccurrence,\n ): string {\n if (prod instanceof Terminal) {\n return prod.terminalType.name;\n } else if (prod instanceof NonTerminal) {\n return prod.nonTerminalName;\n } else {\n return \"\";\n }\n }\n\n const topLevelName = topLevelRule.name;\n const duplicateProd = first(duplicateProds)!;\n const index = duplicateProd.idx;\n const dslName = getProductionDslName(duplicateProd);\n const extraArgument = getExtraProductionArgument(duplicateProd);\n\n const hasExplicitIndex = index > 0;\n let msg = `->${dslName}${hasExplicitIndex ? index : \"\"}<- ${\n extraArgument ? `with argument: ->${extraArgument}<-` : \"\"\n }\n appears more than once (${\n duplicateProds.length\n } times) in the top level rule: ->${topLevelName}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;\n\n // white space trimming time! better to trim afterwards as it allows to use WELL formatted multi line template strings...\n msg = msg.replace(/[ \\t]+/g, \" \");\n msg = msg.replace(/\\s\\s+/g, \"\\n\");\n\n return msg;\n },\n\n buildNamespaceConflictError(rule: Rule): string {\n const errMsg =\n `Namespace conflict found in grammar.\\n` +\n `The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${rule.name}>.\\n` +\n `To resolve this make sure each Terminal and Non-Terminal names are unique\\n` +\n `This is easy to accomplish by using the convention that Terminal names start with an uppercase letter\\n` +\n `and Non-Terminal names start with a lower case letter.`;\n\n return errMsg;\n },\n\n buildAlternationPrefixAmbiguityError(options: {\n topLevelRule: Rule;\n prefixPath: TokenType[];\n ambiguityIndices: number[];\n alternation: Alternation;\n }): string {\n const pathMsg = map(options.prefixPath, (currTok) =>\n tokenLabel(currTok),\n ).join(\", \");\n const occurrence =\n options.alternation.idx === 0 ? \"\" : options.alternation.idx;\n const errMsg =\n `Ambiguous alternatives: <${options.ambiguityIndices.join(\n \" ,\",\n )}> due to common lookahead prefix\\n` +\n `in inside <${options.topLevelRule.name}> Rule,\\n` +\n `<${pathMsg}> may appears as a prefix path in all these alternatives.\\n` +\n `See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\\n` +\n `For Further details.`;\n\n return errMsg;\n },\n\n buildAlternationAmbiguityError(options: {\n topLevelRule: Rule;\n prefixPath: TokenType[];\n ambiguityIndices: number[];\n alternation: Alternation;\n }): string {\n const pathMsg = map(options.prefixPath, (currtok) =>\n tokenLabel(currtok),\n ).join(\", \");\n const occurrence =\n options.alternation.idx === 0 ? \"\" : options.alternation.idx;\n let currMessage =\n `Ambiguous Alternatives Detected: <${options.ambiguityIndices.join(\n \" ,\",\n )}> in ` +\n ` inside <${options.topLevelRule.name}> Rule,\\n` +\n `<${pathMsg}> may appears as a prefix path in all these alternatives.\\n`;\n\n currMessage =\n currMessage +\n `See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\\n` +\n `For Further details.`;\n return currMessage;\n },\n\n buildEmptyRepetitionError(options: {\n topLevelRule: Rule;\n repetition: IProductionWithOccurrence;\n }): string {\n let dslName = getProductionDslName(options.repetition);\n if (options.repetition.idx !== 0) {\n dslName += options.repetition.idx;\n }\n\n const errMsg =\n `The repetition <${dslName}> within Rule <${options.topLevelRule.name}> can never consume any tokens.\\n` +\n `This could lead to an infinite loop.`;\n\n return errMsg;\n },\n\n // TODO: remove - `errors_public` from nyc.config.js exclude\n // once this method is fully removed from this file\n buildTokenNameError(options: {\n tokenType: TokenType;\n expectedPattern: RegExp;\n }): string {\n /* istanbul ignore next */\n return \"deprecated\";\n },\n\n buildEmptyAlternationError(options: {\n topLevelRule: Rule;\n alternation: Alternation;\n emptyChoiceIdx: number;\n }): string {\n const errMsg =\n `Ambiguous empty alternative: <${options.emptyChoiceIdx + 1}>` +\n ` in inside <${options.topLevelRule.name}> Rule.\\n` +\n `Only the last alternative may be an empty alternative.`;\n\n return errMsg;\n },\n\n buildTooManyAlternativesError(options: {\n topLevelRule: Rule;\n alternation: Alternation;\n }): string {\n const errMsg =\n `An Alternation cannot have more than 256 alternatives:\\n` +\n ` inside <${\n options.topLevelRule.name\n }> Rule.\\n has ${\n options.alternation.definition.length + 1\n } alternatives.`;\n\n return errMsg;\n },\n\n buildLeftRecursionError(options: {\n topLevelRule: Rule;\n leftRecursionPath: Rule[];\n }): string {\n const ruleName = options.topLevelRule.name;\n const pathNames = map(\n options.leftRecursionPath,\n (currRule) => currRule.name,\n );\n const leftRecursivePath = `${ruleName} --> ${pathNames\n .concat([ruleName])\n .join(\" --> \")}`;\n const errMsg =\n `Left Recursion found in grammar.\\n` +\n `rule: <${ruleName}> can be invoked from itself (directly or indirectly)\\n` +\n `without consuming any Tokens. The grammar path that causes this is: \\n ${leftRecursivePath}\\n` +\n ` To fix this refactor your grammar to remove the left recursion.\\n` +\n `see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`;\n\n return errMsg;\n },\n\n // TODO: remove - `errors_public` from nyc.config.js exclude\n // once this method is fully removed from this file\n buildInvalidRuleNameError(options: {\n topLevelRule: Rule;\n expectedPattern: RegExp;\n }): string {\n /* istanbul ignore next */\n return \"deprecated\";\n },\n\n buildDuplicateRuleNameError(options: {\n topLevelRule: Rule | string;\n grammarName: string;\n }): string {\n let ruleName;\n if (options.topLevelRule instanceof Rule) {\n ruleName = options.topLevelRule.name;\n } else {\n ruleName = options.topLevelRule;\n }\n\n const errMsg = `Duplicate definition, rule: ->${ruleName}<- is already defined in the grammar: ->${options.grammarName}<-`;\n\n return errMsg;\n },\n };\n", "import {\n IParserUnresolvedRefDefinitionError,\n ParserDefinitionErrorType,\n} from \"../parser/parser.js\";\nimport { forEach, values } from \"lodash-es\";\nimport { GAstVisitor, NonTerminal, Rule } from \"@chevrotain/gast\";\nimport {\n IGrammarResolverErrorMessageProvider,\n IParserDefinitionError,\n} from \"./types.js\";\n\nexport function resolveGrammar(\n topLevels: Record,\n errMsgProvider: IGrammarResolverErrorMessageProvider,\n): IParserDefinitionError[] {\n const refResolver = new GastRefResolverVisitor(topLevels, errMsgProvider);\n refResolver.resolveRefs();\n return refResolver.errors;\n}\n\nexport class GastRefResolverVisitor extends GAstVisitor {\n public errors: IParserUnresolvedRefDefinitionError[] = [];\n private currTopLevel: Rule;\n\n constructor(\n private nameToTopRule: Record,\n private errMsgProvider: IGrammarResolverErrorMessageProvider,\n ) {\n super();\n }\n\n public resolveRefs(): void {\n forEach(values(this.nameToTopRule), (prod) => {\n this.currTopLevel = prod;\n prod.accept(this);\n });\n }\n\n public visitNonTerminal(node: NonTerminal): void {\n const ref = this.nameToTopRule[node.nonTerminalName];\n\n if (!ref) {\n const msg = this.errMsgProvider.buildRuleNotFoundError(\n this.currTopLevel,\n node,\n );\n this.errors.push({\n message: msg,\n type: ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,\n ruleName: this.currTopLevel.name,\n unresolvedRefName: node.nonTerminalName,\n });\n } else {\n node.referencedRule = ref;\n }\n }\n}\n", "import {\n clone,\n drop,\n dropRight,\n first as _first,\n forEach,\n isEmpty,\n last,\n} from \"lodash-es\";\nimport { first } from \"./first.js\";\nimport { RestWalker } from \"./rest.js\";\nimport { TokenMatcher } from \"../parser/parser.js\";\nimport {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"@chevrotain/gast\";\nimport {\n IGrammarPath,\n IProduction,\n ISyntacticContentAssistPath,\n IToken,\n ITokenGrammarPath,\n TokenType,\n} from \"@chevrotain/types\";\n\nexport abstract class AbstractNextPossibleTokensWalker extends RestWalker {\n protected possibleTokTypes: TokenType[] = [];\n protected ruleStack: string[];\n protected occurrenceStack: number[];\n\n protected nextProductionName = \"\";\n protected nextProductionOccurrence = 0;\n protected found = false;\n protected isAtEndOfPath = false;\n\n constructor(\n protected topProd: Rule,\n protected path: IGrammarPath,\n ) {\n super();\n }\n\n startWalking(): TokenType[] {\n this.found = false;\n\n if (this.path.ruleStack[0] !== this.topProd.name) {\n throw Error(\"The path does not start with the walker's top Rule!\");\n }\n\n // immutable for the win\n this.ruleStack = clone(this.path.ruleStack).reverse(); // intelij bug requires assertion\n this.occurrenceStack = clone(this.path.occurrenceStack).reverse(); // intelij bug requires assertion\n\n // already verified that the first production is valid, we now seek the 2nd production\n this.ruleStack.pop();\n this.occurrenceStack.pop();\n\n this.updateExpectedNext();\n this.walk(this.topProd);\n\n return this.possibleTokTypes;\n }\n\n walk(\n prod: { definition: IProduction[] },\n prevRest: IProduction[] = [],\n ): void {\n // stop scanning once we found the path\n if (!this.found) {\n super.walk(prod, prevRest);\n }\n }\n\n walkProdRef(\n refProd: NonTerminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // found the next production, need to keep walking in it\n if (\n refProd.referencedRule.name === this.nextProductionName &&\n refProd.idx === this.nextProductionOccurrence\n ) {\n const fullRest = currRest.concat(prevRest);\n this.updateExpectedNext();\n this.walk(refProd.referencedRule, fullRest);\n }\n }\n\n updateExpectedNext(): void {\n // need to consume the Terminal\n if (isEmpty(this.ruleStack)) {\n // must reset nextProductionXXX to avoid walking down another Top Level production while what we are\n // really seeking is the last Terminal...\n this.nextProductionName = \"\";\n this.nextProductionOccurrence = 0;\n this.isAtEndOfPath = true;\n } else {\n this.nextProductionName = this.ruleStack.pop()!;\n this.nextProductionOccurrence = this.occurrenceStack.pop()!;\n }\n }\n}\n\nexport class NextAfterTokenWalker extends AbstractNextPossibleTokensWalker {\n private nextTerminalName = \"\";\n private nextTerminalOccurrence = 0;\n\n constructor(\n topProd: Rule,\n protected path: ITokenGrammarPath,\n ) {\n super(topProd, path);\n this.nextTerminalName = this.path.lastTok.name;\n this.nextTerminalOccurrence = this.path.lastTokOccurrence;\n }\n\n walkTerminal(\n terminal: Terminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n this.isAtEndOfPath &&\n terminal.terminalType.name === this.nextTerminalName &&\n terminal.idx === this.nextTerminalOccurrence &&\n !this.found\n ) {\n const fullRest = currRest.concat(prevRest);\n const restProd = new Alternative({ definition: fullRest });\n this.possibleTokTypes = first(restProd);\n this.found = true;\n }\n }\n}\n\nexport type AlternativesFirstTokens = TokenType[][];\n\nexport interface IFirstAfterRepetition {\n token: TokenType | undefined;\n occurrence: number | undefined;\n isEndOfRule: boolean | undefined;\n}\n\n/**\n * This walker only \"walks\" a single \"TOP\" level in the Grammar Ast, this means\n * it never \"follows\" production refs\n */\nexport class AbstractNextTerminalAfterProductionWalker extends RestWalker {\n protected result: IFirstAfterRepetition = {\n token: undefined,\n occurrence: undefined,\n isEndOfRule: undefined,\n };\n\n constructor(\n protected topRule: Rule,\n protected occurrence: number,\n ) {\n super();\n }\n\n startWalking(): IFirstAfterRepetition {\n this.walk(this.topRule);\n return this.result;\n }\n}\n\nexport class NextTerminalAfterManyWalker extends AbstractNextTerminalAfterProductionWalker {\n walkMany(\n manyProd: Repetition,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (manyProd.idx === this.occurrence) {\n const firstAfterMany = _first(currRest.concat(prevRest));\n this.result.isEndOfRule = firstAfterMany === undefined;\n if (firstAfterMany instanceof Terminal) {\n this.result.token = firstAfterMany.terminalType;\n this.result.occurrence = firstAfterMany.idx;\n }\n } else {\n super.walkMany(manyProd, currRest, prevRest);\n }\n }\n}\n\nexport class NextTerminalAfterManySepWalker extends AbstractNextTerminalAfterProductionWalker {\n walkManySep(\n manySepProd: RepetitionWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (manySepProd.idx === this.occurrence) {\n const firstAfterManySep = _first(currRest.concat(prevRest));\n this.result.isEndOfRule = firstAfterManySep === undefined;\n if (firstAfterManySep instanceof Terminal) {\n this.result.token = firstAfterManySep.terminalType;\n this.result.occurrence = firstAfterManySep.idx;\n }\n } else {\n super.walkManySep(manySepProd, currRest, prevRest);\n }\n }\n}\n\nexport class NextTerminalAfterAtLeastOneWalker extends AbstractNextTerminalAfterProductionWalker {\n walkAtLeastOne(\n atLeastOneProd: RepetitionMandatory,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (atLeastOneProd.idx === this.occurrence) {\n const firstAfterAtLeastOne = _first(currRest.concat(prevRest));\n this.result.isEndOfRule = firstAfterAtLeastOne === undefined;\n if (firstAfterAtLeastOne instanceof Terminal) {\n this.result.token = firstAfterAtLeastOne.terminalType;\n this.result.occurrence = firstAfterAtLeastOne.idx;\n }\n } else {\n super.walkAtLeastOne(atLeastOneProd, currRest, prevRest);\n }\n }\n}\n\n// TODO: reduce code duplication in the AfterWalkers\nexport class NextTerminalAfterAtLeastOneSepWalker extends AbstractNextTerminalAfterProductionWalker {\n walkAtLeastOneSep(\n atleastOneSepProd: RepetitionMandatoryWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (atleastOneSepProd.idx === this.occurrence) {\n const firstAfterfirstAfterAtLeastOneSep = _first(\n currRest.concat(prevRest),\n );\n this.result.isEndOfRule = firstAfterfirstAfterAtLeastOneSep === undefined;\n if (firstAfterfirstAfterAtLeastOneSep instanceof Terminal) {\n this.result.token = firstAfterfirstAfterAtLeastOneSep.terminalType;\n this.result.occurrence = firstAfterfirstAfterAtLeastOneSep.idx;\n }\n } else {\n super.walkAtLeastOneSep(atleastOneSepProd, currRest, prevRest);\n }\n }\n}\n\nexport interface PartialPathAndSuffixes {\n partialPath: TokenType[];\n suffixDef: IProduction[];\n}\n\nexport function possiblePathsFrom(\n targetDef: IProduction[],\n maxLength: number,\n currPath: TokenType[] = [],\n): PartialPathAndSuffixes[] {\n // avoid side effects\n currPath = clone(currPath);\n let result: PartialPathAndSuffixes[] = [];\n let i = 0;\n\n // TODO: avoid inner funcs\n function remainingPathWith(nextDef: IProduction[]) {\n return nextDef.concat(drop(targetDef, i + 1));\n }\n\n // TODO: avoid inner funcs\n function getAlternativesForProd(definition: IProduction[]) {\n const alternatives = possiblePathsFrom(\n remainingPathWith(definition),\n maxLength,\n currPath,\n );\n return result.concat(alternatives);\n }\n\n /**\n * Mandatory productions will halt the loop as the paths computed from their recursive calls will already contain the\n * following (rest) of the targetDef.\n *\n * For optional productions (Option/Repetition/...) the loop will continue to represent the paths that do not include the\n * the optional production.\n */\n while (currPath.length < maxLength && i < targetDef.length) {\n const prod = targetDef[i];\n\n /* istanbul ignore else */\n if (prod instanceof Alternative) {\n return getAlternativesForProd(prod.definition);\n } else if (prod instanceof NonTerminal) {\n return getAlternativesForProd(prod.definition);\n } else if (prod instanceof Option) {\n result = getAlternativesForProd(prod.definition);\n } else if (prod instanceof RepetitionMandatory) {\n const newDef = prod.definition.concat([\n new Repetition({\n definition: prod.definition,\n }),\n ]);\n return getAlternativesForProd(newDef);\n } else if (prod instanceof RepetitionMandatoryWithSeparator) {\n const newDef = [\n new Alternative({ definition: prod.definition }),\n new Repetition({\n definition: [new Terminal({ terminalType: prod.separator })].concat(\n prod.definition,\n ),\n }),\n ];\n return getAlternativesForProd(newDef);\n } else if (prod instanceof RepetitionWithSeparator) {\n const newDef = prod.definition.concat([\n new Repetition({\n definition: [new Terminal({ terminalType: prod.separator })].concat(\n prod.definition,\n ),\n }),\n ]);\n result = getAlternativesForProd(newDef);\n } else if (prod instanceof Repetition) {\n const newDef = prod.definition.concat([\n new Repetition({\n definition: prod.definition,\n }),\n ]);\n result = getAlternativesForProd(newDef);\n } else if (prod instanceof Alternation) {\n forEach(prod.definition, (currAlt) => {\n // TODO: this is a limited check for empty alternatives\n // It would prevent a common case of infinite loops during parser initialization.\n // However **in-directly** empty alternatives may still cause issues.\n if (isEmpty(currAlt.definition) === false) {\n result = getAlternativesForProd(currAlt.definition);\n }\n });\n return result;\n } else if (prod instanceof Terminal) {\n currPath.push(prod.terminalType);\n } else {\n throw Error(\"non exhaustive match\");\n }\n\n i++;\n }\n result.push({\n partialPath: currPath,\n suffixDef: drop(targetDef, i),\n });\n\n return result;\n}\n\ninterface IPathToExamine {\n idx: number;\n def: IProduction[];\n ruleStack: string[];\n occurrenceStack: number[];\n}\n\nexport function nextPossibleTokensAfter(\n initialDef: IProduction[],\n tokenVector: IToken[],\n tokMatcher: TokenMatcher,\n maxLookAhead: number,\n): ISyntacticContentAssistPath[] {\n const EXIT_NON_TERMINAL: any = \"EXIT_NONE_TERMINAL\";\n // to avoid creating a new Array each time.\n const EXIT_NON_TERMINAL_ARR = [EXIT_NON_TERMINAL];\n const EXIT_ALTERNATIVE: any = \"EXIT_ALTERNATIVE\";\n let foundCompletePath = false;\n\n const tokenVectorLength = tokenVector.length;\n const minimalAlternativesIndex = tokenVectorLength - maxLookAhead - 1;\n\n const result: ISyntacticContentAssistPath[] = [];\n\n const possiblePaths: IPathToExamine[] = [];\n possiblePaths.push({\n idx: -1,\n def: initialDef,\n ruleStack: [],\n occurrenceStack: [],\n });\n\n while (!isEmpty(possiblePaths)) {\n const currPath = possiblePaths.pop()!;\n\n // skip alternatives if no more results can be found (assuming deterministic grammar with fixed lookahead)\n if (currPath === EXIT_ALTERNATIVE) {\n if (\n foundCompletePath &&\n last(possiblePaths)!.idx <= minimalAlternativesIndex\n ) {\n // remove irrelevant alternative\n possiblePaths.pop();\n }\n continue;\n }\n\n const currDef = currPath.def;\n const currIdx = currPath.idx;\n const currRuleStack = currPath.ruleStack;\n const currOccurrenceStack = currPath.occurrenceStack;\n\n // For Example: an empty path could exist in a valid grammar in the case of an EMPTY_ALT\n if (isEmpty(currDef)) {\n continue;\n }\n\n const prod = currDef[0];\n /* istanbul ignore else */\n if (prod === EXIT_NON_TERMINAL) {\n const nextPath = {\n idx: currIdx,\n def: drop(currDef),\n ruleStack: dropRight(currRuleStack),\n occurrenceStack: dropRight(currOccurrenceStack),\n };\n possiblePaths.push(nextPath);\n } else if (prod instanceof Terminal) {\n /* istanbul ignore else */\n if (currIdx < tokenVectorLength - 1) {\n const nextIdx = currIdx + 1;\n const actualToken = tokenVector[nextIdx];\n if (tokMatcher!(actualToken, prod.terminalType)) {\n const nextPath = {\n idx: nextIdx,\n def: drop(currDef),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n }\n // end of the line\n } else if (currIdx === tokenVectorLength - 1) {\n // IGNORE ABOVE ELSE\n result.push({\n nextTokenType: prod.terminalType,\n nextTokenOccurrence: prod.idx,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n });\n foundCompletePath = true;\n } else {\n throw Error(\"non exhaustive match\");\n }\n } else if (prod instanceof NonTerminal) {\n const newRuleStack = clone(currRuleStack);\n newRuleStack.push(prod.nonTerminalName);\n\n const newOccurrenceStack = clone(currOccurrenceStack);\n newOccurrenceStack.push(prod.idx);\n\n const nextPath = {\n idx: currIdx,\n def: prod.definition.concat(EXIT_NON_TERMINAL_ARR, drop(currDef)),\n ruleStack: newRuleStack,\n occurrenceStack: newOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n } else if (prod instanceof Option) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n const nextPathWithout = {\n idx: currIdx,\n def: drop(currDef),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWithout);\n // required marker to avoid backtracking paths whose higher priority alternatives already matched\n possiblePaths.push(EXIT_ALTERNATIVE);\n\n const nextPathWith = {\n idx: currIdx,\n def: prod.definition.concat(drop(currDef)),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWith);\n } else if (prod instanceof RepetitionMandatory) {\n // TODO:(THE NEW operators here take a while...) (convert once?)\n const secondIteration = new Repetition({\n definition: prod.definition,\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([secondIteration], drop(currDef));\n const nextPath = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n } else if (prod instanceof RepetitionMandatoryWithSeparator) {\n // TODO:(THE NEW operators here take a while...) (convert once?)\n const separatorGast = new Terminal({\n terminalType: prod.separator,\n });\n const secondIteration = new Repetition({\n definition: [separatorGast].concat(prod.definition),\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([secondIteration], drop(currDef));\n const nextPath = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n } else if (prod instanceof RepetitionWithSeparator) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n const nextPathWithout = {\n idx: currIdx,\n def: drop(currDef),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWithout);\n // required marker to avoid backtracking paths whose higher priority alternatives already matched\n possiblePaths.push(EXIT_ALTERNATIVE);\n\n const separatorGast = new Terminal({\n terminalType: prod.separator,\n });\n const nthRepetition = new Repetition({\n definition: [separatorGast].concat(prod.definition),\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([nthRepetition], drop(currDef));\n const nextPathWith = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWith);\n } else if (prod instanceof Repetition) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n const nextPathWithout = {\n idx: currIdx,\n def: drop(currDef),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWithout);\n // required marker to avoid backtracking paths whose higher priority alternatives already matched\n possiblePaths.push(EXIT_ALTERNATIVE);\n\n // TODO: an empty repetition will cause infinite loops here, will the parser detect this in selfAnalysis?\n const nthRepetition = new Repetition({\n definition: prod.definition,\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([nthRepetition], drop(currDef));\n const nextPathWith = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWith);\n } else if (prod instanceof Alternation) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n for (let i = prod.definition.length - 1; i >= 0; i--) {\n const currAlt: any = prod.definition[i];\n const currAltPath = {\n idx: currIdx,\n def: currAlt.definition.concat(drop(currDef)),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(currAltPath);\n possiblePaths.push(EXIT_ALTERNATIVE);\n }\n } else if (prod instanceof Alternative) {\n possiblePaths.push({\n idx: currIdx,\n def: prod.definition.concat(drop(currDef)),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n });\n } else if (prod instanceof Rule) {\n // last because we should only encounter at most a single one of these per invocation.\n possiblePaths.push(\n expandTopLevelRule(prod, currIdx, currRuleStack, currOccurrenceStack),\n );\n } else {\n throw Error(\"non exhaustive match\");\n }\n }\n return result;\n}\n\nfunction expandTopLevelRule(\n topRule: Rule,\n currIdx: number,\n currRuleStack: string[],\n currOccurrenceStack: number[],\n): IPathToExamine {\n const newRuleStack = clone(currRuleStack);\n newRuleStack.push(topRule.name);\n\n const newCurrOccurrenceStack = clone(currOccurrenceStack);\n // top rule is always assumed to have been called with occurrence index 1\n newCurrOccurrenceStack.push(1);\n\n return {\n idx: currIdx,\n def: topRule.definition,\n ruleStack: newRuleStack,\n occurrenceStack: newCurrOccurrenceStack,\n };\n}\n", "import { every, flatten, forEach, has, isEmpty, map, reduce } from \"lodash-es\";\nimport { possiblePathsFrom } from \"./interpreter.js\";\nimport { RestWalker } from \"./rest.js\";\nimport { Predicate, TokenMatcher } from \"../parser/parser.js\";\nimport {\n tokenStructuredMatcher,\n tokenStructuredMatcherNoCategories,\n} from \"../../scan/tokens.js\";\nimport {\n Alternation,\n Alternative as AlternativeGAST,\n GAstVisitor,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n} from \"@chevrotain/gast\";\nimport {\n BaseParser,\n IOrAlt,\n IProduction,\n IProductionWithOccurrence,\n LookaheadProductionType,\n LookaheadSequence,\n Rule,\n TokenType,\n} from \"@chevrotain/types\";\n\nexport enum PROD_TYPE {\n OPTION,\n REPETITION,\n REPETITION_MANDATORY,\n REPETITION_MANDATORY_WITH_SEPARATOR,\n REPETITION_WITH_SEPARATOR,\n ALTERNATION,\n}\n\nexport function getProdType(\n prod: IProduction | LookaheadProductionType,\n): PROD_TYPE {\n /* istanbul ignore else */\n if (prod instanceof Option || prod === \"Option\") {\n return PROD_TYPE.OPTION;\n } else if (prod instanceof Repetition || prod === \"Repetition\") {\n return PROD_TYPE.REPETITION;\n } else if (\n prod instanceof RepetitionMandatory ||\n prod === \"RepetitionMandatory\"\n ) {\n return PROD_TYPE.REPETITION_MANDATORY;\n } else if (\n prod instanceof RepetitionMandatoryWithSeparator ||\n prod === \"RepetitionMandatoryWithSeparator\"\n ) {\n return PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR;\n } else if (\n prod instanceof RepetitionWithSeparator ||\n prod === \"RepetitionWithSeparator\"\n ) {\n return PROD_TYPE.REPETITION_WITH_SEPARATOR;\n } else if (prod instanceof Alternation || prod === \"Alternation\") {\n return PROD_TYPE.ALTERNATION;\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nexport function getLookaheadPaths(options: {\n occurrence: number;\n rule: Rule;\n prodType: LookaheadProductionType;\n maxLookahead: number;\n}): LookaheadSequence[] {\n const { occurrence, rule, prodType, maxLookahead } = options;\n const type = getProdType(prodType);\n if (type === PROD_TYPE.ALTERNATION) {\n return getLookaheadPathsForOr(occurrence, rule, maxLookahead);\n } else {\n return getLookaheadPathsForOptionalProd(\n occurrence,\n rule,\n type,\n maxLookahead,\n );\n }\n}\n\nexport function buildLookaheadFuncForOr(\n occurrence: number,\n ruleGrammar: Rule,\n maxLookahead: number,\n hasPredicates: boolean,\n dynamicTokensEnabled: boolean,\n laFuncBuilder: Function,\n): (orAlts?: IOrAlt[]) => number | undefined {\n const lookAheadPaths = getLookaheadPathsForOr(\n occurrence,\n ruleGrammar,\n maxLookahead,\n );\n\n const tokenMatcher = areTokenCategoriesNotUsed(lookAheadPaths)\n ? tokenStructuredMatcherNoCategories\n : tokenStructuredMatcher;\n\n return laFuncBuilder(\n lookAheadPaths,\n hasPredicates,\n tokenMatcher,\n dynamicTokensEnabled,\n );\n}\n\n/**\n * When dealing with an Optional production (OPTION/MANY/2nd iteration of AT_LEAST_ONE/...) we need to compare\n * the lookahead \"inside\" the production and the lookahead immediately \"after\" it in the same top level rule (context free).\n *\n * Example: given a production:\n * ABC(DE)?DF\n *\n * The optional '(DE)?' should only be entered if we see 'DE'. a single Token 'D' is not sufficient to distinguish between the two\n * alternatives.\n *\n * @returns A Lookahead function which will return true IFF the parser should parse the Optional production.\n */\nexport function buildLookaheadFuncForOptionalProd(\n occurrence: number,\n ruleGrammar: Rule,\n k: number,\n dynamicTokensEnabled: boolean,\n prodType: PROD_TYPE,\n lookaheadBuilder: (\n lookAheadSequence: LookaheadSequence,\n tokenMatcher: TokenMatcher,\n dynamicTokensEnabled: boolean,\n ) => () => boolean,\n): () => boolean {\n const lookAheadPaths = getLookaheadPathsForOptionalProd(\n occurrence,\n ruleGrammar,\n prodType,\n k,\n );\n\n const tokenMatcher = areTokenCategoriesNotUsed(lookAheadPaths)\n ? tokenStructuredMatcherNoCategories\n : tokenStructuredMatcher;\n\n return lookaheadBuilder(\n lookAheadPaths[0],\n tokenMatcher,\n dynamicTokensEnabled,\n );\n}\n\nexport type Alternative = TokenType[][];\n\nexport function buildAlternativesLookAheadFunc(\n alts: LookaheadSequence[],\n hasPredicates: boolean,\n tokenMatcher: TokenMatcher,\n dynamicTokensEnabled: boolean,\n): (orAlts: IOrAlt[]) => number | undefined {\n const numOfAlts = alts.length;\n const areAllOneTokenLookahead = every(alts, (currAlt) => {\n return every(currAlt, (currPath) => {\n return currPath.length === 1;\n });\n });\n\n // This version takes into account the predicates as well.\n if (hasPredicates) {\n /**\n * @returns {number} - The chosen alternative index\n */\n return function (\n this: BaseParser,\n orAlts: IOrAlt[],\n ): number | undefined {\n // unfortunately the predicates must be extracted every single time\n // as they cannot be cached due to references to parameters(vars) which are no longer valid.\n // note that in the common case of no predicates, no cpu time will be wasted on this (see else block)\n const predicates: (Predicate | undefined)[] = map(\n orAlts,\n (currAlt) => currAlt.GATE,\n );\n\n for (let t = 0; t < numOfAlts; t++) {\n const currAlt = alts[t];\n const currNumOfPaths = currAlt.length;\n\n const currPredicate = predicates[t];\n if (currPredicate !== undefined && currPredicate.call(this) === false) {\n // if the predicate does not match there is no point in checking the paths\n continue;\n }\n nextPath: for (let j = 0; j < currNumOfPaths; j++) {\n const currPath = currAlt[j];\n const currPathLength = currPath.length;\n for (let i = 0; i < currPathLength; i++) {\n const nextToken = this.LA(i + 1);\n if (tokenMatcher(nextToken, currPath[i]) === false) {\n // mismatch in current path\n // try the next pth\n continue nextPath;\n }\n }\n // found a full path that matches.\n // this will also work for an empty ALT as the loop will be skipped\n return t;\n }\n // none of the paths for the current alternative matched\n // try the next alternative\n }\n // none of the alternatives could be matched\n return undefined;\n };\n } else if (areAllOneTokenLookahead && !dynamicTokensEnabled) {\n // optimized (common) case of all the lookaheads paths requiring only\n // a single token lookahead. These Optimizations cannot work if dynamically defined Tokens are used.\n const singleTokenAlts = map(alts, (currAlt) => {\n return flatten(currAlt);\n });\n\n const choiceToAlt = reduce(\n singleTokenAlts,\n (result, currAlt, idx) => {\n forEach(currAlt, (currTokType) => {\n if (!has(result, currTokType.tokenTypeIdx!)) {\n result[currTokType.tokenTypeIdx!] = idx;\n }\n forEach(currTokType.categoryMatches!, (currExtendingType) => {\n if (!has(result, currExtendingType)) {\n result[currExtendingType] = idx;\n }\n });\n });\n return result;\n },\n {} as Record,\n );\n\n /**\n * @returns {number} - The chosen alternative index\n */\n return function (this: BaseParser): number {\n const nextToken = this.LA(1);\n return choiceToAlt[nextToken.tokenTypeIdx];\n };\n } else {\n // optimized lookahead without needing to check the predicates at all.\n // this causes code duplication which is intentional to improve performance.\n /**\n * @returns {number} - The chosen alternative index\n */\n return function (this: BaseParser): number | undefined {\n for (let t = 0; t < numOfAlts; t++) {\n const currAlt = alts[t];\n const currNumOfPaths = currAlt.length;\n nextPath: for (let j = 0; j < currNumOfPaths; j++) {\n const currPath = currAlt[j];\n const currPathLength = currPath.length;\n for (let i = 0; i < currPathLength; i++) {\n const nextToken = this.LA(i + 1);\n if (tokenMatcher(nextToken, currPath[i]) === false) {\n // mismatch in current path\n // try the next pth\n continue nextPath;\n }\n }\n // found a full path that matches.\n // this will also work for an empty ALT as the loop will be skipped\n return t;\n }\n // none of the paths for the current alternative matched\n // try the next alternative\n }\n // none of the alternatives could be matched\n return undefined;\n };\n }\n}\n\nexport function buildSingleAlternativeLookaheadFunction(\n alt: LookaheadSequence,\n tokenMatcher: TokenMatcher,\n dynamicTokensEnabled: boolean,\n): () => boolean {\n const areAllOneTokenLookahead = every(alt, (currPath) => {\n return currPath.length === 1;\n });\n\n const numOfPaths = alt.length;\n\n // optimized (common) case of all the lookaheads paths requiring only\n // a single token lookahead.\n if (areAllOneTokenLookahead && !dynamicTokensEnabled) {\n const singleTokensTypes = flatten(alt);\n\n if (\n singleTokensTypes.length === 1 &&\n isEmpty((singleTokensTypes[0]).categoryMatches)\n ) {\n const expectedTokenType = singleTokensTypes[0];\n const expectedTokenUniqueKey = (expectedTokenType).tokenTypeIdx;\n\n return function (this: BaseParser): boolean {\n return this.LA(1).tokenTypeIdx === expectedTokenUniqueKey;\n };\n } else {\n const choiceToAlt = reduce(\n singleTokensTypes,\n (result, currTokType, idx) => {\n result[currTokType.tokenTypeIdx!] = true;\n forEach(currTokType.categoryMatches!, (currExtendingType) => {\n result[currExtendingType] = true;\n });\n return result;\n },\n [] as boolean[],\n );\n\n return function (this: BaseParser): boolean {\n const nextToken = this.LA(1);\n return choiceToAlt[nextToken.tokenTypeIdx] === true;\n };\n }\n } else {\n return function (this: BaseParser): boolean {\n nextPath: for (let j = 0; j < numOfPaths; j++) {\n const currPath = alt[j];\n const currPathLength = currPath.length;\n for (let i = 0; i < currPathLength; i++) {\n const nextToken = this.LA(i + 1);\n if (tokenMatcher(nextToken, currPath[i]) === false) {\n // mismatch in current path\n // try the next pth\n continue nextPath;\n }\n }\n // found a full path that matches.\n return true;\n }\n\n // none of the paths matched\n return false;\n };\n }\n}\n\nclass RestDefinitionFinderWalker extends RestWalker {\n private restDef: IProduction[];\n\n constructor(\n private topProd: Rule,\n private targetOccurrence: number,\n private targetProdType: PROD_TYPE,\n ) {\n super();\n }\n\n startWalking(): IProduction[] {\n this.walk(this.topProd);\n return this.restDef;\n }\n\n private checkIsTarget(\n node: IProductionWithOccurrence,\n expectedProdType: PROD_TYPE,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): boolean {\n if (\n node.idx === this.targetOccurrence &&\n this.targetProdType === expectedProdType\n ) {\n this.restDef = currRest.concat(prevRest);\n return true;\n }\n // performance optimization, do not iterate over the entire Grammar ast after we have found the target\n return false;\n }\n\n walkOption(\n optionProd: Option,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (!this.checkIsTarget(optionProd, PROD_TYPE.OPTION, currRest, prevRest)) {\n super.walkOption(optionProd, currRest, prevRest);\n }\n }\n\n walkAtLeastOne(\n atLeastOneProd: RepetitionMandatory,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n !this.checkIsTarget(\n atLeastOneProd,\n PROD_TYPE.REPETITION_MANDATORY,\n currRest,\n prevRest,\n )\n ) {\n super.walkOption(atLeastOneProd, currRest, prevRest);\n }\n }\n\n walkAtLeastOneSep(\n atLeastOneSepProd: RepetitionMandatoryWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n !this.checkIsTarget(\n atLeastOneSepProd,\n PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,\n currRest,\n prevRest,\n )\n ) {\n super.walkOption(atLeastOneSepProd, currRest, prevRest);\n }\n }\n\n walkMany(\n manyProd: Repetition,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n !this.checkIsTarget(manyProd, PROD_TYPE.REPETITION, currRest, prevRest)\n ) {\n super.walkOption(manyProd, currRest, prevRest);\n }\n }\n\n walkManySep(\n manySepProd: RepetitionWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n !this.checkIsTarget(\n manySepProd,\n PROD_TYPE.REPETITION_WITH_SEPARATOR,\n currRest,\n prevRest,\n )\n ) {\n super.walkOption(manySepProd, currRest, prevRest);\n }\n }\n}\n\n/**\n * Returns the definition of a target production in a top level level rule.\n */\nclass InsideDefinitionFinderVisitor extends GAstVisitor {\n public result: IProduction[] = [];\n\n constructor(\n private targetOccurrence: number,\n private targetProdType: PROD_TYPE,\n private targetRef?: any,\n ) {\n super();\n }\n\n private checkIsTarget(\n node: { definition: IProduction[] } & IProductionWithOccurrence,\n expectedProdName: PROD_TYPE,\n ): void {\n if (\n node.idx === this.targetOccurrence &&\n this.targetProdType === expectedProdName &&\n (this.targetRef === undefined || node === this.targetRef)\n ) {\n this.result = node.definition;\n }\n }\n\n public visitOption(node: Option): void {\n this.checkIsTarget(node, PROD_TYPE.OPTION);\n }\n\n public visitRepetition(node: Repetition): void {\n this.checkIsTarget(node, PROD_TYPE.REPETITION);\n }\n\n public visitRepetitionMandatory(node: RepetitionMandatory): void {\n this.checkIsTarget(node, PROD_TYPE.REPETITION_MANDATORY);\n }\n\n public visitRepetitionMandatoryWithSeparator(\n node: RepetitionMandatoryWithSeparator,\n ): void {\n this.checkIsTarget(node, PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR);\n }\n\n public visitRepetitionWithSeparator(node: RepetitionWithSeparator): void {\n this.checkIsTarget(node, PROD_TYPE.REPETITION_WITH_SEPARATOR);\n }\n\n public visitAlternation(node: Alternation): void {\n this.checkIsTarget(node, PROD_TYPE.ALTERNATION);\n }\n}\n\nfunction initializeArrayOfArrays(size: number): any[][] {\n const result = new Array(size);\n for (let i = 0; i < size; i++) {\n result[i] = [];\n }\n return result;\n}\n\n/**\n * A sort of hash function between a Path in the grammar and a string.\n * Note that this returns multiple \"hashes\" to support the scenario of token categories.\n * - A single path with categories may match multiple **actual** paths.\n */\nfunction pathToHashKeys(path: TokenType[]): string[] {\n let keys = [\"\"];\n for (let i = 0; i < path.length; i++) {\n const tokType = path[i];\n const longerKeys = [];\n for (let j = 0; j < keys.length; j++) {\n const currShorterKey = keys[j];\n longerKeys.push(currShorterKey + \"_\" + tokType.tokenTypeIdx);\n for (let t = 0; t < tokType.categoryMatches!.length; t++) {\n const categoriesKeySuffix = \"_\" + tokType.categoryMatches![t];\n longerKeys.push(currShorterKey + categoriesKeySuffix);\n }\n }\n keys = longerKeys;\n }\n return keys;\n}\n\n/**\n * Imperative style due to being called from a hot spot\n */\nfunction isUniquePrefixHash(\n altKnownPathsKeys: Record[],\n searchPathKeys: string[],\n idx: number,\n): boolean {\n for (\n let currAltIdx = 0;\n currAltIdx < altKnownPathsKeys.length;\n currAltIdx++\n ) {\n // We only want to test vs the other alternatives\n if (currAltIdx === idx) {\n continue;\n }\n const otherAltKnownPathsKeys = altKnownPathsKeys[currAltIdx];\n for (let searchIdx = 0; searchIdx < searchPathKeys.length; searchIdx++) {\n const searchKey = searchPathKeys[searchIdx];\n if (otherAltKnownPathsKeys[searchKey] === true) {\n return false;\n }\n }\n }\n // None of the SearchPathKeys were found in any of the other alternatives\n return true;\n}\n\nexport function lookAheadSequenceFromAlternatives(\n altsDefs: IProduction[],\n k: number,\n): LookaheadSequence[] {\n const partialAlts = map(altsDefs, (currAlt) =>\n possiblePathsFrom([currAlt], 1),\n );\n const finalResult = initializeArrayOfArrays(partialAlts.length);\n const altsHashes = map(partialAlts, (currAltPaths) => {\n const dict: { [key: string]: boolean } = {};\n forEach(currAltPaths, (item) => {\n const keys = pathToHashKeys(item.partialPath);\n forEach(keys, (currKey) => {\n dict[currKey] = true;\n });\n });\n return dict;\n });\n let newData = partialAlts;\n\n // maxLookahead loop\n for (let pathLength = 1; pathLength <= k; pathLength++) {\n const currDataset = newData;\n newData = initializeArrayOfArrays(currDataset.length);\n\n // alternatives loop\n for (let altIdx = 0; altIdx < currDataset.length; altIdx++) {\n const currAltPathsAndSuffixes = currDataset[altIdx];\n // paths in current alternative loop\n for (\n let currPathIdx = 0;\n currPathIdx < currAltPathsAndSuffixes.length;\n currPathIdx++\n ) {\n const currPathPrefix = currAltPathsAndSuffixes[currPathIdx].partialPath;\n const suffixDef = currAltPathsAndSuffixes[currPathIdx].suffixDef;\n const prefixKeys = pathToHashKeys(currPathPrefix);\n const isUnique = isUniquePrefixHash(altsHashes, prefixKeys, altIdx);\n // End of the line for this path.\n if (isUnique || isEmpty(suffixDef) || currPathPrefix.length === k) {\n const currAltResult = finalResult[altIdx];\n // TODO: Can we implement a containsPath using Maps/Dictionaries?\n if (containsPath(currAltResult, currPathPrefix) === false) {\n currAltResult.push(currPathPrefix);\n // Update all new keys for the current path.\n for (let j = 0; j < prefixKeys.length; j++) {\n const currKey = prefixKeys[j];\n altsHashes[altIdx][currKey] = true;\n }\n }\n }\n // Expand longer paths\n else {\n const newPartialPathsAndSuffixes = possiblePathsFrom(\n suffixDef,\n pathLength + 1,\n currPathPrefix,\n );\n newData[altIdx] = newData[altIdx].concat(newPartialPathsAndSuffixes);\n\n // Update keys for new known paths\n forEach(newPartialPathsAndSuffixes, (item) => {\n const prefixKeys = pathToHashKeys(item.partialPath);\n forEach(prefixKeys, (key) => {\n altsHashes[altIdx][key] = true;\n });\n });\n }\n }\n }\n }\n\n return finalResult;\n}\n\nexport function getLookaheadPathsForOr(\n occurrence: number,\n ruleGrammar: Rule,\n k: number,\n orProd?: Alternation,\n): LookaheadSequence[] {\n const visitor = new InsideDefinitionFinderVisitor(\n occurrence,\n PROD_TYPE.ALTERNATION,\n orProd,\n );\n ruleGrammar.accept(visitor);\n return lookAheadSequenceFromAlternatives(visitor.result, k);\n}\n\nexport function getLookaheadPathsForOptionalProd(\n occurrence: number,\n ruleGrammar: Rule,\n prodType: PROD_TYPE,\n k: number,\n): LookaheadSequence[] {\n const insideDefVisitor = new InsideDefinitionFinderVisitor(\n occurrence,\n prodType,\n );\n ruleGrammar.accept(insideDefVisitor);\n const insideDef = insideDefVisitor.result;\n\n const afterDefWalker = new RestDefinitionFinderWalker(\n ruleGrammar,\n occurrence,\n prodType,\n );\n const afterDef = afterDefWalker.startWalking();\n\n const insideFlat = new AlternativeGAST({ definition: insideDef });\n const afterFlat = new AlternativeGAST({ definition: afterDef });\n\n return lookAheadSequenceFromAlternatives([insideFlat, afterFlat], k);\n}\n\nexport function containsPath(\n alternative: Alternative,\n searchPath: TokenType[],\n): boolean {\n compareOtherPath: for (let i = 0; i < alternative.length; i++) {\n const otherPath = alternative[i];\n if (otherPath.length !== searchPath.length) {\n continue;\n }\n for (let j = 0; j < otherPath.length; j++) {\n const searchTok = searchPath[j];\n const otherTok = otherPath[j];\n\n const matchingTokens =\n searchTok === otherTok ||\n otherTok.categoryMatchesMap![searchTok.tokenTypeIdx!] !== undefined;\n if (matchingTokens === false) {\n continue compareOtherPath;\n }\n }\n return true;\n }\n\n return false;\n}\n\nexport function isStrictPrefixOfPath(\n prefix: TokenType[],\n other: TokenType[],\n): boolean {\n return (\n prefix.length < other.length &&\n every(prefix, (tokType, idx) => {\n const otherTokType = other[idx];\n return (\n tokType === otherTokType ||\n otherTokType.categoryMatchesMap![tokType.tokenTypeIdx!]\n );\n })\n );\n}\n\nexport function areTokenCategoriesNotUsed(\n lookAheadPaths: LookaheadSequence[],\n): boolean {\n return every(lookAheadPaths, (singleAltPaths) =>\n every(singleAltPaths, (singlePath) =>\n every(singlePath, (token) => isEmpty(token.categoryMatches!)),\n ),\n );\n}\n", "import {\n clone,\n compact,\n difference,\n drop,\n dropRight,\n filter,\n first,\n flatMap,\n flatten,\n forEach,\n groupBy,\n includes,\n isEmpty,\n map,\n pickBy,\n reduce,\n reject,\n values,\n} from \"lodash-es\";\nimport {\n IParserAmbiguousAlternativesDefinitionError,\n IParserDuplicatesDefinitionError,\n IParserEmptyAlternativeDefinitionError,\n ParserDefinitionErrorType,\n} from \"../parser/parser.js\";\nimport {\n Alternation,\n Alternative as AlternativeGAST,\n GAstVisitor,\n getProductionDslName,\n isOptionalProd,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Terminal,\n} from \"@chevrotain/gast\";\nimport {\n Alternative,\n containsPath,\n getLookaheadPathsForOptionalProd,\n getLookaheadPathsForOr,\n getProdType,\n isStrictPrefixOfPath,\n} from \"./lookahead.js\";\nimport { nextPossibleTokensAfter } from \"./interpreter.js\";\nimport {\n ILookaheadStrategy,\n IProduction,\n IProductionWithOccurrence,\n Rule,\n TokenType,\n} from \"@chevrotain/types\";\nimport {\n IGrammarValidatorErrorMessageProvider,\n IParserDefinitionError,\n} from \"./types.js\";\nimport { tokenStructuredMatcher } from \"../../scan/tokens.js\";\n\nexport function validateLookahead(options: {\n lookaheadStrategy: ILookaheadStrategy;\n rules: Rule[];\n tokenTypes: TokenType[];\n grammarName: string;\n}): IParserDefinitionError[] {\n const lookaheadValidationErrorMessages = options.lookaheadStrategy.validate({\n rules: options.rules,\n tokenTypes: options.tokenTypes,\n grammarName: options.grammarName,\n });\n return map(lookaheadValidationErrorMessages, (errorMessage) => ({\n type: ParserDefinitionErrorType.CUSTOM_LOOKAHEAD_VALIDATION,\n ...errorMessage,\n }));\n}\n\nexport function validateGrammar(\n topLevels: Rule[],\n tokenTypes: TokenType[],\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n grammarName: string,\n): IParserDefinitionError[] {\n const duplicateErrors: IParserDefinitionError[] = flatMap(\n topLevels,\n (currTopLevel) =>\n validateDuplicateProductions(currTopLevel, errMsgProvider),\n );\n\n const termsNamespaceConflictErrors = checkTerminalAndNoneTerminalsNameSpace(\n topLevels,\n tokenTypes,\n errMsgProvider,\n );\n\n const tooManyAltsErrors = flatMap(topLevels, (curRule) =>\n validateTooManyAlts(curRule, errMsgProvider),\n );\n\n const duplicateRulesError = flatMap(topLevels, (curRule) =>\n validateRuleDoesNotAlreadyExist(\n curRule,\n topLevels,\n grammarName,\n errMsgProvider,\n ),\n );\n\n return duplicateErrors.concat(\n termsNamespaceConflictErrors,\n tooManyAltsErrors,\n duplicateRulesError,\n );\n}\n\nfunction validateDuplicateProductions(\n topLevelRule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDuplicatesDefinitionError[] {\n const collectorVisitor = new OccurrenceValidationCollector();\n topLevelRule.accept(collectorVisitor);\n const allRuleProductions = collectorVisitor.allProductions;\n\n const productionGroups = groupBy(\n allRuleProductions,\n identifyProductionForDuplicates,\n );\n\n const duplicates: any = pickBy(productionGroups, (currGroup) => {\n return currGroup.length > 1;\n });\n\n const errors = map(values(duplicates), (currDuplicates: any) => {\n const firstProd: any = first(currDuplicates);\n const msg = errMsgProvider.buildDuplicateFoundError(\n topLevelRule,\n currDuplicates,\n );\n const dslName = getProductionDslName(firstProd);\n const defError: IParserDuplicatesDefinitionError = {\n message: msg,\n type: ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,\n ruleName: topLevelRule.name,\n dslName: dslName,\n occurrence: firstProd.idx,\n };\n\n const param = getExtraProductionArgument(firstProd);\n if (param) {\n defError.parameter = param;\n }\n\n return defError;\n });\n return errors;\n}\n\nexport function identifyProductionForDuplicates(\n prod: IProductionWithOccurrence,\n): string {\n return `${getProductionDslName(prod)}_#_${\n prod.idx\n }_#_${getExtraProductionArgument(prod)}`;\n}\n\nfunction getExtraProductionArgument(prod: IProductionWithOccurrence): string {\n if (prod instanceof Terminal) {\n return prod.terminalType.name;\n } else if (prod instanceof NonTerminal) {\n return prod.nonTerminalName;\n } else {\n return \"\";\n }\n}\n\nexport class OccurrenceValidationCollector extends GAstVisitor {\n public allProductions: IProductionWithOccurrence[] = [];\n\n public visitNonTerminal(subrule: NonTerminal): void {\n this.allProductions.push(subrule);\n }\n\n public visitOption(option: Option): void {\n this.allProductions.push(option);\n }\n\n public visitRepetitionWithSeparator(manySep: RepetitionWithSeparator): void {\n this.allProductions.push(manySep);\n }\n\n public visitRepetitionMandatory(atLeastOne: RepetitionMandatory): void {\n this.allProductions.push(atLeastOne);\n }\n\n public visitRepetitionMandatoryWithSeparator(\n atLeastOneSep: RepetitionMandatoryWithSeparator,\n ): void {\n this.allProductions.push(atLeastOneSep);\n }\n\n public visitRepetition(many: Repetition): void {\n this.allProductions.push(many);\n }\n\n public visitAlternation(or: Alternation): void {\n this.allProductions.push(or);\n }\n\n public visitTerminal(terminal: Terminal): void {\n this.allProductions.push(terminal);\n }\n}\n\nexport function validateRuleDoesNotAlreadyExist(\n rule: Rule,\n allRules: Rule[],\n className: string,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDefinitionError[] {\n const errors = [];\n const occurrences = reduce(\n allRules,\n (result, curRule) => {\n if (curRule.name === rule.name) {\n return result + 1;\n }\n return result;\n },\n 0,\n );\n if (occurrences > 1) {\n const errMsg = errMsgProvider.buildDuplicateRuleNameError({\n topLevelRule: rule,\n grammarName: className,\n });\n errors.push({\n message: errMsg,\n type: ParserDefinitionErrorType.DUPLICATE_RULE_NAME,\n ruleName: rule.name,\n });\n }\n\n return errors;\n}\n\n// TODO: is there anyway to get only the rule names of rules inherited from the super grammars?\n// This is not part of the IGrammarErrorProvider because the validation cannot be performed on\n// The grammar structure, only at runtime.\nexport function validateRuleIsOverridden(\n ruleName: string,\n definedRulesNames: string[],\n className: string,\n): IParserDefinitionError[] {\n const errors = [];\n let errMsg;\n\n if (!includes(definedRulesNames, ruleName)) {\n errMsg =\n `Invalid rule override, rule: ->${ruleName}<- cannot be overridden in the grammar: ->${className}<-` +\n `as it is not defined in any of the super grammars `;\n errors.push({\n message: errMsg,\n type: ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,\n ruleName: ruleName,\n });\n }\n\n return errors;\n}\n\nexport function validateNoLeftRecursion(\n topRule: Rule,\n currRule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n path: Rule[] = [],\n): IParserDefinitionError[] {\n const errors: IParserDefinitionError[] = [];\n const nextNonTerminals = getFirstNoneTerminal(currRule.definition);\n if (isEmpty(nextNonTerminals)) {\n return [];\n } else {\n const ruleName = topRule.name;\n const foundLeftRecursion = includes(nextNonTerminals, topRule);\n if (foundLeftRecursion) {\n errors.push({\n message: errMsgProvider.buildLeftRecursionError({\n topLevelRule: topRule,\n leftRecursionPath: path,\n }),\n type: ParserDefinitionErrorType.LEFT_RECURSION,\n ruleName: ruleName,\n });\n }\n\n // we are only looking for cyclic paths leading back to the specific topRule\n // other cyclic paths are ignored, we still need this difference to avoid infinite loops...\n const validNextSteps = difference(nextNonTerminals, path.concat([topRule]));\n const errorsFromNextSteps = flatMap(validNextSteps, (currRefRule) => {\n const newPath = clone(path);\n newPath.push(currRefRule);\n return validateNoLeftRecursion(\n topRule,\n currRefRule,\n errMsgProvider,\n newPath,\n );\n });\n\n return errors.concat(errorsFromNextSteps);\n }\n}\n\nexport function getFirstNoneTerminal(definition: IProduction[]): Rule[] {\n let result: Rule[] = [];\n if (isEmpty(definition)) {\n return result;\n }\n const firstProd = first(definition);\n\n /* istanbul ignore else */\n if (firstProd instanceof NonTerminal) {\n result.push(firstProd.referencedRule);\n } else if (\n firstProd instanceof AlternativeGAST ||\n firstProd instanceof Option ||\n firstProd instanceof RepetitionMandatory ||\n firstProd instanceof RepetitionMandatoryWithSeparator ||\n firstProd instanceof RepetitionWithSeparator ||\n firstProd instanceof Repetition\n ) {\n result = result.concat(\n getFirstNoneTerminal(firstProd.definition),\n );\n } else if (firstProd instanceof Alternation) {\n // each sub definition in alternation is a FLAT\n result = flatten(\n map(firstProd.definition, (currSubDef) =>\n getFirstNoneTerminal((currSubDef).definition),\n ),\n );\n } else if (firstProd instanceof Terminal) {\n // nothing to see, move along\n } else {\n throw Error(\"non exhaustive match\");\n }\n\n const isFirstOptional = isOptionalProd(firstProd);\n const hasMore = definition.length > 1;\n if (isFirstOptional && hasMore) {\n const rest = drop(definition);\n return result.concat(getFirstNoneTerminal(rest));\n } else {\n return result;\n }\n}\n\nclass OrCollector extends GAstVisitor {\n public alternations: Alternation[] = [];\n\n public visitAlternation(node: Alternation): void {\n this.alternations.push(node);\n }\n}\n\nexport function validateEmptyOrAlternative(\n topLevelRule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserEmptyAlternativeDefinitionError[] {\n const orCollector = new OrCollector();\n topLevelRule.accept(orCollector);\n const ors = orCollector.alternations;\n\n const errors = flatMap(\n ors,\n (currOr) => {\n const exceptLast = dropRight(currOr.definition);\n return flatMap(exceptLast, (currAlternative, currAltIdx) => {\n const possibleFirstInAlt = nextPossibleTokensAfter(\n [currAlternative],\n [],\n tokenStructuredMatcher,\n 1,\n );\n if (isEmpty(possibleFirstInAlt)) {\n return [\n {\n message: errMsgProvider.buildEmptyAlternationError({\n topLevelRule: topLevelRule,\n alternation: currOr,\n emptyChoiceIdx: currAltIdx,\n }),\n type: ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,\n ruleName: topLevelRule.name,\n occurrence: currOr.idx,\n alternative: currAltIdx + 1,\n },\n ];\n } else {\n return [];\n }\n });\n },\n );\n\n return errors;\n}\n\nexport function validateAmbiguousAlternationAlternatives(\n topLevelRule: Rule,\n globalMaxLookahead: number,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserAmbiguousAlternativesDefinitionError[] {\n const orCollector = new OrCollector();\n topLevelRule.accept(orCollector);\n let ors = orCollector.alternations;\n\n // New Handling of ignoring ambiguities\n // - https://github.com/chevrotain/chevrotain/issues/869\n ors = reject(ors, (currOr) => currOr.ignoreAmbiguities === true);\n\n const errors = flatMap(ors, (currOr: Alternation) => {\n const currOccurrence = currOr.idx;\n const actualMaxLookahead = currOr.maxLookahead || globalMaxLookahead;\n const alternatives = getLookaheadPathsForOr(\n currOccurrence,\n topLevelRule,\n actualMaxLookahead,\n currOr,\n );\n const altsAmbiguityErrors = checkAlternativesAmbiguities(\n alternatives,\n currOr,\n topLevelRule,\n errMsgProvider,\n );\n const altsPrefixAmbiguityErrors = checkPrefixAlternativesAmbiguities(\n alternatives,\n currOr,\n topLevelRule,\n errMsgProvider,\n );\n\n return altsAmbiguityErrors.concat(altsPrefixAmbiguityErrors);\n });\n\n return errors;\n}\n\nexport class RepetitionCollector extends GAstVisitor {\n public allProductions: (IProductionWithOccurrence & {\n maxLookahead?: number;\n })[] = [];\n\n public visitRepetitionWithSeparator(manySep: RepetitionWithSeparator): void {\n this.allProductions.push(manySep);\n }\n\n public visitRepetitionMandatory(atLeastOne: RepetitionMandatory): void {\n this.allProductions.push(atLeastOne);\n }\n\n public visitRepetitionMandatoryWithSeparator(\n atLeastOneSep: RepetitionMandatoryWithSeparator,\n ): void {\n this.allProductions.push(atLeastOneSep);\n }\n\n public visitRepetition(many: Repetition): void {\n this.allProductions.push(many);\n }\n}\n\nexport function validateTooManyAlts(\n topLevelRule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDefinitionError[] {\n const orCollector = new OrCollector();\n topLevelRule.accept(orCollector);\n const ors = orCollector.alternations;\n\n const errors = flatMap(ors, (currOr) => {\n if (currOr.definition.length > 255) {\n return [\n {\n message: errMsgProvider.buildTooManyAlternativesError({\n topLevelRule: topLevelRule,\n alternation: currOr,\n }),\n type: ParserDefinitionErrorType.TOO_MANY_ALTS,\n ruleName: topLevelRule.name,\n occurrence: currOr.idx,\n },\n ];\n } else {\n return [];\n }\n });\n\n return errors;\n}\n\nexport function validateSomeNonEmptyLookaheadPath(\n topLevelRules: Rule[],\n maxLookahead: number,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDefinitionError[] {\n const errors: IParserDefinitionError[] = [];\n forEach(topLevelRules, (currTopRule) => {\n const collectorVisitor = new RepetitionCollector();\n currTopRule.accept(collectorVisitor);\n const allRuleProductions = collectorVisitor.allProductions;\n forEach(allRuleProductions, (currProd) => {\n const prodType = getProdType(currProd);\n const actualMaxLookahead = currProd.maxLookahead || maxLookahead;\n const currOccurrence = currProd.idx;\n const paths = getLookaheadPathsForOptionalProd(\n currOccurrence,\n currTopRule,\n prodType,\n actualMaxLookahead,\n );\n const pathsInsideProduction = paths[0];\n if (isEmpty(flatten(pathsInsideProduction))) {\n const errMsg = errMsgProvider.buildEmptyRepetitionError({\n topLevelRule: currTopRule,\n repetition: currProd,\n });\n errors.push({\n message: errMsg,\n type: ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,\n ruleName: currTopRule.name,\n });\n }\n });\n });\n\n return errors;\n}\n\nexport interface IAmbiguityDescriptor {\n alts: number[];\n path: TokenType[];\n}\n\nfunction checkAlternativesAmbiguities(\n alternatives: Alternative[],\n alternation: Alternation,\n rule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserAmbiguousAlternativesDefinitionError[] {\n const foundAmbiguousPaths: Alternative = [];\n const identicalAmbiguities = reduce(\n alternatives,\n (result, currAlt, currAltIdx) => {\n // ignore (skip) ambiguities with this alternative\n if (alternation.definition[currAltIdx].ignoreAmbiguities === true) {\n return result;\n }\n\n forEach(currAlt, (currPath) => {\n const altsCurrPathAppearsIn = [currAltIdx];\n forEach(alternatives, (currOtherAlt, currOtherAltIdx) => {\n if (\n currAltIdx !== currOtherAltIdx &&\n containsPath(currOtherAlt, currPath) &&\n // ignore (skip) ambiguities with this \"other\" alternative\n alternation.definition[currOtherAltIdx].ignoreAmbiguities !== true\n ) {\n altsCurrPathAppearsIn.push(currOtherAltIdx);\n }\n });\n\n if (\n altsCurrPathAppearsIn.length > 1 &&\n !containsPath(foundAmbiguousPaths, currPath)\n ) {\n foundAmbiguousPaths.push(currPath);\n result.push({\n alts: altsCurrPathAppearsIn,\n path: currPath,\n });\n }\n });\n return result;\n },\n [] as { alts: number[]; path: TokenType[] }[],\n );\n\n const currErrors = map(identicalAmbiguities, (currAmbDescriptor) => {\n const ambgIndices = map(\n currAmbDescriptor.alts,\n (currAltIdx) => currAltIdx + 1,\n );\n\n const currMessage = errMsgProvider.buildAlternationAmbiguityError({\n topLevelRule: rule,\n alternation: alternation,\n ambiguityIndices: ambgIndices,\n prefixPath: currAmbDescriptor.path,\n });\n\n return {\n message: currMessage,\n type: ParserDefinitionErrorType.AMBIGUOUS_ALTS,\n ruleName: rule.name,\n occurrence: alternation.idx,\n alternatives: currAmbDescriptor.alts,\n };\n });\n\n return currErrors;\n}\n\nexport function checkPrefixAlternativesAmbiguities(\n alternatives: Alternative[],\n alternation: Alternation,\n rule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserAmbiguousAlternativesDefinitionError[] {\n // flatten\n const pathsAndIndices = reduce(\n alternatives,\n (result, currAlt, idx) => {\n const currPathsAndIdx = map(currAlt, (currPath) => {\n return { idx: idx, path: currPath };\n });\n return result.concat(currPathsAndIdx);\n },\n [] as { idx: number; path: TokenType[] }[],\n );\n\n const errors = compact(\n flatMap(pathsAndIndices, (currPathAndIdx) => {\n const alternativeGast = alternation.definition[currPathAndIdx.idx];\n // ignore (skip) ambiguities with this alternative\n if (alternativeGast.ignoreAmbiguities === true) {\n return [];\n }\n const targetIdx = currPathAndIdx.idx;\n const targetPath = currPathAndIdx.path;\n\n const prefixAmbiguitiesPathsAndIndices = filter(\n pathsAndIndices,\n (searchPathAndIdx) => {\n // prefix ambiguity can only be created from lower idx (higher priority) path\n return (\n // ignore (skip) ambiguities with this \"other\" alternative\n alternation.definition[searchPathAndIdx.idx].ignoreAmbiguities !==\n true &&\n searchPathAndIdx.idx < targetIdx &&\n // checking for strict prefix because identical lookaheads\n // will be be detected using a different validation.\n isStrictPrefixOfPath(searchPathAndIdx.path, targetPath)\n );\n },\n );\n\n const currPathPrefixErrors = map(\n prefixAmbiguitiesPathsAndIndices,\n (currAmbPathAndIdx): IParserAmbiguousAlternativesDefinitionError => {\n const ambgIndices = [currAmbPathAndIdx.idx + 1, targetIdx + 1];\n const occurrence = alternation.idx === 0 ? \"\" : alternation.idx;\n\n const message = errMsgProvider.buildAlternationPrefixAmbiguityError({\n topLevelRule: rule,\n alternation: alternation,\n ambiguityIndices: ambgIndices,\n prefixPath: currAmbPathAndIdx.path,\n });\n return {\n message: message,\n type: ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,\n ruleName: rule.name,\n occurrence: occurrence,\n alternatives: ambgIndices,\n };\n },\n );\n\n return currPathPrefixErrors;\n }),\n );\n\n return errors;\n}\n\nfunction checkTerminalAndNoneTerminalsNameSpace(\n topLevels: Rule[],\n tokenTypes: TokenType[],\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDefinitionError[] {\n const errors: IParserDefinitionError[] = [];\n\n const tokenNames = map(tokenTypes, (currToken) => currToken.name);\n\n forEach(topLevels, (currRule) => {\n const currRuleName = currRule.name;\n if (includes(tokenNames, currRuleName)) {\n const errMsg = errMsgProvider.buildNamespaceConflictError(currRule);\n\n errors.push({\n message: errMsg,\n type: ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,\n ruleName: currRuleName,\n });\n }\n });\n\n return errors;\n}\n", "import { Rule } from \"@chevrotain/gast\";\nimport { defaults, forEach } from \"lodash-es\";\nimport { resolveGrammar as orgResolveGrammar } from \"../resolver.js\";\nimport { validateGrammar as orgValidateGrammar } from \"../checks.js\";\nimport {\n defaultGrammarResolverErrorProvider,\n defaultGrammarValidatorErrorProvider,\n} from \"../../errors_public.js\";\nimport { TokenType } from \"@chevrotain/types\";\nimport {\n IGrammarResolverErrorMessageProvider,\n IGrammarValidatorErrorMessageProvider,\n IParserDefinitionError,\n} from \"../types.js\";\n\ntype ResolveGrammarOpts = {\n rules: Rule[];\n errMsgProvider?: IGrammarResolverErrorMessageProvider;\n};\nexport function resolveGrammar(\n options: ResolveGrammarOpts,\n): IParserDefinitionError[] {\n const actualOptions: Required = defaults(options, {\n errMsgProvider: defaultGrammarResolverErrorProvider,\n });\n\n const topRulesTable: { [ruleName: string]: Rule } = {};\n forEach(options.rules, (rule) => {\n topRulesTable[rule.name] = rule;\n });\n return orgResolveGrammar(topRulesTable, actualOptions.errMsgProvider);\n}\n\nexport function validateGrammar(options: {\n rules: Rule[];\n tokenTypes: TokenType[];\n grammarName: string;\n errMsgProvider: IGrammarValidatorErrorMessageProvider;\n}): IParserDefinitionError[] {\n options = defaults(options, {\n errMsgProvider: defaultGrammarValidatorErrorProvider,\n });\n\n return orgValidateGrammar(\n options.rules,\n options.tokenTypes,\n options.errMsgProvider,\n options.grammarName,\n );\n}\n", "import { includes } from \"lodash-es\";\nimport {\n IRecognitionException,\n IRecognizerContext,\n IToken,\n} from \"@chevrotain/types\";\n\nconst MISMATCHED_TOKEN_EXCEPTION = \"MismatchedTokenException\";\nconst NO_VIABLE_ALT_EXCEPTION = \"NoViableAltException\";\nconst EARLY_EXIT_EXCEPTION = \"EarlyExitException\";\nconst NOT_ALL_INPUT_PARSED_EXCEPTION = \"NotAllInputParsedException\";\n\nconst RECOGNITION_EXCEPTION_NAMES = [\n MISMATCHED_TOKEN_EXCEPTION,\n NO_VIABLE_ALT_EXCEPTION,\n EARLY_EXIT_EXCEPTION,\n NOT_ALL_INPUT_PARSED_EXCEPTION,\n];\n\nObject.freeze(RECOGNITION_EXCEPTION_NAMES);\n\n// hacks to bypass no support for custom Errors in javascript/typescript\nexport function isRecognitionException(error: Error) {\n // can't do instanceof on hacked custom js exceptions\n return includes(RECOGNITION_EXCEPTION_NAMES, error.name);\n}\n\nabstract class RecognitionException\n extends Error\n implements IRecognitionException\n{\n context: IRecognizerContext;\n resyncedTokens: IToken[] = [];\n\n protected constructor(\n message: string,\n public token: IToken,\n ) {\n super(message);\n\n // fix prototype chain when typescript target is ES5\n Object.setPrototypeOf(this, new.target.prototype);\n\n /* istanbul ignore next - V8 workaround to remove constructor from stacktrace when typescript target is ES5 */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n\nexport class MismatchedTokenException extends RecognitionException {\n constructor(\n message: string,\n token: IToken,\n public previousToken: IToken,\n ) {\n super(message, token);\n this.name = MISMATCHED_TOKEN_EXCEPTION;\n }\n}\n\nexport class NoViableAltException extends RecognitionException {\n constructor(\n message: string,\n token: IToken,\n public previousToken: IToken,\n ) {\n super(message, token);\n this.name = NO_VIABLE_ALT_EXCEPTION;\n }\n}\n\nexport class NotAllInputParsedException extends RecognitionException {\n constructor(message: string, token: IToken) {\n super(message, token);\n this.name = NOT_ALL_INPUT_PARSED_EXCEPTION;\n }\n}\n\nexport class EarlyExitException extends RecognitionException {\n constructor(\n message: string,\n token: IToken,\n public previousToken: IToken,\n ) {\n super(message, token);\n this.name = EARLY_EXIT_EXCEPTION;\n }\n}\n", "import {\n createTokenInstance,\n EOF,\n tokenMatcher,\n} from \"../../../scan/tokens_public.js\";\nimport {\n AbstractNextTerminalAfterProductionWalker,\n IFirstAfterRepetition,\n} from \"../../grammar/interpreter.js\";\nimport {\n clone,\n dropRight,\n find,\n flatten,\n has,\n includes,\n isEmpty,\n map,\n} from \"lodash-es\";\nimport {\n IParserConfig,\n IToken,\n ITokenGrammarPath,\n TokenType,\n} from \"@chevrotain/types\";\nimport { MismatchedTokenException } from \"../../exceptions_public.js\";\nimport { IN } from \"../../constants.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\n\nexport const EOF_FOLLOW_KEY: any = {};\n\nexport interface IFollowKey {\n ruleName: string;\n idxInCallingRule: number;\n inRule: string;\n}\n\nexport const IN_RULE_RECOVERY_EXCEPTION = \"InRuleRecoveryException\";\n\nexport class InRuleRecoveryException extends Error {\n constructor(message: string) {\n super(message);\n this.name = IN_RULE_RECOVERY_EXCEPTION;\n }\n}\n\n/**\n * This trait is responsible for the error recovery and fault tolerant logic\n */\nexport class Recoverable {\n recoveryEnabled: boolean;\n firstAfterRepMap: Record;\n resyncFollows: Record;\n\n initRecoverable(config: IParserConfig) {\n this.firstAfterRepMap = {};\n this.resyncFollows = {};\n\n this.recoveryEnabled = has(config, \"recoveryEnabled\")\n ? (config.recoveryEnabled as boolean) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.recoveryEnabled;\n\n // performance optimization, NOOP will be inlined which\n // effectively means that this optional feature does not exist\n // when not used.\n if (this.recoveryEnabled) {\n this.attemptInRepetitionRecovery = attemptInRepetitionRecovery;\n }\n }\n\n public getTokenToInsert(tokType: TokenType): IToken {\n const tokToInsert = createTokenInstance(\n tokType,\n \"\",\n NaN,\n NaN,\n NaN,\n NaN,\n NaN,\n NaN,\n );\n tokToInsert.isInsertedInRecovery = true;\n return tokToInsert;\n }\n\n public canTokenTypeBeInsertedInRecovery(tokType: TokenType): boolean {\n return true;\n }\n\n public canTokenTypeBeDeletedInRecovery(tokType: TokenType): boolean {\n return true;\n }\n\n tryInRepetitionRecovery(\n this: MixedInParser,\n grammarRule: Function,\n grammarRuleArgs: any[],\n lookAheadFunc: () => boolean,\n expectedTokType: TokenType,\n ): void {\n // TODO: can the resyncTokenType be cached?\n const reSyncTokType = this.findReSyncTokenType();\n const savedLexerState = this.exportLexerState();\n const resyncedTokens: IToken[] = [];\n let passedResyncPoint = false;\n\n const nextTokenWithoutResync = this.LA(1);\n let currToken = this.LA(1);\n\n const generateErrorMessage = () => {\n const previousToken = this.LA(0);\n // we are preemptively re-syncing before an error has been detected, therefor we must reproduce\n // the error that would have been thrown\n const msg = this.errorMessageProvider.buildMismatchTokenMessage({\n expected: expectedTokType,\n actual: nextTokenWithoutResync,\n previous: previousToken,\n ruleName: this.getCurrRuleFullName(),\n });\n const error = new MismatchedTokenException(\n msg,\n nextTokenWithoutResync,\n this.LA(0),\n );\n // the first token here will be the original cause of the error, this is not part of the resyncedTokens property.\n error.resyncedTokens = dropRight(resyncedTokens);\n this.SAVE_ERROR(error);\n };\n\n while (!passedResyncPoint) {\n // re-synced to a point where we can safely exit the repetition/\n if (this.tokenMatcher(currToken, expectedTokType)) {\n generateErrorMessage();\n return; // must return here to avoid reverting the inputIdx\n } else if (lookAheadFunc.call(this)) {\n // we skipped enough tokens so we can resync right back into another iteration of the repetition grammar rule\n generateErrorMessage();\n // recursive invocation in other to support multiple re-syncs in the same top level repetition grammar rule\n grammarRule.apply(this, grammarRuleArgs);\n return; // must return here to avoid reverting the inputIdx\n } else if (this.tokenMatcher(currToken, reSyncTokType)) {\n passedResyncPoint = true;\n } else {\n currToken = this.SKIP_TOKEN();\n this.addToResyncTokens(currToken, resyncedTokens);\n }\n }\n\n // we were unable to find a CLOSER point to resync inside the Repetition, reset the state.\n // The parsing exception we were trying to prevent will happen in the NEXT parsing step. it may be handled by\n // \"between rules\" resync recovery later in the flow.\n this.importLexerState(savedLexerState);\n }\n\n shouldInRepetitionRecoveryBeTried(\n this: MixedInParser,\n expectTokAfterLastMatch: TokenType,\n nextTokIdx: number,\n notStuck: boolean | undefined,\n ): boolean {\n // Edge case of arriving from a MANY repetition which is stuck\n // Attempting recovery in this case could cause an infinite loop\n if (notStuck === false) {\n return false;\n }\n\n // no need to recover, next token is what we expect...\n if (this.tokenMatcher(this.LA(1), expectTokAfterLastMatch)) {\n return false;\n }\n\n // error recovery is disabled during backtracking as it can make the parser ignore a valid grammar path\n // and prefer some backtracking path that includes recovered errors.\n if (this.isBackTracking()) {\n return false;\n }\n\n // if we can perform inRule recovery (single token insertion or deletion) we always prefer that recovery algorithm\n // because if it works, it makes the least amount of changes to the input stream (greedy algorithm)\n //noinspection RedundantIfStatementJS\n if (\n this.canPerformInRuleRecovery(\n expectTokAfterLastMatch,\n this.getFollowsForInRuleRecovery(expectTokAfterLastMatch, nextTokIdx),\n )\n ) {\n return false;\n }\n\n return true;\n }\n\n // Error Recovery functionality\n getFollowsForInRuleRecovery(\n this: MixedInParser,\n tokType: TokenType,\n tokIdxInRule: number,\n ): TokenType[] {\n const grammarPath = this.getCurrentGrammarPath(tokType, tokIdxInRule);\n const follows = this.getNextPossibleTokenTypes(grammarPath);\n return follows;\n }\n\n tryInRuleRecovery(\n this: MixedInParser,\n expectedTokType: TokenType,\n follows: TokenType[],\n ): IToken {\n if (this.canRecoverWithSingleTokenInsertion(expectedTokType, follows)) {\n const tokToInsert = this.getTokenToInsert(expectedTokType);\n return tokToInsert;\n }\n\n if (this.canRecoverWithSingleTokenDeletion(expectedTokType)) {\n const nextTok = this.SKIP_TOKEN();\n this.consumeToken();\n return nextTok;\n }\n\n throw new InRuleRecoveryException(\"sad sad panda\");\n }\n\n canPerformInRuleRecovery(\n this: MixedInParser,\n expectedToken: TokenType,\n follows: TokenType[],\n ): boolean {\n return (\n this.canRecoverWithSingleTokenInsertion(expectedToken, follows) ||\n this.canRecoverWithSingleTokenDeletion(expectedToken)\n );\n }\n\n canRecoverWithSingleTokenInsertion(\n this: MixedInParser,\n expectedTokType: TokenType,\n follows: TokenType[],\n ): boolean {\n if (!this.canTokenTypeBeInsertedInRecovery(expectedTokType)) {\n return false;\n }\n\n // must know the possible following tokens to perform single token insertion\n if (isEmpty(follows)) {\n return false;\n }\n\n const mismatchedTok = this.LA(1);\n const isMisMatchedTokInFollows =\n find(follows, (possibleFollowsTokType: TokenType) => {\n return this.tokenMatcher(mismatchedTok, possibleFollowsTokType);\n }) !== undefined;\n\n return isMisMatchedTokInFollows;\n }\n\n canRecoverWithSingleTokenDeletion(\n this: MixedInParser,\n expectedTokType: TokenType,\n ): boolean {\n if (!this.canTokenTypeBeDeletedInRecovery(expectedTokType)) {\n return false;\n }\n\n const isNextTokenWhatIsExpected = this.tokenMatcher(\n this.LA(2),\n expectedTokType,\n );\n return isNextTokenWhatIsExpected;\n }\n\n isInCurrentRuleReSyncSet(\n this: MixedInParser,\n tokenTypeIdx: TokenType,\n ): boolean {\n const followKey = this.getCurrFollowKey();\n const currentRuleReSyncSet = this.getFollowSetFromFollowKey(followKey);\n return includes(currentRuleReSyncSet, tokenTypeIdx);\n }\n\n findReSyncTokenType(this: MixedInParser): TokenType {\n const allPossibleReSyncTokTypes = this.flattenFollowSet();\n // this loop will always terminate as EOF is always in the follow stack and also always (virtually) in the input\n let nextToken = this.LA(1);\n let k = 2;\n while (true) {\n const foundMatch = find(allPossibleReSyncTokTypes, (resyncTokType) => {\n const canMatch = tokenMatcher(nextToken, resyncTokType);\n return canMatch;\n });\n if (foundMatch !== undefined) {\n return foundMatch;\n }\n nextToken = this.LA(k);\n k++;\n }\n }\n\n getCurrFollowKey(this: MixedInParser): IFollowKey {\n // the length is at least one as we always add the ruleName to the stack before invoking the rule.\n if (this.RULE_STACK.length === 1) {\n return EOF_FOLLOW_KEY;\n }\n const currRuleShortName = this.getLastExplicitRuleShortName();\n const currRuleIdx = this.getLastExplicitRuleOccurrenceIndex();\n const prevRuleShortName = this.getPreviousExplicitRuleShortName();\n\n return {\n ruleName: this.shortRuleNameToFullName(currRuleShortName),\n idxInCallingRule: currRuleIdx,\n inRule: this.shortRuleNameToFullName(prevRuleShortName),\n };\n }\n\n buildFullFollowKeyStack(this: MixedInParser): IFollowKey[] {\n const explicitRuleStack = this.RULE_STACK;\n const explicitOccurrenceStack = this.RULE_OCCURRENCE_STACK;\n\n return map(explicitRuleStack, (ruleName, idx) => {\n if (idx === 0) {\n return EOF_FOLLOW_KEY;\n }\n return {\n ruleName: this.shortRuleNameToFullName(ruleName),\n idxInCallingRule: explicitOccurrenceStack[idx],\n inRule: this.shortRuleNameToFullName(explicitRuleStack[idx - 1]),\n };\n });\n }\n\n flattenFollowSet(this: MixedInParser): TokenType[] {\n const followStack = map(this.buildFullFollowKeyStack(), (currKey) => {\n return this.getFollowSetFromFollowKey(currKey);\n });\n return flatten(followStack);\n }\n\n getFollowSetFromFollowKey(\n this: MixedInParser,\n followKey: IFollowKey,\n ): TokenType[] {\n if (followKey === EOF_FOLLOW_KEY) {\n return [EOF];\n }\n\n const followName =\n followKey.ruleName + followKey.idxInCallingRule + IN + followKey.inRule;\n\n return this.resyncFollows[followName];\n }\n\n // It does not make any sense to include a virtual EOF token in the list of resynced tokens\n // as EOF does not really exist and thus does not contain any useful information (line/column numbers)\n addToResyncTokens(\n this: MixedInParser,\n token: IToken,\n resyncTokens: IToken[],\n ): IToken[] {\n if (!this.tokenMatcher(token, EOF)) {\n resyncTokens.push(token);\n }\n return resyncTokens;\n }\n\n reSyncTo(this: MixedInParser, tokType: TokenType): IToken[] {\n const resyncedTokens: IToken[] = [];\n let nextTok = this.LA(1);\n while (this.tokenMatcher(nextTok, tokType) === false) {\n nextTok = this.SKIP_TOKEN();\n this.addToResyncTokens(nextTok, resyncedTokens);\n }\n // the last token is not part of the error.\n return dropRight(resyncedTokens);\n }\n\n attemptInRepetitionRecovery(\n this: MixedInParser,\n prodFunc: Function,\n args: any[],\n lookaheadFunc: () => boolean,\n dslMethodIdx: number,\n prodOccurrence: number,\n nextToksWalker: typeof AbstractNextTerminalAfterProductionWalker,\n notStuck?: boolean,\n ): void {\n // by default this is a NO-OP\n // The actual implementation is with the function(not method) below\n }\n\n getCurrentGrammarPath(\n this: MixedInParser,\n tokType: TokenType,\n tokIdxInRule: number,\n ): ITokenGrammarPath {\n const pathRuleStack: string[] = this.getHumanReadableRuleStack();\n const pathOccurrenceStack: number[] = clone(this.RULE_OCCURRENCE_STACK);\n const grammarPath: any = {\n ruleStack: pathRuleStack,\n occurrenceStack: pathOccurrenceStack,\n lastTok: tokType,\n lastTokOccurrence: tokIdxInRule,\n };\n\n return grammarPath;\n }\n getHumanReadableRuleStack(this: MixedInParser): string[] {\n return map(this.RULE_STACK, (currShortName) =>\n this.shortRuleNameToFullName(currShortName),\n );\n }\n}\n\nexport function attemptInRepetitionRecovery(\n this: MixedInParser,\n prodFunc: Function,\n args: any[],\n lookaheadFunc: () => boolean,\n dslMethodIdx: number,\n prodOccurrence: number,\n nextToksWalker: typeof AbstractNextTerminalAfterProductionWalker,\n notStuck?: boolean,\n): void {\n const key = this.getKeyForAutomaticLookahead(dslMethodIdx, prodOccurrence);\n let firstAfterRepInfo = this.firstAfterRepMap[key];\n if (firstAfterRepInfo === undefined) {\n const currRuleName = this.getCurrRuleFullName();\n const ruleGrammar = this.getGAstProductions()[currRuleName];\n const walker: AbstractNextTerminalAfterProductionWalker =\n new nextToksWalker(ruleGrammar, prodOccurrence);\n firstAfterRepInfo = walker.startWalking();\n this.firstAfterRepMap[key] = firstAfterRepInfo;\n }\n\n let expectTokAfterLastMatch = firstAfterRepInfo.token;\n let nextTokIdx = firstAfterRepInfo.occurrence;\n const isEndOfRule = firstAfterRepInfo.isEndOfRule;\n\n // special edge case of a TOP most repetition after which the input should END.\n // this will force an attempt for inRule recovery in that scenario.\n if (\n this.RULE_STACK.length === 1 &&\n isEndOfRule &&\n expectTokAfterLastMatch === undefined\n ) {\n expectTokAfterLastMatch = EOF;\n nextTokIdx = 1;\n }\n\n // We don't have anything to re-sync to...\n // this condition was extracted from `shouldInRepetitionRecoveryBeTried` to act as a type-guard\n if (expectTokAfterLastMatch === undefined || nextTokIdx === undefined) {\n return;\n }\n\n if (\n this.shouldInRepetitionRecoveryBeTried(\n expectTokAfterLastMatch,\n nextTokIdx,\n notStuck,\n )\n ) {\n // TODO: performance optimization: instead of passing the original args here, we modify\n // the args param (or create a new one) and make sure the lookahead func is explicitly provided\n // to avoid searching the cache for it once more.\n this.tryInRepetitionRecovery(\n prodFunc,\n args,\n lookaheadFunc,\n expectTokAfterLastMatch,\n );\n }\n}\n", "// Lookahead keys are 32Bit integers in the form\n// TTTTTTTT-ZZZZZZZZZZZZ-YYYY-XXXXXXXX\n// XXXX -> Occurrence Index bitmap.\n// YYYY -> DSL Method Type bitmap.\n// ZZZZZZZZZZZZZZZ -> Rule short Index bitmap.\n// TTTTTTTTT -> alternation alternative index bitmap\n\nexport const BITS_FOR_METHOD_TYPE = 4;\nexport const BITS_FOR_OCCURRENCE_IDX = 8;\nexport const BITS_FOR_RULE_IDX = 12;\n// TODO: validation, this means that there may at most 2^8 --> 256 alternatives for an alternation.\nexport const BITS_FOR_ALT_IDX = 8;\n\n// short string used as part of mapping keys.\n// being short improves the performance when composing KEYS for maps out of these\n// The 5 - 8 bits (16 possible values, are reserved for the DSL method indices)\nexport const OR_IDX = 1 << BITS_FOR_OCCURRENCE_IDX;\nexport const OPTION_IDX = 2 << BITS_FOR_OCCURRENCE_IDX;\nexport const MANY_IDX = 3 << BITS_FOR_OCCURRENCE_IDX;\nexport const AT_LEAST_ONE_IDX = 4 << BITS_FOR_OCCURRENCE_IDX;\nexport const MANY_SEP_IDX = 5 << BITS_FOR_OCCURRENCE_IDX;\nexport const AT_LEAST_ONE_SEP_IDX = 6 << BITS_FOR_OCCURRENCE_IDX;\n\n// this actually returns a number, but it is always used as a string (object prop key)\nexport function getKeyForAutomaticLookahead(\n ruleIdx: number,\n dslMethodIdx: number,\n occurrence: number,\n): number {\n return occurrence | dslMethodIdx | ruleIdx;\n}\n\nconst BITS_START_FOR_ALT_IDX = 32 - BITS_FOR_ALT_IDX;\n", "import {\n ILookaheadStrategy,\n ILookaheadValidationError,\n IOrAlt,\n OptionalProductionType,\n Rule,\n TokenType,\n} from \"@chevrotain/types\";\nimport { flatMap, isEmpty } from \"lodash-es\";\nimport { defaultGrammarValidatorErrorProvider } from \"../errors_public.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser/parser.js\";\nimport {\n validateAmbiguousAlternationAlternatives,\n validateEmptyOrAlternative,\n validateNoLeftRecursion,\n validateSomeNonEmptyLookaheadPath,\n} from \"./checks.js\";\nimport {\n buildAlternativesLookAheadFunc,\n buildLookaheadFuncForOptionalProd,\n buildLookaheadFuncForOr,\n buildSingleAlternativeLookaheadFunction,\n getProdType,\n} from \"./lookahead.js\";\nimport { IParserDefinitionError } from \"./types.js\";\n\nexport class LLkLookaheadStrategy implements ILookaheadStrategy {\n readonly maxLookahead: number;\n\n constructor(options?: { maxLookahead?: number }) {\n this.maxLookahead =\n options?.maxLookahead ?? DEFAULT_PARSER_CONFIG.maxLookahead;\n }\n\n validate(options: {\n rules: Rule[];\n tokenTypes: TokenType[];\n grammarName: string;\n }): ILookaheadValidationError[] {\n const leftRecursionErrors = this.validateNoLeftRecursion(options.rules);\n\n if (isEmpty(leftRecursionErrors)) {\n const emptyAltErrors = this.validateEmptyOrAlternatives(options.rules);\n const ambiguousAltsErrors = this.validateAmbiguousAlternationAlternatives(\n options.rules,\n this.maxLookahead,\n );\n const emptyRepetitionErrors = this.validateSomeNonEmptyLookaheadPath(\n options.rules,\n this.maxLookahead,\n );\n const allErrors = [\n ...leftRecursionErrors,\n ...emptyAltErrors,\n ...ambiguousAltsErrors,\n ...emptyRepetitionErrors,\n ];\n return allErrors;\n }\n return leftRecursionErrors;\n }\n\n validateNoLeftRecursion(rules: Rule[]): IParserDefinitionError[] {\n return flatMap(rules, (currTopRule) =>\n validateNoLeftRecursion(\n currTopRule,\n currTopRule,\n defaultGrammarValidatorErrorProvider,\n ),\n );\n }\n\n validateEmptyOrAlternatives(rules: Rule[]): IParserDefinitionError[] {\n return flatMap(rules, (currTopRule) =>\n validateEmptyOrAlternative(\n currTopRule,\n defaultGrammarValidatorErrorProvider,\n ),\n );\n }\n\n validateAmbiguousAlternationAlternatives(\n rules: Rule[],\n maxLookahead: number,\n ): IParserDefinitionError[] {\n return flatMap(rules, (currTopRule) =>\n validateAmbiguousAlternationAlternatives(\n currTopRule,\n maxLookahead,\n defaultGrammarValidatorErrorProvider,\n ),\n );\n }\n\n validateSomeNonEmptyLookaheadPath(\n rules: Rule[],\n maxLookahead: number,\n ): IParserDefinitionError[] {\n return validateSomeNonEmptyLookaheadPath(\n rules,\n maxLookahead,\n defaultGrammarValidatorErrorProvider,\n );\n }\n\n buildLookaheadForAlternation(options: {\n prodOccurrence: number;\n rule: Rule;\n maxLookahead: number;\n hasPredicates: boolean;\n dynamicTokensEnabled: boolean;\n }): (orAlts?: IOrAlt[] | undefined) => number | undefined {\n return buildLookaheadFuncForOr(\n options.prodOccurrence,\n options.rule,\n options.maxLookahead,\n options.hasPredicates,\n options.dynamicTokensEnabled,\n buildAlternativesLookAheadFunc,\n );\n }\n\n buildLookaheadForOptional(options: {\n prodOccurrence: number;\n prodType: OptionalProductionType;\n rule: Rule;\n maxLookahead: number;\n dynamicTokensEnabled: boolean;\n }): () => boolean {\n return buildLookaheadFuncForOptionalProd(\n options.prodOccurrence,\n options.rule,\n options.maxLookahead,\n options.dynamicTokensEnabled,\n getProdType(options.prodType),\n buildSingleAlternativeLookaheadFunction,\n );\n }\n}\n", "import { forEach, has } from \"lodash-es\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\nimport {\n ILookaheadStrategy,\n IParserConfig,\n OptionalProductionType,\n} from \"@chevrotain/types\";\nimport {\n AT_LEAST_ONE_IDX,\n AT_LEAST_ONE_SEP_IDX,\n getKeyForAutomaticLookahead,\n MANY_IDX,\n MANY_SEP_IDX,\n OPTION_IDX,\n OR_IDX,\n} from \"../../grammar/keys.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport {\n Alternation,\n GAstVisitor,\n getProductionDslName,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n} from \"@chevrotain/gast\";\nimport { LLkLookaheadStrategy } from \"../../grammar/llk_lookahead.js\";\n\n/**\n * Trait responsible for the lookahead related utilities and optimizations.\n */\nexport class LooksAhead {\n maxLookahead: number;\n lookAheadFuncsCache: any;\n dynamicTokensEnabled: boolean;\n lookaheadStrategy: ILookaheadStrategy;\n\n initLooksAhead(config: IParserConfig) {\n this.dynamicTokensEnabled = has(config, \"dynamicTokensEnabled\")\n ? (config.dynamicTokensEnabled as boolean) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.dynamicTokensEnabled;\n\n this.maxLookahead = has(config, \"maxLookahead\")\n ? (config.maxLookahead as number) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.maxLookahead;\n\n this.lookaheadStrategy = has(config, \"lookaheadStrategy\")\n ? (config.lookaheadStrategy as ILookaheadStrategy) // assumes end user provides the correct config value/type\n : new LLkLookaheadStrategy({ maxLookahead: this.maxLookahead });\n\n this.lookAheadFuncsCache = new Map();\n }\n\n preComputeLookaheadFunctions(this: MixedInParser, rules: Rule[]): void {\n forEach(rules, (currRule) => {\n this.TRACE_INIT(`${currRule.name} Rule Lookahead`, () => {\n const {\n alternation,\n repetition,\n option,\n repetitionMandatory,\n repetitionMandatoryWithSeparator,\n repetitionWithSeparator,\n } = collectMethods(currRule);\n\n forEach(alternation, (currProd) => {\n const prodIdx = currProd.idx === 0 ? \"\" : currProd.idx;\n this.TRACE_INIT(`${getProductionDslName(currProd)}${prodIdx}`, () => {\n const laFunc = this.lookaheadStrategy.buildLookaheadForAlternation({\n prodOccurrence: currProd.idx,\n rule: currRule,\n maxLookahead: currProd.maxLookahead || this.maxLookahead,\n hasPredicates: currProd.hasPredicates,\n dynamicTokensEnabled: this.dynamicTokensEnabled,\n });\n\n const key = getKeyForAutomaticLookahead(\n this.fullRuleNameToShort[currRule.name],\n OR_IDX,\n currProd.idx,\n );\n this.setLaFuncCache(key, laFunc);\n });\n });\n\n forEach(repetition, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n MANY_IDX,\n \"Repetition\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n\n forEach(option, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n OPTION_IDX,\n \"Option\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n\n forEach(repetitionMandatory, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n AT_LEAST_ONE_IDX,\n \"RepetitionMandatory\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n\n forEach(repetitionMandatoryWithSeparator, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n AT_LEAST_ONE_SEP_IDX,\n \"RepetitionMandatoryWithSeparator\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n\n forEach(repetitionWithSeparator, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n MANY_SEP_IDX,\n \"RepetitionWithSeparator\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n });\n });\n }\n\n computeLookaheadFunc(\n this: MixedInParser,\n rule: Rule,\n prodOccurrence: number,\n prodKey: number,\n prodType: OptionalProductionType,\n prodMaxLookahead: number | undefined,\n dslMethodName: string,\n ): void {\n this.TRACE_INIT(\n `${dslMethodName}${prodOccurrence === 0 ? \"\" : prodOccurrence}`,\n () => {\n const laFunc = this.lookaheadStrategy.buildLookaheadForOptional({\n prodOccurrence,\n rule,\n maxLookahead: prodMaxLookahead || this.maxLookahead,\n dynamicTokensEnabled: this.dynamicTokensEnabled,\n prodType,\n });\n const key = getKeyForAutomaticLookahead(\n this.fullRuleNameToShort[rule.name],\n prodKey,\n prodOccurrence,\n );\n this.setLaFuncCache(key, laFunc);\n },\n );\n }\n\n // this actually returns a number, but it is always used as a string (object prop key)\n getKeyForAutomaticLookahead(\n this: MixedInParser,\n dslMethodIdx: number,\n occurrence: number,\n ): number {\n const currRuleShortName: any = this.getLastExplicitRuleShortName();\n return getKeyForAutomaticLookahead(\n currRuleShortName,\n dslMethodIdx,\n occurrence,\n );\n }\n\n getLaFuncFromCache(this: MixedInParser, key: number): Function {\n return this.lookAheadFuncsCache.get(key);\n }\n\n /* istanbul ignore next */\n setLaFuncCache(this: MixedInParser, key: number, value: Function): void {\n this.lookAheadFuncsCache.set(key, value);\n }\n}\n\nclass DslMethodsCollectorVisitor extends GAstVisitor {\n public dslMethods: {\n option: Option[];\n alternation: Alternation[];\n repetition: Repetition[];\n repetitionWithSeparator: RepetitionWithSeparator[];\n repetitionMandatory: RepetitionMandatory[];\n repetitionMandatoryWithSeparator: RepetitionMandatoryWithSeparator[];\n } = {\n option: [],\n alternation: [],\n repetition: [],\n repetitionWithSeparator: [],\n repetitionMandatory: [],\n repetitionMandatoryWithSeparator: [],\n };\n\n reset() {\n this.dslMethods = {\n option: [],\n alternation: [],\n repetition: [],\n repetitionWithSeparator: [],\n repetitionMandatory: [],\n repetitionMandatoryWithSeparator: [],\n };\n }\n\n public visitOption(option: Option): void {\n this.dslMethods.option.push(option);\n }\n\n public visitRepetitionWithSeparator(manySep: RepetitionWithSeparator): void {\n this.dslMethods.repetitionWithSeparator.push(manySep);\n }\n\n public visitRepetitionMandatory(atLeastOne: RepetitionMandatory): void {\n this.dslMethods.repetitionMandatory.push(atLeastOne);\n }\n\n public visitRepetitionMandatoryWithSeparator(\n atLeastOneSep: RepetitionMandatoryWithSeparator,\n ): void {\n this.dslMethods.repetitionMandatoryWithSeparator.push(atLeastOneSep);\n }\n\n public visitRepetition(many: Repetition): void {\n this.dslMethods.repetition.push(many);\n }\n\n public visitAlternation(or: Alternation): void {\n this.dslMethods.alternation.push(or);\n }\n}\n\nconst collectorVisitor = new DslMethodsCollectorVisitor();\nexport function collectMethods(rule: Rule): {\n option: Option[];\n alternation: Alternation[];\n repetition: Repetition[];\n repetitionWithSeparator: RepetitionWithSeparator[];\n repetitionMandatory: RepetitionMandatory[];\n repetitionMandatoryWithSeparator: RepetitionMandatoryWithSeparator[];\n} {\n collectorVisitor.reset();\n rule.accept(collectorVisitor);\n const dslMethods = collectorVisitor.dslMethods;\n // avoid uncleaned references\n collectorVisitor.reset();\n return dslMethods;\n}\n", "import { CstNode, CstNodeLocation, IToken } from \"@chevrotain/types\";\n\n/**\n * This nodeLocation tracking is not efficient and should only be used\n * when error recovery is enabled or the Token Vector contains virtual Tokens\n * (e.g, Python Indent/Outdent)\n * As it executes the calculation for every single terminal/nonTerminal\n * and does not rely on the fact the token vector is **sorted**\n */\nexport function setNodeLocationOnlyOffset(\n currNodeLocation: CstNodeLocation,\n newLocationInfo: Required>,\n): void {\n // First (valid) update for this cst node\n if (isNaN(currNodeLocation.startOffset) === true) {\n // assumption1: Token location information is either NaN or a valid number\n // assumption2: Token location information is fully valid if it exist\n // (both start/end offsets exist and are numbers).\n currNodeLocation.startOffset = newLocationInfo.startOffset;\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n }\n // Once the startOffset has been updated with a valid number it should never receive\n // any farther updates as the Token vector is sorted.\n // We still have to check this this condition for every new possible location info\n // because with error recovery enabled we may encounter invalid tokens (NaN location props)\n else if (currNodeLocation.endOffset! < newLocationInfo.endOffset === true) {\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n }\n}\n\n/**\n * This nodeLocation tracking is not efficient and should only be used\n * when error recovery is enabled or the Token Vector contains virtual Tokens\n * (e.g, Python Indent/Outdent)\n * As it executes the calculation for every single terminal/nonTerminal\n * and does not rely on the fact the token vector is **sorted**\n */\nexport function setNodeLocationFull(\n currNodeLocation: CstNodeLocation,\n newLocationInfo: CstNodeLocation,\n): void {\n // First (valid) update for this cst node\n if (isNaN(currNodeLocation.startOffset) === true) {\n // assumption1: Token location information is either NaN or a valid number\n // assumption2: Token location information is fully valid if it exist\n // (all start/end props exist and are numbers).\n currNodeLocation.startOffset = newLocationInfo.startOffset;\n currNodeLocation.startColumn = newLocationInfo.startColumn;\n currNodeLocation.startLine = newLocationInfo.startLine;\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n currNodeLocation.endColumn = newLocationInfo.endColumn;\n currNodeLocation.endLine = newLocationInfo.endLine;\n }\n // Once the start props has been updated with a valid number it should never receive\n // any farther updates as the Token vector is sorted.\n // We still have to check this this condition for every new possible location info\n // because with error recovery enabled we may encounter invalid tokens (NaN location props)\n else if (currNodeLocation.endOffset! < newLocationInfo.endOffset! === true) {\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n currNodeLocation.endColumn = newLocationInfo.endColumn;\n currNodeLocation.endLine = newLocationInfo.endLine;\n }\n}\n\nexport function addTerminalToCst(\n node: CstNode,\n token: IToken,\n tokenTypeName: string,\n): void {\n if (node.children[tokenTypeName] === undefined) {\n node.children[tokenTypeName] = [token];\n } else {\n node.children[tokenTypeName].push(token);\n }\n}\n\nexport function addNoneTerminalToCst(\n node: CstNode,\n ruleName: string,\n ruleResult: any,\n): void {\n if (node.children[ruleName] === undefined) {\n node.children[ruleName] = [ruleResult];\n } else {\n node.children[ruleName].push(ruleResult);\n }\n}\n", "const NAME = \"name\";\n\nexport function defineNameProp(obj: {}, nameValue: string): void {\n Object.defineProperty(obj, NAME, {\n enumerable: false,\n configurable: true,\n writable: false,\n value: nameValue,\n });\n}\n", "import {\n compact,\n filter,\n forEach,\n isArray,\n isEmpty,\n isFunction,\n isUndefined,\n keys,\n map,\n} from \"lodash-es\";\nimport { defineNameProp } from \"../../lang/lang_extensions.js\";\nimport { CstNode, ICstVisitor } from \"@chevrotain/types\";\n\nexport function defaultVisit(ctx: any, param: IN): void {\n const childrenNames = keys(ctx);\n const childrenNamesLength = childrenNames.length;\n for (let i = 0; i < childrenNamesLength; i++) {\n const currChildName = childrenNames[i];\n const currChildArray = ctx[currChildName];\n const currChildArrayLength = currChildArray.length;\n for (let j = 0; j < currChildArrayLength; j++) {\n const currChild: any = currChildArray[j];\n // distinction between Tokens Children and CstNode children\n if (currChild.tokenTypeIdx === undefined) {\n this[currChild.name](currChild.children, param);\n }\n }\n }\n // defaultVisit does not support generic out param\n}\n\nexport function createBaseSemanticVisitorConstructor(\n grammarName: string,\n ruleNames: string[],\n): {\n new (...args: any[]): ICstVisitor;\n} {\n const derivedConstructor: any = function () {};\n\n // can be overwritten according to:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/\n // name?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FFunction%2Fname\n defineNameProp(derivedConstructor, grammarName + \"BaseSemantics\");\n\n const semanticProto = {\n visit: function (cstNode: CstNode | CstNode[], param: any) {\n // enables writing more concise visitor methods when CstNode has only a single child\n if (isArray(cstNode)) {\n // A CST Node's children dictionary can never have empty arrays as values\n // If a key is defined there will be at least one element in the corresponding value array.\n cstNode = cstNode[0];\n }\n\n // enables passing optional CstNodes concisely.\n if (isUndefined(cstNode)) {\n return undefined;\n }\n\n return this[cstNode.name](cstNode.children, param);\n },\n\n validateVisitor: function () {\n const semanticDefinitionErrors = validateVisitor(this, ruleNames);\n if (!isEmpty(semanticDefinitionErrors)) {\n const errorMessages = map(\n semanticDefinitionErrors,\n (currDefError) => currDefError.msg,\n );\n throw Error(\n `Errors Detected in CST Visitor <${this.constructor.name}>:\\n\\t` +\n `${errorMessages.join(\"\\n\\n\").replace(/\\n/g, \"\\n\\t\")}`,\n );\n }\n },\n };\n\n derivedConstructor.prototype = semanticProto;\n derivedConstructor.prototype.constructor = derivedConstructor;\n\n derivedConstructor._RULE_NAMES = ruleNames;\n\n return derivedConstructor;\n}\n\nexport function createBaseVisitorConstructorWithDefaults(\n grammarName: string,\n ruleNames: string[],\n baseConstructor: Function,\n): {\n new (...args: any[]): ICstVisitor;\n} {\n const derivedConstructor: any = function () {};\n\n // can be overwritten according to:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/\n // name?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FFunction%2Fname\n defineNameProp(derivedConstructor, grammarName + \"BaseSemanticsWithDefaults\");\n\n const withDefaultsProto = Object.create(baseConstructor.prototype);\n forEach(ruleNames, (ruleName) => {\n withDefaultsProto[ruleName] = defaultVisit;\n });\n\n derivedConstructor.prototype = withDefaultsProto;\n derivedConstructor.prototype.constructor = derivedConstructor;\n\n return derivedConstructor;\n}\n\nexport enum CstVisitorDefinitionError {\n REDUNDANT_METHOD,\n MISSING_METHOD,\n}\n\nexport interface IVisitorDefinitionError {\n msg: string;\n type: CstVisitorDefinitionError;\n methodName: string;\n}\n\nexport function validateVisitor(\n visitorInstance: ICstVisitor,\n ruleNames: string[],\n): IVisitorDefinitionError[] {\n const missingErrors = validateMissingCstMethods(visitorInstance, ruleNames);\n\n return missingErrors;\n}\n\nexport function validateMissingCstMethods(\n visitorInstance: ICstVisitor,\n ruleNames: string[],\n): IVisitorDefinitionError[] {\n const missingRuleNames = filter(ruleNames, (currRuleName) => {\n return isFunction((visitorInstance as any)[currRuleName]) === false;\n });\n\n const errors: IVisitorDefinitionError[] = map(\n missingRuleNames,\n (currRuleName) => {\n return {\n msg: `Missing visitor method: <${currRuleName}> on ${(\n visitorInstance.constructor.name\n )} CST Visitor.`,\n type: CstVisitorDefinitionError.MISSING_METHOD,\n methodName: currRuleName,\n };\n },\n );\n\n return compact(errors);\n}\n", "import {\n addNoneTerminalToCst,\n addTerminalToCst,\n setNodeLocationFull,\n setNodeLocationOnlyOffset,\n} from \"../../cst/cst.js\";\nimport { has, isUndefined, keys, noop } from \"lodash-es\";\nimport {\n createBaseSemanticVisitorConstructor,\n createBaseVisitorConstructorWithDefaults,\n} from \"../../cst/cst_visitor.js\";\nimport {\n CstNode,\n CstNodeLocation,\n ICstVisitor,\n IParserConfig,\n IToken,\n nodeLocationTrackingOptions,\n} from \"@chevrotain/types\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\n\n/**\n * This trait is responsible for the CST building logic.\n */\nexport class TreeBuilder {\n outputCst: boolean;\n CST_STACK: CstNode[];\n baseCstVisitorConstructor: Function;\n baseCstVisitorWithDefaultsConstructor: Function;\n\n // dynamically assigned Methods\n setNodeLocationFromNode: (\n nodeLocation: CstNodeLocation,\n locationInformation: CstNodeLocation,\n ) => void;\n setNodeLocationFromToken: (\n nodeLocation: CstNodeLocation,\n locationInformation: CstNodeLocation,\n ) => void;\n cstPostRule: (this: MixedInParser, ruleCstNode: CstNode) => void;\n\n setInitialNodeLocation: (cstNode: CstNode) => void;\n nodeLocationTracking: nodeLocationTrackingOptions;\n\n initTreeBuilder(this: MixedInParser, config: IParserConfig) {\n this.CST_STACK = [];\n\n // outputCst is no longer exposed/defined in the pubic API\n this.outputCst = (config as any).outputCst;\n\n this.nodeLocationTracking = has(config, \"nodeLocationTracking\")\n ? (config.nodeLocationTracking as nodeLocationTrackingOptions) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.nodeLocationTracking;\n\n if (!this.outputCst) {\n this.cstInvocationStateUpdate = noop;\n this.cstFinallyStateUpdate = noop;\n this.cstPostTerminal = noop;\n this.cstPostNonTerminal = noop;\n this.cstPostRule = noop;\n } else {\n if (/full/i.test(this.nodeLocationTracking)) {\n if (this.recoveryEnabled) {\n this.setNodeLocationFromToken = setNodeLocationFull;\n this.setNodeLocationFromNode = setNodeLocationFull;\n this.cstPostRule = noop;\n this.setInitialNodeLocation = this.setInitialNodeLocationFullRecovery;\n } else {\n this.setNodeLocationFromToken = noop;\n this.setNodeLocationFromNode = noop;\n this.cstPostRule = this.cstPostRuleFull;\n this.setInitialNodeLocation = this.setInitialNodeLocationFullRegular;\n }\n } else if (/onlyOffset/i.test(this.nodeLocationTracking)) {\n if (this.recoveryEnabled) {\n this.setNodeLocationFromToken = setNodeLocationOnlyOffset;\n this.setNodeLocationFromNode = setNodeLocationOnlyOffset;\n this.cstPostRule = noop;\n this.setInitialNodeLocation =\n this.setInitialNodeLocationOnlyOffsetRecovery;\n } else {\n this.setNodeLocationFromToken = noop;\n this.setNodeLocationFromNode = noop;\n this.cstPostRule = this.cstPostRuleOnlyOffset;\n this.setInitialNodeLocation =\n this.setInitialNodeLocationOnlyOffsetRegular;\n }\n } else if (/none/i.test(this.nodeLocationTracking)) {\n this.setNodeLocationFromToken = noop;\n this.setNodeLocationFromNode = noop;\n this.cstPostRule = noop;\n this.setInitialNodeLocation = noop;\n } else {\n throw Error(\n `Invalid config option: \"${config.nodeLocationTracking}\"`,\n );\n }\n }\n }\n\n setInitialNodeLocationOnlyOffsetRecovery(\n this: MixedInParser,\n cstNode: any,\n ): void {\n cstNode.location = {\n startOffset: NaN,\n endOffset: NaN,\n };\n }\n\n setInitialNodeLocationOnlyOffsetRegular(\n this: MixedInParser,\n cstNode: any,\n ): void {\n cstNode.location = {\n // without error recovery the starting Location of a new CstNode is guaranteed\n // To be the next Token's startOffset (for valid inputs).\n // For invalid inputs there won't be any CSTOutput so this potential\n // inaccuracy does not matter\n startOffset: this.LA(1).startOffset,\n endOffset: NaN,\n };\n }\n\n setInitialNodeLocationFullRecovery(this: MixedInParser, cstNode: any): void {\n cstNode.location = {\n startOffset: NaN,\n startLine: NaN,\n startColumn: NaN,\n endOffset: NaN,\n endLine: NaN,\n endColumn: NaN,\n };\n }\n\n /**\n * @see setInitialNodeLocationOnlyOffsetRegular for explanation why this work\n\n * @param cstNode\n */\n setInitialNodeLocationFullRegular(this: MixedInParser, cstNode: any): void {\n const nextToken = this.LA(1);\n cstNode.location = {\n startOffset: nextToken.startOffset,\n startLine: nextToken.startLine,\n startColumn: nextToken.startColumn,\n endOffset: NaN,\n endLine: NaN,\n endColumn: NaN,\n };\n }\n\n cstInvocationStateUpdate(this: MixedInParser, fullRuleName: string): void {\n const cstNode: CstNode = {\n name: fullRuleName,\n children: Object.create(null),\n };\n\n this.setInitialNodeLocation(cstNode);\n this.CST_STACK.push(cstNode);\n }\n\n cstFinallyStateUpdate(this: MixedInParser): void {\n this.CST_STACK.pop();\n }\n\n cstPostRuleFull(this: MixedInParser, ruleCstNode: CstNode): void {\n // casts to `required` are safe because `cstPostRuleFull` should only be invoked when full location is enabled\n const prevToken = this.LA(0) as Required;\n const loc = ruleCstNode.location as Required;\n\n // If this condition is true it means we consumed at least one Token\n // In this CstNode.\n if (loc.startOffset <= prevToken.startOffset === true) {\n loc.endOffset = prevToken.endOffset;\n loc.endLine = prevToken.endLine;\n loc.endColumn = prevToken.endColumn;\n }\n // \"empty\" CstNode edge case\n else {\n loc.startOffset = NaN;\n loc.startLine = NaN;\n loc.startColumn = NaN;\n }\n }\n\n cstPostRuleOnlyOffset(this: MixedInParser, ruleCstNode: CstNode): void {\n const prevToken = this.LA(0);\n // `location' is not null because `cstPostRuleOnlyOffset` will only be invoked when location tracking is enabled.\n const loc = ruleCstNode.location!;\n\n // If this condition is true it means we consumed at least one Token\n // In this CstNode.\n if (loc.startOffset <= prevToken.startOffset === true) {\n loc.endOffset = prevToken.endOffset;\n }\n // \"empty\" CstNode edge case\n else {\n loc.startOffset = NaN;\n }\n }\n\n cstPostTerminal(\n this: MixedInParser,\n key: string,\n consumedToken: IToken,\n ): void {\n const rootCst = this.CST_STACK[this.CST_STACK.length - 1];\n addTerminalToCst(rootCst, consumedToken, key);\n // This is only used when **both** error recovery and CST Output are enabled.\n this.setNodeLocationFromToken(rootCst.location!, consumedToken);\n }\n\n cstPostNonTerminal(\n this: MixedInParser,\n ruleCstResult: CstNode,\n ruleName: string,\n ): void {\n const preCstNode = this.CST_STACK[this.CST_STACK.length - 1];\n addNoneTerminalToCst(preCstNode, ruleName, ruleCstResult);\n // This is only used when **both** error recovery and CST Output are enabled.\n this.setNodeLocationFromNode(preCstNode.location!, ruleCstResult.location!);\n }\n\n getBaseCstVisitorConstructor(\n this: MixedInParser,\n ): {\n new (...args: any[]): ICstVisitor;\n } {\n if (isUndefined(this.baseCstVisitorConstructor)) {\n const newBaseCstVisitorConstructor = createBaseSemanticVisitorConstructor(\n this.className,\n keys(this.gastProductionsCache),\n );\n this.baseCstVisitorConstructor = newBaseCstVisitorConstructor;\n return newBaseCstVisitorConstructor;\n }\n\n return this.baseCstVisitorConstructor;\n }\n\n getBaseCstVisitorConstructorWithDefaults(\n this: MixedInParser,\n ): {\n new (...args: any[]): ICstVisitor;\n } {\n if (isUndefined(this.baseCstVisitorWithDefaultsConstructor)) {\n const newConstructor = createBaseVisitorConstructorWithDefaults(\n this.className,\n keys(this.gastProductionsCache),\n this.getBaseCstVisitorConstructor(),\n );\n this.baseCstVisitorWithDefaultsConstructor = newConstructor;\n return newConstructor;\n }\n\n return this.baseCstVisitorWithDefaultsConstructor;\n }\n\n getLastExplicitRuleShortName(this: MixedInParser): number {\n const ruleStack = this.RULE_STACK;\n return ruleStack[ruleStack.length - 1];\n }\n\n getPreviousExplicitRuleShortName(this: MixedInParser): number {\n const ruleStack = this.RULE_STACK;\n return ruleStack[ruleStack.length - 2];\n }\n\n getLastExplicitRuleOccurrenceIndex(this: MixedInParser): number {\n const occurrenceStack = this.RULE_OCCURRENCE_STACK;\n return occurrenceStack[occurrenceStack.length - 1];\n }\n}\n", "import { END_OF_FILE } from \"../parser.js\";\nimport { IToken } from \"@chevrotain/types\";\nimport { MixedInParser } from \"./parser_traits.js\";\n\n/**\n * Trait responsible abstracting over the interaction with Lexer output (Token vector).\n *\n * This could be generalized to support other kinds of lexers, e.g.\n * - Just in Time Lexing / Lexer-Less parsing.\n * - Streaming Lexer.\n */\nexport class LexerAdapter {\n tokVector: IToken[];\n tokVectorLength: number;\n currIdx: number;\n\n initLexerAdapter() {\n this.tokVector = [];\n this.tokVectorLength = 0;\n this.currIdx = -1;\n }\n\n set input(newInput: IToken[]) {\n // @ts-ignore - `this parameter` not supported in setters/getters\n // - https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters\n if (this.selfAnalysisDone !== true) {\n throw Error(\n `Missing invocation at the end of the Parser's constructor.`,\n );\n }\n // @ts-ignore - `this parameter` not supported in setters/getters\n // - https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters\n this.reset();\n this.tokVector = newInput;\n this.tokVectorLength = newInput.length;\n }\n\n get input(): IToken[] {\n return this.tokVector;\n }\n\n // skips a token and returns the next token\n SKIP_TOKEN(this: MixedInParser): IToken {\n if (this.currIdx <= this.tokVector.length - 2) {\n this.consumeToken();\n return this.LA(1);\n } else {\n return END_OF_FILE;\n }\n }\n\n // Lexer (accessing Token vector) related methods which can be overridden to implement lazy lexers\n // or lexers dependent on parser context.\n LA(this: MixedInParser, howMuch: number): IToken {\n const soughtIdx = this.currIdx + howMuch;\n if (soughtIdx < 0 || this.tokVectorLength <= soughtIdx) {\n return END_OF_FILE;\n } else {\n return this.tokVector[soughtIdx];\n }\n }\n\n consumeToken(this: MixedInParser) {\n this.currIdx++;\n }\n\n exportLexerState(this: MixedInParser): number {\n return this.currIdx;\n }\n\n importLexerState(this: MixedInParser, newState: number) {\n this.currIdx = newState;\n }\n\n resetLexerState(this: MixedInParser): void {\n this.currIdx = -1;\n }\n\n moveToTerminatedState(this: MixedInParser): void {\n this.currIdx = this.tokVector.length - 1;\n }\n\n getLexerPosition(this: MixedInParser): number {\n return this.exportLexerState();\n }\n}\n", "import {\n AtLeastOneSepMethodOpts,\n ConsumeMethodOpts,\n DSLMethodOpts,\n DSLMethodOptsWithErr,\n GrammarAction,\n IOrAlt,\n IRuleConfig,\n ISerializedGast,\n IToken,\n ManySepMethodOpts,\n OrMethodOpts,\n SubruleMethodOpts,\n TokenType,\n} from \"@chevrotain/types\";\nimport { includes, values } from \"lodash-es\";\nimport { isRecognitionException } from \"../../exceptions_public.js\";\nimport { DEFAULT_RULE_CONFIG, ParserDefinitionErrorType } from \"../parser.js\";\nimport { defaultGrammarValidatorErrorProvider } from \"../../errors_public.js\";\nimport { validateRuleIsOverridden } from \"../../grammar/checks.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { Rule, serializeGrammar } from \"@chevrotain/gast\";\nimport { IParserDefinitionError } from \"../../grammar/types.js\";\nimport { ParserMethodInternal } from \"../types.js\";\n\n/**\n * This trait is responsible for implementing the public API\n * for defining Chevrotain parsers, i.e:\n * - CONSUME\n * - RULE\n * - OPTION\n * - ...\n */\nexport class RecognizerApi {\n ACTION(this: MixedInParser, impl: () => T): T {\n return impl.call(this);\n }\n\n consume(\n this: MixedInParser,\n idx: number,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, idx, options);\n }\n\n subrule(\n this: MixedInParser,\n idx: number,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, idx, options);\n }\n\n option(\n this: MixedInParser,\n idx: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, idx);\n }\n\n or(\n this: MixedInParser,\n idx: number,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): any {\n return this.orInternal(altsOrOpts, idx);\n }\n\n many(\n this: MixedInParser,\n idx: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n return this.manyInternal(idx, actionORMethodDef);\n }\n\n atLeastOne(\n this: MixedInParser,\n idx: number,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n return this.atLeastOneInternal(idx, actionORMethodDef);\n }\n\n CONSUME(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 0, options);\n }\n\n CONSUME1(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 1, options);\n }\n\n CONSUME2(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 2, options);\n }\n\n CONSUME3(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 3, options);\n }\n\n CONSUME4(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 4, options);\n }\n\n CONSUME5(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 5, options);\n }\n\n CONSUME6(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 6, options);\n }\n\n CONSUME7(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 7, options);\n }\n\n CONSUME8(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 8, options);\n }\n\n CONSUME9(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 9, options);\n }\n\n SUBRULE(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 0, options);\n }\n\n SUBRULE1(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 1, options);\n }\n\n SUBRULE2(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 2, options);\n }\n\n SUBRULE3(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 3, options);\n }\n\n SUBRULE4(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 4, options);\n }\n\n SUBRULE5(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 5, options);\n }\n\n SUBRULE6(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 6, options);\n }\n\n SUBRULE7(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 7, options);\n }\n\n SUBRULE8(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 8, options);\n }\n\n SUBRULE9(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 9, options);\n }\n\n OPTION(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 0);\n }\n\n OPTION1(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 1);\n }\n\n OPTION2(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 2);\n }\n\n OPTION3(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 3);\n }\n\n OPTION4(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 4);\n }\n\n OPTION5(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 5);\n }\n\n OPTION6(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 6);\n }\n\n OPTION7(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 7);\n }\n\n OPTION8(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 8);\n }\n\n OPTION9(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 9);\n }\n\n OR(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 0);\n }\n\n OR1(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 1);\n }\n\n OR2(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 2);\n }\n\n OR3(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 3);\n }\n\n OR4(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 4);\n }\n\n OR5(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 5);\n }\n\n OR6(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 6);\n }\n\n OR7(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 7);\n }\n\n OR8(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 8);\n }\n\n OR9(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 9);\n }\n\n MANY(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(0, actionORMethodDef);\n }\n\n MANY1(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(1, actionORMethodDef);\n }\n\n MANY2(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(2, actionORMethodDef);\n }\n\n MANY3(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(3, actionORMethodDef);\n }\n\n MANY4(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(4, actionORMethodDef);\n }\n\n MANY5(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(5, actionORMethodDef);\n }\n\n MANY6(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(6, actionORMethodDef);\n }\n\n MANY7(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(7, actionORMethodDef);\n }\n\n MANY8(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(8, actionORMethodDef);\n }\n\n MANY9(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(9, actionORMethodDef);\n }\n\n MANY_SEP(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(0, options);\n }\n\n MANY_SEP1(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(1, options);\n }\n\n MANY_SEP2(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(2, options);\n }\n\n MANY_SEP3(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(3, options);\n }\n\n MANY_SEP4(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(4, options);\n }\n\n MANY_SEP5(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(5, options);\n }\n\n MANY_SEP6(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(6, options);\n }\n\n MANY_SEP7(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(7, options);\n }\n\n MANY_SEP8(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(8, options);\n }\n\n MANY_SEP9(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(9, options);\n }\n\n AT_LEAST_ONE(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(0, actionORMethodDef);\n }\n\n AT_LEAST_ONE1(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n return this.atLeastOneInternal(1, actionORMethodDef);\n }\n\n AT_LEAST_ONE2(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(2, actionORMethodDef);\n }\n\n AT_LEAST_ONE3(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(3, actionORMethodDef);\n }\n\n AT_LEAST_ONE4(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(4, actionORMethodDef);\n }\n\n AT_LEAST_ONE5(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(5, actionORMethodDef);\n }\n\n AT_LEAST_ONE6(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(6, actionORMethodDef);\n }\n\n AT_LEAST_ONE7(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(7, actionORMethodDef);\n }\n\n AT_LEAST_ONE8(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(8, actionORMethodDef);\n }\n\n AT_LEAST_ONE9(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(9, actionORMethodDef);\n }\n\n AT_LEAST_ONE_SEP(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(0, options);\n }\n\n AT_LEAST_ONE_SEP1(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(1, options);\n }\n\n AT_LEAST_ONE_SEP2(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(2, options);\n }\n\n AT_LEAST_ONE_SEP3(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(3, options);\n }\n\n AT_LEAST_ONE_SEP4(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(4, options);\n }\n\n AT_LEAST_ONE_SEP5(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(5, options);\n }\n\n AT_LEAST_ONE_SEP6(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(6, options);\n }\n\n AT_LEAST_ONE_SEP7(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(7, options);\n }\n\n AT_LEAST_ONE_SEP8(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(8, options);\n }\n\n AT_LEAST_ONE_SEP9(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(9, options);\n }\n\n RULE(\n this: MixedInParser,\n name: string,\n implementation: (...implArgs: any[]) => T,\n config: IRuleConfig = DEFAULT_RULE_CONFIG,\n ): (idxInCallingRule?: number, ...args: any[]) => T | any {\n if (includes(this.definedRulesNames, name)) {\n const errMsg =\n defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({\n topLevelRule: name,\n grammarName: this.className,\n });\n\n const error = {\n message: errMsg,\n type: ParserDefinitionErrorType.DUPLICATE_RULE_NAME,\n ruleName: name,\n };\n this.definitionErrors.push(error);\n }\n\n this.definedRulesNames.push(name);\n\n const ruleImplementation = this.defineRule(name, implementation, config);\n (this as any)[name] = ruleImplementation;\n return ruleImplementation;\n }\n\n OVERRIDE_RULE(\n this: MixedInParser,\n name: string,\n impl: (...implArgs: any[]) => T,\n config: IRuleConfig = DEFAULT_RULE_CONFIG,\n ): (idxInCallingRule?: number, ...args: any[]) => T {\n const ruleErrors: IParserDefinitionError[] = validateRuleIsOverridden(\n name,\n this.definedRulesNames,\n this.className,\n );\n this.definitionErrors = this.definitionErrors.concat(ruleErrors);\n\n const ruleImplementation = this.defineRule(name, impl, config);\n (this as any)[name] = ruleImplementation;\n return ruleImplementation;\n }\n\n BACKTRACK(\n this: MixedInParser,\n grammarRule: (...args: any[]) => T,\n args?: any[],\n ): () => boolean {\n return function () {\n // save org state\n this.isBackTrackingStack.push(1);\n const orgState = this.saveRecogState();\n try {\n grammarRule.apply(this, args);\n // if no exception was thrown we have succeed parsing the rule.\n return true;\n } catch (e) {\n if (isRecognitionException(e)) {\n return false;\n } else {\n throw e;\n }\n } finally {\n this.reloadRecogState(orgState);\n this.isBackTrackingStack.pop();\n }\n };\n }\n\n // GAST export APIs\n public getGAstProductions(this: MixedInParser): Record {\n return this.gastProductionsCache;\n }\n\n public getSerializedGastProductions(this: MixedInParser): ISerializedGast[] {\n return serializeGrammar(values(this.gastProductionsCache));\n }\n}\n", "import {\n AtLeastOneSepMethodOpts,\n ConsumeMethodOpts,\n DSLMethodOpts,\n DSLMethodOptsWithErr,\n GrammarAction,\n IOrAlt,\n IParserConfig,\n IRuleConfig,\n IToken,\n ManySepMethodOpts,\n OrMethodOpts,\n ParserMethod,\n SubruleMethodOpts,\n TokenType,\n TokenTypeDictionary,\n TokenVocabulary,\n} from \"@chevrotain/types\";\nimport {\n clone,\n every,\n flatten,\n has,\n isArray,\n isEmpty,\n isObject,\n reduce,\n uniq,\n values,\n} from \"lodash-es\";\nimport {\n AT_LEAST_ONE_IDX,\n AT_LEAST_ONE_SEP_IDX,\n BITS_FOR_METHOD_TYPE,\n BITS_FOR_OCCURRENCE_IDX,\n MANY_IDX,\n MANY_SEP_IDX,\n OPTION_IDX,\n OR_IDX,\n} from \"../../grammar/keys.js\";\nimport {\n isRecognitionException,\n MismatchedTokenException,\n NotAllInputParsedException,\n} from \"../../exceptions_public.js\";\nimport { PROD_TYPE } from \"../../grammar/lookahead.js\";\nimport {\n AbstractNextTerminalAfterProductionWalker,\n NextTerminalAfterAtLeastOneSepWalker,\n NextTerminalAfterAtLeastOneWalker,\n NextTerminalAfterManySepWalker,\n NextTerminalAfterManyWalker,\n} from \"../../grammar/interpreter.js\";\nimport { DEFAULT_RULE_CONFIG, IParserState, TokenMatcher } from \"../parser.js\";\nimport { IN_RULE_RECOVERY_EXCEPTION } from \"./recoverable.js\";\nimport { EOF } from \"../../../scan/tokens_public.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport {\n augmentTokenTypes,\n isTokenType,\n tokenStructuredMatcher,\n tokenStructuredMatcherNoCategories,\n} from \"../../../scan/tokens.js\";\nimport { Rule } from \"@chevrotain/gast\";\nimport { ParserMethodInternal } from \"../types.js\";\n\n/**\n * This trait is responsible for the runtime parsing engine\n * Used by the official API (recognizer_api.ts)\n */\nexport class RecognizerEngine {\n isBackTrackingStack: boolean[];\n className: string;\n RULE_STACK: number[];\n RULE_OCCURRENCE_STACK: number[];\n definedRulesNames: string[];\n tokensMap: { [fqn: string]: TokenType };\n gastProductionsCache: Record;\n shortRuleNameToFull: Record;\n fullRuleNameToShort: Record;\n // The shortName Index must be coded \"after\" the first 8bits to enable building unique lookahead keys\n ruleShortNameIdx: number;\n tokenMatcher: TokenMatcher;\n subruleIdx: number;\n\n initRecognizerEngine(\n tokenVocabulary: TokenVocabulary,\n config: IParserConfig,\n ) {\n this.className = this.constructor.name;\n // TODO: would using an ES6 Map or plain object be faster (CST building scenario)\n this.shortRuleNameToFull = {};\n this.fullRuleNameToShort = {};\n this.ruleShortNameIdx = 256;\n this.tokenMatcher = tokenStructuredMatcherNoCategories;\n this.subruleIdx = 0;\n\n this.definedRulesNames = [];\n this.tokensMap = {};\n this.isBackTrackingStack = [];\n this.RULE_STACK = [];\n this.RULE_OCCURRENCE_STACK = [];\n this.gastProductionsCache = {};\n\n if (has(config, \"serializedGrammar\")) {\n throw Error(\n \"The Parser's configuration can no longer contain a property.\\n\" +\n \"\\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\\n\" +\n \"\\tFor Further details.\",\n );\n }\n\n if (isArray(tokenVocabulary)) {\n // This only checks for Token vocabularies provided as arrays.\n // That is good enough because the main objective is to detect users of pre-V4.0 APIs\n // rather than all edge cases of empty Token vocabularies.\n if (isEmpty(tokenVocabulary as any[])) {\n throw Error(\n \"A Token Vocabulary cannot be empty.\\n\" +\n \"\\tNote that the first argument for the parser constructor\\n\" +\n \"\\tis no longer a Token vector (since v4.0).\",\n );\n }\n\n if (typeof (tokenVocabulary as any[])[0].startOffset === \"number\") {\n throw Error(\n \"The Parser constructor no longer accepts a token vector as the first argument.\\n\" +\n \"\\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\\n\" +\n \"\\tFor Further details.\",\n );\n }\n }\n\n if (isArray(tokenVocabulary)) {\n this.tokensMap = reduce(\n tokenVocabulary,\n (acc, tokType: TokenType) => {\n acc[tokType.name] = tokType;\n return acc;\n },\n {} as { [tokenName: string]: TokenType },\n );\n } else if (\n has(tokenVocabulary, \"modes\") &&\n every(flatten(values((tokenVocabulary).modes)), isTokenType)\n ) {\n const allTokenTypes = flatten(values((tokenVocabulary).modes));\n const uniqueTokens = uniq(allTokenTypes);\n this.tokensMap = reduce(\n uniqueTokens,\n (acc, tokType: TokenType) => {\n acc[tokType.name] = tokType;\n return acc;\n },\n {} as { [tokenName: string]: TokenType },\n );\n } else if (isObject(tokenVocabulary)) {\n this.tokensMap = clone(tokenVocabulary as TokenTypeDictionary);\n } else {\n throw new Error(\n \" argument must be An Array of Token constructors,\" +\n \" A dictionary of Token constructors or an IMultiModeLexerDefinition\",\n );\n }\n\n // always add EOF to the tokenNames -> constructors map. it is useful to assure all the input has been\n // parsed with a clear error message (\"expecting EOF but found ...\")\n this.tokensMap[\"EOF\"] = EOF;\n\n const allTokenTypes = has(tokenVocabulary, \"modes\")\n ? flatten(values((tokenVocabulary).modes))\n : values(tokenVocabulary);\n const noTokenCategoriesUsed = every(allTokenTypes, (tokenConstructor) =>\n isEmpty(tokenConstructor.categoryMatches),\n );\n\n this.tokenMatcher = noTokenCategoriesUsed\n ? tokenStructuredMatcherNoCategories\n : tokenStructuredMatcher;\n\n // Because ES2015+ syntax should be supported for creating Token classes\n // We cannot assume that the Token classes were created using the \"extendToken\" utilities\n // Therefore we must augment the Token classes both on Lexer initialization and on Parser initialization\n augmentTokenTypes(values(this.tokensMap));\n }\n\n defineRule(\n this: MixedInParser,\n ruleName: string,\n impl: (...args: ARGS) => R,\n config: IRuleConfig,\n ): ParserMethodInternal {\n if (this.selfAnalysisDone) {\n throw Error(\n `Grammar rule <${ruleName}> may not be defined after the 'performSelfAnalysis' method has been called'\\n` +\n `Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`,\n );\n }\n const resyncEnabled: boolean = has(config, \"resyncEnabled\")\n ? (config.resyncEnabled as boolean) // assumes end user provides the correct config value/type\n : DEFAULT_RULE_CONFIG.resyncEnabled;\n const recoveryValueFunc = has(config, \"recoveryValueFunc\")\n ? (config.recoveryValueFunc as () => R) // assumes end user provides the correct config value/type\n : DEFAULT_RULE_CONFIG.recoveryValueFunc;\n\n // performance optimization: Use small integers as keys for the longer human readable \"full\" rule names.\n // this greatly improves Map access time (as much as 8% for some performance benchmarks).\n const shortName =\n this.ruleShortNameIdx << (BITS_FOR_METHOD_TYPE + BITS_FOR_OCCURRENCE_IDX);\n\n this.ruleShortNameIdx++;\n this.shortRuleNameToFull[shortName] = ruleName;\n this.fullRuleNameToShort[ruleName] = shortName;\n\n let invokeRuleWithTry: ParserMethod;\n\n // Micro optimization, only check the condition **once** on rule definition\n // instead of **every single** rule invocation.\n if (this.outputCst === true) {\n invokeRuleWithTry = function invokeRuleWithTry(\n this: MixedInParser,\n ...args: ARGS\n ): R {\n try {\n this.ruleInvocationStateUpdate(shortName, ruleName, this.subruleIdx);\n impl.apply(this, args);\n const cst = this.CST_STACK[this.CST_STACK.length - 1];\n this.cstPostRule(cst);\n return cst as unknown as R;\n } catch (e) {\n return this.invokeRuleCatch(e, resyncEnabled, recoveryValueFunc) as R;\n } finally {\n this.ruleFinallyStateUpdate();\n }\n };\n } else {\n invokeRuleWithTry = function invokeRuleWithTryCst(\n this: MixedInParser,\n ...args: ARGS\n ): R {\n try {\n this.ruleInvocationStateUpdate(shortName, ruleName, this.subruleIdx);\n return impl.apply(this, args);\n } catch (e) {\n return this.invokeRuleCatch(e, resyncEnabled, recoveryValueFunc) as R;\n } finally {\n this.ruleFinallyStateUpdate();\n }\n };\n }\n\n const wrappedGrammarRule: ParserMethodInternal = Object.assign(\n invokeRuleWithTry as any,\n { ruleName, originalGrammarAction: impl },\n );\n\n return wrappedGrammarRule;\n }\n\n invokeRuleCatch(\n this: MixedInParser,\n e: Error,\n resyncEnabledConfig: boolean,\n recoveryValueFunc: Function,\n ): unknown {\n const isFirstInvokedRule = this.RULE_STACK.length === 1;\n // note the reSync is always enabled for the first rule invocation, because we must always be able to\n // reSync with EOF and just output some INVALID ParseTree\n // during backtracking reSync recovery is disabled, otherwise we can't be certain the backtracking\n // path is really the most valid one\n const reSyncEnabled =\n resyncEnabledConfig && !this.isBackTracking() && this.recoveryEnabled;\n\n if (isRecognitionException(e)) {\n const recogError: any = e;\n if (reSyncEnabled) {\n const reSyncTokType = this.findReSyncTokenType();\n if (this.isInCurrentRuleReSyncSet(reSyncTokType)) {\n recogError.resyncedTokens = this.reSyncTo(reSyncTokType);\n if (this.outputCst) {\n const partialCstResult: any =\n this.CST_STACK[this.CST_STACK.length - 1];\n partialCstResult.recoveredNode = true;\n return partialCstResult;\n } else {\n return recoveryValueFunc(e);\n }\n } else {\n if (this.outputCst) {\n const partialCstResult: any =\n this.CST_STACK[this.CST_STACK.length - 1];\n partialCstResult.recoveredNode = true;\n recogError.partialCstResult = partialCstResult;\n }\n // to be handled Further up the call stack\n throw recogError;\n }\n } else if (isFirstInvokedRule) {\n // otherwise a Redundant input error will be created as well and we cannot guarantee that this is indeed the case\n this.moveToTerminatedState();\n // the parser should never throw one of its own errors outside its flow.\n // even if error recovery is disabled\n return recoveryValueFunc(e);\n } else {\n // to be recovered Further up the call stack\n throw recogError;\n }\n } else {\n // some other Error type which we don't know how to handle (for example a built in JavaScript Error)\n throw e;\n }\n }\n\n // Implementation of parsing DSL\n optionInternal(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n occurrence: number,\n ): OUT | undefined {\n const key = this.getKeyForAutomaticLookahead(OPTION_IDX, occurrence);\n return this.optionInternalLogic(actionORMethodDef, occurrence, key);\n }\n\n optionInternalLogic(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n occurrence: number,\n key: number,\n ): OUT | undefined {\n let lookAheadFunc = this.getLaFuncFromCache(key);\n let action: GrammarAction;\n if (typeof actionORMethodDef !== \"function\") {\n action = actionORMethodDef.DEF;\n const predicate = actionORMethodDef.GATE;\n // predicate present\n if (predicate !== undefined) {\n const orgLookaheadFunction = lookAheadFunc;\n lookAheadFunc = () => {\n return predicate.call(this) && orgLookaheadFunction.call(this);\n };\n }\n } else {\n action = actionORMethodDef;\n }\n\n if (lookAheadFunc.call(this) === true) {\n return action.call(this);\n }\n return undefined;\n }\n\n atLeastOneInternal(\n this: MixedInParser,\n prodOccurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n const laKey = this.getKeyForAutomaticLookahead(\n AT_LEAST_ONE_IDX,\n prodOccurrence,\n );\n return this.atLeastOneInternalLogic(\n prodOccurrence,\n actionORMethodDef,\n laKey,\n );\n }\n\n atLeastOneInternalLogic(\n this: MixedInParser,\n prodOccurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n key: number,\n ): void {\n let lookAheadFunc = this.getLaFuncFromCache(key);\n let action;\n if (typeof actionORMethodDef !== \"function\") {\n action = actionORMethodDef.DEF;\n const predicate = actionORMethodDef.GATE;\n // predicate present\n if (predicate !== undefined) {\n const orgLookaheadFunction = lookAheadFunc;\n lookAheadFunc = () => {\n return predicate.call(this) && orgLookaheadFunction.call(this);\n };\n }\n } else {\n action = actionORMethodDef;\n }\n\n if ((lookAheadFunc).call(this) === true) {\n let notStuck = this.doSingleRepetition(action);\n while (\n (lookAheadFunc).call(this) === true &&\n notStuck === true\n ) {\n notStuck = this.doSingleRepetition(action);\n }\n } else {\n throw this.raiseEarlyExitException(\n prodOccurrence,\n PROD_TYPE.REPETITION_MANDATORY,\n (>actionORMethodDef).ERR_MSG,\n );\n }\n\n // note that while it may seem that this can cause an error because by using a recursive call to\n // AT_LEAST_ONE we change the grammar to AT_LEAST_TWO, AT_LEAST_THREE ... , the possible recursive call\n // from the tryInRepetitionRecovery(...) will only happen IFF there really are TWO/THREE/.... items.\n\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n this.attemptInRepetitionRecovery(\n this.atLeastOneInternal,\n [prodOccurrence, actionORMethodDef],\n lookAheadFunc,\n AT_LEAST_ONE_IDX,\n prodOccurrence,\n NextTerminalAfterAtLeastOneWalker,\n );\n }\n\n atLeastOneSepFirstInternal(\n this: MixedInParser,\n prodOccurrence: number,\n options: AtLeastOneSepMethodOpts,\n ): void {\n const laKey = this.getKeyForAutomaticLookahead(\n AT_LEAST_ONE_SEP_IDX,\n prodOccurrence,\n );\n this.atLeastOneSepFirstInternalLogic(prodOccurrence, options, laKey);\n }\n\n atLeastOneSepFirstInternalLogic(\n this: MixedInParser,\n prodOccurrence: number,\n options: AtLeastOneSepMethodOpts,\n key: number,\n ): void {\n const action = options.DEF;\n const separator = options.SEP;\n\n const firstIterationLookaheadFunc = this.getLaFuncFromCache(key);\n\n // 1st iteration\n if (firstIterationLookaheadFunc.call(this) === true) {\n (>action).call(this);\n\n // TODO: Optimization can move this function construction into \"attemptInRepetitionRecovery\"\n // because it is only needed in error recovery scenarios.\n const separatorLookAheadFunc = () => {\n return this.tokenMatcher(this.LA(1), separator);\n };\n\n // 2nd..nth iterations\n while (this.tokenMatcher(this.LA(1), separator) === true) {\n // note that this CONSUME will never enter recovery because\n // the separatorLookAheadFunc checks that the separator really does exist.\n this.CONSUME(separator);\n // No need for checking infinite loop here due to consuming the separator.\n (>action).call(this);\n }\n\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n this.attemptInRepetitionRecovery(\n this.repetitionSepSecondInternal,\n [\n prodOccurrence,\n separator,\n separatorLookAheadFunc,\n action,\n NextTerminalAfterAtLeastOneSepWalker,\n ],\n separatorLookAheadFunc,\n AT_LEAST_ONE_SEP_IDX,\n prodOccurrence,\n NextTerminalAfterAtLeastOneSepWalker,\n );\n } else {\n throw this.raiseEarlyExitException(\n prodOccurrence,\n PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,\n options.ERR_MSG,\n );\n }\n }\n\n manyInternal(\n this: MixedInParser,\n prodOccurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n const laKey = this.getKeyForAutomaticLookahead(MANY_IDX, prodOccurrence);\n return this.manyInternalLogic(prodOccurrence, actionORMethodDef, laKey);\n }\n\n manyInternalLogic(\n this: MixedInParser,\n prodOccurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n key: number,\n ) {\n let lookaheadFunction = this.getLaFuncFromCache(key);\n let action;\n if (typeof actionORMethodDef !== \"function\") {\n action = actionORMethodDef.DEF;\n const predicate = actionORMethodDef.GATE;\n // predicate present\n if (predicate !== undefined) {\n const orgLookaheadFunction = lookaheadFunction;\n lookaheadFunction = () => {\n return predicate.call(this) && orgLookaheadFunction.call(this);\n };\n }\n } else {\n action = actionORMethodDef;\n }\n\n let notStuck = true;\n while (lookaheadFunction.call(this) === true && notStuck === true) {\n notStuck = this.doSingleRepetition(action);\n }\n\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n this.attemptInRepetitionRecovery(\n this.manyInternal,\n [prodOccurrence, actionORMethodDef],\n lookaheadFunction,\n MANY_IDX,\n prodOccurrence,\n NextTerminalAfterManyWalker,\n // The notStuck parameter is only relevant when \"attemptInRepetitionRecovery\"\n // is invoked from manyInternal, in the MANY_SEP case and AT_LEAST_ONE[_SEP]\n // An infinite loop cannot occur as:\n // - Either the lookahead is guaranteed to consume something (Single Token Separator)\n // - AT_LEAST_ONE by definition is guaranteed to consume something (or error out).\n notStuck,\n );\n }\n\n manySepFirstInternal(\n this: MixedInParser,\n prodOccurrence: number,\n options: ManySepMethodOpts,\n ): void {\n const laKey = this.getKeyForAutomaticLookahead(\n MANY_SEP_IDX,\n prodOccurrence,\n );\n this.manySepFirstInternalLogic(prodOccurrence, options, laKey);\n }\n\n manySepFirstInternalLogic(\n this: MixedInParser,\n prodOccurrence: number,\n options: ManySepMethodOpts,\n key: number,\n ): void {\n const action = options.DEF;\n const separator = options.SEP;\n const firstIterationLaFunc = this.getLaFuncFromCache(key);\n\n // 1st iteration\n if (firstIterationLaFunc.call(this) === true) {\n action.call(this);\n\n const separatorLookAheadFunc = () => {\n return this.tokenMatcher(this.LA(1), separator);\n };\n // 2nd..nth iterations\n while (this.tokenMatcher(this.LA(1), separator) === true) {\n // note that this CONSUME will never enter recovery because\n // the separatorLookAheadFunc checks that the separator really does exist.\n this.CONSUME(separator);\n // No need for checking infinite loop here due to consuming the separator.\n action.call(this);\n }\n\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n this.attemptInRepetitionRecovery(\n this.repetitionSepSecondInternal,\n [\n prodOccurrence,\n separator,\n separatorLookAheadFunc,\n action,\n NextTerminalAfterManySepWalker,\n ],\n separatorLookAheadFunc,\n MANY_SEP_IDX,\n prodOccurrence,\n NextTerminalAfterManySepWalker,\n );\n }\n }\n\n repetitionSepSecondInternal(\n this: MixedInParser,\n prodOccurrence: number,\n separator: TokenType,\n separatorLookAheadFunc: () => boolean,\n action: GrammarAction,\n nextTerminalAfterWalker: typeof AbstractNextTerminalAfterProductionWalker,\n ): void {\n while (separatorLookAheadFunc()) {\n // note that this CONSUME will never enter recovery because\n // the separatorLookAheadFunc checks that the separator really does exist.\n this.CONSUME(separator);\n action.call(this);\n }\n\n // we can only arrive to this function after an error\n // has occurred (hence the name 'second') so the following\n // IF will always be entered, its possible to remove it...\n // however it is kept to avoid confusion and be consistent.\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n /* istanbul ignore else */\n this.attemptInRepetitionRecovery(\n this.repetitionSepSecondInternal,\n [\n prodOccurrence,\n separator,\n separatorLookAheadFunc,\n action,\n nextTerminalAfterWalker,\n ],\n separatorLookAheadFunc,\n AT_LEAST_ONE_SEP_IDX,\n prodOccurrence,\n nextTerminalAfterWalker,\n );\n }\n\n doSingleRepetition(this: MixedInParser, action: Function): any {\n const beforeIteration = this.getLexerPosition();\n action.call(this);\n const afterIteration = this.getLexerPosition();\n\n // This boolean will indicate if this repetition progressed\n // or if we are \"stuck\" (potential infinite loop in the repetition).\n return afterIteration > beforeIteration;\n }\n\n orInternal(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n occurrence: number,\n ): T {\n const laKey = this.getKeyForAutomaticLookahead(OR_IDX, occurrence);\n const alts = isArray(altsOrOpts) ? altsOrOpts : altsOrOpts.DEF;\n\n const laFunc = this.getLaFuncFromCache(laKey);\n const altIdxToTake = laFunc.call(this, alts);\n if (altIdxToTake !== undefined) {\n const chosenAlternative: any = alts[altIdxToTake];\n return chosenAlternative.ALT.call(this);\n }\n this.raiseNoAltException(\n occurrence,\n (altsOrOpts as OrMethodOpts).ERR_MSG,\n );\n }\n\n ruleFinallyStateUpdate(this: MixedInParser): void {\n this.RULE_STACK.pop();\n this.RULE_OCCURRENCE_STACK.pop();\n\n // NOOP when cst is disabled\n this.cstFinallyStateUpdate();\n\n if (this.RULE_STACK.length === 0 && this.isAtEndOfInput() === false) {\n const firstRedundantTok = this.LA(1);\n const errMsg = this.errorMessageProvider.buildNotAllInputParsedMessage({\n firstRedundant: firstRedundantTok,\n ruleName: this.getCurrRuleFullName(),\n });\n this.SAVE_ERROR(\n new NotAllInputParsedException(errMsg, firstRedundantTok),\n );\n }\n }\n\n subruleInternal(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n idx: number,\n options?: SubruleMethodOpts,\n ): R {\n let ruleResult;\n try {\n const args = options !== undefined ? options.ARGS : undefined;\n this.subruleIdx = idx;\n ruleResult = ruleToCall.apply(this, args);\n this.cstPostNonTerminal(\n ruleResult,\n options !== undefined && options.LABEL !== undefined\n ? options.LABEL\n : ruleToCall.ruleName,\n );\n return ruleResult;\n } catch (e) {\n throw this.subruleInternalError(e, options, ruleToCall.ruleName);\n }\n }\n\n subruleInternalError(\n this: MixedInParser,\n e: any,\n options: SubruleMethodOpts | undefined,\n ruleName: string,\n ): void {\n if (isRecognitionException(e) && e.partialCstResult !== undefined) {\n this.cstPostNonTerminal(\n e.partialCstResult,\n options !== undefined && options.LABEL !== undefined\n ? options.LABEL\n : ruleName,\n );\n\n delete e.partialCstResult;\n }\n throw e;\n }\n\n consumeInternal(\n this: MixedInParser,\n tokType: TokenType,\n idx: number,\n options: ConsumeMethodOpts | undefined,\n ): IToken {\n let consumedToken!: IToken;\n try {\n const nextToken = this.LA(1);\n if (this.tokenMatcher(nextToken, tokType) === true) {\n this.consumeToken();\n consumedToken = nextToken;\n } else {\n this.consumeInternalError(tokType, nextToken, options);\n }\n } catch (eFromConsumption) {\n consumedToken = this.consumeInternalRecovery(\n tokType,\n idx,\n eFromConsumption,\n );\n }\n\n this.cstPostTerminal(\n options !== undefined && options.LABEL !== undefined\n ? options.LABEL\n : tokType.name,\n consumedToken,\n );\n return consumedToken;\n }\n\n consumeInternalError(\n this: MixedInParser,\n tokType: TokenType,\n nextToken: IToken,\n options: ConsumeMethodOpts | undefined,\n ): void {\n let msg;\n const previousToken = this.LA(0);\n if (options !== undefined && options.ERR_MSG) {\n msg = options.ERR_MSG;\n } else {\n msg = this.errorMessageProvider.buildMismatchTokenMessage({\n expected: tokType,\n actual: nextToken,\n previous: previousToken,\n ruleName: this.getCurrRuleFullName(),\n });\n }\n throw this.SAVE_ERROR(\n new MismatchedTokenException(msg, nextToken, previousToken),\n );\n }\n\n consumeInternalRecovery(\n this: MixedInParser,\n tokType: TokenType,\n idx: number,\n eFromConsumption: Error,\n ): IToken {\n // no recovery allowed during backtracking, otherwise backtracking may recover invalid syntax and accept it\n // but the original syntax could have been parsed successfully without any backtracking + recovery\n if (\n this.recoveryEnabled &&\n // TODO: more robust checking of the exception type. Perhaps Typescript extending expressions?\n eFromConsumption.name === \"MismatchedTokenException\" &&\n !this.isBackTracking()\n ) {\n const follows = this.getFollowsForInRuleRecovery(tokType, idx);\n try {\n return this.tryInRuleRecovery(tokType, follows);\n } catch (eFromInRuleRecovery) {\n if (eFromInRuleRecovery.name === IN_RULE_RECOVERY_EXCEPTION) {\n // failed in RuleRecovery.\n // throw the original error in order to trigger reSync error recovery\n throw eFromConsumption;\n } else {\n throw eFromInRuleRecovery;\n }\n }\n } else {\n throw eFromConsumption;\n }\n }\n\n saveRecogState(this: MixedInParser): IParserState {\n // errors is a getter which will clone the errors array\n const savedErrors = this.errors;\n const savedRuleStack = clone(this.RULE_STACK);\n return {\n errors: savedErrors,\n lexerState: this.exportLexerState(),\n RULE_STACK: savedRuleStack,\n CST_STACK: this.CST_STACK,\n };\n }\n\n reloadRecogState(this: MixedInParser, newState: IParserState) {\n this.errors = newState.errors;\n this.importLexerState(newState.lexerState);\n this.RULE_STACK = newState.RULE_STACK;\n }\n\n ruleInvocationStateUpdate(\n this: MixedInParser,\n shortName: number,\n fullName: string,\n idxInCallingRule: number,\n ): void {\n this.RULE_OCCURRENCE_STACK.push(idxInCallingRule);\n this.RULE_STACK.push(shortName);\n // NOOP when cst is disabled\n this.cstInvocationStateUpdate(fullName);\n }\n\n isBackTracking(this: MixedInParser): boolean {\n return this.isBackTrackingStack.length !== 0;\n }\n\n getCurrRuleFullName(this: MixedInParser): string {\n const shortName = this.getLastExplicitRuleShortName();\n return this.shortRuleNameToFull[shortName];\n }\n\n shortRuleNameToFullName(this: MixedInParser, shortName: number) {\n return this.shortRuleNameToFull[shortName];\n }\n\n public isAtEndOfInput(this: MixedInParser): boolean {\n return this.tokenMatcher(this.LA(1), EOF);\n }\n\n public reset(this: MixedInParser): void {\n this.resetLexerState();\n this.subruleIdx = 0;\n this.isBackTrackingStack = [];\n this.errors = [];\n this.RULE_STACK = [];\n // TODO: extract a specific reset for TreeBuilder trait\n this.CST_STACK = [];\n this.RULE_OCCURRENCE_STACK = [];\n }\n}\n", "import {\n IParserConfig,\n IParserErrorMessageProvider,\n IRecognitionException,\n} from \"@chevrotain/types\";\nimport {\n EarlyExitException,\n isRecognitionException,\n NoViableAltException,\n} from \"../../exceptions_public.js\";\nimport { clone, has } from \"lodash-es\";\nimport {\n getLookaheadPathsForOptionalProd,\n getLookaheadPathsForOr,\n PROD_TYPE,\n} from \"../../grammar/lookahead.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\n\n/**\n * Trait responsible for runtime parsing errors.\n */\nexport class ErrorHandler {\n _errors: IRecognitionException[];\n errorMessageProvider: IParserErrorMessageProvider;\n\n initErrorHandler(config: IParserConfig) {\n this._errors = [];\n this.errorMessageProvider = has(config, \"errorMessageProvider\")\n ? (config.errorMessageProvider as IParserErrorMessageProvider) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.errorMessageProvider;\n }\n\n SAVE_ERROR(\n this: MixedInParser,\n error: IRecognitionException,\n ): IRecognitionException {\n if (isRecognitionException(error)) {\n error.context = {\n ruleStack: this.getHumanReadableRuleStack(),\n ruleOccurrenceStack: clone(this.RULE_OCCURRENCE_STACK),\n };\n this._errors.push(error);\n return error;\n } else {\n throw Error(\n \"Trying to save an Error which is not a RecognitionException\",\n );\n }\n }\n\n get errors(): IRecognitionException[] {\n return clone(this._errors);\n }\n\n set errors(newErrors: IRecognitionException[]) {\n this._errors = newErrors;\n }\n\n // TODO: consider caching the error message computed information\n raiseEarlyExitException(\n this: MixedInParser,\n occurrence: number,\n prodType: PROD_TYPE,\n userDefinedErrMsg: string | undefined,\n ): never {\n const ruleName = this.getCurrRuleFullName();\n const ruleGrammar = this.getGAstProductions()[ruleName];\n const lookAheadPathsPerAlternative = getLookaheadPathsForOptionalProd(\n occurrence,\n ruleGrammar,\n prodType,\n this.maxLookahead,\n );\n const insideProdPaths = lookAheadPathsPerAlternative[0];\n const actualTokens = [];\n for (let i = 1; i <= this.maxLookahead; i++) {\n actualTokens.push(this.LA(i));\n }\n const msg = this.errorMessageProvider.buildEarlyExitMessage({\n expectedIterationPaths: insideProdPaths,\n actual: actualTokens,\n previous: this.LA(0),\n customUserDescription: userDefinedErrMsg,\n ruleName: ruleName,\n });\n\n throw this.SAVE_ERROR(new EarlyExitException(msg, this.LA(1), this.LA(0)));\n }\n\n // TODO: consider caching the error message computed information\n raiseNoAltException(\n this: MixedInParser,\n occurrence: number,\n errMsgTypes: string | undefined,\n ): never {\n const ruleName = this.getCurrRuleFullName();\n const ruleGrammar = this.getGAstProductions()[ruleName];\n // TODO: getLookaheadPathsForOr can be slow for large enough maxLookahead and certain grammars, consider caching ?\n const lookAheadPathsPerAlternative = getLookaheadPathsForOr(\n occurrence,\n ruleGrammar,\n this.maxLookahead,\n );\n\n const actualTokens = [];\n for (let i = 1; i <= this.maxLookahead; i++) {\n actualTokens.push(this.LA(i));\n }\n const previousToken = this.LA(0);\n\n const errMsg = this.errorMessageProvider.buildNoViableAltMessage({\n expectedPathsPerAlt: lookAheadPathsPerAlternative,\n actual: actualTokens,\n previous: previousToken,\n customUserDescription: errMsgTypes,\n ruleName: this.getCurrRuleFullName(),\n });\n\n throw this.SAVE_ERROR(\n new NoViableAltException(errMsg, this.LA(1), previousToken),\n );\n }\n}\n", "import {\n ISyntacticContentAssistPath,\n IToken,\n ITokenGrammarPath,\n TokenType,\n} from \"@chevrotain/types\";\nimport {\n NextAfterTokenWalker,\n nextPossibleTokensAfter,\n} from \"../../grammar/interpreter.js\";\nimport { first, isUndefined } from \"lodash-es\";\nimport { MixedInParser } from \"./parser_traits.js\";\n\nexport class ContentAssist {\n initContentAssist() {}\n\n public computeContentAssist(\n this: MixedInParser,\n startRuleName: string,\n precedingInput: IToken[],\n ): ISyntacticContentAssistPath[] {\n const startRuleGast = this.gastProductionsCache[startRuleName];\n\n if (isUndefined(startRuleGast)) {\n throw Error(`Rule ->${startRuleName}<- does not exist in this grammar.`);\n }\n\n return nextPossibleTokensAfter(\n [startRuleGast],\n precedingInput,\n this.tokenMatcher,\n this.maxLookahead,\n );\n }\n\n // TODO: should this be a member method or a utility? it does not have any state or usage of 'this'...\n // TODO: should this be more explicitly part of the public API?\n public getNextPossibleTokenTypes(\n this: MixedInParser,\n grammarPath: ITokenGrammarPath,\n ): TokenType[] {\n const topRuleName = first(grammarPath.ruleStack)!;\n const gastProductions = this.getGAstProductions();\n const topProduction = gastProductions[topRuleName];\n const nextPossibleTokenTypes = new NextAfterTokenWalker(\n topProduction,\n grammarPath,\n ).startWalking();\n return nextPossibleTokenTypes;\n }\n}\n", "import {\n AtLeastOneSepMethodOpts,\n ConsumeMethodOpts,\n CstNode,\n DSLMethodOpts,\n DSLMethodOptsWithErr,\n GrammarAction,\n IOrAlt,\n IParserConfig,\n IProduction,\n IToken,\n ManySepMethodOpts,\n OrMethodOpts,\n SubruleMethodOpts,\n TokenType,\n} from \"@chevrotain/types\";\nimport {\n forEach,\n has,\n isArray,\n isFunction,\n last as peek,\n some,\n} from \"lodash-es\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"@chevrotain/gast\";\nimport { Lexer } from \"../../../scan/lexer_public.js\";\nimport {\n augmentTokenTypes,\n hasShortKeyProperty,\n} from \"../../../scan/tokens.js\";\nimport {\n createToken,\n createTokenInstance,\n} from \"../../../scan/tokens_public.js\";\nimport { END_OF_FILE } from \"../parser.js\";\nimport { BITS_FOR_OCCURRENCE_IDX } from \"../../grammar/keys.js\";\nimport { ParserMethodInternal } from \"../types.js\";\n\ntype ProdWithDef = IProduction & { definition?: IProduction[] };\nconst RECORDING_NULL_OBJECT = {\n description: \"This Object indicates the Parser is during Recording Phase\",\n};\nObject.freeze(RECORDING_NULL_OBJECT);\n\nconst HANDLE_SEPARATOR = true;\nconst MAX_METHOD_IDX = Math.pow(2, BITS_FOR_OCCURRENCE_IDX) - 1;\n\nconst RFT = createToken({ name: \"RECORDING_PHASE_TOKEN\", pattern: Lexer.NA });\naugmentTokenTypes([RFT]);\nconst RECORDING_PHASE_TOKEN = createTokenInstance(\n RFT,\n \"This IToken indicates the Parser is in Recording Phase\\n\\t\" +\n \"\" +\n \"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details\",\n // Using \"-1\" instead of NaN (as in EOF) because an actual number is less likely to\n // cause errors if the output of LA or CONSUME would be (incorrectly) used during the recording phase.\n -1,\n -1,\n -1,\n -1,\n -1,\n -1,\n);\nObject.freeze(RECORDING_PHASE_TOKEN);\n\nconst RECORDING_PHASE_CSTNODE: CstNode = {\n name:\n \"This CSTNode indicates the Parser is in Recording Phase\\n\\t\" +\n \"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details\",\n children: {},\n};\n\n/**\n * This trait handles the creation of the GAST structure for Chevrotain Grammars\n */\nexport class GastRecorder {\n recordingProdStack: ProdWithDef[];\n RECORDING_PHASE: boolean;\n\n initGastRecorder(this: MixedInParser, config: IParserConfig): void {\n this.recordingProdStack = [];\n this.RECORDING_PHASE = false;\n }\n\n enableRecording(this: MixedInParser): void {\n this.RECORDING_PHASE = true;\n\n this.TRACE_INIT(\"Enable Recording\", () => {\n /**\n * Warning Dark Voodoo Magic upcoming!\n * We are \"replacing\" the public parsing DSL methods API\n * With **new** alternative implementations on the Parser **instance**\n *\n * So far this is the only way I've found to avoid performance regressions during parsing time.\n * - Approx 30% performance regression was measured on Chrome 75 Canary when attempting to replace the \"internal\"\n * implementations directly instead.\n */\n for (let i = 0; i < 10; i++) {\n const idx = i > 0 ? i : \"\";\n this[`CONSUME${idx}` as \"CONSUME\"] = function (arg1, arg2) {\n return this.consumeInternalRecord(arg1, i, arg2);\n };\n this[`SUBRULE${idx}` as \"SUBRULE\"] = function (arg1, arg2) {\n return this.subruleInternalRecord(arg1, i, arg2) as any;\n };\n this[`OPTION${idx}` as \"OPTION\"] = function (arg1) {\n return this.optionInternalRecord(arg1, i);\n };\n this[`OR${idx}` as \"OR\"] = function (arg1) {\n return this.orInternalRecord(arg1, i);\n };\n this[`MANY${idx}` as \"MANY\"] = function (arg1) {\n this.manyInternalRecord(i, arg1);\n };\n this[`MANY_SEP${idx}` as \"MANY_SEP\"] = function (arg1) {\n this.manySepFirstInternalRecord(i, arg1);\n };\n this[`AT_LEAST_ONE${idx}` as \"AT_LEAST_ONE\"] = function (arg1) {\n this.atLeastOneInternalRecord(i, arg1);\n };\n this[`AT_LEAST_ONE_SEP${idx}` as \"AT_LEAST_ONE_SEP\"] = function (arg1) {\n this.atLeastOneSepFirstInternalRecord(i, arg1);\n };\n }\n\n // DSL methods with the idx(suffix) as an argument\n this[`consume`] = function (idx, arg1, arg2) {\n return this.consumeInternalRecord(arg1, idx, arg2);\n };\n this[`subrule`] = function (idx, arg1, arg2) {\n return this.subruleInternalRecord(arg1, idx, arg2) as any;\n };\n this[`option`] = function (idx, arg1) {\n return this.optionInternalRecord(arg1, idx);\n };\n this[`or`] = function (idx, arg1) {\n return this.orInternalRecord(arg1, idx);\n };\n this[`many`] = function (idx, arg1) {\n this.manyInternalRecord(idx, arg1);\n };\n this[`atLeastOne`] = function (idx, arg1) {\n this.atLeastOneInternalRecord(idx, arg1);\n };\n\n this.ACTION = this.ACTION_RECORD;\n this.BACKTRACK = this.BACKTRACK_RECORD;\n this.LA = this.LA_RECORD;\n });\n }\n\n disableRecording(this: MixedInParser) {\n this.RECORDING_PHASE = false;\n // By deleting these **instance** properties, any future invocation\n // will be deferred to the original methods on the **prototype** object\n // This seems to get rid of any incorrect optimizations that V8 may\n // do during the recording phase.\n this.TRACE_INIT(\"Deleting Recording methods\", () => {\n const that: any = this;\n\n for (let i = 0; i < 10; i++) {\n const idx = i > 0 ? i : \"\";\n delete that[`CONSUME${idx}`];\n delete that[`SUBRULE${idx}`];\n delete that[`OPTION${idx}`];\n delete that[`OR${idx}`];\n delete that[`MANY${idx}`];\n delete that[`MANY_SEP${idx}`];\n delete that[`AT_LEAST_ONE${idx}`];\n delete that[`AT_LEAST_ONE_SEP${idx}`];\n }\n\n delete that[`consume`];\n delete that[`subrule`];\n delete that[`option`];\n delete that[`or`];\n delete that[`many`];\n delete that[`atLeastOne`];\n\n delete that.ACTION;\n delete that.BACKTRACK;\n delete that.LA;\n });\n }\n\n // Parser methods are called inside an ACTION?\n // Maybe try/catch/finally on ACTIONS while disabling the recorders state changes?\n // @ts-expect-error -- noop place holder\n ACTION_RECORD(this: MixedInParser, impl: () => T): T {\n // NO-OP during recording\n }\n\n // Executing backtracking logic will break our recording logic assumptions\n BACKTRACK_RECORD(\n grammarRule: (...args: any[]) => T,\n args?: any[],\n ): () => boolean {\n return () => true;\n }\n\n // LA is part of the official API and may be used for custom lookahead logic\n // by end users who may forget to wrap it in ACTION or inside a GATE\n LA_RECORD(howMuch: number): IToken {\n // We cannot use the RECORD_PHASE_TOKEN here because someone may depend\n // On LA return EOF at the end of the input so an infinite loop may occur.\n return END_OF_FILE;\n }\n\n topLevelRuleRecord(name: string, def: Function): Rule {\n try {\n const newTopLevelRule = new Rule({ definition: [], name: name });\n newTopLevelRule.name = name;\n this.recordingProdStack.push(newTopLevelRule);\n def.call(this);\n this.recordingProdStack.pop();\n return newTopLevelRule;\n } catch (originalError) {\n if (originalError.KNOWN_RECORDER_ERROR !== true) {\n try {\n originalError.message =\n originalError.message +\n '\\n\\t This error was thrown during the \"grammar recording phase\" For more info see:\\n\\t' +\n \"https://chevrotain.io/docs/guide/internals.html#grammar-recording\";\n } catch (mutabilityError) {\n // We may not be able to modify the original error object\n throw originalError;\n }\n }\n throw originalError;\n }\n }\n\n // Implementation of parsing DSL\n optionInternalRecord(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n occurrence: number,\n ): OUT {\n return recordProd.call(this, Option, actionORMethodDef, occurrence);\n }\n\n atLeastOneInternalRecord(\n this: MixedInParser,\n occurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n recordProd.call(this, RepetitionMandatory, actionORMethodDef, occurrence);\n }\n\n atLeastOneSepFirstInternalRecord(\n this: MixedInParser,\n occurrence: number,\n options: AtLeastOneSepMethodOpts,\n ): void {\n recordProd.call(\n this,\n RepetitionMandatoryWithSeparator,\n options,\n occurrence,\n HANDLE_SEPARATOR,\n );\n }\n\n manyInternalRecord(\n this: MixedInParser,\n occurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n recordProd.call(this, Repetition, actionORMethodDef, occurrence);\n }\n\n manySepFirstInternalRecord(\n this: MixedInParser,\n occurrence: number,\n options: ManySepMethodOpts,\n ): void {\n recordProd.call(\n this,\n RepetitionWithSeparator,\n options,\n occurrence,\n HANDLE_SEPARATOR,\n );\n }\n\n orInternalRecord(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n occurrence: number,\n ): T {\n return recordOrProd.call(this, altsOrOpts, occurrence);\n }\n\n subruleInternalRecord(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n occurrence: number,\n options?: SubruleMethodOpts,\n ): R | CstNode {\n assertMethodIdxIsValid(occurrence);\n if (!ruleToCall || has(ruleToCall, \"ruleName\") === false) {\n const error: any = new Error(\n ` argument is invalid` +\n ` expecting a Parser method reference but got: <${JSON.stringify(\n ruleToCall,\n )}>` +\n `\\n inside top level rule: <${\n (this.recordingProdStack[0]).name\n }>`,\n );\n error.KNOWN_RECORDER_ERROR = true;\n throw error;\n }\n\n const prevProd: any = peek(this.recordingProdStack);\n const ruleName = ruleToCall.ruleName;\n const newNoneTerminal = new NonTerminal({\n idx: occurrence,\n nonTerminalName: ruleName,\n label: options?.LABEL,\n // The resolving of the `referencedRule` property will be done once all the Rule's GASTs have been created\n referencedRule: undefined,\n });\n prevProd.definition.push(newNoneTerminal);\n\n return this.outputCst\n ? RECORDING_PHASE_CSTNODE\n : RECORDING_NULL_OBJECT;\n }\n\n consumeInternalRecord(\n this: MixedInParser,\n tokType: TokenType,\n occurrence: number,\n options?: ConsumeMethodOpts,\n ): IToken {\n assertMethodIdxIsValid(occurrence);\n if (!hasShortKeyProperty(tokType)) {\n const error: any = new Error(\n ` argument is invalid` +\n ` expecting a TokenType reference but got: <${JSON.stringify(\n tokType,\n )}>` +\n `\\n inside top level rule: <${\n (this.recordingProdStack[0]).name\n }>`,\n );\n error.KNOWN_RECORDER_ERROR = true;\n throw error;\n }\n const prevProd: any = peek(this.recordingProdStack);\n const newNoneTerminal = new Terminal({\n idx: occurrence,\n terminalType: tokType,\n label: options?.LABEL,\n });\n prevProd.definition.push(newNoneTerminal);\n\n return RECORDING_PHASE_TOKEN;\n }\n}\n\nfunction recordProd(\n prodConstructor: any,\n mainProdArg: any,\n occurrence: number,\n handleSep: boolean = false,\n): any {\n assertMethodIdxIsValid(occurrence);\n const prevProd: any = peek(this.recordingProdStack);\n const grammarAction = isFunction(mainProdArg) ? mainProdArg : mainProdArg.DEF;\n\n const newProd = new prodConstructor({ definition: [], idx: occurrence });\n if (handleSep) {\n newProd.separator = mainProdArg.SEP;\n }\n if (has(mainProdArg, \"MAX_LOOKAHEAD\")) {\n newProd.maxLookahead = mainProdArg.MAX_LOOKAHEAD;\n }\n\n this.recordingProdStack.push(newProd);\n grammarAction.call(this);\n prevProd.definition.push(newProd);\n this.recordingProdStack.pop();\n\n return RECORDING_NULL_OBJECT;\n}\n\nfunction recordOrProd(mainProdArg: any, occurrence: number): any {\n assertMethodIdxIsValid(occurrence);\n const prevProd: any = peek(this.recordingProdStack);\n // Only an array of alternatives\n const hasOptions = isArray(mainProdArg) === false;\n const alts: IOrAlt[] =\n hasOptions === false ? mainProdArg : mainProdArg.DEF;\n\n const newOrProd = new Alternation({\n definition: [],\n idx: occurrence,\n ignoreAmbiguities: hasOptions && mainProdArg.IGNORE_AMBIGUITIES === true,\n });\n if (has(mainProdArg, \"MAX_LOOKAHEAD\")) {\n newOrProd.maxLookahead = mainProdArg.MAX_LOOKAHEAD;\n }\n\n const hasPredicates = some(alts, (currAlt: any) => isFunction(currAlt.GATE));\n newOrProd.hasPredicates = hasPredicates;\n\n prevProd.definition.push(newOrProd);\n\n forEach(alts, (currAlt) => {\n const currAltFlat = new Alternative({ definition: [] });\n newOrProd.definition.push(currAltFlat);\n if (has(currAlt, \"IGNORE_AMBIGUITIES\")) {\n currAltFlat.ignoreAmbiguities = currAlt.IGNORE_AMBIGUITIES as boolean; // assumes end user provides the correct config value/type\n }\n // **implicit** ignoreAmbiguities due to usage of gate\n else if (has(currAlt, \"GATE\")) {\n currAltFlat.ignoreAmbiguities = true;\n }\n this.recordingProdStack.push(currAltFlat);\n currAlt.ALT.call(this);\n this.recordingProdStack.pop();\n });\n return RECORDING_NULL_OBJECT;\n}\n\nfunction getIdxSuffix(idx: number): string {\n return idx === 0 ? \"\" : `${idx}`;\n}\n\nfunction assertMethodIdxIsValid(idx: number): void {\n if (idx < 0 || idx > MAX_METHOD_IDX) {\n const error: any = new Error(\n // The stack trace will contain all the needed details\n `Invalid DSL Method idx value: <${idx}>\\n\\t` +\n `Idx value must be a none negative value smaller than ${\n MAX_METHOD_IDX + 1\n }`,\n );\n error.KNOWN_RECORDER_ERROR = true;\n throw error;\n }\n}\n", "import { IParserConfig } from \"@chevrotain/types\";\nimport { has } from \"lodash-es\";\nimport { timer } from \"@chevrotain/utils\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\n\n/**\n * Trait responsible for runtime parsing errors.\n */\nexport class PerformanceTracer {\n traceInitPerf: boolean | number;\n traceInitMaxIdent: number;\n traceInitIndent: number;\n\n initPerformanceTracer(config: IParserConfig) {\n if (has(config, \"traceInitPerf\")) {\n const userTraceInitPerf = config.traceInitPerf;\n const traceIsNumber = typeof userTraceInitPerf === \"number\";\n this.traceInitMaxIdent = traceIsNumber\n ? userTraceInitPerf\n : Infinity;\n this.traceInitPerf = traceIsNumber\n ? userTraceInitPerf > 0\n : (userTraceInitPerf as boolean); // assumes end user provides the correct config value/type\n } else {\n this.traceInitMaxIdent = 0;\n this.traceInitPerf = DEFAULT_PARSER_CONFIG.traceInitPerf;\n }\n\n this.traceInitIndent = -1;\n }\n\n TRACE_INIT(this: MixedInParser, phaseDesc: string, phaseImpl: () => T): T {\n // No need to optimize this using NOOP pattern because\n // It is not called in a hot spot...\n if (this.traceInitPerf === true) {\n this.traceInitIndent++;\n const indent = new Array(this.traceInitIndent + 1).join(\"\\t\");\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n console.log(`${indent}--> <${phaseDesc}>`);\n }\n const { time, value } = timer(phaseImpl);\n /* istanbul ignore next - Difficult to reproduce specific performance behavior (>10ms) in tests */\n const traceMethod = time > 10 ? console.warn : console.log;\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n traceMethod(`${indent}<-- <${phaseDesc}> time: ${time}ms`);\n }\n this.traceInitIndent--;\n return value;\n } else {\n return phaseImpl();\n }\n }\n}\n", "export function applyMixins(derivedCtor: any, baseCtors: any[]) {\n baseCtors.forEach((baseCtor) => {\n const baseProto = baseCtor.prototype;\n Object.getOwnPropertyNames(baseProto).forEach((propName) => {\n if (propName === \"constructor\") {\n return;\n }\n\n const basePropDescriptor = Object.getOwnPropertyDescriptor(\n baseProto,\n propName,\n );\n // Handle Accessors\n if (\n basePropDescriptor &&\n (basePropDescriptor.get || basePropDescriptor.set)\n ) {\n Object.defineProperty(\n derivedCtor.prototype,\n propName,\n basePropDescriptor,\n );\n } else {\n derivedCtor.prototype[propName] = baseCtor.prototype[propName];\n }\n });\n });\n}\n", "import { clone, forEach, has, isEmpty, map, values } from \"lodash-es\";\nimport { toFastProperties } from \"@chevrotain/utils\";\nimport { computeAllProdsFollows } from \"../grammar/follow.js\";\nimport { createTokenInstance, EOF } from \"../../scan/tokens_public.js\";\nimport {\n defaultGrammarValidatorErrorProvider,\n defaultParserErrorProvider,\n} from \"../errors_public.js\";\nimport {\n resolveGrammar,\n validateGrammar,\n} from \"../grammar/gast/gast_resolver_public.js\";\nimport {\n CstNode,\n IParserConfig,\n IRecognitionException,\n IRuleConfig,\n IToken,\n TokenType,\n TokenVocabulary,\n} from \"@chevrotain/types\";\nimport { Recoverable } from \"./traits/recoverable.js\";\nimport { LooksAhead } from \"./traits/looksahead.js\";\nimport { TreeBuilder } from \"./traits/tree_builder.js\";\nimport { LexerAdapter } from \"./traits/lexer_adapter.js\";\nimport { RecognizerApi } from \"./traits/recognizer_api.js\";\nimport { RecognizerEngine } from \"./traits/recognizer_engine.js\";\n\nimport { ErrorHandler } from \"./traits/error_handler.js\";\nimport { MixedInParser } from \"./traits/parser_traits.js\";\nimport { ContentAssist } from \"./traits/context_assist.js\";\nimport { GastRecorder } from \"./traits/gast_recorder.js\";\nimport { PerformanceTracer } from \"./traits/perf_tracer.js\";\nimport { applyMixins } from \"./utils/apply_mixins.js\";\nimport { IParserDefinitionError } from \"../grammar/types.js\";\nimport { Rule } from \"@chevrotain/gast\";\nimport { IParserConfigInternal, ParserMethodInternal } from \"./types.js\";\nimport { validateLookahead } from \"../grammar/checks.js\";\n\nexport const END_OF_FILE = createTokenInstance(\n EOF,\n \"\",\n NaN,\n NaN,\n NaN,\n NaN,\n NaN,\n NaN,\n);\nObject.freeze(END_OF_FILE);\n\nexport type TokenMatcher = (token: IToken, tokType: TokenType) => boolean;\n\nexport const DEFAULT_PARSER_CONFIG: Required<\n Omit\n> = Object.freeze({\n recoveryEnabled: false,\n maxLookahead: 3,\n dynamicTokensEnabled: false,\n outputCst: true,\n errorMessageProvider: defaultParserErrorProvider,\n nodeLocationTracking: \"none\",\n traceInitPerf: false,\n skipValidations: false,\n});\n\nexport const DEFAULT_RULE_CONFIG: Required> = Object.freeze({\n recoveryValueFunc: () => undefined,\n resyncEnabled: true,\n});\n\nexport enum ParserDefinitionErrorType {\n INVALID_RULE_NAME = 0,\n DUPLICATE_RULE_NAME = 1,\n INVALID_RULE_OVERRIDE = 2,\n DUPLICATE_PRODUCTIONS = 3,\n UNRESOLVED_SUBRULE_REF = 4,\n LEFT_RECURSION = 5,\n NONE_LAST_EMPTY_ALT = 6,\n AMBIGUOUS_ALTS = 7,\n CONFLICT_TOKENS_RULES_NAMESPACE = 8,\n INVALID_TOKEN_NAME = 9,\n NO_NON_EMPTY_LOOKAHEAD = 10,\n AMBIGUOUS_PREFIX_ALTS = 11,\n TOO_MANY_ALTS = 12,\n CUSTOM_LOOKAHEAD_VALIDATION = 13,\n}\n\nexport interface IParserDuplicatesDefinitionError\n extends IParserDefinitionError {\n dslName: string;\n occurrence: number;\n parameter?: string;\n}\n\nexport interface IParserEmptyAlternativeDefinitionError\n extends IParserDefinitionError {\n occurrence: number;\n alternative: number;\n}\n\nexport interface IParserAmbiguousAlternativesDefinitionError\n extends IParserDefinitionError {\n occurrence: number | string;\n alternatives: number[];\n}\n\nexport interface IParserUnresolvedRefDefinitionError\n extends IParserDefinitionError {\n unresolvedRefName: string;\n}\n\nexport interface IParserState {\n errors: IRecognitionException[];\n lexerState: any;\n RULE_STACK: number[];\n CST_STACK: CstNode[];\n}\n\nexport type Predicate = () => boolean;\n\nexport function EMPTY_ALT(): () => undefined;\nexport function EMPTY_ALT(value: T): () => T;\nexport function EMPTY_ALT(value: any = undefined) {\n return function () {\n return value;\n };\n}\n\nexport class Parser {\n // Set this flag to true if you don't want the Parser to throw error when problems in it's definition are detected.\n // (normally during the parser's constructor).\n // This is a design time flag, it will not affect the runtime error handling of the parser, just design time errors,\n // for example: duplicate rule names, referencing an unresolved subrule, ect...\n // This flag should not be enabled during normal usage, it is used in special situations, for example when\n // needing to display the parser definition errors in some GUI(online playground).\n static DEFER_DEFINITION_ERRORS_HANDLING: boolean = false;\n\n /**\n * @deprecated use the **instance** method with the same name instead\n */\n static performSelfAnalysis(parserInstance: Parser): void {\n throw Error(\n \"The **static** `performSelfAnalysis` method has been deprecated.\" +\n \"\\t\\nUse the **instance** method with the same name instead.\",\n );\n }\n\n public performSelfAnalysis(this: MixedInParser): void {\n this.TRACE_INIT(\"performSelfAnalysis\", () => {\n let defErrorsMsgs;\n\n this.selfAnalysisDone = true;\n const className = this.className;\n\n this.TRACE_INIT(\"toFastProps\", () => {\n // Without this voodoo magic the parser would be x3-x4 slower\n // It seems it is better to invoke `toFastProperties` **before**\n // Any manipulations of the `this` object done during the recording phase.\n toFastProperties(this);\n });\n\n this.TRACE_INIT(\"Grammar Recording\", () => {\n try {\n this.enableRecording();\n // Building the GAST\n forEach(this.definedRulesNames, (currRuleName) => {\n const wrappedRule = (this as any)[\n currRuleName\n ] as ParserMethodInternal;\n const originalGrammarAction = wrappedRule[\"originalGrammarAction\"];\n let recordedRuleGast!: Rule;\n this.TRACE_INIT(`${currRuleName} Rule`, () => {\n recordedRuleGast = this.topLevelRuleRecord(\n currRuleName,\n originalGrammarAction,\n );\n });\n this.gastProductionsCache[currRuleName] = recordedRuleGast;\n });\n } finally {\n this.disableRecording();\n }\n });\n\n let resolverErrors: IParserDefinitionError[] = [];\n this.TRACE_INIT(\"Grammar Resolving\", () => {\n resolverErrors = resolveGrammar({\n rules: values(this.gastProductionsCache),\n });\n this.definitionErrors = this.definitionErrors.concat(resolverErrors);\n });\n\n this.TRACE_INIT(\"Grammar Validations\", () => {\n // only perform additional grammar validations IFF no resolving errors have occurred.\n // as unresolved grammar may lead to unhandled runtime exceptions in the follow up validations.\n if (isEmpty(resolverErrors) && this.skipValidations === false) {\n const validationErrors = validateGrammar({\n rules: values(this.gastProductionsCache),\n tokenTypes: values(this.tokensMap),\n errMsgProvider: defaultGrammarValidatorErrorProvider,\n grammarName: className,\n });\n const lookaheadValidationErrors = validateLookahead({\n lookaheadStrategy: this.lookaheadStrategy,\n rules: values(this.gastProductionsCache),\n tokenTypes: values(this.tokensMap),\n grammarName: className,\n });\n this.definitionErrors = this.definitionErrors.concat(\n validationErrors,\n lookaheadValidationErrors,\n );\n }\n });\n\n // this analysis may fail if the grammar is not perfectly valid\n if (isEmpty(this.definitionErrors)) {\n // The results of these computations are not needed unless error recovery is enabled.\n if (this.recoveryEnabled) {\n this.TRACE_INIT(\"computeAllProdsFollows\", () => {\n const allFollows = computeAllProdsFollows(\n values(this.gastProductionsCache),\n );\n this.resyncFollows = allFollows;\n });\n }\n\n this.TRACE_INIT(\"ComputeLookaheadFunctions\", () => {\n this.lookaheadStrategy.initialize?.({\n rules: values(this.gastProductionsCache),\n });\n this.preComputeLookaheadFunctions(values(this.gastProductionsCache));\n });\n }\n\n if (\n !Parser.DEFER_DEFINITION_ERRORS_HANDLING &&\n !isEmpty(this.definitionErrors)\n ) {\n defErrorsMsgs = map(\n this.definitionErrors,\n (defError) => defError.message,\n );\n throw new Error(\n `Parser Definition Errors detected:\\n ${defErrorsMsgs.join(\n \"\\n-------------------------------\\n\",\n )}`,\n );\n }\n });\n }\n\n definitionErrors: IParserDefinitionError[] = [];\n selfAnalysisDone = false;\n protected skipValidations: boolean;\n\n constructor(tokenVocabulary: TokenVocabulary, config: IParserConfig) {\n const that: MixedInParser = this as any;\n that.initErrorHandler(config);\n that.initLexerAdapter();\n that.initLooksAhead(config);\n that.initRecognizerEngine(tokenVocabulary, config);\n that.initRecoverable(config);\n that.initTreeBuilder(config);\n that.initContentAssist();\n that.initGastRecorder(config);\n that.initPerformanceTracer(config);\n\n if (has(config, \"ignoredIssues\")) {\n throw new Error(\n \"The IParserConfig property has been deprecated.\\n\\t\" +\n \"Please use the flag on the relevant DSL method instead.\\n\\t\" +\n \"See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\\n\\t\" +\n \"For further details.\",\n );\n }\n\n this.skipValidations = has(config, \"skipValidations\")\n ? (config.skipValidations as boolean) // casting assumes the end user passing the correct type\n : DEFAULT_PARSER_CONFIG.skipValidations;\n }\n}\n\napplyMixins(Parser, [\n Recoverable,\n LooksAhead,\n TreeBuilder,\n LexerAdapter,\n RecognizerEngine,\n RecognizerApi,\n ErrorHandler,\n ContentAssist,\n GastRecorder,\n PerformanceTracer,\n]);\n\nexport class CstParser extends Parser {\n constructor(\n tokenVocabulary: TokenVocabulary,\n config: IParserConfigInternal = DEFAULT_PARSER_CONFIG,\n ) {\n const configClone = clone(config);\n configClone.outputCst = true;\n super(tokenVocabulary, configClone);\n }\n}\n\nexport class EmbeddedActionsParser extends Parser {\n constructor(\n tokenVocabulary: TokenVocabulary,\n config: IParserConfigInternal = DEFAULT_PARSER_CONFIG,\n ) {\n const configClone = clone(config);\n configClone.outputCst = false;\n super(tokenVocabulary, configClone);\n }\n}\n", "import type {\n Alternation,\n Alternative,\n IProduction,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n TokenType,\n} from \"@chevrotain/types\";\nimport { GAstVisitor, NonTerminal } from \"@chevrotain/gast\";\nimport { assign, flatten, groupBy, map, some, values } from \"lodash-es\";\n\nexport function buildModel(\n productions: Record,\n): CstNodeTypeDefinition[] {\n const generator = new CstNodeDefinitionGenerator();\n const allRules = values(productions);\n return map(allRules, (rule) => generator.visitRule(rule));\n}\n\nexport type CstNodeTypeDefinition = {\n name: string;\n properties: PropertyTypeDefinition[];\n};\n\nexport type PropertyTypeDefinition = {\n name: string;\n type: PropertyArrayType;\n optional: boolean;\n};\n\nexport type PropertyArrayType =\n | TokenArrayType\n | RuleArrayType\n | (TokenArrayType | RuleArrayType)[];\n\nexport type TokenArrayType = { kind: \"token\" };\nexport type RuleArrayType = {\n kind: \"rule\";\n name: string;\n};\n\nclass CstNodeDefinitionGenerator extends GAstVisitor {\n visitRule(node: Rule): CstNodeTypeDefinition {\n const rawElements = this.visitEach(node.definition);\n\n const grouped = groupBy(rawElements, (el) => el.propertyName);\n const properties = map(grouped, (group, propertyName) => {\n const allNullable = !some(group, (el) => !el.canBeNull);\n\n // In an alternation with a label a property name can have\n // multiple types.\n let propertyType: PropertyArrayType = group[0].type;\n if (group.length > 1) {\n propertyType = map(group, (g) => g.type);\n }\n\n return {\n name: propertyName,\n type: propertyType,\n optional: allNullable,\n } as PropertyTypeDefinition;\n });\n\n return {\n name: node.name,\n properties: properties,\n };\n }\n\n visitAlternative(node: Alternative) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n\n visitOption(node: Option) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n\n visitRepetition(node: Repetition) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n\n visitRepetitionMandatory(node: RepetitionMandatory) {\n return this.visitEach(node.definition);\n }\n\n visitRepetitionMandatoryWithSeparator(\n node: RepetitionMandatoryWithSeparator,\n ) {\n return this.visitEach(node.definition).concat({\n propertyName: node.separator.name,\n canBeNull: true,\n type: getType(node.separator),\n });\n }\n\n visitRepetitionWithSeparator(node: RepetitionWithSeparator) {\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\n visitAlternation(node: Alternation) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n\n visitTerminal(node: Terminal): PropertyTupleElement[] {\n return [\n {\n propertyName: node.label || node.terminalType.name,\n canBeNull: false,\n type: getType(node),\n },\n ];\n }\n\n visitNonTerminal(node: NonTerminal): PropertyTupleElement[] {\n return [\n {\n propertyName: node.label || node.nonTerminalName,\n canBeNull: false,\n type: getType(node),\n },\n ];\n }\n\n private visitEachAndOverrideWith(\n definition: IProduction[],\n override: Partial,\n ) {\n return map(\n this.visitEach(definition),\n (definition) => assign({}, definition, override) as PropertyTupleElement,\n );\n }\n\n private visitEach(definition: IProduction[]) {\n return flatten(\n map(\n definition,\n (definition) => this.visit(definition) as PropertyTupleElement[],\n ),\n );\n }\n}\n\ntype PropertyTupleElement = {\n propertyName: string;\n canBeNull: boolean;\n type: TokenArrayType | RuleArrayType;\n};\n\nfunction getType(\n production: Terminal | NonTerminal | TokenType,\n): TokenArrayType | RuleArrayType {\n if (production instanceof NonTerminal) {\n return {\n kind: \"rule\",\n name: production.referencedRule.name,\n };\n }\n\n return { kind: \"token\" };\n}\n", "import { flatten, isArray, map, reduce, uniq, upperFirst } from \"lodash-es\";\nimport { GenerateDtsOptions } from \"@chevrotain/types\";\nimport {\n CstNodeTypeDefinition,\n PropertyArrayType,\n PropertyTypeDefinition,\n RuleArrayType,\n TokenArrayType,\n} from \"./model.js\";\n\nexport function genDts(\n model: CstNodeTypeDefinition[],\n options: Required,\n): string {\n let contentParts: string[] = [];\n\n contentParts = contentParts.concat(\n `import type { CstNode, ICstVisitor, IToken } from \"chevrotain\";`,\n );\n\n contentParts = contentParts.concat(\n flatten(map(model, (node) => genCstNodeTypes(node))),\n );\n\n if (options.includeVisitorInterface) {\n contentParts = contentParts.concat(\n genVisitor(options.visitorInterfaceName, model),\n );\n }\n\n return contentParts.join(\"\\n\\n\") + \"\\n\";\n}\n\nfunction genCstNodeTypes(node: CstNodeTypeDefinition) {\n const nodeCstInterface = genNodeInterface(node);\n const nodeChildrenInterface = genNodeChildrenType(node);\n\n return [nodeCstInterface, nodeChildrenInterface];\n}\n\nfunction genNodeInterface(node: CstNodeTypeDefinition) {\n const nodeInterfaceName = getNodeInterfaceName(node.name);\n const childrenTypeName = getNodeChildrenTypeName(node.name);\n\n return `export interface ${nodeInterfaceName} extends CstNode {\n name: \"${node.name}\";\n children: ${childrenTypeName};\n}`;\n}\n\nfunction genNodeChildrenType(node: CstNodeTypeDefinition) {\n const typeName = getNodeChildrenTypeName(node.name);\n\n return `export type ${typeName} = {\n ${map(node.properties, (property) => genChildProperty(property)).join(\"\\n \")}\n};`;\n}\n\nfunction genChildProperty(prop: PropertyTypeDefinition) {\n const typeName = buildTypeString(prop.type);\n return `${prop.name}${prop.optional ? \"?\" : \"\"}: ${typeName}[];`;\n}\n\nfunction genVisitor(name: string, nodes: CstNodeTypeDefinition[]) {\n return `export interface ${name} extends ICstVisitor {\n ${map(nodes, (node) => genVisitorFunction(node)).join(\"\\n \")}\n}`;\n}\n\nfunction genVisitorFunction(node: CstNodeTypeDefinition) {\n const childrenTypeName = getNodeChildrenTypeName(node.name);\n return `${node.name}(children: ${childrenTypeName}, param?: IN): OUT;`;\n}\n\nfunction buildTypeString(type: PropertyArrayType) {\n if (isArray(type)) {\n const typeNames = uniq(map(type, (t) => getTypeString(t)));\n const typeString = reduce(typeNames, (sum, t) => sum + \" | \" + t);\n return \"(\" + typeString + \")\";\n } else {\n return getTypeString(type);\n }\n}\n\nfunction getTypeString(type: TokenArrayType | RuleArrayType) {\n if (type.kind === \"token\") {\n return \"IToken\";\n }\n return getNodeInterfaceName(type.name);\n}\n\nfunction getNodeInterfaceName(ruleName: string) {\n return upperFirst(ruleName) + \"CstNode\";\n}\n\nfunction getNodeChildrenTypeName(ruleName: string) {\n return upperFirst(ruleName) + \"CstChildren\";\n}\n", "import { GenerateDtsOptions, Rule } from \"@chevrotain/types\";\nimport { buildModel } from \"./model.js\";\nimport { genDts } from \"./generate.js\";\n\nconst defaultOptions: Required = {\n includeVisitorInterface: true,\n visitorInterfaceName: \"ICstNodeVisitor\",\n};\n\nexport function generateCstDts(\n productions: Record,\n options?: GenerateDtsOptions,\n): string {\n const effectiveOptions = {\n ...defaultOptions,\n ...options,\n };\n\n const model = buildModel(productions);\n\n return genDts(model, effectiveOptions);\n}\n", "import { VERSION } from \"../version.js\";\nimport { ISerializedGast } from \"@chevrotain/types\";\n\nexport function createSyntaxDiagramsCode(\n grammar: ISerializedGast[],\n {\n resourceBase = `https://unpkg.com/chevrotain@${VERSION}/diagrams/`,\n css = `https://unpkg.com/chevrotain@${VERSION}/diagrams/diagrams.css`,\n }: {\n resourceBase?: string;\n css?: string;\n } = {},\n) {\n const header = `\n\n\n\n\n\n`;\n const cssHtml = `\n\n`;\n\n const scripts = `\n\n\n\n\n`;\n const diagramsDiv = `\n
    \n`;\n const serializedGrammar = `\n\n`;\n\n const initLogic = `\n\n`;\n return (\n header + cssHtml + scripts + diagramsDiv + serializedGrammar + initLogic\n );\n}\n", "/* istanbul ignore file - tricky to import some things from this module during testing */\n\n// semantic version\nexport { VERSION } from \"./version.js\";\n\nexport {\n CstParser,\n EmbeddedActionsParser,\n ParserDefinitionErrorType,\n EMPTY_ALT,\n} from \"./parse/parser/parser.js\";\n\nexport { Lexer, LexerDefinitionErrorType } from \"./scan/lexer_public.js\";\n\n// Tokens utilities\nexport {\n createToken,\n createTokenInstance,\n EOF,\n tokenLabel,\n tokenMatcher,\n tokenName,\n} from \"./scan/tokens_public.js\";\n\n// Lookahead\n\nexport { getLookaheadPaths } from \"./parse/grammar/lookahead.js\";\n\nexport { LLkLookaheadStrategy } from \"./parse/grammar/llk_lookahead.js\";\n\n// Other Utilities\n\nexport { defaultParserErrorProvider } from \"./parse/errors_public.js\";\n\nexport {\n EarlyExitException,\n isRecognitionException,\n MismatchedTokenException,\n NotAllInputParsedException,\n NoViableAltException,\n} from \"./parse/exceptions_public.js\";\n\nexport { defaultLexerErrorProvider } from \"./scan/lexer_errors_public.js\";\n\n// grammar reflection API\nexport {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"@chevrotain/gast\";\n\n// GAST Utilities\n\nexport {\n serializeGrammar,\n serializeProduction,\n GAstVisitor,\n} from \"@chevrotain/gast\";\n\nexport { generateCstDts } from \"@chevrotain/cst-dts-gen\";\n\n/* istanbul ignore next */\nexport function clearCache() {\n console.warn(\n \"The clearCache function was 'soft' removed from the Chevrotain API.\" +\n \"\\n\\t It performs no action other than printing this message.\" +\n \"\\n\\t Please avoid using it as it will be completely removed in the future\",\n );\n}\n\nexport { createSyntaxDiagramsCode } from \"./diagrams/render_public.js\";\n\nexport class Parser {\n constructor() {\n throw new Error(\n \"The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.\\t\\n\" +\n \"See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0\",\n );\n }\n}\n", "/******************************************************************************\r\n * Copyright 2022 TypeFox GmbH\r\n * This program and the accompanying materials are made available under the\r\n * terms of the MIT License, which is available in the project root.\r\n ******************************************************************************/\r\n\r\nimport map from \"lodash-es/map.js\"\r\nimport filter from \"lodash-es/filter.js\"\r\nimport {\r\n IProduction,\r\n IProductionWithOccurrence,\r\n TokenType,\r\n Alternation,\r\n NonTerminal,\r\n Rule,\r\n Option,\r\n RepetitionMandatory,\r\n Repetition,\r\n Terminal,\r\n Alternative,\r\n RepetitionWithSeparator,\r\n RepetitionMandatoryWithSeparator,\r\n LookaheadProductionType\r\n} from \"chevrotain\"\r\n\r\nexport function buildATNKey(rule: Rule, type: LookaheadProductionType, occurrence: number): string {\r\n return `${rule.name}_${type}_${occurrence}`;\r\n}\r\n\r\nexport interface ATN {\r\n decisionMap: Record\r\n states: ATNState[]\r\n decisionStates: DecisionState[]\r\n ruleToStartState: Map\r\n ruleToStopState: Map\r\n}\r\n\r\nexport const ATN_INVALID_TYPE = 0\r\nexport const ATN_BASIC = 1\r\nexport const ATN_RULE_START = 2\r\nexport const ATN_PLUS_BLOCK_START = 4\r\nexport const ATN_STAR_BLOCK_START = 5\r\n// Currently unused as the ATN is not used for lexing\r\nexport const ATN_TOKEN_START = 6\r\nexport const ATN_RULE_STOP = 7\r\nexport const ATN_BLOCK_END = 8\r\nexport const ATN_STAR_LOOP_BACK = 9\r\nexport const ATN_STAR_LOOP_ENTRY = 10\r\nexport const ATN_PLUS_LOOP_BACK = 11\r\nexport const ATN_LOOP_END = 12\r\n\r\nexport type ATNState =\r\n | BasicState\r\n | BasicBlockStartState\r\n | PlusBlockStartState\r\n | PlusLoopbackState\r\n | StarBlockStartState\r\n | StarLoopbackState\r\n | StarLoopEntryState\r\n | BlockEndState\r\n | RuleStartState\r\n | RuleStopState\r\n | LoopEndState\r\n\r\nexport interface ATNBaseState {\r\n atn: ATN\r\n production: IProductionWithOccurrence\r\n stateNumber: number\r\n rule: Rule\r\n epsilonOnlyTransitions: boolean\r\n transitions: Transition[]\r\n nextTokenWithinRule: number[]\r\n}\r\n\r\nexport interface BasicState extends ATNBaseState {\r\n type: typeof ATN_BASIC\r\n}\r\n\r\nexport interface BlockStartState extends DecisionState {\r\n end: BlockEndState\r\n}\r\n\r\nexport interface BasicBlockStartState extends BlockStartState {\r\n type: typeof ATN_BASIC\r\n}\r\n\r\nexport interface PlusBlockStartState extends BlockStartState {\r\n loopback: PlusLoopbackState\r\n type: typeof ATN_PLUS_BLOCK_START\r\n}\r\n\r\nexport interface PlusLoopbackState extends DecisionState {\r\n type: typeof ATN_PLUS_LOOP_BACK\r\n}\r\n\r\nexport interface StarBlockStartState extends BlockStartState {\r\n type: typeof ATN_STAR_BLOCK_START\r\n}\r\n\r\nexport interface StarLoopbackState extends ATNBaseState {\r\n type: typeof ATN_STAR_LOOP_BACK\r\n}\r\n\r\nexport interface StarLoopEntryState extends DecisionState {\r\n loopback: StarLoopbackState\r\n type: typeof ATN_STAR_LOOP_ENTRY\r\n}\r\n\r\nexport interface BlockEndState extends ATNBaseState {\r\n start: BlockStartState\r\n type: typeof ATN_BLOCK_END\r\n}\r\n\r\nexport interface DecisionState extends ATNBaseState {\r\n decision: number\r\n}\r\n\r\nexport interface LoopEndState extends ATNBaseState {\r\n loopback: ATNState\r\n type: typeof ATN_LOOP_END\r\n}\r\n\r\nexport interface RuleStartState extends ATNBaseState {\r\n stop: RuleStopState\r\n type: typeof ATN_RULE_START\r\n}\r\n\r\nexport interface RuleStopState extends ATNBaseState {\r\n type: typeof ATN_RULE_STOP\r\n}\r\n\r\nexport interface Transition {\r\n target: ATNState\r\n isEpsilon(): boolean\r\n}\r\n\r\nexport abstract class AbstractTransition implements Transition {\r\n target: ATNState\r\n\r\n constructor(target: ATNState) {\r\n this.target = target\r\n }\r\n\r\n isEpsilon() {\r\n return false\r\n }\r\n}\r\n\r\nexport class AtomTransition extends AbstractTransition {\r\n tokenType: TokenType\r\n\r\n constructor(target: ATNState, tokenType: TokenType) {\r\n super(target)\r\n this.tokenType = tokenType\r\n }\r\n}\r\n\r\nexport class EpsilonTransition extends AbstractTransition {\r\n constructor(target: ATNState) {\r\n super(target)\r\n }\r\n\r\n isEpsilon() {\r\n return true\r\n }\r\n}\r\n\r\nexport class RuleTransition extends AbstractTransition {\r\n rule: Rule\r\n followState: ATNState\r\n\r\n constructor(ruleStart: RuleStartState, rule: Rule, followState: ATNState) {\r\n super(ruleStart)\r\n this.rule = rule\r\n this.followState = followState\r\n }\r\n\r\n isEpsilon() {\r\n return true\r\n }\r\n}\r\n\r\ninterface ATNHandle {\r\n left: ATNState\r\n right: ATNState\r\n}\r\n\r\nexport function createATN(rules: Rule[]): ATN {\r\n const atn: ATN = {\r\n decisionMap: {},\r\n decisionStates: [],\r\n ruleToStartState: new Map(),\r\n ruleToStopState: new Map(),\r\n states: []\r\n }\r\n createRuleStartAndStopATNStates(atn, rules)\r\n const ruleLength = rules.length\r\n for (let i = 0; i < ruleLength; i++) {\r\n const rule = rules[i]\r\n const ruleBlock = block(atn, rule, rule)\r\n if (ruleBlock === undefined) {\r\n continue\r\n }\r\n buildRuleHandle(atn, rule, ruleBlock)\r\n }\r\n return atn\r\n}\r\n\r\nfunction createRuleStartAndStopATNStates(atn: ATN, rules: Rule[]): void {\r\n const ruleLength = rules.length\r\n for (let i = 0; i < ruleLength; i++) {\r\n const rule = rules[i]\r\n const start = newState(atn, rule, undefined, {\r\n type: ATN_RULE_START\r\n })\r\n const stop = newState(atn, rule, undefined, {\r\n type: ATN_RULE_STOP\r\n })\r\n start.stop = stop\r\n atn.ruleToStartState.set(rule, start)\r\n atn.ruleToStopState.set(rule, stop)\r\n }\r\n}\r\n\r\nfunction atom(\r\n atn: ATN,\r\n rule: Rule,\r\n production: IProduction\r\n): ATNHandle | undefined {\r\n if (production instanceof Terminal) {\r\n return tokenRef(atn, rule, production.terminalType, production)\r\n } else if (production instanceof NonTerminal) {\r\n return ruleRef(atn, rule, production)\r\n } else if (production instanceof Alternation) {\r\n return alternation(atn, rule, production)\r\n } else if (production instanceof Option) {\r\n return option(atn, rule, production)\r\n } else if (production instanceof Repetition) {\r\n return repetition(atn, rule, production)\r\n } else if (production instanceof RepetitionWithSeparator) {\r\n return repetitionSep(atn, rule, production)\r\n } else if (production instanceof RepetitionMandatory) {\r\n return repetitionMandatory(atn, rule, production)\r\n } else if (production instanceof RepetitionMandatoryWithSeparator) {\r\n return repetitionMandatorySep(atn, rule, production)\r\n } else {\r\n return block(atn, rule, production as Alternative)\r\n }\r\n}\r\n\r\nfunction repetition(atn: ATN, rule: Rule, repetition: Repetition): ATNHandle {\r\n const starState = newState(atn, rule, repetition, {\r\n type: ATN_STAR_BLOCK_START\r\n })\r\n defineDecisionState(atn, starState)\r\n const handle = makeAlts(\r\n atn,\r\n rule,\r\n starState,\r\n repetition,\r\n block(atn, rule, repetition)\r\n )\r\n return star(atn, rule, repetition, handle)\r\n}\r\n\r\nfunction repetitionSep(\r\n atn: ATN,\r\n rule: Rule,\r\n repetition: RepetitionWithSeparator\r\n): ATNHandle {\r\n const starState = newState(atn, rule, repetition, {\r\n type: ATN_STAR_BLOCK_START\r\n })\r\n defineDecisionState(atn, starState)\r\n const handle = makeAlts(\r\n atn,\r\n rule,\r\n starState,\r\n repetition,\r\n block(atn, rule, repetition)\r\n )\r\n const sep = tokenRef(atn, rule, repetition.separator, repetition)\r\n return star(atn, rule, repetition, handle, sep)\r\n}\r\n\r\nfunction repetitionMandatory(\r\n atn: ATN,\r\n rule: Rule,\r\n repetition: RepetitionMandatory\r\n): ATNHandle {\r\n const plusState = newState(atn, rule, repetition, {\r\n type: ATN_PLUS_BLOCK_START\r\n })\r\n defineDecisionState(atn, plusState)\r\n const handle = makeAlts(\r\n atn,\r\n rule,\r\n plusState,\r\n repetition,\r\n block(atn, rule, repetition)\r\n )\r\n return plus(atn, rule, repetition, handle)\r\n}\r\n\r\nfunction repetitionMandatorySep(\r\n atn: ATN,\r\n rule: Rule,\r\n repetition: RepetitionMandatoryWithSeparator\r\n): ATNHandle {\r\n const plusState = newState(atn, rule, repetition, {\r\n type: ATN_PLUS_BLOCK_START\r\n })\r\n defineDecisionState(atn, plusState)\r\n const handle = makeAlts(\r\n atn,\r\n rule,\r\n plusState,\r\n repetition,\r\n block(atn, rule, repetition)\r\n )\r\n const sep = tokenRef(atn, rule, repetition.separator, repetition)\r\n return plus(atn, rule, repetition, handle, sep)\r\n}\r\n\r\nfunction alternation(\r\n atn: ATN,\r\n rule: Rule,\r\n alternation: Alternation\r\n): ATNHandle {\r\n const start = newState(atn, rule, alternation, {\r\n type: ATN_BASIC\r\n })\r\n defineDecisionState(atn, start)\r\n const alts = map(alternation.definition, (e) => atom(atn, rule, e))\r\n const handle = makeAlts(atn, rule, start, alternation, ...alts)\r\n return handle\r\n}\r\n\r\nfunction option(atn: ATN, rule: Rule, option: Option): ATNHandle {\r\n const start = newState(atn, rule, option, {\r\n type: ATN_BASIC\r\n })\r\n defineDecisionState(atn, start)\r\n const handle = makeAlts(atn, rule, start, option, block(atn, rule, option))\r\n return optional(atn, rule, option, handle)\r\n}\r\n\r\nfunction block(\r\n atn: ATN,\r\n rule: Rule,\r\n block: { definition: IProduction[] }\r\n): ATNHandle | undefined {\r\n const handles = filter(\r\n map(block.definition, (e) => atom(atn, rule, e)),\r\n (e) => e !== undefined\r\n ) as ATNHandle[]\r\n if (handles.length === 1) {\r\n return handles[0]\r\n } else if (handles.length === 0) {\r\n return undefined\r\n } else {\r\n return makeBlock(atn, handles)\r\n }\r\n}\r\n\r\nfunction plus(\r\n atn: ATN,\r\n rule: Rule,\r\n plus: IProductionWithOccurrence,\r\n handle: ATNHandle,\r\n sep?: ATNHandle\r\n): ATNHandle {\r\n const blkStart = handle.left as PlusBlockStartState\r\n const blkEnd = handle.right\r\n\r\n const loop = newState(atn, rule, plus, {\r\n type: ATN_PLUS_LOOP_BACK\r\n })\r\n defineDecisionState(atn, loop)\r\n const end = newState(atn, rule, plus, {\r\n type: ATN_LOOP_END\r\n })\r\n blkStart.loopback = loop\r\n end.loopback = loop\r\n atn.decisionMap[buildATNKey(rule, sep ? 'RepetitionMandatoryWithSeparator' : 'RepetitionMandatory', plus.idx)] = loop;\r\n epsilon(blkEnd, loop) // block can see loop back\r\n\r\n // Depending on whether we have a separator we put the exit transition at index 1 or 0\r\n // This influences the chosen option in the lookahead DFA\r\n if (sep === undefined) {\r\n epsilon(loop, blkStart) // loop back to start\r\n epsilon(loop, end) // exit\r\n } else {\r\n epsilon(loop, end) // exit\r\n // loop back to start with separator\r\n epsilon(loop, sep.left)\r\n epsilon(sep.right, blkStart)\r\n }\r\n\r\n return {\r\n left: blkStart,\r\n right: end\r\n }\r\n}\r\n\r\nfunction star(\r\n atn: ATN,\r\n rule: Rule,\r\n star: IProductionWithOccurrence,\r\n handle: ATNHandle,\r\n sep?: ATNHandle\r\n): ATNHandle {\r\n const start = handle.left\r\n const end = handle.right\r\n\r\n const entry = newState(atn, rule, star, {\r\n type: ATN_STAR_LOOP_ENTRY\r\n })\r\n defineDecisionState(atn, entry)\r\n const loopEnd = newState(atn, rule, star, {\r\n type: ATN_LOOP_END\r\n })\r\n const loop = newState(atn, rule, star, {\r\n type: ATN_STAR_LOOP_BACK\r\n })\r\n entry.loopback = loop\r\n loopEnd.loopback = loop\r\n\r\n epsilon(entry, start) // loop enter edge (alt 2)\r\n epsilon(entry, loopEnd) // bypass loop edge (alt 1)\r\n epsilon(end, loop) // block end hits loop back\r\n\r\n if (sep !== undefined) {\r\n epsilon(loop, loopEnd) // end loop\r\n // loop back to start of handle using separator\r\n epsilon(loop, sep.left)\r\n epsilon(sep.right, start)\r\n } else {\r\n epsilon(loop, entry) // loop back to entry/exit decision\r\n }\r\n\r\n atn.decisionMap[buildATNKey(rule, sep ? 'RepetitionWithSeparator' : 'Repetition', star.idx)] = entry;\r\n return {\r\n left: entry,\r\n right: loopEnd\r\n }\r\n}\r\n\r\nfunction optional(atn: ATN, rule: Rule, optional: Option, handle: ATNHandle): ATNHandle {\r\n const start = handle.left as DecisionState\r\n const end = handle.right\r\n\r\n epsilon(start, end)\r\n\r\n atn.decisionMap[buildATNKey(rule, 'Option', optional.idx)] = start;\r\n return handle\r\n}\r\n\r\nfunction defineDecisionState(atn: ATN, state: DecisionState): number {\r\n atn.decisionStates.push(state)\r\n state.decision = atn.decisionStates.length - 1\r\n return state.decision\r\n}\r\n\r\nfunction makeAlts(\r\n atn: ATN,\r\n rule: Rule,\r\n start: BlockStartState,\r\n production: IProductionWithOccurrence,\r\n ...alts: (ATNHandle | undefined)[]\r\n): ATNHandle {\r\n const end = newState(atn, rule, production, {\r\n type: ATN_BLOCK_END,\r\n start\r\n })\r\n start.end = end\r\n for (const alt of alts) {\r\n if (alt !== undefined) {\r\n // hook alts up to decision block\r\n epsilon(start, alt.left)\r\n epsilon(alt.right, end)\r\n } else {\r\n epsilon(start, end)\r\n }\r\n }\r\n\r\n const handle: ATNHandle = {\r\n left: start as ATNState,\r\n right: end\r\n }\r\n atn.decisionMap[buildATNKey(rule, getProdType(production), production.idx)] = start\r\n return handle\r\n}\r\n\r\nfunction getProdType(production: IProduction): LookaheadProductionType {\r\n if (production instanceof Alternation) {\r\n return 'Alternation';\r\n } else if (production instanceof Option) {\r\n return 'Option';\r\n } else if (production instanceof Repetition) {\r\n return 'Repetition';\r\n } else if (production instanceof RepetitionWithSeparator) {\r\n return 'RepetitionWithSeparator';\r\n } else if (production instanceof RepetitionMandatory) {\r\n return 'RepetitionMandatory';\r\n } else if (production instanceof RepetitionMandatoryWithSeparator) {\r\n return 'RepetitionMandatoryWithSeparator';\r\n } else {\r\n throw new Error('Invalid production type encountered');\r\n }\r\n}\r\n\r\nfunction makeBlock(atn: ATN, alts: ATNHandle[]): ATNHandle {\r\n const altsLength = alts.length\r\n for (let i = 0; i < altsLength - 1; i++) {\r\n const handle = alts[i]\r\n let transition: Transition | undefined\r\n if (handle.left.transitions.length === 1) {\r\n transition = handle.left.transitions[0]\r\n }\r\n const isRuleTransition = transition instanceof RuleTransition\r\n const ruleTransition = transition as RuleTransition\r\n const next = alts[i + 1].left\r\n if (\r\n handle.left.type === ATN_BASIC &&\r\n handle.right.type === ATN_BASIC &&\r\n transition !== undefined &&\r\n ((isRuleTransition && ruleTransition.followState === handle.right) ||\r\n transition.target === handle.right)\r\n ) {\r\n // we can avoid epsilon edge to next element\r\n if (isRuleTransition) {\r\n ruleTransition.followState = next\r\n } else {\r\n transition.target = next\r\n }\r\n removeState(atn, handle.right) // we skipped over this state\r\n } else {\r\n // need epsilon if previous block's right end node is complex\r\n epsilon(handle.right, next)\r\n }\r\n }\r\n\r\n const first = alts[0]\r\n const last = alts[altsLength - 1]\r\n return {\r\n left: first.left,\r\n right: last.right\r\n }\r\n}\r\n\r\nfunction tokenRef(\r\n atn: ATN,\r\n rule: Rule,\r\n tokenType: TokenType,\r\n production: IProductionWithOccurrence\r\n): ATNHandle {\r\n const left = newState(atn, rule, production, {\r\n type: ATN_BASIC\r\n })\r\n const right = newState(atn, rule, production, {\r\n type: ATN_BASIC\r\n })\r\n addTransition(left, new AtomTransition(right, tokenType))\r\n return {\r\n left,\r\n right\r\n }\r\n}\r\n\r\nfunction ruleRef(\r\n atn: ATN,\r\n currentRule: Rule,\r\n nonTerminal: NonTerminal\r\n): ATNHandle {\r\n const rule = nonTerminal.referencedRule\r\n const start = atn.ruleToStartState.get(rule)!\r\n const left = newState(atn, currentRule, nonTerminal, {\r\n type: ATN_BASIC\r\n })\r\n const right = newState(atn, currentRule, nonTerminal, {\r\n type: ATN_BASIC\r\n })\r\n\r\n const call = new RuleTransition(start, rule, right)\r\n addTransition(left, call)\r\n\r\n return {\r\n left,\r\n right\r\n }\r\n}\r\n\r\nfunction buildRuleHandle(atn: ATN, rule: Rule, block: ATNHandle): ATNHandle {\r\n const start = atn.ruleToStartState.get(rule)!\r\n epsilon(start, block.left)\r\n const stop = atn.ruleToStopState.get(rule)!\r\n epsilon(block.right, stop)\r\n const handle: ATNHandle = {\r\n left: start,\r\n right: stop\r\n }\r\n return handle\r\n}\r\n\r\nfunction epsilon(a: ATNBaseState, b: ATNBaseState): void {\r\n const transition = new EpsilonTransition(b as ATNState)\r\n addTransition(a, transition)\r\n}\r\n\r\nfunction newState(\r\n atn: ATN,\r\n rule: Rule,\r\n production: IProductionWithOccurrence | undefined,\r\n partial: Partial\r\n): T {\r\n const t: T = {\r\n atn,\r\n production,\r\n epsilonOnlyTransitions: false,\r\n rule,\r\n transitions: [],\r\n nextTokenWithinRule: [],\r\n stateNumber: atn.states.length,\r\n ...partial\r\n } as unknown as T\r\n atn.states.push(t)\r\n return t\r\n}\r\n\r\nfunction addTransition(state: ATNBaseState, transition: Transition) {\r\n // A single ATN state can only contain epsilon transitions or non-epsilon transitions\r\n // Because they are never mixed, only setting the property for the first transition is fine\r\n if (state.transitions.length === 0) {\r\n state.epsilonOnlyTransitions = transition.isEpsilon()\r\n }\r\n state.transitions.push(transition)\r\n}\r\n\r\nfunction removeState(atn: ATN, state: ATNState): void {\r\n atn.states.splice(atn.states.indexOf(state), 1)\r\n}\r\n", "/******************************************************************************\r\n * Copyright 2022 TypeFox GmbH\r\n * This program and the accompanying materials are made available under the\r\n * terms of the MIT License, which is available in the project root.\r\n ******************************************************************************/\r\n\r\nimport map from \"lodash-es/map.js\"\r\nimport { ATNState, DecisionState } from \"./atn.js\"\r\n\r\nexport interface DFA {\r\n start?: DFAState\r\n states: Record\r\n decision: number\r\n atnStartState: DecisionState\r\n}\r\n\r\nexport interface DFAState {\r\n configs: ATNConfigSet\r\n edges: Record\r\n isAcceptState: boolean\r\n prediction: number\r\n}\r\n\r\nexport const DFA_ERROR = {} as DFAState\r\n\r\nexport interface ATNConfig {\r\n state: ATNState\r\n alt: number\r\n stack: ATNState[]\r\n}\r\n\r\nexport class ATNConfigSet {\r\n private map: Record = {}\r\n private configs: ATNConfig[] = []\r\n\r\n uniqueAlt: number | undefined\r\n\r\n get size(): number {\r\n return this.configs.length\r\n }\r\n\r\n finalize(): void {\r\n // Empties the map to free up memory\r\n this.map = {}\r\n }\r\n\r\n add(config: ATNConfig): void {\r\n const key = getATNConfigKey(config)\r\n // Only add configs which don't exist in our map already\r\n // While this does not influence the actual algorithm, adding them anyway would massively increase memory consumption\r\n if (!(key in this.map)) {\r\n this.map[key] = this.configs.length\r\n this.configs.push(config)\r\n }\r\n }\r\n\r\n get elements(): readonly ATNConfig[] {\r\n return this.configs\r\n }\r\n\r\n get alts(): number[] {\r\n return map(this.configs, (e) => e.alt)\r\n }\r\n\r\n get key(): string {\r\n let value = \"\"\r\n for (const k in this.map) {\r\n value += k + \":\"\r\n }\r\n return value\r\n }\r\n}\r\n\r\nexport function getATNConfigKey(config: ATNConfig, alt = true) {\r\n return `${alt ? `a${config.alt}` : \"\"}s${\r\n config.state.stateNumber\r\n }:${config.stack.map((e) => e.stateNumber.toString()).join(\"_\")}`\r\n}\r\n", "/******************************************************************************\r\n * Copyright 2022 TypeFox GmbH\r\n * This program and the accompanying materials are made available under the\r\n * terms of the MIT License, which is available in the project root.\r\n ******************************************************************************/\r\n\r\nimport {\r\n IToken,\r\n TokenType,\r\n tokenMatcher,\r\n tokenLabel,\r\n Rule,\r\n IProductionWithOccurrence,\r\n NonTerminal,\r\n Alternation,\r\n Option,\r\n RepetitionMandatory,\r\n RepetitionMandatoryWithSeparator,\r\n RepetitionWithSeparator,\r\n Repetition,\r\n Terminal,\r\n BaseParser,\r\n LLkLookaheadStrategy,\r\n ILookaheadValidationError,\r\n IOrAlt,\r\n getLookaheadPaths,\r\n OptionalProductionType\r\n} from \"chevrotain\";\r\nimport {\r\n ATN,\r\n ATNState,\r\n ATN_RULE_STOP,\r\n AtomTransition,\r\n buildATNKey,\r\n createATN,\r\n DecisionState,\r\n EpsilonTransition,\r\n RuleTransition,\r\n Transition\r\n} from \"./atn.js\";\r\nimport {\r\n ATNConfig,\r\n ATNConfigSet,\r\n DFA,\r\n DFAState,\r\n DFA_ERROR,\r\n getATNConfigKey\r\n} from \"./dfa.js\";\r\nimport min from \"lodash-es/min.js\";\r\nimport flatMap from \"lodash-es/flatMap.js\";\r\nimport uniqBy from \"lodash-es/uniqBy.js\";\r\nimport map from \"lodash-es/map.js\";\r\nimport flatten from \"lodash-es/flatten.js\";\r\nimport forEach from \"lodash-es/forEach.js\";\r\nimport isEmpty from \"lodash-es/isEmpty.js\";\r\nimport reduce from \"lodash-es/reduce.js\";\r\n\r\ntype DFACache = (predicateSet: PredicateSet) => DFA\r\n\r\nexport type AmbiguityReport = (message: string) => void;\r\n\r\nfunction createDFACache(startState: DecisionState, decision: number): DFACache {\r\n const map: Record = {}\r\n return (predicateSet) => {\r\n const key = predicateSet.toString()\r\n let existing = map[key]\r\n if (existing !== undefined) {\r\n return existing\r\n } else {\r\n existing = {\r\n atnStartState: startState,\r\n decision,\r\n states: {}\r\n }\r\n map[key] = existing\r\n return existing\r\n }\r\n }\r\n}\r\n\r\nclass PredicateSet {\r\n private predicates: boolean[] = []\r\n\r\n is(index: number): boolean {\r\n return index >= this.predicates.length || this.predicates[index]\r\n }\r\n\r\n set(index: number, value: boolean) {\r\n this.predicates[index] = value\r\n }\r\n\r\n toString(): string {\r\n let value = \"\"\r\n const size = this.predicates.length\r\n for (let i = 0; i < size; i++) {\r\n value += this.predicates[i] === true ? \"1\" : \"0\"\r\n }\r\n return value\r\n }\r\n}\r\n\r\ninterface AdaptivePredictError {\r\n tokenPath: IToken[]\r\n possibleTokenTypes: TokenType[]\r\n actualToken: IToken\r\n}\r\n\r\nconst EMPTY_PREDICATES = new PredicateSet()\r\n\r\nexport interface LLStarLookaheadOptions {\r\n logging?: AmbiguityReport\r\n}\r\n\r\nexport class LLStarLookaheadStrategy extends LLkLookaheadStrategy {\r\n\r\n private atn: ATN;\r\n private dfas: DFACache[];\r\n private logging: AmbiguityReport;\r\n\r\n constructor(options?: LLStarLookaheadOptions) {\r\n super();\r\n this.logging = options?.logging ?? ((message) => console.log(message));\r\n }\r\n\r\n override initialize(options: { rules: Rule[] }): void {\r\n this.atn = createATN(options.rules);\r\n this.dfas = initATNSimulator(this.atn);\r\n }\r\n\r\n override validateAmbiguousAlternationAlternatives(): ILookaheadValidationError[] {\r\n return [];\r\n }\r\n\r\n override validateEmptyOrAlternatives(): ILookaheadValidationError[] {\r\n return [];\r\n }\r\n\r\n override buildLookaheadForAlternation(options: {\r\n prodOccurrence: number;\r\n rule: Rule;\r\n maxLookahead: number;\r\n hasPredicates: boolean;\r\n dynamicTokensEnabled: boolean\r\n }): (this: BaseParser, orAlts?: IOrAlt[] | undefined) => number | undefined {\r\n const { prodOccurrence, rule, hasPredicates, dynamicTokensEnabled } = options;\r\n const dfas = this.dfas;\r\n const logging = this.logging;\r\n const key = buildATNKey(rule, 'Alternation', prodOccurrence);\r\n const decisionState = this.atn.decisionMap[key];\r\n const decisionIndex = decisionState.decision;\r\n const partialAlts: (TokenType | undefined)[][] = map(\r\n getLookaheadPaths({\r\n maxLookahead: 1,\r\n occurrence: prodOccurrence,\r\n prodType: \"Alternation\",\r\n rule: rule\r\n }),\r\n (currAlt) => map(currAlt, (path) => path[0])\r\n )\r\n\r\n if (isLL1Sequence(partialAlts, false) && !dynamicTokensEnabled) {\r\n const choiceToAlt = reduce(\r\n partialAlts,\r\n (result, currAlt, idx) => {\r\n forEach(currAlt, (currTokType) => {\r\n if (currTokType) {\r\n result[currTokType.tokenTypeIdx!] = idx\r\n forEach(currTokType.categoryMatches!, (currExtendingType) => {\r\n result[currExtendingType] = idx\r\n })\r\n }\r\n })\r\n return result\r\n },\r\n {} as Record\r\n )\r\n\r\n if (hasPredicates) {\r\n return function (this: BaseParser, orAlts) {\r\n const nextToken = this.LA(1)\r\n const prediction: number | undefined = choiceToAlt[nextToken.tokenTypeIdx]\r\n if (orAlts !== undefined && prediction !== undefined) {\r\n const gate = orAlts[prediction]?.GATE\r\n if (gate !== undefined && gate.call(this) === false) {\r\n return undefined;\r\n }\r\n }\r\n return prediction\r\n }\r\n } else {\r\n return function (this: BaseParser): number | undefined {\r\n const nextToken = this.LA(1)\r\n return choiceToAlt[nextToken.tokenTypeIdx];\r\n }\r\n }\r\n } else if (hasPredicates) {\r\n return function (this: BaseParser, orAlts) {\r\n const predicates = new PredicateSet()\r\n const length = orAlts === undefined ? 0 : orAlts.length\r\n for (let i = 0; i < length; i++) {\r\n const gate = orAlts?.[i].GATE\r\n predicates.set(i, gate === undefined || gate.call(this))\r\n }\r\n const result = adaptivePredict.call(this, dfas, decisionIndex, predicates, logging);\r\n return typeof result === 'number' ? result : undefined;\r\n }\r\n } else {\r\n return function (this: BaseParser) {\r\n const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging);\r\n return typeof result === 'number' ? result : undefined;\r\n }\r\n }\r\n }\r\n\r\n override buildLookaheadForOptional(options: {\r\n prodOccurrence: number;\r\n prodType: OptionalProductionType;\r\n rule: Rule;\r\n maxLookahead: number;\r\n dynamicTokensEnabled: boolean\r\n }): (this: BaseParser) => boolean {\r\n const { prodOccurrence, rule, prodType, dynamicTokensEnabled } = options;\r\n const dfas = this.dfas;\r\n const logging = this.logging;\r\n const key = buildATNKey(rule, prodType, prodOccurrence);\r\n const decisionState = this.atn.decisionMap[key];\r\n const decisionIndex = decisionState.decision;\r\n const alts = map(\r\n getLookaheadPaths({\r\n maxLookahead: 1,\r\n occurrence: prodOccurrence,\r\n prodType,\r\n rule\r\n }),\r\n (e) => {\r\n return map(e, (g) => g[0])\r\n }\r\n )\r\n \r\n if (isLL1Sequence(alts) && alts[0][0] && !dynamicTokensEnabled) {\r\n const alt = alts[0]\r\n const singleTokensTypes = flatten(alt)\r\n \r\n if (\r\n singleTokensTypes.length === 1 &&\r\n isEmpty(singleTokensTypes[0].categoryMatches)\r\n ) {\r\n const expectedTokenType = singleTokensTypes[0]\r\n const expectedTokenUniqueKey = expectedTokenType.tokenTypeIdx\r\n \r\n return function (this: BaseParser): boolean {\r\n return this.LA(1).tokenTypeIdx === expectedTokenUniqueKey\r\n }\r\n } else {\r\n const choiceToAlt = reduce(\r\n singleTokensTypes,\r\n (result, currTokType) => {\r\n if (currTokType !== undefined) {\r\n result[currTokType.tokenTypeIdx!] = true\r\n forEach(currTokType.categoryMatches, (currExtendingType) => {\r\n result[currExtendingType] = true\r\n })\r\n }\r\n return result\r\n },\r\n {} as Record\r\n )\r\n \r\n return function (this: BaseParser): boolean {\r\n const nextToken = this.LA(1)\r\n return choiceToAlt[nextToken.tokenTypeIdx] === true\r\n }\r\n }\r\n }\r\n return function (this: BaseParser) {\r\n const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging)\r\n return typeof result === \"object\" ? false : result === 0;\r\n }\r\n }\r\n\r\n}\r\n\r\nfunction isLL1Sequence(sequences: (TokenType | undefined)[][], allowEmpty = true): boolean {\r\n const fullSet = new Set()\r\n\r\n for (const alt of sequences) {\r\n const altSet = new Set()\r\n for (const tokType of alt) {\r\n if (tokType === undefined) {\r\n if (allowEmpty) {\r\n // Epsilon production encountered\r\n break\r\n } else {\r\n return false;\r\n }\r\n }\r\n const indices = [tokType.tokenTypeIdx!].concat(tokType.categoryMatches!)\r\n for (const index of indices) {\r\n if (fullSet.has(index)) {\r\n if (!altSet.has(index)) {\r\n return false\r\n }\r\n } else {\r\n fullSet.add(index)\r\n altSet.add(index)\r\n }\r\n }\r\n }\r\n }\r\n return true\r\n}\r\n\r\nfunction initATNSimulator(atn: ATN): DFACache[] {\r\n const decisionLength = atn.decisionStates.length\r\n const decisionToDFA: DFACache[] = Array(decisionLength)\r\n for (let i = 0; i < decisionLength; i++) {\r\n decisionToDFA[i] = createDFACache(atn.decisionStates[i], i)\r\n }\r\n return decisionToDFA;\r\n}\r\n\r\nfunction adaptivePredict(\r\n this: BaseParser,\r\n dfaCaches: DFACache[],\r\n decision: number,\r\n predicateSet: PredicateSet,\r\n logging: AmbiguityReport\r\n): number | AdaptivePredictError {\r\n const dfa = dfaCaches[decision](predicateSet)\r\n let start = dfa.start\r\n if (start === undefined) {\r\n const closure = computeStartState(dfa.atnStartState as ATNState)\r\n start = addDFAState(dfa, newDFAState(closure))\r\n dfa.start = start\r\n }\r\n\r\n const alt = performLookahead.apply(this, [dfa, start, predicateSet, logging])\r\n return alt\r\n}\r\n\r\nfunction performLookahead(\r\n this: BaseParser,\r\n dfa: DFA,\r\n s0: DFAState,\r\n predicateSet: PredicateSet,\r\n logging: AmbiguityReport\r\n): number | AdaptivePredictError {\r\n let previousD = s0\r\n\r\n let i = 1\r\n const path: IToken[] = []\r\n let t = this.LA(i++)\r\n\r\n while (true) {\r\n let d = getExistingTargetState(previousD, t)\r\n if (d === undefined) {\r\n d = computeLookaheadTarget.apply(this, [dfa, previousD, t, i, predicateSet, logging])\r\n }\r\n\r\n if (d === DFA_ERROR) {\r\n return buildAdaptivePredictError(path, previousD, t)\r\n }\r\n\r\n if (d.isAcceptState === true) {\r\n return d.prediction\r\n }\r\n\r\n previousD = d\r\n path.push(t)\r\n t = this.LA(i++)\r\n }\r\n}\r\n\r\nfunction computeLookaheadTarget(\r\n this: BaseParser,\r\n dfa: DFA,\r\n previousD: DFAState,\r\n token: IToken,\r\n lookahead: number,\r\n predicateSet: PredicateSet,\r\n logging: AmbiguityReport\r\n): DFAState {\r\n const reach = computeReachSet(previousD.configs, token, predicateSet)\r\n if (reach.size === 0) {\r\n addDFAEdge(dfa, previousD, token, DFA_ERROR)\r\n return DFA_ERROR\r\n }\r\n\r\n let newState = newDFAState(reach)\r\n const predictedAlt = getUniqueAlt(reach, predicateSet)\r\n\r\n if (predictedAlt !== undefined) {\r\n newState.isAcceptState = true\r\n newState.prediction = predictedAlt\r\n newState.configs.uniqueAlt = predictedAlt\r\n } else if (hasConflictTerminatingPrediction(reach)) {\r\n const prediction = min(reach.alts)!\r\n newState.isAcceptState = true\r\n newState.prediction = prediction\r\n newState.configs.uniqueAlt = prediction\r\n reportLookaheadAmbiguity.apply(this, [dfa, lookahead, reach.alts, logging])\r\n }\r\n\r\n newState = addDFAEdge(dfa, previousD, token, newState)\r\n return newState\r\n}\r\n\r\nfunction reportLookaheadAmbiguity(\r\n this: BaseParser,\r\n dfa: DFA,\r\n lookahead: number,\r\n ambiguityIndices: number[],\r\n logging: AmbiguityReport\r\n) {\r\n const prefixPath: TokenType[] = []\r\n for (let i = 1; i <= lookahead; i++) {\r\n prefixPath.push(this.LA(i).tokenType)\r\n }\r\n const atnState = dfa.atnStartState\r\n const topLevelRule = atnState.rule\r\n const production = atnState.production\r\n const message = buildAmbiguityError({\r\n topLevelRule,\r\n ambiguityIndices,\r\n production,\r\n prefixPath\r\n })\r\n logging(message)\r\n}\r\n\r\nfunction buildAmbiguityError(options: {\r\n topLevelRule: Rule\r\n prefixPath: TokenType[]\r\n ambiguityIndices: number[]\r\n production: IProductionWithOccurrence\r\n}): string {\r\n const pathMsg = map(options.prefixPath, (currtok) =>\r\n tokenLabel(currtok)\r\n ).join(\", \")\r\n const occurrence =\r\n options.production.idx === 0 ? \"\" : options.production.idx\r\n let currMessage =\r\n `Ambiguous Alternatives Detected: <${options.ambiguityIndices.join(\r\n \", \"\r\n )}> in <${getProductionDslName(options.production)}${occurrence}>` +\r\n ` inside <${options.topLevelRule.name}> Rule,\\n` +\r\n `<${pathMsg}> may appears as a prefix path in all these alternatives.\\n`\r\n\r\n currMessage =\r\n currMessage +\r\n `See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\\n` +\r\n `For Further details.`\r\n return currMessage\r\n}\r\n\r\nfunction getProductionDslName(prod: IProductionWithOccurrence): string {\r\n if (prod instanceof NonTerminal) {\r\n return \"SUBRULE\"\r\n } else if (prod instanceof Option) {\r\n return \"OPTION\"\r\n } else if (prod instanceof Alternation) {\r\n return \"OR\"\r\n } else if (prod instanceof RepetitionMandatory) {\r\n return \"AT_LEAST_ONE\"\r\n } else if (prod instanceof RepetitionMandatoryWithSeparator) {\r\n return \"AT_LEAST_ONE_SEP\"\r\n } else if (prod instanceof RepetitionWithSeparator) {\r\n return \"MANY_SEP\"\r\n } else if (prod instanceof Repetition) {\r\n return \"MANY\"\r\n } else if (prod instanceof Terminal) {\r\n return \"CONSUME\"\r\n } else {\r\n throw Error(\"non exhaustive match\")\r\n }\r\n}\r\n\r\nfunction buildAdaptivePredictError(\r\n path: IToken[],\r\n previous: DFAState,\r\n current: IToken\r\n): AdaptivePredictError {\r\n const nextTransitions = flatMap(\r\n previous.configs.elements,\r\n (e) => e.state.transitions\r\n )\r\n const nextTokenTypes = uniqBy(\r\n nextTransitions\r\n .filter((e): e is AtomTransition => e instanceof AtomTransition)\r\n .map((e) => e.tokenType),\r\n (e) => e.tokenTypeIdx\r\n )\r\n return {\r\n actualToken: current,\r\n possibleTokenTypes: nextTokenTypes,\r\n tokenPath: path\r\n }\r\n}\r\n\r\nfunction getExistingTargetState(\r\n state: DFAState,\r\n token: IToken\r\n): DFAState | undefined {\r\n return state.edges[token.tokenTypeIdx]\r\n}\r\n\r\nfunction computeReachSet(\r\n configs: ATNConfigSet,\r\n token: IToken,\r\n predicateSet: PredicateSet\r\n): ATNConfigSet {\r\n const intermediate = new ATNConfigSet()\r\n const skippedStopStates: ATNConfig[] = []\r\n\r\n for (const c of configs.elements) {\r\n if (predicateSet.is(c.alt) === false) {\r\n continue\r\n }\r\n if (c.state.type === ATN_RULE_STOP) {\r\n skippedStopStates.push(c)\r\n continue\r\n }\r\n const transitionLength = c.state.transitions.length\r\n for (let i = 0; i < transitionLength; i++) {\r\n const transition = c.state.transitions[i]\r\n const target = getReachableTarget(transition, token)\r\n if (target !== undefined) {\r\n intermediate.add({\r\n state: target,\r\n alt: c.alt,\r\n stack: c.stack\r\n })\r\n }\r\n }\r\n }\r\n\r\n let reach: ATNConfigSet | undefined\r\n\r\n if (skippedStopStates.length === 0 && intermediate.size === 1) {\r\n reach = intermediate\r\n }\r\n\r\n if (reach === undefined) {\r\n reach = new ATNConfigSet()\r\n for (const c of intermediate.elements) {\r\n closure(c, reach)\r\n }\r\n }\r\n\r\n if (skippedStopStates.length > 0 && !hasConfigInRuleStopState(reach)) {\r\n for (const c of skippedStopStates) {\r\n reach.add(c)\r\n }\r\n }\r\n\r\n return reach\r\n}\r\n\r\nfunction getReachableTarget(\r\n transition: Transition,\r\n token: IToken\r\n): ATNState | undefined {\r\n if (\r\n transition instanceof AtomTransition &&\r\n tokenMatcher(token, transition.tokenType)\r\n ) {\r\n return transition.target\r\n }\r\n return undefined\r\n}\r\n\r\nfunction getUniqueAlt(\r\n configs: ATNConfigSet,\r\n predicateSet: PredicateSet\r\n): number | undefined {\r\n let alt: number | undefined\r\n for (const c of configs.elements) {\r\n if (predicateSet.is(c.alt) === true) {\r\n if (alt === undefined) {\r\n alt = c.alt\r\n } else if (alt !== c.alt) {\r\n return undefined\r\n }\r\n }\r\n }\r\n return alt\r\n}\r\n\r\nfunction newDFAState(closure: ATNConfigSet): DFAState {\r\n return {\r\n configs: closure,\r\n edges: {},\r\n isAcceptState: false,\r\n prediction: -1\r\n }\r\n}\r\n\r\nfunction addDFAEdge(\r\n dfa: DFA,\r\n from: DFAState,\r\n token: IToken,\r\n to: DFAState\r\n): DFAState {\r\n to = addDFAState(dfa, to)\r\n from.edges[token.tokenTypeIdx] = to\r\n return to\r\n}\r\n\r\nfunction addDFAState(dfa: DFA, state: DFAState): DFAState {\r\n if (state === DFA_ERROR) {\r\n return state\r\n }\r\n // Repetitions have the same config set\r\n // Therefore, storing the key of the config in a map allows us to create a loop in our DFA\r\n const mapKey = state.configs.key\r\n const existing = dfa.states[mapKey]\r\n if (existing !== undefined) {\r\n return existing\r\n }\r\n state.configs.finalize()\r\n dfa.states[mapKey] = state\r\n return state\r\n}\r\n\r\nfunction computeStartState(atnState: ATNState): ATNConfigSet {\r\n const configs = new ATNConfigSet()\r\n\r\n const numberOfTransitions = atnState.transitions.length\r\n for (let i = 0; i < numberOfTransitions; i++) {\r\n const target = atnState.transitions[i].target\r\n const config: ATNConfig = {\r\n state: target,\r\n alt: i,\r\n stack: []\r\n }\r\n closure(config, configs)\r\n }\r\n\r\n return configs\r\n}\r\n\r\nfunction closure(config: ATNConfig, configs: ATNConfigSet): void {\r\n const p = config.state\r\n\r\n if (p.type === ATN_RULE_STOP) {\r\n if (config.stack.length > 0) {\r\n const atnStack = [...config.stack]\r\n const followState = atnStack.pop()!\r\n const followConfig: ATNConfig = {\r\n state: followState,\r\n alt: config.alt,\r\n stack: atnStack\r\n }\r\n closure(followConfig, configs)\r\n } else {\r\n // Dipping into outer context, simply add the config\r\n // This will stop computation once every config is at the rule stop state\r\n configs.add(config)\r\n }\r\n return\r\n }\r\n\r\n if (!p.epsilonOnlyTransitions) {\r\n configs.add(config)\r\n }\r\n\r\n const transitionLength = p.transitions.length\r\n for (let i = 0; i < transitionLength; i++) {\r\n const transition = p.transitions[i]\r\n const c = getEpsilonTarget(config, transition)\r\n\r\n if (c !== undefined) {\r\n closure(c, configs)\r\n }\r\n }\r\n}\r\n\r\nfunction getEpsilonTarget(\r\n config: ATNConfig,\r\n transition: Transition\r\n): ATNConfig | undefined {\r\n if (transition instanceof EpsilonTransition) {\r\n return {\r\n state: transition.target,\r\n alt: config.alt,\r\n stack: config.stack\r\n }\r\n } else if (transition instanceof RuleTransition) {\r\n const stack = [...config.stack, transition.followState]\r\n return {\r\n state: transition.target,\r\n alt: config.alt,\r\n stack\r\n }\r\n }\r\n return undefined\r\n}\r\n\r\nfunction hasConfigInRuleStopState(configs: ATNConfigSet): boolean {\r\n for (const c of configs.elements) {\r\n if (c.state.type === ATN_RULE_STOP) {\r\n return true\r\n }\r\n }\r\n return false\r\n}\r\n\r\nfunction allConfigsInRuleStopStates(configs: ATNConfigSet): boolean {\r\n for (const c of configs.elements) {\r\n if (c.state.type !== ATN_RULE_STOP) {\r\n return false\r\n }\r\n }\r\n return true\r\n}\r\n\r\nfunction hasConflictTerminatingPrediction(configs: ATNConfigSet): boolean {\r\n if (allConfigsInRuleStopStates(configs)) {\r\n return true\r\n }\r\n const altSets = getConflictingAltSets(configs.elements)\r\n const heuristic =\r\n hasConflictingAltSet(altSets) && !hasStateAssociatedWithOneAlt(altSets)\r\n return heuristic\r\n}\r\n\r\nfunction getConflictingAltSets(\r\n configs: readonly ATNConfig[]\r\n): Map> {\r\n const configToAlts = new Map>()\r\n for (const c of configs) {\r\n const key = getATNConfigKey(c, false)\r\n let alts = configToAlts.get(key)\r\n if (alts === undefined) {\r\n alts = {}\r\n configToAlts.set(key, alts)\r\n }\r\n alts[c.alt] = true\r\n }\r\n return configToAlts\r\n}\r\n\r\nfunction hasConflictingAltSet(\r\n altSets: Map>\r\n): boolean {\r\n for (const value of Array.from(altSets.values())) {\r\n if (Object.keys(value).length > 1) {\r\n return true\r\n }\r\n }\r\n return false\r\n}\r\n\r\nfunction hasStateAssociatedWithOneAlt(\r\n altSets: Map>\r\n): boolean {\r\n for (const value of Array.from(altSets.values())) {\r\n if (Object.keys(value).length === 1) {\r\n return true\r\n }\r\n }\r\n return false\r\n}\r\n", "/******************************************************************************\r\n * Copyright 2022 TypeFox GmbH\r\n * This program and the accompanying materials are made available under the\r\n * terms of the MIT License, which is available in the project root.\r\n ******************************************************************************/\r\n\r\nexport {\r\n AmbiguityReport,\r\n LLStarLookaheadOptions,\r\n LLStarLookaheadStrategy\r\n} from './all-star-lookahead.js';\r\n", "/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\nexport var DocumentUri;\n(function (DocumentUri) {\n function is(value) {\n return typeof value === 'string';\n }\n DocumentUri.is = is;\n})(DocumentUri || (DocumentUri = {}));\nexport var URI;\n(function (URI) {\n function is(value) {\n return typeof value === 'string';\n }\n URI.is = is;\n})(URI || (URI = {}));\nexport var integer;\n(function (integer) {\n integer.MIN_VALUE = -2147483648;\n integer.MAX_VALUE = 2147483647;\n function is(value) {\n return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;\n }\n integer.is = is;\n})(integer || (integer = {}));\nexport var uinteger;\n(function (uinteger) {\n uinteger.MIN_VALUE = 0;\n uinteger.MAX_VALUE = 2147483647;\n function is(value) {\n return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;\n }\n uinteger.is = is;\n})(uinteger || (uinteger = {}));\n/**\n * The Position namespace provides helper functions to work with\n * {@link Position} literals.\n */\nexport var Position;\n(function (Position) {\n /**\n * Creates a new Position literal from the given line and character.\n * @param line The position's line.\n * @param character The position's character.\n */\n function create(line, character) {\n if (line === Number.MAX_VALUE) {\n line = uinteger.MAX_VALUE;\n }\n if (character === Number.MAX_VALUE) {\n character = uinteger.MAX_VALUE;\n }\n return { line, character };\n }\n Position.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Position} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);\n }\n Position.is = is;\n})(Position || (Position = {}));\n/**\n * The Range namespace provides helper functions to work with\n * {@link Range} literals.\n */\nexport var Range;\n(function (Range) {\n function create(one, two, three, four) {\n if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {\n return { start: Position.create(one, two), end: Position.create(three, four) };\n }\n else if (Position.is(one) && Position.is(two)) {\n return { start: one, end: two };\n }\n else {\n throw new Error(`Range#create called with invalid arguments[${one}, ${two}, ${three}, ${four}]`);\n }\n }\n Range.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Range} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\n }\n Range.is = is;\n})(Range || (Range = {}));\n/**\n * The Location namespace provides helper functions to work with\n * {@link Location} literals.\n */\nexport var Location;\n(function (Location) {\n /**\n * Creates a Location literal.\n * @param uri The location's uri.\n * @param range The location's range.\n */\n function create(uri, range) {\n return { uri, range };\n }\n Location.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Location} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\n }\n Location.is = is;\n})(Location || (Location = {}));\n/**\n * The LocationLink namespace provides helper functions to work with\n * {@link LocationLink} literals.\n */\nexport var LocationLink;\n(function (LocationLink) {\n /**\n * Creates a LocationLink literal.\n * @param targetUri The definition's uri.\n * @param targetRange The full range of the definition.\n * @param targetSelectionRange The span of the symbol definition at the target.\n * @param originSelectionRange The span of the symbol being defined in the originating source file.\n */\n function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\n return { targetUri, targetRange, targetSelectionRange, originSelectionRange };\n }\n LocationLink.create = create;\n /**\n * Checks whether the given literal conforms to the {@link LocationLink} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\n && Range.is(candidate.targetSelectionRange)\n && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\n }\n LocationLink.is = is;\n})(LocationLink || (LocationLink = {}));\n/**\n * The Color namespace provides helper functions to work with\n * {@link Color} literals.\n */\nexport var Color;\n(function (Color) {\n /**\n * Creates a new Color literal.\n */\n function create(red, green, blue, alpha) {\n return {\n red,\n green,\n blue,\n alpha,\n };\n }\n Color.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Color} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)\n && Is.numberRange(candidate.green, 0, 1)\n && Is.numberRange(candidate.blue, 0, 1)\n && Is.numberRange(candidate.alpha, 0, 1);\n }\n Color.is = is;\n})(Color || (Color = {}));\n/**\n * The ColorInformation namespace provides helper functions to work with\n * {@link ColorInformation} literals.\n */\nexport var ColorInformation;\n(function (ColorInformation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(range, color) {\n return {\n range,\n color,\n };\n }\n ColorInformation.create = create;\n /**\n * Checks whether the given literal conforms to the {@link ColorInformation} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);\n }\n ColorInformation.is = is;\n})(ColorInformation || (ColorInformation = {}));\n/**\n * The Color namespace provides helper functions to work with\n * {@link ColorPresentation} literals.\n */\nexport var ColorPresentation;\n(function (ColorPresentation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(label, textEdit, additionalTextEdits) {\n return {\n label,\n textEdit,\n additionalTextEdits,\n };\n }\n ColorPresentation.create = create;\n /**\n * Checks whether the given literal conforms to the {@link ColorInformation} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.label)\n && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\n && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\n }\n ColorPresentation.is = is;\n})(ColorPresentation || (ColorPresentation = {}));\n/**\n * A set of predefined range kinds.\n */\nexport var FoldingRangeKind;\n(function (FoldingRangeKind) {\n /**\n * Folding range for a comment\n */\n FoldingRangeKind.Comment = 'comment';\n /**\n * Folding range for an import or include\n */\n FoldingRangeKind.Imports = 'imports';\n /**\n * Folding range for a region (e.g. `#region`)\n */\n FoldingRangeKind.Region = 'region';\n})(FoldingRangeKind || (FoldingRangeKind = {}));\n/**\n * The folding range namespace provides helper functions to work with\n * {@link FoldingRange} literals.\n */\nexport var FoldingRange;\n(function (FoldingRange) {\n /**\n * Creates a new FoldingRange literal.\n */\n function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {\n const result = {\n startLine,\n endLine\n };\n if (Is.defined(startCharacter)) {\n result.startCharacter = startCharacter;\n }\n if (Is.defined(endCharacter)) {\n result.endCharacter = endCharacter;\n }\n if (Is.defined(kind)) {\n result.kind = kind;\n }\n if (Is.defined(collapsedText)) {\n result.collapsedText = collapsedText;\n }\n return result;\n }\n FoldingRange.create = create;\n /**\n * Checks whether the given literal conforms to the {@link FoldingRange} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)\n && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))\n && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))\n && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\n }\n FoldingRange.is = is;\n})(FoldingRange || (FoldingRange = {}));\n/**\n * The DiagnosticRelatedInformation namespace provides helper functions to work with\n * {@link DiagnosticRelatedInformation} literals.\n */\nexport var DiagnosticRelatedInformation;\n(function (DiagnosticRelatedInformation) {\n /**\n * Creates a new DiagnosticRelatedInformation literal.\n */\n function create(location, message) {\n return {\n location,\n message\n };\n }\n DiagnosticRelatedInformation.create = create;\n /**\n * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\n }\n DiagnosticRelatedInformation.is = is;\n})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));\n/**\n * The diagnostic's severity.\n */\nexport var DiagnosticSeverity;\n(function (DiagnosticSeverity) {\n /**\n * Reports an error.\n */\n DiagnosticSeverity.Error = 1;\n /**\n * Reports a warning.\n */\n DiagnosticSeverity.Warning = 2;\n /**\n * Reports an information.\n */\n DiagnosticSeverity.Information = 3;\n /**\n * Reports a hint.\n */\n DiagnosticSeverity.Hint = 4;\n})(DiagnosticSeverity || (DiagnosticSeverity = {}));\n/**\n * The diagnostic tags.\n *\n * @since 3.15.0\n */\nexport var DiagnosticTag;\n(function (DiagnosticTag) {\n /**\n * Unused or unnecessary code.\n *\n * Clients are allowed to render diagnostics with this tag faded out instead of having\n * an error squiggle.\n */\n DiagnosticTag.Unnecessary = 1;\n /**\n * Deprecated or obsolete code.\n *\n * Clients are allowed to rendered diagnostics with this tag strike through.\n */\n DiagnosticTag.Deprecated = 2;\n})(DiagnosticTag || (DiagnosticTag = {}));\n/**\n * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.\n *\n * @since 3.16.0\n */\nexport var CodeDescription;\n(function (CodeDescription) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.href);\n }\n CodeDescription.is = is;\n})(CodeDescription || (CodeDescription = {}));\n/**\n * The Diagnostic namespace provides helper functions to work with\n * {@link Diagnostic} literals.\n */\nexport var Diagnostic;\n(function (Diagnostic) {\n /**\n * Creates a new Diagnostic literal.\n */\n function create(range, message, severity, code, source, relatedInformation) {\n let result = { range, message };\n if (Is.defined(severity)) {\n result.severity = severity;\n }\n if (Is.defined(code)) {\n result.code = code;\n }\n if (Is.defined(source)) {\n result.source = source;\n }\n if (Is.defined(relatedInformation)) {\n result.relatedInformation = relatedInformation;\n }\n return result;\n }\n Diagnostic.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Diagnostic} interface.\n */\n function is(value) {\n var _a;\n let candidate = value;\n return Is.defined(candidate)\n && Range.is(candidate.range)\n && Is.string(candidate.message)\n && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\n && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\n && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))\n && (Is.string(candidate.source) || Is.undefined(candidate.source))\n && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\n }\n Diagnostic.is = is;\n})(Diagnostic || (Diagnostic = {}));\n/**\n * The Command namespace provides helper functions to work with\n * {@link Command} literals.\n */\nexport var Command;\n(function (Command) {\n /**\n * Creates a new Command literal.\n */\n function create(title, command, ...args) {\n let result = { title, command };\n if (Is.defined(args) && args.length > 0) {\n result.arguments = args;\n }\n return result;\n }\n Command.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Command} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\n }\n Command.is = is;\n})(Command || (Command = {}));\n/**\n * The TextEdit namespace provides helper function to create replace,\n * insert and delete edits more easily.\n */\nexport var TextEdit;\n(function (TextEdit) {\n /**\n * Creates a replace text edit.\n * @param range The range of text to be replaced.\n * @param newText The new text.\n */\n function replace(range, newText) {\n return { range, newText };\n }\n TextEdit.replace = replace;\n /**\n * Creates an insert text edit.\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n */\n function insert(position, newText) {\n return { range: { start: position, end: position }, newText };\n }\n TextEdit.insert = insert;\n /**\n * Creates a delete text edit.\n * @param range The range of text to be deleted.\n */\n function del(range) {\n return { range, newText: '' };\n }\n TextEdit.del = del;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate)\n && Is.string(candidate.newText)\n && Range.is(candidate.range);\n }\n TextEdit.is = is;\n})(TextEdit || (TextEdit = {}));\nexport var ChangeAnnotation;\n(function (ChangeAnnotation) {\n function create(label, needsConfirmation, description) {\n const result = { label };\n if (needsConfirmation !== undefined) {\n result.needsConfirmation = needsConfirmation;\n }\n if (description !== undefined) {\n result.description = description;\n }\n return result;\n }\n ChangeAnnotation.create = create;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.label) &&\n (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n ChangeAnnotation.is = is;\n})(ChangeAnnotation || (ChangeAnnotation = {}));\nexport var ChangeAnnotationIdentifier;\n(function (ChangeAnnotationIdentifier) {\n function is(value) {\n const candidate = value;\n return Is.string(candidate);\n }\n ChangeAnnotationIdentifier.is = is;\n})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));\nexport var AnnotatedTextEdit;\n(function (AnnotatedTextEdit) {\n /**\n * Creates an annotated replace text edit.\n *\n * @param range The range of text to be replaced.\n * @param newText The new text.\n * @param annotation The annotation.\n */\n function replace(range, newText, annotation) {\n return { range, newText, annotationId: annotation };\n }\n AnnotatedTextEdit.replace = replace;\n /**\n * Creates an annotated insert text edit.\n *\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n * @param annotation The annotation.\n */\n function insert(position, newText, annotation) {\n return { range: { start: position, end: position }, newText, annotationId: annotation };\n }\n AnnotatedTextEdit.insert = insert;\n /**\n * Creates an annotated delete text edit.\n *\n * @param range The range of text to be deleted.\n * @param annotation The annotation.\n */\n function del(range, annotation) {\n return { range, newText: '', annotationId: annotation };\n }\n AnnotatedTextEdit.del = del;\n function is(value) {\n const candidate = value;\n return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n AnnotatedTextEdit.is = is;\n})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));\n/**\n * The TextDocumentEdit namespace provides helper function to create\n * an edit that manipulates a text document.\n */\nexport var TextDocumentEdit;\n(function (TextDocumentEdit) {\n /**\n * Creates a new `TextDocumentEdit`\n */\n function create(textDocument, edits) {\n return { textDocument, edits };\n }\n TextDocumentEdit.create = create;\n function is(value) {\n let candidate = value;\n return Is.defined(candidate)\n && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)\n && Array.isArray(candidate.edits);\n }\n TextDocumentEdit.is = is;\n})(TextDocumentEdit || (TextDocumentEdit = {}));\nexport var CreateFile;\n(function (CreateFile) {\n function create(uri, options, annotation) {\n let result = {\n kind: 'create',\n uri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n CreateFile.create = create;\n function is(value) {\n let candidate = value;\n return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n CreateFile.is = is;\n})(CreateFile || (CreateFile = {}));\nexport var RenameFile;\n(function (RenameFile) {\n function create(oldUri, newUri, options, annotation) {\n let result = {\n kind: 'rename',\n oldUri,\n newUri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n RenameFile.create = create;\n function is(value) {\n let candidate = value;\n return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n RenameFile.is = is;\n})(RenameFile || (RenameFile = {}));\nexport var DeleteFile;\n(function (DeleteFile) {\n function create(uri, options, annotation) {\n let result = {\n kind: 'delete',\n uri\n };\n if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n DeleteFile.create = create;\n function is(value) {\n let candidate = value;\n return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n DeleteFile.is = is;\n})(DeleteFile || (DeleteFile = {}));\nexport var WorkspaceEdit;\n(function (WorkspaceEdit) {\n function is(value) {\n let candidate = value;\n return candidate &&\n (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&\n (candidate.documentChanges === undefined || candidate.documentChanges.every((change) => {\n if (Is.string(change.kind)) {\n return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\n }\n else {\n return TextDocumentEdit.is(change);\n }\n }));\n }\n WorkspaceEdit.is = is;\n})(WorkspaceEdit || (WorkspaceEdit = {}));\nclass TextEditChangeImpl {\n constructor(edits, changeAnnotations) {\n this.edits = edits;\n this.changeAnnotations = changeAnnotations;\n }\n insert(position, newText, annotation) {\n let edit;\n let id;\n if (annotation === undefined) {\n edit = TextEdit.insert(position, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.insert(position, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.insert(position, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n }\n replace(range, newText, annotation) {\n let edit;\n let id;\n if (annotation === undefined) {\n edit = TextEdit.replace(range, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.replace(range, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.replace(range, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n }\n delete(range, annotation) {\n let edit;\n let id;\n if (annotation === undefined) {\n edit = TextEdit.del(range);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.del(range, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.del(range, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n }\n add(edit) {\n this.edits.push(edit);\n }\n all() {\n return this.edits;\n }\n clear() {\n this.edits.splice(0, this.edits.length);\n }\n assertChangeAnnotations(value) {\n if (value === undefined) {\n throw new Error(`Text edit change is not configured to manage change annotations.`);\n }\n }\n}\n/**\n * A helper class\n */\nclass ChangeAnnotations {\n constructor(annotations) {\n this._annotations = annotations === undefined ? Object.create(null) : annotations;\n this._counter = 0;\n this._size = 0;\n }\n all() {\n return this._annotations;\n }\n get size() {\n return this._size;\n }\n manage(idOrAnnotation, annotation) {\n let id;\n if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {\n id = idOrAnnotation;\n }\n else {\n id = this.nextId();\n annotation = idOrAnnotation;\n }\n if (this._annotations[id] !== undefined) {\n throw new Error(`Id ${id} is already in use.`);\n }\n if (annotation === undefined) {\n throw new Error(`No annotation provided for id ${id}`);\n }\n this._annotations[id] = annotation;\n this._size++;\n return id;\n }\n nextId() {\n this._counter++;\n return this._counter.toString();\n }\n}\n/**\n * A workspace change helps constructing changes to a workspace.\n */\nexport class WorkspaceChange {\n constructor(workspaceEdit) {\n this._textEditChanges = Object.create(null);\n if (workspaceEdit !== undefined) {\n this._workspaceEdit = workspaceEdit;\n if (workspaceEdit.documentChanges) {\n this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);\n workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n workspaceEdit.documentChanges.forEach((change) => {\n if (TextDocumentEdit.is(change)) {\n const textEditChange = new TextEditChangeImpl(change.edits, this._changeAnnotations);\n this._textEditChanges[change.textDocument.uri] = textEditChange;\n }\n });\n }\n else if (workspaceEdit.changes) {\n Object.keys(workspaceEdit.changes).forEach((key) => {\n const textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\n this._textEditChanges[key] = textEditChange;\n });\n }\n }\n else {\n this._workspaceEdit = {};\n }\n }\n /**\n * Returns the underlying {@link WorkspaceEdit} literal\n * use to be returned from a workspace edit operation like rename.\n */\n get edit() {\n this.initDocumentChanges();\n if (this._changeAnnotations !== undefined) {\n if (this._changeAnnotations.size === 0) {\n this._workspaceEdit.changeAnnotations = undefined;\n }\n else {\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n }\n return this._workspaceEdit;\n }\n getTextEditChange(key) {\n if (OptionalVersionedTextDocumentIdentifier.is(key)) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n const textDocument = { uri: key.uri, version: key.version };\n let result = this._textEditChanges[textDocument.uri];\n if (!result) {\n const edits = [];\n const textDocumentEdit = {\n textDocument,\n edits\n };\n this._workspaceEdit.documentChanges.push(textDocumentEdit);\n result = new TextEditChangeImpl(edits, this._changeAnnotations);\n this._textEditChanges[textDocument.uri] = result;\n }\n return result;\n }\n else {\n this.initChanges();\n if (this._workspaceEdit.changes === undefined) {\n throw new Error('Workspace edit is not configured for normal text edit changes.');\n }\n let result = this._textEditChanges[key];\n if (!result) {\n let edits = [];\n this._workspaceEdit.changes[key] = edits;\n result = new TextEditChangeImpl(edits);\n this._textEditChanges[key] = result;\n }\n return result;\n }\n }\n initDocumentChanges() {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._changeAnnotations = new ChangeAnnotations();\n this._workspaceEdit.documentChanges = [];\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n }\n initChanges() {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._workspaceEdit.changes = Object.create(null);\n }\n }\n createFile(uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n let annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n let operation;\n let id;\n if (annotation === undefined) {\n operation = CreateFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = CreateFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n }\n renameFile(oldUri, newUri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n let annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n let operation;\n let id;\n if (annotation === undefined) {\n operation = RenameFile.create(oldUri, newUri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = RenameFile.create(oldUri, newUri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n }\n deleteFile(uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n let annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n let operation;\n let id;\n if (annotation === undefined) {\n operation = DeleteFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = DeleteFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n }\n}\n/**\n * The TextDocumentIdentifier namespace provides helper functions to work with\n * {@link TextDocumentIdentifier} literals.\n */\nexport var TextDocumentIdentifier;\n(function (TextDocumentIdentifier) {\n /**\n * Creates a new TextDocumentIdentifier literal.\n * @param uri The document's uri.\n */\n function create(uri) {\n return { uri };\n }\n TextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri);\n }\n TextDocumentIdentifier.is = is;\n})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));\n/**\n * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\n * {@link VersionedTextDocumentIdentifier} literals.\n */\nexport var VersionedTextDocumentIdentifier;\n(function (VersionedTextDocumentIdentifier) {\n /**\n * Creates a new VersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param version The document's version.\n */\n function create(uri, version) {\n return { uri, version };\n }\n VersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);\n }\n VersionedTextDocumentIdentifier.is = is;\n})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));\n/**\n * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with\n * {@link OptionalVersionedTextDocumentIdentifier} literals.\n */\nexport var OptionalVersionedTextDocumentIdentifier;\n(function (OptionalVersionedTextDocumentIdentifier) {\n /**\n * Creates a new OptionalVersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param version The document's version.\n */\n function create(uri, version) {\n return { uri, version };\n }\n OptionalVersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));\n }\n OptionalVersionedTextDocumentIdentifier.is = is;\n})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));\n/**\n * The TextDocumentItem namespace provides helper functions to work with\n * {@link TextDocumentItem} literals.\n */\nexport var TextDocumentItem;\n(function (TextDocumentItem) {\n /**\n * Creates a new TextDocumentItem literal.\n * @param uri The document's uri.\n * @param languageId The document's language identifier.\n * @param version The document's version number.\n * @param text The document's text.\n */\n function create(uri, languageId, version, text) {\n return { uri, languageId, version, text };\n }\n TextDocumentItem.create = create;\n /**\n * Checks whether the given literal conforms to the {@link TextDocumentItem} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);\n }\n TextDocumentItem.is = is;\n})(TextDocumentItem || (TextDocumentItem = {}));\n/**\n * Describes the content type that a client supports in various\n * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\n *\n * Please note that `MarkupKinds` must not start with a `$`. This kinds\n * are reserved for internal usage.\n */\nexport var MarkupKind;\n(function (MarkupKind) {\n /**\n * Plain text is supported as a content format\n */\n MarkupKind.PlainText = 'plaintext';\n /**\n * Markdown is supported as a content format\n */\n MarkupKind.Markdown = 'markdown';\n /**\n * Checks whether the given value is a value of the {@link MarkupKind} type.\n */\n function is(value) {\n const candidate = value;\n return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\n }\n MarkupKind.is = is;\n})(MarkupKind || (MarkupKind = {}));\nexport var MarkupContent;\n(function (MarkupContent) {\n /**\n * Checks whether the given value conforms to the {@link MarkupContent} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\n }\n MarkupContent.is = is;\n})(MarkupContent || (MarkupContent = {}));\n/**\n * The kind of a completion entry.\n */\nexport var CompletionItemKind;\n(function (CompletionItemKind) {\n CompletionItemKind.Text = 1;\n CompletionItemKind.Method = 2;\n CompletionItemKind.Function = 3;\n CompletionItemKind.Constructor = 4;\n CompletionItemKind.Field = 5;\n CompletionItemKind.Variable = 6;\n CompletionItemKind.Class = 7;\n CompletionItemKind.Interface = 8;\n CompletionItemKind.Module = 9;\n CompletionItemKind.Property = 10;\n CompletionItemKind.Unit = 11;\n CompletionItemKind.Value = 12;\n CompletionItemKind.Enum = 13;\n CompletionItemKind.Keyword = 14;\n CompletionItemKind.Snippet = 15;\n CompletionItemKind.Color = 16;\n CompletionItemKind.File = 17;\n CompletionItemKind.Reference = 18;\n CompletionItemKind.Folder = 19;\n CompletionItemKind.EnumMember = 20;\n CompletionItemKind.Constant = 21;\n CompletionItemKind.Struct = 22;\n CompletionItemKind.Event = 23;\n CompletionItemKind.Operator = 24;\n CompletionItemKind.TypeParameter = 25;\n})(CompletionItemKind || (CompletionItemKind = {}));\n/**\n * Defines whether the insert text in a completion item should be interpreted as\n * plain text or a snippet.\n */\nexport var InsertTextFormat;\n(function (InsertTextFormat) {\n /**\n * The primary text to be inserted is treated as a plain string.\n */\n InsertTextFormat.PlainText = 1;\n /**\n * The primary text to be inserted is treated as a snippet.\n *\n * A snippet can define tab stops and placeholders with `$1`, `$2`\n * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\n * the end of the snippet. Placeholders with equal identifiers are linked,\n * that is typing in one will update others too.\n *\n * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax\n */\n InsertTextFormat.Snippet = 2;\n})(InsertTextFormat || (InsertTextFormat = {}));\n/**\n * Completion item tags are extra annotations that tweak the rendering of a completion\n * item.\n *\n * @since 3.15.0\n */\nexport var CompletionItemTag;\n(function (CompletionItemTag) {\n /**\n * Render a completion as obsolete, usually using a strike-out.\n */\n CompletionItemTag.Deprecated = 1;\n})(CompletionItemTag || (CompletionItemTag = {}));\n/**\n * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.\n *\n * @since 3.16.0\n */\nexport var InsertReplaceEdit;\n(function (InsertReplaceEdit) {\n /**\n * Creates a new insert / replace edit\n */\n function create(newText, insert, replace) {\n return { newText, insert, replace };\n }\n InsertReplaceEdit.create = create;\n /**\n * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.\n */\n function is(value) {\n const candidate = value;\n return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);\n }\n InsertReplaceEdit.is = is;\n})(InsertReplaceEdit || (InsertReplaceEdit = {}));\n/**\n * How whitespace and indentation is handled during completion\n * item insertion.\n *\n * @since 3.16.0\n */\nexport var InsertTextMode;\n(function (InsertTextMode) {\n /**\n * The insertion or replace strings is taken as it is. If the\n * value is multi line the lines below the cursor will be\n * inserted using the indentation defined in the string value.\n * The client will not apply any kind of adjustments to the\n * string.\n */\n InsertTextMode.asIs = 1;\n /**\n * The editor adjusts leading whitespace of new lines so that\n * they match the indentation up to the cursor of the line for\n * which the item is accepted.\n *\n * Consider a line like this: <2tabs><3tabs>foo. Accepting a\n * multi line completion item is indented using 2 tabs and all\n * following lines inserted will be indented using 2 tabs as well.\n */\n InsertTextMode.adjustIndentation = 2;\n})(InsertTextMode || (InsertTextMode = {}));\nexport var CompletionItemLabelDetails;\n(function (CompletionItemLabelDetails) {\n function is(value) {\n const candidate = value;\n return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n CompletionItemLabelDetails.is = is;\n})(CompletionItemLabelDetails || (CompletionItemLabelDetails = {}));\n/**\n * The CompletionItem namespace provides functions to deal with\n * completion items.\n */\nexport var CompletionItem;\n(function (CompletionItem) {\n /**\n * Create a completion item and seed it with a label.\n * @param label The completion item's label\n */\n function create(label) {\n return { label };\n }\n CompletionItem.create = create;\n})(CompletionItem || (CompletionItem = {}));\n/**\n * The CompletionList namespace provides functions to deal with\n * completion lists.\n */\nexport var CompletionList;\n(function (CompletionList) {\n /**\n * Creates a new completion list.\n *\n * @param items The completion items.\n * @param isIncomplete The list is not complete.\n */\n function create(items, isIncomplete) {\n return { items: items ? items : [], isIncomplete: !!isIncomplete };\n }\n CompletionList.create = create;\n})(CompletionList || (CompletionList = {}));\nexport var MarkedString;\n(function (MarkedString) {\n /**\n * Creates a marked string from plain text.\n *\n * @param plainText The plain text.\n */\n function fromPlainText(plainText) {\n return plainText.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\n }\n MarkedString.fromPlainText = fromPlainText;\n /**\n * Checks whether the given value conforms to the {@link MarkedString} type.\n */\n function is(value) {\n const candidate = value;\n return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\n }\n MarkedString.is = is;\n})(MarkedString || (MarkedString = {}));\nexport var Hover;\n(function (Hover) {\n /**\n * Checks whether the given value conforms to the {@link Hover} interface.\n */\n function is(value) {\n let candidate = value;\n return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\n MarkedString.is(candidate.contents) ||\n Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));\n }\n Hover.is = is;\n})(Hover || (Hover = {}));\n/**\n * The ParameterInformation namespace provides helper functions to work with\n * {@link ParameterInformation} literals.\n */\nexport var ParameterInformation;\n(function (ParameterInformation) {\n /**\n * Creates a new parameter information literal.\n *\n * @param label A label string.\n * @param documentation A doc string.\n */\n function create(label, documentation) {\n return documentation ? { label, documentation } : { label };\n }\n ParameterInformation.create = create;\n})(ParameterInformation || (ParameterInformation = {}));\n/**\n * The SignatureInformation namespace provides helper functions to work with\n * {@link SignatureInformation} literals.\n */\nexport var SignatureInformation;\n(function (SignatureInformation) {\n function create(label, documentation, ...parameters) {\n let result = { label };\n if (Is.defined(documentation)) {\n result.documentation = documentation;\n }\n if (Is.defined(parameters)) {\n result.parameters = parameters;\n }\n else {\n result.parameters = [];\n }\n return result;\n }\n SignatureInformation.create = create;\n})(SignatureInformation || (SignatureInformation = {}));\n/**\n * A document highlight kind.\n */\nexport var DocumentHighlightKind;\n(function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind.Text = 1;\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind.Read = 2;\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind.Write = 3;\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\n/**\n * DocumentHighlight namespace to provide helper functions to work with\n * {@link DocumentHighlight} literals.\n */\nexport var DocumentHighlight;\n(function (DocumentHighlight) {\n /**\n * Create a DocumentHighlight object.\n * @param range The range the highlight applies to.\n * @param kind The highlight kind\n */\n function create(range, kind) {\n let result = { range };\n if (Is.number(kind)) {\n result.kind = kind;\n }\n return result;\n }\n DocumentHighlight.create = create;\n})(DocumentHighlight || (DocumentHighlight = {}));\n/**\n * A symbol kind.\n */\nexport var SymbolKind;\n(function (SymbolKind) {\n SymbolKind.File = 1;\n SymbolKind.Module = 2;\n SymbolKind.Namespace = 3;\n SymbolKind.Package = 4;\n SymbolKind.Class = 5;\n SymbolKind.Method = 6;\n SymbolKind.Property = 7;\n SymbolKind.Field = 8;\n SymbolKind.Constructor = 9;\n SymbolKind.Enum = 10;\n SymbolKind.Interface = 11;\n SymbolKind.Function = 12;\n SymbolKind.Variable = 13;\n SymbolKind.Constant = 14;\n SymbolKind.String = 15;\n SymbolKind.Number = 16;\n SymbolKind.Boolean = 17;\n SymbolKind.Array = 18;\n SymbolKind.Object = 19;\n SymbolKind.Key = 20;\n SymbolKind.Null = 21;\n SymbolKind.EnumMember = 22;\n SymbolKind.Struct = 23;\n SymbolKind.Event = 24;\n SymbolKind.Operator = 25;\n SymbolKind.TypeParameter = 26;\n})(SymbolKind || (SymbolKind = {}));\n/**\n * Symbol tags are extra annotations that tweak the rendering of a symbol.\n *\n * @since 3.16\n */\nexport var SymbolTag;\n(function (SymbolTag) {\n /**\n * Render a symbol as obsolete, usually using a strike-out.\n */\n SymbolTag.Deprecated = 1;\n})(SymbolTag || (SymbolTag = {}));\nexport var SymbolInformation;\n(function (SymbolInformation) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the location of the symbol.\n * @param uri The resource of the location of symbol.\n * @param containerName The name of the symbol containing the symbol.\n */\n function create(name, kind, range, uri, containerName) {\n let result = {\n name,\n kind,\n location: { uri, range }\n };\n if (containerName) {\n result.containerName = containerName;\n }\n return result;\n }\n SymbolInformation.create = create;\n})(SymbolInformation || (SymbolInformation = {}));\nexport var WorkspaceSymbol;\n(function (WorkspaceSymbol) {\n /**\n * Create a new workspace symbol.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param uri The resource of the location of the symbol.\n * @param range An options range of the location.\n * @returns A WorkspaceSymbol.\n */\n function create(name, kind, uri, range) {\n return range !== undefined\n ? { name, kind, location: { uri, range } }\n : { name, kind, location: { uri } };\n }\n WorkspaceSymbol.create = create;\n})(WorkspaceSymbol || (WorkspaceSymbol = {}));\nexport var DocumentSymbol;\n(function (DocumentSymbol) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param detail The detail of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the symbol.\n * @param selectionRange The selectionRange of the symbol.\n * @param children Children of the symbol.\n */\n function create(name, detail, kind, range, selectionRange, children) {\n let result = {\n name,\n detail,\n kind,\n range,\n selectionRange\n };\n if (children !== undefined) {\n result.children = children;\n }\n return result;\n }\n DocumentSymbol.create = create;\n /**\n * Checks whether the given literal conforms to the {@link DocumentSymbol} interface.\n */\n function is(value) {\n let candidate = value;\n return candidate &&\n Is.string(candidate.name) && Is.number(candidate.kind) &&\n Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\n (candidate.detail === undefined || Is.string(candidate.detail)) &&\n (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&\n (candidate.children === undefined || Array.isArray(candidate.children)) &&\n (candidate.tags === undefined || Array.isArray(candidate.tags));\n }\n DocumentSymbol.is = is;\n})(DocumentSymbol || (DocumentSymbol = {}));\n/**\n * A set of predefined code action kinds\n */\nexport var CodeActionKind;\n(function (CodeActionKind) {\n /**\n * Empty kind.\n */\n CodeActionKind.Empty = '';\n /**\n * Base kind for quickfix actions: 'quickfix'\n */\n CodeActionKind.QuickFix = 'quickfix';\n /**\n * Base kind for refactoring actions: 'refactor'\n */\n CodeActionKind.Refactor = 'refactor';\n /**\n * Base kind for refactoring extraction actions: 'refactor.extract'\n *\n * Example extract actions:\n *\n * - Extract method\n * - Extract function\n * - Extract variable\n * - Extract interface from class\n * - ...\n */\n CodeActionKind.RefactorExtract = 'refactor.extract';\n /**\n * Base kind for refactoring inline actions: 'refactor.inline'\n *\n * Example inline actions:\n *\n * - Inline function\n * - Inline variable\n * - Inline constant\n * - ...\n */\n CodeActionKind.RefactorInline = 'refactor.inline';\n /**\n * Base kind for refactoring rewrite actions: 'refactor.rewrite'\n *\n * Example rewrite actions:\n *\n * - Convert JavaScript function to class\n * - Add or remove parameter\n * - Encapsulate field\n * - Make method static\n * - Move method to base class\n * - ...\n */\n CodeActionKind.RefactorRewrite = 'refactor.rewrite';\n /**\n * Base kind for source actions: `source`\n *\n * Source code actions apply to the entire file.\n */\n CodeActionKind.Source = 'source';\n /**\n * Base kind for an organize imports source action: `source.organizeImports`\n */\n CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\n /**\n * Base kind for auto-fix source actions: `source.fixAll`.\n *\n * Fix all actions automatically fix errors that have a clear fix that do not require user input.\n * They should not suppress errors or perform unsafe fixes such as generating new types or classes.\n *\n * @since 3.15.0\n */\n CodeActionKind.SourceFixAll = 'source.fixAll';\n})(CodeActionKind || (CodeActionKind = {}));\n/**\n * The reason why code actions were requested.\n *\n * @since 3.17.0\n */\nexport var CodeActionTriggerKind;\n(function (CodeActionTriggerKind) {\n /**\n * Code actions were explicitly requested by the user or by an extension.\n */\n CodeActionTriggerKind.Invoked = 1;\n /**\n * Code actions were requested automatically.\n *\n * This typically happens when current selection in a file changes, but can\n * also be triggered when file content changes.\n */\n CodeActionTriggerKind.Automatic = 2;\n})(CodeActionTriggerKind || (CodeActionTriggerKind = {}));\n/**\n * The CodeActionContext namespace provides helper functions to work with\n * {@link CodeActionContext} literals.\n */\nexport var CodeActionContext;\n(function (CodeActionContext) {\n /**\n * Creates a new CodeActionContext literal.\n */\n function create(diagnostics, only, triggerKind) {\n let result = { diagnostics };\n if (only !== undefined && only !== null) {\n result.only = only;\n }\n if (triggerKind !== undefined && triggerKind !== null) {\n result.triggerKind = triggerKind;\n }\n return result;\n }\n CodeActionContext.create = create;\n /**\n * Checks whether the given literal conforms to the {@link CodeActionContext} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)\n && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))\n && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);\n }\n CodeActionContext.is = is;\n})(CodeActionContext || (CodeActionContext = {}));\nexport var CodeAction;\n(function (CodeAction) {\n function create(title, kindOrCommandOrEdit, kind) {\n let result = { title };\n let checkKind = true;\n if (typeof kindOrCommandOrEdit === 'string') {\n checkKind = false;\n result.kind = kindOrCommandOrEdit;\n }\n else if (Command.is(kindOrCommandOrEdit)) {\n result.command = kindOrCommandOrEdit;\n }\n else {\n result.edit = kindOrCommandOrEdit;\n }\n if (checkKind && kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n CodeAction.create = create;\n function is(value) {\n let candidate = value;\n return candidate && Is.string(candidate.title) &&\n (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\n (candidate.kind === undefined || Is.string(candidate.kind)) &&\n (candidate.edit !== undefined || candidate.command !== undefined) &&\n (candidate.command === undefined || Command.is(candidate.command)) &&\n (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&\n (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));\n }\n CodeAction.is = is;\n})(CodeAction || (CodeAction = {}));\n/**\n * The CodeLens namespace provides helper functions to work with\n * {@link CodeLens} literals.\n */\nexport var CodeLens;\n(function (CodeLens) {\n /**\n * Creates a new CodeLens literal.\n */\n function create(range, data) {\n let result = { range };\n if (Is.defined(data)) {\n result.data = data;\n }\n return result;\n }\n CodeLens.create = create;\n /**\n * Checks whether the given literal conforms to the {@link CodeLens} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\n }\n CodeLens.is = is;\n})(CodeLens || (CodeLens = {}));\n/**\n * The FormattingOptions namespace provides helper functions to work with\n * {@link FormattingOptions} literals.\n */\nexport var FormattingOptions;\n(function (FormattingOptions) {\n /**\n * Creates a new FormattingOptions literal.\n */\n function create(tabSize, insertSpaces) {\n return { tabSize, insertSpaces };\n }\n FormattingOptions.create = create;\n /**\n * Checks whether the given literal conforms to the {@link FormattingOptions} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\n }\n FormattingOptions.is = is;\n})(FormattingOptions || (FormattingOptions = {}));\n/**\n * The DocumentLink namespace provides helper functions to work with\n * {@link DocumentLink} literals.\n */\nexport var DocumentLink;\n(function (DocumentLink) {\n /**\n * Creates a new DocumentLink literal.\n */\n function create(range, target, data) {\n return { range, target, data };\n }\n DocumentLink.create = create;\n /**\n * Checks whether the given literal conforms to the {@link DocumentLink} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\n }\n DocumentLink.is = is;\n})(DocumentLink || (DocumentLink = {}));\n/**\n * The SelectionRange namespace provides helper function to work with\n * SelectionRange literals.\n */\nexport var SelectionRange;\n(function (SelectionRange) {\n /**\n * Creates a new SelectionRange\n * @param range the range.\n * @param parent an optional parent.\n */\n function create(range, parent) {\n return { range, parent };\n }\n SelectionRange.create = create;\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));\n }\n SelectionRange.is = is;\n})(SelectionRange || (SelectionRange = {}));\n/**\n * A set of predefined token types. This set is not fixed\n * an clients can specify additional token types via the\n * corresponding client capabilities.\n *\n * @since 3.16.0\n */\nexport var SemanticTokenTypes;\n(function (SemanticTokenTypes) {\n SemanticTokenTypes[\"namespace\"] = \"namespace\";\n /**\n * Represents a generic type. Acts as a fallback for types which can't be mapped to\n * a specific type like class or enum.\n */\n SemanticTokenTypes[\"type\"] = \"type\";\n SemanticTokenTypes[\"class\"] = \"class\";\n SemanticTokenTypes[\"enum\"] = \"enum\";\n SemanticTokenTypes[\"interface\"] = \"interface\";\n SemanticTokenTypes[\"struct\"] = \"struct\";\n SemanticTokenTypes[\"typeParameter\"] = \"typeParameter\";\n SemanticTokenTypes[\"parameter\"] = \"parameter\";\n SemanticTokenTypes[\"variable\"] = \"variable\";\n SemanticTokenTypes[\"property\"] = \"property\";\n SemanticTokenTypes[\"enumMember\"] = \"enumMember\";\n SemanticTokenTypes[\"event\"] = \"event\";\n SemanticTokenTypes[\"function\"] = \"function\";\n SemanticTokenTypes[\"method\"] = \"method\";\n SemanticTokenTypes[\"macro\"] = \"macro\";\n SemanticTokenTypes[\"keyword\"] = \"keyword\";\n SemanticTokenTypes[\"modifier\"] = \"modifier\";\n SemanticTokenTypes[\"comment\"] = \"comment\";\n SemanticTokenTypes[\"string\"] = \"string\";\n SemanticTokenTypes[\"number\"] = \"number\";\n SemanticTokenTypes[\"regexp\"] = \"regexp\";\n SemanticTokenTypes[\"operator\"] = \"operator\";\n /**\n * @since 3.17.0\n */\n SemanticTokenTypes[\"decorator\"] = \"decorator\";\n})(SemanticTokenTypes || (SemanticTokenTypes = {}));\n/**\n * A set of predefined token modifiers. This set is not fixed\n * an clients can specify additional token types via the\n * corresponding client capabilities.\n *\n * @since 3.16.0\n */\nexport var SemanticTokenModifiers;\n(function (SemanticTokenModifiers) {\n SemanticTokenModifiers[\"declaration\"] = \"declaration\";\n SemanticTokenModifiers[\"definition\"] = \"definition\";\n SemanticTokenModifiers[\"readonly\"] = \"readonly\";\n SemanticTokenModifiers[\"static\"] = \"static\";\n SemanticTokenModifiers[\"deprecated\"] = \"deprecated\";\n SemanticTokenModifiers[\"abstract\"] = \"abstract\";\n SemanticTokenModifiers[\"async\"] = \"async\";\n SemanticTokenModifiers[\"modification\"] = \"modification\";\n SemanticTokenModifiers[\"documentation\"] = \"documentation\";\n SemanticTokenModifiers[\"defaultLibrary\"] = \"defaultLibrary\";\n})(SemanticTokenModifiers || (SemanticTokenModifiers = {}));\n/**\n * @since 3.16.0\n */\nexport var SemanticTokens;\n(function (SemanticTokens) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&\n Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');\n }\n SemanticTokens.is = is;\n})(SemanticTokens || (SemanticTokens = {}));\n/**\n * The InlineValueText namespace provides functions to deal with InlineValueTexts.\n *\n * @since 3.17.0\n */\nexport var InlineValueText;\n(function (InlineValueText) {\n /**\n * Creates a new InlineValueText literal.\n */\n function create(range, text) {\n return { range, text };\n }\n InlineValueText.create = create;\n function is(value) {\n const candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);\n }\n InlineValueText.is = is;\n})(InlineValueText || (InlineValueText = {}));\n/**\n * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.\n *\n * @since 3.17.0\n */\nexport var InlineValueVariableLookup;\n(function (InlineValueVariableLookup) {\n /**\n * Creates a new InlineValueText literal.\n */\n function create(range, variableName, caseSensitiveLookup) {\n return { range, variableName, caseSensitiveLookup };\n }\n InlineValueVariableLookup.create = create;\n function is(value) {\n const candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)\n && (Is.string(candidate.variableName) || candidate.variableName === undefined);\n }\n InlineValueVariableLookup.is = is;\n})(InlineValueVariableLookup || (InlineValueVariableLookup = {}));\n/**\n * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.\n *\n * @since 3.17.0\n */\nexport var InlineValueEvaluatableExpression;\n(function (InlineValueEvaluatableExpression) {\n /**\n * Creates a new InlineValueEvaluatableExpression literal.\n */\n function create(range, expression) {\n return { range, expression };\n }\n InlineValueEvaluatableExpression.create = create;\n function is(value) {\n const candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range)\n && (Is.string(candidate.expression) || candidate.expression === undefined);\n }\n InlineValueEvaluatableExpression.is = is;\n})(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {}));\n/**\n * The InlineValueContext namespace provides helper functions to work with\n * {@link InlineValueContext} literals.\n *\n * @since 3.17.0\n */\nexport var InlineValueContext;\n(function (InlineValueContext) {\n /**\n * Creates a new InlineValueContext literal.\n */\n function create(frameId, stoppedLocation) {\n return { frameId, stoppedLocation };\n }\n InlineValueContext.create = create;\n /**\n * Checks whether the given literal conforms to the {@link InlineValueContext} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.defined(candidate) && Range.is(value.stoppedLocation);\n }\n InlineValueContext.is = is;\n})(InlineValueContext || (InlineValueContext = {}));\n/**\n * Inlay hint kinds.\n *\n * @since 3.17.0\n */\nexport var InlayHintKind;\n(function (InlayHintKind) {\n /**\n * An inlay hint that for a type annotation.\n */\n InlayHintKind.Type = 1;\n /**\n * An inlay hint that is for a parameter.\n */\n InlayHintKind.Parameter = 2;\n function is(value) {\n return value === 1 || value === 2;\n }\n InlayHintKind.is = is;\n})(InlayHintKind || (InlayHintKind = {}));\nexport var InlayHintLabelPart;\n(function (InlayHintLabelPart) {\n function create(value) {\n return { value };\n }\n InlayHintLabelPart.create = create;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate)\n && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))\n && (candidate.location === undefined || Location.is(candidate.location))\n && (candidate.command === undefined || Command.is(candidate.command));\n }\n InlayHintLabelPart.is = is;\n})(InlayHintLabelPart || (InlayHintLabelPart = {}));\nexport var InlayHint;\n(function (InlayHint) {\n function create(position, label, kind) {\n const result = { position, label };\n if (kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n InlayHint.create = create;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.position)\n && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))\n && (candidate.kind === undefined || InlayHintKind.is(candidate.kind))\n && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is)\n && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))\n && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft))\n && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));\n }\n InlayHint.is = is;\n})(InlayHint || (InlayHint = {}));\nexport var StringValue;\n(function (StringValue) {\n function createSnippet(value) {\n return { kind: 'snippet', value };\n }\n StringValue.createSnippet = createSnippet;\n})(StringValue || (StringValue = {}));\nexport var InlineCompletionItem;\n(function (InlineCompletionItem) {\n function create(insertText, filterText, range, command) {\n return { insertText, filterText, range, command };\n }\n InlineCompletionItem.create = create;\n})(InlineCompletionItem || (InlineCompletionItem = {}));\nexport var InlineCompletionList;\n(function (InlineCompletionList) {\n function create(items) {\n return { items };\n }\n InlineCompletionList.create = create;\n})(InlineCompletionList || (InlineCompletionList = {}));\n/**\n * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.\n *\n * @since 3.18.0\n * @proposed\n */\nexport var InlineCompletionTriggerKind;\n(function (InlineCompletionTriggerKind) {\n /**\n * Completion was triggered explicitly by a user gesture.\n */\n InlineCompletionTriggerKind.Invoked = 0;\n /**\n * Completion was triggered automatically while editing.\n */\n InlineCompletionTriggerKind.Automatic = 1;\n})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));\nexport var SelectedCompletionInfo;\n(function (SelectedCompletionInfo) {\n function create(range, text) {\n return { range, text };\n }\n SelectedCompletionInfo.create = create;\n})(SelectedCompletionInfo || (SelectedCompletionInfo = {}));\nexport var InlineCompletionContext;\n(function (InlineCompletionContext) {\n function create(triggerKind, selectedCompletionInfo) {\n return { triggerKind, selectedCompletionInfo };\n }\n InlineCompletionContext.create = create;\n})(InlineCompletionContext || (InlineCompletionContext = {}));\nexport var WorkspaceFolder;\n(function (WorkspaceFolder) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);\n }\n WorkspaceFolder.is = is;\n})(WorkspaceFolder || (WorkspaceFolder = {}));\nexport const EOL = ['\\n', '\\r\\n', '\\r'];\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nexport var TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new ITextDocument literal from the given uri and content.\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param version The document's version.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Checks whether the given literal conforms to the {@link ITextDocument} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)\n && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\n }\n TextDocument.is = is;\n function applyEdits(document, edits) {\n let text = document.getText();\n let sortedEdits = mergeSort(edits, (a, b) => {\n let diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n let lastModifiedOffset = text.length;\n for (let i = sortedEdits.length - 1; i >= 0; i--) {\n let e = sortedEdits[i];\n let startOffset = document.offsetAt(e.range.start);\n let endOffset = document.offsetAt(e.range.end);\n if (endOffset <= lastModifiedOffset) {\n text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\n }\n else {\n throw new Error('Overlapping edit');\n }\n lastModifiedOffset = startOffset;\n }\n return text;\n }\n TextDocument.applyEdits = applyEdits;\n function mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n const p = (data.length / 2) | 0;\n const left = data.slice(0, p);\n const right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n let leftIdx = 0;\n let rightIdx = 0;\n let i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n let ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n }\n})(TextDocument || (TextDocument = {}));\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nclass FullTextDocument {\n constructor(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n get uri() {\n return this._uri;\n }\n get languageId() {\n return this._languageId;\n }\n get version() {\n return this._version;\n }\n getText(range) {\n if (range) {\n let start = this.offsetAt(range.start);\n let end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n }\n update(event, version) {\n this._content = event.text;\n this._version = version;\n this._lineOffsets = undefined;\n }\n getLineOffsets() {\n if (this._lineOffsets === undefined) {\n let lineOffsets = [];\n let text = this._content;\n let isLineStart = true;\n for (let i = 0; i < text.length; i++) {\n if (isLineStart) {\n lineOffsets.push(i);\n isLineStart = false;\n }\n let ch = text.charAt(i);\n isLineStart = (ch === '\\r' || ch === '\\n');\n if (ch === '\\r' && i + 1 < text.length && text.charAt(i + 1) === '\\n') {\n i++;\n }\n }\n if (isLineStart && text.length > 0) {\n lineOffsets.push(text.length);\n }\n this._lineOffsets = lineOffsets;\n }\n return this._lineOffsets;\n }\n positionAt(offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n let lineOffsets = this.getLineOffsets();\n let low = 0, high = lineOffsets.length;\n if (high === 0) {\n return Position.create(0, offset);\n }\n while (low < high) {\n let mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n let line = low - 1;\n return Position.create(line, offset - lineOffsets[line]);\n }\n offsetAt(position) {\n let lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n let lineOffset = lineOffsets[position.line];\n let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\n }\n get lineCount() {\n return this.getLineOffsets().length;\n }\n}\nvar Is;\n(function (Is) {\n const toString = Object.prototype.toString;\n function defined(value) {\n return typeof value !== 'undefined';\n }\n Is.defined = defined;\n function undefined(value) {\n return typeof value === 'undefined';\n }\n Is.undefined = undefined;\n function boolean(value) {\n return value === true || value === false;\n }\n Is.boolean = boolean;\n function string(value) {\n return toString.call(value) === '[object String]';\n }\n Is.string = string;\n function number(value) {\n return toString.call(value) === '[object Number]';\n }\n Is.number = number;\n function numberRange(value, min, max) {\n return toString.call(value) === '[object Number]' && min <= value && value <= max;\n }\n Is.numberRange = numberRange;\n function integer(value) {\n return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;\n }\n Is.integer = integer;\n function uinteger(value) {\n return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;\n }\n Is.uinteger = uinteger;\n function func(value) {\n return toString.call(value) === '[object Function]';\n }\n Is.func = func;\n function objectLiteral(value) {\n // Strictly speaking class instances pass this check as well. Since the LSP\n // doesn't use classes we ignore this for now. If we do we need to add something\n // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\n return value !== null && typeof value === 'object';\n }\n Is.objectLiteral = objectLiteral;\n function typedArray(value, check) {\n return Array.isArray(value) && value.every(check);\n }\n Is.typedArray = typedArray;\n})(Is || (Is = {}));\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { IToken, TokenType } from 'chevrotain';\nimport type { Range } from 'vscode-languageserver-types';\nimport type { AbstractElement } from '../languages/generated/ast.js';\nimport type { AstNode, CompositeCstNode, CstNode, LeafCstNode, RootCstNode } from '../syntax-tree.js';\nimport { Position } from 'vscode-languageserver-types';\nimport { isCompositeCstNode } from '../syntax-tree.js';\nimport { tokenToRange } from '../utils/cst-utils.js';\n\nexport class CstNodeBuilder {\n\n private rootNode!: RootCstNodeImpl;\n private nodeStack: CompositeCstNodeImpl[] = [];\n\n private get current(): CompositeCstNodeImpl {\n return this.nodeStack[this.nodeStack.length - 1];\n }\n\n buildRootNode(input: string): RootCstNode {\n this.rootNode = new RootCstNodeImpl(input);\n this.rootNode.root = this.rootNode;\n this.nodeStack = [this.rootNode];\n return this.rootNode;\n }\n\n buildCompositeNode(feature: AbstractElement): CompositeCstNode {\n const compositeNode = new CompositeCstNodeImpl();\n compositeNode.grammarSource = feature;\n compositeNode.root = this.rootNode;\n this.current.content.push(compositeNode);\n this.nodeStack.push(compositeNode);\n return compositeNode;\n }\n\n buildLeafNode(token: IToken, feature: AbstractElement): LeafCstNode {\n const leafNode = new LeafCstNodeImpl(token.startOffset, token.image.length, tokenToRange(token), token.tokenType, false);\n leafNode.grammarSource = feature;\n leafNode.root = this.rootNode;\n this.current.content.push(leafNode);\n return leafNode;\n }\n\n removeNode(node: CstNode): void {\n const parent = node.container;\n if (parent) {\n const index = parent.content.indexOf(node);\n if (index >= 0) {\n parent.content.splice(index, 1);\n }\n }\n }\n\n construct(item: { $type: string | symbol | undefined, $cstNode: CstNode }): void {\n const current: CstNode = this.current;\n // The specified item could be a datatype ($type is symbol) or a fragment ($type is undefined)\n // Only if the $type is a string, we actually assign the element\n if (typeof item.$type === 'string') {\n this.current.astNode = item;\n }\n item.$cstNode = current;\n const node = this.nodeStack.pop();\n // Empty composite nodes are not valid\n // Simply remove the node from the tree\n if (node?.content.length === 0) {\n this.removeNode(node);\n }\n }\n\n addHiddenTokens(hiddenTokens: IToken[]): void {\n for (const token of hiddenTokens) {\n const hiddenNode = new LeafCstNodeImpl(token.startOffset, token.image.length, tokenToRange(token), token.tokenType, true);\n hiddenNode.root = this.rootNode;\n this.addHiddenToken(this.rootNode, hiddenNode);\n }\n }\n\n private addHiddenToken(node: CompositeCstNode, token: LeafCstNode): void {\n const { offset: tokenStart, end: tokenEnd } = token;\n\n for (let i = 0; i < node.content.length; i++) {\n const child = node.content[i];\n const { offset: childStart, end: childEnd } = child;\n if (isCompositeCstNode(child) && tokenStart > childStart && tokenEnd < childEnd) {\n this.addHiddenToken(child, token);\n return;\n } else if (tokenEnd <= childStart) {\n node.content.splice(i, 0, token);\n return;\n }\n }\n\n // We know that we haven't found a suited position for the token\n // So we simply add it to the end of the current node\n node.content.push(token);\n }\n}\n\nexport abstract class AbstractCstNode implements CstNode {\n abstract get offset(): number;\n abstract get length(): number;\n abstract get end(): number;\n abstract get range(): Range;\n\n container?: CompositeCstNode;\n grammarSource: AbstractElement;\n root: RootCstNode;\n private _astNode?: AstNode;\n\n /** @deprecated use `container` instead. */\n get parent(): CompositeCstNode | undefined {\n return this.container;\n }\n\n /** @deprecated use `grammarSource` instead. */\n get feature(): AbstractElement {\n return this.grammarSource;\n }\n\n get hidden(): boolean {\n return false;\n }\n\n get astNode(): AstNode {\n const node = typeof this._astNode?.$type === 'string' ? this._astNode : this.container?.astNode;\n if (!node) {\n throw new Error('This node has no associated AST element');\n }\n return node;\n }\n\n set astNode(value: AstNode) {\n this._astNode = value;\n }\n\n /** @deprecated use `astNode` instead. */\n get element(): AstNode {\n return this.astNode;\n }\n\n get text(): string {\n return this.root.fullText.substring(this.offset, this.end);\n }\n}\n\nexport class LeafCstNodeImpl extends AbstractCstNode implements LeafCstNode {\n get offset(): number {\n return this._offset;\n }\n\n get length(): number {\n return this._length;\n }\n\n get end(): number {\n return this._offset + this._length;\n }\n\n override get hidden(): boolean {\n return this._hidden;\n }\n\n get tokenType(): TokenType {\n return this._tokenType;\n }\n\n get range(): Range {\n return this._range;\n }\n\n private _hidden: boolean;\n private _offset: number;\n private _length: number;\n private _range: Range;\n private _tokenType: TokenType;\n\n constructor(offset: number, length: number, range: Range, tokenType: TokenType, hidden = false) {\n super();\n this._hidden = hidden;\n this._offset = offset;\n this._tokenType = tokenType;\n this._length = length;\n this._range = range;\n }\n}\n\nexport class CompositeCstNodeImpl extends AbstractCstNode implements CompositeCstNode {\n readonly content: CstNode[] = new CstNodeContainer(this);\n private _rangeCache?: Range;\n\n /** @deprecated use `content` instead. */\n get children(): CstNode[] {\n return this.content;\n }\n\n get offset(): number {\n return this.firstNonHiddenNode?.offset ?? 0;\n }\n\n get length(): number {\n return this.end - this.offset;\n }\n\n get end(): number {\n return this.lastNonHiddenNode?.end ?? 0;\n }\n\n get range(): Range {\n const firstNode = this.firstNonHiddenNode;\n const lastNode = this.lastNonHiddenNode;\n if (firstNode && lastNode) {\n if (this._rangeCache === undefined) {\n const { range: firstRange } = firstNode;\n const { range: lastRange } = lastNode;\n this._rangeCache = { start: firstRange.start, end: lastRange.end.line < firstRange.start.line ? firstRange.start : lastRange.end };\n }\n return this._rangeCache;\n } else {\n return { start: Position.create(0, 0), end: Position.create(0, 0) };\n }\n }\n\n private get firstNonHiddenNode(): CstNode | undefined {\n for (const child of this.content) {\n if (!child.hidden) {\n return child;\n }\n }\n return this.content[0];\n }\n\n private get lastNonHiddenNode(): CstNode | undefined {\n for (let i = this.content.length - 1; i >= 0; i--) {\n const child = this.content[i];\n if (!child.hidden) {\n return child;\n }\n }\n return this.content[this.content.length - 1];\n }\n}\n\nclass CstNodeContainer extends Array {\n readonly parent: CompositeCstNode;\n\n constructor(parent: CompositeCstNode) {\n super();\n this.parent = parent;\n Object.setPrototypeOf(this, CstNodeContainer.prototype);\n }\n\n override push(...items: CstNode[]): number {\n this.addParents(items);\n return super.push(...items);\n }\n\n override unshift(...items: CstNode[]): number {\n this.addParents(items);\n return super.unshift(...items);\n }\n\n override splice(start: number, count: number, ...items: CstNode[]): CstNode[] {\n this.addParents(items);\n return super.splice(start, count, ...items);\n }\n\n private addParents(items: CstNode[]): void {\n for (const item of items) {\n (item).container = this.parent;\n }\n }\n}\n\nexport class RootCstNodeImpl extends CompositeCstNodeImpl implements RootCstNode {\n private _text = '';\n\n override get text(): string {\n return this._text.substring(this.offset, this.end);\n }\n\n get fullText(): string {\n return this._text;\n }\n\n constructor(input?: string) {\n super();\n this._text = input ?? '';\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { DSLMethodOpts, ILexingError, IOrAlt, IParserErrorMessageProvider, IRecognitionException, IToken, TokenType, TokenVocabulary } from 'chevrotain';\nimport type { AbstractElement, Action, Assignment, ParserRule } from '../languages/generated/ast.js';\nimport type { Linker } from '../references/linker.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstReflection, CompositeCstNode, CstNode } from '../syntax-tree.js';\nimport type { Lexer } from './lexer.js';\nimport type { IParserConfig } from './parser-config.js';\nimport type { ValueConverter } from './value-converter.js';\nimport { defaultParserErrorProvider, EmbeddedActionsParser, LLkLookaheadStrategy } from 'chevrotain';\nimport { LLStarLookaheadStrategy } from 'chevrotain-allstar';\nimport { isAssignment, isCrossReference, isKeyword } from '../languages/generated/ast.js';\nimport { getTypeName, isDataTypeRule } from '../utils/grammar-utils.js';\nimport { assignMandatoryProperties, getContainerOfType, linkContentToContainer } from '../utils/ast-utils.js';\nimport { CstNodeBuilder } from './cst-node-builder.js';\n\nexport type ParseResult = {\n value: T,\n parserErrors: IRecognitionException[],\n lexerErrors: ILexingError[]\n}\n\nexport const DatatypeSymbol = Symbol('Datatype');\n\ninterface DataTypeNode {\n $cstNode: CompositeCstNode\n /** Instead of a string, this node is uniquely identified by the `Datatype` symbol */\n $type: symbol\n /** Used as a storage for all parsed terminals, keywords and sub-datatype rules */\n value: string\n}\n\nfunction isDataTypeNode(node: { $type: string | symbol | undefined }): node is DataTypeNode {\n return node.$type === DatatypeSymbol;\n}\n\ntype RuleResult = (args: Args) => any;\n\ntype Args = Record;\n\ntype RuleImpl = (args: Args) => any;\n\ninterface AssignmentElement {\n assignment?: Assignment\n isCrossRef: boolean\n}\n\nexport interface BaseParser {\n rule(rule: ParserRule, impl: RuleImpl): RuleResult;\n alternatives(idx: number, choices: Array>): void;\n optional(idx: number, callback: DSLMethodOpts): void;\n many(idx: number, callback: DSLMethodOpts): void;\n atLeastOne(idx: number, callback: DSLMethodOpts): void;\n consume(idx: number, tokenType: TokenType, feature: AbstractElement): void;\n subrule(idx: number, rule: RuleResult, feature: AbstractElement, args: Args): void;\n action($type: string, action: Action): void;\n construct(): unknown;\n isRecording(): boolean;\n get unorderedGroups(): Map;\n getRuleStack(): number[];\n}\n\nconst ruleSuffix = '\\u200B';\nconst withRuleSuffix = (name: string): string => name.endsWith(ruleSuffix) ? name : name + ruleSuffix;\n\nexport abstract class AbstractLangiumParser implements BaseParser {\n\n protected readonly lexer: Lexer;\n protected readonly wrapper: ChevrotainWrapper;\n protected _unorderedGroups: Map = new Map();\n\n constructor(services: LangiumCoreServices) {\n this.lexer = services.parser.Lexer;\n const tokens = this.lexer.definition;\n this.wrapper = new ChevrotainWrapper(tokens, {\n ...services.parser.ParserConfig,\n errorMessageProvider: services.parser.ParserErrorMessageProvider\n });\n }\n\n alternatives(idx: number, choices: Array>): void {\n this.wrapper.wrapOr(idx, choices);\n }\n\n optional(idx: number, callback: DSLMethodOpts): void {\n this.wrapper.wrapOption(idx, callback);\n }\n\n many(idx: number, callback: DSLMethodOpts): void {\n this.wrapper.wrapMany(idx, callback);\n }\n\n atLeastOne(idx: number, callback: DSLMethodOpts): void {\n this.wrapper.wrapAtLeastOne(idx, callback);\n }\n\n abstract rule(rule: ParserRule, impl: RuleImpl): RuleResult;\n abstract consume(idx: number, tokenType: TokenType, feature: AbstractElement): void;\n abstract subrule(idx: number, rule: RuleResult, feature: AbstractElement, args: Args): void;\n abstract action($type: string, action: Action): void;\n abstract construct(): unknown;\n\n isRecording(): boolean {\n return this.wrapper.IS_RECORDING;\n }\n\n get unorderedGroups(): Map {\n return this._unorderedGroups;\n }\n\n getRuleStack(): number[] {\n return (this.wrapper as any).RULE_STACK;\n }\n\n finalize(): void {\n this.wrapper.wrapSelfAnalysis();\n }\n}\n\nexport class LangiumParser extends AbstractLangiumParser {\n private readonly linker: Linker;\n private readonly converter: ValueConverter;\n private readonly astReflection: AstReflection;\n private readonly nodeBuilder = new CstNodeBuilder();\n private stack: any[] = [];\n private mainRule!: RuleResult;\n private assignmentMap = new Map();\n\n private get current(): any {\n return this.stack[this.stack.length - 1];\n }\n\n constructor(services: LangiumCoreServices) {\n super(services);\n this.linker = services.references.Linker;\n this.converter = services.parser.ValueConverter;\n this.astReflection = services.shared.AstReflection;\n }\n\n rule(rule: ParserRule, impl: RuleImpl): RuleResult {\n const type = rule.fragment ? undefined : isDataTypeRule(rule) ? DatatypeSymbol : getTypeName(rule);\n const ruleMethod = this.wrapper.DEFINE_RULE(withRuleSuffix(rule.name), this.startImplementation(type, impl).bind(this));\n if (rule.entry) {\n this.mainRule = ruleMethod;\n }\n return ruleMethod;\n }\n\n parse(input: string): ParseResult {\n this.nodeBuilder.buildRootNode(input);\n const lexerResult = this.lexer.tokenize(input);\n this.wrapper.input = lexerResult.tokens;\n const result = this.mainRule.call(this.wrapper, {});\n this.nodeBuilder.addHiddenTokens(lexerResult.hidden);\n this.unorderedGroups.clear();\n return {\n value: result,\n lexerErrors: lexerResult.errors,\n parserErrors: this.wrapper.errors\n };\n }\n\n private startImplementation($type: string | symbol | undefined, implementation: RuleImpl): RuleImpl {\n return (args) => {\n if (!this.isRecording()) {\n const node: any = { $type };\n this.stack.push(node);\n if ($type === DatatypeSymbol) {\n node.value = '';\n }\n }\n let result: unknown;\n try {\n result = implementation(args);\n } catch (err) {\n result = undefined;\n }\n if (!this.isRecording() && result === undefined) {\n result = this.construct();\n }\n return result;\n };\n }\n\n consume(idx: number, tokenType: TokenType, feature: AbstractElement): void {\n const token = this.wrapper.wrapConsume(idx, tokenType);\n if (!this.isRecording() && this.isValidToken(token)) {\n const leafNode = this.nodeBuilder.buildLeafNode(token, feature);\n const { assignment, isCrossRef } = this.getAssignment(feature);\n const current = this.current;\n if (assignment) {\n const convertedValue = isKeyword(feature) ? token.image : this.converter.convert(token.image, leafNode);\n this.assign(assignment.operator, assignment.feature, convertedValue, leafNode, isCrossRef);\n } else if (isDataTypeNode(current)) {\n let text = token.image;\n if (!isKeyword(feature)) {\n text = this.converter.convert(text, leafNode).toString();\n }\n current.value += text;\n }\n }\n }\n\n /**\n * Most consumed parser tokens are valid. However there are two cases in which they are not valid:\n *\n * 1. They were inserted during error recovery by the parser. These tokens don't really exist and should not be further processed\n * 2. They contain invalid token ranges. This might include the special EOF token, or other tokens produced by invalid token builders.\n */\n private isValidToken(token: IToken): boolean {\n return !token.isInsertedInRecovery && !isNaN(token.startOffset) && typeof token.endOffset === 'number' && !isNaN(token.endOffset);\n }\n\n subrule(idx: number, rule: RuleResult, feature: AbstractElement, args: Args): void {\n let cstNode: CompositeCstNode | undefined;\n if (!this.isRecording()) {\n cstNode = this.nodeBuilder.buildCompositeNode(feature);\n }\n const subruleResult = this.wrapper.wrapSubrule(idx, rule, args) as any;\n if (!this.isRecording() && cstNode && cstNode.length > 0) {\n this.performSubruleAssignment(subruleResult, feature, cstNode);\n }\n }\n\n private performSubruleAssignment(result: any, feature: AbstractElement, cstNode: CompositeCstNode): void {\n const { assignment, isCrossRef } = this.getAssignment(feature);\n if (assignment) {\n this.assign(assignment.operator, assignment.feature, result, cstNode, isCrossRef);\n } else if (!assignment) {\n // If we call a subrule without an assignment we either:\n // 1. append the result of the subrule (data type rule)\n // 2. override the current object with the newly parsed object\n // If the current element is an AST node and the result of the subrule\n // is a data type rule, we can safely discard the results.\n const current = this.current;\n if (isDataTypeNode(current)) {\n current.value += result.toString();\n } else if (typeof result === 'object' && result) {\n const resultKind = result.$type;\n const object = this.assignWithoutOverride(result, current);\n if (resultKind) {\n object.$type = resultKind;\n }\n const newItem = object;\n this.stack.pop();\n this.stack.push(newItem);\n }\n }\n }\n\n action($type: string, action: Action): void {\n if (!this.isRecording()) {\n let last = this.current;\n // This branch is used for left recursive grammar rules.\n // Those don't call `construct` before another action.\n // Therefore, we need to call it here.\n if (!last.$cstNode && action.feature && action.operator) {\n last = this.construct(false);\n const feature = last.$cstNode.feature;\n this.nodeBuilder.buildCompositeNode(feature);\n }\n const newItem = { $type };\n this.stack.pop();\n this.stack.push(newItem);\n if (action.feature && action.operator) {\n this.assign(action.operator, action.feature, last, last.$cstNode, false);\n }\n }\n }\n\n construct(pop = true): unknown {\n if (this.isRecording()) {\n return undefined;\n }\n const obj = this.current;\n linkContentToContainer(obj);\n this.nodeBuilder.construct(obj);\n if (pop) {\n this.stack.pop();\n }\n if (isDataTypeNode(obj)) {\n return this.converter.convert(obj.value, obj.$cstNode);\n } else {\n assignMandatoryProperties(this.astReflection, obj);\n }\n return obj;\n }\n\n private getAssignment(feature: AbstractElement): AssignmentElement {\n if (!this.assignmentMap.has(feature)) {\n const assignment = getContainerOfType(feature, isAssignment);\n this.assignmentMap.set(feature, {\n assignment: assignment,\n isCrossRef: assignment ? isCrossReference(assignment.terminal) : false\n });\n }\n return this.assignmentMap.get(feature)!;\n }\n\n private assign(operator: string, feature: string, value: unknown, cstNode: CstNode, isCrossRef: boolean): void {\n const obj = this.current;\n let item: unknown;\n if (isCrossRef && typeof value === 'string') {\n item = this.linker.buildReference(obj, feature, cstNode, value);\n } else {\n item = value;\n }\n switch (operator) {\n case '=': {\n obj[feature] = item;\n break;\n }\n case '?=': {\n obj[feature] = true;\n break;\n }\n case '+=': {\n if (!Array.isArray(obj[feature])) {\n obj[feature] = [];\n }\n obj[feature].push(item);\n }\n }\n }\n\n private assignWithoutOverride(target: any, source: any): any {\n for (const [name, existingValue] of Object.entries(source)) {\n const newValue = target[name];\n if (newValue === undefined) {\n target[name] = existingValue;\n } else if (Array.isArray(newValue) && Array.isArray(existingValue)) {\n existingValue.push(...newValue);\n target[name] = existingValue;\n }\n }\n return target;\n }\n\n get definitionErrors(): IParserDefinitionError[] {\n return this.wrapper.definitionErrors;\n }\n}\n\nexport interface IParserDefinitionError {\n message: string\n type: number\n ruleName?: string\n}\n\nexport abstract class AbstractParserErrorMessageProvider implements IParserErrorMessageProvider {\n\n buildMismatchTokenMessage(options: {\n expected: TokenType\n actual: IToken\n previous: IToken\n ruleName: string\n }): string {\n return defaultParserErrorProvider.buildMismatchTokenMessage(options);\n }\n\n buildNotAllInputParsedMessage(options: {\n firstRedundant: IToken\n ruleName: string\n }): string {\n return defaultParserErrorProvider.buildNotAllInputParsedMessage(options);\n }\n\n buildNoViableAltMessage(options: {\n expectedPathsPerAlt: TokenType[][][]\n actual: IToken[]\n previous: IToken\n customUserDescription: string\n ruleName: string\n }): string {\n return defaultParserErrorProvider.buildNoViableAltMessage(options);\n }\n\n buildEarlyExitMessage(options: {\n expectedIterationPaths: TokenType[][]\n actual: IToken[]\n previous: IToken\n customUserDescription: string\n ruleName: string\n }): string {\n return defaultParserErrorProvider.buildEarlyExitMessage(options);\n }\n\n}\n\nexport class LangiumParserErrorMessageProvider extends AbstractParserErrorMessageProvider {\n\n override buildMismatchTokenMessage({ expected, actual }: {\n expected: TokenType\n actual: IToken\n previous: IToken\n ruleName: string\n }): string {\n const expectedMsg = expected.LABEL\n ? '`' + expected.LABEL + '`'\n : expected.name.endsWith(':KW')\n ? `keyword '${expected.name.substring(0, expected.name.length - 3)}'`\n : `token of type '${expected.name}'`;\n return `Expecting ${expectedMsg} but found \\`${actual.image}\\`.`;\n }\n\n override buildNotAllInputParsedMessage({ firstRedundant }: {\n firstRedundant: IToken\n ruleName: string\n }): string {\n return `Expecting end of file but found \\`${firstRedundant.image}\\`.`;\n }\n}\n\nexport interface CompletionParserResult {\n tokens: IToken[]\n elementStack: AbstractElement[]\n tokenIndex: number\n}\n\nexport class LangiumCompletionParser extends AbstractLangiumParser {\n private mainRule!: RuleResult;\n private tokens: IToken[] = [];\n\n private elementStack: AbstractElement[] = [];\n private lastElementStack: AbstractElement[] = [];\n private nextTokenIndex = 0;\n private stackSize = 0;\n\n action(): void {\n // NOOP\n }\n\n construct(): unknown {\n // NOOP\n return undefined;\n }\n\n parse(input: string): CompletionParserResult {\n this.resetState();\n const tokens = this.lexer.tokenize(input);\n this.tokens = tokens.tokens;\n this.wrapper.input = [...this.tokens];\n this.mainRule.call(this.wrapper, {});\n this.unorderedGroups.clear();\n return {\n tokens: this.tokens,\n elementStack: [...this.lastElementStack],\n tokenIndex: this.nextTokenIndex\n };\n }\n\n rule(rule: ParserRule, impl: RuleImpl): RuleResult {\n const ruleMethod = this.wrapper.DEFINE_RULE(withRuleSuffix(rule.name), this.startImplementation(impl).bind(this));\n if (rule.entry) {\n this.mainRule = ruleMethod;\n }\n return ruleMethod;\n }\n\n private resetState(): void {\n this.elementStack = [];\n this.lastElementStack = [];\n this.nextTokenIndex = 0;\n this.stackSize = 0;\n }\n\n private startImplementation(implementation: RuleImpl): RuleImpl {\n return (args) => {\n const size = this.keepStackSize();\n try {\n implementation(args);\n } finally {\n this.resetStackSize(size);\n }\n };\n }\n\n private removeUnexpectedElements(): void {\n this.elementStack.splice(this.stackSize);\n }\n\n keepStackSize(): number {\n const size = this.elementStack.length;\n this.stackSize = size;\n return size;\n }\n\n resetStackSize(size: number): void {\n this.removeUnexpectedElements();\n this.stackSize = size;\n }\n\n consume(idx: number, tokenType: TokenType, feature: AbstractElement): void {\n this.wrapper.wrapConsume(idx, tokenType);\n if (!this.isRecording()) {\n this.lastElementStack = [...this.elementStack, feature];\n this.nextTokenIndex = this.currIdx + 1;\n }\n }\n\n subrule(idx: number, rule: RuleResult, feature: AbstractElement, args: Args): void {\n this.before(feature);\n this.wrapper.wrapSubrule(idx, rule, args);\n this.after(feature);\n }\n\n before(element: AbstractElement): void {\n if (!this.isRecording()) {\n this.elementStack.push(element);\n }\n }\n\n after(element: AbstractElement): void {\n if (!this.isRecording()) {\n const index = this.elementStack.lastIndexOf(element);\n if (index >= 0) {\n this.elementStack.splice(index);\n }\n }\n }\n\n get currIdx(): number {\n return (this.wrapper as any).currIdx;\n }\n}\n\nconst defaultConfig: IParserConfig = {\n recoveryEnabled: true,\n nodeLocationTracking: 'full',\n skipValidations: true,\n errorMessageProvider: new LangiumParserErrorMessageProvider()\n};\n\n/**\n * This class wraps the embedded actions parser of chevrotain and exposes protected methods.\n * This way, we can build the `LangiumParser` as a composition.\n */\nclass ChevrotainWrapper extends EmbeddedActionsParser {\n\n // This array is set in the base implementation of Chevrotain.\n definitionErrors: IParserDefinitionError[];\n\n constructor(tokens: TokenVocabulary, config?: IParserConfig) {\n const useDefaultLookahead = config && 'maxLookahead' in config;\n super(tokens, {\n ...defaultConfig,\n lookaheadStrategy: useDefaultLookahead\n ? new LLkLookaheadStrategy({ maxLookahead: config.maxLookahead })\n : new LLStarLookaheadStrategy(),\n ...config,\n });\n }\n\n get IS_RECORDING(): boolean {\n return this.RECORDING_PHASE;\n }\n\n DEFINE_RULE(name: string, impl: RuleImpl): RuleResult {\n return this.RULE(name, impl);\n }\n\n wrapSelfAnalysis(): void {\n this.performSelfAnalysis();\n }\n\n wrapConsume(idx: number, tokenType: TokenType): IToken {\n return this.consume(idx, tokenType);\n }\n\n wrapSubrule(idx: number, rule: RuleResult, args: Args): unknown {\n return this.subrule(idx, rule, {\n ARGS: [args]\n });\n }\n\n wrapOr(idx: number, choices: Array>): void {\n this.or(idx, choices);\n }\n\n wrapOption(idx: number, callback: DSLMethodOpts): void {\n this.option(idx, callback);\n }\n\n wrapMany(idx: number, callback: DSLMethodOpts): void {\n this.many(idx, callback);\n }\n\n wrapAtLeastOne(idx: number, callback: DSLMethodOpts): void {\n this.atLeastOne(idx, callback);\n }\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { IOrAlt, TokenType, TokenTypeDictionary } from 'chevrotain';\nimport type { AbstractElement, Action, Alternatives, Condition, CrossReference, Grammar, Group, Keyword, NamedArgument, ParserRule, RuleCall, UnorderedGroup } from '../languages/generated/ast.js';\nimport type { BaseParser } from './langium-parser.js';\nimport type { AstNode } from '../syntax-tree.js';\nimport type { Cardinality } from '../utils/grammar-utils.js';\nimport { EMPTY_ALT, EOF } from 'chevrotain';\nimport { isAction, isAlternatives, isEndOfFile, isAssignment, isConjunction, isCrossReference, isDisjunction, isGroup, isKeyword, isNegation, isParameterReference, isParserRule, isRuleCall, isTerminalRule, isUnorderedGroup, isBooleanLiteral } from '../languages/generated/ast.js';\nimport { assertUnreachable, ErrorWithLocation } from '../utils/errors.js';\nimport { stream } from '../utils/stream.js';\nimport { findNameAssignment, getAllReachableRules, getTypeName } from '../utils/grammar-utils.js';\n\ntype RuleContext = {\n optional: number,\n consume: number,\n subrule: number,\n many: number,\n or: number\n} & ParserContext;\n\ntype ParserContext = {\n parser: BaseParser\n tokens: TokenTypeDictionary\n rules: Map\n ruleNames: Map\n}\n\ntype Rule = (args: Args) => unknown;\n\ntype Args = Record;\n\ntype Predicate = (args: Args) => boolean;\n\ntype Method = (args: Args) => void;\n\nexport function createParser(grammar: Grammar, parser: T, tokens: TokenTypeDictionary): T {\n const rules = new Map();\n const parserContext: ParserContext = {\n parser,\n tokens,\n rules,\n ruleNames: new Map()\n };\n buildRules(parserContext, grammar);\n return parser;\n}\n\nfunction buildRules(parserContext: ParserContext, grammar: Grammar): void {\n const reachable = getAllReachableRules(grammar, false);\n const parserRules = stream(grammar.rules).filter(isParserRule).filter(rule => reachable.has(rule));\n for (const rule of parserRules) {\n const ctx: RuleContext = {\n ...parserContext,\n consume: 1,\n optional: 1,\n subrule: 1,\n many: 1,\n or: 1\n };\n ctx.rules.set(\n rule.name,\n parserContext.parser.rule(rule, buildElement(ctx, rule.definition))\n );\n }\n}\n\nfunction buildElement(ctx: RuleContext, element: AbstractElement, ignoreGuard = false): Method {\n let method: Method;\n if (isKeyword(element)) {\n method = buildKeyword(ctx, element);\n } else if (isAction(element)) {\n method = buildAction(ctx, element);\n } else if (isAssignment(element)) {\n method = buildElement(ctx, element.terminal);\n } else if (isCrossReference(element)) {\n method = buildCrossReference(ctx, element);\n } else if (isRuleCall(element)) {\n method = buildRuleCall(ctx, element);\n } else if (isAlternatives(element)) {\n method = buildAlternatives(ctx, element);\n } else if (isUnorderedGroup(element)) {\n method = buildUnorderedGroup(ctx, element);\n } else if (isGroup(element)) {\n method = buildGroup(ctx, element);\n } else if(isEndOfFile(element)) {\n const idx = ctx.consume++;\n method = () => ctx.parser.consume(idx, EOF, element);\n } else {\n throw new ErrorWithLocation(element.$cstNode, `Unexpected element type: ${element.$type}`);\n }\n return wrap(ctx, ignoreGuard ? undefined : getGuardCondition(element), method, element.cardinality);\n}\n\nfunction buildAction(ctx: RuleContext, action: Action): Method {\n const actionType = getTypeName(action);\n return () => ctx.parser.action(actionType, action);\n}\n\nfunction buildRuleCall(ctx: RuleContext, ruleCall: RuleCall): Method {\n const rule = ruleCall.rule.ref;\n if (isParserRule(rule)) {\n const idx = ctx.subrule++;\n const predicate = ruleCall.arguments.length > 0 ? buildRuleCallPredicate(rule, ruleCall.arguments) : () => ({});\n return (args) => ctx.parser.subrule(idx, getRule(ctx, rule), ruleCall, predicate(args));\n } else if (isTerminalRule(rule)) {\n const idx = ctx.consume++;\n const method = getToken(ctx, rule.name);\n return () => ctx.parser.consume(idx, method, ruleCall);\n } else if (!rule) {\n throw new ErrorWithLocation(ruleCall.$cstNode, `Undefined rule type: ${ruleCall.$type}`);\n } else {\n assertUnreachable(rule);\n }\n}\n\nfunction buildRuleCallPredicate(rule: ParserRule, namedArgs: NamedArgument[]): (args: Args) => Args {\n const predicates = namedArgs.map(e => buildPredicate(e.value));\n return (args) => {\n const ruleArgs: Args = {};\n for (let i = 0; i < predicates.length; i++) {\n const ruleTarget = rule.parameters[i];\n const predicate = predicates[i];\n ruleArgs[ruleTarget.name] = predicate(args);\n }\n return ruleArgs;\n };\n}\n\ninterface PredicatedMethod {\n ALT: Method,\n GATE?: Predicate\n}\n\nfunction buildPredicate(condition: Condition): Predicate {\n if (isDisjunction(condition)) {\n const left = buildPredicate(condition.left);\n const right = buildPredicate(condition.right);\n return (args) => (left(args) || right(args));\n } else if (isConjunction(condition)) {\n const left = buildPredicate(condition.left);\n const right = buildPredicate(condition.right);\n return (args) => (left(args) && right(args));\n } else if (isNegation(condition)) {\n const value = buildPredicate(condition.value);\n return (args) => !value(args);\n } else if (isParameterReference(condition)) {\n const name = condition.parameter.ref!.name;\n return (args) => args !== undefined && args[name] === true;\n } else if (isBooleanLiteral(condition)) {\n const value = Boolean(condition.true);\n return () => value;\n }\n assertUnreachable(condition);\n}\n\nfunction buildAlternatives(ctx: RuleContext, alternatives: Alternatives): Method {\n if (alternatives.elements.length === 1) {\n return buildElement(ctx, alternatives.elements[0]);\n } else {\n const methods: PredicatedMethod[] = [];\n\n for (const element of alternatives.elements) {\n const predicatedMethod: PredicatedMethod = {\n // Since we handle the guard condition in the alternative already\n // We can ignore the group guard condition inside\n ALT: buildElement(ctx, element, true)\n };\n const guard = getGuardCondition(element);\n if (guard) {\n predicatedMethod.GATE = buildPredicate(guard);\n }\n methods.push(predicatedMethod);\n }\n\n const idx = ctx.or++;\n return (args) => ctx.parser.alternatives(idx, methods.map(method => {\n const alt: IOrAlt = {\n ALT: () => method.ALT(args)\n };\n const gate = method.GATE;\n if (gate) {\n alt.GATE = () => gate(args);\n }\n return alt;\n }));\n }\n}\n\nfunction buildUnorderedGroup(ctx: RuleContext, group: UnorderedGroup): Method {\n if (group.elements.length === 1) {\n return buildElement(ctx, group.elements[0]);\n }\n const methods: PredicatedMethod[] = [];\n\n for (const element of group.elements) {\n const predicatedMethod: PredicatedMethod = {\n // Since we handle the guard condition in the alternative already\n // We can ignore the group guard condition inside\n ALT: buildElement(ctx, element, true)\n };\n const guard = getGuardCondition(element);\n if (guard) {\n predicatedMethod.GATE = buildPredicate(guard);\n }\n methods.push(predicatedMethod);\n }\n\n const orIdx = ctx.or++;\n\n const idFunc = (groupIdx: number, lParser: BaseParser) => {\n const stackId = lParser.getRuleStack().join('-');\n return `uGroup_${groupIdx}_${stackId}`;\n };\n const alternatives: Method = (args) => ctx.parser.alternatives(orIdx, methods.map((method, idx) => {\n const alt: IOrAlt = { ALT: () => true };\n const parser = ctx.parser;\n alt.ALT = () => {\n method.ALT(args);\n if (!parser.isRecording()) {\n const key = idFunc(orIdx, parser);\n if (!parser.unorderedGroups.get(key)) {\n // init after clear state\n parser.unorderedGroups.set(key, []);\n }\n const groupState = parser.unorderedGroups.get(key)!;\n if (typeof groupState?.[idx] === 'undefined') {\n // Not accessed yet\n groupState[idx] = true;\n }\n }\n };\n const gate = method.GATE;\n if (gate) {\n alt.GATE = () => gate(args);\n } else {\n alt.GATE = () => {\n const trackedAlternatives = parser.unorderedGroups.get(idFunc(orIdx, parser));\n const allow = !trackedAlternatives?.[idx];\n return allow;\n };\n }\n return alt;\n }));\n const wrapped = wrap(ctx, getGuardCondition(group), alternatives, '*');\n return (args) => {\n wrapped(args);\n if (!ctx.parser.isRecording()) {\n ctx.parser.unorderedGroups.delete(idFunc(orIdx, ctx.parser));\n }\n };\n}\n\nfunction buildGroup(ctx: RuleContext, group: Group): Method {\n const methods = group.elements.map(e => buildElement(ctx, e));\n return (args) => methods.forEach(method => method(args));\n}\n\nfunction getGuardCondition(element: AbstractElement): Condition | undefined {\n if (isGroup(element)) {\n return element.guardCondition;\n }\n return undefined;\n}\n\nfunction buildCrossReference(ctx: RuleContext, crossRef: CrossReference, terminal = crossRef.terminal): Method {\n if (!terminal) {\n if (!crossRef.type.ref) {\n throw new Error('Could not resolve reference to type: ' + crossRef.type.$refText);\n }\n const assignment = findNameAssignment(crossRef.type.ref);\n const assignTerminal = assignment?.terminal;\n if (!assignTerminal) {\n throw new Error('Could not find name assignment for type: ' + getTypeName(crossRef.type.ref));\n }\n return buildCrossReference(ctx, crossRef, assignTerminal);\n } else if (isRuleCall(terminal) && isParserRule(terminal.rule.ref)) {\n const idx = ctx.subrule++;\n return (args) => ctx.parser.subrule(idx, getRule(ctx, terminal.rule.ref as ParserRule), crossRef, args);\n } else if (isRuleCall(terminal) && isTerminalRule(terminal.rule.ref)) {\n const idx = ctx.consume++;\n const terminalRule = getToken(ctx, terminal.rule.ref.name);\n return () => ctx.parser.consume(idx, terminalRule, crossRef);\n } else if (isKeyword(terminal)) {\n const idx = ctx.consume++;\n const keyword = getToken(ctx, terminal.value);\n return () => ctx.parser.consume(idx, keyword, crossRef);\n }\n else {\n throw new Error('Could not build cross reference parser');\n }\n}\n\nfunction buildKeyword(ctx: RuleContext, keyword: Keyword): Method {\n const idx = ctx.consume++;\n const token = ctx.tokens[keyword.value];\n if (!token) {\n throw new Error('Could not find token for keyword: ' + keyword.value);\n }\n return () => ctx.parser.consume(idx, token, keyword);\n}\n\nfunction wrap(ctx: RuleContext, guard: Condition | undefined, method: Method, cardinality: Cardinality): Method {\n const gate = guard && buildPredicate(guard);\n\n if (!cardinality) {\n if (gate) {\n const idx = ctx.or++;\n return (args) => ctx.parser.alternatives(idx, [\n {\n ALT: () => method(args),\n GATE: () => gate(args)\n },\n {\n ALT: EMPTY_ALT(),\n GATE: () => !gate(args)\n }\n ]);\n } else {\n return method;\n }\n }\n\n if (cardinality === '*') {\n const idx = ctx.many++;\n return (args) => ctx.parser.many(idx, {\n DEF: () => method(args),\n GATE: gate ? () => gate(args) : undefined\n });\n } else if (cardinality === '+') {\n const idx = ctx.many++;\n if (gate) {\n const orIdx = ctx.or++;\n // In the case of a guard condition for the `+` group\n // We combine it with an empty alternative\n // If the condition returns true, it needs to parse at least a single iteration\n // If its false, it is not allowed to parse anything\n return (args) => ctx.parser.alternatives(orIdx, [\n {\n ALT: () => ctx.parser.atLeastOne(idx, {\n DEF: () => method(args)\n }),\n GATE: () => gate(args)\n },\n {\n ALT: EMPTY_ALT(),\n GATE: () => !gate(args)\n }\n ]);\n } else {\n return (args) => ctx.parser.atLeastOne(idx, {\n DEF: () => method(args),\n });\n }\n } else if (cardinality === '?') {\n const idx = ctx.optional++;\n return (args) => ctx.parser.optional(idx, {\n DEF: () => method(args),\n GATE: gate ? () => gate(args) : undefined\n });\n } else {\n assertUnreachable(cardinality);\n }\n}\n\nfunction getRule(ctx: ParserContext, element: ParserRule | AbstractElement): Rule {\n const name = getRuleName(ctx, element);\n const rule = ctx.rules.get(name);\n if (!rule) throw new Error(`Rule \"${name}\" not found.\"`);\n return rule;\n}\n\nfunction getRuleName(ctx: ParserContext, element: ParserRule | AbstractElement): string {\n if (isParserRule(element)) {\n return element.name;\n } else if (ctx.ruleNames.has(element)) {\n return ctx.ruleNames.get(element)!;\n } else {\n let item: AstNode = element;\n let parent: AstNode = item.$container!;\n let ruleName: string = element.$type;\n while (!isParserRule(parent)) {\n if (isGroup(parent) || isAlternatives(parent) || isUnorderedGroup(parent)) {\n const index = parent.elements.indexOf(item as AbstractElement);\n ruleName = index.toString() + ':' + ruleName;\n }\n item = parent;\n parent = parent.$container!;\n }\n const rule = parent as ParserRule;\n ruleName = rule.name + ':' + ruleName;\n ctx.ruleNames.set(element, ruleName);\n return ruleName;\n }\n}\n\nfunction getToken(ctx: ParserContext, name: string): TokenType {\n const token = ctx.tokens[name];\n if (!token) throw new Error(`Token \"${name}\" not found.\"`);\n return token;\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport { LangiumCompletionParser } from './langium-parser.js';\nimport { createParser } from './parser-builder-base.js';\n\nexport function createCompletionParser(services: LangiumCoreServices): LangiumCompletionParser {\n const grammar = services.Grammar;\n const lexer = services.parser.Lexer;\n const parser = new LangiumCompletionParser(services);\n createParser(grammar, parser, lexer.definition);\n parser.finalize();\n return parser;\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport { LangiumParser } from './langium-parser.js';\nimport { createParser } from './parser-builder-base.js';\n\n/**\n * Create and finalize a Langium parser. The parser rules are derived from the grammar, which is\n * available at `services.Grammar`.\n */\nexport function createLangiumParser(services: LangiumCoreServices): LangiumParser {\n const parser = prepareLangiumParser(services);\n parser.finalize();\n return parser;\n}\n\n/**\n * Create a Langium parser without finalizing it. This is used to extract more detailed error\n * information when the parser is initially validated.\n */\nexport function prepareLangiumParser(services: LangiumCoreServices): LangiumParser {\n const grammar = services.Grammar;\n const lexer = services.parser.Lexer;\n const parser = new LangiumParser(services);\n return createParser(grammar, parser, lexer.definition);\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { CustomPatternMatcherFunc, TokenPattern, TokenType, TokenVocabulary } from 'chevrotain';\nimport type { AbstractRule, Grammar, Keyword, TerminalRule } from '../languages/generated/ast.js';\nimport type { Stream } from '../utils/stream.js';\nimport { Lexer } from 'chevrotain';\nimport { isKeyword, isParserRule, isTerminalRule } from '../languages/generated/ast.js';\nimport { streamAllContents } from '../utils/ast-utils.js';\nimport { getAllReachableRules, terminalRegex } from '../utils/grammar-utils.js';\nimport { getCaseInsensitivePattern, isWhitespace, partialMatches } from '../utils/regexp-utils.js';\nimport { stream } from '../utils/stream.js';\n\nexport interface TokenBuilderOptions {\n caseInsensitive?: boolean\n}\n\nexport interface TokenBuilder {\n buildTokens(grammar: Grammar, options?: TokenBuilderOptions): TokenVocabulary;\n}\n\nexport class DefaultTokenBuilder implements TokenBuilder {\n\n buildTokens(grammar: Grammar, options?: TokenBuilderOptions): TokenVocabulary {\n const reachableRules = stream(getAllReachableRules(grammar, false));\n const terminalTokens: TokenType[] = this.buildTerminalTokens(reachableRules);\n const tokens: TokenType[] = this.buildKeywordTokens(reachableRules, terminalTokens, options);\n\n terminalTokens.forEach(terminalToken => {\n const pattern = terminalToken.PATTERN;\n if (typeof pattern === 'object' && pattern && 'test' in pattern && isWhitespace(pattern)) {\n tokens.unshift(terminalToken);\n } else {\n tokens.push(terminalToken);\n }\n });\n // We don't need to add the EOF token explicitly.\n // It is automatically available at the end of the token stream.\n return tokens;\n }\n\n protected buildTerminalTokens(rules: Stream): TokenType[] {\n return rules.filter(isTerminalRule).filter(e => !e.fragment)\n .map(terminal => this.buildTerminalToken(terminal)).toArray();\n }\n\n protected buildTerminalToken(terminal: TerminalRule): TokenType {\n const regex = terminalRegex(terminal);\n const pattern = this.requiresCustomPattern(regex) ? this.regexPatternFunction(regex) : regex;\n const tokenType: TokenType = {\n name: terminal.name,\n PATTERN: pattern,\n LINE_BREAKS: true\n };\n if (terminal.hidden) {\n // Only skip tokens that are able to accept whitespace\n tokenType.GROUP = isWhitespace(regex) ? Lexer.SKIPPED : 'hidden';\n }\n return tokenType;\n }\n\n protected requiresCustomPattern(regex: RegExp): boolean {\n if (regex.flags.includes('u')) {\n // Unicode regexes are not supported by Chevrotain.\n return true;\n } else if (regex.source.includes('?<=') || regex.source.includes('? {\n stickyRegex.lastIndex = offset;\n const execResult = stickyRegex.exec(text);\n return execResult;\n };\n }\n\n protected buildKeywordTokens(rules: Stream, terminalTokens: TokenType[], options?: TokenBuilderOptions): TokenType[] {\n return rules\n // We filter by parser rules, since keywords in terminal rules get transformed into regex and are not actual tokens\n .filter(isParserRule)\n .flatMap(rule => streamAllContents(rule).filter(isKeyword))\n .distinct(e => e.value).toArray()\n // Sort keywords by descending length\n .sort((a, b) => b.value.length - a.value.length)\n .map(keyword => this.buildKeywordToken(keyword, terminalTokens, Boolean(options?.caseInsensitive)));\n }\n\n protected buildKeywordToken(keyword: Keyword, terminalTokens: TokenType[], caseInsensitive: boolean): TokenType {\n return {\n name: keyword.value,\n PATTERN: this.buildKeywordPattern(keyword, caseInsensitive),\n LONGER_ALT: this.findLongerAlt(keyword, terminalTokens)\n };\n }\n\n protected buildKeywordPattern(keyword: Keyword, caseInsensitive: boolean): TokenPattern {\n return caseInsensitive ?\n new RegExp(getCaseInsensitivePattern(keyword.value)) :\n keyword.value;\n }\n\n protected findLongerAlt(keyword: Keyword, terminalTokens: TokenType[]): TokenType[] {\n return terminalTokens.reduce((longerAlts: TokenType[], token) => {\n const pattern = token?.PATTERN as RegExp;\n if (pattern?.source && partialMatches('^' + pattern.source + '$', keyword.value)) {\n longerAlts.push(token);\n }\n return longerAlts;\n }, []);\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { AbstractElement, AbstractRule } from '../languages/generated/ast.js';\nimport type { CstNode } from '../syntax-tree.js';\nimport { isCrossReference, isRuleCall } from '../languages/generated/ast.js';\nimport { getCrossReferenceTerminal, getRuleType } from '../utils/grammar-utils.js';\n\n/**\n * Language-specific service for converting string values from the source text format into a value to be held in the AST.\n */\nexport interface ValueConverter {\n /**\n * Converts a string value from the source text format into a value to be held in the AST.\n */\n convert(input: string, cstNode: CstNode): ValueType;\n}\n\nexport type ValueType = string | number | boolean | bigint | Date;\n\nexport class DefaultValueConverter implements ValueConverter {\n\n convert(input: string, cstNode: CstNode): ValueType {\n let feature: AbstractElement | undefined = cstNode.grammarSource;\n if (isCrossReference(feature)) {\n feature = getCrossReferenceTerminal(feature);\n }\n if (isRuleCall(feature)) {\n const rule = feature.rule.ref;\n if (!rule) {\n throw new Error('This cst node was not parsed by a rule.');\n }\n return this.runConverter(rule, input, cstNode);\n }\n return input;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected runConverter(rule: AbstractRule, input: string, cstNode: CstNode): ValueType {\n switch (rule.name.toUpperCase()) {\n case 'INT': return ValueConverter.convertInt(input);\n case 'STRING': return ValueConverter.convertString(input);\n case 'ID': return ValueConverter.convertID(input);\n }\n switch (getRuleType(rule)?.toLowerCase()) {\n case 'number': return ValueConverter.convertNumber(input);\n case 'boolean': return ValueConverter.convertBoolean(input);\n case 'bigint': return ValueConverter.convertBigint(input);\n case 'date': return ValueConverter.convertDate(input);\n default: return input;\n }\n }\n}\n\nexport namespace ValueConverter {\n\n export function convertString(input: string): string {\n let result = '';\n for (let i = 1; i < input.length - 1; i++) {\n const c = input.charAt(i);\n if (c === '\\\\') {\n const c1 = input.charAt(++i);\n result += convertEscapeCharacter(c1);\n } else {\n result += c;\n }\n }\n return result;\n }\n\n function convertEscapeCharacter(char: string): string {\n switch (char) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n case '0': return '\\0';\n default: return char;\n }\n }\n\n export function convertID(input: string): string {\n if (input.charAt(0) === '^') {\n return input.substring(1);\n } else {\n return input;\n }\n }\n\n export function convertInt(input: string): number {\n return parseInt(input);\n }\n\n export function convertBigint(input: string): bigint {\n return BigInt(input);\n }\n\n export function convertDate(input: string): Date {\n return new Date(input);\n }\n\n export function convertNumber(input: string): number {\n return Number(input);\n }\n\n export function convertBoolean(input: string): boolean {\n return input.toLowerCase() === 'true';\n }\n\n}\n", "\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet _ral;\nfunction RAL() {\n if (_ral === undefined) {\n throw new Error(`No runtime abstraction layer installed`);\n }\n return _ral;\n}\n(function (RAL) {\n function install(ral) {\n if (ral === undefined) {\n throw new Error(`No runtime abstraction layer provided`);\n }\n _ral = ral;\n }\n RAL.install = install;\n})(RAL || (RAL = {}));\nexports.default = RAL;\n", "\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0;\nfunction boolean(value) {\n return value === true || value === false;\n}\nexports.boolean = boolean;\nfunction string(value) {\n return typeof value === 'string' || value instanceof String;\n}\nexports.string = string;\nfunction number(value) {\n return typeof value === 'number' || value instanceof Number;\n}\nexports.number = number;\nfunction error(value) {\n return value instanceof Error;\n}\nexports.error = error;\nfunction func(value) {\n return typeof value === 'function';\n}\nexports.func = func;\nfunction array(value) {\n return Array.isArray(value);\n}\nexports.array = array;\nfunction stringArray(value) {\n return array(value) && value.every(elem => string(elem));\n}\nexports.stringArray = stringArray;\n", "\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Emitter = exports.Event = void 0;\nconst ral_1 = require(\"./ral\");\nvar Event;\n(function (Event) {\n const _disposable = { dispose() { } };\n Event.None = function () { return _disposable; };\n})(Event || (exports.Event = Event = {}));\nclass CallbackList {\n add(callback, context = null, bucket) {\n if (!this._callbacks) {\n this._callbacks = [];\n this._contexts = [];\n }\n this._callbacks.push(callback);\n this._contexts.push(context);\n if (Array.isArray(bucket)) {\n bucket.push({ dispose: () => this.remove(callback, context) });\n }\n }\n remove(callback, context = null) {\n if (!this._callbacks) {\n return;\n }\n let foundCallbackWithDifferentContext = false;\n for (let i = 0, len = this._callbacks.length; i < len; i++) {\n if (this._callbacks[i] === callback) {\n if (this._contexts[i] === context) {\n // callback & context match => remove it\n this._callbacks.splice(i, 1);\n this._contexts.splice(i, 1);\n return;\n }\n else {\n foundCallbackWithDifferentContext = true;\n }\n }\n }\n if (foundCallbackWithDifferentContext) {\n throw new Error('When adding a listener with a context, you should remove it with the same context');\n }\n }\n invoke(...args) {\n if (!this._callbacks) {\n return [];\n }\n const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);\n for (let i = 0, len = callbacks.length; i < len; i++) {\n try {\n ret.push(callbacks[i].apply(contexts[i], args));\n }\n catch (e) {\n // eslint-disable-next-line no-console\n (0, ral_1.default)().console.error(e);\n }\n }\n return ret;\n }\n isEmpty() {\n return !this._callbacks || this._callbacks.length === 0;\n }\n dispose() {\n this._callbacks = undefined;\n this._contexts = undefined;\n }\n}\nclass Emitter {\n constructor(_options) {\n this._options = _options;\n }\n /**\n * For the public to allow to subscribe\n * to events from this Emitter\n */\n get event() {\n if (!this._event) {\n this._event = (listener, thisArgs, disposables) => {\n if (!this._callbacks) {\n this._callbacks = new CallbackList();\n }\n if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {\n this._options.onFirstListenerAdd(this);\n }\n this._callbacks.add(listener, thisArgs);\n const result = {\n dispose: () => {\n if (!this._callbacks) {\n // disposable is disposed after emitter is disposed.\n return;\n }\n this._callbacks.remove(listener, thisArgs);\n result.dispose = Emitter._noop;\n if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {\n this._options.onLastListenerRemove(this);\n }\n }\n };\n if (Array.isArray(disposables)) {\n disposables.push(result);\n }\n return result;\n };\n }\n return this._event;\n }\n /**\n * To be kept private to fire an event to\n * subscribers\n */\n fire(event) {\n if (this._callbacks) {\n this._callbacks.invoke.call(this._callbacks, event);\n }\n }\n dispose() {\n if (this._callbacks) {\n this._callbacks.dispose();\n this._callbacks = undefined;\n }\n }\n}\nexports.Emitter = Emitter;\nEmitter._noop = function () { };\n", "\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CancellationTokenSource = exports.CancellationToken = void 0;\nconst ral_1 = require(\"./ral\");\nconst Is = require(\"./is\");\nconst events_1 = require(\"./events\");\nvar CancellationToken;\n(function (CancellationToken) {\n CancellationToken.None = Object.freeze({\n isCancellationRequested: false,\n onCancellationRequested: events_1.Event.None\n });\n CancellationToken.Cancelled = Object.freeze({\n isCancellationRequested: true,\n onCancellationRequested: events_1.Event.None\n });\n function is(value) {\n const candidate = value;\n return candidate && (candidate === CancellationToken.None\n || candidate === CancellationToken.Cancelled\n || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));\n }\n CancellationToken.is = is;\n})(CancellationToken || (exports.CancellationToken = CancellationToken = {}));\nconst shortcutEvent = Object.freeze(function (callback, context) {\n const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0);\n return { dispose() { handle.dispose(); } };\n});\nclass MutableToken {\n constructor() {\n this._isCancelled = false;\n }\n cancel() {\n if (!this._isCancelled) {\n this._isCancelled = true;\n if (this._emitter) {\n this._emitter.fire(undefined);\n this.dispose();\n }\n }\n }\n get isCancellationRequested() {\n return this._isCancelled;\n }\n get onCancellationRequested() {\n if (this._isCancelled) {\n return shortcutEvent;\n }\n if (!this._emitter) {\n this._emitter = new events_1.Emitter();\n }\n return this._emitter.event;\n }\n dispose() {\n if (this._emitter) {\n this._emitter.dispose();\n this._emitter = undefined;\n }\n }\n}\nclass CancellationTokenSource {\n get token() {\n if (!this._token) {\n // be lazy and create the token only when\n // actually needed\n this._token = new MutableToken();\n }\n return this._token;\n }\n cancel() {\n if (!this._token) {\n // save an object by returning the default\n // cancelled token when cancellation happens\n // before someone asks for the token\n this._token = CancellationToken.Cancelled;\n }\n else {\n this._token.cancel();\n }\n }\n dispose() {\n if (!this._token) {\n // ensure to initialize with an empty token if we had none\n this._token = CancellationToken.None;\n }\n else if (this._token instanceof MutableToken) {\n // actually dispose\n this._token.dispose();\n }\n }\n}\nexports.CancellationTokenSource = CancellationTokenSource;\n", "/******************************************************************************\n * Copyright 2024 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n// eslint-disable-next-line no-restricted-imports\nexport * from 'vscode-jsonrpc/lib/common/cancellation.js';\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { CancellationToken, CancellationTokenSource, type AbstractCancellationTokenSource } from '../utils/cancellation.js';\n\nexport type MaybePromise = T | Promise\n\n/**\n * Delays the execution of the current code to the next tick of the event loop.\n * Don't call this method directly in a tight loop to prevent too many promises from being created.\n */\nexport function delayNextTick(): Promise {\n return new Promise(resolve => {\n // In case we are running in a non-node environment, `setImmediate` isn't available.\n // Using `setTimeout` of the browser API accomplishes the same result.\n if (typeof setImmediate === 'undefined') {\n setTimeout(resolve, 0);\n } else {\n setImmediate(resolve);\n }\n });\n}\n\nlet lastTick = 0;\nlet globalInterruptionPeriod = 10;\n\n/**\n * Reset the global interruption period and create a cancellation token source.\n */\nexport function startCancelableOperation(): AbstractCancellationTokenSource {\n lastTick = Date.now();\n return new CancellationTokenSource();\n}\n\n/**\n * Change the period duration for `interruptAndCheck` to the given number of milliseconds.\n * The default value is 10ms.\n */\nexport function setInterruptionPeriod(period: number): void {\n globalInterruptionPeriod = period;\n}\n\n/**\n * This symbol may be thrown in an asynchronous context by any Langium service that receives\n * a `CancellationToken`. This means that the promise returned by such a service is rejected with\n * this symbol as rejection reason.\n */\nexport const OperationCancelled = Symbol('OperationCancelled');\n\n/**\n * Use this in a `catch` block to check whether the thrown object indicates that the operation\n * has been cancelled.\n */\nexport function isOperationCancelled(err: unknown): err is typeof OperationCancelled {\n return err === OperationCancelled;\n}\n\n/**\n * This function does two things:\n * 1. Check the elapsed time since the last call to this function or to `startCancelableOperation`. If the predefined\n * period (configured with `setInterruptionPeriod`) is exceeded, execution is delayed with `delayNextTick`.\n * 2. If the predefined period is not met yet or execution is resumed after an interruption, the given cancellation\n * token is checked, and if cancellation is requested, `OperationCanceled` is thrown.\n *\n * All services in Langium that receive a `CancellationToken` may potentially call this function, so the\n * `CancellationToken` must be caught (with an `async` try-catch block or a `catch` callback attached to\n * the promise) to avoid that event being exposed as an error.\n */\nexport async function interruptAndCheck(token: CancellationToken): Promise {\n if (token === CancellationToken.None) {\n // Early exit in case cancellation was disabled by the caller\n return;\n }\n const current = Date.now();\n if (current - lastTick >= globalInterruptionPeriod) {\n lastTick = current;\n await delayNextTick();\n }\n if (token.isCancellationRequested) {\n throw OperationCancelled;\n }\n}\n\n/**\n * Simple implementation of the deferred pattern.\n * An object that exposes a promise and functions to resolve and reject it.\n */\nexport class Deferred {\n resolve: (value: T) => this;\n reject: (err?: unknown) => this;\n\n promise = new Promise((resolve, reject) => {\n this.resolve = (arg) => {\n resolve(arg);\n return this;\n };\n this.reject = (err) => {\n reject(err);\n return this;\n };\n });\n}\n", "/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\nclass FullTextDocument {\n constructor(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n get uri() {\n return this._uri;\n }\n get languageId() {\n return this._languageId;\n }\n get version() {\n return this._version;\n }\n getText(range) {\n if (range) {\n const start = this.offsetAt(range.start);\n const end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n }\n update(changes, version) {\n for (const change of changes) {\n if (FullTextDocument.isIncremental(change)) {\n // makes sure start is before end\n const range = getWellformedRange(change.range);\n // update content\n const startOffset = this.offsetAt(range.start);\n const endOffset = this.offsetAt(range.end);\n this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);\n // update the offsets\n const startLine = Math.max(range.start.line, 0);\n const endLine = Math.max(range.end.line, 0);\n let lineOffsets = this._lineOffsets;\n const addedLineOffsets = computeLineOffsets(change.text, false, startOffset);\n if (endLine - startLine === addedLineOffsets.length) {\n for (let i = 0, len = addedLineOffsets.length; i < len; i++) {\n lineOffsets[i + startLine + 1] = addedLineOffsets[i];\n }\n }\n else {\n if (addedLineOffsets.length < 10000) {\n lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets);\n }\n else { // avoid too many arguments for splice\n this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));\n }\n }\n const diff = change.text.length - (endOffset - startOffset);\n if (diff !== 0) {\n for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {\n lineOffsets[i] = lineOffsets[i] + diff;\n }\n }\n }\n else if (FullTextDocument.isFull(change)) {\n this._content = change.text;\n this._lineOffsets = undefined;\n }\n else {\n throw new Error('Unknown change event received');\n }\n }\n this._version = version;\n }\n getLineOffsets() {\n if (this._lineOffsets === undefined) {\n this._lineOffsets = computeLineOffsets(this._content, true);\n }\n return this._lineOffsets;\n }\n positionAt(offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n const lineOffsets = this.getLineOffsets();\n let low = 0, high = lineOffsets.length;\n if (high === 0) {\n return { line: 0, character: offset };\n }\n while (low < high) {\n const mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n const line = low - 1;\n offset = this.ensureBeforeEOL(offset, lineOffsets[line]);\n return { line, character: offset - lineOffsets[line] };\n }\n offsetAt(position) {\n const lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n const lineOffset = lineOffsets[position.line];\n if (position.character <= 0) {\n return lineOffset;\n }\n const nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n const offset = Math.min(lineOffset + position.character, nextLineOffset);\n return this.ensureBeforeEOL(offset, lineOffset);\n }\n ensureBeforeEOL(offset, lineOffset) {\n while (offset > lineOffset && isEOL(this._content.charCodeAt(offset - 1))) {\n offset--;\n }\n return offset;\n }\n get lineCount() {\n return this.getLineOffsets().length;\n }\n static isIncremental(event) {\n const candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range !== undefined &&\n (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');\n }\n static isFull(event) {\n const candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;\n }\n}\nexport var TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new text document.\n *\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param version The document's initial version number.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Updates a TextDocument by modifying its content.\n *\n * @param document the document to update. Only documents created by TextDocument.create are valid inputs.\n * @param changes the changes to apply to the document.\n * @param version the changes version for the document.\n * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.\n *\n */\n function update(document, changes, version) {\n if (document instanceof FullTextDocument) {\n document.update(changes, version);\n return document;\n }\n else {\n throw new Error('TextDocument.update: document must be created by TextDocument.create');\n }\n }\n TextDocument.update = update;\n function applyEdits(document, edits) {\n const text = document.getText();\n const sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => {\n const diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n let lastModifiedOffset = 0;\n const spans = [];\n for (const e of sortedEdits) {\n const startOffset = document.offsetAt(e.range.start);\n if (startOffset < lastModifiedOffset) {\n throw new Error('Overlapping edit');\n }\n else if (startOffset > lastModifiedOffset) {\n spans.push(text.substring(lastModifiedOffset, startOffset));\n }\n if (e.newText.length) {\n spans.push(e.newText);\n }\n lastModifiedOffset = document.offsetAt(e.range.end);\n }\n spans.push(text.substr(lastModifiedOffset));\n return spans.join('');\n }\n TextDocument.applyEdits = applyEdits;\n})(TextDocument || (TextDocument = {}));\nfunction mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n const p = (data.length / 2) | 0;\n const left = data.slice(0, p);\n const right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n let leftIdx = 0;\n let rightIdx = 0;\n let i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n const ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n}\nfunction computeLineOffsets(text, isAtLineStart, textOffset = 0) {\n const result = isAtLineStart ? [textOffset] : [];\n for (let i = 0; i < text.length; i++) {\n const ch = text.charCodeAt(i);\n if (isEOL(ch)) {\n if (ch === 13 /* CharCode.CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* CharCode.LineFeed */) {\n i++;\n }\n result.push(textOffset + i + 1);\n }\n }\n return result;\n}\nfunction isEOL(char) {\n return char === 13 /* CharCode.CarriageReturn */ || char === 10 /* CharCode.LineFeed */;\n}\nfunction getWellformedRange(range) {\n const start = range.start;\n const end = range.end;\n if (start.line > end.line || (start.line === end.line && start.character > end.character)) {\n return { start: end, end: start };\n }\n return range;\n}\nfunction getWellformedEdit(textEdit) {\n const range = getWellformedRange(textEdit.range);\n if (range !== textEdit.range) {\n return { newText: textEdit.newText, range };\n }\n return textEdit;\n}\n", "// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n", "// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n", "// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};", "__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))", "// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\n// !!!!!\n// SEE https://github.com/microsoft/vscode/blob/master/src/vs/base/common/platform.ts\n// !!!!!\n\ndeclare const process: { platform: 'win32' };\ndeclare const navigator: { userAgent: string };\n\nexport let isWindows: boolean;\n\nif (typeof process === 'object') {\n\tisWindows = process.platform === 'win32';\n} else if (typeof navigator === 'object') {\n\tlet userAgent = navigator.userAgent;\n\tisWindows = userAgent.indexOf('Windows') >= 0;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { CharCode } from './charCode'\nimport { isWindows } from './platform';\n\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\nconst _singleSlashStart = /^\\//;\nconst _doubleSlashStart = /^\\/\\//;\n\nfunction _validateUri(ret: URI, _strict?: boolean): void {\n\n\t// scheme, must be set\n\tif (!ret.scheme && _strict) {\n\t\tthrow new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\n\t}\n\n\t// scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n\t// ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n\tif (ret.scheme && !_schemePattern.test(ret.scheme)) {\n\t\tthrow new Error('[UriError]: Scheme contains illegal characters.');\n\t}\n\n\t// path, http://tools.ietf.org/html/rfc3986#section-3.3\n\t// If a URI contains an authority component, then the path component\n\t// must either be empty or begin with a slash (\"/\") character. If a URI\n\t// does not contain an authority component, then the path cannot begin\n\t// with two slash characters (\"//\").\n\tif (ret.path) {\n\t\tif (ret.authority) {\n\t\t\tif (!_singleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n\t\t\t}\n\t\t} else {\n\t\t\tif (_doubleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n\t\t\t}\n\t\t}\n\t}\n}\n\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme: string, _strict: boolean): string {\n\tif (!scheme && !_strict) {\n\t\treturn 'file';\n\t}\n\treturn scheme;\n}\n\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme: string, path: string): string {\n\n\t// the slash-character is our 'default base' as we don't\n\t// support constructing URIs relative to other URIs. This\n\t// also means that we alter and potentially break paths.\n\t// see https://tools.ietf.org/html/rfc3986#section-5.1.4\n\tswitch (scheme) {\n\t\tcase 'https':\n\t\tcase 'http':\n\t\tcase 'file':\n\t\t\tif (!path) {\n\t\t\t\tpath = _slash;\n\t\t\t} else if (path[0] !== _slash) {\n\t\t\t\tpath = _slash + path;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn path;\n}\n\nconst _empty = '';\nconst _slash = '/';\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nexport class URI implements UriComponents {\n\n\tstatic isUri(thing: any): thing is URI {\n\t\tif (thing instanceof URI) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!thing) {\n\t\t\treturn false;\n\t\t}\n\t\treturn typeof (thing).authority === 'string'\n\t\t\t&& typeof (thing).fragment === 'string'\n\t\t\t&& typeof (thing).path === 'string'\n\t\t\t&& typeof (thing).query === 'string'\n\t\t\t&& typeof (thing).scheme === 'string'\n\t\t\t&& typeof (thing).fsPath === 'string'\n\t\t\t&& typeof (thing).with === 'function'\n\t\t\t&& typeof (thing).toString === 'function';\n\t}\n\n\t/**\n\t * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part before the first colon.\n\t */\n\treadonly scheme: string;\n\n\t/**\n\t * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part between the first double slashes and the next slash.\n\t */\n\treadonly authority: string;\n\n\t/**\n\t * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly path: string;\n\n\t/**\n\t * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly query: string;\n\n\t/**\n\t * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly fragment: string;\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(components: UriComponents);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(schemeOrData: string | UriComponents, authority?: string, path?: string, query?: string, fragment?: string, _strict: boolean = false) {\n\n\t\tif (typeof schemeOrData === 'object') {\n\t\t\tthis.scheme = schemeOrData.scheme || _empty;\n\t\t\tthis.authority = schemeOrData.authority || _empty;\n\t\t\tthis.path = schemeOrData.path || _empty;\n\t\t\tthis.query = schemeOrData.query || _empty;\n\t\t\tthis.fragment = schemeOrData.fragment || _empty;\n\t\t\t// no validation because it's this URI\n\t\t\t// that creates uri components.\n\t\t\t// _validateUri(this);\n\t\t} else {\n\t\t\tthis.scheme = _schemeFix(schemeOrData, _strict);\n\t\t\tthis.authority = authority || _empty;\n\t\t\tthis.path = _referenceResolution(this.scheme, path || _empty);\n\t\t\tthis.query = query || _empty;\n\t\t\tthis.fragment = fragment || _empty;\n\n\t\t\t_validateUri(this, _strict);\n\t\t}\n\t}\n\n\t// ---- filesystem path -----------------------\n\n\t/**\n\t * Returns a string representing the corresponding file system path of this URI.\n\t * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n\t * platform specific path separator.\n\t *\n\t * * Will *not* validate the path for invalid characters and semantics.\n\t * * Will *not* look at the scheme of this URI.\n\t * * The result shall *not* be used for display purposes but for accessing a file on disk.\n\t *\n\t *\n\t * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n\t * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n\t *\n\t * ```ts\n\t\tconst u = URI.parse('file://server/c$/folder/file.txt')\n\t\tu.authority === 'server'\n\t\tu.path === '/shares/c$/file.txt'\n\t\tu.fsPath === '\\\\server\\c$\\folder\\file.txt'\n\t```\n\t *\n\t * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n\t * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n\t * with URIs that represent files on disk (`file` scheme).\n\t */\n\tget fsPath(): string {\n\t\t// if (this.scheme !== 'file') {\n\t\t// \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n\t\t// }\n\t\treturn uriToFsPath(this, false);\n\t}\n\n\t// ---- modify to new -------------------------\n\n\twith(change: { scheme?: string; authority?: string | null; path?: string | null; query?: string | null; fragment?: string | null }): URI {\n\n\t\tif (!change) {\n\t\t\treturn this;\n\t\t}\n\n\t\tlet { scheme, authority, path, query, fragment } = change;\n\t\tif (scheme === undefined) {\n\t\t\tscheme = this.scheme;\n\t\t} else if (scheme === null) {\n\t\t\tscheme = _empty;\n\t\t}\n\t\tif (authority === undefined) {\n\t\t\tauthority = this.authority;\n\t\t} else if (authority === null) {\n\t\t\tauthority = _empty;\n\t\t}\n\t\tif (path === undefined) {\n\t\t\tpath = this.path;\n\t\t} else if (path === null) {\n\t\t\tpath = _empty;\n\t\t}\n\t\tif (query === undefined) {\n\t\t\tquery = this.query;\n\t\t} else if (query === null) {\n\t\t\tquery = _empty;\n\t\t}\n\t\tif (fragment === undefined) {\n\t\t\tfragment = this.fragment;\n\t\t} else if (fragment === null) {\n\t\t\tfragment = _empty;\n\t\t}\n\n\t\tif (scheme === this.scheme\n\t\t\t&& authority === this.authority\n\t\t\t&& path === this.path\n\t\t\t&& query === this.query\n\t\t\t&& fragment === this.fragment) {\n\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new Uri(scheme, authority, path, query, fragment);\n\t}\n\n\t// ---- parse & validate ------------------------\n\n\t/**\n\t * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,\n\t * `file:///usr/home`, or `scheme:with/path`.\n\t *\n\t * @param value A string which represents an URI (see `URI#toString`).\n\t */\n\tstatic parse(value: string, _strict: boolean = false): URI {\n\t\tconst match = _regexp.exec(value);\n\t\tif (!match) {\n\t\t\treturn new Uri(_empty, _empty, _empty, _empty, _empty);\n\t\t}\n\t\treturn new Uri(\n\t\t\tmatch[2] || _empty,\n\t\t\tpercentDecode(match[4] || _empty),\n\t\t\tpercentDecode(match[5] || _empty),\n\t\t\tpercentDecode(match[7] || _empty),\n\t\t\tpercentDecode(match[9] || _empty),\n\t\t\t_strict\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n\t * `/usr/home`, or `\\\\server\\share\\some\\path`.\n\t *\n\t * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n\t * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n\t * `URI.parse('file://' + path)` because the path might contain characters that are\n\t * interpreted (# and ?). See the following sample:\n\t * ```ts\n\tconst good = URI.file('/coding/c#/project1');\n\tgood.scheme === 'file';\n\tgood.path === '/coding/c#/project1';\n\tgood.fragment === '';\n\tconst bad = URI.parse('file://' + '/coding/c#/project1');\n\tbad.scheme === 'file';\n\tbad.path === '/coding/c'; // path is now broken\n\tbad.fragment === '/project1';\n\t```\n\t *\n\t * @param path A file system path (see `URI#fsPath`)\n\t */\n\tstatic file(path: string): URI {\n\n\t\tlet authority = _empty;\n\n\t\t// normalize to fwd-slashes on windows,\n\t\t// on other systems bwd-slashes are valid\n\t\t// filename character, eg /f\\oo/ba\\r.txt\n\t\tif (isWindows) {\n\t\t\tpath = path.replace(/\\\\/g, _slash);\n\t\t}\n\n\t\t// check for authority as used in UNC shares\n\t\t// or use the path as given\n\t\tif (path[0] === _slash && path[1] === _slash) {\n\t\t\tconst idx = path.indexOf(_slash, 2);\n\t\t\tif (idx === -1) {\n\t\t\t\tauthority = path.substring(2);\n\t\t\t\tpath = _slash;\n\t\t\t} else {\n\t\t\t\tauthority = path.substring(2, idx);\n\t\t\t\tpath = path.substring(idx) || _slash;\n\t\t\t}\n\t\t}\n\n\t\treturn new Uri('file', authority, path, _empty, _empty);\n\t}\n\n\tstatic from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {\n\t\tconst result = new Uri(\n\t\t\tcomponents.scheme,\n\t\t\tcomponents.authority,\n\t\t\tcomponents.path,\n\t\t\tcomponents.query,\n\t\t\tcomponents.fragment,\n\t\t);\n\t\t_validateUri(result, true);\n\t\treturn result;\n\t}\n\n\t// ---- printing/externalize ---------------------------\n\n\t/**\n\t * Creates a string representation for this URI. It's guaranteed that calling\n\t * `URI.parse` with the result of this function creates an URI which is equal\n\t * to this URI.\n\t *\n\t * * The result shall *not* be used for display purposes but for externalization or transport.\n\t * * The result will be encoded using the percentage encoding and encoding happens mostly\n\t * ignore the scheme-specific encoding rules.\n\t *\n\t * @param skipEncoding Do not encode the result, default is `false`\n\t */\n\ttoString(skipEncoding: boolean = false): string {\n\t\treturn _asFormatted(this, skipEncoding);\n\t}\n\n\ttoJSON(): UriComponents {\n\t\treturn this;\n\t}\n\n\tstatic revive(data: UriComponents | URI): URI;\n\tstatic revive(data: UriComponents | URI | undefined): URI | undefined;\n\tstatic revive(data: UriComponents | URI | null): URI | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null {\n\t\tif (!data) {\n\t\t\treturn data;\n\t\t} else if (data instanceof URI) {\n\t\t\treturn data;\n\t\t} else {\n\t\t\tconst result = new Uri(data);\n\t\t\tresult._formatted = (data).external;\n\t\t\tresult._fsPath = (data)._sep === _pathSepMarker ? (data).fsPath : null;\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\nexport interface UriComponents {\n\tscheme: string;\n\tauthority: string;\n\tpath: string;\n\tquery: string;\n\tfragment: string;\n}\n\ninterface UriState extends UriComponents {\n\t$mid: number;\n\texternal: string;\n\tfsPath: string;\n\t_sep: 1 | undefined;\n}\n\nconst _pathSepMarker = isWindows ? 1 : undefined;\n\n// This class exists so that URI is compatible with vscode.Uri (API).\nclass Uri extends URI {\n\n\t_formatted: string | null = null;\n\t_fsPath: string | null = null;\n\n\toverride get fsPath(): string {\n\t\tif (!this._fsPath) {\n\t\t\tthis._fsPath = uriToFsPath(this, false);\n\t\t}\n\t\treturn this._fsPath;\n\t}\n\n\toverride toString(skipEncoding: boolean = false): string {\n\t\tif (!skipEncoding) {\n\t\t\tif (!this._formatted) {\n\t\t\t\tthis._formatted = _asFormatted(this, false);\n\t\t\t}\n\t\t\treturn this._formatted;\n\t\t} else {\n\t\t\t// we don't cache that\n\t\t\treturn _asFormatted(this, true);\n\t\t}\n\t}\n\n\toverride toJSON(): UriComponents {\n\t\tconst res = {\n\t\t\t$mid: 1\n\t\t};\n\t\t// cached state\n\t\tif (this._fsPath) {\n\t\t\tres.fsPath = this._fsPath;\n\t\t\tres._sep = _pathSepMarker;\n\t\t}\n\t\tif (this._formatted) {\n\t\t\tres.external = this._formatted;\n\t\t}\n\t\t// uri components\n\t\tif (this.path) {\n\t\t\tres.path = this.path;\n\t\t}\n\t\tif (this.scheme) {\n\t\t\tres.scheme = this.scheme;\n\t\t}\n\t\tif (this.authority) {\n\t\t\tres.authority = this.authority;\n\t\t}\n\t\tif (this.query) {\n\t\t\tres.query = this.query;\n\t\t}\n\t\tif (this.fragment) {\n\t\t\tres.fragment = this.fragment;\n\t\t}\n\t\treturn res;\n\t}\n}\n\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nconst encodeTable: { [ch: number]: string } = {\n\t[CharCode.Colon]: '%3A', // gen-delims\n\t[CharCode.Slash]: '%2F',\n\t[CharCode.QuestionMark]: '%3F',\n\t[CharCode.Hash]: '%23',\n\t[CharCode.OpenSquareBracket]: '%5B',\n\t[CharCode.CloseSquareBracket]: '%5D',\n\t[CharCode.AtSign]: '%40',\n\n\t[CharCode.ExclamationMark]: '%21', // sub-delims\n\t[CharCode.DollarSign]: '%24',\n\t[CharCode.Ampersand]: '%26',\n\t[CharCode.SingleQuote]: '%27',\n\t[CharCode.OpenParen]: '%28',\n\t[CharCode.CloseParen]: '%29',\n\t[CharCode.Asterisk]: '%2A',\n\t[CharCode.Plus]: '%2B',\n\t[CharCode.Comma]: '%2C',\n\t[CharCode.Semicolon]: '%3B',\n\t[CharCode.Equals]: '%3D',\n\n\t[CharCode.Space]: '%20',\n};\n\nfunction encodeURIComponentFast(uriComponent: string, isPath: boolean, isAuthority: boolean): string {\n\tlet res: string | undefined = undefined;\n\tlet nativeEncodePos = -1;\n\n\tfor (let pos = 0; pos < uriComponent.length; pos++) {\n\t\tconst code = uriComponent.charCodeAt(pos);\n\n\t\t// unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n\t\tif (\n\t\t\t(code >= CharCode.a && code <= CharCode.z)\n\t\t\t|| (code >= CharCode.A && code <= CharCode.Z)\n\t\t\t|| (code >= CharCode.Digit0 && code <= CharCode.Digit9)\n\t\t\t|| code === CharCode.Dash\n\t\t\t|| code === CharCode.Period\n\t\t\t|| code === CharCode.Underline\n\t\t\t|| code === CharCode.Tilde\n\t\t\t|| (isPath && code === CharCode.Slash)\n\t\t\t|| (isAuthority && code === CharCode.OpenSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.CloseSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.Colon)\n\t\t) {\n\t\t\t// check if we are delaying native encode\n\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\tnativeEncodePos = -1;\n\t\t\t}\n\t\t\t// check if we write into a new string (by default we try to return the param)\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += uriComponent.charAt(pos);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// encoding needed, we need to allocate a new string\n\t\t\tif (res === undefined) {\n\t\t\t\tres = uriComponent.substr(0, pos);\n\t\t\t}\n\n\t\t\t// check with default table first\n\t\t\tconst escaped = encodeTable[code];\n\t\t\tif (escaped !== undefined) {\n\n\t\t\t\t// check if we are delaying native encode\n\t\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\t\tnativeEncodePos = -1;\n\t\t\t\t}\n\n\t\t\t\t// append escaped variant to result\n\t\t\t\tres += escaped;\n\n\t\t\t} else if (nativeEncodePos === -1) {\n\t\t\t\t// use native encode only when needed\n\t\t\t\tnativeEncodePos = pos;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (nativeEncodePos !== -1) {\n\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n\t}\n\n\treturn res !== undefined ? res : uriComponent;\n}\n\nfunction encodeURIComponentMinimal(path: string): string {\n\tlet res: string | undefined = undefined;\n\tfor (let pos = 0; pos < path.length; pos++) {\n\t\tconst code = path.charCodeAt(pos);\n\t\tif (code === CharCode.Hash || code === CharCode.QuestionMark) {\n\t\t\tif (res === undefined) {\n\t\t\t\tres = path.substr(0, pos);\n\t\t\t}\n\t\t\tres += encodeTable[code];\n\t\t} else {\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += path[pos];\n\t\t\t}\n\t\t}\n\t}\n\treturn res !== undefined ? res : path;\n}\n\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string {\n\n\tlet value: string;\n\tif (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n\t\t// unc path: file://shares/c$/far/boo\n\t\tvalue = `//${uri.authority}${uri.path}`;\n\t} else if (\n\t\turi.path.charCodeAt(0) === CharCode.Slash\n\t\t&& (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)\n\t\t&& uri.path.charCodeAt(2) === CharCode.Colon\n\t) {\n\t\tif (!keepDriveLetterCasing) {\n\t\t\t// windows drive letter: file:///c:/far/boo\n\t\t\tvalue = uri.path[1].toLowerCase() + uri.path.substr(2);\n\t\t} else {\n\t\t\tvalue = uri.path.substr(1);\n\t\t}\n\t} else {\n\t\t// other path\n\t\tvalue = uri.path;\n\t}\n\tif (isWindows) {\n\t\tvalue = value.replace(/\\//g, '\\\\');\n\t}\n\treturn value;\n}\n\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri: URI, skipEncoding: boolean): string {\n\n\tconst encoder = !skipEncoding\n\t\t? encodeURIComponentFast\n\t\t: encodeURIComponentMinimal;\n\n\tlet res = '';\n\tlet { scheme, authority, path, query, fragment } = uri;\n\tif (scheme) {\n\t\tres += scheme;\n\t\tres += ':';\n\t}\n\tif (authority || scheme === 'file') {\n\t\tres += _slash;\n\t\tres += _slash;\n\t}\n\tif (authority) {\n\t\tlet idx = authority.indexOf('@');\n\t\tif (idx !== -1) {\n\t\t\t// @\n\t\t\tconst userinfo = authority.substr(0, idx);\n\t\t\tauthority = authority.substr(idx + 1);\n\t\t\tidx = userinfo.lastIndexOf(':');\n\t\t\tif (idx === -1) {\n\t\t\t\tres += encoder(userinfo, false, false);\n\t\t\t} else {\n\t\t\t\t// :@\n\t\t\t\tres += encoder(userinfo.substr(0, idx), false, false);\n\t\t\t\tres += ':';\n\t\t\t\tres += encoder(userinfo.substr(idx + 1), false, true);\n\t\t\t}\n\t\t\tres += '@';\n\t\t}\n\t\tauthority = authority.toLowerCase();\n\t\tidx = authority.lastIndexOf(':');\n\t\tif (idx === -1) {\n\t\t\tres += encoder(authority, false, true);\n\t\t} else {\n\t\t\t// :\n\t\t\tres += encoder(authority.substr(0, idx), false, true);\n\t\t\tres += authority.substr(idx);\n\t\t}\n\t}\n\tif (path) {\n\t\t// lower-case windows drive letters in /C:/fff or C:/fff\n\t\tif (path.length >= 3 && path.charCodeAt(0) === CharCode.Slash && path.charCodeAt(2) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(1);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t} else if (path.length >= 2 && path.charCodeAt(1) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(0);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t}\n\t\t// encode the rest of the path\n\t\tres += encoder(path, true, false);\n\t}\n\tif (query) {\n\t\tres += '?';\n\t\tres += encoder(query, false, false);\n\t}\n\tif (fragment) {\n\t\tres += '#';\n\t\tres += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;\n\t}\n\treturn res;\n}\n\n// --- decode\n\nfunction decodeURIComponentGraceful(str: string): string {\n\ttry {\n\t\treturn decodeURIComponent(str);\n\t} catch {\n\t\tif (str.length > 3) {\n\t\t\treturn str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n\t\t} else {\n\t\t\treturn str;\n\t\t}\n\t}\n}\n\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\n\nfunction percentDecode(str: string): string {\n\tif (!str.match(_rEncodedAsHex)) {\n\t\treturn str;\n\t}\n\treturn str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\n}\n\n/**\n * Mapped-type that replaces all occurrences of URI with UriComponents\n */\nexport type UriDto = { [K in keyof T]: T[K] extends URI\n\t? UriComponents\n\t: UriDto };\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n'use strict';\n\nimport { CharCode } from './charCode';\nimport { URI } from './uri';\nimport * as nodePath from 'path';\n\nconst posixPath = nodePath.posix || nodePath;\nconst slash = '/';\n\nexport namespace Utils {\n\n /**\n * Joins one or more input paths to the path of URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved.\n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are preserved.\n * \n * @param uri The input URI.\n * @param paths The paths to be joined with the path of URI.\n * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function joinPath(uri: URI, ...paths: string[]): URI {\n return uri.with({ path: posixPath.join(uri.path, ...paths) });\n }\n\n\n /**\n * Resolves one or more paths against the path of a URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved. \n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are removed.\n * \n * @param uri The input URI.\n * @param paths The paths to resolve against the path of URI.\n * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function resolvePath(uri: URI, ...paths: string[]): URI {\n let path = uri.path; \n let slashAdded = false;\n if (path[0] !== slash) {\n path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used.\n slashAdded = true;\n }\n let resolvedPath = posixPath.resolve(path, ...paths);\n if (slashAdded && resolvedPath[0] === slash && !uri.authority) {\n resolvedPath = resolvedPath.substring(1);\n }\n return uri.with({ path: resolvedPath });\n }\n\n /**\n * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The orignal URI is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The last segment of the URIs path.\n */\n export function dirname(uri: URI): URI {\n if (uri.path.length === 0 || uri.path === slash) {\n return uri;\n }\n let path = posixPath.dirname(uri.path);\n if (path.length === 1 && path.charCodeAt(0) === CharCode.Period) {\n path = '';\n }\n return uri.with({ path });\n }\n\n /**\n * Returns the last segment of the path of a URI, similar to the Unix basename command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The base name of the URIs path.\n */\n export function basename(uri: URI): string {\n return posixPath.basename(uri.path);\n }\n\n /**\n * Returns the extension name of the path of a URI, similar to the Unix extname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The extension name of the URIs path.\n */\n export function extname(uri: URI): string {\n return posixPath.extname(uri.path);\n }\n}", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { URI, Utils } from 'vscode-uri';\n\nexport { URI };\n\nexport namespace UriUtils {\n\n export const basename = Utils.basename;\n export const dirname = Utils.dirname;\n export const extname = Utils.extname;\n export const joinPath = Utils.joinPath;\n export const resolvePath = Utils.resolvePath;\n\n export function equals(a?: URI | string, b?: URI | string): boolean {\n return a?.toString() === b?.toString();\n }\n\n export function relative(from: URI | string, to: URI | string): string {\n const fromPath = typeof from === 'string' ? from : from.path;\n const toPath = typeof to === 'string' ? to : to.path;\n const fromParts = fromPath.split('/').filter(e => e.length > 0);\n const toParts = toPath.split('/').filter(e => e.length > 0);\n let i = 0;\n for (; i < fromParts.length; i++) {\n if (fromParts[i] !== toParts[i]) {\n break;\n }\n }\n const backPart = '../'.repeat(fromParts.length - i);\n const toPart = toParts.slice(i).join('/');\n return backPart + toPart;\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/**\n * Re-export 'TextDocument' from 'vscode-languageserver-textdocument' for convenience,\n * including both type _and_ symbol (namespace), as we here and there also refer to the symbol,\n * the overhead is very small, just a few kilobytes.\n * Everything else of that package (at the time contributing) is also defined\n * in 'vscode-languageserver-protocol' or 'vscode-languageserver-types'.\n */\nexport { TextDocument } from 'vscode-languageserver-textdocument';\n\nimport type { Diagnostic, Range } from 'vscode-languageserver-types';\nimport type { FileSystemProvider } from './file-system-provider.js';\nimport type { ParseResult } from '../parser/langium-parser.js';\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, Mutable, Reference } from '../syntax-tree.js';\nimport type { MultiMap } from '../utils/collections.js';\nimport type { Stream } from '../utils/stream.js';\nimport { TextDocument } from './documents.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { stream } from '../utils/stream.js';\nimport { URI } from '../utils/uri-utils.js';\n\n/**\n * A Langium document holds the parse result (AST and CST) and any additional state that is derived\n * from the AST, e.g. the result of scope precomputation.\n */\nexport interface LangiumDocument {\n /** The Uniform Resource Identifier (URI) of the document */\n readonly uri: URI;\n /** The text document used to convert between offsets and positions */\n readonly textDocument: TextDocument;\n /** The current state of the document */\n state: DocumentState;\n /** The parse result holds the Abstract Syntax Tree (AST) and potentially also parser / lexer errors */\n parseResult: ParseResult;\n /** Result of the scope precomputation phase */\n precomputedScopes?: PrecomputedScopes;\n /** An array of all cross-references found in the AST while linking */\n references: Reference[];\n /** Result of the validation phase */\n diagnostics?: Diagnostic[]\n}\n\n/**\n * A document is subject to several phases that are run in predefined order. Any state value implies that\n * smaller state values are finished as well.\n */\nexport enum DocumentState {\n /**\n * The text content has changed and needs to be parsed again. The AST held by this outdated\n * document instance is no longer valid.\n */\n Changed = 0,\n /**\n * An AST has been created from the text content. The document structure can be traversed,\n * but cross-references cannot be resolved yet. If necessary, the structure can be manipulated\n * at this stage as a preprocessing step.\n */\n Parsed = 1,\n /**\n * The `IndexManager` service has processed AST nodes of this document. This means the\n * exported symbols are available in the global scope and can be resolved from other documents.\n */\n IndexedContent = 2,\n /**\n * The `ScopeComputation` service has processed this document. This means the local symbols\n * are stored in a MultiMap so they can be looked up by the `ScopeProvider` service.\n * Once a document has reached this state, you may follow every reference - it will lazily\n * resolve its `ref` property and yield either the target AST node or `undefined` in case\n * the target is not in scope.\n */\n ComputedScopes = 3,\n /**\n * The `Linker` service has processed this document. All outgoing references have been\n * resolved or marked as erroneous.\n */\n Linked = 4,\n /**\n * The `IndexManager` service has processed AST node references of this document. This is\n * necessary to determine which documents are affected by a change in one of the workspace\n * documents.\n */\n IndexedReferences = 5,\n /**\n * The `DocumentValidator` service has processed this document. The language server listens\n * to the results of this phase and sends diagnostics to the client.\n */\n Validated = 6\n}\n\n/**\n * Result of the scope precomputation phase (`ScopeComputation` service).\n * It maps every AST node to the set of symbols that are visible in the subtree of that node.\n */\nexport type PrecomputedScopes = MultiMap\n\nexport interface DocumentSegment {\n readonly range: Range\n readonly offset: number\n readonly length: number\n readonly end: number\n}\n\n/**\n * Surrogate definition of the `TextDocuments` interface from the `vscode-languageserver` package.\n * No implementation object is expected to be offered by `LangiumCoreServices`, but only by `LangiumLSPServices`.\n */\nexport type TextDocumentProvider = {\n get(uri: string): TextDocument | undefined\n}\n\n/**\n * Shared service for creating `LangiumDocument` instances.\n *\n * Register a custom implementation if special (additional) behavior is required for your language(s).\n * Note: If you specialize {@link fromString} or {@link fromTextDocument} you probably might want to\n * specialize {@link update}, too!\n */\nexport interface LangiumDocumentFactory {\n /**\n * Create a Langium document from a `TextDocument` (usually associated with a file).\n */\n fromTextDocument(textDocument: TextDocument, uri?: URI): LangiumDocument;\n /**\n * Create a Langium document from a `TextDocument` asynchronously. This action can be cancelled if a cancellable parser implementation has been provided.\n */\n fromTextDocument(textDocument: TextDocument, uri: URI | undefined, cancellationToken: CancellationToken): Promise>;\n\n /**\n * Create an Langium document from an in-memory string.\n */\n fromString(text: string, uri: URI): LangiumDocument;\n /**\n * Create a Langium document from an in-memory string asynchronously. This action can be cancelled if a cancellable parser implementation has been provided.\n */\n fromString(text: string, uri: URI, cancellationToken: CancellationToken): Promise>;\n\n /**\n * Create an Langium document from a model that has been constructed in memory.\n */\n fromModel(model: T, uri: URI): LangiumDocument;\n\n /**\n * Create an Langium document from a specified `URI`. The factory will use the `FileSystemAccess` service to read the file.\n */\n fromUri(uri: URI, cancellationToken?: CancellationToken): Promise>;\n\n /**\n * Update the given document after changes in the corresponding textual representation.\n * Method is called by the document builder after it has been requested to build an existing\n * document and the document's state is {@link DocumentState.Changed}.\n * The text parsing is expected to be done the same way as in {@link fromTextDocument}\n * and {@link fromString}.\n */\n update(document: LangiumDocument, cancellationToken: CancellationToken): Promise>\n}\n\nexport class DefaultLangiumDocumentFactory implements LangiumDocumentFactory {\n\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly textDocuments?: TextDocumentProvider;\n protected readonly fileSystemProvider: FileSystemProvider;\n\n constructor(services: LangiumSharedCoreServices) {\n this.serviceRegistry = services.ServiceRegistry;\n this.textDocuments = services.workspace.TextDocuments;\n this.fileSystemProvider = services.workspace.FileSystemProvider;\n }\n\n async fromUri(uri: URI, cancellationToken = CancellationToken.None): Promise> {\n const content = await this.fileSystemProvider.readFile(uri);\n return this.createAsync(uri, content, cancellationToken);\n }\n\n fromTextDocument(textDocument: TextDocument, uri?: URI): LangiumDocument;\n fromTextDocument(textDocument: TextDocument, uri: URI | undefined, cancellationToken: CancellationToken): Promise>;\n fromTextDocument(textDocument: TextDocument, uri?: URI, cancellationToken?: CancellationToken): LangiumDocument | Promise> {\n uri = uri ?? URI.parse(textDocument.uri);\n if (cancellationToken) {\n return this.createAsync(uri, textDocument, cancellationToken);\n } else {\n return this.create(uri, textDocument);\n }\n }\n\n fromString(text: string, uri: URI): LangiumDocument;\n fromString(text: string, uri: URI, cancellationToken: CancellationToken): Promise>;\n fromString(text: string, uri: URI, cancellationToken?: CancellationToken): LangiumDocument | Promise> {\n if (cancellationToken) {\n return this.createAsync(uri, text, cancellationToken);\n } else {\n return this.create(uri, text);\n }\n }\n\n fromModel(model: T, uri: URI): LangiumDocument {\n return this.create(uri, { $model: model });\n }\n\n protected create(uri: URI, content: string | TextDocument | { $model: T }): LangiumDocument {\n if (typeof content === 'string') {\n const parseResult = this.parse(uri, content);\n return this.createLangiumDocument(parseResult, uri, undefined, content);\n\n } else if ('$model' in content) {\n const parseResult = { value: content.$model, parserErrors: [], lexerErrors: [] };\n return this.createLangiumDocument(parseResult, uri);\n\n } else {\n const parseResult = this.parse(uri, content.getText());\n return this.createLangiumDocument(parseResult, uri, content);\n }\n }\n\n protected async createAsync(uri: URI, content: string | TextDocument, cancelToken: CancellationToken): Promise> {\n if (typeof content === 'string') {\n const parseResult = await this.parseAsync(uri, content, cancelToken);\n return this.createLangiumDocument(parseResult, uri, undefined, content);\n } else {\n const parseResult = await this.parseAsync(uri, content.getText(), cancelToken);\n return this.createLangiumDocument(parseResult, uri, content);\n }\n }\n\n /**\n * Create a LangiumDocument from a given parse result.\n *\n * A TextDocument is created on demand if it is not provided as argument here. Usually this\n * should not be necessary because the main purpose of the TextDocument is to convert between\n * text ranges and offsets, which is done solely in LSP request handling.\n *\n * With the introduction of {@link update} below this method is supposed to be mainly called\n * during workspace initialization and on addition/recognition of new files, while changes in\n * existing documents are processed via {@link update}.\n */\n protected createLangiumDocument(parseResult: ParseResult, uri: URI, textDocument?: TextDocument, text?: string): LangiumDocument {\n let document: LangiumDocument;\n if (textDocument) {\n document = {\n parseResult,\n uri,\n state: DocumentState.Parsed,\n references: [],\n textDocument\n };\n } else {\n const textDocumentGetter = this.createTextDocumentGetter(uri, text);\n document = {\n parseResult,\n uri,\n state: DocumentState.Parsed,\n references: [],\n get textDocument() {\n return textDocumentGetter();\n }\n };\n }\n (parseResult.value as Mutable).$document = document;\n return document;\n }\n\n async update(document: Mutable>, cancellationToken: CancellationToken): Promise> {\n // The CST full text property contains the original text that was used to create the AST.\n const oldText = document.parseResult.value.$cstNode?.root.fullText;\n const textDocument = this.textDocuments?.get(document.uri.toString());\n const text = textDocument ? textDocument.getText() : await this.fileSystemProvider.readFile(document.uri);\n\n if (textDocument) {\n Object.defineProperty(\n document,\n 'textDocument',\n {\n value: textDocument\n }\n );\n } else {\n const textDocumentGetter = this.createTextDocumentGetter(document.uri, text);\n Object.defineProperty(\n document,\n 'textDocument',\n {\n get: textDocumentGetter\n }\n );\n }\n\n // Some of these documents can be pretty large, so parsing them again can be quite expensive.\n // Therefore, we only parse if the text has actually changed.\n if (oldText !== text) {\n document.parseResult = await this.parseAsync(document.uri, text, cancellationToken);\n (document.parseResult.value as Mutable).$document = document;\n }\n document.state = DocumentState.Parsed;\n return document;\n }\n\n protected parse(uri: URI, text: string): ParseResult {\n const services = this.serviceRegistry.getServices(uri);\n return services.parser.LangiumParser.parse(text);\n }\n\n protected parseAsync(uri: URI, text: string, cancellationToken: CancellationToken): Promise> {\n const services = this.serviceRegistry.getServices(uri);\n return services.parser.AsyncParser.parse(text, cancellationToken);\n }\n\n protected createTextDocumentGetter(uri: URI, text?: string): () => TextDocument {\n const serviceRegistry = this.serviceRegistry;\n let textDoc: TextDocument | undefined = undefined;\n return () => {\n return textDoc ??= TextDocument.create(\n uri.toString(), serviceRegistry.getServices(uri).LanguageMetaData.languageId, 0, text ?? ''\n );\n };\n }\n}\n\n/**\n * Shared service for managing Langium documents.\n */\nexport interface LangiumDocuments {\n\n /**\n * A stream of all documents managed under this service.\n */\n readonly all: Stream\n\n /**\n * Manage a new document under this service.\n * @throws an error if a document with the same URI is already present.\n */\n addDocument(document: LangiumDocument): void;\n\n /**\n * Retrieve the document with the given URI, if present. Otherwise returns `undefined`.\n */\n getDocument(uri: URI): LangiumDocument | undefined;\n\n /**\n * Retrieve the document with the given URI. If not present, a new one will be created using the file system access.\n * The new document will be added to the list of documents managed under this service.\n */\n getOrCreateDocument(uri: URI, cancellationToken?: CancellationToken): Promise;\n\n /**\n * Creates a new document with the given URI and text content.\n * The new document is automatically added to this service and can be retrieved using {@link getDocument}.\n *\n * @throws an error if a document with the same URI is already present.\n */\n createDocument(uri: URI, text: string): LangiumDocument;\n\n /**\n * Creates a new document with the given URI and text content asynchronously.\n * The process can be interrupted with a cancellation token.\n * The new document is automatically added to this service and can be retrieved using {@link getDocument}.\n *\n * @throws an error if a document with the same URI is already present.\n */\n createDocument(uri: URI, text: string, cancellationToken: CancellationToken): Promise;\n\n /**\n * Returns `true` if a document with the given URI is managed under this service.\n */\n hasDocument(uri: URI): boolean;\n\n /**\n * Flag the document with the given URI as `Changed`, if present, meaning that its content\n * is no longer valid. The content (parseResult) stays untouched, while internal data may\n * be dropped to reduce memory footprint.\n *\n * @returns the affected {@link LangiumDocument} if existing for convenience\n */\n invalidateDocument(uri: URI): LangiumDocument | undefined;\n\n /**\n * Remove the document with the given URI, if present, and mark it as `Changed`, meaning\n * that its content is no longer valid. The next call to `getOrCreateDocument` with the same\n * URI will create a new document instance.\n *\n * @returns the affected {@link LangiumDocument} if existing for convenience\n */\n deleteDocument(uri: URI): LangiumDocument | undefined;\n}\n\nexport class DefaultLangiumDocuments implements LangiumDocuments {\n\n protected readonly langiumDocumentFactory: LangiumDocumentFactory;\n\n protected readonly documentMap: Map = new Map();\n\n constructor(services: LangiumSharedCoreServices) {\n this.langiumDocumentFactory = services.workspace.LangiumDocumentFactory;\n }\n\n get all(): Stream {\n return stream(this.documentMap.values());\n }\n\n addDocument(document: LangiumDocument): void {\n const uriString = document.uri.toString();\n if (this.documentMap.has(uriString)) {\n throw new Error(`A document with the URI '${uriString}' is already present.`);\n }\n this.documentMap.set(uriString, document);\n }\n\n getDocument(uri: URI): LangiumDocument | undefined {\n const uriString = uri.toString();\n return this.documentMap.get(uriString);\n }\n\n async getOrCreateDocument(uri: URI, cancellationToken?: CancellationToken): Promise {\n let document = this.getDocument(uri);\n if (document) {\n return document;\n }\n document = await this.langiumDocumentFactory.fromUri(uri, cancellationToken);\n this.addDocument(document);\n return document;\n }\n\n createDocument(uri: URI, text: string): LangiumDocument;\n createDocument(uri: URI, text: string, cancellationToken: CancellationToken): Promise;\n createDocument(uri: URI, text: string, cancellationToken?: CancellationToken): LangiumDocument | Promise {\n if (cancellationToken) {\n return this.langiumDocumentFactory.fromString(text, uri, cancellationToken).then(document => {\n this.addDocument(document);\n return document;\n });\n } else {\n const document = this.langiumDocumentFactory.fromString(text, uri);\n this.addDocument(document);\n return document;\n }\n }\n\n hasDocument(uri: URI): boolean {\n return this.documentMap.has(uri.toString());\n }\n\n invalidateDocument(uri: URI): LangiumDocument | undefined {\n const uriString = uri.toString();\n const langiumDoc = this.documentMap.get(uriString);\n if (langiumDoc) {\n langiumDoc.state = DocumentState.Changed;\n langiumDoc.precomputedScopes = undefined;\n langiumDoc.references = [];\n langiumDoc.diagnostics = undefined;\n }\n return langiumDoc;\n }\n\n deleteDocument(uri: URI): LangiumDocument | undefined {\n const uriString = uri.toString();\n const langiumDoc = this.documentMap.get(uriString);\n if (langiumDoc) {\n langiumDoc.state = DocumentState.Changed;\n this.documentMap.delete(uriString);\n }\n return langiumDoc;\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, AstReflection, CstNode, LinkingError, Reference, ReferenceInfo } from '../syntax-tree.js';\nimport type { AstNodeLocator } from '../workspace/ast-node-locator.js';\nimport type { LangiumDocument, LangiumDocuments } from '../workspace/documents.js';\nimport type { ScopeProvider } from './scope-provider.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { isAstNode, isAstNodeDescription, isLinkingError } from '../syntax-tree.js';\nimport { getDocument, streamAst, streamReferences } from '../utils/ast-utils.js';\nimport { interruptAndCheck } from '../utils/promise-utils.js';\nimport { DocumentState } from '../workspace/documents.js';\n\n/**\n * Language-specific service for resolving cross-references in the AST.\n */\nexport interface Linker {\n\n /**\n * Links all cross-references within the specified document. The default implementation loads only target\n * elements from documents that are present in the `LangiumDocuments` service. The linked references are\n * stored in the document's `references` property.\n *\n * @param document A LangiumDocument that shall be linked.\n * @param cancelToken A token for cancelling the operation.\n */\n link(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n /**\n * Unlinks all references within the specified document and removes them from the list of `references`.\n *\n * @param document A LangiumDocument that shall be unlinked.\n */\n unlink(document: LangiumDocument): void;\n\n /**\n * Determines a candidate AST node description for linking the given reference.\n *\n * @param node The AST node containing the reference.\n * @param refId The reference identifier used to build a scope.\n * @param reference The actual reference to resolve.\n */\n getCandidate(refInfo: ReferenceInfo): AstNodeDescription | LinkingError;\n\n /**\n * Creates a cross reference node being aware of its containing AstNode, the corresponding CstNode,\n * the cross reference text denoting the target AstNode being already extracted of the document text,\n * as well as the unique cross reference identifier.\n *\n * Default behavior:\n * - The returned Reference's 'ref' property pointing to the target AstNode is populated lazily on its\n * first visit.\n * - If the target AstNode cannot be resolved on the first visit, an error indicator will be installed\n * and further resolution attempts will *not* be performed.\n *\n * @param node The containing AST node\n * @param refNode The corresponding CST node\n * @param refId The cross reference identifier like ':'\n * @param refText The cross reference text denoting the target AstNode\n * @returns the desired Reference node, whose behavior wrt. resolving the cross reference is implementation specific.\n */\n buildReference(node: AstNode, property: string, refNode: CstNode | undefined, refText: string): Reference;\n\n}\n\ninterface DefaultReference extends Reference {\n _ref?: AstNode | LinkingError;\n _nodeDescription?: AstNodeDescription;\n}\n\nexport class DefaultLinker implements Linker {\n protected readonly reflection: AstReflection;\n protected readonly scopeProvider: ScopeProvider;\n protected readonly astNodeLocator: AstNodeLocator;\n protected readonly langiumDocuments: () => LangiumDocuments;\n\n constructor(services: LangiumCoreServices) {\n this.reflection = services.shared.AstReflection;\n this.langiumDocuments = () => services.shared.workspace.LangiumDocuments;\n this.scopeProvider = services.references.ScopeProvider;\n this.astNodeLocator = services.workspace.AstNodeLocator;\n }\n\n async link(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n for (const node of streamAst(document.parseResult.value)) {\n await interruptAndCheck(cancelToken);\n streamReferences(node).forEach(ref => this.doLink(ref, document));\n }\n }\n\n protected doLink(refInfo: ReferenceInfo, document: LangiumDocument): void {\n const ref = refInfo.reference as DefaultReference;\n // The reference may already have been resolved lazily by accessing its `ref` property.\n if (ref._ref === undefined) {\n try {\n const description = this.getCandidate(refInfo);\n if (isLinkingError(description)) {\n ref._ref = description;\n } else {\n ref._nodeDescription = description;\n if (this.langiumDocuments().hasDocument(description.documentUri)) {\n // The target document is already loaded\n const linkedNode = this.loadAstNode(description);\n ref._ref = linkedNode ?? this.createLinkingError(refInfo, description);\n }\n }\n } catch (err) {\n ref._ref = {\n ...refInfo,\n message: `An error occurred while resolving reference to '${ref.$refText}': ${err}`\n };\n }\n }\n // Add the reference to the document's array of references\n document.references.push(ref);\n }\n\n unlink(document: LangiumDocument): void {\n for (const ref of document.references) {\n delete (ref as DefaultReference)._ref;\n delete (ref as DefaultReference)._nodeDescription;\n }\n document.references = [];\n }\n\n getCandidate(refInfo: ReferenceInfo): AstNodeDescription | LinkingError {\n const scope = this.scopeProvider.getScope(refInfo);\n const description = scope.getElement(refInfo.reference.$refText);\n return description ?? this.createLinkingError(refInfo);\n }\n\n buildReference(node: AstNode, property: string, refNode: CstNode | undefined, refText: string): Reference {\n // See behavior description in doc of Linker, update that on changes in here.\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const linker = this;\n const reference: DefaultReference = {\n $refNode: refNode,\n $refText: refText,\n\n get ref() {\n if (isAstNode(this._ref)) {\n // Most frequent case: the target is already resolved.\n return this._ref;\n } else if (isAstNodeDescription(this._nodeDescription)) {\n // A candidate has been found before, but it is not loaded yet.\n const linkedNode = linker.loadAstNode(this._nodeDescription);\n this._ref = linkedNode ??\n linker.createLinkingError({ reference, container: node, property }, this._nodeDescription);\n } else if (this._ref === undefined) {\n // The reference has not been linked yet, so do that now.\n const refData = linker.getLinkedNode({ reference, container: node, property });\n if (refData.error && getDocument(node).state < DocumentState.ComputedScopes) {\n // Document scope is not ready, don't set `this._ref` so linker can retry later.\n return undefined;\n }\n this._ref = refData.node ?? refData.error;\n this._nodeDescription = refData.descr;\n }\n return isAstNode(this._ref) ? this._ref : undefined;\n },\n get $nodeDescription() {\n return this._nodeDescription;\n },\n get error() {\n return isLinkingError(this._ref) ? this._ref : undefined;\n }\n };\n return reference;\n }\n\n protected getLinkedNode(refInfo: ReferenceInfo): { node?: AstNode, descr?: AstNodeDescription, error?: LinkingError } {\n try {\n const description = this.getCandidate(refInfo);\n if (isLinkingError(description)) {\n return { error: description };\n }\n const linkedNode = this.loadAstNode(description);\n if (linkedNode) {\n return { node: linkedNode, descr: description };\n }\n else {\n return {\n descr: description,\n error:\n this.createLinkingError(refInfo, description)\n };\n }\n } catch (err) {\n return {\n error: {\n ...refInfo,\n message: `An error occurred while resolving reference to '${refInfo.reference.$refText}': ${err}`\n }\n };\n }\n }\n\n protected loadAstNode(nodeDescription: AstNodeDescription): AstNode | undefined {\n if (nodeDescription.node) {\n return nodeDescription.node;\n }\n const doc = this.langiumDocuments().getDocument(nodeDescription.documentUri);\n if (!doc) {\n return undefined;\n }\n return this.astNodeLocator.getAstNode(doc.parseResult.value, nodeDescription.path);\n }\n\n protected createLinkingError(refInfo: ReferenceInfo, targetDescription?: AstNodeDescription): LinkingError {\n // Check whether the document is sufficiently processed by the DocumentBuilder. If not, this is a hint for a bug\n // in the language implementation.\n const document = getDocument(refInfo.container);\n if (document.state < DocumentState.ComputedScopes) {\n console.warn(`Attempted reference resolution before document reached ComputedScopes state (${document.uri}).`);\n }\n const referenceType = this.reflection.getReferenceType(refInfo);\n return {\n ...refInfo,\n message: `Could not resolve reference to ${referenceType} named '${refInfo.reference.$refText}'.`,\n targetDescription\n };\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { AstNode, CstNode } from '../syntax-tree.js';\nimport { findNodeForProperty } from '../utils/grammar-utils.js';\n\nexport interface NamedAstNode extends AstNode {\n name: string;\n}\n\nexport function isNamed(node: AstNode): node is NamedAstNode {\n return typeof (node as NamedAstNode).name === 'string';\n}\n\n/**\n * Utility service for retrieving the `name` of an `AstNode` or the `CstNode` containing a `name`.\n */\nexport interface NameProvider {\n /**\n * Returns the `name` of a given AstNode.\n * @param node Specified `AstNode` whose name node shall be retrieved.\n */\n getName(node: AstNode): string | undefined;\n /**\n * Returns the `CstNode` which contains the parsed value of the `name` assignment.\n * @param node Specified `AstNode` whose name node shall be retrieved.\n */\n getNameNode(node: AstNode): CstNode | undefined;\n}\n\nexport class DefaultNameProvider implements NameProvider {\n getName(node: AstNode): string | undefined {\n if (isNamed(node)) {\n return node.name;\n }\n return undefined;\n }\n\n getNameNode(node: AstNode): CstNode | undefined {\n return findNodeForProperty(node.$cstNode, 'name');\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, CstNode, GenericAstNode } from '../syntax-tree.js';\nimport type { Stream } from '../utils/stream.js';\nimport type { ReferenceDescription } from '../workspace/ast-descriptions.js';\nimport type { AstNodeLocator } from '../workspace/ast-node-locator.js';\nimport type { IndexManager } from '../workspace/index-manager.js';\nimport type { NameProvider } from './name-provider.js';\nimport type { URI } from '../utils/uri-utils.js';\nimport { findAssignment } from '../utils/grammar-utils.js';\nimport { isReference } from '../syntax-tree.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { isChildNode, toDocumentSegment } from '../utils/cst-utils.js';\nimport { stream } from '../utils/stream.js';\nimport { UriUtils } from '../utils/uri-utils.js';\n\n/**\n * Language-specific service for finding references and declaration of a given `CstNode`.\n */\nexport interface References {\n\n /**\n * If the CstNode is a reference node the target CstNode will be returned.\n * If the CstNode is a significant node of the CstNode this CstNode will be returned.\n *\n * @param sourceCstNode CstNode that points to a AstNode\n */\n findDeclaration(sourceCstNode: CstNode): AstNode | undefined;\n\n /**\n * If the CstNode is a reference node the target CstNode will be returned.\n * If the CstNode is a significant node of the CstNode this CstNode will be returned.\n *\n * @param sourceCstNode CstNode that points to a AstNode\n */\n findDeclarationNode(sourceCstNode: CstNode): CstNode | undefined;\n\n /**\n * Finds all references to the target node as references (local references) or reference descriptions.\n *\n * @param targetNode Specified target node whose references should be returned\n */\n findReferences(targetNode: AstNode, options: FindReferencesOptions): Stream;\n}\n\nexport interface FindReferencesOptions {\n /**\n * @deprecated Since v1.2.0. Please use `documentUri` instead.\n */\n onlyLocal?: boolean;\n /**\n * When set, the `findReferences` method will only return references/declarations from the specified document.\n */\n documentUri?: URI;\n /**\n * Whether the returned list of references should include the declaration.\n */\n includeDeclaration?: boolean;\n}\n\nexport class DefaultReferences implements References {\n protected readonly nameProvider: NameProvider;\n protected readonly index: IndexManager;\n protected readonly nodeLocator: AstNodeLocator;\n\n constructor(services: LangiumCoreServices) {\n this.nameProvider = services.references.NameProvider;\n this.index = services.shared.workspace.IndexManager;\n this.nodeLocator = services.workspace.AstNodeLocator;\n }\n\n findDeclaration(sourceCstNode: CstNode): AstNode | undefined {\n if (sourceCstNode) {\n const assignment = findAssignment(sourceCstNode);\n const nodeElem = sourceCstNode.astNode;\n if (assignment && nodeElem) {\n const reference = (nodeElem as GenericAstNode)[assignment.feature];\n\n if (isReference(reference)) {\n return reference.ref;\n } else if (Array.isArray(reference)) {\n for (const ref of reference) {\n if (isReference(ref) && ref.$refNode\n && ref.$refNode.offset <= sourceCstNode.offset\n && ref.$refNode.end >= sourceCstNode.end) {\n return ref.ref;\n }\n }\n }\n }\n if (nodeElem) {\n const nameNode = this.nameProvider.getNameNode(nodeElem);\n // Only return the targeted node in case the targeted cst node is the name node or part of it\n if (nameNode && (nameNode === sourceCstNode || isChildNode(sourceCstNode, nameNode))) {\n return nodeElem;\n }\n }\n }\n return undefined;\n }\n\n findDeclarationNode(sourceCstNode: CstNode): CstNode | undefined {\n const astNode = this.findDeclaration(sourceCstNode);\n if (astNode?.$cstNode) {\n const targetNode = this.nameProvider.getNameNode(astNode);\n return targetNode ?? astNode.$cstNode;\n }\n return undefined;\n }\n\n findReferences(targetNode: AstNode, options: FindReferencesOptions): Stream {\n const refs: ReferenceDescription[] = [];\n if (options.includeDeclaration) {\n const ref = this.getReferenceToSelf(targetNode);\n if (ref) {\n refs.push(ref);\n }\n }\n let indexReferences = this.index.findAllReferences(targetNode, this.nodeLocator.getAstNodePath(targetNode));\n if (options.documentUri) {\n indexReferences = indexReferences.filter(ref => UriUtils.equals(ref.sourceUri, options.documentUri));\n }\n refs.push(...indexReferences);\n return stream(refs);\n }\n\n protected getReferenceToSelf(targetNode: AstNode): ReferenceDescription | undefined {\n const nameNode = this.nameProvider.getNameNode(targetNode);\n if (nameNode) {\n const doc = getDocument(targetNode);\n const path = this.nodeLocator.getAstNodePath(targetNode);\n return {\n sourceUri: doc.uri,\n sourcePath: path,\n targetUri: doc.uri,\n targetPath: path,\n segment: toDocumentSegment(nameNode),\n local: true\n };\n }\n return undefined;\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { Stream } from './stream.js';\nimport { Reduction, stream } from './stream.js';\n\n/**\n * A multimap is a variation of a Map that has potentially multiple values for every key.\n */\nexport class MultiMap {\n\n private map = new Map();\n\n constructor()\n constructor(elements: Array<[K, V]>)\n constructor(elements?: Array<[K, V]>) {\n if (elements) {\n for (const [key, value] of elements) {\n this.add(key, value);\n }\n }\n }\n\n /**\n * The total number of values in the multimap.\n */\n get size(): number {\n return Reduction.sum(stream(this.map.values()).map(a => a.length));\n }\n\n /**\n * Clear all entries in the multimap.\n */\n clear(): void {\n this.map.clear();\n }\n\n /**\n * Operates differently depending on whether a `value` is given:\n * * With a value, this method deletes the specific key / value pair from the multimap.\n * * Without a value, all values associated with the given key are deleted.\n *\n * @returns `true` if a value existed and has been removed, or `false` if the specified\n * key / value does not exist.\n */\n delete(key: K, value?: V): boolean {\n if (value === undefined) {\n return this.map.delete(key);\n } else {\n const values = this.map.get(key);\n if (values) {\n const index = values.indexOf(value);\n if (index >= 0) {\n if (values.length === 1) {\n this.map.delete(key);\n } else {\n values.splice(index, 1);\n }\n return true;\n }\n }\n return false;\n }\n }\n\n /**\n * Returns an array of all values associated with the given key. If no value exists,\n * an empty array is returned.\n *\n * _Note:_ The returned array is assumed not to be modified. Use the `set` method to add a\n * value and `delete` to remove a value from the multimap.\n */\n get(key: K): readonly V[] {\n return this.map.get(key) ?? [];\n }\n\n /**\n * Operates differently depending on whether a `value` is given:\n * * With a value, this method returns `true` if the specific key / value pair is present in the multimap.\n * * Without a value, this method returns `true` if the given key is present in the multimap.\n */\n has(key: K, value?: V): boolean {\n if (value === undefined) {\n return this.map.has(key);\n } else {\n const values = this.map.get(key);\n if (values) {\n return values.indexOf(value) >= 0;\n }\n return false;\n }\n }\n\n /**\n * Add the given key / value pair to the multimap.\n */\n add(key: K, value: V): this {\n if (this.map.has(key)) {\n this.map.get(key)!.push(value);\n } else {\n this.map.set(key, [value]);\n }\n return this;\n }\n\n /**\n * Add the given set of key / value pairs to the multimap.\n */\n addAll(key: K, values: Iterable): this {\n if (this.map.has(key)) {\n this.map.get(key)!.push(...values);\n } else {\n this.map.set(key, Array.from(values));\n }\n return this;\n }\n\n /**\n * Invokes the given callback function for every key / value pair in the multimap.\n */\n forEach(callbackfn: (value: V, key: K, map: this) => void): void {\n this.map.forEach((array, key) =>\n array.forEach(value => callbackfn(value, key, this))\n );\n }\n\n /**\n * Returns an iterator of key, value pairs for every entry in the map.\n */\n [Symbol.iterator](): Iterator<[K, V]> {\n return this.entries().iterator();\n }\n\n /**\n * Returns a stream of key, value pairs for every entry in the map.\n */\n entries(): Stream<[K, V]> {\n return stream(this.map.entries())\n .flatMap(([key, array]) => array.map(value => [key, value] as [K, V]));\n }\n\n /**\n * Returns a stream of keys in the map.\n */\n keys(): Stream {\n return stream(this.map.keys());\n }\n\n /**\n * Returns a stream of values in the map.\n */\n values(): Stream {\n return stream(this.map.values()).flat();\n }\n\n /**\n * Returns a stream of key, value set pairs for every key in the map.\n */\n entriesGroupedByKey(): Stream<[K, V[]]> {\n return stream(this.map.entries());\n }\n\n}\n\nexport class BiMap {\n\n private map = new Map();\n private inverse = new Map();\n\n get size(): number {\n return this.map.size;\n }\n\n constructor()\n constructor(elements: Array<[K, V]>)\n constructor(elements?: Array<[K, V]>) {\n if (elements) {\n for (const [key, value] of elements) {\n this.set(key, value);\n }\n }\n }\n\n clear(): void {\n this.map.clear();\n this.inverse.clear();\n }\n\n set(key: K, value: V): this {\n this.map.set(key, value);\n this.inverse.set(value, key);\n return this;\n }\n\n get(key: K): V | undefined {\n return this.map.get(key);\n }\n\n getKey(value: V): K | undefined {\n return this.inverse.get(value);\n }\n\n delete(key: K): boolean {\n const value = this.map.get(key);\n if (value !== undefined) {\n this.map.delete(key);\n this.inverse.delete(value);\n return true;\n }\n return false;\n }\n}\n", "/******************************************************************************\n * Copyright 2021-2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription } from '../syntax-tree.js';\nimport type { AstNodeDescriptionProvider } from '../workspace/ast-descriptions.js';\nimport type { LangiumDocument, PrecomputedScopes } from '../workspace/documents.js';\nimport type { NameProvider } from './name-provider.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { streamAllContents, streamContents } from '../utils/ast-utils.js';\nimport { MultiMap } from '../utils/collections.js';\nimport { interruptAndCheck } from '../utils/promise-utils.js';\n\n/**\n * Language-specific service for precomputing global and local scopes. The service methods are executed\n * as the first and second phase in the `DocumentBuilder`.\n */\nexport interface ScopeComputation {\n\n /**\n * Creates descriptions of all AST nodes that shall be exported into the _global_ scope from the given\n * document. These descriptions are gathered by the `IndexManager` and stored in the global index so\n * they can be referenced from other documents.\n *\n * _Note:_ You should not resolve any cross-references in this service method. Cross-reference resolution\n * depends on the scope computation phase to be completed (`computeScope` method), which runs after the\n * initial indexing where this method is used.\n *\n * @param document The document from which to gather exported AST nodes.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n computeExports(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n /**\n * Precomputes the _local_ scopes for a document, which are necessary for the default way of\n * resolving references to symbols in the same document. The result is a multimap assigning a\n * set of AST node descriptions to every level of the AST. These data are used by the `ScopeProvider`\n * service to determine which target nodes are visible in the context of a specific cross-reference.\n *\n * _Note:_ You should not resolve any cross-references in this service method. Cross-reference\n * resolution depends on the scope computation phase to be completed.\n *\n * @param document The document in which to compute scopes.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n computeLocalScopes(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n}\n\n/**\n * The default scope computation creates and collectes descriptions of the AST nodes to be exported into the\n * _global_ scope from the given document. By default those are the document's root AST node and its directly\n * contained child nodes.\n *\n * Besides, it gathers all AST nodes that have a name (according to the `NameProvider` service) and includes them\n * in the local scope of their particular container nodes. As a result, for every cross-reference in the AST,\n * target elements from the same level (siblings) and further up towards the root (parents and siblings of parents)\n * are visible. Elements being nested inside lower levels (children, children of siblings and parents' siblings)\n * are _invisible_ by default, but that can be changed by customizing this service.\n */\nexport class DefaultScopeComputation implements ScopeComputation {\n\n protected readonly nameProvider: NameProvider;\n protected readonly descriptions: AstNodeDescriptionProvider;\n\n constructor(services: LangiumCoreServices) {\n this.nameProvider = services.references.NameProvider;\n this.descriptions = services.workspace.AstNodeDescriptionProvider;\n }\n\n async computeExports(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n return this.computeExportsForNode(document.parseResult.value, document, undefined, cancelToken);\n }\n\n /**\n * Creates {@link AstNodeDescription AstNodeDescriptions} for the given {@link AstNode parentNode} and its children.\n * The list of children to be considered is determined by the function parameter {@link children}.\n * By default only the direct children of {@link parentNode} are visited, nested nodes are not exported.\n *\n * @param parentNode AST node to be exported, i.e., of which an {@link AstNodeDescription} shall be added to the returned list.\n * @param document The document containing the AST node to be exported.\n * @param children A function called with {@link parentNode} as single argument and returning an {@link Iterable} supplying the children to be visited, which must be directly or transitively contained in {@link parentNode}.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution.\n * @returns A list of {@link AstNodeDescription AstNodeDescriptions} to be published to index.\n */\n async computeExportsForNode(parentNode: AstNode, document: LangiumDocument, children: (root: AstNode) => Iterable = streamContents, cancelToken: CancellationToken = CancellationToken.None): Promise {\n const exports: AstNodeDescription[] = [];\n\n this.exportNode(parentNode, exports, document);\n for (const node of children(parentNode)) {\n await interruptAndCheck(cancelToken);\n this.exportNode(node, exports, document);\n }\n return exports;\n }\n\n /**\n * Add a single node to the list of exports if it has a name. Override this method to change how\n * symbols are exported, e.g. by modifying their exported name.\n */\n protected exportNode(node: AstNode, exports: AstNodeDescription[], document: LangiumDocument): void {\n const name = this.nameProvider.getName(node);\n if (name) {\n exports.push(this.descriptions.createDescription(node, name, document));\n }\n }\n\n async computeLocalScopes(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n const rootNode = document.parseResult.value;\n const scopes = new MultiMap();\n // Here we navigate the full AST - local scopes shall be available in the whole document\n for (const node of streamAllContents(rootNode)) {\n await interruptAndCheck(cancelToken);\n this.processNode(node, document, scopes);\n }\n return scopes;\n }\n\n /**\n * Process a single node during scopes computation. The default implementation makes the node visible\n * in the subtree of its container (if the node has a name). Override this method to change this,\n * e.g. by increasing the visibility to a higher level in the AST.\n */\n protected processNode(node: AstNode, document: LangiumDocument, scopes: PrecomputedScopes): void {\n const container = node.$container;\n if (container) {\n const name = this.nameProvider.getName(node);\n if (name) {\n scopes.add(container, this.descriptions.createDescription(node, name, document));\n }\n }\n }\n\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { AstNodeDescription } from '../syntax-tree.js';\nimport type { Stream } from '../utils/stream.js';\nimport { EMPTY_STREAM, stream } from '../utils/stream.js';\n\n/**\n * A scope describes what target elements are visible from a specific cross-reference context.\n */\nexport interface Scope {\n\n /**\n * Find a target element matching the given name. If no element is found, `undefined` is returned.\n * If multiple matching elements are present, the selection of the returned element should be done\n * according to the semantics of your language. Usually it is the element that is most closely defined.\n *\n * @param name Name of the cross-reference target as it appears in the source text.\n */\n getElement(name: string): AstNodeDescription | undefined;\n\n /**\n * Create a stream of all elements in the scope. This is used to compute completion proposals to be\n * shown in the editor.\n */\n getAllElements(): Stream;\n\n}\n\nexport interface ScopeOptions {\n caseInsensitive?: boolean;\n}\n\n/**\n * The default scope implementation is based on a `Stream`. It has an optional _outer scope_ describing\n * the next level of elements, which are queried when a target element is not found in the stream provided\n * to this scope.\n */\nexport class StreamScope implements Scope {\n readonly elements: Stream;\n readonly outerScope?: Scope;\n readonly caseInsensitive: boolean;\n\n constructor(elements: Stream, outerScope?: Scope, options?: ScopeOptions) {\n this.elements = elements;\n this.outerScope = outerScope;\n this.caseInsensitive = options?.caseInsensitive ?? false;\n }\n\n getAllElements(): Stream {\n if (this.outerScope) {\n return this.elements.concat(this.outerScope.getAllElements());\n } else {\n return this.elements;\n }\n }\n\n getElement(name: string): AstNodeDescription | undefined {\n const local = this.caseInsensitive\n ? this.elements.find(e => e.name.toLowerCase() === name.toLowerCase())\n : this.elements.find(e => e.name === name);\n if (local) {\n return local;\n }\n if (this.outerScope) {\n return this.outerScope.getElement(name);\n }\n return undefined;\n }\n}\n\nexport class MapScope implements Scope {\n readonly elements: Map;\n readonly outerScope?: Scope;\n readonly caseInsensitive: boolean;\n\n constructor(elements: Iterable, outerScope?: Scope, options?: ScopeOptions) {\n this.elements = new Map();\n this.caseInsensitive = options?.caseInsensitive ?? false;\n for (const element of elements) {\n const name = this.caseInsensitive\n ? element.name.toLowerCase()\n : element.name;\n this.elements.set(name, element);\n }\n this.outerScope = outerScope;\n }\n\n getElement(name: string): AstNodeDescription | undefined {\n const localName = this.caseInsensitive ? name.toLowerCase() : name;\n const local = this.elements.get(localName);\n if (local) {\n return local;\n }\n if (this.outerScope) {\n return this.outerScope.getElement(name);\n }\n return undefined;\n }\n\n getAllElements(): Stream {\n let elementStream = stream(this.elements.values());\n if (this.outerScope) {\n elementStream = elementStream.concat(this.outerScope.getAllElements());\n }\n return elementStream;\n }\n\n}\n\nexport const EMPTY_SCOPE: Scope = {\n getElement(): undefined {\n return undefined;\n },\n getAllElements(): Stream {\n return EMPTY_STREAM;\n }\n};\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { Disposable } from './disposable.js';\nimport type { URI } from './uri-utils.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\n\nexport abstract class DisposableCache implements Disposable {\n\n protected toDispose: Disposable[] = [];\n protected isDisposed = false;\n\n onDispose(disposable: Disposable): void {\n this.toDispose.push(disposable);\n }\n\n dispose(): void {\n this.throwIfDisposed();\n this.clear();\n this.isDisposed = true;\n this.toDispose.forEach(disposable => disposable.dispose());\n }\n\n protected throwIfDisposed(): void {\n if (this.isDisposed) {\n throw new Error('This cache has already been disposed');\n }\n }\n\n abstract clear(): void;\n}\n\nexport class SimpleCache extends DisposableCache {\n protected readonly cache = new Map();\n\n has(key: K): boolean {\n this.throwIfDisposed();\n return this.cache.has(key);\n }\n\n set(key: K, value: V): void {\n this.throwIfDisposed();\n this.cache.set(key, value);\n }\n\n get(key: K): V | undefined;\n get(key: K, provider: () => V): V;\n get(key: K, provider?: () => V): V | undefined {\n this.throwIfDisposed();\n if (this.cache.has(key)) {\n return this.cache.get(key);\n } else if (provider) {\n const value = provider();\n this.cache.set(key, value);\n return value;\n } else {\n return undefined;\n }\n }\n\n delete(key: K): boolean {\n this.throwIfDisposed();\n return this.cache.delete(key);\n }\n\n clear(): void {\n this.throwIfDisposed();\n this.cache.clear();\n }\n}\n\nexport class ContextCache extends DisposableCache {\n\n private readonly cache = new Map>();\n private readonly converter: (input: Context) => ContextKey | Context;\n\n constructor(converter?: (input: Context) => ContextKey) {\n super();\n this.converter = converter ?? (value => value);\n }\n\n has(contextKey: Context, key: Key): boolean {\n this.throwIfDisposed();\n return this.cacheForContext(contextKey).has(key);\n }\n\n set(contextKey: Context, key: Key, value: Value): void {\n this.throwIfDisposed();\n this.cacheForContext(contextKey).set(key, value);\n }\n\n get(contextKey: Context, key: Key): Value | undefined;\n get(contextKey: Context, key: Key, provider: () => Value): Value;\n get(contextKey: Context, key: Key, provider?: () => Value): Value | undefined {\n this.throwIfDisposed();\n const contextCache = this.cacheForContext(contextKey);\n if (contextCache.has(key)) {\n return contextCache.get(key);\n } else if (provider) {\n const value = provider();\n contextCache.set(key, value);\n return value;\n } else {\n return undefined;\n }\n }\n\n delete(contextKey: Context, key: Key): boolean {\n this.throwIfDisposed();\n return this.cacheForContext(contextKey).delete(key);\n }\n\n clear(): void;\n clear(contextKey: Context): void;\n clear(contextKey?: Context): void {\n this.throwIfDisposed();\n if (contextKey) {\n const mapKey = this.converter(contextKey);\n this.cache.delete(mapKey);\n } else {\n this.cache.clear();\n }\n }\n\n protected cacheForContext(contextKey: Context): Map {\n const mapKey = this.converter(contextKey);\n let documentCache = this.cache.get(mapKey);\n if (!documentCache) {\n documentCache = new Map();\n this.cache.set(mapKey, documentCache);\n }\n return documentCache;\n }\n}\n\n/**\n * Every key/value pair in this cache is scoped to a document.\n * If this document is changed or deleted, all associated key/value pairs are deleted.\n */\nexport class DocumentCache extends ContextCache {\n constructor(sharedServices: LangiumSharedCoreServices) {\n super(uri => uri.toString());\n this.onDispose(sharedServices.workspace.DocumentBuilder.onUpdate((changed, deleted) => {\n const allUris = changed.concat(deleted);\n for (const uri of allUris) {\n this.clear(uri);\n }\n }));\n }\n}\n\n/**\n * Every key/value pair in this cache is scoped to the whole workspace.\n * If any document in the workspace changes, the whole cache is evicted.\n */\nexport class WorkspaceCache extends SimpleCache {\n constructor(sharedServices: LangiumSharedCoreServices) {\n super();\n this.onDispose(sharedServices.workspace.DocumentBuilder.onUpdate(() => {\n this.clear();\n }));\n }\n}\n", "/******************************************************************************\n * Copyright 2021-2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, AstReflection, ReferenceInfo } from '../syntax-tree.js';\nimport type { Stream } from '../utils/stream.js';\nimport type { AstNodeDescriptionProvider } from '../workspace/ast-descriptions.js';\nimport type { IndexManager } from '../workspace/index-manager.js';\nimport type { NameProvider } from './name-provider.js';\nimport type { Scope, ScopeOptions} from './scope.js';\nimport { MapScope, StreamScope } from './scope.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { stream } from '../utils/stream.js';\nimport { WorkspaceCache } from '../utils/caching.js';\n\n/**\n * Language-specific service for determining the scope of target elements visible in a specific cross-reference context.\n */\nexport interface ScopeProvider {\n\n /**\n * Return a scope describing what elements are visible for the given AST node and cross-reference\n * identifier.\n *\n * @param context Information about the reference for which a scope is requested.\n */\n getScope(context: ReferenceInfo): Scope;\n\n}\n\nexport class DefaultScopeProvider implements ScopeProvider {\n\n protected readonly reflection: AstReflection;\n protected readonly nameProvider: NameProvider;\n protected readonly descriptions: AstNodeDescriptionProvider;\n protected readonly indexManager: IndexManager;\n\n protected readonly globalScopeCache: WorkspaceCache;\n\n constructor(services: LangiumCoreServices) {\n this.reflection = services.shared.AstReflection;\n this.nameProvider = services.references.NameProvider;\n this.descriptions = services.workspace.AstNodeDescriptionProvider;\n this.indexManager = services.shared.workspace.IndexManager;\n this.globalScopeCache = new WorkspaceCache(services.shared);\n }\n\n getScope(context: ReferenceInfo): Scope {\n const scopes: Array> = [];\n const referenceType = this.reflection.getReferenceType(context);\n\n const precomputed = getDocument(context.container).precomputedScopes;\n if (precomputed) {\n let currentNode: AstNode | undefined = context.container;\n do {\n const allDescriptions = precomputed.get(currentNode);\n if (allDescriptions.length > 0) {\n scopes.push(stream(allDescriptions).filter(\n desc => this.reflection.isSubtype(desc.type, referenceType)));\n }\n currentNode = currentNode.$container;\n } while (currentNode);\n }\n\n let result: Scope = this.getGlobalScope(referenceType, context);\n for (let i = scopes.length - 1; i >= 0; i--) {\n result = this.createScope(scopes[i], result);\n }\n return result;\n }\n\n /**\n * Create a scope for the given collection of AST node descriptions.\n */\n protected createScope(elements: Iterable, outerScope?: Scope, options?: ScopeOptions): Scope {\n return new StreamScope(stream(elements), outerScope, options);\n }\n\n /**\n * Create a scope for the given collection of AST nodes, which need to be transformed into respective\n * descriptions first. This is done using the `NameProvider` and `AstNodeDescriptionProvider` services.\n */\n protected createScopeForNodes(elements: Iterable, outerScope?: Scope, options?: ScopeOptions): Scope {\n const s = stream(elements).map(e => {\n const name = this.nameProvider.getName(e);\n if (name) {\n return this.descriptions.createDescription(e, name);\n }\n return undefined;\n }).nonNullable();\n return new StreamScope(s, outerScope, options);\n }\n\n /**\n * Create a global scope filtered for the given reference type.\n */\n protected getGlobalScope(referenceType: string, _context: ReferenceInfo): Scope {\n return this.globalScopeCache.get(referenceType, () => new MapScope(this.indexManager.allElements(referenceType)));\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { URI } from 'vscode-uri';\nimport type { CommentProvider } from '../documentation/comment-provider.js';\nimport type { NameProvider } from '../references/name-provider.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, CstNode, GenericAstNode, Mutable, Reference } from '../syntax-tree.js';\nimport { isAstNode, isReference } from '../syntax-tree.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { findNodesForProperty } from '../utils/grammar-utils.js';\nimport type { AstNodeLocator } from '../workspace/ast-node-locator.js';\nimport type { DocumentSegment, LangiumDocument, LangiumDocuments } from '../workspace/documents.js';\n\nexport interface JsonSerializeOptions {\n /** The space parameter for `JSON.stringify`, controlling whether and how to pretty-print the output. */\n space?: string | number;\n /** Whether to include the `$refText` property for references (the name used to identify the target node). */\n refText?: boolean;\n /** Whether to include the `$sourceText` property, which holds the full source text from which an AST node was parsed. */\n sourceText?: boolean;\n /** Whether to include the `$textRegion` property, which holds information to trace AST node properties to their respective source text regions. */\n textRegions?: boolean;\n /** Whether to include the `$comment` property, which holds comments according to the CommentProvider service. */\n comments?: boolean;\n /** The replacer parameter for `JSON.stringify`; the default replacer given as parameter should be used to apply basic replacements. */\n replacer?: (key: string, value: unknown, defaultReplacer: (key: string, value: unknown) => unknown) => unknown\n /** Used to convert and serialize URIs when the target of a cross-reference is in a different document. */\n uriConverter?: (uri: URI, reference: Reference) => string\n}\n\nexport interface JsonDeserializeOptions {\n /** Used to parse and convert URIs when the target of a cross-reference is in a different document. */\n uriConverter?: (uri: string) => URI\n}\n\n/**\n * {@link AstNode}s that may carry information on their definition area within the DSL text.\n */\nexport interface AstNodeWithTextRegion extends AstNode {\n $sourceText?: string;\n $textRegion?: AstNodeRegionWithAssignments;\n}\n\n/**\n * {@link AstNode}s that may carry a semantically relevant comment.\n */\nexport interface AstNodeWithComment extends AstNode {\n $comment?: string;\n}\n\nexport function isAstNodeWithComment(node: AstNode): node is AstNodeWithComment {\n return typeof (node as AstNodeWithComment).$comment === 'string';\n}\n\n/**\n * A {@DocumentSegment} representing the definition area of an AstNode within the DSL text.\n * Usually contains text region information on all assigned property values of the AstNode,\n * and may contain the defining file's URI as string.\n */\nexport interface AstNodeRegionWithAssignments extends DocumentSegment {\n /**\n * A record containing an entry for each assigned property of the AstNode.\n * The key is equal to the property name and the value is an array of the property values'\n * text regions, regardless of whether the property is a single value or list property.\n */\n assignments?: Record;\n /**\n * The AstNode defining file's URI as string\n */\n documentURI?: string;\n}\n\n/**\n * Utility service for transforming an `AstNode` into a JSON string and vice versa.\n */\nexport interface JsonSerializer {\n /**\n * Serialize an `AstNode` into a JSON `string`.\n * @param node The `AstNode` to be serialized.\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n */\n serialize(node: AstNode, options?: JsonSerializeOptions): string;\n /**\n * Deserialize (parse) a JSON `string` into an `AstNode`.\n */\n deserialize(content: string, options?: JsonDeserializeOptions): T;\n}\n\n/**\n * A cross-reference in the serialized JSON representation of an AstNode.\n */\ninterface IntermediateReference {\n /** URI pointing to the target element. This is either `#${path}` if the target is in the same document, or `${documentURI}#${path}` otherwise. */\n $ref?: string\n /** The actual text used to look up the reference target in the surrounding scope. */\n $refText?: string\n /** If any problem occurred while resolving the reference, it is described by this property. */\n $error?: string\n}\n\nfunction isIntermediateReference(obj: unknown): obj is IntermediateReference {\n return typeof obj === 'object' && !!obj && ('$ref' in obj || '$error' in obj);\n}\n\nexport class DefaultJsonSerializer implements JsonSerializer {\n\n /** The set of AstNode properties to be ignored by the serializer. */\n ignoreProperties = new Set(['$container', '$containerProperty', '$containerIndex', '$document', '$cstNode']);\n\n /** The document that is currently processed by the serializer; this is used by the replacer function. */\n protected currentDocument: LangiumDocument | undefined;\n\n protected readonly langiumDocuments: LangiumDocuments;\n protected readonly astNodeLocator: AstNodeLocator;\n protected readonly nameProvider: NameProvider;\n protected readonly commentProvider: CommentProvider;\n\n constructor(services: LangiumCoreServices) {\n this.langiumDocuments = services.shared.workspace.LangiumDocuments;\n this.astNodeLocator = services.workspace.AstNodeLocator;\n this.nameProvider = services.references.NameProvider;\n this.commentProvider = services.documentation.CommentProvider;\n }\n\n serialize(node: AstNode, options: JsonSerializeOptions = {}): string {\n const specificReplacer = options?.replacer;\n const defaultReplacer = (key: string, value: unknown) => this.replacer(key, value, options);\n const replacer = specificReplacer ? (key: string, value: unknown) => specificReplacer(key, value, defaultReplacer) : defaultReplacer;\n\n try {\n this.currentDocument = getDocument(node);\n return JSON.stringify(node, replacer, options?.space);\n } finally {\n this.currentDocument = undefined;\n }\n }\n\n deserialize(content: string, options: JsonDeserializeOptions = {}): T {\n const root = JSON.parse(content);\n this.linkNode(root, root, options);\n return root;\n }\n\n protected replacer(key: string, value: unknown, { refText, sourceText, textRegions, comments, uriConverter }: JsonSerializeOptions): unknown {\n if (this.ignoreProperties.has(key)) {\n return undefined;\n } else if (isReference(value)) {\n const refValue = value.ref;\n const $refText = refText ? value.$refText : undefined;\n if (refValue) {\n const targetDocument = getDocument(refValue);\n let targetUri = '';\n if (this.currentDocument && this.currentDocument !== targetDocument) {\n if (uriConverter) {\n targetUri = uriConverter(targetDocument.uri, value);\n } else {\n targetUri = targetDocument.uri.toString();\n }\n }\n const targetPath = this.astNodeLocator.getAstNodePath(refValue);\n return {\n $ref: `${targetUri}#${targetPath}`,\n $refText\n } satisfies IntermediateReference;\n } else {\n return {\n $error: value.error?.message ?? 'Could not resolve reference',\n $refText\n } satisfies IntermediateReference;\n }\n } else if (isAstNode(value)) {\n let astNode: AstNodeWithTextRegion | undefined = undefined;\n if (textRegions) {\n astNode = this.addAstNodeRegionWithAssignmentsTo({ ...value });\n if ((!key || value.$document) && astNode?.$textRegion) {\n // The document URI is added to the root node of the resulting JSON tree\n astNode.$textRegion.documentURI = this.currentDocument?.uri.toString();\n }\n }\n if (sourceText && !key) {\n astNode ??= { ...value };\n astNode.$sourceText = value.$cstNode?.text;\n }\n if (comments) {\n astNode ??= { ...value };\n const comment = this.commentProvider.getComment(value);\n if (comment) {\n (astNode as AstNodeWithComment).$comment = comment.replace(/\\r/g, '');\n }\n }\n return astNode ?? value;\n } else {\n return value;\n }\n }\n\n protected addAstNodeRegionWithAssignmentsTo(node: AstNodeWithTextRegion) {\n const createDocumentSegment: (cstNode: CstNode) => AstNodeRegionWithAssignments = cstNode => {\n offset: cstNode.offset,\n end: cstNode.end,\n length: cstNode.length,\n range: cstNode.range,\n };\n\n if (node.$cstNode) {\n const textRegion = node.$textRegion = createDocumentSegment(node.$cstNode);\n const assignments: Record = textRegion.assignments = {};\n\n Object.keys(node).filter(key => !key.startsWith('$')).forEach(key => {\n const propertyAssignments = findNodesForProperty(node.$cstNode, key).map(createDocumentSegment);\n if (propertyAssignments.length !== 0) {\n assignments[key] = propertyAssignments;\n }\n });\n\n return node;\n }\n return undefined;\n }\n\n protected linkNode(node: GenericAstNode, root: AstNode, options: JsonDeserializeOptions, container?: AstNode, containerProperty?: string, containerIndex?: number) {\n for (const [propertyName, item] of Object.entries(node)) {\n if (Array.isArray(item)) {\n for (let index = 0; index < item.length; index++) {\n const element = item[index];\n if (isIntermediateReference(element)) {\n item[index] = this.reviveReference(node, propertyName, root, element, options);\n } else if (isAstNode(element)) {\n this.linkNode(element as GenericAstNode, root, options, node, propertyName, index);\n }\n }\n } else if (isIntermediateReference(item)) {\n node[propertyName] = this.reviveReference(node, propertyName, root, item, options);\n } else if (isAstNode(item)) {\n this.linkNode(item as GenericAstNode, root, options, node, propertyName);\n }\n }\n const mutable = node as Mutable;\n mutable.$container = container;\n mutable.$containerProperty = containerProperty;\n mutable.$containerIndex = containerIndex;\n }\n\n protected reviveReference(container: AstNode, property: string, root: AstNode, reference: IntermediateReference, options: JsonDeserializeOptions): Reference | undefined {\n let refText = reference.$refText;\n let error = reference.$error;\n if (reference.$ref) {\n const ref = this.getRefNode(root, reference.$ref, options.uriConverter);\n if (isAstNode(ref)) {\n if (!refText) {\n refText = this.nameProvider.getName(ref);\n }\n return {\n $refText: refText ?? '',\n ref\n };\n } else {\n error = ref;\n }\n }\n if (error) {\n const ref: Mutable = {\n $refText: refText ?? ''\n };\n ref.error = {\n container,\n property,\n message: error,\n reference: ref\n };\n return ref;\n } else {\n return undefined;\n }\n }\n\n protected getRefNode(root: AstNode, uri: string, uriConverter?: (uri: string) => URI): AstNode | string {\n try {\n const fragmentIndex = uri.indexOf('#');\n if (fragmentIndex === 0) {\n const node = this.astNodeLocator.getAstNode(root, uri.substring(1));\n if (!node) {\n return 'Could not resolve path: ' + uri;\n }\n return node;\n }\n if (fragmentIndex < 0) {\n const documentUri = uriConverter ? uriConverter(uri) : URI.parse(uri);\n const document = this.langiumDocuments.getDocument(documentUri);\n if (!document) {\n return 'Could not find document for URI: ' + uri;\n }\n return document.parseResult.value;\n }\n const documentUri = uriConverter ? uriConverter(uri.substring(0, fragmentIndex)) : URI.parse(uri.substring(0, fragmentIndex));\n const document = this.langiumDocuments.getDocument(documentUri);\n if (!document) {\n return 'Could not find document for URI: ' + uri;\n }\n if (fragmentIndex === uri.length - 1) {\n return document.parseResult.value;\n }\n const node = this.astNodeLocator.getAstNode(document.parseResult.value, uri.substring(fragmentIndex + 1));\n if (!node) {\n return 'Could not resolve URI: ' + uri;\n }\n return node;\n } catch (err) {\n return String(err);\n }\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from './services.js';\nimport { UriUtils, type URI } from './utils/uri-utils.js';\n\n/**\n * The service registry provides access to the language-specific {@link LangiumCoreServices} optionally including LSP-related services.\n * These are resolved via the URI of a text document.\n */\nexport interface ServiceRegistry {\n\n /**\n * Register a language via its injected services.\n */\n register(language: LangiumCoreServices): void;\n\n /**\n * Retrieve the language-specific services for the given URI. In case only one language is\n * registered, it may be used regardless of the URI format.\n */\n getServices(uri: URI): LangiumCoreServices;\n\n /**\n * The full set of registered language services.\n */\n readonly all: readonly LangiumCoreServices[];\n}\n\n/**\n * Generic registry for Langium services, but capable of being used with extending service sets as well (such as the lsp-complete LangiumCoreServices set)\n */\nexport class DefaultServiceRegistry implements ServiceRegistry {\n\n protected singleton?: LangiumCoreServices;\n protected map?: Record;\n\n register(language: LangiumCoreServices): void {\n if (!this.singleton && !this.map) {\n // This is the first language to be registered; store it as singleton.\n this.singleton = language;\n return;\n }\n if (!this.map) {\n this.map = {};\n if (this.singleton) {\n // Move the previous singleton instance to the new map.\n for (const ext of this.singleton.LanguageMetaData.fileExtensions) {\n this.map[ext] = this.singleton;\n }\n this.singleton = undefined;\n }\n }\n // Store the language services in the map.\n for (const ext of language.LanguageMetaData.fileExtensions) {\n if (this.map[ext] !== undefined && this.map[ext] !== language) {\n console.warn(`The file extension ${ext} is used by multiple languages. It is now assigned to '${language.LanguageMetaData.languageId}'.`);\n }\n this.map[ext] = language;\n }\n }\n\n getServices(uri: URI): LangiumCoreServices {\n if (this.singleton !== undefined) {\n return this.singleton;\n }\n if (this.map === undefined) {\n throw new Error('The service registry is empty. Use `register` to register the services of a language.');\n }\n const ext = UriUtils.extname(uri);\n const services = this.map[ext];\n if (!services) {\n throw new Error(`The service registry contains no services for the extension '${ext}'.`);\n }\n return services;\n }\n\n get all(): readonly LangiumCoreServices[] {\n if (this.singleton !== undefined) {\n return [this.singleton];\n }\n if (this.map !== undefined) {\n return Object.values(this.map);\n }\n return [];\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { CodeDescription, DiagnosticRelatedInformation, DiagnosticTag, integer, Range } from 'vscode-languageserver-types';\nimport type { CancellationToken } from '../utils/cancellation.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstReflection, Properties } from '../syntax-tree.js';\nimport type { MaybePromise } from '../utils/promise-utils.js';\nimport type { Stream } from '../utils/stream.js';\nimport type { DocumentSegment } from '../workspace/documents.js';\nimport { MultiMap } from '../utils/collections.js';\nimport { isOperationCancelled } from '../utils/promise-utils.js';\nimport { stream } from '../utils/stream.js';\n\nexport type DiagnosticInfo> = {\n /** The AST node to which the diagnostic is attached. */\n node: N;\n /** If a property name is given, the diagnostic is restricted to the corresponding text region. */\n property?: P;\n /** If the value of a keyword is given, the diagnostic will appear at its corresponding text region */\n keyword?: string;\n /** In case of a multi-value property (array), an index can be given to select a specific element. */\n index?: number;\n /** If you want to create a diagnostic independent to any property, use the range property. */\n range?: Range;\n /** The diagnostic's code, which usually appear in the user interface. */\n code?: integer | string;\n /** An optional property to describe the error code. */\n codeDescription?: CodeDescription;\n /** Additional metadata about the diagnostic. */\n tags?: DiagnosticTag[];\n /** An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property. */\n relatedInformation?: DiagnosticRelatedInformation[];\n /** A data entry field that is preserved between a `textDocument/publishDiagnostics` notification and `textDocument/codeAction` request. */\n data?: unknown;\n}\n\n/**\n * Shape of information commonly used in the `data` field of diagnostics.\n */\nexport interface DiagnosticData {\n /** Diagnostic code for identifying which code action to apply. This code is _not_ shown in the user interface. */\n code: string\n /** Specifies where to apply the code action in the form of a `DocumentSegment`. */\n actionSegment?: DocumentSegment\n /** Specifies where to apply the code action in the form of a `Range`. */\n actionRange?: Range\n}\n\n/**\n * Create DiagnosticData for a given diagnostic code. The result can be put into the `data` field of a DiagnosticInfo.\n */\nexport function diagnosticData(code: string): DiagnosticData {\n return { code };\n}\n\nexport type ValidationAcceptor = (severity: 'error' | 'warning' | 'info' | 'hint', message: string, info: DiagnosticInfo) => void\n\nexport type ValidationCheck = (node: T, accept: ValidationAcceptor, cancelToken: CancellationToken) => MaybePromise;\n\n/**\n * A utility type for associating non-primitive AST types to corresponding validation checks. For example:\n *\n * ```ts\n * const checks: ValidationChecks = {\n * State: validator.checkStateNameStartsWithCapital\n * };\n * ```\n *\n * If an AST type does not extend AstNode, e.g. if it describes a union of string literals, that type's name must not occur as a key in objects of type `ValidationCheck<...>`.\n *\n * @param T a type definition mapping language specific type names (keys) to the corresponding types (values)\n */\nexport type ValidationChecks = {\n [K in keyof T]?: T[K] extends AstNode ? ValidationCheck | Array> : never\n} & {\n AstNode?: ValidationCheck | Array>;\n}\n\n/**\n * `fast` checks can be executed after every document change (i.e. as the user is typing). If a check\n * is too slow it can delay the response to document changes, yielding bad user experience. By marking\n * it as `slow`, it will be skipped for normal as-you-type validation. Then it's up to you when to\n * schedule these long-running checks: after the fast checks are done, or after saving a document,\n * or with an explicit command, etc.\n *\n * `built-in` checks are errors produced by the lexer, the parser, or the linker. They cannot be used\n * for custom validation checks.\n */\nexport type ValidationCategory = 'fast' | 'slow' | 'built-in'\n\nexport namespace ValidationCategory {\n export const all: readonly ValidationCategory[] = ['fast', 'slow', 'built-in'];\n}\n\ntype ValidationCheckEntry = {\n check: ValidationCheck\n category: ValidationCategory\n}\n\n/**\n * Manages a set of `ValidationCheck`s to be applied when documents are validated.\n */\nexport class ValidationRegistry {\n private readonly entries = new MultiMap();\n private readonly reflection: AstReflection;\n\n constructor(services: LangiumCoreServices) {\n this.reflection = services.shared.AstReflection;\n }\n\n /**\n * Register a set of validation checks. Each value in the record can be either a single validation check (i.e. a function)\n * or an array of validation checks.\n *\n * @param checksRecord Set of validation checks to register.\n * @param category Optional category for the validation checks (defaults to `'fast'`).\n * @param thisObj Optional object to be used as `this` when calling the validation check functions.\n */\n register(checksRecord: ValidationChecks, thisObj: ThisParameterType = this, category: ValidationCategory = 'fast'): void {\n if (category === 'built-in') {\n throw new Error(\"The 'built-in' category is reserved for lexer, parser, and linker errors.\");\n }\n for (const [type, ch] of Object.entries(checksRecord)) {\n const callbacks = ch as ValidationCheck | ValidationCheck[];\n if (Array.isArray(callbacks)) {\n for (const check of callbacks) {\n const entry: ValidationCheckEntry = {\n check: this.wrapValidationException(check, thisObj),\n category\n };\n this.addEntry(type, entry);\n }\n } else if (typeof callbacks === 'function') {\n const entry: ValidationCheckEntry = {\n check: this.wrapValidationException(callbacks, thisObj),\n category\n };\n this.addEntry(type, entry);\n }\n }\n }\n\n protected wrapValidationException(check: ValidationCheck, thisObj: unknown): ValidationCheck {\n return async (node, accept, cancelToken) => {\n try {\n await check.call(thisObj, node, accept, cancelToken);\n } catch (err) {\n if (isOperationCancelled(err)) {\n throw err;\n }\n console.error('An error occurred during validation:', err);\n const message = err instanceof Error ? err.message : String(err);\n if (err instanceof Error && err.stack) {\n console.error(err.stack);\n }\n accept('error', 'An error occurred during validation: ' + message, { node });\n }\n };\n }\n\n protected addEntry(type: string, entry: ValidationCheckEntry): void {\n if (type === 'AstNode') {\n this.entries.add('AstNode', entry);\n return;\n }\n for (const subtype of this.reflection.getAllSubTypes(type)) {\n this.entries.add(subtype, entry);\n }\n }\n\n getChecks(type: string, categories?: ValidationCategory[]): Stream {\n let checks = stream(this.entries.get(type))\n .concat(this.entries.get('AstNode'));\n if (categories) {\n checks = checks.filter(entry => categories.includes(entry.category));\n }\n return checks.map(entry => entry.check);\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { MismatchedTokenException } from 'chevrotain';\nimport type { DiagnosticSeverity, Position, Range, Diagnostic } from 'vscode-languageserver-types';\nimport type { LanguageMetaData } from '../languages/language-meta-data.js';\nimport type { ParseResult } from '../parser/langium-parser.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, CstNode } from '../syntax-tree.js';\nimport type { LangiumDocument } from '../workspace/documents.js';\nimport type { DiagnosticData, DiagnosticInfo, ValidationAcceptor, ValidationCategory, ValidationRegistry } from './validation-registry.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { findNodeForKeyword, findNodeForProperty } from '../utils/grammar-utils.js';\nimport { streamAst } from '../utils/ast-utils.js';\nimport { tokenToRange } from '../utils/cst-utils.js';\nimport { interruptAndCheck, isOperationCancelled } from '../utils/promise-utils.js';\nimport { diagnosticData } from './validation-registry.js';\n\nexport interface ValidationOptions {\n /**\n * If this is set, only the checks associated with these categories are executed; otherwise\n * all checks are executed. The default category if not specified to the registry is `'fast'`.\n */\n categories?: ValidationCategory[];\n /** If true, no further diagnostics are reported if there are lexing errors. */\n stopAfterLexingErrors?: boolean\n /** If true, no further diagnostics are reported if there are parsing errors. */\n stopAfterParsingErrors?: boolean\n /** If true, no further diagnostics are reported if there are linking errors. */\n stopAfterLinkingErrors?: boolean\n}\n\n/**\n * Language-specific service for validating `LangiumDocument`s.\n */\nexport interface DocumentValidator {\n /**\n * Validates the whole specified document.\n *\n * @param document specified document to validate\n * @param options options to control the validation process\n * @param cancelToken allows to cancel the current operation\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n validateDocument(document: LangiumDocument, options?: ValidationOptions, cancelToken?: CancellationToken): Promise;\n}\n\nexport class DefaultDocumentValidator implements DocumentValidator {\n\n protected readonly validationRegistry: ValidationRegistry;\n protected readonly metadata: LanguageMetaData;\n\n constructor(services: LangiumCoreServices) {\n this.validationRegistry = services.validation.ValidationRegistry;\n this.metadata = services.LanguageMetaData;\n }\n\n async validateDocument(document: LangiumDocument, options: ValidationOptions = {}, cancelToken = CancellationToken.None): Promise {\n const parseResult = document.parseResult;\n const diagnostics: Diagnostic[] = [];\n\n await interruptAndCheck(cancelToken);\n\n if (!options.categories || options.categories.includes('built-in')) {\n this.processLexingErrors(parseResult, diagnostics, options);\n if (options.stopAfterLexingErrors && diagnostics.some(d => d.data?.code === DocumentValidator.LexingError)) {\n return diagnostics;\n }\n\n this.processParsingErrors(parseResult, diagnostics, options);\n if (options.stopAfterParsingErrors && diagnostics.some(d => d.data?.code === DocumentValidator.ParsingError)) {\n return diagnostics;\n }\n\n this.processLinkingErrors(document, diagnostics, options);\n if (options.stopAfterLinkingErrors && diagnostics.some(d => d.data?.code === DocumentValidator.LinkingError)) {\n return diagnostics;\n }\n }\n\n // Process custom validations\n try {\n diagnostics.push(...await this.validateAst(parseResult.value, options, cancelToken));\n } catch (err) {\n if (isOperationCancelled(err)) {\n throw err;\n }\n console.error('An error occurred during validation:', err);\n }\n\n await interruptAndCheck(cancelToken);\n\n return diagnostics;\n }\n\n protected processLexingErrors(parseResult: ParseResult, diagnostics: Diagnostic[], _options: ValidationOptions): void {\n for (const lexerError of parseResult.lexerErrors) {\n const diagnostic: Diagnostic = {\n severity: toDiagnosticSeverity('error'),\n range: {\n start: {\n line: lexerError.line! - 1,\n character: lexerError.column! - 1\n },\n end: {\n line: lexerError.line! - 1,\n character: lexerError.column! + lexerError.length - 1\n }\n },\n message: lexerError.message,\n data: diagnosticData(DocumentValidator.LexingError),\n source: this.getSource()\n };\n diagnostics.push(diagnostic);\n }\n }\n\n protected processParsingErrors(parseResult: ParseResult, diagnostics: Diagnostic[], _options: ValidationOptions): void {\n for (const parserError of parseResult.parserErrors) {\n let range: Range | undefined = undefined;\n // We can run into the chevrotain error recovery here\n // The token contained in the parser error might be automatically inserted\n // In this case every position value will be `NaN`\n if (isNaN(parserError.token.startOffset)) {\n // Some special parser error types contain a `previousToken`\n // We can simply append our diagnostic to that token\n if ('previousToken' in parserError) {\n const token = (parserError as MismatchedTokenException).previousToken;\n if (!isNaN(token.startOffset)) {\n const position: Position = { line: token.endLine! - 1, character: token.endColumn! };\n range = { start: position, end: position};\n } else {\n // No valid prev token. Might be empty document or containing only hidden tokens.\n // Point to document start\n const position: Position = { line: 0, character: 0 };\n range = { start: position, end: position};\n }\n }\n } else {\n range = tokenToRange(parserError.token);\n }\n if (range) {\n const diagnostic: Diagnostic = {\n severity: toDiagnosticSeverity('error'),\n range,\n message: parserError.message,\n data: diagnosticData(DocumentValidator.ParsingError),\n source: this.getSource()\n };\n diagnostics.push(diagnostic);\n }\n }\n }\n\n protected processLinkingErrors(document: LangiumDocument, diagnostics: Diagnostic[], _options: ValidationOptions): void {\n for (const reference of document.references) {\n const linkingError = reference.error;\n if (linkingError) {\n const info: DiagnosticInfo = {\n node: linkingError.container,\n property: linkingError.property,\n index: linkingError.index,\n data: {\n code: DocumentValidator.LinkingError,\n containerType: linkingError.container.$type,\n property: linkingError.property,\n refText: linkingError.reference.$refText\n } satisfies LinkingErrorData\n };\n diagnostics.push(this.toDiagnostic('error', linkingError.message, info));\n }\n }\n }\n\n protected async validateAst(rootNode: AstNode, options: ValidationOptions, cancelToken = CancellationToken.None): Promise {\n const validationItems: Diagnostic[] = [];\n const acceptor: ValidationAcceptor = (severity: 'error' | 'warning' | 'info' | 'hint', message: string, info: DiagnosticInfo) => {\n validationItems.push(this.toDiagnostic(severity, message, info));\n };\n\n await Promise.all(streamAst(rootNode).map(async node => {\n await interruptAndCheck(cancelToken);\n const checks = this.validationRegistry.getChecks(node.$type, options.categories);\n for (const check of checks) {\n await check(node, acceptor, cancelToken);\n }\n }));\n return validationItems;\n }\n\n protected toDiagnostic(severity: 'error' | 'warning' | 'info' | 'hint', message: string, info: DiagnosticInfo): Diagnostic {\n return {\n message,\n range: getDiagnosticRange(info),\n severity: toDiagnosticSeverity(severity),\n code: info.code,\n codeDescription: info.codeDescription,\n tags: info.tags,\n relatedInformation: info.relatedInformation,\n data: info.data,\n source: this.getSource()\n };\n }\n\n protected getSource(): string | undefined {\n return this.metadata.languageId;\n }\n}\n\nexport function getDiagnosticRange(info: DiagnosticInfo): Range {\n if (info.range) {\n return info.range;\n }\n let cstNode: CstNode | undefined;\n if (typeof info.property === 'string') {\n cstNode = findNodeForProperty(info.node.$cstNode, info.property, info.index);\n } else if (typeof info.keyword === 'string') {\n cstNode = findNodeForKeyword(info.node.$cstNode, info.keyword, info.index);\n }\n cstNode ??= info.node.$cstNode;\n if (!cstNode) {\n return {\n start: { line: 0, character: 0 },\n end: { line: 0, character: 0 }\n };\n }\n return cstNode.range;\n}\n\nexport function toDiagnosticSeverity(severity: 'error' | 'warning' | 'info' | 'hint'): DiagnosticSeverity {\n switch (severity) {\n case 'error':\n return 1; // according to vscode-languageserver-types/lib/esm/main.js#DiagnosticSeverity.Error\n case 'warning':\n return 2; // according to vscode-languageserver-types/lib/esm/main.js#DiagnosticSeverity.Warning\n case 'info':\n return 3; // according to vscode-languageserver-types/lib/esm/main.js#DiagnosticSeverity.Information\n case 'hint':\n return 4; // according to vscode-languageserver-types/lib/esm/main.js#DiagnosticSeverity.Hint\n default:\n throw new Error('Invalid diagnostic severity: ' + severity);\n }\n}\n\nexport namespace DocumentValidator {\n export const LexingError = 'lexing-error';\n export const ParsingError = 'parsing-error';\n export const LinkingError = 'linking-error';\n}\n\nexport interface LinkingErrorData extends DiagnosticData {\n containerType: string\n property: string\n refText: string\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { URI } from '../utils/uri-utils.js';\nimport type { NameProvider } from '../references/name-provider.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, ReferenceInfo } from '../syntax-tree.js';\nimport type { AstNodeLocator } from './ast-node-locator.js';\nimport type { DocumentSegment, LangiumDocument } from './documents.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { isLinkingError } from '../syntax-tree.js';\nimport { getDocument, streamAst, streamReferences } from '../utils/ast-utils.js';\nimport { toDocumentSegment } from '../utils/cst-utils.js';\nimport { interruptAndCheck } from '../utils/promise-utils.js';\nimport { UriUtils } from '../utils/uri-utils.js';\n\n/**\n * Language-specific service for creating descriptions of AST nodes to be used for cross-reference resolutions.\n */\nexport interface AstNodeDescriptionProvider {\n\n /**\n * Create a description for the given AST node. This service method is typically used while indexing\n * the contents of a document and during scope computation.\n *\n * @param node An AST node.\n * @param name The name to be used to refer to the AST node. By default, this is determined by the\n * `NameProvider` service, but alternative names may be provided according to the semantics\n * of your language.\n * @param document The document containing the AST node. If omitted, it is taken from the root AST node.\n */\n createDescription(node: AstNode, name: string | undefined, document?: LangiumDocument): AstNodeDescription;\n\n}\n\nexport class DefaultAstNodeDescriptionProvider implements AstNodeDescriptionProvider {\n\n protected readonly astNodeLocator: AstNodeLocator;\n protected readonly nameProvider: NameProvider;\n\n constructor(services: LangiumCoreServices) {\n this.astNodeLocator = services.workspace.AstNodeLocator;\n this.nameProvider = services.references.NameProvider;\n }\n\n createDescription(node: AstNode, name: string | undefined, document: LangiumDocument = getDocument(node)): AstNodeDescription {\n name ??= this.nameProvider.getName(node);\n const path = this.astNodeLocator.getAstNodePath(node);\n if (!name) {\n throw new Error(`Node at path ${path} has no name.`);\n }\n let nameNodeSegment: DocumentSegment | undefined;\n const nameSegmentGetter = () => nameNodeSegment ??= toDocumentSegment(this.nameProvider.getNameNode(node) ?? node.$cstNode);\n return {\n node,\n name,\n get nameSegment() {\n return nameSegmentGetter();\n },\n selectionSegment: toDocumentSegment(node.$cstNode),\n type: node.$type,\n documentUri: document.uri,\n path\n };\n }\n\n}\n\n/**\n * Describes a cross-reference within a document or between two documents.\n */\nexport interface ReferenceDescription {\n /** URI of the document that holds a reference */\n sourceUri: URI\n /** Path to AstNode that holds a reference */\n sourcePath: string\n /** Target document uri */\n targetUri: URI\n /** Path to the target AstNode inside the document */\n targetPath: string\n /** Segment of the reference text. */\n segment: DocumentSegment\n /** Marks a local reference i.e. a cross reference inside a document. */\n local?: boolean\n}\n\n/**\n * Language-specific service to create descriptions of all cross-references in a document. These are used by the `IndexManager`\n * to determine which documents are affected and should be rebuilt when a document is changed.\n */\nexport interface ReferenceDescriptionProvider {\n /**\n * Create descriptions of all cross-references found in the given document. These descriptions are\n * gathered by the `IndexManager` and stored in the global index so they can be considered when\n * a document change is reported by the client.\n *\n * @param document The document in which to gather cross-references.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n createDescriptions(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n}\n\nexport class DefaultReferenceDescriptionProvider implements ReferenceDescriptionProvider {\n\n protected readonly nodeLocator: AstNodeLocator;\n\n constructor(services: LangiumCoreServices) {\n this.nodeLocator = services.workspace.AstNodeLocator;\n }\n\n async createDescriptions(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n const descr: ReferenceDescription[] = [];\n const rootNode = document.parseResult.value;\n for (const astNode of streamAst(rootNode)) {\n await interruptAndCheck(cancelToken);\n streamReferences(astNode).filter(refInfo => !isLinkingError(refInfo)).forEach(refInfo => {\n // TODO: Consider logging a warning or throw an exception when DocumentState is < than Linked\n const description = this.createDescription(refInfo);\n if (description) {\n descr.push(description);\n }\n });\n }\n return descr;\n }\n\n protected createDescription(refInfo: ReferenceInfo): ReferenceDescription | undefined {\n const targetNodeDescr = refInfo.reference.$nodeDescription;\n const refCstNode = refInfo.reference.$refNode;\n if (!targetNodeDescr || !refCstNode) {\n return undefined;\n }\n const docUri = getDocument(refInfo.container).uri;\n return {\n sourceUri: docUri,\n sourcePath: this.nodeLocator.getAstNodePath(refInfo.container),\n targetUri: targetNodeDescr.documentUri,\n targetPath: targetNodeDescr.path,\n segment: toDocumentSegment(refCstNode),\n local: UriUtils.equals(targetNodeDescr.documentUri, docUri)\n };\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { AstNode } from '../syntax-tree.js';\n\n/**\n * Language-specific service for locating an `AstNode` in a document.\n */\nexport interface AstNodeLocator {\n\n /**\n * Creates a path represented by a `string` that identifies an `AstNode` inside its document.\n * It must be possible to retrieve exactly the same `AstNode` from the document using this path.\n *\n * @param node The `AstNode` for which to create the path.\n * @returns a path represented by a `string` that identifies `node` inside its document.\n * @see AstNodeLocator.getAstNode\n */\n getAstNodePath(node: AstNode): string;\n\n /**\n * Locates an `AstNode` inside another node by following the given path.\n *\n * @param node Parent element.\n * @param path Describes how to locate the `AstNode` inside the given `node`.\n * @returns The `AstNode` located under the given path, or `undefined` if the path cannot be resolved.\n * @see AstNodeLocator.getAstNodePath\n */\n getAstNode(node: AstNode, path: string): T | undefined;\n\n}\n\nexport class DefaultAstNodeLocator implements AstNodeLocator {\n protected segmentSeparator = '/';\n protected indexSeparator = '@';\n\n getAstNodePath(node: AstNode): string {\n if (node.$container) {\n const containerPath = this.getAstNodePath(node.$container);\n const newSegment = this.getPathSegment(node);\n const nodePath = containerPath + this.segmentSeparator + newSegment;\n return nodePath;\n }\n return '';\n }\n\n protected getPathSegment({ $containerProperty, $containerIndex }: AstNode): string {\n if (!$containerProperty) {\n throw new Error(\"Missing '$containerProperty' in AST node.\");\n }\n if ($containerIndex !== undefined) {\n return $containerProperty + this.indexSeparator + $containerIndex;\n }\n return $containerProperty;\n }\n\n getAstNode(node: AstNode, path: string): T | undefined {\n const segments = path.split(this.segmentSeparator);\n return segments.reduce((previousValue, currentValue) => {\n if (!previousValue || currentValue.length === 0) {\n return previousValue;\n }\n const propertyIndex = currentValue.indexOf(this.indexSeparator);\n if (propertyIndex > 0) {\n const property = currentValue.substring(0, propertyIndex);\n const arrayIndex = parseInt(currentValue.substring(propertyIndex + 1));\n const array = (previousValue as unknown as Record)[property];\n return array?.[arrayIndex];\n }\n return (previousValue as unknown as Record)[currentValue];\n }, node) as T;\n }\n\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { ConfigurationItem, DidChangeConfigurationParams, DidChangeConfigurationRegistrationOptions, InitializeParams, InitializedParams } from 'vscode-languageserver-protocol';\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport { Deferred } from '../utils/promise-utils.js';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport interface ConfigurationProvider {\n\n /**\n * A promise that resolves when the configuration provider is ready to be used.\n */\n readonly ready: Promise;\n\n /**\n * When used in a language server context, this method is called when the server receives\n * the `initialize` request.\n */\n initialize(params: InitializeParams): void;\n\n /**\n * When used in a language server context, this method is called when the server receives\n * the `initialized` notification.\n */\n initialized(params: ConfigurationInitializedParams): Promise;\n\n /**\n * Returns a configuration value stored for the given language.\n *\n * @param language The language id\n * @param configuration Configuration name\n */\n getConfiguration(language: string, configuration: string): Promise;\n\n /**\n * Updates the cached configurations using the `change` notification parameters.\n *\n * @param change The parameters of a change configuration notification.\n * `settings` property of the change object could be expressed as `Record>`\n */\n updateConfiguration(change: DidChangeConfigurationParams): void;\n}\n\nexport interface ConfigurationInitializedParams extends InitializedParams {\n register?: (params: DidChangeConfigurationRegistrationOptions) => void,\n fetchConfiguration?: (configuration: ConfigurationItem[]) => Promise\n}\n\n/**\n * Base configuration provider for building up other configuration providers\n */\nexport class DefaultConfigurationProvider implements ConfigurationProvider {\n\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly _ready = new Deferred();\n protected settings: Record> = {};\n protected workspaceConfig = false;\n\n constructor(services: LangiumSharedCoreServices) {\n this.serviceRegistry = services.ServiceRegistry;\n }\n\n get ready(): Promise {\n return this._ready.promise;\n }\n\n initialize(params: InitializeParams): void {\n this.workspaceConfig = params.capabilities.workspace?.configuration ?? false;\n }\n\n async initialized(params: ConfigurationInitializedParams): Promise {\n if (this.workspaceConfig) {\n if (params.register) {\n // params.register(...) is a function to be provided by the calling language server for the sake of\n // decoupling this implementation from the concrete LSP implementations, specifically the LSP Connection\n\n const languages = this.serviceRegistry.all;\n params.register({\n // Listen to configuration changes for all languages\n section: languages.map(lang => this.toSectionName(lang.LanguageMetaData.languageId))\n });\n }\n\n if (params.fetchConfiguration) {\n // params.fetchConfiguration(...) is a function to be provided by the calling language server for the sake of\n // decoupling this implementation from the concrete LSP implementations, specifically the LSP Connection\n const configToUpdate = this.serviceRegistry.all.map(lang => {\n // Fetch the configuration changes for all languages\n section: this.toSectionName(lang.LanguageMetaData.languageId)\n });\n\n // get workspace configurations (default scope URI)\n const configs = await params.fetchConfiguration(configToUpdate);\n configToUpdate.forEach((conf, idx) => {\n this.updateSectionConfiguration(conf.section!, configs[idx]);\n });\n }\n }\n this._ready.resolve();\n }\n\n /**\n * Updates the cached configurations using the `change` notification parameters.\n *\n * @param change The parameters of a change configuration notification.\n * `settings` property of the change object could be expressed as `Record>`\n */\n updateConfiguration(change: DidChangeConfigurationParams): void {\n if (!change.settings) {\n return;\n }\n Object.keys(change.settings).forEach(section => {\n this.updateSectionConfiguration(section, change.settings[section]);\n });\n }\n\n protected updateSectionConfiguration(section: string, configuration: any): void {\n this.settings[section] = configuration;\n }\n\n /**\n * Returns a configuration value stored for the given language.\n *\n * @param language The language id\n * @param configuration Configuration name\n */\n async getConfiguration(language: string, configuration: string): Promise {\n await this.ready;\n\n const sectionName = this.toSectionName(language);\n if (this.settings[sectionName]) {\n return this.settings[sectionName][configuration];\n }\n }\n\n protected toSectionName(languageId: string): string {\n return `${languageId}`;\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport interface Disposable {\n /**\n * Dispose this object.\n */\n dispose(): void;\n}\n\nexport interface AsyncDisposable {\n /**\n * Dispose this object.\n */\n dispose(): Promise;\n}\n\nexport namespace Disposable {\n export function create(callback: () => Promise): AsyncDisposable;\n export function create(callback: () => void): Disposable;\n export function create(callback: () => void | Promise): Disposable | AsyncDisposable {\n return {\n dispose: async () => await callback()\n };\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { Disposable } from '../utils/disposable.js';\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport type { AstNode } from '../syntax-tree.js';\nimport type { MaybePromise } from '../utils/promise-utils.js';\nimport type { Deferred } from '../utils/promise-utils.js';\nimport type { ValidationOptions } from '../validation/document-validator.js';\nimport type { IndexManager } from '../workspace/index-manager.js';\nimport type { LangiumDocument, LangiumDocuments, LangiumDocumentFactory } from './documents.js';\nimport { MultiMap } from '../utils/collections.js';\nimport { OperationCancelled, interruptAndCheck } from '../utils/promise-utils.js';\nimport { stream } from '../utils/stream.js';\nimport type { URI } from '../utils/uri-utils.js';\nimport { ValidationCategory } from '../validation/validation-registry.js';\nimport { DocumentState } from './documents.js';\n\nexport interface BuildOptions {\n /**\n * Control the validation phase with this option:\n * - `true` enables all validation checks and forces revalidating the documents\n * - `false` or `undefined` disables all validation checks\n * - An object runs only the necessary validation checks; the `categories` property restricts this to a specific subset\n */\n validation?: boolean | ValidationOptions\n}\n\nexport interface DocumentBuildState {\n /** Whether a document has completed its last build process. */\n completed: boolean\n /** The options used for the last build process. */\n options: BuildOptions\n /** Additional information about the last build result. */\n result?: {\n validationChecks?: ValidationCategory[]\n }\n}\n\n/**\n * Shared-service for building and updating `LangiumDocument`s.\n */\nexport interface DocumentBuilder {\n\n /** The options used for rebuilding documents after an update. */\n updateBuildOptions: BuildOptions;\n\n /**\n * Execute all necessary build steps for the given documents.\n *\n * @param documents Set of documents to be built.\n * @param options Options for the document builder.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n build(documents: Array>, options?: BuildOptions, cancelToken?: CancellationToken): Promise;\n\n /**\n * This method is called when a document change is detected. It updates the state of all\n * affected documents, including those with references to the changed ones, so they are rebuilt.\n *\n * @param changed URIs of changed or created documents\n * @param deleted URIs of deleted documents\n * @param cancelToken allows to cancel the current operation\n * @throws `OperationCancelled` if cancellation is detected during execution\n */\n update(changed: URI[], deleted: URI[], cancelToken?: CancellationToken): Promise;\n\n /**\n * Notify the given callback when a document update was triggered, but before any document\n * is rebuilt. Listeners to this event should not perform any long-running task.\n */\n onUpdate(callback: DocumentUpdateListener): Disposable;\n\n /**\n * Notify the given callback when a set of documents has been built reaching a desired target state.\n */\n onBuildPhase(targetState: DocumentState, callback: DocumentBuildListener): Disposable;\n\n /**\n * Wait until the workspace has reached the specified state for all documents.\n *\n * @param state The desired state. The promise won't resolve until all documents have reached this state\n * @param cancelToken Optionally allows to cancel the wait operation, disposing any listeners in the process\n * @throws `OperationCancelled` if cancellation has been requested before the state has been reached\n */\n waitUntil(state: DocumentState, cancelToken?: CancellationToken): Promise;\n\n /**\n * Wait until the document specified by the {@link uri} has reached the specified state.\n *\n * @param state The desired state. The promise won't resolve until the document has reached this state.\n * @param uri The specified URI that points to the document. If the URI does not exist, the promise will resolve once the workspace has reached the specified state.\n * @param cancelToken Optionally allows to cancel the wait operation, disposing any listeners in the process.\n * @return The URI of the document that has reached the desired state, or `undefined` if the document does not exist.\n * @throws `OperationCancelled` if cancellation has been requested before the state has been reached\n */\n waitUntil(state: DocumentState, uri?: URI, cancelToken?: CancellationToken): Promise;\n}\n\nexport type DocumentUpdateListener = (changed: URI[], deleted: URI[]) => void | Promise\nexport type DocumentBuildListener = (built: LangiumDocument[], cancelToken: CancellationToken) => void | Promise\nexport class DefaultDocumentBuilder implements DocumentBuilder {\n\n updateBuildOptions: BuildOptions = {\n // Default: run only the built-in validation checks and those in the _fast_ category (includes those without category)\n validation: {\n categories: ['built-in', 'fast']\n }\n };\n\n protected readonly langiumDocuments: LangiumDocuments;\n protected readonly langiumDocumentFactory: LangiumDocumentFactory;\n protected readonly indexManager: IndexManager;\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly updateListeners: DocumentUpdateListener[] = [];\n protected readonly buildPhaseListeners = new MultiMap();\n protected readonly buildState = new Map();\n protected readonly documentBuildWaiters = new Map>();\n protected currentState = DocumentState.Changed;\n\n constructor(services: LangiumSharedCoreServices) {\n this.langiumDocuments = services.workspace.LangiumDocuments;\n this.langiumDocumentFactory = services.workspace.LangiumDocumentFactory;\n this.indexManager = services.workspace.IndexManager;\n this.serviceRegistry = services.ServiceRegistry;\n }\n\n async build(documents: Array>, options: BuildOptions = {}, cancelToken = CancellationToken.None): Promise {\n for (const document of documents) {\n const key = document.uri.toString();\n if (document.state === DocumentState.Validated) {\n if (typeof options.validation === 'boolean' && options.validation) {\n // Force re-running all validation checks\n document.state = DocumentState.IndexedReferences;\n document.diagnostics = undefined;\n this.buildState.delete(key);\n } else if (typeof options.validation === 'object') {\n const buildState = this.buildState.get(key);\n const previousCategories = buildState?.result?.validationChecks;\n if (previousCategories) {\n // Validation with explicit options was requested for a document that has already been partly validated.\n // In this case, we need to merge the previous validation categories with the new ones.\n const newCategories = options.validation.categories ?? ValidationCategory.all as ValidationCategory[];\n const categories = newCategories.filter(c => !previousCategories.includes(c));\n if (categories.length > 0) {\n this.buildState.set(key, {\n completed: false,\n options: {\n validation: {\n ...options.validation,\n categories\n }\n },\n result: buildState.result\n });\n document.state = DocumentState.IndexedReferences;\n }\n }\n }\n } else {\n // Default: forget any previous build options\n this.buildState.delete(key);\n }\n }\n this.currentState = DocumentState.Changed;\n await this.emitUpdate(documents.map(e => e.uri), []);\n await this.buildDocuments(documents, options, cancelToken);\n }\n\n async update(changed: URI[], deleted: URI[], cancelToken = CancellationToken.None): Promise {\n this.currentState = DocumentState.Changed;\n // Remove all metadata of documents that are reported as deleted\n for (const deletedUri of deleted) {\n this.langiumDocuments.deleteDocument(deletedUri);\n this.buildState.delete(deletedUri.toString());\n this.indexManager.remove(deletedUri);\n }\n // Set the state of all changed documents to `Changed` so they are completely rebuilt\n for (const changedUri of changed) {\n const invalidated = this.langiumDocuments.invalidateDocument(changedUri);\n if (!invalidated) {\n // We create an unparsed, invalid document.\n // This will be parsed as soon as we reach the first document builder phase.\n // This allows to cancel the parsing process later in case we need it.\n const newDocument = this.langiumDocumentFactory.fromModel({ $type: 'INVALID' }, changedUri);\n newDocument.state = DocumentState.Changed;\n this.langiumDocuments.addDocument(newDocument);\n }\n this.buildState.delete(changedUri.toString());\n }\n // Set the state of all documents that should be relinked to `ComputedScopes` (if not already lower)\n const allChangedUris = stream(changed).concat(deleted).map(uri => uri.toString()).toSet();\n this.langiumDocuments.all\n .filter(doc => !allChangedUris.has(doc.uri.toString()) && this.shouldRelink(doc, allChangedUris))\n .forEach(doc => {\n const linker = this.serviceRegistry.getServices(doc.uri).references.Linker;\n linker.unlink(doc);\n doc.state = Math.min(doc.state, DocumentState.ComputedScopes);\n doc.diagnostics = undefined;\n });\n // Notify listeners of the update\n await this.emitUpdate(changed, deleted);\n // Only allow interrupting the execution after all state changes are done\n await interruptAndCheck(cancelToken);\n\n // Collect all documents that we should rebuild\n const rebuildDocuments = this.langiumDocuments.all\n .filter(doc =>\n // This includes those that were reported as changed and those that we selected for relinking\n doc.state < DocumentState.Linked\n // This includes those for which a previous build has been cancelled\n || !this.buildState.get(doc.uri.toString())?.completed\n )\n .toArray();\n await this.buildDocuments(rebuildDocuments, this.updateBuildOptions, cancelToken);\n }\n\n protected async emitUpdate(changed: URI[], deleted: URI[]): Promise {\n await Promise.all(this.updateListeners.map(listener => listener(changed, deleted)));\n }\n\n /**\n * Check whether the given document should be relinked after changes were found in the given URIs.\n */\n protected shouldRelink(document: LangiumDocument, changedUris: Set): boolean {\n // Relink documents with linking errors -- maybe those references can be resolved now\n if (document.references.some(ref => ref.error !== undefined)) {\n return true;\n }\n // Check whether the document is affected by any of the changed URIs\n return this.indexManager.isAffected(document, changedUris);\n }\n\n onUpdate(callback: DocumentUpdateListener): Disposable {\n this.updateListeners.push(callback);\n return Disposable.create(() => {\n const index = this.updateListeners.indexOf(callback);\n if (index >= 0) {\n this.updateListeners.splice(index, 1);\n }\n });\n }\n\n /**\n * Build the given documents by stepping through all build phases. If a document's state indicates\n * that a certain build phase is already done, the phase is skipped for that document.\n */\n protected async buildDocuments(documents: LangiumDocument[], options: BuildOptions, cancelToken: CancellationToken): Promise {\n this.prepareBuild(documents, options);\n // 0. Parse content\n await this.runCancelable(documents, DocumentState.Parsed, cancelToken, doc =>\n this.langiumDocumentFactory.update(doc, cancelToken)\n );\n // 1. Index content\n await this.runCancelable(documents, DocumentState.IndexedContent, cancelToken, doc =>\n this.indexManager.updateContent(doc, cancelToken)\n );\n // 2. Compute scopes\n await this.runCancelable(documents, DocumentState.ComputedScopes, cancelToken, async doc => {\n const scopeComputation = this.serviceRegistry.getServices(doc.uri).references.ScopeComputation;\n doc.precomputedScopes = await scopeComputation.computeLocalScopes(doc, cancelToken);\n });\n // 3. Linking\n await this.runCancelable(documents, DocumentState.Linked, cancelToken, doc => {\n const linker = this.serviceRegistry.getServices(doc.uri).references.Linker;\n return linker.link(doc, cancelToken);\n });\n // 4. Index references\n await this.runCancelable(documents, DocumentState.IndexedReferences, cancelToken, doc =>\n this.indexManager.updateReferences(doc, cancelToken)\n );\n // 5. Validation\n const toBeValidated = documents.filter(doc => this.shouldValidate(doc));\n await this.runCancelable(toBeValidated, DocumentState.Validated, cancelToken, doc =>\n this.validate(doc, cancelToken)\n );\n\n // If we've made it to this point without being cancelled, we can mark the build state as completed.\n for (const doc of documents) {\n const state = this.buildState.get(doc.uri.toString());\n if (state) {\n state.completed = true;\n }\n }\n }\n\n protected prepareBuild(documents: LangiumDocument[], options: BuildOptions): void {\n for (const doc of documents) {\n const key = doc.uri.toString();\n const state = this.buildState.get(key);\n // If the document has no previous build state, we set it. If it has one, but it's already marked\n // as completed, we overwrite it. If the previous build was not completed, we keep its state\n // and continue where it was cancelled.\n if (!state || state.completed) {\n this.buildState.set(key, {\n completed: false,\n options,\n result: state?.result\n });\n }\n }\n }\n\n protected async runCancelable(documents: LangiumDocument[], targetState: DocumentState, cancelToken: CancellationToken,\n callback: (document: LangiumDocument) => MaybePromise): Promise {\n const filtered = documents.filter(e => e.state < targetState);\n for (const document of filtered) {\n await interruptAndCheck(cancelToken);\n await callback(document);\n document.state = targetState;\n }\n await this.notifyBuildPhase(filtered, targetState, cancelToken);\n this.currentState = targetState;\n }\n\n onBuildPhase(targetState: DocumentState, callback: DocumentBuildListener): Disposable {\n this.buildPhaseListeners.add(targetState, callback);\n return Disposable.create(() => {\n this.buildPhaseListeners.delete(targetState, callback);\n });\n }\n\n waitUntil(state: DocumentState, cancelToken?: CancellationToken): Promise;\n waitUntil(state: DocumentState, uri?: URI, cancelToken?: CancellationToken): Promise;\n waitUntil(state: DocumentState, uriOrToken?: URI | CancellationToken, cancelToken?: CancellationToken): Promise {\n let uri: URI | undefined = undefined;\n if (uriOrToken && 'path' in uriOrToken) {\n uri = uriOrToken;\n } else {\n cancelToken = uriOrToken;\n }\n cancelToken ??= CancellationToken.None;\n if (uri) {\n const document = this.langiumDocuments.getDocument(uri);\n if (document && document.state > state) {\n return Promise.resolve(uri);\n }\n }\n if (this.currentState >= state) {\n return Promise.resolve(undefined);\n } else if (cancelToken.isCancellationRequested) {\n return Promise.reject(OperationCancelled);\n }\n return new Promise((resolve, reject) => {\n const buildDisposable = this.onBuildPhase(state, () => {\n buildDisposable.dispose();\n cancelDisposable.dispose();\n if (uri) {\n const document = this.langiumDocuments.getDocument(uri);\n resolve(document?.uri);\n } else {\n resolve(undefined);\n }\n });\n const cancelDisposable = cancelToken!.onCancellationRequested(() => {\n buildDisposable.dispose();\n cancelDisposable.dispose();\n reject(OperationCancelled);\n });\n });\n }\n\n protected async notifyBuildPhase(documents: LangiumDocument[], state: DocumentState, cancelToken: CancellationToken): Promise {\n if (documents.length === 0) {\n // Don't notify when no document has been processed\n return;\n }\n const listeners = this.buildPhaseListeners.get(state);\n for (const listener of listeners) {\n await interruptAndCheck(cancelToken);\n await listener(documents, cancelToken);\n }\n }\n\n /**\n * Determine whether the given document should be validated during a build. The default\n * implementation checks the `validation` property of the build options. If it's set to `true`\n * or a `ValidationOptions` object, the document is included in the validation phase.\n */\n protected shouldValidate(document: LangiumDocument): boolean {\n return Boolean(this.getBuildOptions(document).validation);\n }\n\n /**\n * Run validation checks on the given document and store the resulting diagnostics in the document.\n * If the document already contains diagnostics, the new ones are added to the list.\n */\n protected async validate(document: LangiumDocument, cancelToken: CancellationToken): Promise {\n const validator = this.serviceRegistry.getServices(document.uri).validation.DocumentValidator;\n const validationSetting = this.getBuildOptions(document).validation;\n const options = typeof validationSetting === 'object' ? validationSetting : undefined;\n const diagnostics = await validator.validateDocument(document, options, cancelToken);\n if (document.diagnostics) {\n document.diagnostics.push(...diagnostics);\n } else {\n document.diagnostics = diagnostics;\n }\n\n // Store information about the executed validation in the build state\n const state = this.buildState.get(document.uri.toString());\n if (state) {\n state.result ??= {};\n const newCategories = options?.categories ?? ValidationCategory.all;\n if (state.result.validationChecks) {\n state.result.validationChecks.push(...newCategories);\n } else {\n state.result.validationChecks = [...newCategories];\n }\n }\n }\n\n protected getBuildOptions(document: LangiumDocument): BuildOptions {\n return this.buildState.get(document.uri.toString())?.options ?? {};\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, AstReflection } from '../syntax-tree.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { ContextCache } from '../utils/caching.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport type { Stream } from '../utils/stream.js';\nimport { stream } from '../utils/stream.js';\nimport type { URI } from '../utils/uri-utils.js';\nimport { UriUtils } from '../utils/uri-utils.js';\nimport type { ReferenceDescription } from './ast-descriptions.js';\nimport type { LangiumDocument, LangiumDocuments } from './documents.js';\n\n/**\n * The index manager is responsible for keeping metadata about symbols and cross-references\n * in the workspace. It is used to look up symbols in the global scope, mostly during linking\n * and completion. This service is shared between all languages of a language server.\n */\nexport interface IndexManager {\n\n /**\n * Removes the specified document URI from the index.\n * Necessary when documents are deleted and not referenceable anymore.\n *\n * @param uri The URI of the document for which index data shall be removed\n */\n remove(uri: URI): void;\n\n /**\n * Updates the information about the exportable content of a document inside the index.\n *\n * @param document Document to be updated\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n updateContent(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n /**\n * Updates the information about the cross-references of a document inside the index.\n *\n * @param document Document to be updated\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n updateReferences(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n /**\n * Determine whether the given document could be affected by changes of the documents\n * identified by the given URIs (second parameter). The document is typically regarded as\n * affected if it contains a reference to any of the changed files.\n *\n * @param document Document to check whether it's affected\n * @param changedUris URIs of the changed documents\n */\n isAffected(document: LangiumDocument, changedUris: Set): boolean;\n\n /**\n * Compute a list of all exported elements, optionally filtered using a type identifier and document URIs.\n *\n * @param nodeType The type to filter with, or `undefined` to return descriptions of all types.\n * @param uris If specified, only returns elements from the given URIs.\n * @returns a `Stream` containing all globally visible nodes (of a given type).\n */\n allElements(nodeType?: string, uris?: Set): Stream;\n\n /**\n * Returns all known references that are pointing to the given `targetNode`.\n *\n * @param targetNode the `AstNode` to look up references for\n * @param astNodePath the path that points to the `targetNode` inside the document. See also `AstNodeLocator`\n *\n * @returns a `Stream` of references that are targeting the `targetNode`\n */\n findAllReferences(targetNode: AstNode, astNodePath: string): Stream;\n\n}\n\nexport class DefaultIndexManager implements IndexManager {\n\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly documents: LangiumDocuments;\n protected readonly astReflection: AstReflection;\n\n /**\n * The symbol index stores all `AstNodeDescription` items exported by a document.\n * The key used in this map is the string representation of the specific document URI.\n */\n protected readonly symbolIndex = new Map();\n /**\n * This is a cache for the `allElements()` method.\n * It caches the descriptions from `symbolIndex` grouped by types.\n */\n protected readonly symbolByTypeIndex = new ContextCache();\n /**\n * This index keeps track of all `ReferenceDescription` items exported by a document.\n * This is used to compute which elements are affected by a document change\n * and for finding references to an AST node.\n */\n protected readonly referenceIndex = new Map();\n\n constructor(services: LangiumSharedCoreServices) {\n this.documents = services.workspace.LangiumDocuments;\n this.serviceRegistry = services.ServiceRegistry;\n this.astReflection = services.AstReflection;\n }\n\n findAllReferences(targetNode: AstNode, astNodePath: string): Stream {\n const targetDocUri = getDocument(targetNode).uri;\n const result: ReferenceDescription[] = [];\n this.referenceIndex.forEach(docRefs => {\n docRefs.forEach(refDescr => {\n if (UriUtils.equals(refDescr.targetUri, targetDocUri) && refDescr.targetPath === astNodePath) {\n result.push(refDescr);\n }\n });\n });\n return stream(result);\n }\n\n allElements(nodeType?: string, uris?: Set): Stream {\n let documentUris = stream(this.symbolIndex.keys());\n if (uris) {\n documentUris = documentUris.filter(uri => !uris || uris.has(uri));\n }\n return documentUris\n .map(uri => this.getFileDescriptions(uri, nodeType))\n .flat();\n }\n\n protected getFileDescriptions(uri: string, nodeType?: string): AstNodeDescription[] {\n if (!nodeType) {\n return this.symbolIndex.get(uri) ?? [];\n }\n const descriptions = this.symbolByTypeIndex.get(uri, nodeType, () => {\n const allFileDescriptions = this.symbolIndex.get(uri) ?? [];\n return allFileDescriptions.filter(e => this.astReflection.isSubtype(e.type, nodeType));\n });\n return descriptions;\n }\n\n remove(uri: URI): void {\n const uriString = uri.toString();\n this.symbolIndex.delete(uriString);\n this.symbolByTypeIndex.clear(uriString);\n this.referenceIndex.delete(uriString);\n }\n\n async updateContent(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n const services = this.serviceRegistry.getServices(document.uri);\n const exports = await services.references.ScopeComputation.computeExports(document, cancelToken);\n const uri = document.uri.toString();\n this.symbolIndex.set(uri, exports);\n this.symbolByTypeIndex.clear(uri);\n }\n\n async updateReferences(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n const services = this.serviceRegistry.getServices(document.uri);\n const indexData = await services.workspace.ReferenceDescriptionProvider.createDescriptions(document, cancelToken);\n this.referenceIndex.set(document.uri.toString(), indexData);\n }\n\n isAffected(document: LangiumDocument, changedUris: Set): boolean {\n const references = this.referenceIndex.get(document.uri.toString());\n if (!references) {\n return false;\n }\n return references.some(ref => !ref.local && changedUris.has(ref.targetUri.toString()));\n }\n\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { InitializeParams, InitializedParams } from 'vscode-languageserver-protocol';\nimport type { WorkspaceFolder } from 'vscode-languageserver-types';\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { Deferred, interruptAndCheck } from '../utils/promise-utils.js';\nimport { URI, UriUtils } from '../utils/uri-utils.js';\nimport type { BuildOptions, DocumentBuilder } from './document-builder.js';\nimport type { LangiumDocument, LangiumDocuments } from './documents.js';\nimport type { FileSystemNode, FileSystemProvider } from './file-system-provider.js';\nimport type { WorkspaceLock } from './workspace-lock.js';\n\n// export type WorkspaceFolder from 'vscode-languageserver-types' for convenience,\n// is supposed to avoid confusion as 'WorkspaceFolder' might accidentally be imported via 'vscode-languageclient'\nexport type { WorkspaceFolder };\n\n/**\n * The workspace manager is responsible for finding source files in the workspace.\n * This service is shared between all languages of a language server.\n */\nexport interface WorkspaceManager {\n\n /** The options used for the initial workspace build. */\n initialBuildOptions: BuildOptions | undefined;\n\n /**\n * A promise that resolves when the workspace manager is ready to be used.\n * Use this to ensure that the workspace manager has finished its initialization.\n */\n readonly ready: Promise;\n\n /**\n * When used in a language server context, this method is called when the server receives\n * the `initialize` request.\n */\n initialize(params: InitializeParams): void;\n\n /**\n * When used in a language server context, this method is called when the server receives\n * the `initialized` notification.\n */\n initialized(params: InitializedParams): Promise;\n\n /**\n * Does the initial indexing of workspace folders.\n * Collects information about exported and referenced AstNodes in\n * each language file and stores it locally.\n *\n * @param folders The set of workspace folders to be indexed.\n */\n initializeWorkspace(folders: WorkspaceFolder[], cancelToken?: CancellationToken): Promise;\n\n}\n\nexport class DefaultWorkspaceManager implements WorkspaceManager {\n\n initialBuildOptions: BuildOptions = {};\n\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly langiumDocuments: LangiumDocuments;\n protected readonly documentBuilder: DocumentBuilder;\n protected readonly fileSystemProvider: FileSystemProvider;\n protected readonly mutex: WorkspaceLock;\n protected readonly _ready = new Deferred();\n protected folders?: WorkspaceFolder[];\n\n constructor(services: LangiumSharedCoreServices) {\n this.serviceRegistry = services.ServiceRegistry;\n this.langiumDocuments = services.workspace.LangiumDocuments;\n this.documentBuilder = services.workspace.DocumentBuilder;\n this.fileSystemProvider = services.workspace.FileSystemProvider;\n this.mutex = services.workspace.WorkspaceLock;\n }\n\n get ready(): Promise {\n return this._ready.promise;\n }\n\n initialize(params: InitializeParams): void {\n this.folders = params.workspaceFolders ?? undefined;\n }\n\n initialized(_params: InitializedParams): Promise {\n // Initialize the workspace even if there are no workspace folders\n // We still want to load additional documents (language library or similar) during initialization\n return this.mutex.write(token => this.initializeWorkspace(this.folders ?? [], token));\n }\n\n async initializeWorkspace(folders: WorkspaceFolder[], cancelToken = CancellationToken.None): Promise {\n const documents = await this.performStartup(folders);\n // Only after creating all documents do we check whether we need to cancel the initialization\n // The document builder will later pick up on all unprocessed documents\n await interruptAndCheck(cancelToken);\n await this.documentBuilder.build(documents, this.initialBuildOptions, cancelToken);\n }\n\n /**\n * Performs the uninterruptable startup sequence of the workspace manager.\n * This methods loads all documents in the workspace and other documents and returns them.\n */\n protected async performStartup(folders: WorkspaceFolder[]): Promise {\n const fileExtensions = this.serviceRegistry.all.flatMap(e => e.LanguageMetaData.fileExtensions);\n const documents: LangiumDocument[] = [];\n const collector = (document: LangiumDocument) => {\n documents.push(document);\n if (!this.langiumDocuments.hasDocument(document.uri)) {\n this.langiumDocuments.addDocument(document);\n }\n };\n // Even though we don't await the initialization of the workspace manager,\n // we can still assume that all library documents and file documents are loaded by the time we start building documents.\n // The mutex prevents anything from performing a workspace build until we check the cancellation token\n await this.loadAdditionalDocuments(folders, collector);\n await Promise.all(\n folders.map(wf => [wf, this.getRootFolder(wf)] as [WorkspaceFolder, URI])\n .map(async entry => this.traverseFolder(...entry, fileExtensions, collector))\n );\n this._ready.resolve();\n return documents;\n }\n\n /**\n * Load all additional documents that shall be visible in the context of the given workspace\n * folders and add them to the collector. This can be used to include built-in libraries of\n * your language, which can be either loaded from provided files or constructed in memory.\n */\n protected loadAdditionalDocuments(_folders: WorkspaceFolder[], _collector: (document: LangiumDocument) => void): Promise {\n return Promise.resolve();\n }\n\n /**\n * Determine the root folder of the source documents in the given workspace folder.\n * The default implementation returns the URI of the workspace folder, but you can override\n * this to return a subfolder like `src` instead.\n */\n protected getRootFolder(workspaceFolder: WorkspaceFolder): URI {\n return URI.parse(workspaceFolder.uri);\n }\n\n /**\n * Traverse the file system folder identified by the given URI and its subfolders. All\n * contained files that match the file extensions are added to the collector.\n */\n protected async traverseFolder(workspaceFolder: WorkspaceFolder, folderPath: URI, fileExtensions: string[], collector: (document: LangiumDocument) => void): Promise {\n const content = await this.fileSystemProvider.readDirectory(folderPath);\n await Promise.all(content.map(async entry => {\n if (this.includeEntry(workspaceFolder, entry, fileExtensions)) {\n if (entry.isDirectory) {\n await this.traverseFolder(workspaceFolder, entry.uri, fileExtensions, collector);\n } else if (entry.isFile) {\n const document = await this.langiumDocuments.getOrCreateDocument(entry.uri);\n collector(document);\n }\n }\n }));\n }\n\n /**\n * Determine whether the given folder entry shall be included while indexing the workspace.\n */\n protected includeEntry(_workspaceFolder: WorkspaceFolder, entry: FileSystemNode, fileExtensions: string[]): boolean {\n const name = UriUtils.basename(entry.uri);\n if (name.startsWith('.')) {\n return false;\n }\n if (entry.isDirectory) {\n return name !== 'node_modules' && name !== 'out';\n } else if (entry.isFile) {\n const extname = UriUtils.extname(entry.uri);\n return fileExtensions.includes(extname);\n }\n return false;\n }\n\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { ILexingError, IMultiModeLexerDefinition, IToken, TokenType, TokenTypeDictionary, TokenVocabulary } from 'chevrotain';\nimport type { LangiumCoreServices } from '../services.js';\nimport { Lexer as ChevrotainLexer } from 'chevrotain';\n\nexport interface LexerResult {\n /**\n * A list of all tokens that were lexed from the input.\n *\n * Note that Langium requires the optional properties\n * `startLine`, `startColumn`, `endOffset`, `endLine` and `endColumn` to be set on each token.\n */\n tokens: IToken[];\n /**\n * Contains hidden tokens, usually comments.\n */\n hidden: IToken[];\n errors: ILexingError[];\n}\n\nexport interface Lexer {\n readonly definition: TokenTypeDictionary;\n tokenize(text: string): LexerResult;\n}\n\nexport class DefaultLexer implements Lexer {\n\n protected chevrotainLexer: ChevrotainLexer;\n protected tokenTypes: TokenTypeDictionary;\n\n constructor(services: LangiumCoreServices) {\n const tokens = services.parser.TokenBuilder.buildTokens(services.Grammar, {\n caseInsensitive: services.LanguageMetaData.caseInsensitive\n });\n this.tokenTypes = this.toTokenTypeDictionary(tokens);\n const lexerTokens = isTokenTypeDictionary(tokens) ? Object.values(tokens) : tokens;\n this.chevrotainLexer = new ChevrotainLexer(lexerTokens, {\n positionTracking: 'full'\n });\n }\n\n get definition(): TokenTypeDictionary {\n return this.tokenTypes;\n }\n\n tokenize(text: string): LexerResult {\n const chevrotainResult = this.chevrotainLexer.tokenize(text);\n return {\n tokens: chevrotainResult.tokens,\n errors: chevrotainResult.errors,\n hidden: chevrotainResult.groups.hidden ?? []\n };\n }\n\n protected toTokenTypeDictionary(buildTokens: TokenVocabulary): TokenTypeDictionary {\n if (isTokenTypeDictionary(buildTokens)) return buildTokens;\n const tokens = isIMultiModeLexerDefinition(buildTokens) ? Object.values(buildTokens.modes).flat() : buildTokens;\n const res: TokenTypeDictionary = {};\n tokens.forEach(token => res[token.name] = token);\n return res;\n }\n}\n\n/**\n * Returns a check whether the given TokenVocabulary is TokenType array\n */\nexport function isTokenTypeArray(tokenVocabulary: TokenVocabulary): tokenVocabulary is TokenType[] {\n return Array.isArray(tokenVocabulary) && (tokenVocabulary.length === 0 || 'name' in tokenVocabulary[0]);\n}\n\n/**\n * Returns a check whether the given TokenVocabulary is IMultiModeLexerDefinition\n */\nexport function isIMultiModeLexerDefinition(tokenVocabulary: TokenVocabulary): tokenVocabulary is IMultiModeLexerDefinition {\n return tokenVocabulary && 'modes' in tokenVocabulary && 'defaultMode' in tokenVocabulary;\n}\n\n/**\n * Returns a check whether the given TokenVocabulary is TokenTypeDictionary\n */\nexport function isTokenTypeDictionary(tokenVocabulary: TokenVocabulary): tokenVocabulary is TokenTypeDictionary {\n return !isTokenTypeArray(tokenVocabulary) && !isIMultiModeLexerDefinition(tokenVocabulary);\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { Position, Range } from 'vscode-languageserver-types';\nimport type { CstNode } from '../syntax-tree.js';\nimport { NEWLINE_REGEXP, escapeRegExp } from '../utils/regexp-utils.js';\nimport { URI } from '../utils/uri-utils.js';\n\nexport interface JSDocComment extends JSDocValue {\n readonly elements: JSDocElement[]\n getTag(name: string): JSDocTag | undefined\n getTags(name: string): JSDocTag[]\n}\n\nexport type JSDocElement = JSDocParagraph | JSDocTag;\n\nexport type JSDocInline = JSDocTag | JSDocLine;\n\nexport interface JSDocValue {\n /**\n * Represents the range that this JSDoc element occupies.\n * If the JSDoc was parsed from a `CstNode`, the range will represent the location in the source document.\n */\n readonly range: Range\n /**\n * Renders this JSDoc element to a plain text representation.\n */\n toString(): string\n /**\n * Renders this JSDoc element to a markdown representation.\n *\n * @param options Rendering options to customize the markdown result.\n */\n toMarkdown(options?: JSDocRenderOptions): string\n}\n\nexport interface JSDocParagraph extends JSDocValue {\n readonly inlines: JSDocInline[]\n}\n\nexport interface JSDocLine extends JSDocValue {\n readonly text: string\n}\n\nexport interface JSDocTag extends JSDocValue {\n readonly name: string\n readonly content: JSDocParagraph\n readonly inline: boolean\n}\n\nexport interface JSDocParseOptions {\n /**\n * The start symbol of your comment format. Defaults to `/**`.\n */\n readonly start?: RegExp | string\n /**\n * The symbol that start a line of your comment format. Defaults to `*`.\n */\n readonly line?: RegExp | string\n /**\n * The end symbol of your comment format. Defaults to `*\\/`.\n */\n readonly end?: RegExp | string\n}\n\nexport interface JSDocRenderOptions {\n /**\n * Determines the style for rendering tags. Defaults to `italic`.\n */\n tag?: 'plain' | 'italic' | 'bold' | 'bold-italic'\n /**\n * Determines the default for rendering `@link` tags. Defaults to `plain`.\n */\n link?: 'code' | 'plain'\n /**\n * Custom tag rendering function.\n * Return a markdown formatted tag or `undefined` to fall back to the default rendering.\n */\n renderTag?(tag: JSDocTag): string | undefined\n /**\n * Custom link rendering function. Accepts a link target and a display value for the link.\n * Return a markdown formatted link with the format `[$display]($link)` or `undefined` if the link is not a valid target.\n */\n renderLink?(link: string, display: string): string | undefined\n}\n\n/**\n * Parses a JSDoc from a `CstNode` containing a comment.\n *\n * @param node A `CstNode` from a parsed Langium document.\n * @param options Parsing options specialized to your language. See {@link JSDocParseOptions}.\n */\nexport function parseJSDoc(node: CstNode, options?: JSDocParseOptions): JSDocComment;\n/**\n * Parses a JSDoc from a string comment.\n *\n * @param content A string containing the source of the JSDoc comment.\n * @param start The start position the comment occupies in the source document.\n * @param options Parsing options specialized to your language. See {@link JSDocParseOptions}.\n */\nexport function parseJSDoc(content: string, start?: Position, options?: JSDocParseOptions): JSDocComment;\nexport function parseJSDoc(node: CstNode | string, start?: Position | JSDocParseOptions, options?: JSDocParseOptions): JSDocComment {\n let opts: JSDocParseOptions | undefined;\n let position: Position | undefined;\n if (typeof node === 'string') {\n position = start as Position | undefined;\n opts = options as JSDocParseOptions | undefined;\n } else {\n position = node.range.start;\n opts = start as JSDocParseOptions | undefined;\n }\n if (!position) {\n position = Position.create(0, 0);\n }\n\n const lines = getLines(node);\n const normalizedOptions = normalizeOptions(opts);\n\n const tokens = tokenize({\n lines,\n position,\n options: normalizedOptions\n });\n\n return parseJSDocComment({\n index: 0,\n tokens,\n position\n });\n}\n\nexport function isJSDoc(node: CstNode | string, options?: JSDocParseOptions): boolean {\n const normalizedOptions = normalizeOptions(options);\n const lines = getLines(node);\n if (lines.length === 0) {\n return false;\n }\n\n const first = lines[0];\n const last = lines[lines.length - 1];\n const firstRegex = normalizedOptions.start;\n const lastRegex = normalizedOptions.end;\n\n return Boolean(firstRegex?.exec(first)) && Boolean(lastRegex?.exec(last));\n}\n\nfunction getLines(node: CstNode | string): string[] {\n let content = '';\n if (typeof node === 'string') {\n content = node;\n } else {\n content = node.text;\n }\n const lines = content.split(NEWLINE_REGEXP);\n return lines;\n}\n\n// Tokenization\n\ninterface JSDocToken {\n type: 'text' | 'tag' | 'inline-tag' | 'break'\n content: string\n range: Range\n}\n\nconst tagRegex = /\\s*(@([\\p{L}][\\p{L}\\p{N}]*)?)/uy;\nconst inlineTagRegex = /\\{(@[\\p{L}][\\p{L}\\p{N}]*)(\\s*)([^\\r\\n}]+)?\\}/gu;\n\nfunction tokenize(context: TokenizationContext): JSDocToken[] {\n const tokens: JSDocToken[] = [];\n let currentLine = context.position.line;\n let currentCharacter = context.position.character;\n for (let i = 0; i < context.lines.length; i++) {\n const first = i === 0;\n const last = i === context.lines.length - 1;\n let line = context.lines[i];\n let index = 0;\n\n if (first && context.options.start) {\n const match = context.options.start?.exec(line);\n if (match) {\n index = match.index + match[0].length;\n }\n } else {\n const match = context.options.line?.exec(line);\n if (match) {\n index = match.index + match[0].length;\n }\n }\n if (last) {\n const match = context.options.end?.exec(line);\n if (match) {\n line = line.substring(0, match.index);\n }\n }\n\n line = line.substring(0, lastCharacter(line));\n const whitespaceEnd = skipWhitespace(line, index);\n\n if (whitespaceEnd >= line.length) {\n // Only create a break token when we already have previous tokens\n if (tokens.length > 0) {\n const position = Position.create(currentLine, currentCharacter);\n tokens.push({\n type: 'break',\n content: '',\n range: Range.create(position, position)\n });\n }\n } else {\n tagRegex.lastIndex = index;\n const tagMatch = tagRegex.exec(line);\n if (tagMatch) {\n const fullMatch = tagMatch[0];\n const value = tagMatch[1];\n const start = Position.create(currentLine, currentCharacter + index);\n const end = Position.create(currentLine, currentCharacter + index + fullMatch.length);\n tokens.push({\n type: 'tag',\n content: value,\n range: Range.create(start, end)\n });\n index += fullMatch.length;\n index = skipWhitespace(line, index);\n }\n\n if (index < line.length) {\n const rest = line.substring(index);\n const inlineTagMatches = Array.from(rest.matchAll(inlineTagRegex));\n tokens.push(...buildInlineTokens(inlineTagMatches, rest, currentLine, currentCharacter + index));\n }\n }\n\n currentLine++;\n currentCharacter = 0;\n }\n\n // Remove last break token if there is one\n if (tokens.length > 0 && tokens[tokens.length - 1].type === 'break') {\n return tokens.slice(0, -1);\n }\n\n return tokens;\n}\n\nfunction buildInlineTokens(tags: RegExpMatchArray[], line: string, lineIndex: number, characterIndex: number): JSDocToken[] {\n const tokens: JSDocToken[] = [];\n\n if (tags.length === 0) {\n const start = Position.create(lineIndex, characterIndex);\n const end = Position.create(lineIndex, characterIndex + line.length);\n tokens.push({\n type: 'text',\n content: line,\n range: Range.create(start, end)\n });\n } else {\n let lastIndex = 0;\n for (const match of tags) {\n const matchIndex = match.index!;\n const startContent = line.substring(lastIndex, matchIndex);\n if (startContent.length > 0) {\n tokens.push({\n type: 'text',\n content: line.substring(lastIndex, matchIndex),\n range: Range.create(\n Position.create(lineIndex, lastIndex + characterIndex),\n Position.create(lineIndex, matchIndex + characterIndex)\n )\n });\n }\n let offset = startContent.length + 1;\n const tagName = match[1];\n tokens.push({\n type: 'inline-tag',\n content: tagName,\n range: Range.create(\n Position.create(lineIndex, lastIndex + offset + characterIndex),\n Position.create(lineIndex, lastIndex + offset + tagName.length + characterIndex)\n )\n });\n offset += tagName.length;\n if (match.length === 4) {\n offset += match[2].length;\n const value = match[3];\n tokens.push({\n type: 'text',\n content: value,\n range: Range.create(\n Position.create(lineIndex, lastIndex + offset + characterIndex),\n Position.create(lineIndex, lastIndex + offset + value.length + characterIndex)\n )\n });\n } else {\n tokens.push({\n type: 'text',\n content: '',\n range: Range.create(\n Position.create(lineIndex, lastIndex + offset + characterIndex),\n Position.create(lineIndex, lastIndex + offset + characterIndex)\n )\n });\n }\n lastIndex = matchIndex + match[0].length;\n }\n const endContent = line.substring(lastIndex);\n if (endContent.length > 0) {\n tokens.push({\n type: 'text',\n content: endContent,\n range: Range.create(\n Position.create(lineIndex, lastIndex + characterIndex),\n Position.create(lineIndex, lastIndex + characterIndex + endContent.length)\n )\n });\n }\n }\n\n return tokens;\n}\n\nconst nonWhitespaceRegex = /\\S/;\nconst whitespaceEndRegex = /\\s*$/;\n\nfunction skipWhitespace(line: string, index: number): number {\n const match = line.substring(index).match(nonWhitespaceRegex);\n if (match) {\n return index + match.index!;\n } else {\n return line.length;\n }\n}\n\nfunction lastCharacter(line: string): number | undefined {\n const match = line.match(whitespaceEndRegex);\n if (match && typeof match.index === 'number') {\n return match.index;\n }\n return undefined;\n}\n\n// Parsing\n\nfunction parseJSDocComment(context: ParseContext): JSDocComment {\n const startPosition: Position = Position.create(context.position.line, context.position.character);\n if (context.tokens.length === 0) {\n return new JSDocCommentImpl([], Range.create(startPosition, startPosition));\n }\n const elements: JSDocElement[] = [];\n while (context.index < context.tokens.length) {\n const element = parseJSDocElement(context, elements[elements.length - 1]);\n if (element) {\n elements.push(element);\n }\n }\n const start = elements[0]?.range.start ?? startPosition;\n const end = elements[elements.length - 1]?.range.end ?? startPosition;\n return new JSDocCommentImpl(elements, Range.create(start, end));\n}\n\nfunction parseJSDocElement(context: ParseContext, last?: JSDocElement): JSDocElement | undefined {\n const next = context.tokens[context.index];\n if (next.type === 'tag') {\n return parseJSDocTag(context, false);\n } else if (next.type === 'text' || next.type === 'inline-tag') {\n return parseJSDocText(context);\n } else {\n appendEmptyLine(next, last);\n context.index++;\n return undefined;\n }\n}\n\nfunction appendEmptyLine(token: JSDocToken, element?: JSDocElement): void {\n if (element) {\n const line = new JSDocLineImpl('', token.range);\n if ('inlines' in element) {\n element.inlines.push(line);\n } else {\n element.content.inlines.push(line);\n }\n }\n}\n\nfunction parseJSDocText(context: ParseContext): JSDocParagraph {\n let token = context.tokens[context.index];\n const firstToken = token;\n let lastToken = token;\n const lines: JSDocInline[] = [];\n while (token && token.type !== 'break' && token.type !== 'tag') {\n lines.push(parseJSDocInline(context));\n lastToken = token;\n token = context.tokens[context.index];\n }\n return new JSDocTextImpl(lines, Range.create(firstToken.range.start, lastToken.range.end));\n}\n\nfunction parseJSDocInline(context: ParseContext): JSDocInline {\n const token = context.tokens[context.index];\n if (token.type === 'inline-tag') {\n return parseJSDocTag(context, true);\n } else {\n return parseJSDocLine(context);\n }\n}\n\nfunction parseJSDocTag(context: ParseContext, inline: boolean): JSDocTag {\n const tagToken = context.tokens[context.index++];\n const name = tagToken.content.substring(1);\n const nextToken = context.tokens[context.index];\n if (nextToken?.type === 'text') {\n if (inline) {\n const docLine = parseJSDocLine(context);\n return new JSDocTagImpl(\n name,\n new JSDocTextImpl([docLine], docLine.range),\n inline,\n Range.create(tagToken.range.start, docLine.range.end)\n );\n } else {\n const textDoc = parseJSDocText(context);\n return new JSDocTagImpl(\n name,\n textDoc,\n inline,\n Range.create(tagToken.range.start, textDoc.range.end)\n );\n }\n } else {\n const range = tagToken.range;\n return new JSDocTagImpl(name, new JSDocTextImpl([], range), inline, range);\n }\n}\n\nfunction parseJSDocLine(context: ParseContext): JSDocLine {\n const token = context.tokens[context.index++];\n return new JSDocLineImpl(token.content, token.range);\n}\n\ninterface NormalizedOptions {\n start?: RegExp\n end?: RegExp\n line?: RegExp\n}\n\ninterface TokenizationContext {\n position: Position\n lines: string[]\n options: NormalizedOptions\n}\n\ninterface ParseContext {\n position: Position\n tokens: JSDocToken[]\n index: number\n}\n\nfunction normalizeOptions(options?: JSDocParseOptions): NormalizedOptions {\n if (!options) {\n return normalizeOptions({\n start: '/**',\n end: '*/',\n line: '*'\n });\n }\n const { start, end, line } = options;\n return {\n start: normalizeOption(start, true),\n end: normalizeOption(end, false),\n line: normalizeOption(line, true)\n };\n}\n\nfunction normalizeOption(option: RegExp | string | undefined, start: boolean): RegExp | undefined {\n if (typeof option === 'string' || typeof option === 'object') {\n const escaped = typeof option === 'string' ? escapeRegExp(option) : option.source;\n if (start) {\n return new RegExp(`^\\\\s*${escaped}`);\n } else {\n return new RegExp(`\\\\s*${escaped}\\\\s*$`);\n }\n } else {\n return option;\n }\n}\n\nclass JSDocCommentImpl implements JSDocComment {\n\n readonly elements: JSDocElement[];\n readonly range: Range;\n\n constructor(elements: JSDocElement[], range: Range) {\n this.elements = elements;\n this.range = range;\n }\n\n getTag(name: string): JSDocTag | undefined {\n return this.getAllTags().find(e => e.name === name);\n }\n\n getTags(name: string): JSDocTag[] {\n return this.getAllTags().filter(e => e.name === name);\n }\n\n private getAllTags(): JSDocTag[] {\n return this.elements.filter((e): e is JSDocTag => 'name' in e);\n }\n\n toString(): string {\n let value = '';\n for (const element of this.elements) {\n if (value.length === 0) {\n value = element.toString();\n } else {\n const text = element.toString();\n value += fillNewlines(value) + text;\n }\n }\n return value.trim();\n }\n\n toMarkdown(options?: JSDocRenderOptions): string {\n let value = '';\n for (const element of this.elements) {\n if (value.length === 0) {\n value = element.toMarkdown(options);\n } else {\n const text = element.toMarkdown(options);\n value += fillNewlines(value) + text;\n }\n }\n return value.trim();\n }\n}\n\nclass JSDocTagImpl implements JSDocTag {\n name: string;\n content: JSDocParagraph;\n range: Range;\n inline: boolean;\n\n constructor(name: string, content: JSDocParagraph, inline: boolean, range: Range) {\n this.name = name;\n this.content = content;\n this.inline = inline;\n this.range = range;\n }\n\n toString(): string {\n let text = `@${this.name}`;\n const content = this.content.toString();\n if (this.content.inlines.length === 1) {\n text = `${text} ${content}`;\n } else if (this.content.inlines.length > 1) {\n text = `${text}\\n${content}`;\n }\n if (this.inline) {\n // Inline tags are surrounded by curly braces\n return `{${text}}`;\n } else {\n return text;\n }\n }\n\n toMarkdown(options?: JSDocRenderOptions): string {\n return options?.renderTag?.(this) ?? this.toMarkdownDefault(options);\n }\n\n private toMarkdownDefault(options?: JSDocRenderOptions): string {\n const content = this.content.toMarkdown(options);\n if (this.inline) {\n const rendered = renderInlineTag(this.name, content, options ?? {});\n if (typeof rendered === 'string') {\n return rendered;\n }\n }\n let marker = '';\n if (options?.tag === 'italic' || options?.tag === undefined) {\n marker = '*';\n } else if (options?.tag === 'bold') {\n marker = '**';\n } else if (options?.tag === 'bold-italic') {\n marker = '***';\n }\n let text = `${marker}@${this.name}${marker}`;\n if (this.content.inlines.length === 1) {\n text = `${text} \u2014 ${content}`;\n } else if (this.content.inlines.length > 1) {\n text = `${text}\\n${content}`;\n }\n if (this.inline) {\n // Inline tags are surrounded by curly braces\n return `{${text}}`;\n } else {\n return text;\n }\n }\n}\n\nfunction renderInlineTag(tag: string, content: string, options: JSDocRenderOptions): string | undefined {\n if (tag === 'linkplain' || tag === 'linkcode' || tag === 'link') {\n const index = content.indexOf(' ');\n let display = content;\n if (index > 0) {\n const displayStart = skipWhitespace(content, index);\n display = content.substring(displayStart);\n content = content.substring(0, index);\n }\n if (tag === 'linkcode' || (tag === 'link' && options.link === 'code')) {\n // Surround the display value in a markdown inline code block\n display = `\\`${display}\\``;\n }\n const renderedLink = options.renderLink?.(content, display) ?? renderLinkDefault(content, display);\n return renderedLink;\n }\n return undefined;\n}\n\nfunction renderLinkDefault(content: string, display: string): string {\n try {\n URI.parse(content, true);\n return `[${display}](${content})`;\n } catch {\n return content;\n }\n}\n\nclass JSDocTextImpl implements JSDocParagraph {\n inlines: JSDocInline[];\n range: Range;\n\n constructor(lines: JSDocInline[], range: Range) {\n this.inlines = lines;\n this.range = range;\n }\n\n toString(): string {\n let text = '';\n for (let i = 0; i < this.inlines.length; i++) {\n const inline = this.inlines[i];\n const next = this.inlines[i + 1];\n text += inline.toString();\n if (next && next.range.start.line > inline.range.start.line) {\n text += '\\n';\n }\n }\n return text;\n }\n\n toMarkdown(options?: JSDocRenderOptions): string {\n let text = '';\n for (let i = 0; i < this.inlines.length; i++) {\n const inline = this.inlines[i];\n const next = this.inlines[i + 1];\n text += inline.toMarkdown(options);\n if (next && next.range.start.line > inline.range.start.line) {\n text += '\\n';\n }\n }\n return text;\n }\n}\n\nclass JSDocLineImpl implements JSDocLine {\n text: string;\n range: Range;\n\n constructor(text: string, range: Range) {\n this.text = text;\n this.range = range;\n }\n\n toString(): string {\n return this.text;\n }\n toMarkdown(): string {\n return this.text;\n }\n\n}\n\nfunction fillNewlines(text: string): string {\n if (text.endsWith('\\n')) {\n return '\\n';\n } else {\n return '\\n\\n';\n }\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription } from '../syntax-tree.js';\nimport type { IndexManager } from '../workspace/index-manager.js';\nimport type { CommentProvider } from './comment-provider.js';\nimport type { JSDocTag } from './jsdoc.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { isJSDoc, parseJSDoc } from './jsdoc.js';\n\n/**\n * Provides documentation for AST nodes.\n */\nexport interface DocumentationProvider {\n /**\n * Returns a markdown documentation string for the specified AST node.\n *\n * The default implementation `JSDocDocumentationProvider` will inspect the comment associated with the specified node.\n */\n getDocumentation(node: AstNode): string | undefined;\n}\n\nexport class JSDocDocumentationProvider implements DocumentationProvider {\n\n protected readonly indexManager: IndexManager;\n protected readonly commentProvider: CommentProvider;\n\n constructor(services: LangiumCoreServices) {\n this.indexManager = services.shared.workspace.IndexManager;\n this.commentProvider = services.documentation.CommentProvider;\n }\n\n getDocumentation(node: AstNode): string | undefined {\n const comment = this.commentProvider.getComment(node);\n if (comment && isJSDoc(comment)) {\n const parsedJSDoc = parseJSDoc(comment);\n return parsedJSDoc.toMarkdown({\n renderLink: (link, display) => {\n return this.documentationLinkRenderer(node, link, display);\n },\n renderTag: (tag) => {\n return this.documentationTagRenderer(node, tag);\n }\n });\n }\n return undefined;\n }\n\n protected documentationLinkRenderer(node: AstNode, name: string, display: string): string | undefined {\n const description = this.findNameInPrecomputedScopes(node, name) ?? this.findNameInGlobalScope(node, name);\n if (description && description.nameSegment) {\n const line = description.nameSegment.range.start.line + 1;\n const character = description.nameSegment.range.start.character + 1;\n const uri = description.documentUri.with({ fragment: `L${line},${character}` });\n return `[${display}](${uri.toString()})`;\n } else {\n return undefined;\n }\n }\n\n protected documentationTagRenderer(_node: AstNode, _tag: JSDocTag): string | undefined {\n // Fall back to the default tag rendering\n return undefined;\n }\n\n protected findNameInPrecomputedScopes(node: AstNode, name: string): AstNodeDescription | undefined {\n const document = getDocument(node);\n const precomputed = document.precomputedScopes;\n if (!precomputed) {\n return undefined;\n }\n let currentNode: AstNode | undefined = node;\n do {\n const allDescriptions = precomputed.get(currentNode);\n const description = allDescriptions.find(e => e.name === name);\n if (description) {\n return description;\n }\n currentNode = currentNode.$container;\n } while (currentNode);\n\n return undefined;\n }\n\n protected findNameInGlobalScope(node: AstNode, name: string): AstNodeDescription | undefined {\n const description = this.indexManager.allElements().find(e => e.name === name);\n return description;\n }\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { GrammarConfig } from '../languages/grammar-config.js';\nimport { isAstNodeWithComment } from '../serializer/json-serializer.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode } from '../syntax-tree.js';\nimport { findCommentNode } from '../utils/cst-utils.js';\n\n/**\n * Provides comments for AST nodes.\n */\nexport interface CommentProvider {\n /**\n * Returns the comment associated with the specified AST node.\n * @param node The AST node to get the comment for.\n * @returns The comment associated with the specified AST node or `undefined` if there is no comment.\n */\n getComment(node: AstNode): string | undefined;\n}\n\nexport class DefaultCommentProvider implements CommentProvider {\n protected readonly grammarConfig: () => GrammarConfig;\n constructor(services: LangiumCoreServices) {\n this.grammarConfig = () => services.parser.GrammarConfig;\n }\n getComment(node: AstNode): string | undefined {\n if(isAstNodeWithComment(node)) {\n return node.$comment;\n }\n return findCommentNode(node.$cstNode, this.grammarConfig().multilineCommentRules)?.text;\n }\n}\n", "/******************************************************************************\n * Copyright 2024 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n// eslint-disable-next-line no-restricted-imports\nexport * from 'vscode-jsonrpc/lib/common/events.js';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { CancellationToken } from '../utils/cancellation.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode } from '../syntax-tree.js';\nimport type { LangiumParser, ParseResult } from './langium-parser.js';\nimport type { Hydrator } from '../serializer/hydrator.js';\nimport type { Event } from '../utils/event.js';\nimport { Deferred, OperationCancelled } from '../utils/promise-utils.js';\nimport { Emitter } from '../utils/event.js';\n\n/**\n * Async parser that allows to cancel the current parsing process.\n * The sync parser implementation is blocking the event loop, which can become quite problematic for large files.\n *\n * Note that the default implementation is not actually async. It just wraps the sync parser in a promise.\n * A real implementation would create worker threads or web workers to offload the parsing work.\n */\nexport interface AsyncParser {\n parse(text: string, cancelToken: CancellationToken): Promise>;\n}\n\n/**\n * Default implementation of the async parser. This implementation only wraps the sync parser in a promise.\n *\n * A real implementation would create worker threads or web workers to offload the parsing work.\n */\nexport class DefaultAsyncParser implements AsyncParser {\n\n protected readonly syncParser: LangiumParser;\n\n constructor(services: LangiumCoreServices) {\n this.syncParser = services.parser.LangiumParser;\n }\n\n parse(text: string): Promise> {\n return Promise.resolve(this.syncParser.parse(text));\n }\n}\n\nexport abstract class AbstractThreadedAsyncParser implements AsyncParser {\n\n /**\n * The thread count determines how many threads are used to parse files in parallel.\n * The default value is 8. Decreasing this value increases startup performance, but decreases parallel parsing performance.\n */\n protected threadCount = 8;\n /**\n * The termination delay determines how long the parser waits for a thread to finish after a cancellation request.\n * The default value is 200(ms).\n */\n protected terminationDelay = 200;\n protected workerPool: ParserWorker[] = [];\n protected queue: Array> = [];\n\n protected readonly hydrator: Hydrator;\n\n constructor(services: LangiumCoreServices) {\n this.hydrator = services.serializer.Hydrator;\n }\n\n protected initializeWorkers(): void {\n while (this.workerPool.length < this.threadCount) {\n const worker = this.createWorker();\n worker.onReady(() => {\n if (this.queue.length > 0) {\n const deferred = this.queue.shift();\n if (deferred) {\n worker.lock();\n deferred.resolve(worker);\n }\n }\n });\n this.workerPool.push(worker);\n }\n }\n\n async parse(text: string, cancelToken: CancellationToken): Promise> {\n const worker = await this.acquireParserWorker(cancelToken);\n const deferred = new Deferred>();\n let timeout: NodeJS.Timeout | undefined;\n // If the cancellation token is requested, we wait for a certain time before terminating the worker.\n // Since the cancellation token lives longer than the parsing process, we need to dispose the event listener.\n // Otherwise, we might accidentally terminate the worker after the parsing process has finished.\n const cancellation = cancelToken.onCancellationRequested(() => {\n timeout = setTimeout(() => {\n this.terminateWorker(worker);\n }, this.terminationDelay);\n });\n worker.parse(text).then(result => {\n const hydrated = this.hydrator.hydrate(result);\n deferred.resolve(hydrated);\n }).catch(err => {\n deferred.reject(err);\n }).finally(() => {\n cancellation.dispose();\n clearTimeout(timeout);\n });\n return deferred.promise;\n }\n\n protected terminateWorker(worker: ParserWorker): void {\n worker.terminate();\n const index = this.workerPool.indexOf(worker);\n if (index >= 0) {\n this.workerPool.splice(index, 1);\n }\n }\n\n protected async acquireParserWorker(cancelToken: CancellationToken): Promise {\n this.initializeWorkers();\n for (const worker of this.workerPool) {\n if (worker.ready) {\n worker.lock();\n return worker;\n }\n }\n const deferred = new Deferred();\n cancelToken.onCancellationRequested(() => {\n const index = this.queue.indexOf(deferred);\n if (index >= 0) {\n this.queue.splice(index, 1);\n }\n deferred.reject(OperationCancelled);\n });\n this.queue.push(deferred);\n return deferred.promise;\n }\n\n protected abstract createWorker(): ParserWorker;\n}\n\nexport type WorkerMessagePost = (message: unknown) => void;\nexport type WorkerMessageCallback = (cb: (message: unknown) => void) => void;\n\nexport class ParserWorker {\n\n protected readonly sendMessage: WorkerMessagePost;\n protected readonly _terminate: () => void;\n protected readonly onReadyEmitter = new Emitter();\n\n protected deferred = new Deferred();\n protected _ready = true;\n protected _parsing = false;\n\n get ready(): boolean {\n return this._ready;\n }\n\n get onReady(): Event {\n return this.onReadyEmitter.event;\n }\n\n constructor(sendMessage: WorkerMessagePost, onMessage: WorkerMessageCallback, onError: WorkerMessageCallback, terminate: () => void) {\n this.sendMessage = sendMessage;\n this._terminate = terminate;\n onMessage(result => {\n const parseResult = result as ParseResult;\n this.deferred.resolve(parseResult);\n this.unlock();\n });\n onError(error => {\n this.deferred.reject(error);\n this.unlock();\n });\n }\n\n terminate(): void {\n this.deferred.reject(OperationCancelled);\n this._terminate();\n }\n\n lock(): void {\n this._ready = false;\n }\n\n unlock(): void {\n this._parsing = false;\n this._ready = true;\n this.onReadyEmitter.fire();\n }\n\n parse(text: string): Promise {\n if (this._parsing) {\n throw new Error('Parser worker is busy');\n }\n this._parsing = true;\n this.deferred = new Deferred();\n this.sendMessage(text);\n return this.deferred.promise;\n }\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { CancellationToken, CancellationTokenSource } from '../utils/cancellation.js';\nimport { Deferred, isOperationCancelled, type MaybePromise } from '../utils/promise-utils.js';\n\n/**\n * Utility service to execute mutually exclusive actions.\n */\nexport interface WorkspaceLock {\n /**\n * Performs a single async action, like initializing the workspace or processing document changes.\n * Only one action will be executed at a time.\n *\n * When another action is queued up, the token provided for the action will be cancelled.\n * Assuming the action makes use of this token, the next action only has to wait for the current action to finish cancellation.\n */\n write(action: (token: CancellationToken) => MaybePromise): Promise;\n\n /**\n * Performs a single action, like computing completion results or providing workspace symbols.\n * Read actions will only be executed after all write actions have finished. They will be executed in parallel if possible.\n *\n * If a write action is currently running, the read action will be queued up and executed afterwards.\n * If a new write action is queued up while a read action is waiting, the write action will receive priority and will be handled before the read action.\n *\n * Note that read actions are not allowed to modify anything in the workspace. Please use {@link write} instead.\n */\n read(action: () => MaybePromise): Promise;\n\n /**\n * Cancels the last queued write action. All previous write actions already have been cancelled.\n */\n cancelWrite(): void;\n}\n\ntype LockAction = (token: CancellationToken) => MaybePromise;\n\ninterface LockEntry {\n action: LockAction;\n deferred: Deferred;\n cancellationToken: CancellationToken;\n}\n\nexport class DefaultWorkspaceLock implements WorkspaceLock {\n\n private previousTokenSource = new CancellationTokenSource();\n private writeQueue: LockEntry[] = [];\n private readQueue: LockEntry[] = [];\n private done = true;\n\n write(action: (token: CancellationToken) => MaybePromise): Promise {\n this.cancelWrite();\n const tokenSource = new CancellationTokenSource();\n this.previousTokenSource = tokenSource;\n return this.enqueue(this.writeQueue, action, tokenSource.token);\n }\n\n read(action: () => MaybePromise): Promise {\n return this.enqueue(this.readQueue, action);\n }\n\n private enqueue(queue: LockEntry[], action: LockAction, cancellationToken?: CancellationToken): Promise {\n const deferred = new Deferred();\n const entry: LockEntry = {\n action,\n deferred,\n cancellationToken: cancellationToken ?? CancellationToken.None\n };\n queue.push(entry);\n this.performNextOperation();\n return deferred.promise as Promise;\n }\n\n private async performNextOperation(): Promise {\n if (!this.done) {\n return;\n }\n const entries: LockEntry[] = [];\n if (this.writeQueue.length > 0) {\n // Just perform the next write action\n entries.push(this.writeQueue.shift()!);\n } else if (this.readQueue.length > 0) {\n // Empty the read queue and perform all actions in parallel\n entries.push(...this.readQueue.splice(0, this.readQueue.length));\n } else {\n return;\n }\n this.done = false;\n await Promise.all(entries.map(async ({ action, deferred, cancellationToken }) => {\n try {\n // Move the execution of the action to the next event loop tick via `Promise.resolve()`\n const result = await Promise.resolve().then(() => action(cancellationToken));\n deferred.resolve(result);\n } catch (err) {\n if (isOperationCancelled(err)) {\n // If the operation was cancelled, we don't want to reject the promise\n deferred.resolve(undefined);\n } else {\n deferred.reject(err);\n }\n }\n }));\n this.done = true;\n this.performNextOperation();\n }\n\n cancelWrite(): void {\n this.previousTokenSource.cancel();\n }\n}\n", "/******************************************************************************\n * Copyright 2024 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { TokenType } from 'chevrotain';\nimport { CompositeCstNodeImpl, LeafCstNodeImpl, RootCstNodeImpl } from '../parser/cst-node-builder.js';\nimport { isAbstractElement, type AbstractElement, type Grammar } from '../languages/generated/ast.js';\nimport type { Linker } from '../references/linker.js';\nimport type { Lexer } from '../parser/lexer.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { ParseResult } from '../parser/langium-parser.js';\nimport type { Reference, AstNode, CstNode, LeafCstNode, GenericAstNode, Mutable, RootCstNode } from '../syntax-tree.js';\nimport { isRootCstNode, isCompositeCstNode, isLeafCstNode, isAstNode, isReference } from '../syntax-tree.js';\nimport { streamAst } from '../utils/ast-utils.js';\nimport { BiMap } from '../utils/collections.js';\nimport { streamCst } from '../utils/cst-utils.js';\n\n/**\n * The hydrator service is responsible for allowing AST parse results to be sent across worker threads.\n */\nexport interface Hydrator {\n /**\n * Converts a parse result to a plain object. The resulting object can be sent across worker threads.\n */\n dehydrate(result: ParseResult): ParseResult;\n /**\n * Converts a plain object to a parse result. The included AST node can then be used in the main thread.\n * Calling this method on objects that have not been dehydrated first will result in undefined behavior.\n */\n hydrate(result: ParseResult): ParseResult;\n}\n\nexport interface DehydrateContext {\n astNodes: Map;\n cstNodes: Map;\n}\n\nexport interface HydrateContext {\n astNodes: Map;\n cstNodes: Map;\n}\n\nexport class DefaultHydrator implements Hydrator {\n\n protected readonly grammar: Grammar;\n protected readonly lexer: Lexer;\n protected readonly linker: Linker;\n\n protected readonly grammarElementIdMap = new BiMap();\n protected readonly tokenTypeIdMap = new BiMap();\n\n constructor(services: LangiumCoreServices) {\n this.grammar = services.Grammar;\n this.lexer = services.parser.Lexer;\n this.linker = services.references.Linker;\n }\n\n dehydrate(result: ParseResult): ParseResult {\n return {\n // We need to create shallow copies of the errors\n // The original errors inherit from the `Error` class, which is not transferable across worker threads\n lexerErrors: result.lexerErrors.map(e => ({ ...e })),\n parserErrors: result.parserErrors.map(e => ({ ...e })),\n value: this.dehydrateAstNode(result.value, this.createDehyrationContext(result.value))\n };\n }\n\n protected createDehyrationContext(node: AstNode): DehydrateContext {\n const astNodes = new Map();\n const cstNodes = new Map();\n for (const astNode of streamAst(node)) {\n astNodes.set(astNode, {});\n }\n if (node.$cstNode) {\n for (const cstNode of streamCst(node.$cstNode)) {\n cstNodes.set(cstNode, {});\n }\n }\n return {\n astNodes,\n cstNodes\n };\n }\n\n protected dehydrateAstNode(node: AstNode, context: DehydrateContext): object {\n const obj = context.astNodes.get(node) as Record;\n obj.$type = node.$type;\n obj.$containerIndex = node.$containerIndex;\n obj.$containerProperty = node.$containerProperty;\n if (node.$cstNode !== undefined) {\n obj.$cstNode = this.dehydrateCstNode(node.$cstNode, context);\n }\n for (const [name, value] of Object.entries(node)) {\n if (name.startsWith('$')) {\n continue;\n }\n if (Array.isArray(value)) {\n const arr: any[] = [];\n obj[name] = arr;\n for (const item of value) {\n if (isAstNode(item)) {\n arr.push(this.dehydrateAstNode(item, context));\n } else if (isReference(item)) {\n arr.push(this.dehydrateReference(item, context));\n } else {\n arr.push(item);\n }\n }\n } else if (isAstNode(value)) {\n obj[name] = this.dehydrateAstNode(value, context);\n } else if (isReference(value)) {\n obj[name] = this.dehydrateReference(value, context);\n } else if (value !== undefined) {\n obj[name] = value;\n }\n }\n return obj;\n }\n\n protected dehydrateReference(reference: Reference, context: DehydrateContext): any {\n const obj: Record = {};\n obj.$refText = reference.$refText;\n if (reference.$refNode) {\n obj.$refNode = context.cstNodes.get(reference.$refNode);\n }\n return obj;\n }\n\n protected dehydrateCstNode(node: CstNode, context: DehydrateContext): any {\n const cstNode = context.cstNodes.get(node) as Record;\n if (isRootCstNode(node)) {\n cstNode.fullText = node.fullText;\n } else {\n // Note: This returns undefined for hidden nodes (i.e. comments)\n cstNode.grammarSource = this.getGrammarElementId(node.grammarSource);\n }\n cstNode.hidden = node.hidden;\n cstNode.astNode = context.astNodes.get(node.astNode);\n if (isCompositeCstNode(node)) {\n cstNode.content = node.content.map(child => this.dehydrateCstNode(child, context));\n } else if (isLeafCstNode(node)) {\n cstNode.tokenType = node.tokenType.name;\n cstNode.offset = node.offset;\n cstNode.length = node.length;\n cstNode.startLine = node.range.start.line;\n cstNode.startColumn = node.range.start.character;\n cstNode.endLine = node.range.end.line;\n cstNode.endColumn = node.range.end.character;\n }\n return cstNode;\n }\n\n hydrate(result: ParseResult): ParseResult {\n const node = result.value;\n const context = this.createHydrationContext(node);\n if ('$cstNode' in node) {\n this.hydrateCstNode(node.$cstNode, context);\n }\n return {\n lexerErrors: result.lexerErrors,\n parserErrors: result.parserErrors,\n value: this.hydrateAstNode(node, context) as T\n };\n }\n\n protected createHydrationContext(node: any): HydrateContext {\n const astNodes = new Map();\n const cstNodes = new Map();\n for (const astNode of streamAst(node)) {\n astNodes.set(astNode, {} as AstNode);\n }\n let root: RootCstNode;\n if (node.$cstNode) {\n for (const cstNode of streamCst(node.$cstNode)) {\n let cst: Mutable | undefined;\n if ('fullText' in cstNode) {\n cst = new RootCstNodeImpl(cstNode.fullText as string);\n root = cst as RootCstNode;\n } else if ('content' in cstNode) {\n cst = new CompositeCstNodeImpl();\n } else if ('tokenType' in cstNode) {\n cst = this.hydrateCstLeafNode(cstNode);\n }\n if (cst) {\n cstNodes.set(cstNode, cst);\n cst.root = root!;\n }\n }\n }\n return {\n astNodes,\n cstNodes\n };\n }\n\n protected hydrateAstNode(node: any, context: HydrateContext): AstNode {\n const astNode = context.astNodes.get(node) as Mutable;\n astNode.$type = node.$type;\n astNode.$containerIndex = node.$containerIndex;\n astNode.$containerProperty = node.$containerProperty;\n if (node.$cstNode) {\n astNode.$cstNode = context.cstNodes.get(node.$cstNode);\n }\n for (const [name, value] of Object.entries(node)) {\n if (name.startsWith('$')) {\n continue;\n }\n if (Array.isArray(value)) {\n const arr: unknown[] = [];\n astNode[name] = arr;\n for (const item of value) {\n if (isAstNode(item)) {\n arr.push(this.setParent(this.hydrateAstNode(item, context), astNode));\n } else if (isReference(item)) {\n arr.push(this.hydrateReference(item, astNode, name, context));\n } else {\n arr.push(item);\n }\n }\n } else if (isAstNode(value)) {\n astNode[name] = this.setParent(this.hydrateAstNode(value, context), astNode);\n } else if (isReference(value)) {\n astNode[name] = this.hydrateReference(value, astNode, name, context);\n } else if (value !== undefined) {\n astNode[name] = value;\n }\n }\n return astNode;\n }\n\n protected setParent(node: any, parent: any): any {\n node.$container = parent as AstNode;\n return node;\n }\n\n protected hydrateReference(reference: any, node: AstNode, name: string, context: HydrateContext): Reference {\n return this.linker.buildReference(node, name, context.cstNodes.get(reference.$refNode)!, reference.$refText);\n }\n\n protected hydrateCstNode(cstNode: any, context: HydrateContext, num = 0): CstNode {\n const cstNodeObj = context.cstNodes.get(cstNode) as Mutable;\n if (typeof cstNode.grammarSource === 'number') {\n cstNodeObj.grammarSource = this.getGrammarElement(cstNode.grammarSource);\n }\n cstNodeObj.astNode = context.astNodes.get(cstNode.astNode)!;\n if (isCompositeCstNode(cstNodeObj)) {\n for (const child of cstNode.content) {\n const hydrated = this.hydrateCstNode(child, context, num++);\n cstNodeObj.content.push(hydrated);\n }\n }\n return cstNodeObj;\n }\n\n protected hydrateCstLeafNode(cstNode: any): LeafCstNode {\n const tokenType = this.getTokenType(cstNode.tokenType);\n const offset = cstNode.offset;\n const length = cstNode.length;\n const startLine = cstNode.startLine;\n const startColumn = cstNode.startColumn;\n const endLine = cstNode.endLine;\n const endColumn = cstNode.endColumn;\n const hidden = cstNode.hidden;\n const node = new LeafCstNodeImpl(\n offset,\n length,\n {\n start: {\n line: startLine,\n character: startColumn\n },\n end: {\n line: endLine,\n character: endColumn\n }\n },\n tokenType,\n hidden\n );\n return node;\n }\n\n protected getTokenType(name: string): TokenType {\n return this.lexer.definition[name];\n }\n\n protected getGrammarElementId(node: AbstractElement): number | undefined {\n if (this.grammarElementIdMap.size === 0) {\n this.createGrammarElementIdMap();\n }\n return this.grammarElementIdMap.get(node);\n }\n\n protected getGrammarElement(id: number): AbstractElement {\n if (this.grammarElementIdMap.size === 0) {\n this.createGrammarElementIdMap();\n }\n const element = this.grammarElementIdMap.getKey(id);\n if (element) {\n return element;\n } else {\n throw new Error('Invalid grammar element id: ' + id);\n }\n }\n\n protected createGrammarElementIdMap(): void {\n let id = 0;\n for (const element of streamAst(this.grammar)) {\n if (isAbstractElement(element)) {\n this.grammarElementIdMap.set(element, id++);\n }\n }\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n******************************************************************************/\n\nimport type { Module } from './dependency-injection.js';\nimport type { LangiumDefaultCoreServices, LangiumDefaultSharedCoreServices, LangiumCoreServices, LangiumSharedCoreServices } from './services.js';\nimport type { FileSystemProvider } from './workspace/file-system-provider.js';\nimport { createGrammarConfig } from './languages/grammar-config.js';\nimport { createCompletionParser } from './parser/completion-parser-builder.js';\nimport { createLangiumParser } from './parser/langium-parser-builder.js';\nimport { DefaultTokenBuilder } from './parser/token-builder.js';\nimport { DefaultValueConverter } from './parser/value-converter.js';\nimport { DefaultLinker } from './references/linker.js';\nimport { DefaultNameProvider } from './references/name-provider.js';\nimport { DefaultReferences } from './references/references.js';\nimport { DefaultScopeComputation } from './references/scope-computation.js';\nimport { DefaultScopeProvider } from './references/scope-provider.js';\nimport { DefaultJsonSerializer } from './serializer/json-serializer.js';\nimport { DefaultServiceRegistry } from './service-registry.js';\nimport { DefaultDocumentValidator } from './validation/document-validator.js';\nimport { ValidationRegistry } from './validation/validation-registry.js';\nimport { DefaultAstNodeDescriptionProvider, DefaultReferenceDescriptionProvider } from './workspace/ast-descriptions.js';\nimport { DefaultAstNodeLocator } from './workspace/ast-node-locator.js';\nimport { DefaultConfigurationProvider } from './workspace/configuration.js';\nimport { DefaultDocumentBuilder } from './workspace/document-builder.js';\nimport { DefaultLangiumDocumentFactory, DefaultLangiumDocuments } from './workspace/documents.js';\nimport { DefaultIndexManager } from './workspace/index-manager.js';\nimport { DefaultWorkspaceManager } from './workspace/workspace-manager.js';\nimport { DefaultLexer } from './parser/lexer.js';\nimport { JSDocDocumentationProvider } from './documentation/documentation-provider.js';\nimport { DefaultCommentProvider } from './documentation/comment-provider.js';\nimport { LangiumParserErrorMessageProvider } from './parser/langium-parser.js';\nimport { DefaultAsyncParser } from './parser/async-parser.js';\nimport { DefaultWorkspaceLock } from './workspace/workspace-lock.js';\nimport { DefaultHydrator } from './serializer/hydrator.js';\n\n/**\n * Context required for creating the default language-specific dependency injection module.\n */\nexport interface DefaultCoreModuleContext {\n shared: LangiumSharedCoreServices;\n}\n\n/**\n * Creates a dependency injection module configuring the default core services.\n * This is a set of services that are dedicated to a specific language.\n */\nexport function createDefaultCoreModule(context: DefaultCoreModuleContext): Module {\n return {\n documentation: {\n CommentProvider: (services) => new DefaultCommentProvider(services),\n DocumentationProvider: (services) => new JSDocDocumentationProvider(services)\n },\n parser: {\n AsyncParser: (services) => new DefaultAsyncParser(services),\n GrammarConfig: (services) => createGrammarConfig(services),\n LangiumParser: (services) => createLangiumParser(services),\n CompletionParser: (services) => createCompletionParser(services),\n ValueConverter: () => new DefaultValueConverter(),\n TokenBuilder: () => new DefaultTokenBuilder(),\n Lexer: (services) => new DefaultLexer(services),\n ParserErrorMessageProvider: () => new LangiumParserErrorMessageProvider()\n },\n workspace: {\n AstNodeLocator: () => new DefaultAstNodeLocator(),\n AstNodeDescriptionProvider: (services) => new DefaultAstNodeDescriptionProvider(services),\n ReferenceDescriptionProvider: (services) => new DefaultReferenceDescriptionProvider(services)\n },\n references: {\n Linker: (services) => new DefaultLinker(services),\n NameProvider: () => new DefaultNameProvider(),\n ScopeProvider: (services) => new DefaultScopeProvider(services),\n ScopeComputation: (services) => new DefaultScopeComputation(services),\n References: (services) => new DefaultReferences(services)\n },\n serializer: {\n Hydrator: (services) => new DefaultHydrator(services),\n JsonSerializer: (services) => new DefaultJsonSerializer(services)\n },\n validation: {\n DocumentValidator: (services) => new DefaultDocumentValidator(services),\n ValidationRegistry: (services) => new ValidationRegistry(services)\n },\n shared: () => context.shared\n };\n}\n\n/**\n * Context required for creating the default shared dependency injection module.\n */\nexport interface DefaultSharedCoreModuleContext {\n /**\n * Factory function to create a {@link FileSystemProvider}.\n *\n * Langium exposes an `EmptyFileSystem` and `NodeFileSystem`, exported through `langium/node`.\n * When running Langium as part of a vscode language server or a Node.js app, using the `NodeFileSystem` is recommended,\n * the `EmptyFileSystem` in every other use case.\n */\n fileSystemProvider: (services: LangiumSharedCoreServices) => FileSystemProvider;\n}\n\n/**\n * Creates a dependency injection module configuring the default shared core services.\n * This is the set of services that are shared between multiple languages.\n */\nexport function createDefaultSharedCoreModule(context: DefaultSharedCoreModuleContext): Module {\n return {\n ServiceRegistry: () => new DefaultServiceRegistry(),\n workspace: {\n LangiumDocuments: (services) => new DefaultLangiumDocuments(services),\n LangiumDocumentFactory: (services) => new DefaultLangiumDocumentFactory(services),\n DocumentBuilder: (services) => new DefaultDocumentBuilder(services),\n IndexManager: (services) => new DefaultIndexManager(services),\n WorkspaceManager: (services) => new DefaultWorkspaceManager(services),\n FileSystemProvider: (services) => context.fileSystemProvider(services),\n WorkspaceLock: () => new DefaultWorkspaceLock(),\n ConfigurationProvider: (services) => new DefaultConfigurationProvider(services)\n }\n };\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A `Module` is a description of possibly grouped service factories.\n *\n * Given a type I = { group: { service: A } },\n * Module := { group: { service: (injector: I) => A } }\n *\n * Making `I` available during the creation of `I` allows us to create cyclic\n * dependencies.\n */\nexport type Module = {\n [K in keyof T]: Module | ((injector: I) => T[K])\n}\n\nexport namespace Module {\n export const merge = (m1: Module, m2: Module) => (_merge(_merge({}, m1), m2) as Module);\n}\n\n/**\n * Given a set of modules, the inject function returns a lazily evaluated injector\n * that injects dependencies into the requested service when it is requested the\n * first time. Subsequent requests will return the same service.\n *\n * In the case of cyclic dependencies, an Error will be thrown. This can be fixed\n * by injecting a provider `() => T` instead of a `T`.\n *\n * Please note that the arguments may be objects or arrays. However, the result will\n * be an object. Using it with for..of will have no effect.\n *\n * @param module1 first Module\n * @param module2 (optional) second Module\n * @param module3 (optional) third Module\n * @param module4 (optional) fourth Module\n * @param module5 (optional) fifth Module\n * @param module6 (optional) sixth Module\n * @param module7 (optional) seventh Module\n * @param module8 (optional) eighth Module\n * @param module9 (optional) ninth Module\n * @returns a new object of type I\n */\nexport function inject(\n module1: Module, module2?: Module, module3?: Module, module4?: Module, module5?: Module, module6?: Module, module7?: Module, module8?: Module, module9?: Module\n): I {\n const module = [module1, module2, module3, module4, module5, module6, module7, module8, module9].reduce(_merge, {}) as Module;\n return _inject(module);\n}\n\nconst isProxy = Symbol('isProxy');\n\n/**\n * Eagerly load all services in the given dependency injection container. This is sometimes\n * necessary because services can register event listeners in their constructors.\n */\nexport function eagerLoad(item: T): T {\n if (item && (item as any)[isProxy]) {\n for (const value of Object.values(item)) {\n eagerLoad(value);\n }\n }\n return item;\n}\n\n/**\n * Helper function that returns an injector by creating a proxy.\n * Invariant: injector is of type I. If injector is undefined, then T = I.\n */\nfunction _inject(module: Module, injector?: any): T {\n const proxy: any = new Proxy({} as any, {\n deleteProperty: () => false,\n get: (obj, prop) => _resolve(obj, prop, module, injector || proxy),\n getOwnPropertyDescriptor: (obj, prop) => (_resolve(obj, prop, module, injector || proxy), Object.getOwnPropertyDescriptor(obj, prop)), // used by for..in\n has: (_, prop) => prop in module, // used by ..in..\n ownKeys: () => [...Reflect.ownKeys(module), isProxy] // used by for..in\n });\n proxy[isProxy] = true;\n return proxy;\n}\n\n/**\n * Internally used to tag a requested dependency, directly before calling the factory.\n * This allows us to find cycles during instance creation.\n */\nconst __requested__ = Symbol();\n\n/**\n * Returns the value `obj[prop]`. If the value does not exist, yet, it is resolved from\n * the module description. The result of service factories is cached. Groups are\n * recursively proxied.\n *\n * @param obj an object holding all group proxies and services\n * @param prop the key of a value within obj\n * @param module an object containing groups and service factories\n * @param injector the first level proxy that provides access to all values\n * @returns the requested value `obj[prop]`\n * @throws Error if a dependency cycle is detected\n */\nfunction _resolve(obj: any, prop: string | symbol | number, module: Module, injector: I): T[keyof T] | undefined {\n if (prop in obj) {\n if (obj[prop] instanceof Error) {\n throw new Error('Construction failure. Please make sure that your dependencies are constructable.', {cause: obj[prop]});\n }\n if (obj[prop] === __requested__) {\n throw new Error('Cycle detected. Please make \"' + String(prop) + '\" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');\n }\n return obj[prop];\n } else if (prop in module) {\n const value: Module | ((injector: I) => T[keyof T]) = module[prop as keyof T];\n obj[prop] = __requested__;\n try {\n obj[prop] = (typeof value === 'function') ? value(injector) : _inject(value, injector);\n } catch (error) {\n obj[prop] = error instanceof Error ? error : undefined;\n throw error;\n }\n return obj[prop];\n } else {\n return undefined;\n }\n}\n\n/**\n * Performs a deep-merge of two modules by writing source entries into the target module.\n *\n * @param target the module which is written\n * @param source the module which is read\n * @returns the target module\n */\nfunction _merge(target: Module, source?: Module): Module {\n if (source) {\n for (const [key, value2] of Object.entries(source)) {\n if (value2 !== undefined) {\n const value1 = target[key];\n if (value1 !== null && value2 !== null && typeof value1 === 'object' && typeof value2 === 'object') {\n target[key] = _merge(value1, value2);\n } else {\n target[key] = value2;\n }\n }\n }\n }\n return target;\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n// Ensure that all imports are erased at runtime to avoid circular dependencies.\nimport type { IParserErrorMessageProvider } from 'chevrotain';\nimport type { CommentProvider } from './documentation/comment-provider.js';\nimport type { DocumentationProvider } from './documentation/documentation-provider.js';\nimport type { Grammar } from './languages/generated/ast.js';\nimport type { GrammarConfig } from './languages/grammar-config.js';\nimport type { LanguageMetaData } from './languages/language-meta-data.js';\nimport type { AsyncParser } from './parser/async-parser.js';\nimport type { LangiumCompletionParser, LangiumParser } from './parser/langium-parser.js';\nimport type { Lexer } from './parser/lexer.js';\nimport type { IParserConfig } from './parser/parser-config.js';\nimport type { TokenBuilder } from './parser/token-builder.js';\nimport type { ValueConverter } from './parser/value-converter.js';\nimport type { Linker } from './references/linker.js';\nimport type { NameProvider } from './references/name-provider.js';\nimport type { References } from './references/references.js';\nimport type { ScopeComputation } from './references/scope-computation.js';\nimport type { ScopeProvider } from './references/scope-provider.js';\nimport type { JsonSerializer } from './serializer/json-serializer.js';\nimport type { ServiceRegistry } from './service-registry.js';\nimport type { AstReflection } from './syntax-tree.js';\nimport type { DocumentValidator } from './validation/document-validator.js';\nimport type { ValidationRegistry } from './validation/validation-registry.js';\nimport type { AstNodeDescriptionProvider, ReferenceDescriptionProvider } from './workspace/ast-descriptions.js';\nimport type { AstNodeLocator } from './workspace/ast-node-locator.js';\nimport type { ConfigurationProvider } from './workspace/configuration.js';\nimport type { DocumentBuilder } from './workspace/document-builder.js';\nimport type { LangiumDocumentFactory, LangiumDocuments, TextDocumentProvider } from './workspace/documents.js';\nimport type { FileSystemProvider } from './workspace/file-system-provider.js';\nimport type { IndexManager } from './workspace/index-manager.js';\nimport type { WorkspaceLock } from './workspace/workspace-lock.js';\nimport type { Hydrator } from './serializer/hydrator.js';\nimport type { WorkspaceManager } from './workspace/workspace-manager.js';\n\n/**\n * The services generated by `langium-cli` for a specific language. These are derived from the\n * grammar definition and the language configuration.\n */\nexport type LangiumGeneratedCoreServices = {\n Grammar: Grammar\n LanguageMetaData: LanguageMetaData\n parser: {\n ParserConfig?: IParserConfig\n }\n}\n\n/**\n * Core services for a specific language of which Langium provides default implementations.\n */\nexport type LangiumDefaultCoreServices = {\n parser: {\n AsyncParser: AsyncParser\n GrammarConfig: GrammarConfig\n ValueConverter: ValueConverter\n LangiumParser: LangiumParser\n ParserErrorMessageProvider: IParserErrorMessageProvider\n CompletionParser: LangiumCompletionParser\n TokenBuilder: TokenBuilder\n Lexer: Lexer\n }\n documentation: {\n CommentProvider: CommentProvider\n DocumentationProvider: DocumentationProvider\n }\n references: {\n Linker: Linker\n NameProvider: NameProvider\n References: References\n ScopeProvider: ScopeProvider\n ScopeComputation: ScopeComputation\n }\n serializer: {\n Hydrator: Hydrator\n JsonSerializer: JsonSerializer\n }\n validation: {\n DocumentValidator: DocumentValidator\n ValidationRegistry: ValidationRegistry\n }\n workspace: {\n AstNodeLocator: AstNodeLocator\n AstNodeDescriptionProvider: AstNodeDescriptionProvider\n ReferenceDescriptionProvider: ReferenceDescriptionProvider\n }\n shared: LangiumSharedCoreServices\n}\n\n/**\n * The core set of services available for a language. These are either generated by `langium-cli`\n * or provided as default implementations.\n */\nexport type LangiumCoreServices = LangiumGeneratedCoreServices & LangiumDefaultCoreServices\n\n/**\n * The services generated by `langium-cli` that are shared between multiple languages. These are\n * derived from the grammar definition.\n */\nexport type LangiumGeneratedSharedCoreServices = {\n AstReflection: AstReflection\n}\n\n/**\n * Core services shared between multiple languages where Langium provides default implementations.\n */\nexport type LangiumDefaultSharedCoreServices = {\n ServiceRegistry: ServiceRegistry\n workspace: {\n ConfigurationProvider: ConfigurationProvider\n DocumentBuilder: DocumentBuilder\n FileSystemProvider: FileSystemProvider\n IndexManager: IndexManager\n LangiumDocuments: LangiumDocuments\n LangiumDocumentFactory: LangiumDocumentFactory\n TextDocuments?: TextDocumentProvider\n WorkspaceLock: WorkspaceLock\n WorkspaceManager: WorkspaceManager\n }\n}\n\n/**\n * The shared core services are a set of services that are used by every language within a Langium project (excluding LSP services)\n * This is necessary to enable features like cross references across different languages.\n */\nexport type LangiumSharedCoreServices = LangiumDefaultSharedCoreServices & LangiumGeneratedSharedCoreServices\n\n/**\n * A deep partial type definition for services. We look into T to see whether its type definition contains\n * any methods. If it does, it's one of our services and therefore should not be partialized.\n */\n//eslint-disable-next-line @typescript-eslint/ban-types\nexport type DeepPartial = T[keyof T] extends Function ? T : {\n [P in keyof T]?: DeepPartial;\n}\n\n/**\n * Language-specific core services to be partially overridden via dependency injection.\n */\nexport type PartialLangiumCoreServices = DeepPartial\n\n/**\n * Shared core services to be partially overridden via dependency injection.\n */\nexport type PartialLangiumSharedCoreServices = DeepPartial\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './comment-provider.js';\nexport * from './documentation-provider.js';\nexport * from './jsdoc.js';\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport interface LanguageMetaData {\n languageId: string;\n fileExtensions: readonly string[];\n caseInsensitive: boolean;\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './grammar-config.js';\nexport * from './language-meta-data.js';\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport type { IParserConfig } from 'chevrotain';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './async-parser.js';\nexport * from './completion-parser-builder.js';\nexport * from './cst-node-builder.js';\nexport * from './langium-parser-builder.js';\nexport * from './langium-parser.js';\nexport * from './lexer.js';\nexport * from './parser-config.js';\nexport * from './token-builder.js';\nexport * from './value-converter.js';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './linker.js';\nexport * from './name-provider.js';\nexport * from './references.js';\nexport * from './scope.js';\nexport * from './scope-computation.js';\nexport * from './scope-provider.js';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './hydrator.js';\nexport * from './json-serializer.js';\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { URI } from '../utils/uri-utils.js';\n\nexport interface FileSystemNode {\n readonly isFile: boolean;\n readonly isDirectory: boolean;\n readonly uri: URI;\n}\n\nexport type FileSystemFilter = (node: FileSystemNode) => boolean;\n\n/**\n * Provides methods to interact with an abstract file system. The default implementation is based on the node.js `fs` API.\n */\nexport interface FileSystemProvider {\n /**\n * Reads a document asynchronously from a given URI.\n * @returns The string content of the file with the specified URI.\n */\n readFile(uri: URI): Promise;\n /**\n * Reads the directory information for the given URI.\n * @returns The list of file system entries that are contained within the specified directory.\n */\n readDirectory(uri: URI): Promise;\n}\n\nexport class EmptyFileSystemProvider implements FileSystemProvider {\n\n readFile(): Promise {\n throw new Error('No file system is available.');\n }\n\n async readDirectory(): Promise {\n return [];\n }\n\n}\n\nexport const EmptyFileSystem = {\n fileSystemProvider: () => new EmptyFileSystemProvider()\n};\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { createDefaultCoreModule, createDefaultSharedCoreModule } from '../default-module.js';\nimport type { Module } from '../dependency-injection.js';\nimport { inject } from '../dependency-injection.js';\nimport * as ast from '../languages/generated/ast.js';\nimport type { LangiumCoreServices, LangiumSharedCoreServices, PartialLangiumCoreServices, PartialLangiumSharedCoreServices } from '../services.js';\nimport type { Mutable } from '../syntax-tree.js';\nimport { EmptyFileSystem } from '../workspace/file-system-provider.js';\nimport { URI } from './uri-utils.js';\n\nconst minimalGrammarModule: Module = {\n Grammar: () => undefined as unknown as ast.Grammar,\n LanguageMetaData: () => ({\n caseInsensitive: false,\n fileExtensions: ['.langium'],\n languageId: 'langium'\n })\n};\n\nconst minimalSharedGrammarModule: Module = {\n AstReflection: () => new ast.LangiumGrammarAstReflection()\n};\n\nfunction createMinimalGrammarServices(): LangiumCoreServices {\n const shared = inject(\n createDefaultSharedCoreModule(EmptyFileSystem),\n minimalSharedGrammarModule\n );\n const grammar = inject(\n createDefaultCoreModule({ shared }),\n minimalGrammarModule\n );\n shared.ServiceRegistry.register(grammar);\n return grammar;\n}\n\n/**\n * Load a Langium grammar for your language from a JSON string. This is used by several services,\n * most notably the parser builder which interprets the grammar to create a parser.\n */\nexport function loadGrammarFromJson(json: string): ast.Grammar {\n const services = createMinimalGrammarServices();\n const astNode = services.serializer.JsonSerializer.deserialize(json) as Mutable;\n services.shared.workspace.LangiumDocumentFactory.fromModel(astNode, URI.parse(`memory://${astNode.name ?? 'grammar'}.langium`));\n return astNode;\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './caching.js';\nexport * from './event.js';\nexport * from './collections.js';\nexport * from './disposable.js';\nexport * from './errors.js';\nexport * from './grammar-loader.js';\nexport * from './promise-utils.js';\nexport * from './stream.js';\nexport * from './uri-utils.js';\n\nimport * as AstUtils from './ast-utils.js';\nimport * as Cancellation from './cancellation.js';\nimport * as CstUtils from './cst-utils.js';\nimport * as GrammarUtils from './grammar-utils.js';\nimport * as RegExpUtils from './regexp-utils.js';\nexport { AstUtils, Cancellation, CstUtils, GrammarUtils, RegExpUtils };\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './document-validator.js';\nexport * from './validation-registry.js';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './ast-descriptions.js';\nexport * from './ast-node-locator.js';\nexport * from './configuration.js';\nexport * from './document-builder.js';\nexport * from './documents.js';\nexport * from './file-system-provider.js';\nexport * from './index-manager.js';\nexport * from './workspace-lock.js';\nexport * from './workspace-manager.js';\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './default-module.js';\nexport * from './dependency-injection.js';\nexport * from './service-registry.js';\nexport * from './services.js';\nexport * from './syntax-tree.js';\nexport * from './documentation/index.js';\nexport * from './languages/index.js';\nexport * from './parser/index.js';\nexport * from './references/index.js';\nexport * from './serializer/index.js';\nexport * from './utils/index.js';\nexport * from './validation/index.js';\nexport * from './workspace/index.js';\n\n// Export the Langium Grammar AST definitions in the `GrammarAST` namespace\nimport * as GrammarAST from './languages/generated/ast.js';\nimport type { Grammar } from './languages/generated/ast.js';\nexport { Grammar, GrammarAST };\n", "var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/language/generated/ast.ts\nimport { AbstractAstReflection } from \"langium\";\nvar Statement = \"Statement\";\nvar Architecture = \"Architecture\";\nfunction isArchitecture(item) {\n return reflection.isInstance(item, Architecture);\n}\n__name(isArchitecture, \"isArchitecture\");\nvar Branch = \"Branch\";\nfunction isBranch(item) {\n return reflection.isInstance(item, Branch);\n}\n__name(isBranch, \"isBranch\");\nvar Checkout = \"Checkout\";\nvar CherryPicking = \"CherryPicking\";\nvar Commit = \"Commit\";\nfunction isCommit(item) {\n return reflection.isInstance(item, Commit);\n}\n__name(isCommit, \"isCommit\");\nvar Common = \"Common\";\nfunction isCommon(item) {\n return reflection.isInstance(item, Common);\n}\n__name(isCommon, \"isCommon\");\nvar GitGraph = \"GitGraph\";\nfunction isGitGraph(item) {\n return reflection.isInstance(item, GitGraph);\n}\n__name(isGitGraph, \"isGitGraph\");\nvar Info = \"Info\";\nfunction isInfo(item) {\n return reflection.isInstance(item, Info);\n}\n__name(isInfo, \"isInfo\");\nvar Merge = \"Merge\";\nfunction isMerge(item) {\n return reflection.isInstance(item, Merge);\n}\n__name(isMerge, \"isMerge\");\nvar Packet = \"Packet\";\nfunction isPacket(item) {\n return reflection.isInstance(item, Packet);\n}\n__name(isPacket, \"isPacket\");\nvar PacketBlock = \"PacketBlock\";\nfunction isPacketBlock(item) {\n return reflection.isInstance(item, PacketBlock);\n}\n__name(isPacketBlock, \"isPacketBlock\");\nvar Pie = \"Pie\";\nfunction isPie(item) {\n return reflection.isInstance(item, Pie);\n}\n__name(isPie, \"isPie\");\nvar PieSection = \"PieSection\";\nfunction isPieSection(item) {\n return reflection.isInstance(item, PieSection);\n}\n__name(isPieSection, \"isPieSection\");\nvar Direction = \"Direction\";\nvar MermaidAstReflection = class extends AbstractAstReflection {\n static {\n __name(this, \"MermaidAstReflection\");\n }\n getAllTypes() {\n return [\"Architecture\", \"Branch\", \"Checkout\", \"CherryPicking\", \"Commit\", \"Common\", \"Direction\", \"Edge\", \"GitGraph\", \"Group\", \"Info\", \"Junction\", \"Merge\", \"Packet\", \"PacketBlock\", \"Pie\", \"PieSection\", \"Service\", \"Statement\"];\n }\n computeIsSubtype(subtype, supertype) {\n switch (subtype) {\n case Branch:\n case Checkout:\n case CherryPicking:\n case Commit:\n case Merge: {\n return this.isSubtype(Statement, supertype);\n }\n case Direction: {\n return this.isSubtype(GitGraph, supertype);\n }\n default: {\n return false;\n }\n }\n }\n getReferenceType(refInfo) {\n const referenceId = `${refInfo.container.$type}:${refInfo.property}`;\n switch (referenceId) {\n default: {\n throw new Error(`${referenceId} is not a valid reference id.`);\n }\n }\n }\n getTypeMetaData(type) {\n switch (type) {\n case \"Architecture\": {\n return {\n name: \"Architecture\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"edges\", defaultValue: [] },\n { name: \"groups\", defaultValue: [] },\n { name: \"junctions\", defaultValue: [] },\n { name: \"services\", defaultValue: [] },\n { name: \"title\" }\n ]\n };\n }\n case \"Branch\": {\n return {\n name: \"Branch\",\n properties: [\n { name: \"name\" },\n { name: \"order\" }\n ]\n };\n }\n case \"Checkout\": {\n return {\n name: \"Checkout\",\n properties: [\n { name: \"branch\" }\n ]\n };\n }\n case \"CherryPicking\": {\n return {\n name: \"CherryPicking\",\n properties: [\n { name: \"id\" },\n { name: \"parent\" },\n { name: \"tags\", defaultValue: [] }\n ]\n };\n }\n case \"Commit\": {\n return {\n name: \"Commit\",\n properties: [\n { name: \"id\" },\n { name: \"message\" },\n { name: \"tags\", defaultValue: [] },\n { name: \"type\" }\n ]\n };\n }\n case \"Common\": {\n return {\n name: \"Common\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"title\" }\n ]\n };\n }\n case \"Edge\": {\n return {\n name: \"Edge\",\n properties: [\n { name: \"lhsDir\" },\n { name: \"lhsGroup\", defaultValue: false },\n { name: \"lhsId\" },\n { name: \"lhsInto\", defaultValue: false },\n { name: \"rhsDir\" },\n { name: \"rhsGroup\", defaultValue: false },\n { name: \"rhsId\" },\n { name: \"rhsInto\", defaultValue: false },\n { name: \"title\" }\n ]\n };\n }\n case \"GitGraph\": {\n return {\n name: \"GitGraph\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"statements\", defaultValue: [] },\n { name: \"title\" }\n ]\n };\n }\n case \"Group\": {\n return {\n name: \"Group\",\n properties: [\n { name: \"icon\" },\n { name: \"id\" },\n { name: \"in\" },\n { name: \"title\" }\n ]\n };\n }\n case \"Info\": {\n return {\n name: \"Info\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"title\" }\n ]\n };\n }\n case \"Junction\": {\n return {\n name: \"Junction\",\n properties: [\n { name: \"id\" },\n { name: \"in\" }\n ]\n };\n }\n case \"Merge\": {\n return {\n name: \"Merge\",\n properties: [\n { name: \"branch\" },\n { name: \"id\" },\n { name: \"tags\", defaultValue: [] },\n { name: \"type\" }\n ]\n };\n }\n case \"Packet\": {\n return {\n name: \"Packet\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"blocks\", defaultValue: [] },\n { name: \"title\" }\n ]\n };\n }\n case \"PacketBlock\": {\n return {\n name: \"PacketBlock\",\n properties: [\n { name: \"end\" },\n { name: \"label\" },\n { name: \"start\" }\n ]\n };\n }\n case \"Pie\": {\n return {\n name: \"Pie\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"sections\", defaultValue: [] },\n { name: \"showData\", defaultValue: false },\n { name: \"title\" }\n ]\n };\n }\n case \"PieSection\": {\n return {\n name: \"PieSection\",\n properties: [\n { name: \"label\" },\n { name: \"value\" }\n ]\n };\n }\n case \"Service\": {\n return {\n name: \"Service\",\n properties: [\n { name: \"icon\" },\n { name: \"iconText\" },\n { name: \"id\" },\n { name: \"in\" },\n { name: \"title\" }\n ]\n };\n }\n case \"Direction\": {\n return {\n name: \"Direction\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"dir\" },\n { name: \"statements\", defaultValue: [] },\n { name: \"title\" }\n ]\n };\n }\n default: {\n return {\n name: type,\n properties: []\n };\n }\n }\n }\n};\nvar reflection = new MermaidAstReflection();\n\n// src/language/generated/grammar.ts\nimport { loadGrammarFromJson } from \"langium\";\nvar loadedInfoGrammar;\nvar InfoGrammar = /* @__PURE__ */ __name(() => loadedInfoGrammar ?? (loadedInfoGrammar = loadGrammarFromJson('{\"$type\":\"Grammar\",\"isDeclared\":true,\"name\":\"Info\",\"imports\":[],\"rules\":[{\"$type\":\"ParserRule\",\"name\":\"Info\",\"entry\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Keyword\",\"value\":\"info\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"showInfo\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[],\"cardinality\":\"*\"}],\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[],\"cardinality\":\"?\"}]},\"definesHiddenTokens\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"TitleAndAccessibilities\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"accDescr\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@4\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"accTitle\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[]}}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}],\"cardinality\":\"+\"},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"EOL\",\"fragment\":true,\"dataType\":\"string\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"EndOfFile\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"NEWLINE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\r?\\\\\\\\n/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_DESCR\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"WHITESPACE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]+/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"YAML\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"DIRECTIVE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"SINGLE_LINE_COMMENT\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/\"},\"fragment\":false}],\"definesHiddenTokens\":false,\"hiddenTokens\":[],\"interfaces\":[{\"$type\":\"Interface\",\"name\":\"Common\",\"attributes\":[{\"$type\":\"TypeAttribute\",\"name\":\"accDescr\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"accTitle\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"title\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}}],\"superTypes\":[]}],\"types\":[],\"usedGrammars\":[]}')), \"InfoGrammar\");\nvar loadedPacketGrammar;\nvar PacketGrammar = /* @__PURE__ */ __name(() => loadedPacketGrammar ?? (loadedPacketGrammar = loadGrammarFromJson(`{\"$type\":\"Grammar\",\"isDeclared\":true,\"name\":\"Packet\",\"imports\":[],\"rules\":[{\"$type\":\"ParserRule\",\"name\":\"Packet\",\"entry\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Keyword\",\"value\":\"packet-beta\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@4\"},\"arguments\":[]},{\"$type\":\"Assignment\",\"feature\":\"blocks\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]},\"cardinality\":\"*\"}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"Assignment\",\"feature\":\"blocks\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]},\"cardinality\":\"+\"}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"}]}]},\"definesHiddenTokens\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"PacketBlock\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"start\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"-\"},{\"$type\":\"Assignment\",\"feature\":\"end\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}}],\"cardinality\":\"?\"},{\"$type\":\"Keyword\",\"value\":\":\"},{\"$type\":\"Assignment\",\"feature\":\"label\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[]}},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"INT\",\"type\":{\"$type\":\"ReturnType\",\"name\":\"number\"},\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/0|[1-9][0-9]*/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"STRING\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\"[^\\\\\"]*\\\\\"|'[^']*'/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"ParserRule\",\"name\":\"TitleAndAccessibilities\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"accDescr\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@7\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"accTitle\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@8\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@9\"},\"arguments\":[]}}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}],\"cardinality\":\"+\"},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"EOL\",\"fragment\":true,\"dataType\":\"string\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"EndOfFile\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"NEWLINE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\r?\\\\\\\\n/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_DESCR\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"WHITESPACE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]+/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"YAML\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"DIRECTIVE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"SINGLE_LINE_COMMENT\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/\"},\"fragment\":false}],\"definesHiddenTokens\":false,\"hiddenTokens\":[],\"interfaces\":[{\"$type\":\"Interface\",\"name\":\"Common\",\"attributes\":[{\"$type\":\"TypeAttribute\",\"name\":\"accDescr\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"accTitle\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"title\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}}],\"superTypes\":[]}],\"types\":[],\"usedGrammars\":[]}`)), \"PacketGrammar\");\nvar loadedPieGrammar;\nvar PieGrammar = /* @__PURE__ */ __name(() => loadedPieGrammar ?? (loadedPieGrammar = loadGrammarFromJson('{\"$type\":\"Grammar\",\"isDeclared\":true,\"name\":\"Pie\",\"imports\":[],\"rules\":[{\"$type\":\"ParserRule\",\"name\":\"Pie\",\"entry\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Keyword\",\"value\":\"pie\"},{\"$type\":\"Assignment\",\"feature\":\"showData\",\"operator\":\"?=\",\"terminal\":{\"$type\":\"Keyword\",\"value\":\"showData\"},\"cardinality\":\"?\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@4\"},\"arguments\":[]},{\"$type\":\"Assignment\",\"feature\":\"sections\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]},\"cardinality\":\"*\"}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"Assignment\",\"feature\":\"sections\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]},\"cardinality\":\"+\"}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"}]}]},\"definesHiddenTokens\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"PieSection\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"label\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}},{\"$type\":\"Keyword\",\"value\":\":\"},{\"$type\":\"Assignment\",\"feature\":\"value\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[]}},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"PIE_SECTION_LABEL\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\"[^\\\\\"]+\\\\\"/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"PIE_SECTION_VALUE\",\"type\":{\"$type\":\"ReturnType\",\"name\":\"number\"},\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/(0|[1-9][0-9]*)(\\\\\\\\.[0-9]+)?/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"ParserRule\",\"name\":\"TitleAndAccessibilities\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"accDescr\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@7\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"accTitle\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@8\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@9\"},\"arguments\":[]}}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}],\"cardinality\":\"+\"},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"EOL\",\"fragment\":true,\"dataType\":\"string\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"EndOfFile\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"NEWLINE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\r?\\\\\\\\n/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_DESCR\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"WHITESPACE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]+/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"YAML\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"DIRECTIVE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"SINGLE_LINE_COMMENT\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/\"},\"fragment\":false}],\"definesHiddenTokens\":false,\"hiddenTokens\":[],\"interfaces\":[{\"$type\":\"Interface\",\"name\":\"Common\",\"attributes\":[{\"$type\":\"TypeAttribute\",\"name\":\"accDescr\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"accTitle\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"title\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}}],\"superTypes\":[]}],\"types\":[],\"usedGrammars\":[]}')), \"PieGrammar\");\nvar loadedArchitectureGrammar;\nvar ArchitectureGrammar = /* @__PURE__ */ __name(() => loadedArchitectureGrammar ?? (loadedArchitectureGrammar = loadGrammarFromJson('{\"$type\":\"Grammar\",\"isDeclared\":true,\"name\":\"Architecture\",\"imports\":[],\"rules\":[{\"$type\":\"ParserRule\",\"name\":\"Architecture\",\"entry\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@18\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Keyword\",\"value\":\"architecture-beta\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@18\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@16\"},\"arguments\":[]}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@18\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[],\"cardinality\":\"*\"}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@18\"},\"arguments\":[],\"cardinality\":\"*\"}]}]},\"definesHiddenTokens\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Statement\",\"fragment\":true,\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"groups\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"services\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"junctions\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@7\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"edges\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@8\"},\"arguments\":[]}}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"LeftPort\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\":\"},{\"$type\":\"Assignment\",\"feature\":\"lhsDir\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@9\"},\"arguments\":[]}}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"RightPort\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"rhsDir\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@9\"},\"arguments\":[]}},{\"$type\":\"Keyword\",\"value\":\":\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Arrow\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]},{\"$type\":\"Assignment\",\"feature\":\"lhsInto\",\"operator\":\"?=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@15\"},\"arguments\":[]},\"cardinality\":\"?\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"--\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"-\"},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@13\"},\"arguments\":[]}},{\"$type\":\"Keyword\",\"value\":\"-\"}]}]},{\"$type\":\"Assignment\",\"feature\":\"rhsInto\",\"operator\":\"?=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@15\"},\"arguments\":[]},\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Group\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"group\"},{\"$type\":\"Assignment\",\"feature\":\"id\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@10\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"icon\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@12\"},\"arguments\":[]},\"cardinality\":\"?\"},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@13\"},\"arguments\":[]},\"cardinality\":\"?\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"in\"},{\"$type\":\"Assignment\",\"feature\":\"in\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@10\"},\"arguments\":[]}}],\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@17\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Service\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"service\"},{\"$type\":\"Assignment\",\"feature\":\"id\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@10\"},\"arguments\":[]}},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"iconText\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@11\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"icon\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@12\"},\"arguments\":[]}}],\"cardinality\":\"?\"},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@13\"},\"arguments\":[]},\"cardinality\":\"?\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"in\"},{\"$type\":\"Assignment\",\"feature\":\"in\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@10\"},\"arguments\":[]}}],\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@17\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Junction\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"junction\"},{\"$type\":\"Assignment\",\"feature\":\"id\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@10\"},\"arguments\":[]}},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"in\"},{\"$type\":\"Assignment\",\"feature\":\"in\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@10\"},\"arguments\":[]}}],\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@17\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Edge\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"lhsId\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@10\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"lhsGroup\",\"operator\":\"?=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@14\"},\"arguments\":[]},\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@4\"},\"arguments\":[]},{\"$type\":\"Assignment\",\"feature\":\"rhsId\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@10\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"rhsGroup\",\"operator\":\"?=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@14\"},\"arguments\":[]},\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@17\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"ARROW_DIRECTION\",\"definition\":{\"$type\":\"TerminalAlternatives\",\"elements\":[{\"$type\":\"TerminalAlternatives\",\"elements\":[{\"$type\":\"TerminalAlternatives\",\"elements\":[{\"$type\":\"CharacterRange\",\"left\":{\"$type\":\"Keyword\",\"value\":\"L\"}},{\"$type\":\"CharacterRange\",\"left\":{\"$type\":\"Keyword\",\"value\":\"R\"}}]},{\"$type\":\"CharacterRange\",\"left\":{\"$type\":\"Keyword\",\"value\":\"T\"}}]},{\"$type\":\"CharacterRange\",\"left\":{\"$type\":\"Keyword\",\"value\":\"B\"}}]},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ARCH_ID\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\w]+/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ARCH_TEXT_ICON\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\(\\\\\"[^\\\\\"]+\\\\\"\\\\\\\\)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ARCH_ICON\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\([\\\\\\\\w-:]+\\\\\\\\)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ARCH_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\[[\\\\\\\\w ]+\\\\\\\\]/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ARROW_GROUP\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\{group\\\\\\\\}/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ARROW_INTO\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/<|>/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"ParserRule\",\"name\":\"TitleAndAccessibilities\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"accDescr\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@19\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"accTitle\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@21\"},\"arguments\":[]}}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@17\"},\"arguments\":[]}],\"cardinality\":\"+\"},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"EOL\",\"fragment\":true,\"dataType\":\"string\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@18\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"EndOfFile\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"NEWLINE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\r?\\\\\\\\n/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_DESCR\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"WHITESPACE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]+/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"YAML\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"DIRECTIVE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"SINGLE_LINE_COMMENT\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/\"},\"fragment\":false}],\"definesHiddenTokens\":false,\"hiddenTokens\":[],\"interfaces\":[{\"$type\":\"Interface\",\"name\":\"Common\",\"attributes\":[{\"$type\":\"TypeAttribute\",\"name\":\"accDescr\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"accTitle\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"title\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}}],\"superTypes\":[]}],\"types\":[],\"usedGrammars\":[]}')), \"ArchitectureGrammar\");\nvar loadedGitGraphGrammar;\nvar GitGraphGrammar = /* @__PURE__ */ __name(() => loadedGitGraphGrammar ?? (loadedGitGraphGrammar = loadGrammarFromJson(`{\"$type\":\"Grammar\",\"isDeclared\":true,\"name\":\"GitGraph\",\"interfaces\":[{\"$type\":\"Interface\",\"name\":\"Common\",\"attributes\":[{\"$type\":\"TypeAttribute\",\"name\":\"accDescr\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"accTitle\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"title\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}}],\"superTypes\":[]}],\"rules\":[{\"$type\":\"ParserRule\",\"name\":\"TitleAndAccessibilities\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"accDescr\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"accTitle\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@4\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}],\"cardinality\":\"+\"},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"EOL\",\"fragment\":true,\"dataType\":\"string\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"EndOfFile\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"NEWLINE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\r?\\\\\\\\n/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_DESCR\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"WHITESPACE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]+/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"YAML\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"DIRECTIVE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"SINGLE_LINE_COMMENT\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/\"},\"fragment\":false},{\"$type\":\"ParserRule\",\"name\":\"GitGraph\",\"entry\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"gitGraph\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"gitGraph\"},{\"$type\":\"Keyword\",\"value\":\":\"}]},{\"$type\":\"Keyword\",\"value\":\"gitGraph:\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"gitGraph\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@12\"},\"arguments\":[]},{\"$type\":\"Keyword\",\"value\":\":\"}]}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@0\"},\"arguments\":[]},{\"$type\":\"Assignment\",\"feature\":\"statements\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@11\"},\"arguments\":[]}},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}],\"cardinality\":\"*\"}]}]},\"definesHiddenTokens\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Statement\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@13\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@14\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@15\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@16\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@17\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Direction\",\"definition\":{\"$type\":\"Assignment\",\"feature\":\"dir\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"LR\"},{\"$type\":\"Keyword\",\"value\":\"TB\"},{\"$type\":\"Keyword\",\"value\":\"BT\"}]}},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Commit\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"commit\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"id:\"},{\"$type\":\"Assignment\",\"feature\":\"id\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"msg:\",\"cardinality\":\"?\"},{\"$type\":\"Assignment\",\"feature\":\"message\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"tag:\"},{\"$type\":\"Assignment\",\"feature\":\"tags\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"type:\"},{\"$type\":\"Assignment\",\"feature\":\"type\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"NORMAL\"},{\"$type\":\"Keyword\",\"value\":\"REVERSE\"},{\"$type\":\"Keyword\",\"value\":\"HIGHLIGHT\"}]}}]}],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Branch\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"branch\"},{\"$type\":\"Assignment\",\"feature\":\"name\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@19\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}]}},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"order:\"},{\"$type\":\"Assignment\",\"feature\":\"order\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@18\"},\"arguments\":[]}}],\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Merge\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"merge\"},{\"$type\":\"Assignment\",\"feature\":\"branch\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@19\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}]}},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"id:\"},{\"$type\":\"Assignment\",\"feature\":\"id\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"tag:\"},{\"$type\":\"Assignment\",\"feature\":\"tags\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"type:\"},{\"$type\":\"Assignment\",\"feature\":\"type\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"NORMAL\"},{\"$type\":\"Keyword\",\"value\":\"REVERSE\"},{\"$type\":\"Keyword\",\"value\":\"HIGHLIGHT\"}]}}]}],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Checkout\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"checkout\"},{\"$type\":\"Keyword\",\"value\":\"switch\"}]},{\"$type\":\"Assignment\",\"feature\":\"branch\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@19\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}]}},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"CherryPicking\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"cherry-pick\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"id:\"},{\"$type\":\"Assignment\",\"feature\":\"id\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"tag:\"},{\"$type\":\"Assignment\",\"feature\":\"tags\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"parent:\"},{\"$type\":\"Assignment\",\"feature\":\"parent\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]}],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"INT\",\"type\":{\"$type\":\"ReturnType\",\"name\":\"number\"},\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[0-9]+(?=\\\\\\\\s)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ID\",\"type\":{\"$type\":\"ReturnType\",\"name\":\"string\"},\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\w([-\\\\\\\\./\\\\\\\\w]*[-\\\\\\\\w])?/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"STRING\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\"[^\\\\\"]*\\\\\"|'[^']*'/\"},\"fragment\":false,\"hidden\":false}],\"definesHiddenTokens\":false,\"hiddenTokens\":[],\"imports\":[],\"types\":[],\"usedGrammars\":[]}`)), \"GitGraphGrammar\");\n\n// src/language/generated/module.ts\nvar InfoLanguageMetaData = {\n languageId: \"info\",\n fileExtensions: [\".mmd\", \".mermaid\"],\n caseInsensitive: false\n};\nvar PacketLanguageMetaData = {\n languageId: \"packet\",\n fileExtensions: [\".mmd\", \".mermaid\"],\n caseInsensitive: false\n};\nvar PieLanguageMetaData = {\n languageId: \"pie\",\n fileExtensions: [\".mmd\", \".mermaid\"],\n caseInsensitive: false\n};\nvar ArchitectureLanguageMetaData = {\n languageId: \"architecture\",\n fileExtensions: [\".mmd\", \".mermaid\"],\n caseInsensitive: false\n};\nvar GitGraphLanguageMetaData = {\n languageId: \"gitGraph\",\n fileExtensions: [\".mmd\", \".mermaid\"],\n caseInsensitive: false\n};\nvar MermaidGeneratedSharedModule = {\n AstReflection: /* @__PURE__ */ __name(() => new MermaidAstReflection(), \"AstReflection\")\n};\nvar InfoGeneratedModule = {\n Grammar: /* @__PURE__ */ __name(() => InfoGrammar(), \"Grammar\"),\n LanguageMetaData: /* @__PURE__ */ __name(() => InfoLanguageMetaData, \"LanguageMetaData\"),\n parser: {}\n};\nvar PacketGeneratedModule = {\n Grammar: /* @__PURE__ */ __name(() => PacketGrammar(), \"Grammar\"),\n LanguageMetaData: /* @__PURE__ */ __name(() => PacketLanguageMetaData, \"LanguageMetaData\"),\n parser: {}\n};\nvar PieGeneratedModule = {\n Grammar: /* @__PURE__ */ __name(() => PieGrammar(), \"Grammar\"),\n LanguageMetaData: /* @__PURE__ */ __name(() => PieLanguageMetaData, \"LanguageMetaData\"),\n parser: {}\n};\nvar ArchitectureGeneratedModule = {\n Grammar: /* @__PURE__ */ __name(() => ArchitectureGrammar(), \"Grammar\"),\n LanguageMetaData: /* @__PURE__ */ __name(() => ArchitectureLanguageMetaData, \"LanguageMetaData\"),\n parser: {}\n};\nvar GitGraphGeneratedModule = {\n Grammar: /* @__PURE__ */ __name(() => GitGraphGrammar(), \"Grammar\"),\n LanguageMetaData: /* @__PURE__ */ __name(() => GitGraphLanguageMetaData, \"LanguageMetaData\"),\n parser: {}\n};\n\n// src/language/common/valueConverter.ts\nimport { DefaultValueConverter } from \"langium\";\n\n// src/language/common/matcher.ts\nvar accessibilityDescrRegex = /accDescr(?:[\\t ]*:([^\\n\\r]*)|\\s*{([^}]*)})/;\nvar accessibilityTitleRegex = /accTitle[\\t ]*:([^\\n\\r]*)/;\nvar titleRegex = /title([\\t ][^\\n\\r]*|)/;\n\n// src/language/common/valueConverter.ts\nvar rulesRegexes = {\n ACC_DESCR: accessibilityDescrRegex,\n ACC_TITLE: accessibilityTitleRegex,\n TITLE: titleRegex\n};\nvar AbstractMermaidValueConverter = class extends DefaultValueConverter {\n static {\n __name(this, \"AbstractMermaidValueConverter\");\n }\n runConverter(rule, input, cstNode) {\n let value = this.runCommonConverter(rule, input, cstNode);\n if (value === void 0) {\n value = this.runCustomConverter(rule, input, cstNode);\n }\n if (value === void 0) {\n return super.runConverter(rule, input, cstNode);\n }\n return value;\n }\n runCommonConverter(rule, input, _cstNode) {\n const regex = rulesRegexes[rule.name];\n if (regex === void 0) {\n return void 0;\n }\n const match = regex.exec(input);\n if (match === null) {\n return void 0;\n }\n if (match[1] !== void 0) {\n return match[1].trim().replace(/[\\t ]{2,}/gm, \" \");\n }\n if (match[2] !== void 0) {\n return match[2].replace(/^\\s*/gm, \"\").replace(/\\s+$/gm, \"\").replace(/[\\t ]{2,}/gm, \" \").replace(/[\\n\\r]{2,}/gm, \"\\n\");\n }\n return void 0;\n }\n};\nvar CommonValueConverter = class extends AbstractMermaidValueConverter {\n static {\n __name(this, \"CommonValueConverter\");\n }\n runCustomConverter(_rule, _input, _cstNode) {\n return void 0;\n }\n};\n\n// src/language/common/tokenBuilder.ts\nimport { DefaultTokenBuilder } from \"langium\";\nvar AbstractMermaidTokenBuilder = class extends DefaultTokenBuilder {\n static {\n __name(this, \"AbstractMermaidTokenBuilder\");\n }\n constructor(keywords) {\n super();\n this.keywords = new Set(keywords);\n }\n buildKeywordTokens(rules, terminalTokens, options) {\n const tokenTypes = super.buildKeywordTokens(rules, terminalTokens, options);\n tokenTypes.forEach((tokenType) => {\n if (this.keywords.has(tokenType.name) && tokenType.PATTERN !== void 0) {\n tokenType.PATTERN = new RegExp(tokenType.PATTERN.toString() + \"(?:(?=%%)|(?!\\\\S))\");\n }\n });\n return tokenTypes;\n }\n};\nvar CommonTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"CommonTokenBuilder\");\n }\n};\n\nexport {\n __name,\n Statement,\n Architecture,\n isArchitecture,\n Branch,\n isBranch,\n Commit,\n isCommit,\n isCommon,\n GitGraph,\n isGitGraph,\n Info,\n isInfo,\n Merge,\n isMerge,\n Packet,\n isPacket,\n PacketBlock,\n isPacketBlock,\n Pie,\n isPie,\n PieSection,\n isPieSection,\n MermaidGeneratedSharedModule,\n InfoGeneratedModule,\n PacketGeneratedModule,\n PieGeneratedModule,\n ArchitectureGeneratedModule,\n GitGraphGeneratedModule,\n AbstractMermaidValueConverter,\n CommonValueConverter,\n AbstractMermaidTokenBuilder,\n CommonTokenBuilder\n};\n", "import {\n AbstractMermaidTokenBuilder,\n CommonValueConverter,\n GitGraphGeneratedModule,\n MermaidGeneratedSharedModule,\n __name\n} from \"./chunk-Y27MQZ3U.mjs\";\n\n// src/language/gitGraph/module.ts\nimport {\n inject,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n EmptyFileSystem\n} from \"langium\";\n\n// src/language/gitGraph/tokenBuilder.ts\nvar GitGraphTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"GitGraphTokenBuilder\");\n }\n constructor() {\n super([\"gitGraph\"]);\n }\n};\n\n// src/language/gitGraph/module.ts\nvar GitGraphModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new GitGraphTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new CommonValueConverter(), \"ValueConverter\")\n }\n};\nfunction createGitGraphServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const GitGraph = inject(\n createDefaultCoreModule({ shared }),\n GitGraphGeneratedModule,\n GitGraphModule\n );\n shared.ServiceRegistry.register(GitGraph);\n return { shared, GitGraph };\n}\n__name(createGitGraphServices, \"createGitGraphServices\");\n\nexport {\n GitGraphModule,\n createGitGraphServices\n};\n", "import {\n AbstractMermaidTokenBuilder,\n CommonValueConverter,\n InfoGeneratedModule,\n MermaidGeneratedSharedModule,\n __name\n} from \"./chunk-Y27MQZ3U.mjs\";\n\n// src/language/info/module.ts\nimport {\n EmptyFileSystem,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n inject\n} from \"langium\";\n\n// src/language/info/tokenBuilder.ts\nvar InfoTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"InfoTokenBuilder\");\n }\n constructor() {\n super([\"info\", \"showInfo\"]);\n }\n};\n\n// src/language/info/module.ts\nvar InfoModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new InfoTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new CommonValueConverter(), \"ValueConverter\")\n }\n};\nfunction createInfoServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const Info = inject(\n createDefaultCoreModule({ shared }),\n InfoGeneratedModule,\n InfoModule\n );\n shared.ServiceRegistry.register(Info);\n return { shared, Info };\n}\n__name(createInfoServices, \"createInfoServices\");\n\nexport {\n InfoModule,\n createInfoServices\n};\n", "import {\n AbstractMermaidTokenBuilder,\n CommonValueConverter,\n MermaidGeneratedSharedModule,\n PacketGeneratedModule,\n __name\n} from \"./chunk-Y27MQZ3U.mjs\";\n\n// src/language/packet/module.ts\nimport {\n EmptyFileSystem,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n inject\n} from \"langium\";\n\n// src/language/packet/tokenBuilder.ts\nvar PacketTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"PacketTokenBuilder\");\n }\n constructor() {\n super([\"packet-beta\"]);\n }\n};\n\n// src/language/packet/module.ts\nvar PacketModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new PacketTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new CommonValueConverter(), \"ValueConverter\")\n }\n};\nfunction createPacketServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const Packet = inject(\n createDefaultCoreModule({ shared }),\n PacketGeneratedModule,\n PacketModule\n );\n shared.ServiceRegistry.register(Packet);\n return { shared, Packet };\n}\n__name(createPacketServices, \"createPacketServices\");\n\nexport {\n PacketModule,\n createPacketServices\n};\n", "import {\n AbstractMermaidTokenBuilder,\n AbstractMermaidValueConverter,\n MermaidGeneratedSharedModule,\n PieGeneratedModule,\n __name\n} from \"./chunk-Y27MQZ3U.mjs\";\n\n// src/language/pie/module.ts\nimport {\n EmptyFileSystem,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n inject\n} from \"langium\";\n\n// src/language/pie/tokenBuilder.ts\nvar PieTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"PieTokenBuilder\");\n }\n constructor() {\n super([\"pie\", \"showData\"]);\n }\n};\n\n// src/language/pie/valueConverter.ts\nvar PieValueConverter = class extends AbstractMermaidValueConverter {\n static {\n __name(this, \"PieValueConverter\");\n }\n runCustomConverter(rule, input, _cstNode) {\n if (rule.name !== \"PIE_SECTION_LABEL\") {\n return void 0;\n }\n return input.replace(/\"/g, \"\").trim();\n }\n};\n\n// src/language/pie/module.ts\nvar PieModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new PieTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new PieValueConverter(), \"ValueConverter\")\n }\n};\nfunction createPieServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const Pie = inject(\n createDefaultCoreModule({ shared }),\n PieGeneratedModule,\n PieModule\n );\n shared.ServiceRegistry.register(Pie);\n return { shared, Pie };\n}\n__name(createPieServices, \"createPieServices\");\n\nexport {\n PieModule,\n createPieServices\n};\n", "import {\n AbstractMermaidTokenBuilder,\n AbstractMermaidValueConverter,\n ArchitectureGeneratedModule,\n MermaidGeneratedSharedModule,\n __name\n} from \"./chunk-Y27MQZ3U.mjs\";\n\n// src/language/architecture/module.ts\nimport {\n EmptyFileSystem,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n inject\n} from \"langium\";\n\n// src/language/architecture/tokenBuilder.ts\nvar ArchitectureTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"ArchitectureTokenBuilder\");\n }\n constructor() {\n super([\"architecture\"]);\n }\n};\n\n// src/language/architecture/valueConverter.ts\nvar ArchitectureValueConverter = class extends AbstractMermaidValueConverter {\n static {\n __name(this, \"ArchitectureValueConverter\");\n }\n runCustomConverter(rule, input, _cstNode) {\n if (rule.name === \"ARCH_ICON\") {\n return input.replace(/[()]/g, \"\").trim();\n } else if (rule.name === \"ARCH_TEXT_ICON\") {\n return input.replace(/[\"()]/g, \"\");\n } else if (rule.name === \"ARCH_TITLE\") {\n return input.replace(/[[\\]]/g, \"\").trim();\n }\n return void 0;\n }\n};\n\n// src/language/architecture/module.ts\nvar ArchitectureModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new ArchitectureTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new ArchitectureValueConverter(), \"ValueConverter\")\n }\n};\nfunction createArchitectureServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const Architecture = inject(\n createDefaultCoreModule({ shared }),\n ArchitectureGeneratedModule,\n ArchitectureModule\n );\n shared.ServiceRegistry.register(Architecture);\n return { shared, Architecture };\n}\n__name(createArchitectureServices, \"createArchitectureServices\");\n\nexport {\n ArchitectureModule,\n createArchitectureServices\n};\n", "import {\n InfoModule,\n createInfoServices\n} from \"./chunk-4YFB5VUC.mjs\";\nimport \"./chunk-Y27MQZ3U.mjs\";\nexport {\n InfoModule,\n createInfoServices\n};\n", "import {\n PacketModule,\n createPacketServices\n} from \"./chunk-EQFLFMNE.mjs\";\nimport \"./chunk-Y27MQZ3U.mjs\";\nexport {\n PacketModule,\n createPacketServices\n};\n", "import {\n PieModule,\n createPieServices\n} from \"./chunk-BI6EQKOQ.mjs\";\nimport \"./chunk-Y27MQZ3U.mjs\";\nexport {\n PieModule,\n createPieServices\n};\n", "import {\n ArchitectureModule,\n createArchitectureServices\n} from \"./chunk-FF7BQXOH.mjs\";\nimport \"./chunk-Y27MQZ3U.mjs\";\nexport {\n ArchitectureModule,\n createArchitectureServices\n};\n", "import {\n GitGraphModule,\n createGitGraphServices\n} from \"./chunk-NCMFTTUW.mjs\";\nimport \"./chunk-Y27MQZ3U.mjs\";\nexport {\n GitGraphModule,\n createGitGraphServices\n};\n", "import {\n GitGraphModule,\n createGitGraphServices\n} from \"./chunks/mermaid-parser.core/chunk-NCMFTTUW.mjs\";\nimport {\n InfoModule,\n createInfoServices\n} from \"./chunks/mermaid-parser.core/chunk-4YFB5VUC.mjs\";\nimport {\n PacketModule,\n createPacketServices\n} from \"./chunks/mermaid-parser.core/chunk-EQFLFMNE.mjs\";\nimport {\n PieModule,\n createPieServices\n} from \"./chunks/mermaid-parser.core/chunk-BI6EQKOQ.mjs\";\nimport {\n ArchitectureModule,\n createArchitectureServices\n} from \"./chunks/mermaid-parser.core/chunk-FF7BQXOH.mjs\";\nimport {\n AbstractMermaidTokenBuilder,\n AbstractMermaidValueConverter,\n Architecture,\n ArchitectureGeneratedModule,\n Branch,\n Commit,\n CommonTokenBuilder,\n CommonValueConverter,\n GitGraph,\n GitGraphGeneratedModule,\n Info,\n InfoGeneratedModule,\n Merge,\n MermaidGeneratedSharedModule,\n Packet,\n PacketBlock,\n PacketGeneratedModule,\n Pie,\n PieGeneratedModule,\n PieSection,\n Statement,\n __name,\n isArchitecture,\n isBranch,\n isCommit,\n isCommon,\n isGitGraph,\n isInfo,\n isMerge,\n isPacket,\n isPacketBlock,\n isPie,\n isPieSection\n} from \"./chunks/mermaid-parser.core/chunk-Y27MQZ3U.mjs\";\n\n// src/parse.ts\nvar parsers = {};\nvar initializers = {\n info: /* @__PURE__ */ __name(async () => {\n const { createInfoServices: createInfoServices2 } = await import(\"./chunks/mermaid-parser.core/info-46DW6VJ7.mjs\");\n const parser = createInfoServices2().Info.parser.LangiumParser;\n parsers.info = parser;\n }, \"info\"),\n packet: /* @__PURE__ */ __name(async () => {\n const { createPacketServices: createPacketServices2 } = await import(\"./chunks/mermaid-parser.core/packet-W2GHVCYJ.mjs\");\n const parser = createPacketServices2().Packet.parser.LangiumParser;\n parsers.packet = parser;\n }, \"packet\"),\n pie: /* @__PURE__ */ __name(async () => {\n const { createPieServices: createPieServices2 } = await import(\"./chunks/mermaid-parser.core/pie-BEWT4RHE.mjs\");\n const parser = createPieServices2().Pie.parser.LangiumParser;\n parsers.pie = parser;\n }, \"pie\"),\n architecture: /* @__PURE__ */ __name(async () => {\n const { createArchitectureServices: createArchitectureServices2 } = await import(\"./chunks/mermaid-parser.core/architecture-I3QFYML2.mjs\");\n const parser = createArchitectureServices2().Architecture.parser.LangiumParser;\n parsers.architecture = parser;\n }, \"architecture\"),\n gitGraph: /* @__PURE__ */ __name(async () => {\n const { createGitGraphServices: createGitGraphServices2 } = await import(\"./chunks/mermaid-parser.core/gitGraph-YCYPL57B.mjs\");\n const parser = createGitGraphServices2().GitGraph.parser.LangiumParser;\n parsers.gitGraph = parser;\n }, \"gitGraph\")\n};\nasync function parse(diagramType, text) {\n const initializer = initializers[diagramType];\n if (!initializer) {\n throw new Error(`Unknown diagram type: ${diagramType}`);\n }\n if (!parsers[diagramType]) {\n await initializer();\n }\n const parser = parsers[diagramType];\n const result = parser.parse(text);\n if (result.lexerErrors.length > 0 || result.parserErrors.length > 0) {\n throw new MermaidParseError(result);\n }\n return result.value;\n}\n__name(parse, \"parse\");\nvar MermaidParseError = class extends Error {\n constructor(result) {\n const lexerErrors = result.lexerErrors.map((err) => err.message).join(\"\\n\");\n const parserErrors = result.parserErrors.map((err) => err.message).join(\"\\n\");\n super(`Parsing failed: ${lexerErrors} ${parserErrors}`);\n this.result = result;\n }\n static {\n __name(this, \"MermaidParseError\");\n }\n};\nexport {\n AbstractMermaidTokenBuilder,\n AbstractMermaidValueConverter,\n Architecture,\n ArchitectureGeneratedModule,\n ArchitectureModule,\n Branch,\n Commit,\n CommonTokenBuilder,\n CommonValueConverter,\n GitGraph,\n GitGraphGeneratedModule,\n GitGraphModule,\n Info,\n InfoGeneratedModule,\n InfoModule,\n Merge,\n MermaidGeneratedSharedModule,\n MermaidParseError,\n Packet,\n PacketBlock,\n PacketGeneratedModule,\n PacketModule,\n Pie,\n PieGeneratedModule,\n PieModule,\n PieSection,\n Statement,\n createArchitectureServices,\n createGitGraphServices,\n createInfoServices,\n createPacketServices,\n createPieServices,\n isArchitecture,\n isBranch,\n isCommit,\n isCommon,\n isGitGraph,\n isInfo,\n isMerge,\n isPacket,\n isPacketBlock,\n isPie,\n isPieSection,\n parse\n};\n", "import type { DiagramAST } from '@mermaid-js/parser';\nimport type { DiagramDB } from '../../diagram-api/types.js';\n\nexport function populateCommonDb(ast: DiagramAST, db: DiagramDB) {\n if (ast.accDescr) {\n db.setAccDescription?.(ast.accDescr);\n }\n if (ast.accTitle) {\n db.setAccTitle?.(ast.accTitle);\n }\n if (ast.title) {\n db.setDiagramTitle?.(ast.title);\n }\n}\n", "import type { GitGraphDiagramConfig } from '../../config.type.js';\nimport type { DiagramDBBase } from '../../diagram-api/types.js';\n\nexport const commitType = {\n NORMAL: 0,\n REVERSE: 1,\n HIGHLIGHT: 2,\n MERGE: 3,\n CHERRY_PICK: 4,\n} as const;\n\nexport interface CommitDB {\n msg: string;\n id: string;\n type: number;\n tags?: string[];\n}\n\nexport interface BranchDB {\n name: string;\n order: number;\n}\n\nexport interface MergeDB {\n branch: string;\n id: string;\n type?: number;\n tags?: string[];\n}\n\nexport interface CherryPickDB {\n id: string;\n targetId: string;\n parent: string;\n tags?: string[];\n}\n\nexport interface Commit {\n id: string;\n message: string;\n seq: number;\n type: number;\n tags: string[];\n parents: string[];\n branch: string;\n customType?: number;\n customId?: boolean;\n}\n\nexport interface GitGraph {\n statements: Statement[];\n}\n\nexport type Statement = CommitAst | BranchAst | MergeAst | CheckoutAst | CherryPickingAst;\n\nexport interface CommitAst {\n $type: 'Commit';\n id: string;\n message?: string;\n tags?: string[];\n type?: 'NORMAL' | 'REVERSE' | 'HIGHLIGHT';\n}\n\nexport interface BranchAst {\n $type: 'Branch';\n name: string;\n order?: number;\n}\n\nexport interface MergeAst {\n $type: 'Merge';\n branch: string;\n id?: string;\n tags?: string[];\n type?: 'NORMAL' | 'REVERSE' | 'HIGHLIGHT';\n}\n\nexport interface CheckoutAst {\n $type: 'Checkout';\n branch: string;\n}\n\nexport interface CherryPickingAst {\n $type: 'CherryPicking';\n id: string;\n parent: string;\n tags?: string[];\n}\n\nexport interface GitGraphDB extends DiagramDBBase {\n commitType: typeof commitType;\n setDirection: (dir: DiagramOrientation) => void;\n setOptions: (rawOptString: string) => void;\n getOptions: () => any;\n commit: (commitDB: CommitDB) => void;\n branch: (branchDB: BranchDB) => void;\n merge: (mergeDB: MergeDB) => void;\n cherryPick: (cherryPickDB: CherryPickDB) => void;\n checkout: (branch: string) => void;\n prettyPrint: () => void;\n clear: () => void;\n getBranchesAsObjArray: () => { name: string }[];\n getBranches: () => Map;\n getCommits: () => Map;\n getCommitsArray: () => Commit[];\n getCurrentBranch: () => string;\n getDirection: () => DiagramOrientation;\n getHead: () => Commit | null;\n}\n\nexport interface GitGraphDBParseProvider extends Partial {\n commitType: typeof commitType;\n setDirection: (dir: DiagramOrientation) => void;\n commit: (commitDB: CommitDB) => void;\n branch: (branchDB: BranchDB) => void;\n merge: (mergeDB: MergeDB) => void;\n cherryPick: (cherryPickDB: CherryPickDB) => void;\n checkout: (branch: string) => void;\n}\n\nexport interface GitGraphDBRenderProvider extends Partial {\n prettyPrint: () => void;\n clear: () => void;\n getBranchesAsObjArray: () => { name: string }[];\n getBranches: () => Map;\n getCommits: () => Map;\n getCommitsArray: () => Commit[];\n getCurrentBranch: () => string;\n getDirection: () => DiagramOrientation;\n getHead: () => Commit | null;\n getDiagramTitle: () => string;\n}\n\nexport type DiagramOrientation = 'LR' | 'TB' | 'BT';\n", "/**\n * Resettable state storage.\n * @example\n * ```\n * const state = new ImperativeState(() => ({\n * foo: undefined as string | undefined,\n * bar: [] as number[],\n * baz: 1 as number | undefined,\n * }));\n *\n * state.records.foo = \"hi\";\n * console.log(state.records.foo); // prints \"hi\";\n * state.reset();\n * console.log(state.records.foo); // prints \"default\";\n *\n * // typeof state.records:\n * // {\n * // foo: string | undefined, // actual: undefined\n * // bar: number[], // actual: []\n * // baz: number | undefined, // actual: 1\n * // }\n * ```\n */\nexport class ImperativeState {\n public records: S;\n\n /**\n * @param init - Function that creates the default state.\n */\n constructor(private init: () => S) {\n this.records = this.init();\n }\n\n reset() {\n this.records = this.init();\n }\n}\n", "import { log } from '../../logger.js';\nimport { cleanAndMerge, random } from '../../utils.js';\nimport { getConfig as commonGetConfig } from '../../config.js';\nimport common from '../common/common.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\nimport type {\n DiagramOrientation,\n Commit,\n GitGraphDB,\n CommitDB,\n MergeDB,\n BranchDB,\n CherryPickDB,\n} from './gitGraphTypes.js';\nimport { commitType } from './gitGraphTypes.js';\nimport { ImperativeState } from '../../utils/imperativeState.js';\n\nimport DEFAULT_CONFIG from '../../defaultConfig.js';\n\nimport type { GitGraphDiagramConfig } from '../../config.type.js';\ninterface GitGraphState {\n commits: Map;\n head: Commit | null;\n branchConfig: Map;\n branches: Map;\n currBranch: string;\n direction: DiagramOrientation;\n seq: number;\n options: any;\n}\n\nconst DEFAULT_GITGRAPH_CONFIG: Required = DEFAULT_CONFIG.gitGraph;\nconst getConfig = (): Required => {\n const config = cleanAndMerge({\n ...DEFAULT_GITGRAPH_CONFIG,\n ...commonGetConfig().gitGraph,\n });\n return config;\n};\n\nconst state = new ImperativeState(() => {\n const config = getConfig();\n const mainBranchName = config.mainBranchName;\n const mainBranchOrder = config.mainBranchOrder;\n return {\n mainBranchName,\n commits: new Map(),\n head: null,\n branchConfig: new Map([[mainBranchName, { name: mainBranchName, order: mainBranchOrder }]]),\n branches: new Map([[mainBranchName, null]]),\n currBranch: mainBranchName,\n direction: 'LR',\n seq: 0,\n options: {},\n };\n});\n\nfunction getID() {\n return random({ length: 7 });\n}\n\n/**\n * @param list - list of items\n * @param fn - function to get the key\n */\nfunction uniqBy(list: any[], fn: (item: any) => any) {\n const recordMap = Object.create(null);\n return list.reduce((out, item) => {\n const key = fn(item);\n if (!recordMap[key]) {\n recordMap[key] = true;\n out.push(item);\n }\n return out;\n }, []);\n}\n\nexport const setDirection = function (dir: DiagramOrientation) {\n state.records.direction = dir;\n};\n\nexport const setOptions = function (rawOptString: string) {\n log.debug('options str', rawOptString);\n rawOptString = rawOptString?.trim();\n rawOptString = rawOptString || '{}';\n try {\n state.records.options = JSON.parse(rawOptString);\n } catch (e: any) {\n log.error('error while parsing gitGraph options', e.message);\n }\n};\n\nexport const getOptions = function () {\n return state.records.options;\n};\n\nexport const commit = function (commitDB: CommitDB) {\n let msg = commitDB.msg;\n let id = commitDB.id;\n const type = commitDB.type;\n let tags = commitDB.tags;\n\n log.info('commit', msg, id, type, tags);\n log.debug('Entering commit:', msg, id, type, tags);\n const config = getConfig();\n id = common.sanitizeText(id, config);\n msg = common.sanitizeText(msg, config);\n tags = tags?.map((tag) => common.sanitizeText(tag, config));\n const newCommit: Commit = {\n id: id ? id : state.records.seq + '-' + getID(),\n message: msg,\n seq: state.records.seq++,\n type: type ?? commitType.NORMAL,\n tags: tags ?? [],\n parents: state.records.head == null ? [] : [state.records.head.id],\n branch: state.records.currBranch,\n };\n state.records.head = newCommit;\n log.info('main branch', config.mainBranchName);\n state.records.commits.set(newCommit.id, newCommit);\n state.records.branches.set(state.records.currBranch, newCommit.id);\n log.debug('in pushCommit ' + newCommit.id);\n};\n\nexport const branch = function (branchDB: BranchDB) {\n let name = branchDB.name;\n const order = branchDB.order;\n name = common.sanitizeText(name, getConfig());\n if (state.records.branches.has(name)) {\n throw new Error(\n `Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using \"checkout ${name}\")`\n );\n }\n\n state.records.branches.set(name, state.records.head != null ? state.records.head.id : null);\n state.records.branchConfig.set(name, { name, order });\n checkout(name);\n log.debug('in createBranch');\n};\n\nexport const merge = (mergeDB: MergeDB): void => {\n let otherBranch = mergeDB.branch;\n let customId = mergeDB.id;\n const overrideType = mergeDB.type;\n const customTags = mergeDB.tags;\n const config = getConfig();\n otherBranch = common.sanitizeText(otherBranch, config);\n if (customId) {\n customId = common.sanitizeText(customId, config);\n }\n const currentBranchCheck = state.records.branches.get(state.records.currBranch);\n const otherBranchCheck = state.records.branches.get(otherBranch);\n const currentCommit = currentBranchCheck\n ? state.records.commits.get(currentBranchCheck)\n : undefined;\n const otherCommit: Commit | undefined = otherBranchCheck\n ? state.records.commits.get(otherBranchCheck)\n : undefined;\n if (currentCommit && otherCommit && currentCommit.branch === otherBranch) {\n throw new Error(`Cannot merge branch '${otherBranch}' into itself.`);\n }\n if (state.records.currBranch === otherBranch) {\n const error: any = new Error('Incorrect usage of \"merge\". Cannot merge a branch to itself');\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: ['branch abc'],\n };\n throw error;\n }\n if (currentCommit === undefined || !currentCommit) {\n const error: any = new Error(\n `Incorrect usage of \"merge\". Current branch (${state.records.currBranch})has no commits`\n );\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: ['commit'],\n };\n throw error;\n }\n if (!state.records.branches.has(otherBranch)) {\n const error: any = new Error(\n 'Incorrect usage of \"merge\". Branch to be merged (' + otherBranch + ') does not exist'\n );\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: [`branch ${otherBranch}`],\n };\n throw error;\n }\n if (otherCommit === undefined || !otherCommit) {\n const error: any = new Error(\n 'Incorrect usage of \"merge\". Branch to be merged (' + otherBranch + ') has no commits'\n );\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: ['\"commit\"'],\n };\n throw error;\n }\n if (currentCommit === otherCommit) {\n const error: any = new Error('Incorrect usage of \"merge\". Both branches have same head');\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: ['branch abc'],\n };\n throw error;\n }\n if (customId && state.records.commits.has(customId)) {\n const error: any = new Error(\n 'Incorrect usage of \"merge\". Commit with id:' +\n customId +\n ' already exists, use different custom Id'\n );\n error.hash = {\n text: `merge ${otherBranch} ${customId} ${overrideType} ${customTags?.join(' ')}`,\n token: `merge ${otherBranch} ${customId} ${overrideType} ${customTags?.join(' ')}`,\n expected: [\n `merge ${otherBranch} ${customId}_UNIQUE ${overrideType} ${customTags?.join(' ')}`,\n ],\n };\n\n throw error;\n }\n\n const verifiedBranch: string = otherBranchCheck ? otherBranchCheck : ''; //figure out a cleaner way to do this\n\n const commit = {\n id: customId || `${state.records.seq}-${getID()}`,\n message: `merged branch ${otherBranch} into ${state.records.currBranch}`,\n seq: state.records.seq++,\n parents: state.records.head == null ? [] : [state.records.head.id, verifiedBranch],\n branch: state.records.currBranch,\n type: commitType.MERGE,\n customType: overrideType,\n customId: customId ? true : false,\n tags: customTags ?? [],\n } satisfies Commit;\n state.records.head = commit;\n state.records.commits.set(commit.id, commit);\n state.records.branches.set(state.records.currBranch, commit.id);\n log.debug(state.records.branches);\n log.debug('in mergeBranch');\n};\n\nexport const cherryPick = function (cherryPickDB: CherryPickDB) {\n let sourceId = cherryPickDB.id;\n let targetId = cherryPickDB.targetId;\n let tags = cherryPickDB.tags;\n let parentCommitId = cherryPickDB.parent;\n log.debug('Entering cherryPick:', sourceId, targetId, tags);\n const config = getConfig();\n sourceId = common.sanitizeText(sourceId, config);\n targetId = common.sanitizeText(targetId, config);\n\n tags = tags?.map((tag) => common.sanitizeText(tag, config));\n\n parentCommitId = common.sanitizeText(parentCommitId, config);\n\n if (!sourceId || !state.records.commits.has(sourceId)) {\n const error: any = new Error(\n 'Incorrect usage of \"cherryPick\". Source commit id should exist and provided'\n );\n error.hash = {\n text: `cherryPick ${sourceId} ${targetId}`,\n token: `cherryPick ${sourceId} ${targetId}`,\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n\n const sourceCommit = state.records.commits.get(sourceId);\n if (sourceCommit === undefined || !sourceCommit) {\n throw new Error('Incorrect usage of \"cherryPick\". Source commit id should exist and provided');\n }\n if (\n parentCommitId &&\n !(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommitId))\n ) {\n const error = new Error(\n 'Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.'\n );\n throw error;\n }\n const sourceCommitBranch = sourceCommit.branch;\n if (sourceCommit.type === commitType.MERGE && !parentCommitId) {\n const error = new Error(\n 'Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.'\n );\n throw error;\n }\n if (!targetId || !state.records.commits.has(targetId)) {\n // cherry-pick source commit to current branch\n\n if (sourceCommitBranch === state.records.currBranch) {\n const error: any = new Error(\n 'Incorrect usage of \"cherryPick\". Source commit is already on current branch'\n );\n error.hash = {\n text: `cherryPick ${sourceId} ${targetId}`,\n token: `cherryPick ${sourceId} ${targetId}`,\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n const currentCommitId = state.records.branches.get(state.records.currBranch);\n if (currentCommitId === undefined || !currentCommitId) {\n const error: any = new Error(\n `Incorrect usage of \"cherry-pick\". Current branch (${state.records.currBranch})has no commits`\n );\n error.hash = {\n text: `cherryPick ${sourceId} ${targetId}`,\n token: `cherryPick ${sourceId} ${targetId}`,\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n\n const currentCommit = state.records.commits.get(currentCommitId);\n if (currentCommit === undefined || !currentCommit) {\n const error: any = new Error(\n `Incorrect usage of \"cherry-pick\". Current branch (${state.records.currBranch})has no commits`\n );\n error.hash = {\n text: `cherryPick ${sourceId} ${targetId}`,\n token: `cherryPick ${sourceId} ${targetId}`,\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n const commit = {\n id: state.records.seq + '-' + getID(),\n message: `cherry-picked ${sourceCommit?.message} into ${state.records.currBranch}`,\n seq: state.records.seq++,\n parents: state.records.head == null ? [] : [state.records.head.id, sourceCommit.id],\n branch: state.records.currBranch,\n type: commitType.CHERRY_PICK,\n tags: tags\n ? tags.filter(Boolean)\n : [\n `cherry-pick:${sourceCommit.id}${\n sourceCommit.type === commitType.MERGE ? `|parent:${parentCommitId}` : ''\n }`,\n ],\n };\n\n state.records.head = commit;\n state.records.commits.set(commit.id, commit);\n state.records.branches.set(state.records.currBranch, commit.id);\n log.debug(state.records.branches);\n log.debug('in cherryPick');\n }\n};\nexport const checkout = function (branch: string) {\n branch = common.sanitizeText(branch, getConfig());\n if (!state.records.branches.has(branch)) {\n const error: any = new Error(\n `Trying to checkout branch which is not yet created. (Help try using \"branch ${branch}\")`\n );\n error.hash = {\n text: `checkout ${branch}`,\n token: `checkout ${branch}`,\n expected: [`branch ${branch}`],\n };\n throw error;\n } else {\n state.records.currBranch = branch;\n const id = state.records.branches.get(state.records.currBranch);\n if (id === undefined || !id) {\n state.records.head = null;\n } else {\n state.records.head = state.records.commits.get(id) ?? null;\n }\n }\n};\n\n/**\n * @param arr - array\n * @param key - key\n * @param newVal - new value\n */\nfunction upsert(arr: any[], key: any, newVal: any) {\n const index = arr.indexOf(key);\n if (index === -1) {\n arr.push(newVal);\n } else {\n arr.splice(index, 1, newVal);\n }\n}\n\nfunction prettyPrintCommitHistory(commitArr: Commit[]) {\n const commit = commitArr.reduce((out, commit) => {\n if (out.seq > commit.seq) {\n return out;\n }\n return commit;\n }, commitArr[0]);\n let line = '';\n commitArr.forEach(function (c) {\n if (c === commit) {\n line += '\\t*';\n } else {\n line += '\\t|';\n }\n });\n const label = [line, commit.id, commit.seq];\n for (const branch in state.records.branches) {\n if (state.records.branches.get(branch) === commit.id) {\n label.push(branch);\n }\n }\n log.debug(label.join(' '));\n if (commit.parents && commit.parents.length == 2 && commit.parents[0] && commit.parents[1]) {\n const newCommit = state.records.commits.get(commit.parents[0]);\n upsert(commitArr, commit, newCommit);\n if (commit.parents[1]) {\n commitArr.push(state.records.commits.get(commit.parents[1])!);\n }\n } else if (commit.parents.length == 0) {\n return;\n } else {\n if (commit.parents[0]) {\n const newCommit = state.records.commits.get(commit.parents[0]);\n upsert(commitArr, commit, newCommit);\n }\n }\n commitArr = uniqBy(commitArr, (c) => c.id);\n prettyPrintCommitHistory(commitArr);\n}\n\nexport const prettyPrint = function () {\n log.debug(state.records.commits);\n const node = getCommitsArray()[0];\n prettyPrintCommitHistory([node]);\n};\n\nexport const clear = function () {\n state.reset();\n commonClear();\n};\n\nexport const getBranchesAsObjArray = function () {\n const branchesArray = [...state.records.branchConfig.values()]\n .map((branchConfig, i) => {\n if (branchConfig.order !== null && branchConfig.order !== undefined) {\n return branchConfig;\n }\n return {\n ...branchConfig,\n order: parseFloat(`0.${i}`),\n };\n })\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0))\n .map(({ name }) => ({ name }));\n\n return branchesArray;\n};\n\nexport const getBranches = function () {\n return state.records.branches;\n};\nexport const getCommits = function () {\n return state.records.commits;\n};\nexport const getCommitsArray = function () {\n const commitArr = [...state.records.commits.values()];\n commitArr.forEach(function (o) {\n log.debug(o.id);\n });\n commitArr.sort((a, b) => a.seq - b.seq);\n return commitArr;\n};\nexport const getCurrentBranch = function () {\n return state.records.currBranch;\n};\nexport const getDirection = function () {\n return state.records.direction;\n};\nexport const getHead = function () {\n return state.records.head;\n};\n\nexport const db: GitGraphDB = {\n commitType,\n getConfig,\n setDirection,\n setOptions,\n getOptions,\n commit,\n branch,\n merge,\n cherryPick,\n checkout,\n //reset,\n prettyPrint,\n clear,\n getBranchesAsObjArray,\n getBranches,\n getCommits,\n getCommitsArray,\n getCurrentBranch,\n getDirection,\n getHead,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n setDiagramTitle,\n getDiagramTitle,\n};\n", "import type { GitGraph } from '@mermaid-js/parser';\nimport { parse } from '@mermaid-js/parser';\nimport type { ParserDefinition } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { populateCommonDb } from '../common/populateCommonDb.js';\nimport { db } from './gitGraphAst.js';\nimport { commitType } from './gitGraphTypes.js';\nimport type {\n CheckoutAst,\n CherryPickingAst,\n MergeAst,\n CommitAst,\n BranchAst,\n GitGraphDBParseProvider,\n CommitDB,\n BranchDB,\n MergeDB,\n CherryPickDB,\n} from './gitGraphTypes.js';\n\nconst populate = (ast: GitGraph, db: GitGraphDBParseProvider) => {\n populateCommonDb(ast, db);\n // @ts-ignore: this wont exist if the direction is not specified\n if (ast.dir) {\n // @ts-ignore: this wont exist if the direction is not specified\n db.setDirection(ast.dir);\n }\n for (const statement of ast.statements) {\n parseStatement(statement, db);\n }\n};\n\nconst parseStatement = (statement: any, db: GitGraphDBParseProvider) => {\n const parsers: Record void> = {\n Commit: (stmt) => db.commit(parseCommit(stmt)),\n Branch: (stmt) => db.branch(parseBranch(stmt)),\n Merge: (stmt) => db.merge(parseMerge(stmt)),\n Checkout: (stmt) => db.checkout(parseCheckout(stmt)),\n CherryPicking: (stmt) => db.cherryPick(parseCherryPicking(stmt)),\n };\n\n const parser = parsers[statement.$type];\n if (parser) {\n parser(statement);\n } else {\n log.error(`Unknown statement type: ${statement.$type}`);\n }\n};\n\nconst parseCommit = (commit: CommitAst): CommitDB => {\n const commitDB: CommitDB = {\n id: commit.id,\n msg: commit.message ?? '',\n type: commit.type !== undefined ? commitType[commit.type] : commitType.NORMAL,\n tags: commit.tags ?? undefined,\n };\n return commitDB;\n};\n\nconst parseBranch = (branch: BranchAst): BranchDB => {\n const branchDB: BranchDB = {\n name: branch.name,\n order: branch.order ?? 0,\n };\n return branchDB;\n};\n\nconst parseMerge = (merge: MergeAst): MergeDB => {\n const mergeDB: MergeDB = {\n branch: merge.branch,\n id: merge.id ?? '',\n type: merge.type !== undefined ? commitType[merge.type] : undefined,\n tags: merge.tags ?? undefined,\n };\n return mergeDB;\n};\n\nconst parseCheckout = (checkout: CheckoutAst): string => {\n const branch = checkout.branch;\n return branch;\n};\n\nconst parseCherryPicking = (cherryPicking: CherryPickingAst): CherryPickDB => {\n const cherryPickDB: CherryPickDB = {\n id: cherryPicking.id,\n targetId: '',\n tags: cherryPicking.tags?.length === 0 ? undefined : cherryPicking.tags,\n parent: cherryPicking.parent,\n };\n return cherryPickDB;\n};\n\nexport const parser: ParserDefinition = {\n parse: async (input: string): Promise => {\n const ast: GitGraph = await parse('gitGraph', input);\n log.debug(ast);\n populate(ast, db);\n },\n};\n\nif (import.meta.vitest) {\n const { it, expect, describe } = import.meta.vitest;\n\n const mockDB: GitGraphDBParseProvider = {\n commitType: commitType,\n setDirection: vi.fn(),\n commit: vi.fn(),\n branch: vi.fn(),\n merge: vi.fn(),\n cherryPick: vi.fn(),\n checkout: vi.fn(),\n };\n\n describe('GitGraph Parser', () => {\n it('should parse a commit statement', () => {\n const commit = {\n $type: 'Commit',\n id: '1',\n message: 'test',\n tags: ['tag1', 'tag2'],\n type: 'NORMAL',\n };\n parseStatement(commit, mockDB);\n expect(mockDB.commit).toHaveBeenCalledWith({\n id: '1',\n msg: 'test',\n tags: ['tag1', 'tag2'],\n type: 0,\n });\n });\n it('should parse a branch statement', () => {\n const branch = {\n $type: 'Branch',\n name: 'newBranch',\n order: 1,\n };\n parseStatement(branch, mockDB);\n expect(mockDB.branch).toHaveBeenCalledWith({ name: 'newBranch', order: 1 });\n });\n it('should parse a checkout statement', () => {\n const checkout = {\n $type: 'Checkout',\n branch: 'newBranch',\n };\n parseStatement(checkout, mockDB);\n expect(mockDB.checkout).toHaveBeenCalledWith('newBranch');\n });\n it('should parse a merge statement', () => {\n const merge = {\n $type: 'Merge',\n branch: 'newBranch',\n id: '1',\n tags: ['tag1', 'tag2'],\n type: 'NORMAL',\n };\n parseStatement(merge, mockDB);\n expect(mockDB.merge).toHaveBeenCalledWith({\n branch: 'newBranch',\n id: '1',\n tags: ['tag1', 'tag2'],\n type: 0,\n });\n });\n it('should parse a cherry picking statement', () => {\n const cherryPick = {\n $type: 'CherryPicking',\n id: '1',\n tags: ['tag1', 'tag2'],\n parent: '2',\n };\n parseStatement(cherryPick, mockDB);\n expect(mockDB.cherryPick).toHaveBeenCalledWith({\n id: '1',\n targetId: '',\n parent: '2',\n tags: ['tag1', 'tag2'],\n });\n });\n\n it('should parse a langium generated gitGraph ast', () => {\n const dummy: GitGraph = {\n $type: 'GitGraph',\n statements: [],\n };\n const gitGraphAst: GitGraph = {\n $type: 'GitGraph',\n statements: [\n {\n $container: dummy,\n $type: 'Commit',\n id: '1',\n message: 'test',\n tags: ['tag1', 'tag2'],\n type: 'NORMAL',\n },\n {\n $container: dummy,\n $type: 'Branch',\n name: 'newBranch',\n order: 1,\n },\n {\n $container: dummy,\n $type: 'Merge',\n branch: 'newBranch',\n id: '1',\n tags: ['tag1', 'tag2'],\n type: 'NORMAL',\n },\n {\n $container: dummy,\n $type: 'Checkout',\n branch: 'newBranch',\n },\n {\n $container: dummy,\n $type: 'CherryPicking',\n id: '1',\n tags: ['tag1', 'tag2'],\n parent: '2',\n },\n ],\n };\n\n populate(gitGraphAst, mockDB);\n\n expect(mockDB.commit).toHaveBeenCalledWith({\n id: '1',\n msg: 'test',\n tags: ['tag1', 'tag2'],\n type: 0,\n });\n expect(mockDB.branch).toHaveBeenCalledWith({ name: 'newBranch', order: 1 });\n expect(mockDB.merge).toHaveBeenCalledWith({\n branch: 'newBranch',\n id: '1',\n tags: ['tag1', 'tag2'],\n type: 0,\n });\n expect(mockDB.checkout).toHaveBeenCalledWith('newBranch');\n });\n });\n}\n", "import { select } from 'd3';\nimport { getConfig, setupGraphViewbox } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport utils from '../../utils.js';\nimport type { DrawDefinition } from '../../diagram-api/types.js';\nimport type d3 from 'd3';\nimport type { Commit, GitGraphDBRenderProvider, DiagramOrientation } from './gitGraphTypes.js';\nimport { commitType } from './gitGraphTypes.js';\n\ninterface BranchPosition {\n pos: number;\n index: number;\n}\n\ninterface CommitPosition {\n x: number;\n y: number;\n}\n\ninterface CommitPositionOffset extends CommitPosition {\n posWithOffset: number;\n}\n\nconst DEFAULT_CONFIG = getConfig();\nconst DEFAULT_GITGRAPH_CONFIG = DEFAULT_CONFIG?.gitGraph;\nconst LAYOUT_OFFSET = 10;\nconst COMMIT_STEP = 40;\nconst PX = 4;\nconst PY = 2;\n\nconst THEME_COLOR_LIMIT = 8;\nconst branchPos = new Map();\nconst commitPos = new Map();\nconst defaultPos = 30;\n\nlet allCommitsDict = new Map();\nlet lanes: number[] = [];\nlet maxPos = 0;\nlet dir: DiagramOrientation = 'LR';\n\nconst clear = () => {\n branchPos.clear();\n commitPos.clear();\n allCommitsDict.clear();\n maxPos = 0;\n lanes = [];\n dir = 'LR';\n};\n\nconst drawText = (txt: string | string[]) => {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n const rows = typeof txt === 'string' ? txt.split(/\\\\n|\\n|/gi) : txt;\n\n rows.forEach((row) => {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n tspan.setAttribute('class', 'row');\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n });\n\n return svgLabel;\n};\n\nconst findClosestParent = (parents: string[]): string | undefined => {\n let closestParent: string | undefined;\n let comparisonFunc;\n let targetPosition: number;\n if (dir === 'BT') {\n comparisonFunc = (a: number, b: number) => a <= b;\n targetPosition = Infinity;\n } else {\n comparisonFunc = (a: number, b: number) => a >= b;\n targetPosition = 0;\n }\n\n parents.forEach((parent) => {\n const parentPosition =\n dir === 'TB' || dir == 'BT' ? commitPos.get(parent)?.y : commitPos.get(parent)?.x;\n\n if (parentPosition !== undefined && comparisonFunc(parentPosition, targetPosition)) {\n closestParent = parent;\n targetPosition = parentPosition;\n }\n });\n\n return closestParent;\n};\n\nconst findClosestParentBT = (parents: string[]) => {\n let closestParent = '';\n let maxPosition = Infinity;\n\n parents.forEach((parent) => {\n const parentPosition = commitPos.get(parent)!.y;\n if (parentPosition <= maxPosition) {\n closestParent = parent;\n maxPosition = parentPosition;\n }\n });\n return closestParent || undefined;\n};\n\nconst setParallelBTPos = (\n sortedKeys: string[],\n commits: Map,\n defaultPos: number\n) => {\n let curPos = defaultPos;\n let maxPosition = defaultPos;\n const roots: Commit[] = [];\n\n sortedKeys.forEach((key) => {\n const commit = commits.get(key);\n if (!commit) {\n throw new Error(`Commit not found for key ${key}`);\n }\n\n if (commit.parents.length) {\n curPos = calculateCommitPosition(commit);\n maxPosition = Math.max(curPos, maxPosition);\n } else {\n roots.push(commit);\n }\n setCommitPosition(commit, curPos);\n });\n\n curPos = maxPosition;\n roots.forEach((commit) => {\n setRootPosition(commit, curPos, defaultPos);\n });\n sortedKeys.forEach((key) => {\n const commit = commits.get(key);\n\n if (commit?.parents.length) {\n const closestParent = findClosestParentBT(commit.parents)!;\n curPos = commitPos.get(closestParent)!.y - COMMIT_STEP;\n if (curPos <= maxPosition) {\n maxPosition = curPos;\n }\n const x = branchPos.get(commit.branch)!.pos;\n const y = curPos - LAYOUT_OFFSET;\n commitPos.set(commit.id, { x: x, y: y });\n }\n });\n};\n\nconst findClosestParentPos = (commit: Commit): number => {\n const closestParent = findClosestParent(commit.parents.filter((p) => p !== null));\n if (!closestParent) {\n throw new Error(`Closest parent not found for commit ${commit.id}`);\n }\n\n const closestParentPos = commitPos.get(closestParent)?.y;\n if (closestParentPos === undefined) {\n throw new Error(`Closest parent position not found for commit ${commit.id}`);\n }\n return closestParentPos;\n};\n\nconst calculateCommitPosition = (commit: Commit): number => {\n const closestParentPos = findClosestParentPos(commit);\n return closestParentPos + COMMIT_STEP;\n};\n\nconst setCommitPosition = (commit: Commit, curPos: number): CommitPosition => {\n const branch = branchPos.get(commit.branch);\n\n if (!branch) {\n throw new Error(`Branch not found for commit ${commit.id}`);\n }\n\n const x = branch.pos;\n const y = curPos + LAYOUT_OFFSET;\n commitPos.set(commit.id, { x, y });\n return { x, y };\n};\n\nconst setRootPosition = (commit: Commit, curPos: number, defaultPos: number) => {\n const branch = branchPos.get(commit.branch);\n if (!branch) {\n throw new Error(`Branch not found for commit ${commit.id}`);\n }\n\n const y = curPos + defaultPos;\n const x = branch.pos;\n commitPos.set(commit.id, { x, y });\n};\n\nconst drawCommitBullet = (\n gBullets: d3.Selection,\n commit: Commit,\n commitPosition: CommitPositionOffset,\n typeClass: string,\n branchIndex: number,\n commitSymbolType: number\n) => {\n if (commitSymbolType === commitType.HIGHLIGHT) {\n gBullets\n .append('rect')\n .attr('x', commitPosition.x - 10)\n .attr('y', commitPosition.y - 10)\n .attr('width', 20)\n .attr('height', 20)\n .attr(\n 'class',\n `commit ${commit.id} commit-highlight${branchIndex % THEME_COLOR_LIMIT} ${typeClass}-outer`\n );\n gBullets\n .append('rect')\n .attr('x', commitPosition.x - 6)\n .attr('y', commitPosition.y - 6)\n .attr('width', 12)\n .attr('height', 12)\n .attr(\n 'class',\n `commit ${commit.id} commit${branchIndex % THEME_COLOR_LIMIT} ${typeClass}-inner`\n );\n } else if (commitSymbolType === commitType.CHERRY_PICK) {\n gBullets\n .append('circle')\n .attr('cx', commitPosition.x)\n .attr('cy', commitPosition.y)\n .attr('r', 10)\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('circle')\n .attr('cx', commitPosition.x - 3)\n .attr('cy', commitPosition.y + 2)\n .attr('r', 2.75)\n .attr('fill', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('circle')\n .attr('cx', commitPosition.x + 3)\n .attr('cy', commitPosition.y + 2)\n .attr('r', 2.75)\n .attr('fill', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('line')\n .attr('x1', commitPosition.x + 3)\n .attr('y1', commitPosition.y + 1)\n .attr('x2', commitPosition.x)\n .attr('y2', commitPosition.y - 5)\n .attr('stroke', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('line')\n .attr('x1', commitPosition.x - 3)\n .attr('y1', commitPosition.y + 1)\n .attr('x2', commitPosition.x)\n .attr('y2', commitPosition.y - 5)\n .attr('stroke', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n } else {\n const circle = gBullets.append('circle');\n circle.attr('cx', commitPosition.x);\n circle.attr('cy', commitPosition.y);\n circle.attr('r', commit.type === commitType.MERGE ? 9 : 10);\n circle.attr('class', `commit ${commit.id} commit${branchIndex % THEME_COLOR_LIMIT}`);\n if (commitSymbolType === commitType.MERGE) {\n const circle2 = gBullets.append('circle');\n circle2.attr('cx', commitPosition.x);\n circle2.attr('cy', commitPosition.y);\n circle2.attr('r', 6);\n circle2.attr(\n 'class',\n `commit ${typeClass} ${commit.id} commit${branchIndex % THEME_COLOR_LIMIT}`\n );\n }\n if (commitSymbolType === commitType.REVERSE) {\n const cross = gBullets.append('path');\n cross\n .attr(\n 'd',\n `M ${commitPosition.x - 5},${commitPosition.y - 5}L${commitPosition.x + 5},${commitPosition.y + 5}M${commitPosition.x - 5},${commitPosition.y + 5}L${commitPosition.x + 5},${commitPosition.y - 5}`\n )\n .attr('class', `commit ${typeClass} ${commit.id} commit${branchIndex % THEME_COLOR_LIMIT}`);\n }\n }\n};\n\nconst drawCommitLabel = (\n gLabels: d3.Selection,\n commit: Commit,\n commitPosition: CommitPositionOffset,\n pos: number\n) => {\n if (\n commit.type !== commitType.CHERRY_PICK &&\n ((commit.customId && commit.type === commitType.MERGE) || commit.type !== commitType.MERGE) &&\n DEFAULT_GITGRAPH_CONFIG?.showCommitLabel\n ) {\n const wrapper = gLabels.append('g');\n const labelBkg = wrapper.insert('rect').attr('class', 'commit-label-bkg');\n const text = wrapper\n .append('text')\n .attr('x', pos)\n .attr('y', commitPosition.y + 25)\n .attr('class', 'commit-label')\n .text(commit.id);\n const bbox = text.node()?.getBBox();\n\n if (bbox) {\n labelBkg\n .attr('x', commitPosition.posWithOffset - bbox.width / 2 - PY)\n .attr('y', commitPosition.y + 13.5)\n .attr('width', bbox.width + 2 * PY)\n .attr('height', bbox.height + 2 * PY);\n\n if (dir === 'TB' || dir === 'BT') {\n labelBkg\n .attr('x', commitPosition.x - (bbox.width + 4 * PX + 5))\n .attr('y', commitPosition.y - 12);\n text\n .attr('x', commitPosition.x - (bbox.width + 4 * PX))\n .attr('y', commitPosition.y + bbox.height - 12);\n } else {\n text.attr('x', commitPosition.posWithOffset - bbox.width / 2);\n }\n\n if (DEFAULT_GITGRAPH_CONFIG.rotateCommitLabel) {\n if (dir === 'TB' || dir === 'BT') {\n text.attr(\n 'transform',\n 'rotate(' + -45 + ', ' + commitPosition.x + ', ' + commitPosition.y + ')'\n );\n labelBkg.attr(\n 'transform',\n 'rotate(' + -45 + ', ' + commitPosition.x + ', ' + commitPosition.y + ')'\n );\n } else {\n const r_x = -7.5 - ((bbox.width + 10) / 25) * 9.5;\n const r_y = 10 + (bbox.width / 25) * 8.5;\n wrapper.attr(\n 'transform',\n 'translate(' +\n r_x +\n ', ' +\n r_y +\n ') rotate(' +\n -45 +\n ', ' +\n pos +\n ', ' +\n commitPosition.y +\n ')'\n );\n }\n }\n }\n }\n};\n\nconst drawCommitTags = (\n gLabels: d3.Selection,\n commit: Commit,\n commitPosition: CommitPositionOffset,\n pos: number\n) => {\n if (commit.tags.length > 0) {\n let yOffset = 0;\n let maxTagBboxWidth = 0;\n let maxTagBboxHeight = 0;\n const tagElements = [];\n\n for (const tagValue of commit.tags.reverse()) {\n const rect = gLabels.insert('polygon');\n const hole = gLabels.append('circle');\n const tag = gLabels\n .append('text')\n .attr('y', commitPosition.y - 16 - yOffset)\n .attr('class', 'tag-label')\n .text(tagValue);\n const tagBbox = tag.node()?.getBBox();\n if (!tagBbox) {\n throw new Error('Tag bbox not found');\n }\n\n maxTagBboxWidth = Math.max(maxTagBboxWidth, tagBbox.width);\n maxTagBboxHeight = Math.max(maxTagBboxHeight, tagBbox.height);\n\n tag.attr('x', commitPosition.posWithOffset - tagBbox.width / 2);\n\n tagElements.push({\n tag,\n hole,\n rect,\n yOffset,\n });\n\n yOffset += 20;\n }\n\n for (const { tag, hole, rect, yOffset } of tagElements) {\n const h2 = maxTagBboxHeight / 2;\n const ly = commitPosition.y - 19.2 - yOffset;\n rect.attr('class', 'tag-label-bkg').attr(\n 'points',\n `\n ${pos - maxTagBboxWidth / 2 - PX / 2},${ly + PY} \n ${pos - maxTagBboxWidth / 2 - PX / 2},${ly - PY}\n ${commitPosition.posWithOffset - maxTagBboxWidth / 2 - PX},${ly - h2 - PY}\n ${commitPosition.posWithOffset + maxTagBboxWidth / 2 + PX},${ly - h2 - PY}\n ${commitPosition.posWithOffset + maxTagBboxWidth / 2 + PX},${ly + h2 + PY}\n ${commitPosition.posWithOffset - maxTagBboxWidth / 2 - PX},${ly + h2 + PY}`\n );\n\n hole\n .attr('cy', ly)\n .attr('cx', pos - maxTagBboxWidth / 2 + PX / 2)\n .attr('r', 1.5)\n .attr('class', 'tag-hole');\n\n if (dir === 'TB' || dir === 'BT') {\n const yOrigin = pos + yOffset;\n\n rect\n .attr('class', 'tag-label-bkg')\n .attr(\n 'points',\n `\n ${commitPosition.x},${yOrigin + 2}\n ${commitPosition.x},${yOrigin - 2}\n ${commitPosition.x + LAYOUT_OFFSET},${yOrigin - h2 - 2}\n ${commitPosition.x + LAYOUT_OFFSET + maxTagBboxWidth + 4},${yOrigin - h2 - 2}\n ${commitPosition.x + LAYOUT_OFFSET + maxTagBboxWidth + 4},${yOrigin + h2 + 2}\n ${commitPosition.x + LAYOUT_OFFSET},${yOrigin + h2 + 2}`\n )\n .attr('transform', 'translate(12,12) rotate(45, ' + commitPosition.x + ',' + pos + ')');\n hole\n .attr('cx', commitPosition.x + PX / 2)\n .attr('cy', yOrigin)\n .attr('transform', 'translate(12,12) rotate(45, ' + commitPosition.x + ',' + pos + ')');\n tag\n .attr('x', commitPosition.x + 5)\n .attr('y', yOrigin + 3)\n .attr('transform', 'translate(14,14) rotate(45, ' + commitPosition.x + ',' + pos + ')');\n }\n }\n }\n};\n\nconst getCommitClassType = (commit: Commit): string => {\n const commitSymbolType = commit.customType ?? commit.type;\n switch (commitSymbolType) {\n case commitType.NORMAL:\n return 'commit-normal';\n case commitType.REVERSE:\n return 'commit-reverse';\n case commitType.HIGHLIGHT:\n return 'commit-highlight';\n case commitType.MERGE:\n return 'commit-merge';\n case commitType.CHERRY_PICK:\n return 'commit-cherry-pick';\n default:\n return 'commit-normal';\n }\n};\n\nconst calculatePosition = (\n commit: Commit,\n dir: string,\n pos: number,\n commitPos: Map\n): number => {\n const defaultCommitPosition = { x: 0, y: 0 }; // Default position if commit is not found\n\n if (commit.parents.length > 0) {\n const closestParent = findClosestParent(commit.parents);\n if (closestParent) {\n const parentPosition = commitPos.get(closestParent) ?? defaultCommitPosition;\n\n if (dir === 'TB') {\n return parentPosition.y + COMMIT_STEP;\n } else if (dir === 'BT') {\n const currentPosition = commitPos.get(commit.id) ?? defaultCommitPosition;\n return currentPosition.y - COMMIT_STEP;\n } else {\n return parentPosition.x + COMMIT_STEP;\n }\n }\n } else {\n if (dir === 'TB') {\n return defaultPos;\n } else if (dir === 'BT') {\n const currentPosition = commitPos.get(commit.id) ?? defaultCommitPosition;\n return currentPosition.y - COMMIT_STEP;\n } else {\n return 0;\n }\n }\n return 0;\n};\n\nconst getCommitPosition = (\n commit: Commit,\n pos: number,\n isParallelCommits: boolean\n): CommitPositionOffset => {\n const posWithOffset = dir === 'BT' && isParallelCommits ? pos : pos + LAYOUT_OFFSET;\n const y = dir === 'TB' || dir === 'BT' ? posWithOffset : branchPos.get(commit.branch)?.pos;\n const x = dir === 'TB' || dir === 'BT' ? branchPos.get(commit.branch)?.pos : posWithOffset;\n if (x === undefined || y === undefined) {\n throw new Error(`Position were undefined for commit ${commit.id}`);\n }\n return { x, y, posWithOffset };\n};\n\nconst drawCommits = (\n svg: d3.Selection,\n commits: Map,\n modifyGraph: boolean\n) => {\n if (!DEFAULT_GITGRAPH_CONFIG) {\n throw new Error('GitGraph config not found');\n }\n const gBullets = svg.append('g').attr('class', 'commit-bullets');\n const gLabels = svg.append('g').attr('class', 'commit-labels');\n let pos = dir === 'TB' || dir === 'BT' ? defaultPos : 0;\n const keys = [...commits.keys()];\n const isParallelCommits = DEFAULT_GITGRAPH_CONFIG?.parallelCommits ?? false;\n\n const sortKeys = (a: string, b: string) => {\n const seqA = commits.get(a)?.seq;\n const seqB = commits.get(b)?.seq;\n return seqA !== undefined && seqB !== undefined ? seqA - seqB : 0;\n };\n\n let sortedKeys = keys.sort(sortKeys);\n if (dir === 'BT') {\n if (isParallelCommits) {\n setParallelBTPos(sortedKeys, commits, pos);\n }\n sortedKeys = sortedKeys.reverse();\n }\n\n sortedKeys.forEach((key) => {\n const commit = commits.get(key);\n if (!commit) {\n throw new Error(`Commit not found for key ${key}`);\n }\n if (isParallelCommits) {\n pos = calculatePosition(commit, dir, pos, commitPos);\n }\n\n const commitPosition = getCommitPosition(commit, pos, isParallelCommits);\n // Don't draw the commits now but calculate the positioning which is used by the branch lines etc.\n if (modifyGraph) {\n const typeClass = getCommitClassType(commit);\n const commitSymbolType = commit.customType ?? commit.type;\n const branchIndex = branchPos.get(commit.branch)?.index ?? 0;\n drawCommitBullet(gBullets, commit, commitPosition, typeClass, branchIndex, commitSymbolType);\n drawCommitLabel(gLabels, commit, commitPosition, pos);\n drawCommitTags(gLabels, commit, commitPosition, pos);\n }\n if (dir === 'TB' || dir === 'BT') {\n commitPos.set(commit.id, { x: commitPosition.x, y: commitPosition.posWithOffset });\n } else {\n commitPos.set(commit.id, { x: commitPosition.posWithOffset, y: commitPosition.y });\n }\n pos = dir === 'BT' && isParallelCommits ? pos + COMMIT_STEP : pos + COMMIT_STEP + LAYOUT_OFFSET;\n if (pos > maxPos) {\n maxPos = pos;\n }\n });\n};\n\nconst shouldRerouteArrow = (\n commitA: Commit,\n commitB: Commit,\n p1: CommitPosition,\n p2: CommitPosition,\n allCommits: Map\n) => {\n const commitBIsFurthest = dir === 'TB' || dir === 'BT' ? p1.x < p2.x : p1.y < p2.y;\n const branchToGetCurve = commitBIsFurthest ? commitB.branch : commitA.branch;\n const isOnBranchToGetCurve = (x: Commit) => x.branch === branchToGetCurve;\n const isBetweenCommits = (x: Commit) => x.seq > commitA.seq && x.seq < commitB.seq;\n return [...allCommits.values()].some((commitX) => {\n return isBetweenCommits(commitX) && isOnBranchToGetCurve(commitX);\n });\n};\n\nconst findLane = (y1: number, y2: number, depth = 0): number => {\n const candidate = y1 + Math.abs(y1 - y2) / 2;\n if (depth > 5) {\n return candidate;\n }\n\n const ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10);\n if (ok) {\n lanes.push(candidate);\n return candidate;\n }\n const diff = Math.abs(y1 - y2);\n return findLane(y1, y2 - diff / 5, depth + 1);\n};\n\nconst drawArrow = (\n svg: d3.Selection,\n commitA: Commit,\n commitB: Commit,\n allCommits: Map\n) => {\n const p1 = commitPos.get(commitA.id); // arrowStart\n const p2 = commitPos.get(commitB.id); // arrowEnd\n if (p1 === undefined || p2 === undefined) {\n throw new Error(`Commit positions not found for commits ${commitA.id} and ${commitB.id}`);\n }\n const arrowNeedsRerouting = shouldRerouteArrow(commitA, commitB, p1, p2, allCommits);\n // log.debug('drawArrow', p1, p2, arrowNeedsRerouting, commitA.id, commitB.id);\n\n // Lower-right quadrant logic; top-left is 0,0\n\n let arc = '';\n let arc2 = '';\n let radius = 0;\n let offset = 0;\n\n let colorClassNum = branchPos.get(commitB.branch)?.index;\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n colorClassNum = branchPos.get(commitA.branch)?.index;\n }\n\n let lineDef;\n if (arrowNeedsRerouting) {\n arc = 'A 10 10, 0, 0, 0,';\n arc2 = 'A 10 10, 0, 0, 1,';\n radius = 10;\n offset = 10;\n\n const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y);\n\n const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x);\n\n if (dir === 'TB') {\n if (p1.x < p2.x) {\n // Source commit is on branch position left of destination commit\n // so render arrow rightward with colour of destination branch\n\n lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${\n p1.y + offset\n } L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;\n } else {\n // Source commit is on branch position right of destination commit\n // so render arrow leftward with colour of source branch\n\n colorClassNum = branchPos.get(commitA.branch)?.index;\n\n lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`;\n }\n } else if (dir === 'BT') {\n if (p1.x < p2.x) {\n // Source commit is on branch position left of destination commit\n // so render arrow rightward with colour of destination branch\n\n lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc} ${lineX} ${p1.y - offset} L ${lineX} ${p2.y + radius} ${arc2} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;\n } else {\n // Source commit is on branch position right of destination commit\n // so render arrow leftward with colour of source branch\n\n colorClassNum = branchPos.get(commitA.branch)?.index;\n\n lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc2} ${lineX} ${p1.y - offset} L ${lineX} ${p2.y + radius} ${arc} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`;\n }\n } else {\n if (p1.y < p2.y) {\n // Source commit is on branch positioned above destination commit\n // so render arrow downward with colour of destination branch\n\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${\n p1.x + offset\n } ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`;\n } else {\n // Source commit is on branch positioned below destination commit\n // so render arrow upward with colour of source branch\n\n colorClassNum = branchPos.get(commitA.branch)?.index;\n\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${\n p1.x + offset\n } ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`;\n }\n }\n } else {\n arc = 'A 20 20, 0, 0, 0,';\n arc2 = 'A 20 20, 0, 0, 1,';\n radius = 20;\n offset = 20;\n\n if (dir === 'TB') {\n if (p1.x < p2.x) {\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${\n p1.y + offset\n } L ${p2.x} ${p2.y}`;\n }\n }\n\n if (p1.x > p2.x) {\n arc = 'A 20 20, 0, 0, 0,';\n arc2 = 'A 20 20, 0, 0, 1,';\n radius = 20;\n offset = 20;\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x + radius} ${p1.y} ${arc} ${p2.x} ${\n p1.y + offset\n } L ${p2.x} ${p2.y}`;\n }\n }\n if (p1.x === p2.x) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;\n }\n } else if (dir === 'BT') {\n if (p1.x < p2.x) {\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${\n p1.y - offset\n } L ${p2.x} ${p2.y}`;\n }\n }\n if (p1.x > p2.x) {\n arc = 'A 20 20, 0, 0, 0,';\n arc2 = 'A 20 20, 0, 0, 1,';\n radius = 20;\n offset = 20;\n\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc} ${p1.x - offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${\n p1.y - offset\n } L ${p2.x} ${p2.y}`;\n }\n }\n\n if (p1.x === p2.x) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;\n }\n } else {\n if (p1.y < p2.y) {\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${\n p1.y + offset\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n }\n }\n if (p1.y > p2.y) {\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${\n p1.y - offset\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n }\n }\n\n if (p1.y === p2.y) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;\n }\n }\n }\n if (lineDef === undefined) {\n throw new Error('Line definition not found');\n }\n svg\n .append('path')\n .attr('d', lineDef)\n .attr('class', 'arrow arrow' + (colorClassNum! % THEME_COLOR_LIMIT));\n};\n\nconst drawArrows = (\n svg: d3.Selection,\n commits: Map\n) => {\n const gArrows = svg.append('g').attr('class', 'commit-arrows');\n [...commits.keys()].forEach((key) => {\n const commit = commits.get(key);\n\n if (commit!.parents && commit!.parents.length > 0) {\n commit!.parents.forEach((parent) => {\n drawArrow(gArrows, commits.get(parent)!, commit!, commits);\n });\n }\n });\n};\n\nconst drawBranches = (\n svg: d3.Selection,\n branches: { name: string }[]\n) => {\n const g = svg.append('g');\n branches.forEach((branch, index) => {\n const adjustIndexForTheme = index % THEME_COLOR_LIMIT;\n\n const pos = branchPos.get(branch.name)?.pos;\n if (pos === undefined) {\n throw new Error(`Position not found for branch ${branch.name}`);\n }\n const line = g.append('line');\n line.attr('x1', 0);\n line.attr('y1', pos);\n line.attr('x2', maxPos);\n line.attr('y2', pos);\n line.attr('class', 'branch branch' + adjustIndexForTheme);\n\n if (dir === 'TB') {\n line.attr('y1', defaultPos);\n line.attr('x1', pos);\n line.attr('y2', maxPos);\n line.attr('x2', pos);\n } else if (dir === 'BT') {\n line.attr('y1', maxPos);\n line.attr('x1', pos);\n line.attr('y2', defaultPos);\n line.attr('x2', pos);\n }\n lanes.push(pos);\n\n const name = branch.name;\n\n // Create the actual text element\n const labelElement = drawText(name);\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const bkg = g.insert('rect');\n const branchLabel = g.insert('g').attr('class', 'branchLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = branchLabel.insert('g').attr('class', 'label branch-label' + adjustIndexForTheme);\n\n label.node()!.appendChild(labelElement);\n const bbox = labelElement.getBBox();\n bkg\n .attr('class', 'branchLabelBkg label' + adjustIndexForTheme)\n .attr('rx', 4)\n .attr('ry', 4)\n .attr('x', -bbox.width - 4 - (DEFAULT_GITGRAPH_CONFIG?.rotateCommitLabel === true ? 30 : 0))\n .attr('y', -bbox.height / 2 + 8)\n .attr('width', bbox.width + 18)\n .attr('height', bbox.height + 4);\n label.attr(\n 'transform',\n 'translate(' +\n (-bbox.width - 14 - (DEFAULT_GITGRAPH_CONFIG?.rotateCommitLabel === true ? 30 : 0)) +\n ', ' +\n (pos - bbox.height / 2 - 1) +\n ')'\n );\n if (dir === 'TB') {\n bkg.attr('x', pos - bbox.width / 2 - 10).attr('y', 0);\n label.attr('transform', 'translate(' + (pos - bbox.width / 2 - 5) + ', ' + 0 + ')');\n } else if (dir === 'BT') {\n bkg.attr('x', pos - bbox.width / 2 - 10).attr('y', maxPos);\n label.attr('transform', 'translate(' + (pos - bbox.width / 2 - 5) + ', ' + maxPos + ')');\n } else {\n bkg.attr('transform', 'translate(' + -19 + ', ' + (pos - bbox.height / 2) + ')');\n }\n });\n};\n\nconst setBranchPosition = function (\n name: string,\n pos: number,\n index: number,\n bbox: DOMRect,\n rotateCommitLabel: boolean\n): number {\n branchPos.set(name, { pos, index });\n pos += 50 + (rotateCommitLabel ? 40 : 0) + (dir === 'TB' || dir === 'BT' ? bbox.width / 2 : 0);\n return pos;\n};\n\nexport const draw: DrawDefinition = function (txt, id, ver, diagObj) {\n clear();\n\n log.debug('in gitgraph renderer', txt + '\\n', 'id:', id, ver);\n if (!DEFAULT_GITGRAPH_CONFIG) {\n throw new Error('GitGraph config not found');\n }\n const rotateCommitLabel = DEFAULT_GITGRAPH_CONFIG.rotateCommitLabel ?? false;\n const db = diagObj.db as GitGraphDBRenderProvider;\n allCommitsDict = db.getCommits();\n const branches = db.getBranchesAsObjArray();\n dir = db.getDirection();\n const diagram = select(`[id=\"${id}\"]`);\n let pos = 0;\n\n branches.forEach((branch, index) => {\n const labelElement = drawText(branch.name);\n const g = diagram.append('g');\n const branchLabel = g.insert('g').attr('class', 'branchLabel');\n const label = branchLabel.insert('g').attr('class', 'label branch-label');\n label.node()?.appendChild(labelElement);\n const bbox = labelElement.getBBox();\n\n pos = setBranchPosition(branch.name, pos, index, bbox, rotateCommitLabel);\n label.remove();\n branchLabel.remove();\n g.remove();\n });\n\n drawCommits(diagram, allCommitsDict, false);\n if (DEFAULT_GITGRAPH_CONFIG.showBranches) {\n drawBranches(diagram, branches);\n }\n drawArrows(diagram, allCommitsDict);\n drawCommits(diagram, allCommitsDict, true);\n\n utils.insertTitle(\n diagram,\n 'gitTitleText',\n DEFAULT_GITGRAPH_CONFIG.titleTopMargin ?? 0,\n db.getDiagramTitle()\n );\n\n // Setup the view box and size of the svg element\n setupGraphViewbox(\n undefined,\n diagram,\n DEFAULT_GITGRAPH_CONFIG.diagramPadding,\n DEFAULT_GITGRAPH_CONFIG.useMaxWidth\n );\n};\n\nexport default {\n draw,\n};\n\nif (import.meta.vitest) {\n const { it, expect, describe } = import.meta.vitest;\n\n describe('drawText', () => {\n it('should drawText', () => {\n const svgLabel = drawText('main');\n expect(svgLabel).toBeDefined();\n expect(svgLabel.children[0].innerHTML).toBe('main');\n });\n });\n\n describe('branchPosition', () => {\n const bbox: DOMRect = {\n x: 0,\n y: 0,\n width: 10,\n height: 10,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n toJSON: () => '',\n };\n\n it('should setBranchPositions LR with two branches', () => {\n dir = 'LR';\n\n const pos = setBranchPosition('main', 0, 0, bbox, true);\n expect(pos).toBe(90);\n expect(branchPos.get('main')).toEqual({ pos: 0, index: 0 });\n const posNext = setBranchPosition('develop', pos, 1, bbox, true);\n expect(posNext).toBe(180);\n expect(branchPos.get('develop')).toEqual({ pos: pos, index: 1 });\n });\n\n it('should setBranchPositions TB with two branches', () => {\n dir = 'TB';\n bbox.width = 34.9921875;\n\n const pos = setBranchPosition('main', 0, 0, bbox, true);\n expect(pos).toBe(107.49609375);\n expect(branchPos.get('main')).toEqual({ pos: 0, index: 0 });\n\n bbox.width = 56.421875;\n const posNext = setBranchPosition('develop', pos, 1, bbox, true);\n expect(posNext).toBe(225.70703125);\n expect(branchPos.get('develop')).toEqual({ pos: pos, index: 1 });\n });\n });\n\n describe('commitPosition', () => {\n const commits = new Map([\n [\n 'commitZero',\n {\n id: 'ZERO',\n message: '',\n seq: 0,\n type: commitType.NORMAL,\n tags: [],\n parents: [],\n branch: 'main',\n },\n ],\n [\n 'commitA',\n {\n id: 'A',\n message: '',\n seq: 1,\n type: commitType.NORMAL,\n tags: [],\n parents: ['ZERO'],\n branch: 'feature',\n },\n ],\n [\n 'commitB',\n {\n id: 'B',\n message: '',\n seq: 2,\n type: commitType.NORMAL,\n tags: [],\n parents: ['A'],\n branch: 'feature',\n },\n ],\n [\n 'commitM',\n {\n id: 'M',\n message: 'merged branch feature into main',\n seq: 3,\n type: commitType.MERGE,\n tags: [],\n parents: ['ZERO', 'B'],\n branch: 'main',\n customId: true,\n },\n ],\n [\n 'commitC',\n {\n id: 'C',\n message: '',\n seq: 4,\n type: commitType.NORMAL,\n tags: [],\n parents: ['ZERO'],\n branch: 'release',\n },\n ],\n [\n 'commit5_8928ea0',\n {\n id: '5-8928ea0',\n message: 'cherry-picked [object Object] into release',\n seq: 5,\n type: commitType.CHERRY_PICK,\n tags: [],\n parents: ['C', 'M'],\n branch: 'release',\n },\n ],\n [\n 'commitD',\n {\n id: 'D',\n message: '',\n seq: 6,\n type: commitType.NORMAL,\n tags: [],\n parents: ['5-8928ea0'],\n branch: 'release',\n },\n ],\n [\n 'commit7_ed848ba',\n {\n id: '7-ed848ba',\n message: 'cherry-picked [object Object] into release',\n seq: 7,\n type: commitType.CHERRY_PICK,\n tags: [],\n parents: ['D', 'M'],\n branch: 'release',\n },\n ],\n ]);\n let pos = 0;\n branchPos.set('main', { pos: 0, index: 0 });\n branchPos.set('feature', { pos: 107.49609375, index: 1 });\n branchPos.set('release', { pos: 224.03515625, index: 2 });\n\n describe('TB', () => {\n pos = 30;\n dir = 'TB';\n const expectedCommitPositionTB = new Map([\n ['commitZero', { x: 0, y: 40, posWithOffset: 40 }],\n ['commitA', { x: 107.49609375, y: 90, posWithOffset: 90 }],\n ['commitB', { x: 107.49609375, y: 140, posWithOffset: 140 }],\n ['commitM', { x: 0, y: 190, posWithOffset: 190 }],\n ['commitC', { x: 224.03515625, y: 240, posWithOffset: 240 }],\n ['commit5_8928ea0', { x: 224.03515625, y: 290, posWithOffset: 290 }],\n ['commitD', { x: 224.03515625, y: 340, posWithOffset: 340 }],\n ['commit7_ed848ba', { x: 224.03515625, y: 390, posWithOffset: 390 }],\n ]);\n commits.forEach((commit, key) => {\n it(`should give the correct position for commit ${key}`, () => {\n const position = getCommitPosition(commit, pos, false);\n expect(position).toEqual(expectedCommitPositionTB.get(key));\n pos += 50;\n });\n });\n });\n describe('LR', () => {\n let pos = 30;\n dir = 'LR';\n const expectedCommitPositionLR = new Map([\n ['commitZero', { x: 0, y: 40, posWithOffset: 40 }],\n ['commitA', { x: 107.49609375, y: 90, posWithOffset: 90 }],\n ['commitB', { x: 107.49609375, y: 140, posWithOffset: 140 }],\n ['commitM', { x: 0, y: 190, posWithOffset: 190 }],\n ['commitC', { x: 224.03515625, y: 240, posWithOffset: 240 }],\n ['commit5_8928ea0', { x: 224.03515625, y: 290, posWithOffset: 290 }],\n ['commitD', { x: 224.03515625, y: 340, posWithOffset: 340 }],\n ['commit7_ed848ba', { x: 224.03515625, y: 390, posWithOffset: 390 }],\n ]);\n commits.forEach((commit, key) => {\n it(`should give the correct position for commit ${key}`, () => {\n const position = getCommitPosition(commit, pos, false);\n expect(position).toEqual(expectedCommitPositionLR.get(key));\n pos += 50;\n });\n });\n });\n describe('getCommitClassType', () => {\n const expectedCommitClassType = new Map([\n ['commitZero', 'commit-normal'],\n ['commitA', 'commit-normal'],\n ['commitB', 'commit-normal'],\n ['commitM', 'commit-merge'],\n ['commitC', 'commit-normal'],\n ['commit5_8928ea0', 'commit-cherry-pick'],\n ['commitD', 'commit-normal'],\n ['commit7_ed848ba', 'commit-cherry-pick'],\n ]);\n commits.forEach((commit, key) => {\n it(`should give the correct class type for commit ${key}`, () => {\n const classType = getCommitClassType(commit);\n expect(classType).toBe(expectedCommitClassType.get(key));\n });\n });\n });\n });\n describe('building BT parallel commit diagram', () => {\n const commits = new Map([\n [\n '1-abcdefg',\n {\n id: '1-abcdefg',\n message: '',\n seq: 0,\n type: 0,\n tags: [],\n parents: [],\n branch: 'main',\n },\n ],\n [\n '2-abcdefg',\n {\n id: '2-abcdefg',\n message: '',\n seq: 1,\n type: 0,\n tags: [],\n parents: ['1-abcdefg'],\n branch: 'main',\n },\n ],\n [\n '3-abcdefg',\n {\n id: '3-abcdefg',\n message: '',\n seq: 2,\n type: 0,\n tags: [],\n parents: ['2-abcdefg'],\n branch: 'develop',\n },\n ],\n [\n '4-abcdefg',\n {\n id: '4-abcdefg',\n message: '',\n seq: 3,\n type: 0,\n tags: [],\n parents: ['3-abcdefg'],\n branch: 'develop',\n },\n ],\n [\n '5-abcdefg',\n {\n id: '5-abcdefg',\n message: '',\n seq: 4,\n type: 0,\n tags: [],\n parents: ['2-abcdefg'],\n branch: 'feature',\n },\n ],\n [\n '6-abcdefg',\n {\n id: '6-abcdefg',\n message: '',\n seq: 5,\n type: 0,\n tags: [],\n parents: ['5-abcdefg'],\n branch: 'feature',\n },\n ],\n [\n '7-abcdefg',\n {\n id: '7-abcdefg',\n message: '',\n seq: 6,\n type: 0,\n tags: [],\n parents: ['2-abcdefg'],\n branch: 'main',\n },\n ],\n [\n '8-abcdefg',\n {\n id: '8-abcdefg',\n message: '',\n seq: 7,\n type: 0,\n tags: [],\n parents: ['7-abcdefg'],\n branch: 'main',\n },\n ],\n ]);\n const expectedCommitPosition = new Map([\n ['1-abcdefg', { x: 0, y: 40 }],\n ['2-abcdefg', { x: 0, y: 90 }],\n ['3-abcdefg', { x: 107.49609375, y: 140 }],\n ['4-abcdefg', { x: 107.49609375, y: 190 }],\n ['5-abcdefg', { x: 225.70703125, y: 140 }],\n ['6-abcdefg', { x: 225.70703125, y: 190 }],\n ['7-abcdefg', { x: 0, y: 140 }],\n ['8-abcdefg', { x: 0, y: 190 }],\n ]);\n\n const expectedCommitPositionAfterParallel = new Map([\n ['1-abcdefg', { x: 0, y: 210 }],\n ['2-abcdefg', { x: 0, y: 160 }],\n ['3-abcdefg', { x: 107.49609375, y: 110 }],\n ['4-abcdefg', { x: 107.49609375, y: 60 }],\n ['5-abcdefg', { x: 225.70703125, y: 110 }],\n ['6-abcdefg', { x: 225.70703125, y: 60 }],\n ['7-abcdefg', { x: 0, y: 110 }],\n ['8-abcdefg', { x: 0, y: 60 }],\n ]);\n\n const expectedCommitCurrentPosition = new Map([\n ['1-abcdefg', 30],\n ['2-abcdefg', 80],\n ['3-abcdefg', 130],\n ['4-abcdefg', 180],\n ['5-abcdefg', 130],\n ['6-abcdefg', 180],\n ['7-abcdefg', 130],\n ['8-abcdefg', 180],\n ]);\n const sortedKeys = [...expectedCommitPosition.keys()];\n it('should get the correct commit position and current position', () => {\n dir = 'BT';\n let curPos = 30;\n commitPos.clear();\n branchPos.clear();\n branchPos.set('main', { pos: 0, index: 0 });\n branchPos.set('develop', { pos: 107.49609375, index: 1 });\n branchPos.set('feature', { pos: 225.70703125, index: 2 });\n DEFAULT_GITGRAPH_CONFIG!.parallelCommits = true;\n commits.forEach((commit, key) => {\n if (commit.parents.length > 0) {\n curPos = calculateCommitPosition(commit);\n }\n const position = setCommitPosition(commit, curPos);\n expect(position).toEqual(expectedCommitPosition.get(key));\n expect(curPos).toEqual(expectedCommitCurrentPosition.get(key));\n });\n });\n\n it('should get the correct commit position after parallel commits', () => {\n commitPos.clear();\n branchPos.clear();\n dir = 'BT';\n const curPos = 30;\n commitPos.clear();\n branchPos.clear();\n branchPos.set('main', { pos: 0, index: 0 });\n branchPos.set('develop', { pos: 107.49609375, index: 1 });\n branchPos.set('feature', { pos: 225.70703125, index: 2 });\n setParallelBTPos(sortedKeys, commits, curPos);\n sortedKeys.forEach((commit) => {\n const position = commitPos.get(commit);\n expect(position).toEqual(expectedCommitPositionAfterParallel.get(commit));\n });\n });\n });\n DEFAULT_GITGRAPH_CONFIG!.parallelCommits = false;\n it('add', () => {\n commitPos.set('parent1', { x: 1, y: 1 });\n commitPos.set('parent2', { x: 2, y: 2 });\n commitPos.set('parent3', { x: 3, y: 3 });\n dir = 'LR';\n const parents = ['parent1', 'parent2', 'parent3'];\n const closestParent = findClosestParent(parents);\n\n expect(closestParent).toBe('parent3');\n commitPos.clear();\n });\n}\n", "const getStyles = (options) =>\n `\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0, 1, 2, 3, 4, 5, 6, 7]\n .map(\n (i) =>\n `\n .branch-label${i} { fill: ${options['gitBranchLabel' + i]}; }\n .commit${i} { stroke: ${options['git' + i]}; fill: ${options['git' + i]}; }\n .commit-highlight${i} { stroke: ${options['gitInv' + i]}; fill: ${options['gitInv' + i]}; }\n .label${i} { fill: ${options['git' + i]}; }\n .arrow${i} { stroke: ${options['git' + i]}; }\n `\n )\n .join('\\n')}\n\n .branch {\n stroke-width: 1;\n stroke: ${options.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${options.commitLabelFontSize}; fill: ${options.commitLabelColor};}\n .commit-label-bkg { font-size: ${options.commitLabelFontSize}; fill: ${\n options.commitLabelBackground\n }; opacity: 0.5; }\n .tag-label { font-size: ${options.tagLabelFontSize}; fill: ${options.tagLabelColor};}\n .tag-label-bkg { fill: ${options.tagLabelBackground}; stroke: ${options.tagLabelBorder}; }\n .tag-hole { fill: ${options.textColor}; }\n\n .commit-merge {\n stroke: ${options.primaryColor};\n fill: ${options.primaryColor};\n }\n .commit-reverse {\n stroke: ${options.primaryColor};\n fill: ${options.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${options.primaryColor};\n fill: ${options.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n`;\n\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport { parser } from './gitGraphParser.js';\nimport { db } from './gitGraphAst.js';\nimport gitGraphRenderer from './gitGraphRenderer.js';\nimport gitGraphStyles from './styles.js';\nimport type { DiagramDefinition } from '../../diagram-api/types.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer: gitGraphRenderer,\n styles: gitGraphStyles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],$V1=[1,26],$V2=[1,27],$V3=[1,28],$V4=[1,29],$V5=[1,30],$V6=[1,31],$V7=[1,32],$V8=[1,33],$V9=[1,34],$Va=[1,9],$Vb=[1,10],$Vc=[1,11],$Vd=[1,12],$Ve=[1,13],$Vf=[1,14],$Vg=[1,15],$Vh=[1,16],$Vi=[1,19],$Vj=[1,20],$Vk=[1,21],$Vl=[1,22],$Vm=[1,23],$Vn=[1,25],$Vo=[1,35];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"gantt\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NL\":10,\"weekday\":11,\"weekday_monday\":12,\"weekday_tuesday\":13,\"weekday_wednesday\":14,\"weekday_thursday\":15,\"weekday_friday\":16,\"weekday_saturday\":17,\"weekday_sunday\":18,\"weekend\":19,\"weekend_friday\":20,\"weekend_saturday\":21,\"dateFormat\":22,\"inclusiveEndDates\":23,\"topAxis\":24,\"axisFormat\":25,\"tickInterval\":26,\"excludes\":27,\"includes\":28,\"todayMarker\":29,\"title\":30,\"acc_title\":31,\"acc_title_value\":32,\"acc_descr\":33,\"acc_descr_value\":34,\"acc_descr_multiline_value\":35,\"section\":36,\"clickStatement\":37,\"taskTxt\":38,\"taskData\":39,\"click\":40,\"callbackname\":41,\"callbackargs\":42,\"href\":43,\"clickStatementDebug\":44,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"gantt\",6:\"EOF\",8:\"SPACE\",10:\"NL\",12:\"weekday_monday\",13:\"weekday_tuesday\",14:\"weekday_wednesday\",15:\"weekday_thursday\",16:\"weekday_friday\",17:\"weekday_saturday\",18:\"weekday_sunday\",20:\"weekend_friday\",21:\"weekend_saturday\",22:\"dateFormat\",23:\"inclusiveEndDates\",24:\"topAxis\",25:\"axisFormat\",26:\"tickInterval\",27:\"excludes\",28:\"includes\",29:\"todayMarker\",30:\"title\",31:\"acc_title\",32:\"acc_title_value\",33:\"acc_descr\",34:\"acc_descr_value\",35:\"acc_descr_multiline_value\",36:\"section\",38:\"taskTxt\",39:\"taskData\",40:\"click\",41:\"callbackname\",42:\"callbackargs\",43:\"href\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\n yy.setWeekday(\"monday\");\nbreak;\ncase 9:\n yy.setWeekday(\"tuesday\");\nbreak;\ncase 10:\n yy.setWeekday(\"wednesday\");\nbreak;\ncase 11:\n yy.setWeekday(\"thursday\");\nbreak;\ncase 12:\n yy.setWeekday(\"friday\");\nbreak;\ncase 13:\n yy.setWeekday(\"saturday\");\nbreak;\ncase 14:\n yy.setWeekday(\"sunday\");\nbreak;\ncase 15:\n yy.setWeekend(\"friday\");\nbreak;\ncase 16:\n yy.setWeekend(\"saturday\");\nbreak;\ncase 17:\nyy.setDateFormat($$[$0].substr(11));this.$=$$[$0].substr(11);\nbreak;\ncase 18:\nyy.enableInclusiveEndDates();this.$=$$[$0].substr(18);\nbreak;\ncase 19:\nyy.TopAxis();this.$=$$[$0].substr(8);\nbreak;\ncase 20:\nyy.setAxisFormat($$[$0].substr(11));this.$=$$[$0].substr(11);\nbreak;\ncase 21:\nyy.setTickInterval($$[$0].substr(13));this.$=$$[$0].substr(13);\nbreak;\ncase 22:\nyy.setExcludes($$[$0].substr(9));this.$=$$[$0].substr(9);\nbreak;\ncase 23:\nyy.setIncludes($$[$0].substr(9));this.$=$$[$0].substr(9);\nbreak;\ncase 24:\nyy.setTodayMarker($$[$0].substr(12));this.$=$$[$0].substr(12);\nbreak;\ncase 27:\nyy.setDiagramTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 28:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 29: case 30:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 31:\n yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8); \nbreak;\ncase 33:\nyy.addTask($$[$0-1],$$[$0]);this.$='task';\nbreak;\ncase 34:\nthis.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0], null);\nbreak;\ncase 35:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 36:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], null);yy.setLink($$[$0-2],$$[$0]);\nbreak;\ncase 37:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setLink($$[$0-3],$$[$0]);\nbreak;\ncase 38:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0], null);yy.setLink($$[$0-2],$$[$0-1]);\nbreak;\ncase 39:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-1], $$[$0]);yy.setLink($$[$0-3],$$[$0-2]);\nbreak;\ncase 40:\nthis.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 41: case 47:\nthis.$=$$[$0-1] + ' ' + $$[$0];\nbreak;\ncase 42: case 43: case 45:\nthis.$=$$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];\nbreak;\ncase 44: case 46:\nthis.$=$$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];\nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:$V1,13:$V2,14:$V3,15:$V4,16:$V5,17:$V6,18:$V7,19:18,20:$V8,21:$V9,22:$Va,23:$Vb,24:$Vc,25:$Vd,26:$Ve,27:$Vf,28:$Vg,29:$Vh,30:$Vi,31:$Vj,33:$Vk,35:$Vl,36:$Vm,37:24,38:$Vn,40:$Vo},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:36,11:17,12:$V1,13:$V2,14:$V3,15:$V4,16:$V5,17:$V6,18:$V7,19:18,20:$V8,21:$V9,22:$Va,23:$Vb,24:$Vc,25:$Vd,26:$Ve,27:$Vf,28:$Vg,29:$Vh,30:$Vi,31:$Vj,33:$Vk,35:$Vl,36:$Vm,37:24,38:$Vn,40:$Vo},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,17]),o($V0,[2,18]),o($V0,[2,19]),o($V0,[2,20]),o($V0,[2,21]),o($V0,[2,22]),o($V0,[2,23]),o($V0,[2,24]),o($V0,[2,25]),o($V0,[2,26]),o($V0,[2,27]),{32:[1,37]},{34:[1,38]},o($V0,[2,30]),o($V0,[2,31]),o($V0,[2,32]),{39:[1,39]},o($V0,[2,8]),o($V0,[2,9]),o($V0,[2,10]),o($V0,[2,11]),o($V0,[2,12]),o($V0,[2,13]),o($V0,[2,14]),o($V0,[2,15]),o($V0,[2,16]),{41:[1,40],43:[1,41]},o($V0,[2,4]),o($V0,[2,28]),o($V0,[2,29]),o($V0,[2,33]),o($V0,[2,34],{42:[1,42],43:[1,43]}),o($V0,[2,40],{41:[1,44]}),o($V0,[2,35],{43:[1,45]}),o($V0,[2,36]),o($V0,[2,38],{42:[1,46]}),o($V0,[2,37]),o($V0,[2,39])],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 'open_directive'; \nbreak;\ncase 1: this.begin(\"acc_title\");return 31; \nbreak;\ncase 2: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 3: this.begin(\"acc_descr\");return 33; \nbreak;\ncase 4: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 5: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 6: this.popState(); \nbreak;\ncase 7:return \"acc_descr_multiline_value\";\nbreak;\ncase 8:/* skip comments */\nbreak;\ncase 9:/* skip comments */\nbreak;\ncase 10:/* do nothing */\nbreak;\ncase 11:return 10;\nbreak;\ncase 12:/* skip whitespace */\nbreak;\ncase 13:/* skip comments */\nbreak;\ncase 14:this.begin(\"href\");\nbreak;\ncase 15:this.popState();\nbreak;\ncase 16:return 43;\nbreak;\ncase 17:this.begin(\"callbackname\");\nbreak;\ncase 18:this.popState();\nbreak;\ncase 19:this.popState(); this.begin(\"callbackargs\");\nbreak;\ncase 20:return 41;\nbreak;\ncase 21:this.popState();\nbreak;\ncase 22:return 42;\nbreak;\ncase 23:this.begin(\"click\");\nbreak;\ncase 24:this.popState();\nbreak;\ncase 25:return 40;\nbreak;\ncase 26:return 4;\nbreak;\ncase 27:return 22;\nbreak;\ncase 28:return 23;\nbreak;\ncase 29:return 24;\nbreak;\ncase 30:return 25;\nbreak;\ncase 31:return 26;\nbreak;\ncase 32:return 28;\nbreak;\ncase 33:return 27;\nbreak;\ncase 34:return 29;\nbreak;\ncase 35:return 12\nbreak;\ncase 36:return 13\nbreak;\ncase 37:return 14\nbreak;\ncase 38:return 15\nbreak;\ncase 39:return 16\nbreak;\ncase 40:return 17\nbreak;\ncase 41:return 18\nbreak;\ncase 42:return 20\nbreak;\ncase 43:return 21\nbreak;\ncase 44:return 'date';\nbreak;\ncase 45:return 30;\nbreak;\ncase 46:return 'accDescription'\nbreak;\ncase 47:return 36;\nbreak;\ncase 48:return 38;\nbreak;\ncase 49:return 39;\nbreak;\ncase 50:return ':';\nbreak;\ncase 51:return 6;\nbreak;\ncase 52:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:%%(?!\\{)*[^\\n]*)/i,/^(?:[^\\}]%%*[^\\n]*)/i,/^(?:%%*[^\\n]*[\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:%[^\\n]*)/i,/^(?:href[\\s]+[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:call[\\s]+)/i,/^(?:\\([\\s]*\\))/i,/^(?:\\()/i,/^(?:[^(]*)/i,/^(?:\\))/i,/^(?:[^)]*)/i,/^(?:click[\\s]+)/i,/^(?:[\\s\\n])/i,/^(?:[^\\s\\n]*)/i,/^(?:gantt\\b)/i,/^(?:dateFormat\\s[^#\\n;]+)/i,/^(?:inclusiveEndDates\\b)/i,/^(?:topAxis\\b)/i,/^(?:axisFormat\\s[^#\\n;]+)/i,/^(?:tickInterval\\s[^#\\n;]+)/i,/^(?:includes\\s[^#\\n;]+)/i,/^(?:excludes\\s[^#\\n;]+)/i,/^(?:todayMarker\\s[^\\n;]+)/i,/^(?:weekday\\s+monday\\b)/i,/^(?:weekday\\s+tuesday\\b)/i,/^(?:weekday\\s+wednesday\\b)/i,/^(?:weekday\\s+thursday\\b)/i,/^(?:weekday\\s+friday\\b)/i,/^(?:weekday\\s+saturday\\b)/i,/^(?:weekday\\s+sunday\\b)/i,/^(?:weekend\\s+friday\\b)/i,/^(?:weekend\\s+saturday\\b)/i,/^(?:\\d\\d\\d\\d-\\d\\d-\\d\\d\\b)/i,/^(?:title\\s[^\\n]+)/i,/^(?:accDescription\\s[^#\\n;]+)/i,/^(?:section\\s[^\\n]+)/i,/^(?:[^:\\n]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[6,7],\"inclusive\":false},\"acc_descr\":{\"rules\":[4],\"inclusive\":false},\"acc_title\":{\"rules\":[2],\"inclusive\":false},\"callbackargs\":{\"rules\":[21,22],\"inclusive\":false},\"callbackname\":{\"rules\":[18,19,20],\"inclusive\":false},\"href\":{\"rules\":[15,16],\"inclusive\":false},\"click\":{\"rules\":[24,25],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isoWeek=t()}(this,(function(){\"use strict\";var e=\"day\";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf(\"year\"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,\"week\")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return\"isoweek\"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf(\"day\"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(\"day\"):n.bind(this)(e,t)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d/,r=/\\d\\d/,i=/\\d\\d?/,o=/\\d*[^-_:/,()\\s\\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_advancedFormat=t()}(this,(function(){\"use strict\";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||\"YYYY-MM-DDTHH:mm:ssZ\").replace(/\\[([^\\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case\"Q\":return Math.ceil((t.$M+1)/3);case\"Do\":return r.ordinal(t.$D);case\"gggg\":return t.weekYear();case\"GGGG\":return t.isoWeekYear();case\"wo\":return r.ordinal(t.week(),\"W\");case\"w\":case\"ww\":return s.s(t.week(),\"w\"===e?1:2,\"0\");case\"W\":case\"WW\":return s.s(t.isoWeek(),\"W\"===e?1:2,\"0\");case\"k\":case\"kk\":return s.s(String(0===t.$H?24:t.$H),\"k\"===e?1:2,\"0\");case\"X\":return Math.floor(t.$d.getTime()/1e3);case\"x\":return t.$d.getTime();case\"z\":return\"[\"+t.offsetName()+\"]\";case\"zzz\":return\"[\"+t.offsetName(\"long\")+\"]\";default:return e}}));return n.bind(this)(a)}}}));", "import { sanitizeUrl } from '@braintree/sanitize-url';\nimport dayjs from 'dayjs';\nimport dayjsIsoWeek from 'dayjs/plugin/isoWeek.js';\nimport dayjsCustomParseFormat from 'dayjs/plugin/customParseFormat.js';\nimport dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport utils from '../../utils.js';\n\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\n\ndayjs.extend(dayjsIsoWeek);\ndayjs.extend(dayjsCustomParseFormat);\ndayjs.extend(dayjsAdvancedFormat);\n\nconst WEEKEND_START_DAY = { friday: 5, saturday: 6 };\nlet dateFormat = '';\nlet axisFormat = '';\nlet tickInterval = undefined;\nlet todayMarker = '';\nlet includes = [];\nlet excludes = [];\nlet links = new Map();\nlet sections = [];\nlet tasks = [];\nlet currentSection = '';\nlet displayMode = '';\nconst tags = ['active', 'done', 'crit', 'milestone'];\nlet funs = [];\nlet inclusiveEndDates = false;\nlet topAxis = false;\nlet weekday = 'sunday';\nlet weekend = 'saturday';\n\n// The serial order of the task in the script\nlet lastOrder = 0;\n\nexport const clear = function () {\n sections = [];\n tasks = [];\n currentSection = '';\n funs = [];\n taskCnt = 0;\n lastTask = undefined;\n lastTaskID = undefined;\n rawTasks = [];\n dateFormat = '';\n axisFormat = '';\n displayMode = '';\n tickInterval = undefined;\n todayMarker = '';\n includes = [];\n excludes = [];\n inclusiveEndDates = false;\n topAxis = false;\n lastOrder = 0;\n links = new Map();\n commonClear();\n weekday = 'sunday';\n weekend = 'saturday';\n};\n\nexport const setAxisFormat = function (txt) {\n axisFormat = txt;\n};\n\nexport const getAxisFormat = function () {\n return axisFormat;\n};\n\nexport const setTickInterval = function (txt) {\n tickInterval = txt;\n};\n\nexport const getTickInterval = function () {\n return tickInterval;\n};\n\nexport const setTodayMarker = function (txt) {\n todayMarker = txt;\n};\n\nexport const getTodayMarker = function () {\n return todayMarker;\n};\n\nexport const setDateFormat = function (txt) {\n dateFormat = txt;\n};\n\nexport const enableInclusiveEndDates = function () {\n inclusiveEndDates = true;\n};\n\nexport const endDatesAreInclusive = function () {\n return inclusiveEndDates;\n};\n\nexport const enableTopAxis = function () {\n topAxis = true;\n};\n\nexport const topAxisEnabled = function () {\n return topAxis;\n};\n\nexport const setDisplayMode = function (txt) {\n displayMode = txt;\n};\n\nexport const getDisplayMode = function () {\n return displayMode;\n};\n\nexport const getDateFormat = function () {\n return dateFormat;\n};\n\nexport const setIncludes = function (txt) {\n includes = txt.toLowerCase().split(/[\\s,]+/);\n};\n\nexport const getIncludes = function () {\n return includes;\n};\nexport const setExcludes = function (txt) {\n excludes = txt.toLowerCase().split(/[\\s,]+/);\n};\n\nexport const getExcludes = function () {\n return excludes;\n};\n\nexport const getLinks = function () {\n return links;\n};\n\nexport const addSection = function (txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function () {\n return sections;\n};\n\nexport const getTasks = function () {\n let allItemsProcessed = compileTasks();\n const maxDepth = 10;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks = rawTasks;\n\n return tasks;\n};\n\nexport const isInvalidDate = function (date, dateFormat, excludes, includes) {\n if (includes.includes(date.format(dateFormat.trim()))) {\n return false;\n }\n if (\n excludes.includes('weekends') &&\n (date.isoWeekday() === WEEKEND_START_DAY[weekend] ||\n date.isoWeekday() === WEEKEND_START_DAY[weekend] + 1)\n ) {\n return true;\n }\n if (excludes.includes(date.format('dddd').toLowerCase())) {\n return true;\n }\n return excludes.includes(date.format(dateFormat.trim()));\n};\n\nexport const setWeekday = function (txt) {\n weekday = txt;\n};\n\nexport const getWeekday = function () {\n return weekday;\n};\n\nexport const setWeekend = function (startDay) {\n weekend = startDay;\n};\n\n/**\n * TODO: fully document what this function does and what types it accepts\n *\n * @param {object} task - The task to check.\n * @param {string | Date} task.startTime - Might be a `Date` or a `string`.\n * TODO: is this always a Date?\n * @param {string | Date} task.endTime - Might be a `Date` or a `string`.\n * TODO: is this always a Date?\n * @param {string} dateFormat - Dayjs date format string.\n * @param {*} excludes\n * @param {*} includes\n */\nconst checkTaskDates = function (task, dateFormat, excludes, includes) {\n if (!excludes.length || task.manualEndTime) {\n return;\n }\n let startTime;\n if (task.startTime instanceof Date) {\n startTime = dayjs(task.startTime);\n } else {\n startTime = dayjs(task.startTime, dateFormat, true);\n }\n startTime = startTime.add(1, 'd');\n\n let originalEndTime;\n if (task.endTime instanceof Date) {\n originalEndTime = dayjs(task.endTime);\n } else {\n originalEndTime = dayjs(task.endTime, dateFormat, true);\n }\n const [fixedEndTime, renderEndTime] = fixTaskDates(\n startTime,\n originalEndTime,\n dateFormat,\n excludes,\n includes\n );\n task.endTime = fixedEndTime.toDate();\n task.renderEndTime = renderEndTime;\n};\n\n/**\n * TODO: what does this function do?\n *\n * @param {dayjs.Dayjs} startTime - The start time.\n * @param {dayjs.Dayjs} endTime - The original end time (will return a different end time if it's invalid).\n * @param {string} dateFormat - Dayjs date format string.\n * @param {*} excludes\n * @param {*} includes\n * @returns {[endTime: dayjs.Dayjs, renderEndTime: Date | null]} The new `endTime`, and the end time to render.\n * `renderEndTime` may be `null` if `startTime` is newer than `endTime`.\n */\nconst fixTaskDates = function (startTime, endTime, dateFormat, excludes, includes) {\n let invalid = false;\n let renderEndTime = null;\n while (startTime <= endTime) {\n if (!invalid) {\n renderEndTime = endTime.toDate();\n }\n invalid = isInvalidDate(startTime, dateFormat, excludes, includes);\n if (invalid) {\n endTime = endTime.add(1, 'd');\n }\n startTime = startTime.add(1, 'd');\n }\n return [endTime, renderEndTime];\n};\n\nconst getStartDate = function (prevTime, dateFormat, str) {\n str = str.trim();\n\n // Test for after\n const afterRePattern = /^after\\s+(?[\\d\\w- ]+)/;\n const afterStatement = afterRePattern.exec(str);\n\n if (afterStatement !== null) {\n // check all after ids and take the latest\n let latestTask = null;\n for (const id of afterStatement.groups.ids.split(' ')) {\n let task = findTaskById(id);\n if (task !== undefined && (!latestTask || task.endTime > latestTask.endTime)) {\n latestTask = task;\n }\n }\n\n if (latestTask) {\n return latestTask.endTime;\n }\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n return today;\n }\n\n // Check for actual date set\n let mDate = dayjs(str, dateFormat.trim(), true);\n if (mDate.isValid()) {\n return mDate.toDate();\n } else {\n log.debug('Invalid date:' + str);\n log.debug('With date format:' + dateFormat.trim());\n const d = new Date(str);\n if (\n d === undefined ||\n isNaN(d.getTime()) ||\n // WebKit browsers can mis-parse invalid dates to be ridiculously\n // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.\n // This can cause virtually infinite loops while rendering, so for the\n // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as\n // invalid.\n d.getFullYear() < -10000 ||\n d.getFullYear() > 10000\n ) {\n throw new Error('Invalid date:' + str);\n }\n return d;\n }\n};\n\n/**\n * Parse a string into the args for `dayjs.add()`.\n *\n * The string have to be compound by a value and a shorthand duration unit. For example `5d`\n * represents 5 days.\n *\n * Please be aware that 1 day may be 23 or 25 hours, if the user lives in an area\n * that has daylight savings time (or even 23.5/24.5 hours in Lord Howe Island!)\n *\n * Shorthand unit supported are:\n *\n * - `y` for years\n * - `M` for months\n * - `w` for weeks\n * - `d` for days\n * - `h` for hours\n * - `s` for seconds\n * - `ms` for milliseconds\n *\n * @param {string} str - A string representing the duration.\n * @returns {[value: number, unit: dayjs.ManipulateType]} Arguments to pass to `dayjs.add()`\n */\nconst parseDuration = function (str) {\n // cspell:disable-next-line\n const statement = /^(\\d+(?:\\.\\d+)?)([Mdhmswy]|ms)$/.exec(str.trim());\n if (statement !== null) {\n return [Number.parseFloat(statement[1]), statement[2]];\n }\n // NaN means an invalid duration\n return [NaN, 'ms'];\n};\n\nconst getEndDate = function (prevTime, dateFormat, str, inclusive = false) {\n str = str.trim();\n\n // test for until\n const untilRePattern = /^until\\s+(?[\\d\\w- ]+)/;\n const untilStatement = untilRePattern.exec(str);\n\n if (untilStatement !== null) {\n // check all until ids and take the earliest\n let earliestTask = null;\n for (const id of untilStatement.groups.ids.split(' ')) {\n let task = findTaskById(id);\n if (task !== undefined && (!earliestTask || task.startTime < earliestTask.startTime)) {\n earliestTask = task;\n }\n }\n\n if (earliestTask) {\n return earliestTask.startTime;\n }\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n return today;\n }\n\n // check for actual date\n let parsedDate = dayjs(str, dateFormat.trim(), true);\n if (parsedDate.isValid()) {\n if (inclusive) {\n parsedDate = parsedDate.add(1, 'd');\n }\n return parsedDate.toDate();\n }\n\n let endTime = dayjs(prevTime);\n const [durationValue, durationUnit] = parseDuration(str);\n if (!Number.isNaN(durationValue)) {\n const newEndTime = endTime.add(durationValue, durationUnit);\n if (newEndTime.isValid()) {\n endTime = newEndTime;\n }\n }\n return endTime.toDate();\n};\n\nlet taskCnt = 0;\nconst parseId = function (idStr) {\n if (idStr === undefined) {\n taskCnt = taskCnt + 1;\n return 'task' + taskCnt;\n }\n return idStr;\n};\n// id, startDate, endDate\n// id, startDate, length\n// id, after x, endDate\n// id, after x, length\n// startDate, endDate\n// startDate, length\n// after x, endDate\n// after x, length\n// endDate\n// length\n\nconst compileData = function (prevTask, dataStr) {\n let ds;\n\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n const data = ds.split(',');\n\n const task = {};\n\n // Get tags like active, done, crit and milestone\n getTaskTags(data, task, tags);\n\n for (let i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n let endTimeData = '';\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = prevTask.endTime;\n endTimeData = data[0];\n break;\n case 2:\n task.id = parseId();\n task.startTime = getStartDate(undefined, dateFormat, data[0]);\n endTimeData = data[1];\n break;\n case 3:\n task.id = parseId(data[0]);\n task.startTime = getStartDate(undefined, dateFormat, data[1]);\n endTimeData = data[2];\n break;\n default:\n }\n\n if (endTimeData) {\n task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);\n task.manualEndTime = dayjs(endTimeData, 'YYYY-MM-DD', true).isValid();\n checkTaskDates(task, dateFormat, excludes, includes);\n }\n\n return task;\n};\n\nconst parseData = function (prevTaskId, dataStr) {\n let ds;\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n const data = ds.split(',');\n\n const task = {};\n\n // Get tags like active, done, crit and milestone\n getTaskTags(data, task, tags);\n\n for (let i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = {\n type: 'prevTaskEnd',\n id: prevTaskId,\n };\n task.endTime = {\n data: data[0],\n };\n break;\n case 2:\n task.id = parseId();\n task.startTime = {\n type: 'getStartDate',\n startData: data[0],\n };\n task.endTime = {\n data: data[1],\n };\n break;\n case 3:\n task.id = parseId(data[0]);\n task.startTime = {\n type: 'getStartDate',\n startData: data[1],\n };\n task.endTime = {\n data: data[2],\n };\n break;\n default:\n }\n\n return task;\n};\n\nlet lastTask;\nlet lastTaskID;\nlet rawTasks = [];\nconst taskDb = {};\nexport const addTask = function (descr, data) {\n const rawTask = {\n section: currentSection,\n type: currentSection,\n processed: false,\n manualEndTime: false,\n renderEndTime: null,\n raw: { data: data },\n task: descr,\n classes: [],\n };\n const taskInfo = parseData(lastTaskID, data);\n rawTask.raw.startTime = taskInfo.startTime;\n rawTask.raw.endTime = taskInfo.endTime;\n rawTask.id = taskInfo.id;\n rawTask.prevTaskId = lastTaskID;\n rawTask.active = taskInfo.active;\n rawTask.done = taskInfo.done;\n rawTask.crit = taskInfo.crit;\n rawTask.milestone = taskInfo.milestone;\n rawTask.order = lastOrder;\n\n lastOrder++;\n\n const pos = rawTasks.push(rawTask);\n\n lastTaskID = rawTask.id;\n // Store cross ref\n taskDb[rawTask.id] = pos - 1;\n};\n\nexport const findTaskById = function (id) {\n const pos = taskDb[id];\n return rawTasks[pos];\n};\n\nexport const addTaskOrg = function (descr, data) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: [],\n };\n const taskInfo = compileData(lastTask, data);\n newTask.startTime = taskInfo.startTime;\n newTask.endTime = taskInfo.endTime;\n newTask.id = taskInfo.id;\n newTask.active = taskInfo.active;\n newTask.done = taskInfo.done;\n newTask.crit = taskInfo.crit;\n newTask.milestone = taskInfo.milestone;\n lastTask = newTask;\n tasks.push(newTask);\n};\n\nconst compileTasks = function () {\n const compileTask = function (pos) {\n const task = rawTasks[pos];\n let startTime = '';\n switch (rawTasks[pos].raw.startTime.type) {\n case 'prevTaskEnd': {\n const prevTask = findTaskById(task.prevTaskId);\n task.startTime = prevTask.endTime;\n break;\n }\n case 'getStartDate':\n startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);\n if (startTime) {\n rawTasks[pos].startTime = startTime;\n }\n break;\n }\n\n if (rawTasks[pos].startTime) {\n rawTasks[pos].endTime = getEndDate(\n rawTasks[pos].startTime,\n dateFormat,\n rawTasks[pos].raw.endTime.data,\n inclusiveEndDates\n );\n if (rawTasks[pos].endTime) {\n rawTasks[pos].processed = true;\n rawTasks[pos].manualEndTime = dayjs(\n rawTasks[pos].raw.endTime.data,\n 'YYYY-MM-DD',\n true\n ).isValid();\n checkTaskDates(rawTasks[pos], dateFormat, excludes, includes);\n }\n }\n\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (const [i, rawTask] of rawTasks.entries()) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTask.processed;\n }\n return allProcessed;\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids Comma separated list of ids\n * @param _linkStr URL to create a link for\n */\nexport const setLink = function (ids, _linkStr) {\n let linkStr = _linkStr;\n if (getConfig().securityLevel !== 'loose') {\n linkStr = sanitizeUrl(_linkStr);\n }\n ids.split(',').forEach(function (id) {\n let rawTask = findTaskById(id);\n if (rawTask !== undefined) {\n pushFun(id, () => {\n window.open(linkStr, '_self');\n });\n links.set(id, linkStr);\n }\n });\n setClass(ids, 'clickable');\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n *\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\nexport const setClass = function (ids, className) {\n ids.split(',').forEach(function (id) {\n let rawTask = findTaskById(id);\n if (rawTask !== undefined) {\n rawTask.classes.push(className);\n }\n });\n};\n\nconst setClickFun = function (id, functionName, functionArgs) {\n if (getConfig().securityLevel !== 'loose') {\n return;\n }\n if (functionName === undefined) {\n return;\n }\n\n let argList = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.startsWith('\"') && item.endsWith('\"')) {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(id);\n }\n\n let rawTask = findTaskById(id);\n if (rawTask !== undefined) {\n pushFun(id, () => {\n utils.runFunc(functionName, ...argList);\n });\n }\n};\n\n/**\n * The callbackFunction is executed in a click event bound to the task with the specified id or the\n * task's assigned text\n *\n * @param id The task's id\n * @param callbackFunction A function to be executed when clicked on the task or the task's text\n */\nconst pushFun = function (id, callbackFunction) {\n funs.push(\n function () {\n // const elem = d3.select(element).select(`[id=\"${id}\"]`)\n const elem = document.querySelector(`[id=\"${id}\"]`);\n if (elem !== null) {\n elem.addEventListener('click', function () {\n callbackFunction();\n });\n }\n },\n function () {\n // const elem = d3.select(element).select(`[id=\"${id}-text\"]`)\n const elem = document.querySelector(`[id=\"${id}-text\"]`);\n if (elem !== null) {\n elem.addEventListener('click', function () {\n callbackFunction();\n });\n }\n }\n );\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\nexport const setClickEvent = function (ids, functionName, functionArgs) {\n ids.split(',').forEach(function (id) {\n setClickFun(id, functionName, functionArgs);\n });\n setClass(ids, 'clickable');\n};\n\n/**\n * Binds all functions previously added to fun (specified through click) to the element\n *\n * @param element\n */\nexport const bindFunctions = function (element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n};\n\nexport default {\n getConfig: () => getConfig().gantt,\n clear,\n setDateFormat,\n getDateFormat,\n enableInclusiveEndDates,\n endDatesAreInclusive,\n enableTopAxis,\n topAxisEnabled,\n setAxisFormat,\n getAxisFormat,\n setTickInterval,\n getTickInterval,\n setTodayMarker,\n getTodayMarker,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n setDisplayMode,\n getDisplayMode,\n setAccDescription,\n getAccDescription,\n addSection,\n getSections,\n getTasks,\n addTask,\n findTaskById,\n addTaskOrg,\n setIncludes,\n getIncludes,\n setExcludes,\n getExcludes,\n setClickEvent,\n setLink,\n getLinks,\n bindFunctions,\n parseDuration,\n isInvalidDate,\n setWeekday,\n getWeekday,\n setWeekend,\n};\n\n/**\n * @param data\n * @param task\n * @param tags\n */\nfunction getTaskTags(data, task, tags) {\n let matchFound = true;\n while (matchFound) {\n matchFound = false;\n tags.forEach(function (t) {\n const pattern = '^\\\\s*' + t + '\\\\s*$';\n const regex = new RegExp(pattern);\n if (data[0].match(regex)) {\n task[t] = true;\n data.shift(1);\n matchFound = true;\n }\n });\n }\n}\n", "import dayjs from 'dayjs';\nimport { log } from '../../logger.js';\nimport {\n select,\n scaleTime,\n min,\n max,\n scaleLinear,\n interpolateHcl,\n axisBottom,\n axisTop,\n timeFormat,\n timeMillisecond,\n timeSecond,\n timeMinute,\n timeHour,\n timeDay,\n timeMonday,\n timeTuesday,\n timeWednesday,\n timeThursday,\n timeFriday,\n timeSaturday,\n timeSunday,\n timeMonth,\n} from 'd3';\nimport common from '../common/common.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\nexport const setConf = function () {\n log.debug('Something is calling, setConf, remove the call');\n};\n\n/**\n * This will map any day of the week that can be set in the `weekday` option to\n * the corresponding d3-time function that is used to calculate the ticks.\n */\nconst mapWeekdayToTimeFunction = {\n monday: timeMonday,\n tuesday: timeTuesday,\n wednesday: timeWednesday,\n thursday: timeThursday,\n friday: timeFriday,\n saturday: timeSaturday,\n sunday: timeSunday,\n};\n\n/**\n * For this issue:\n * https://github.com/mermaid-js/mermaid/issues/1618\n *\n * Finds the number of intersections between tasks that happen at any point in time.\n * Used to figure out how many rows are needed to display the tasks when the display\n * mode is set to 'compact'.\n *\n * @param tasks\n * @param orderOffset\n */\nconst getMaxIntersections = (tasks, orderOffset) => {\n let timeline = [...tasks].map(() => -Infinity);\n let sorted = [...tasks].sort((a, b) => a.startTime - b.startTime || a.order - b.order);\n let maxIntersections = 0;\n for (const element of sorted) {\n for (let j = 0; j < timeline.length; j++) {\n if (element.startTime >= timeline[j]) {\n timeline[j] = element.endTime;\n element.order = j + orderOffset;\n if (j > maxIntersections) {\n maxIntersections = j;\n }\n break;\n }\n }\n }\n\n return maxIntersections;\n};\n\nlet w;\nexport const draw = function (text, id, version, diagObj) {\n const conf = getConfig().gantt;\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n const elem = doc.getElementById(id);\n w = elem.parentElement.offsetWidth;\n\n if (w === undefined) {\n w = 1200;\n }\n\n if (conf.useWidth !== undefined) {\n w = conf.useWidth;\n }\n\n const taskArray = diagObj.db.getTasks();\n\n // Set height based on number of tasks\n\n let categories = [];\n\n for (const element of taskArray) {\n categories.push(element.type);\n }\n\n categories = checkUnique(categories);\n const categoryHeights = {};\n\n let h = 2 * conf.topPadding;\n if (diagObj.db.getDisplayMode() === 'compact' || conf.displayMode === 'compact') {\n const categoryElements = {};\n for (const element of taskArray) {\n if (categoryElements[element.section] === undefined) {\n categoryElements[element.section] = [element];\n } else {\n categoryElements[element.section].push(element);\n }\n }\n\n let intersections = 0;\n for (const category of Object.keys(categoryElements)) {\n const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1;\n intersections += categoryHeight;\n h += categoryHeight * (conf.barHeight + conf.barGap);\n categoryHeights[category] = categoryHeight;\n }\n } else {\n h += taskArray.length * (conf.barHeight + conf.barGap);\n for (const category of categories) {\n categoryHeights[category] = taskArray.filter((task) => task.type === category).length;\n }\n }\n\n // Set viewBox\n elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Set timescale\n const timeScale = scaleTime()\n .domain([\n min(taskArray, function (d) {\n return d.startTime;\n }),\n max(taskArray, function (d) {\n return d.endTime;\n }),\n ])\n .rangeRound([0, w - conf.leftPadding - conf.rightPadding]);\n\n /**\n * @param a\n * @param b\n */\n function taskCompare(a, b) {\n const taskA = a.startTime;\n const taskB = b.startTime;\n let result = 0;\n if (taskA > taskB) {\n result = 1;\n } else if (taskA < taskB) {\n result = -1;\n }\n return result;\n }\n\n // Sort the task array using the above taskCompare() so that\n // tasks are created based on their order of startTime\n taskArray.sort(taskCompare);\n\n makeGantt(taskArray, w, h);\n\n configureSvgSize(svg, h, w, conf.useMaxWidth);\n\n svg\n .append('text')\n .text(diagObj.db.getDiagramTitle())\n .attr('x', w / 2)\n .attr('y', conf.titleTopMargin)\n .attr('class', 'titleText');\n\n /**\n * @param tasks\n * @param pageWidth\n * @param pageHeight\n */\n function makeGantt(tasks, pageWidth, pageHeight) {\n const barHeight = conf.barHeight;\n const gap = barHeight + conf.barGap;\n const topPadding = conf.topPadding;\n const leftPadding = conf.leftPadding;\n\n const colorScale = scaleLinear()\n .domain([0, categories.length])\n .range(['#00B9FA', '#F95002'])\n .interpolate(interpolateHcl);\n\n drawExcludeDays(\n gap,\n topPadding,\n leftPadding,\n pageWidth,\n pageHeight,\n tasks,\n diagObj.db.getExcludes(),\n diagObj.db.getIncludes()\n );\n makeGrid(leftPadding, topPadding, pageWidth, pageHeight);\n drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);\n vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);\n drawToday(leftPadding, topPadding, pageWidth, pageHeight);\n }\n\n /**\n * @param theArray\n * @param theGap\n * @param theTopPad\n * @param theSidePad\n * @param theBarHeight\n * @param theColorScale\n * @param w\n */\n function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {\n // Get unique task orders. Required to draw the background rects when display mode is compact.\n const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))];\n const uniqueTasks = uniqueTaskOrderIds.map((id) => theArray.find((item) => item.order === id));\n\n // Draw background rects covering the entire width of the graph, these form the section rows.\n svg\n .append('g')\n .selectAll('rect')\n .data(uniqueTasks)\n .enter()\n .append('rect')\n .attr('x', 0)\n .attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad - 2;\n })\n .attr('width', function () {\n return w - conf.rightPadding / 2;\n })\n .attr('height', theGap)\n .attr('class', function (d) {\n for (const [i, category] of categories.entries()) {\n if (d.type === category) {\n return 'section section' + (i % conf.numberSectionStyles);\n }\n }\n return 'section section0';\n });\n\n // Draw the rects representing the tasks\n const rectangles = svg.append('g').selectAll('rect').data(theArray).enter();\n\n const links = diagObj.db.getLinks();\n\n // Render the tasks with links\n // Render the other tasks\n rectangles\n .append('rect')\n .attr('id', function (d) {\n return d.id;\n })\n .attr('rx', 3)\n .attr('ry', 3)\n .attr('x', function (d) {\n if (d.milestone) {\n return (\n timeScale(d.startTime) +\n theSidePad +\n 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) -\n 0.5 * theBarHeight\n );\n }\n return timeScale(d.startTime) + theSidePad;\n })\n .attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad;\n })\n .attr('width', function (d) {\n if (d.milestone) {\n return theBarHeight;\n }\n return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);\n })\n .attr('height', theBarHeight)\n .attr('transform-origin', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n\n return (\n (\n timeScale(d.startTime) +\n theSidePad +\n 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))\n ).toString() +\n 'px ' +\n (i * theGap + theTopPad + 0.5 * theBarHeight).toString() +\n 'px'\n );\n })\n .attr('class', function (d) {\n const res = 'task';\n\n let classStr = '';\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n let secNum = 0;\n for (const [i, category] of categories.entries()) {\n if (d.type === category) {\n secNum = i % conf.numberSectionStyles;\n }\n }\n\n let taskClass = '';\n if (d.active) {\n if (d.crit) {\n taskClass += ' activeCrit';\n } else {\n taskClass = ' active';\n }\n } else if (d.done) {\n if (d.crit) {\n taskClass = ' doneCrit';\n } else {\n taskClass = ' done';\n }\n } else {\n if (d.crit) {\n taskClass += ' crit';\n }\n }\n\n if (taskClass.length === 0) {\n taskClass = ' task';\n }\n\n if (d.milestone) {\n taskClass = ' milestone ' + taskClass;\n }\n\n taskClass += secNum;\n\n taskClass += ' ' + classStr;\n\n return res + taskClass;\n });\n\n // Append task labels\n rectangles\n .append('text')\n .attr('id', function (d) {\n return d.id + '-text';\n })\n .text(function (d) {\n return d.task;\n })\n .attr('font-size', conf.fontSize)\n .attr('x', function (d) {\n let startX = timeScale(d.startTime);\n let endX = timeScale(d.renderEndTime || d.endTime);\n if (d.milestone) {\n startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;\n }\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n const textWidth = this.getBBox().width;\n\n // Check id text width > width of rectangle\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return startX + theSidePad - 5;\n } else {\n return endX + theSidePad + 5;\n }\n } else {\n return (endX - startX) / 2 + startX + theSidePad;\n }\n })\n .attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;\n })\n .attr('text-height', theBarHeight)\n .attr('class', function (d) {\n const startX = timeScale(d.startTime);\n let endX = timeScale(d.endTime);\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n const textWidth = this.getBBox().width;\n\n let classStr = '';\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n let secNum = 0;\n for (const [i, category] of categories.entries()) {\n if (d.type === category) {\n secNum = i % conf.numberSectionStyles;\n }\n }\n\n let taskType = '';\n if (d.active) {\n if (d.crit) {\n taskType = 'activeCritText' + secNum;\n } else {\n taskType = 'activeText' + secNum;\n }\n }\n\n if (d.done) {\n if (d.crit) {\n taskType = taskType + ' doneCritText' + secNum;\n } else {\n taskType = taskType + ' doneText' + secNum;\n }\n } else {\n if (d.crit) {\n taskType = taskType + ' critText' + secNum;\n }\n }\n\n if (d.milestone) {\n taskType += ' milestoneText';\n }\n\n // Check id text width > width of rectangle\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;\n } else {\n return (\n classStr +\n ' taskTextOutsideRight taskTextOutside' +\n secNum +\n ' ' +\n taskType +\n ' width-' +\n textWidth\n );\n }\n } else {\n return classStr + ' taskText taskText' + secNum + ' ' + taskType + ' width-' + textWidth;\n }\n });\n\n const securityLevel = getConfig().securityLevel;\n\n // Wrap the tasks in an a tag for working links without javascript\n if (securityLevel === 'sandbox') {\n let sandboxElement;\n sandboxElement = select('#i' + id);\n const doc = sandboxElement.nodes()[0].contentDocument;\n\n rectangles\n .filter(function (d) {\n return links.has(d.id);\n })\n .each(function (o) {\n var taskRect = doc.querySelector('#' + o.id);\n var taskText = doc.querySelector('#' + o.id + '-text');\n const oldParent = taskRect.parentNode;\n var Link = doc.createElement('a');\n Link.setAttribute('xlink:href', links.get(o.id));\n Link.setAttribute('target', '_top');\n oldParent.appendChild(Link);\n Link.appendChild(taskRect);\n Link.appendChild(taskText);\n });\n }\n }\n /**\n * @param theGap\n * @param theTopPad\n * @param theSidePad\n * @param w\n * @param h\n * @param tasks\n * @param {unknown[]} excludes\n * @param {unknown[]} includes\n */\n function drawExcludeDays(theGap, theTopPad, theSidePad, w, h, tasks, excludes, includes) {\n if (excludes.length === 0 && includes.length === 0) {\n return;\n }\n\n let minTime;\n let maxTime;\n for (const { startTime, endTime } of tasks) {\n if (minTime === undefined || startTime < minTime) {\n minTime = startTime;\n }\n if (maxTime === undefined || endTime > maxTime) {\n maxTime = endTime;\n }\n }\n\n if (!minTime || !maxTime) {\n return;\n }\n\n if (dayjs(maxTime).diff(dayjs(minTime), 'year') > 5) {\n log.warn(\n 'The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.'\n );\n return;\n }\n\n const dateFormat = diagObj.db.getDateFormat();\n const excludeRanges = [];\n let range = null;\n let d = dayjs(minTime);\n while (d.valueOf() <= maxTime) {\n if (diagObj.db.isInvalidDate(d, dateFormat, excludes, includes)) {\n if (!range) {\n range = {\n start: d,\n end: d,\n };\n } else {\n range.end = d;\n }\n } else {\n if (range) {\n excludeRanges.push(range);\n range = null;\n }\n }\n d = d.add(1, 'd');\n }\n\n const rectangles = svg.append('g').selectAll('rect').data(excludeRanges).enter();\n\n rectangles\n .append('rect')\n .attr('id', function (d) {\n return 'exclude-' + d.start.format('YYYY-MM-DD');\n })\n .attr('x', function (d) {\n return timeScale(d.start) + theSidePad;\n })\n .attr('y', conf.gridLineStartPadding)\n .attr('width', function (d) {\n const renderEnd = d.end.add(1, 'day');\n return timeScale(renderEnd) - timeScale(d.start);\n })\n .attr('height', h - theTopPad - conf.gridLineStartPadding)\n .attr('transform-origin', function (d, i) {\n return (\n (\n timeScale(d.start) +\n theSidePad +\n 0.5 * (timeScale(d.end) - timeScale(d.start))\n ).toString() +\n 'px ' +\n (i * theGap + 0.5 * h).toString() +\n 'px'\n );\n })\n .attr('class', 'exclude-range');\n }\n\n /**\n * @param theSidePad\n * @param theTopPad\n * @param w\n * @param h\n */\n function makeGrid(theSidePad, theTopPad, w, h) {\n let bottomXAxis = axisBottom(timeScale)\n .tickSize(-h + theTopPad + conf.gridLineStartPadding)\n .tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n\n const reTickInterval = /^([1-9]\\d*)(millisecond|second|minute|hour|day|week|month)$/;\n const resultTickInterval = reTickInterval.exec(\n diagObj.db.getTickInterval() || conf.tickInterval\n );\n\n if (resultTickInterval !== null) {\n const every = resultTickInterval[1];\n const interval = resultTickInterval[2];\n const weekday = diagObj.db.getWeekday() || conf.weekday;\n\n switch (interval) {\n case 'millisecond':\n bottomXAxis.ticks(timeMillisecond.every(every));\n break;\n case 'second':\n bottomXAxis.ticks(timeSecond.every(every));\n break;\n case 'minute':\n bottomXAxis.ticks(timeMinute.every(every));\n break;\n case 'hour':\n bottomXAxis.ticks(timeHour.every(every));\n break;\n case 'day':\n bottomXAxis.ticks(timeDay.every(every));\n break;\n case 'week':\n bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday].every(every));\n break;\n case 'month':\n bottomXAxis.ticks(timeMonth.every(every));\n break;\n }\n }\n\n svg\n .append('g')\n .attr('class', 'grid')\n .attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')')\n .call(bottomXAxis)\n .selectAll('text')\n .style('text-anchor', 'middle')\n .attr('fill', '#000')\n .attr('stroke', 'none')\n .attr('font-size', 10)\n .attr('dy', '1em');\n\n if (diagObj.db.topAxisEnabled() || conf.topAxis) {\n let topXAxis = axisTop(timeScale)\n .tickSize(-h + theTopPad + conf.gridLineStartPadding)\n .tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n\n if (resultTickInterval !== null) {\n const every = resultTickInterval[1];\n const interval = resultTickInterval[2];\n const weekday = diagObj.db.getWeekday() || conf.weekday;\n\n switch (interval) {\n case 'millisecond':\n topXAxis.ticks(timeMillisecond.every(every));\n break;\n case 'second':\n topXAxis.ticks(timeSecond.every(every));\n break;\n case 'minute':\n topXAxis.ticks(timeMinute.every(every));\n break;\n case 'hour':\n topXAxis.ticks(timeHour.every(every));\n break;\n case 'day':\n topXAxis.ticks(timeDay.every(every));\n break;\n case 'week':\n topXAxis.ticks(mapWeekdayToTimeFunction[weekday].every(every));\n break;\n case 'month':\n topXAxis.ticks(timeMonth.every(every));\n break;\n }\n }\n\n svg\n .append('g')\n .attr('class', 'grid')\n .attr('transform', 'translate(' + theSidePad + ', ' + theTopPad + ')')\n .call(topXAxis)\n .selectAll('text')\n .style('text-anchor', 'middle')\n .attr('fill', '#000')\n .attr('stroke', 'none')\n .attr('font-size', 10);\n // .attr('dy', '1em');\n }\n }\n\n /**\n * @param theGap\n * @param theTopPad\n */\n function vertLabels(theGap, theTopPad) {\n let prevGap = 0;\n\n const numOccurrences = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]);\n\n svg\n .append('g') // without doing this, impossible to put grid lines behind text\n .selectAll('text')\n .data(numOccurrences)\n .enter()\n .append(function (d) {\n const rows = d[0].split(common.lineBreakRegex);\n const dy = -(rows.length - 1) / 2;\n\n const svgLabel = doc.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('dy', dy + 'em');\n\n for (const [j, row] of rows.entries()) {\n const tspan = doc.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttribute('alignment-baseline', 'central');\n tspan.setAttribute('x', '10');\n if (j > 0) {\n tspan.setAttribute('dy', '1em');\n }\n tspan.textContent = row;\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n })\n .attr('x', 10)\n .attr('y', function (d, i) {\n if (i > 0) {\n for (let j = 0; j < i; j++) {\n prevGap += numOccurrences[i - 1][1];\n return (d[1] * theGap) / 2 + prevGap * theGap + theTopPad;\n }\n } else {\n return (d[1] * theGap) / 2 + theTopPad;\n }\n })\n .attr('font-size', conf.sectionFontSize)\n .attr('class', function (d) {\n for (const [i, category] of categories.entries()) {\n if (d[0] === category) {\n return 'sectionTitle sectionTitle' + (i % conf.numberSectionStyles);\n }\n }\n return 'sectionTitle';\n });\n }\n\n /**\n * @param theSidePad\n * @param theTopPad\n * @param w\n * @param h\n */\n function drawToday(theSidePad, theTopPad, w, h) {\n const todayMarker = diagObj.db.getTodayMarker();\n if (todayMarker === 'off') {\n return;\n }\n\n const todayG = svg.append('g').attr('class', 'today');\n const today = new Date();\n const todayLine = todayG.append('line');\n\n todayLine\n .attr('x1', timeScale(today) + theSidePad)\n .attr('x2', timeScale(today) + theSidePad)\n .attr('y1', conf.titleTopMargin)\n .attr('y2', h - conf.titleTopMargin)\n .attr('class', 'today');\n\n if (todayMarker !== '') {\n todayLine.attr('style', todayMarker.replace(/,/g, ';'));\n }\n }\n\n /**\n * From this stack exchange question:\n * http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript\n *\n * @param arr\n */\n function checkUnique(arr) {\n const hash = {};\n const result = [];\n for (let i = 0, l = arr.length; i < l; ++i) {\n if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) {\n // it works with objects! in FF, at least\n hash[arr[i]] = true;\n result.push(arr[i]);\n }\n }\n return result;\n }\n};\n\nexport default {\n setConf,\n draw,\n};\n", "const getStyles = (options) =>\n `\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${options.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${options.sectionBkgColor};\n }\n\n .section2 {\n fill: ${options.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${options.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${options.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${options.fontFamily};\n fill: ${options.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${options.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${options.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${options.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${options.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${options.taskBkgColor};\n stroke: ${options.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${options.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${options.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${options.activeTaskBkgColor};\n stroke: ${options.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${options.doneTaskBorderColor};\n fill: ${options.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.titleColor || options.textColor};\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n`;\n\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport ganttParser from './parser/gantt.jison';\nimport ganttDb from './ganttDb.js';\nimport ganttRenderer from './ganttRenderer.js';\nimport ganttStyles from './styles.js';\nimport type { DiagramDefinition } from '../../diagram-api/types.js';\n\nexport const diagram: DiagramDefinition = {\n parser: ganttParser,\n db: ganttDb,\n renderer: ganttRenderer,\n styles: ganttStyles,\n};\n", "import type { Info } from '@mermaid-js/parser';\nimport { parse } from '@mermaid-js/parser';\nimport type { ParserDefinition } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\n\nexport const parser: ParserDefinition = {\n parse: async (input: string): Promise => {\n const ast: Info = await parse('info', input);\n log.debug(ast);\n },\n};\n", "{\n \"name\": \"mermaid\",\n \"version\": \"11.4.0\",\n \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.\",\n \"type\": \"module\",\n \"module\": \"./dist/mermaid.core.mjs\",\n \"types\": \"./dist/mermaid.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/mermaid.d.ts\",\n \"import\": \"./dist/mermaid.core.mjs\",\n \"default\": \"./dist/mermaid.core.mjs\"\n },\n \"./*\": \"./*\"\n },\n \"keywords\": [\n \"diagram\",\n \"markdown\",\n \"flowchart\",\n \"sequence diagram\",\n \"gantt\",\n \"class diagram\",\n \"git graph\",\n \"mindmap\",\n \"packet diagram\",\n \"c4 diagram\",\n \"er diagram\",\n \"pie chart\",\n \"pie diagram\",\n \"quadrant chart\",\n \"requirement diagram\",\n \"graph\"\n ],\n \"scripts\": {\n \"clean\": \"rimraf dist\",\n \"dev\": \"pnpm -w dev\",\n \"docs:code\": \"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup\",\n \"docs:build\": \"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts\",\n \"docs:verify\": \"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify\",\n \"docs:pre:vitepress\": \"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts\",\n \"docs:build:vitepress\": \"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing\",\n \"docs:dev\": \"pnpm docs:pre:vitepress && concurrently \\\"pnpm --filter ./src/vitepress dev\\\" \\\"tsx scripts/docs.cli.mts --watch --vitepress\\\"\",\n \"docs:dev:docker\": \"pnpm docs:pre:vitepress && concurrently \\\"pnpm --filter ./src/vitepress dev:docker\\\" \\\"tsx scripts/docs.cli.mts --watch --vitepress\\\"\",\n \"docs:serve\": \"pnpm docs:build:vitepress && vitepress serve src/vitepress\",\n \"docs:spellcheck\": \"cspell \\\"src/docs/**/*.md\\\"\",\n \"docs:release-version\": \"tsx scripts/update-release-version.mts\",\n \"docs:verify-version\": \"tsx scripts/update-release-version.mts --verify\",\n \"types:build-config\": \"tsx scripts/create-types-from-json-schema.mts\",\n \"types:verify-config\": \"tsx scripts/create-types-from-json-schema.mts --verify\",\n \"checkCircle\": \"npx madge --circular ./src\",\n \"prepublishOnly\": \"pnpm docs:verify-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/mermaid-js/mermaid\"\n },\n \"author\": \"Knut Sveidqvist\",\n \"license\": \"MIT\",\n \"standard\": {\n \"ignore\": [\n \"**/parser/*.js\",\n \"dist/**/*.js\",\n \"cypress/**/*.js\"\n ],\n \"globals\": [\n \"page\"\n ]\n },\n \"dependencies\": {\n \"@braintree/sanitize-url\": \"^7.0.1\",\n \"@iconify/utils\": \"^2.1.32\",\n \"@mermaid-js/parser\": \"workspace:^\",\n \"@types/d3\": \"^7.4.3\",\n \"@types/dompurify\": \"^3.0.5\",\n \"cytoscape\": \"^3.29.2\",\n \"cytoscape-cose-bilkent\": \"^4.1.0\",\n \"cytoscape-fcose\": \"^2.2.0\",\n \"d3\": \"^7.9.0\",\n \"d3-sankey\": \"^0.12.3\",\n \"dagre-d3-es\": \"7.0.11\",\n \"dayjs\": \"^1.11.10\",\n \"dompurify\": \"^3.0.11 <3.1.7\",\n \"katex\": \"^0.16.9\",\n \"khroma\": \"^2.1.0\",\n \"lodash-es\": \"^4.17.21\",\n \"marked\": \"^13.0.2\",\n \"roughjs\": \"^4.6.6\",\n \"stylis\": \"^4.3.1\",\n \"ts-dedent\": \"^2.2.0\",\n \"uuid\": \"^9.0.1\"\n },\n \"devDependencies\": {\n \"@adobe/jsonschema2md\": \"^8.0.0\",\n \"@iconify/types\": \"^2.0.0\",\n \"@types/cytoscape\": \"^3.21.4\",\n \"@types/cytoscape-fcose\": \"^2.2.4\",\n \"@types/d3-sankey\": \"^0.12.4\",\n \"@types/d3-scale\": \"^4.0.8\",\n \"@types/d3-scale-chromatic\": \"^3.0.3\",\n \"@types/d3-selection\": \"^3.0.10\",\n \"@types/d3-shape\": \"^3.1.6\",\n \"@types/jsdom\": \"^21.1.6\",\n \"@types/katex\": \"^0.16.7\",\n \"@types/lodash-es\": \"^4.17.12\",\n \"@types/micromatch\": \"^4.0.6\",\n \"@types/prettier\": \"^3.0.0\",\n \"@types/stylis\": \"^4.2.5\",\n \"@types/uuid\": \"^9.0.8\",\n \"ajv\": \"^8.12.0\",\n \"chokidar\": \"^3.6.0\",\n \"concurrently\": \"^8.2.2\",\n \"csstree-validator\": \"^3.0.0\",\n \"globby\": \"^14.0.1\",\n \"jison\": \"^0.4.18\",\n \"js-base64\": \"^3.7.7\",\n \"jsdom\": \"^24.0.0\",\n \"json-schema-to-typescript\": \"^13.1.2\",\n \"micromatch\": \"^4.0.5\",\n \"path-browserify\": \"^1.0.1\",\n \"prettier\": \"^3.2.5\",\n \"remark\": \"^15.0.1\",\n \"remark-frontmatter\": \"^5.0.0\",\n \"remark-gfm\": \"^4.0.0\",\n \"rimraf\": \"^5.0.5\",\n \"start-server-and-test\": \"^2.0.3\",\n \"type-fest\": \"^4.13.1\",\n \"typedoc\": \"^0.25.12\",\n \"typedoc-plugin-markdown\": \"^3.17.1\",\n \"typescript\": \"~5.4.3\",\n \"unist-util-flatmap\": \"^1.0.0\",\n \"unist-util-visit\": \"^5.0.0\",\n \"vitepress\": \"^1.0.1\",\n \"vitepress-plugin-search\": \"1.0.4-alpha.22\"\n },\n \"files\": [\n \"dist/\",\n \"README.md\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n", "import type { InfoFields, InfoDB } from './infoTypes.js';\nimport { version } from '../../../package.json';\n\nexport const DEFAULT_INFO_DB: InfoFields = { version } as const;\n\nexport const getVersion = (): string => DEFAULT_INFO_DB.version;\n\nexport const db: InfoDB = {\n getVersion,\n};\n", "import { select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport type { HTML, SVG } from '../diagram-api/types.js';\n\n/**\n * Selects the SVG element using {@link id}.\n *\n * @param id - The diagram ID.\n * @returns The selected {@link SVG} element using {@link id}.\n */\nexport const selectSvgElement = (id: string): SVG => {\n const { securityLevel } = getConfig();\n // handle root and document for when rendering in sandbox mode\n let root: HTML = select('body');\n if (securityLevel === 'sandbox') {\n const sandboxElement: HTML = select(`#i${id}`);\n const doc: Document = sandboxElement.node()?.contentDocument ?? document;\n root = select(doc.body as HTMLIFrameElement);\n }\n const svg: SVG = root.select(`#${id}`);\n return svg;\n};\n", "import type { DrawDefinition, SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\n/**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n *\n * @param text - The text of the diagram.\n * @param id - The id of the diagram which will be used as a DOM element id.\n * @param version - MermaidJS version.\n */\nconst draw: DrawDefinition = (text, id, version) => {\n log.debug('rendering info diagram\\n' + text);\n\n const svg: SVG = selectSvgElement(id);\n configureSvgSize(svg, 100, 400, true);\n\n const group: SVGGroup = svg.append('g');\n group\n .append('text')\n .attr('x', 100)\n .attr('y', 40)\n .attr('class', 'version')\n .attr('font-size', 32)\n .style('text-anchor', 'middle')\n .text(`v${version}`);\n};\n\nexport const renderer = { draw };\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { parser } from './infoParser.js';\nimport { db } from './infoDb.js';\nimport { renderer } from './infoRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n};\n", "import { log } from '../../logger.js';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../common/commonDb.js';\nimport type { PieFields, PieDB, Sections, D3Section } from './pieTypes.js';\nimport type { RequiredDeep } from 'type-fest';\nimport type { PieDiagramConfig } from '../../config.type.js';\nimport DEFAULT_CONFIG from '../../defaultConfig.js';\n\nexport const DEFAULT_PIE_CONFIG: Required = DEFAULT_CONFIG.pie;\n\nexport const DEFAULT_PIE_DB: RequiredDeep = {\n sections: new Map(),\n showData: false,\n config: DEFAULT_PIE_CONFIG,\n} as const;\n\nlet sections: Sections = DEFAULT_PIE_DB.sections;\nlet showData: boolean = DEFAULT_PIE_DB.showData;\nconst config: Required = structuredClone(DEFAULT_PIE_CONFIG);\n\nconst getConfig = (): Required => structuredClone(config);\n\nconst clear = (): void => {\n sections = new Map();\n showData = DEFAULT_PIE_DB.showData;\n commonClear();\n};\n\nconst addSection = ({ label, value }: D3Section): void => {\n if (!sections.has(label)) {\n sections.set(label, value);\n log.debug(`added new section: ${label}, with value: ${value}`);\n }\n};\n\nconst getSections = (): Sections => sections;\n\nconst setShowData = (toggle: boolean): void => {\n showData = toggle;\n};\n\nconst getShowData = (): boolean => showData;\n\nexport const db: PieDB = {\n getConfig,\n\n clear,\n setDiagramTitle,\n getDiagramTitle,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n\n addSection,\n getSections,\n setShowData,\n getShowData,\n};\n", "import type { Pie } from '@mermaid-js/parser';\nimport { parse } from '@mermaid-js/parser';\nimport { log } from '../../logger.js';\nimport type { ParserDefinition } from '../../diagram-api/types.js';\nimport { populateCommonDb } from '../common/populateCommonDb.js';\nimport type { PieDB } from './pieTypes.js';\nimport { db } from './pieDb.js';\n\nconst populateDb = (ast: Pie, db: PieDB) => {\n populateCommonDb(ast, db);\n db.setShowData(ast.showData);\n ast.sections.map(db.addSection);\n};\n\nexport const parser: ParserDefinition = {\n parse: async (input: string): Promise => {\n const ast: Pie = await parse('pie', input);\n log.debug(ast);\n populateDb(ast, db);\n },\n};\n", "import type { DiagramStylesProvider } from '../../diagram-api/types.js';\nimport type { PieStyleOptions } from './pieTypes.js';\n\nconst getStyles: DiagramStylesProvider = (options: PieStyleOptions) =>\n `\n .pieCircle{\n stroke: ${options.pieStrokeColor};\n stroke-width : ${options.pieStrokeWidth};\n opacity : ${options.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${options.pieOuterStrokeColor};\n stroke-width: ${options.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${options.pieTitleTextSize};\n fill: ${options.pieTitleTextColor};\n font-family: ${options.fontFamily};\n }\n .slice {\n font-family: ${options.fontFamily};\n fill: ${options.pieSectionTextColor};\n font-size:${options.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${options.pieLegendTextColor};\n font-family: ${options.fontFamily};\n font-size: ${options.pieLegendTextSize};\n }\n`;\n\nexport default getStyles;\n", "import type d3 from 'd3';\nimport { arc, pie as d3pie, scaleOrdinal } from 'd3';\nimport type { MermaidConfig, PieDiagramConfig } from '../../config.type.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DrawDefinition, SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport { cleanAndMerge, parseFontSize } from '../../utils.js';\nimport type { D3Section, PieDB, Sections } from './pieTypes.js';\n\nconst createPieArcs = (sections: Sections): d3.PieArcDatum[] => {\n // Compute the position of each group on the pie:\n const pieData: D3Section[] = [...sections.entries()]\n .map((element: [string, number]): D3Section => {\n return {\n label: element[0],\n value: element[1],\n };\n })\n .sort((a: D3Section, b: D3Section): number => {\n return b.value - a.value;\n });\n const pie: d3.Pie = d3pie().value(\n (d3Section: D3Section): number => d3Section.value\n );\n return pie(pieData);\n};\n\n/**\n * Draws a Pie Chart with the data given in text.\n *\n * @param text - pie chart code\n * @param id - diagram id\n * @param _version - MermaidJS version from package.json.\n * @param diagObj - A standard diagram containing the DB and the text and type etc of the diagram.\n */\nexport const draw: DrawDefinition = (text, id, _version, diagObj) => {\n log.debug('rendering pie chart\\n' + text);\n const db = diagObj.db as PieDB;\n const globalConfig: MermaidConfig = getConfig();\n const pieConfig: Required = cleanAndMerge(db.getConfig(), globalConfig.pie);\n const MARGIN = 40;\n const LEGEND_RECT_SIZE = 18;\n const LEGEND_SPACING = 4;\n const height = 450;\n const pieWidth: number = height;\n const svg: SVG = selectSvgElement(id);\n const group: SVGGroup = svg.append('g');\n group.attr('transform', 'translate(' + pieWidth / 2 + ',' + height / 2 + ')');\n\n const { themeVariables } = globalConfig;\n let [outerStrokeWidth] = parseFontSize(themeVariables.pieOuterStrokeWidth);\n outerStrokeWidth ??= 2;\n\n const textPosition: number = pieConfig.textPosition;\n const radius: number = Math.min(pieWidth, height) / 2 - MARGIN;\n // Shape helper to build arcs:\n const arcGenerator: d3.Arc> = arc>()\n .innerRadius(0)\n .outerRadius(radius);\n const labelArcGenerator: d3.Arc> = arc<\n d3.PieArcDatum\n >()\n .innerRadius(radius * textPosition)\n .outerRadius(radius * textPosition);\n\n group\n .append('circle')\n .attr('cx', 0)\n .attr('cy', 0)\n .attr('r', radius + outerStrokeWidth / 2)\n .attr('class', 'pieOuterCircle');\n\n const sections: Sections = db.getSections();\n const arcs: d3.PieArcDatum[] = createPieArcs(sections);\n\n const myGeneratedColors = [\n themeVariables.pie1,\n themeVariables.pie2,\n themeVariables.pie3,\n themeVariables.pie4,\n themeVariables.pie5,\n themeVariables.pie6,\n themeVariables.pie7,\n themeVariables.pie8,\n themeVariables.pie9,\n themeVariables.pie10,\n themeVariables.pie11,\n themeVariables.pie12,\n ];\n // Set the color scale\n const color: d3.ScaleOrdinal = scaleOrdinal(myGeneratedColors);\n\n // Build the pie chart: each part of the pie is a path that we build using the arc function.\n group\n .selectAll('mySlices')\n .data(arcs)\n .enter()\n .append('path')\n .attr('d', arcGenerator)\n .attr('fill', (datum: d3.PieArcDatum) => {\n return color(datum.data.label);\n })\n .attr('class', 'pieCircle');\n\n let sum = 0;\n sections.forEach((section) => {\n sum += section;\n });\n // Now add the percentage.\n // Use the centroid method to get the best coordinates.\n group\n .selectAll('mySlices')\n .data(arcs)\n .enter()\n .append('text')\n .text((datum: d3.PieArcDatum): string => {\n return ((datum.data.value / sum) * 100).toFixed(0) + '%';\n })\n .attr('transform', (datum: d3.PieArcDatum): string => {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n return 'translate(' + labelArcGenerator.centroid(datum) + ')';\n })\n .style('text-anchor', 'middle')\n .attr('class', 'slice');\n\n group\n .append('text')\n .text(db.getDiagramTitle())\n .attr('x', 0)\n .attr('y', -(height - 50) / 2)\n .attr('class', 'pieTitleText');\n\n // Add the legends/annotations for each section\n const legend = group\n .selectAll('.legend')\n .data(color.domain())\n .enter()\n .append('g')\n .attr('class', 'legend')\n .attr('transform', (_datum, index: number): string => {\n const height = LEGEND_RECT_SIZE + LEGEND_SPACING;\n const offset = (height * color.domain().length) / 2;\n const horizontal = 12 * LEGEND_RECT_SIZE;\n const vertical = index * height - offset;\n return 'translate(' + horizontal + ',' + vertical + ')';\n });\n\n legend\n .append('rect')\n .attr('width', LEGEND_RECT_SIZE)\n .attr('height', LEGEND_RECT_SIZE)\n .style('fill', color)\n .style('stroke', color);\n\n legend\n .data(arcs)\n .append('text')\n .attr('x', LEGEND_RECT_SIZE + LEGEND_SPACING)\n .attr('y', LEGEND_RECT_SIZE - LEGEND_SPACING)\n .text((datum: d3.PieArcDatum): string => {\n const { label, value } = datum.data;\n if (db.getShowData()) {\n return `${label} [${value}]`;\n }\n return label;\n });\n\n const longestTextWidth = Math.max(\n ...legend\n .selectAll('text')\n .nodes()\n .map((node) => (node as Element)?.getBoundingClientRect().width ?? 0)\n );\n\n const totalWidth = pieWidth + MARGIN + LEGEND_RECT_SIZE + LEGEND_SPACING + longestTextWidth;\n\n // Set viewBox\n svg.attr('viewBox', `0 0 ${totalWidth} ${height}`);\n configureSvgSize(svg, height, totalWidth, pieConfig.useMaxWidth);\n};\n\nexport const renderer = { draw };\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { parser } from './pieParser.js';\nimport { db } from './pieDb.js';\nimport styles from './pieStyles.js';\nimport { renderer } from './pieRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[1,7],$V5=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V6=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V7=[55,56,57],$V8=[2,36],$V9=[1,37],$Va=[1,36],$Vb=[1,38],$Vc=[1,35],$Vd=[1,43],$Ve=[1,41],$Vf=[1,14],$Vg=[1,23],$Vh=[1,18],$Vi=[1,19],$Vj=[1,20],$Vk=[1,21],$Vl=[1,22],$Vm=[1,24],$Vn=[1,25],$Vo=[1,26],$Vp=[1,27],$Vq=[1,28],$Vr=[1,29],$Vs=[1,32],$Vt=[1,33],$Vu=[1,34],$Vv=[1,39],$Vw=[1,40],$Vx=[1,42],$Vy=[1,44],$Vz=[1,62],$VA=[1,61],$VB=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],$VC=[1,65],$VD=[1,66],$VE=[1,67],$VF=[1,68],$VG=[1,69],$VH=[1,70],$VI=[1,71],$VJ=[1,72],$VK=[1,73],$VL=[1,74],$VM=[1,75],$VN=[1,76],$VO=[4,5,6,7,8,9,10,11,12,13,14,15,18],$VP=[1,90],$VQ=[1,91],$VR=[1,92],$VS=[1,99],$VT=[1,93],$VU=[1,96],$VV=[1,94],$VW=[1,95],$VX=[1,97],$VY=[1,98],$VZ=[1,102],$V_=[10,55,56,57],$V$=[4,5,6,8,10,11,13,17,18,19,20,55,56,57];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"idStringToken\":3,\"ALPHA\":4,\"NUM\":5,\"NODE_STRING\":6,\"DOWN\":7,\"MINUS\":8,\"DEFAULT\":9,\"COMMA\":10,\"COLON\":11,\"AMP\":12,\"BRKT\":13,\"MULT\":14,\"UNICODE_TEXT\":15,\"styleComponent\":16,\"UNIT\":17,\"SPACE\":18,\"STYLE\":19,\"PCT\":20,\"idString\":21,\"style\":22,\"stylesOpt\":23,\"classDefStatement\":24,\"CLASSDEF\":25,\"start\":26,\"eol\":27,\"QUADRANT\":28,\"document\":29,\"line\":30,\"statement\":31,\"axisDetails\":32,\"quadrantDetails\":33,\"points\":34,\"title\":35,\"title_value\":36,\"acc_title\":37,\"acc_title_value\":38,\"acc_descr\":39,\"acc_descr_value\":40,\"acc_descr_multiline_value\":41,\"section\":42,\"text\":43,\"point_start\":44,\"point_x\":45,\"point_y\":46,\"class_name\":47,\"X-AXIS\":48,\"AXIS-TEXT-DELIMITER\":49,\"Y-AXIS\":50,\"QUADRANT_1\":51,\"QUADRANT_2\":52,\"QUADRANT_3\":53,\"QUADRANT_4\":54,\"NEWLINE\":55,\"SEMI\":56,\"EOF\":57,\"alphaNumToken\":58,\"textNoTagsToken\":59,\"STR\":60,\"MD_STR\":61,\"alphaNum\":62,\"PUNCTUATION\":63,\"PLUS\":64,\"EQUALS\":65,\"DOT\":66,\"UNDERSCORE\":67,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"ALPHA\",5:\"NUM\",6:\"NODE_STRING\",7:\"DOWN\",8:\"MINUS\",9:\"DEFAULT\",10:\"COMMA\",11:\"COLON\",12:\"AMP\",13:\"BRKT\",14:\"MULT\",15:\"UNICODE_TEXT\",17:\"UNIT\",18:\"SPACE\",19:\"STYLE\",20:\"PCT\",25:\"CLASSDEF\",28:\"QUADRANT\",35:\"title\",36:\"title_value\",37:\"acc_title\",38:\"acc_title_value\",39:\"acc_descr\",40:\"acc_descr_value\",41:\"acc_descr_multiline_value\",42:\"section\",44:\"point_start\",45:\"point_x\",46:\"point_y\",47:\"class_name\",48:\"X-AXIS\",49:\"AXIS-TEXT-DELIMITER\",50:\"Y-AXIS\",51:\"QUADRANT_1\",52:\"QUADRANT_2\",53:\"QUADRANT_3\",54:\"QUADRANT_4\",55:\"NEWLINE\",56:\"SEMI\",57:\"EOF\",60:\"STR\",61:\"MD_STR\",63:\"PUNCTUATION\",64:\"PLUS\",65:\"EQUALS\",66:\"DOT\",67:\"UNDERSCORE\"},\nproductions_: [0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 23:\nthis.$=$$[$0]\nbreak;\ncase 24:\nthis.$=$$[$0-1]+''+$$[$0]\nbreak;\ncase 26:\nthis.$ = $$[$0-1] + $$[$0];\nbreak;\ncase 27:\nthis.$ = [$$[$0].trim()]\nbreak;\ncase 28:\n$$[$0-2].push($$[$0].trim());this.$ = $$[$0-2];\nbreak;\ncase 29:\nthis.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);\nbreak;\ncase 37:\nthis.$=[];\nbreak;\ncase 42:\n this.$=$$[$0].trim();yy.setDiagramTitle(this.$); \nbreak;\ncase 43:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 44: case 45:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 46:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 47:\nyy.addPoint($$[$0-3], \"\", $$[$0-1], $$[$0], []);\nbreak;\ncase 48:\nyy.addPoint($$[$0-4], $$[$0-3], $$[$0-1], $$[$0], []);\nbreak;\ncase 49:\nyy.addPoint($$[$0-4], \"\", $$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 50:\nyy.addPoint($$[$0-5], $$[$0-4], $$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 51:\nyy.setXAxisLeftText($$[$0-2]); yy.setXAxisRightText($$[$0]);\nbreak;\ncase 52:\n$$[$0-1].text += \" \u27F6 \"; yy.setXAxisLeftText($$[$0-1]);\nbreak;\ncase 53:\nyy.setXAxisLeftText($$[$0]);\nbreak;\ncase 54:\nyy.setYAxisBottomText($$[$0-2]); yy.setYAxisTopText($$[$0]);\nbreak;\ncase 55:\n$$[$0-1].text += \" \u27F6 \"; yy.setYAxisBottomText($$[$0-1]);\nbreak;\ncase 56:\nyy.setYAxisBottomText($$[$0]);\nbreak;\ncase 57:\nyy.setQuadrant1Text($$[$0])\nbreak;\ncase 58:\nyy.setQuadrant2Text($$[$0])\nbreak;\ncase 59:\nyy.setQuadrant3Text($$[$0])\nbreak;\ncase 60:\nyy.setQuadrant4Text($$[$0])\nbreak;\ncase 64:\n this.$={text:$$[$0], type: 'text'};\nbreak;\ncase 65:\n this.$={text:$$[$0-1].text+''+$$[$0], type: $$[$0-1].type};\nbreak;\ncase 66:\n this.$={text: $$[$0], type: 'text'};\nbreak;\ncase 67:\n this.$={text: $$[$0], type: 'markdown'};\nbreak;\ncase 68:\nthis.$=$$[$0];\nbreak;\ncase 69:\nthis.$=$$[$0-1]+''+$$[$0];\nbreak;\n}\n},\ntable: [{18:$V0,26:1,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{1:[3]},{18:$V0,26:8,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{18:$V0,26:9,27:2,28:$V1,55:$V2,56:$V3,57:$V4},o($V5,[2,33],{29:10}),o($V6,[2,61]),o($V6,[2,62]),o($V6,[2,63]),{1:[2,30]},{1:[2,31]},o($V7,$V8,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V5,[2,34]),{27:45,55:$V2,56:$V3,57:$V4},o($V7,[2,37]),o($V7,$V8,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,39]),o($V7,[2,40]),o($V7,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},o($V7,[2,45]),o($V7,[2,46]),{18:[1,50]},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:51,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:52,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:53,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:54,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:55,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:56,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,44:[1,57],47:[1,58],58:60,59:59,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},o($VB,[2,64]),o($VB,[2,66]),o($VB,[2,67]),o($VB,[2,70]),o($VB,[2,71]),o($VB,[2,72]),o($VB,[2,73]),o($VB,[2,74]),o($VB,[2,75]),o($VB,[2,76]),o($VB,[2,77]),o($VB,[2,78]),o($VB,[2,79]),o($VB,[2,80]),o($V5,[2,35]),o($V7,[2,38]),o($V7,[2,42]),o($V7,[2,43]),o($V7,[2,44]),{3:64,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,21:63},o($V7,[2,53],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,77],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,56],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,78],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,57],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,58],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,59],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,60],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{45:[1,79]},{44:[1,80]},o($VB,[2,65]),o($VB,[2,81]),o($VB,[2,82]),o($VB,[2,83]),{3:82,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,18:[1,81]},o($VO,[2,23]),o($VO,[2,1]),o($VO,[2,2]),o($VO,[2,3]),o($VO,[2,4]),o($VO,[2,5]),o($VO,[2,6]),o($VO,[2,7]),o($VO,[2,8]),o($VO,[2,9]),o($VO,[2,10]),o($VO,[2,11]),o($VO,[2,12]),o($V7,[2,52],{58:31,43:83,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,55],{58:31,43:84,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{46:[1,85]},{45:[1,86]},{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:88,23:87},o($VO,[2,24]),o($V7,[2,51],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,54],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,47],{22:88,16:89,23:100,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{46:[1,101]},o($V7,[2,29],{10:$VZ}),o($V_,[2,27],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),o($V$,[2,25]),o($V$,[2,13]),o($V$,[2,14]),o($V$,[2,15]),o($V$,[2,16]),o($V$,[2,17]),o($V$,[2,18]),o($V$,[2,19]),o($V$,[2,20]),o($V$,[2,21]),o($V$,[2,22]),o($V7,[2,49],{10:$VZ}),o($V7,[2,48],{22:88,16:89,23:104,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:105},o($V$,[2,26]),o($V7,[2,50],{10:$VZ}),o($V_,[2,28],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY})],\ndefaultActions: {8:[2,30],9:[2,31]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip comments */\nbreak;\ncase 1:/* skip comments */\nbreak;\ncase 2:return 55;\nbreak;\ncase 3:/* do nothing */\nbreak;\ncase 4: this.begin(\"title\");return 35; \nbreak;\ncase 5: this.popState(); return \"title_value\"; \nbreak;\ncase 6: this.begin(\"acc_title\");return 37; \nbreak;\ncase 7: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 8: this.begin(\"acc_descr\");return 39; \nbreak;\ncase 9: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 10: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 11: this.popState(); \nbreak;\ncase 12:return \"acc_descr_multiline_value\";\nbreak;\ncase 13:return 48;\nbreak;\ncase 14:return 50;\nbreak;\ncase 15:return 49\nbreak;\ncase 16:return 51;\nbreak;\ncase 17:return 52;\nbreak;\ncase 18:return 53;\nbreak;\ncase 19:return 54;\nbreak;\ncase 20:return 25;\nbreak;\ncase 21: this.begin(\"md_string\");\nbreak;\ncase 22: return \"MD_STR\";\nbreak;\ncase 23: this.popState();\nbreak;\ncase 24:this.begin(\"string\");\nbreak;\ncase 25:this.popState();\nbreak;\ncase 26:return \"STR\";\nbreak;\ncase 27:this.begin('class_name')\nbreak;\ncase 28:this.popState(); return 47;\nbreak;\ncase 29:this.begin(\"point_start\"); return 44;\nbreak;\ncase 30:this.begin('point_x'); return 45;\nbreak;\ncase 31:this.popState();\nbreak;\ncase 32:this.popState(); this.begin('point_y');\nbreak;\ncase 33:this.popState(); return 46;\nbreak;\ncase 34:return 28;\nbreak;\ncase 35:return 4;\nbreak;\ncase 36:return 11;\nbreak;\ncase 37:return 64;\nbreak;\ncase 38:return 10;\nbreak;\ncase 39:return 65;\nbreak;\ncase 40:return 65;\nbreak;\ncase 41:return 14;\nbreak;\ncase 42:return 13;\nbreak;\ncase 43:return 67;\nbreak;\ncase 44:return 66;\nbreak;\ncase 45:return 12;\nbreak;\ncase 46:return 8;\nbreak;\ncase 47:return 5;\nbreak;\ncase 48:return 18;\nbreak;\ncase 49:return 56;\nbreak;\ncase 50:return 63;\nbreak;\ncase 51:return 57;\nbreak;\n}\n},\nrules: [/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n\\r]+)/i,/^(?:%%[^\\n]*)/i,/^(?:title\\b)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\\b)/i,/^(?:[\"][`])/i,/^(?:[^`\"]+)/i,/^(?:[`][\"])/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?::::)/i,/^(?:^\\w+)/i,/^(?:\\s*:\\s*\\[\\s*)/i,/^(?:(1)|(0(.\\d+)?))/i,/^(?:\\s*\\] *)/i,/^(?:\\s*,\\s*)/i,/^(?:(1)|(0(.\\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\\*)/i,/^(?:#)/i,/^(?:[\\_])/i,/^(?:\\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\\s)/i,/^(?:;)/i,/^(?:[!\"#$%&'*+,-.`?\\\\_/])/i,/^(?:$)/i],\nconditions: {\"class_name\":{\"rules\":[28],\"inclusive\":false},\"point_y\":{\"rules\":[33],\"inclusive\":false},\"point_x\":{\"rules\":[32],\"inclusive\":false},\"point_start\":{\"rules\":[30,31],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[11,12],\"inclusive\":false},\"acc_descr\":{\"rules\":[9],\"inclusive\":false},\"acc_title\":{\"rules\":[7],\"inclusive\":false},\"title\":{\"rules\":[5],\"inclusive\":false},\"md_string\":{\"rules\":[22,23],\"inclusive\":false},\"string\":{\"rules\":[25,26],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { scaleLinear } from 'd3';\nimport type { BaseDiagramConfig, QuadrantChartConfig } from '../../config.type.js';\nimport defaultConfig from '../../defaultConfig.js';\nimport { log } from '../../logger.js';\nimport { getThemeVariables } from '../../themes/theme-default.js';\nimport type { Point } from '../../types.js';\n\nconst defaultThemeVariables = getThemeVariables();\n\nexport type TextVerticalPos = 'left' | 'center' | 'right';\nexport type TextHorizontalPos = 'top' | 'middle' | 'bottom';\n\nexport interface StylesObject {\n className?: string;\n radius?: number;\n color?: string;\n strokeColor?: string;\n strokeWidth?: string;\n}\n\nexport interface QuadrantPointInputType extends Point, StylesObject {\n text: string;\n}\n\nexport interface QuadrantTextType extends Point {\n text: string;\n fill: string;\n verticalPos: TextVerticalPos;\n horizontalPos: TextHorizontalPos;\n fontSize: number;\n rotation: number;\n}\n\nexport interface QuadrantPointType\n extends Point,\n Pick {\n fill: string;\n radius: number;\n text: QuadrantTextType;\n}\n\nexport interface QuadrantQuadrantsType extends Point {\n text: QuadrantTextType;\n width: number;\n height: number;\n fill: string;\n}\n\nexport interface QuadrantLineType {\n strokeWidth: number;\n strokeFill: string;\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n}\n\nexport interface QuadrantBuildType {\n points: QuadrantPointType[];\n quadrants: QuadrantQuadrantsType[];\n axisLabels: QuadrantTextType[];\n title?: QuadrantTextType;\n borderLines?: QuadrantLineType[];\n}\n\nexport interface QuadrantBuilderData {\n titleText: string;\n quadrant1Text: string;\n quadrant2Text: string;\n quadrant3Text: string;\n quadrant4Text: string;\n xAxisLeftText: string;\n xAxisRightText: string;\n yAxisBottomText: string;\n yAxisTopText: string;\n points: QuadrantPointInputType[];\n}\n\nexport interface QuadrantBuilderConfig\n extends Required> {\n showXAxis: boolean;\n showYAxis: boolean;\n showTitle: boolean;\n}\n\nexport interface QuadrantBuilderThemeConfig {\n quadrantTitleFill: string;\n quadrant1Fill: string;\n quadrant2Fill: string;\n quadrant3Fill: string;\n quadrant4Fill: string;\n quadrant1TextFill: string;\n quadrant2TextFill: string;\n quadrant3TextFill: string;\n quadrant4TextFill: string;\n quadrantPointFill: string;\n quadrantPointTextFill: string;\n quadrantXAxisTextFill: string;\n quadrantYAxisTextFill: string;\n quadrantInternalBorderStrokeFill: string;\n quadrantExternalBorderStrokeFill: string;\n}\n\ninterface CalculateSpaceData {\n xAxisSpace: {\n top: number;\n bottom: number;\n };\n yAxisSpace: {\n left: number;\n right: number;\n };\n titleSpace: {\n top: number;\n };\n quadrantSpace: {\n quadrantLeft: number;\n quadrantTop: number;\n quadrantWidth: number;\n quadrantHalfWidth: number;\n quadrantHeight: number;\n quadrantHalfHeight: number;\n };\n}\n\nexport class QuadrantBuilder {\n private config: QuadrantBuilderConfig;\n private themeConfig: QuadrantBuilderThemeConfig;\n private data: QuadrantBuilderData;\n private classes = new Map();\n\n constructor() {\n this.config = this.getDefaultConfig();\n this.themeConfig = this.getDefaultThemeConfig();\n this.data = this.getDefaultData();\n }\n\n getDefaultData(): QuadrantBuilderData {\n return {\n titleText: '',\n quadrant1Text: '',\n quadrant2Text: '',\n quadrant3Text: '',\n quadrant4Text: '',\n xAxisLeftText: '',\n xAxisRightText: '',\n yAxisBottomText: '',\n yAxisTopText: '',\n points: [],\n };\n }\n\n getDefaultConfig(): QuadrantBuilderConfig {\n return {\n showXAxis: true,\n showYAxis: true,\n showTitle: true,\n chartHeight: defaultConfig.quadrantChart?.chartWidth || 500,\n chartWidth: defaultConfig.quadrantChart?.chartHeight || 500,\n titlePadding: defaultConfig.quadrantChart?.titlePadding || 10,\n titleFontSize: defaultConfig.quadrantChart?.titleFontSize || 20,\n quadrantPadding: defaultConfig.quadrantChart?.quadrantPadding || 5,\n xAxisLabelPadding: defaultConfig.quadrantChart?.xAxisLabelPadding || 5,\n yAxisLabelPadding: defaultConfig.quadrantChart?.yAxisLabelPadding || 5,\n xAxisLabelFontSize: defaultConfig.quadrantChart?.xAxisLabelFontSize || 16,\n yAxisLabelFontSize: defaultConfig.quadrantChart?.yAxisLabelFontSize || 16,\n quadrantLabelFontSize: defaultConfig.quadrantChart?.quadrantLabelFontSize || 16,\n quadrantTextTopPadding: defaultConfig.quadrantChart?.quadrantTextTopPadding || 5,\n pointTextPadding: defaultConfig.quadrantChart?.pointTextPadding || 5,\n pointLabelFontSize: defaultConfig.quadrantChart?.pointLabelFontSize || 12,\n pointRadius: defaultConfig.quadrantChart?.pointRadius || 5,\n xAxisPosition: defaultConfig.quadrantChart?.xAxisPosition || 'top',\n yAxisPosition: defaultConfig.quadrantChart?.yAxisPosition || 'left',\n quadrantInternalBorderStrokeWidth:\n defaultConfig.quadrantChart?.quadrantInternalBorderStrokeWidth || 1,\n quadrantExternalBorderStrokeWidth:\n defaultConfig.quadrantChart?.quadrantExternalBorderStrokeWidth || 2,\n };\n }\n\n getDefaultThemeConfig(): QuadrantBuilderThemeConfig {\n return {\n quadrant1Fill: defaultThemeVariables.quadrant1Fill,\n quadrant2Fill: defaultThemeVariables.quadrant2Fill,\n quadrant3Fill: defaultThemeVariables.quadrant3Fill,\n quadrant4Fill: defaultThemeVariables.quadrant4Fill,\n quadrant1TextFill: defaultThemeVariables.quadrant1TextFill,\n quadrant2TextFill: defaultThemeVariables.quadrant2TextFill,\n quadrant3TextFill: defaultThemeVariables.quadrant3TextFill,\n quadrant4TextFill: defaultThemeVariables.quadrant4TextFill,\n quadrantPointFill: defaultThemeVariables.quadrantPointFill,\n quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill,\n quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill,\n quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill,\n quadrantTitleFill: defaultThemeVariables.quadrantTitleFill,\n quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill,\n quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill,\n };\n }\n\n clear() {\n this.config = this.getDefaultConfig();\n this.themeConfig = this.getDefaultThemeConfig();\n this.data = this.getDefaultData();\n this.classes = new Map();\n log.info('clear called');\n }\n\n setData(data: Partial) {\n this.data = { ...this.data, ...data };\n }\n\n addPoints(points: QuadrantPointInputType[]) {\n this.data.points = [...points, ...this.data.points];\n }\n\n addClass(className: string, styles: StylesObject) {\n this.classes.set(className, styles);\n }\n\n setConfig(config: Partial) {\n log.trace('setConfig called with: ', config);\n this.config = { ...this.config, ...config };\n }\n\n setThemeConfig(themeConfig: Partial) {\n log.trace('setThemeConfig called with: ', themeConfig);\n this.themeConfig = { ...this.themeConfig, ...themeConfig };\n }\n\n calculateSpace(\n xAxisPosition: typeof this.config.xAxisPosition,\n showXAxis: boolean,\n showYAxis: boolean,\n showTitle: boolean\n ): CalculateSpaceData {\n const xAxisSpaceCalculation =\n this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize;\n const xAxisSpace = {\n top: xAxisPosition === 'top' && showXAxis ? xAxisSpaceCalculation : 0,\n bottom: xAxisPosition === 'bottom' && showXAxis ? xAxisSpaceCalculation : 0,\n };\n\n const yAxisSpaceCalculation =\n this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize;\n const yAxisSpace = {\n left: this.config.yAxisPosition === 'left' && showYAxis ? yAxisSpaceCalculation : 0,\n right: this.config.yAxisPosition === 'right' && showYAxis ? yAxisSpaceCalculation : 0,\n };\n\n const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2;\n const titleSpace = {\n top: showTitle ? titleSpaceCalculation : 0,\n };\n\n const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left;\n const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top;\n const quadrantWidth =\n this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right;\n const quadrantHeight =\n this.config.chartHeight -\n this.config.quadrantPadding * 2 -\n xAxisSpace.top -\n xAxisSpace.bottom -\n titleSpace.top;\n\n const quadrantHalfWidth = quadrantWidth / 2;\n const quadrantHalfHeight = quadrantHeight / 2;\n const quadrantSpace = {\n quadrantLeft,\n quadrantTop,\n quadrantWidth,\n quadrantHalfWidth,\n quadrantHeight,\n quadrantHalfHeight,\n };\n\n return {\n xAxisSpace,\n yAxisSpace,\n titleSpace,\n quadrantSpace,\n };\n }\n\n getAxisLabels(\n xAxisPosition: typeof this.config.xAxisPosition,\n showXAxis: boolean,\n showYAxis: boolean,\n spaceData: CalculateSpaceData\n ): QuadrantTextType[] {\n const { quadrantSpace, titleSpace } = spaceData;\n const {\n quadrantHalfHeight,\n quadrantHeight,\n quadrantLeft,\n quadrantHalfWidth,\n quadrantTop,\n quadrantWidth,\n } = quadrantSpace;\n\n const drawXAxisLabelsInMiddle = Boolean(this.data.xAxisRightText);\n const drawYAxisLabelsInMiddle = Boolean(this.data.yAxisTopText);\n\n const axisLabels: QuadrantTextType[] = [];\n\n if (this.data.xAxisLeftText && showXAxis) {\n axisLabels.push({\n text: this.data.xAxisLeftText,\n fill: this.themeConfig.quadrantXAxisTextFill,\n x: quadrantLeft + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),\n y:\n xAxisPosition === 'top'\n ? this.config.xAxisLabelPadding + titleSpace.top\n : this.config.xAxisLabelPadding +\n quadrantTop +\n quadrantHeight +\n this.config.quadrantPadding,\n fontSize: this.config.xAxisLabelFontSize,\n verticalPos: drawXAxisLabelsInMiddle ? 'center' : 'left',\n horizontalPos: 'top',\n rotation: 0,\n });\n }\n if (this.data.xAxisRightText && showXAxis) {\n axisLabels.push({\n text: this.data.xAxisRightText,\n fill: this.themeConfig.quadrantXAxisTextFill,\n x: quadrantLeft + quadrantHalfWidth + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),\n y:\n xAxisPosition === 'top'\n ? this.config.xAxisLabelPadding + titleSpace.top\n : this.config.xAxisLabelPadding +\n quadrantTop +\n quadrantHeight +\n this.config.quadrantPadding,\n fontSize: this.config.xAxisLabelFontSize,\n verticalPos: drawXAxisLabelsInMiddle ? 'center' : 'left',\n horizontalPos: 'top',\n rotation: 0,\n });\n }\n\n if (this.data.yAxisBottomText && showYAxis) {\n axisLabels.push({\n text: this.data.yAxisBottomText,\n fill: this.themeConfig.quadrantYAxisTextFill,\n x:\n this.config.yAxisPosition === 'left'\n ? this.config.yAxisLabelPadding\n : this.config.yAxisLabelPadding +\n quadrantLeft +\n quadrantWidth +\n this.config.quadrantPadding,\n y: quadrantTop + quadrantHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),\n fontSize: this.config.yAxisLabelFontSize,\n verticalPos: drawYAxisLabelsInMiddle ? 'center' : 'left',\n horizontalPos: 'top',\n rotation: -90,\n });\n }\n if (this.data.yAxisTopText && showYAxis) {\n axisLabels.push({\n text: this.data.yAxisTopText,\n fill: this.themeConfig.quadrantYAxisTextFill,\n x:\n this.config.yAxisPosition === 'left'\n ? this.config.yAxisLabelPadding\n : this.config.yAxisLabelPadding +\n quadrantLeft +\n quadrantWidth +\n this.config.quadrantPadding,\n y:\n quadrantTop + quadrantHalfHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),\n fontSize: this.config.yAxisLabelFontSize,\n verticalPos: drawYAxisLabelsInMiddle ? 'center' : 'left',\n horizontalPos: 'top',\n rotation: -90,\n });\n }\n return axisLabels;\n }\n\n getQuadrants(spaceData: CalculateSpaceData): QuadrantQuadrantsType[] {\n const { quadrantSpace } = spaceData;\n\n const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace;\n\n const quadrants: QuadrantQuadrantsType[] = [\n {\n text: {\n text: this.data.quadrant1Text,\n fill: this.themeConfig.quadrant1TextFill,\n x: 0,\n y: 0,\n fontSize: this.config.quadrantLabelFontSize,\n verticalPos: 'center',\n horizontalPos: 'middle',\n rotation: 0,\n },\n x: quadrantLeft + quadrantHalfWidth,\n y: quadrantTop,\n width: quadrantHalfWidth,\n height: quadrantHalfHeight,\n fill: this.themeConfig.quadrant1Fill,\n },\n {\n text: {\n text: this.data.quadrant2Text,\n fill: this.themeConfig.quadrant2TextFill,\n x: 0,\n y: 0,\n fontSize: this.config.quadrantLabelFontSize,\n verticalPos: 'center',\n horizontalPos: 'middle',\n rotation: 0,\n },\n x: quadrantLeft,\n y: quadrantTop,\n width: quadrantHalfWidth,\n height: quadrantHalfHeight,\n fill: this.themeConfig.quadrant2Fill,\n },\n {\n text: {\n text: this.data.quadrant3Text,\n fill: this.themeConfig.quadrant3TextFill,\n x: 0,\n y: 0,\n fontSize: this.config.quadrantLabelFontSize,\n verticalPos: 'center',\n horizontalPos: 'middle',\n rotation: 0,\n },\n x: quadrantLeft,\n y: quadrantTop + quadrantHalfHeight,\n width: quadrantHalfWidth,\n height: quadrantHalfHeight,\n fill: this.themeConfig.quadrant3Fill,\n },\n {\n text: {\n text: this.data.quadrant4Text,\n fill: this.themeConfig.quadrant4TextFill,\n x: 0,\n y: 0,\n fontSize: this.config.quadrantLabelFontSize,\n verticalPos: 'center',\n horizontalPos: 'middle',\n rotation: 0,\n },\n x: quadrantLeft + quadrantHalfWidth,\n y: quadrantTop + quadrantHalfHeight,\n width: quadrantHalfWidth,\n height: quadrantHalfHeight,\n fill: this.themeConfig.quadrant4Fill,\n },\n ];\n for (const quadrant of quadrants) {\n quadrant.text.x = quadrant.x + quadrant.width / 2;\n // place the text in the center of the box\n if (this.data.points.length === 0) {\n quadrant.text.y = quadrant.y + quadrant.height / 2;\n quadrant.text.horizontalPos = 'middle';\n // place the text top of the quadrant square\n } else {\n quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding;\n quadrant.text.horizontalPos = 'top';\n }\n }\n\n return quadrants;\n }\n\n getQuadrantPoints(spaceData: CalculateSpaceData): QuadrantPointType[] {\n const { quadrantSpace } = spaceData;\n\n const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace;\n\n const xAxis = scaleLinear()\n .domain([0, 1])\n .range([quadrantLeft, quadrantWidth + quadrantLeft]);\n\n const yAxis = scaleLinear()\n .domain([0, 1])\n .range([quadrantHeight + quadrantTop, quadrantTop]);\n\n const points: QuadrantPointType[] = this.data.points.map((point) => {\n const classStyles = this.classes.get(point.className!);\n if (classStyles) {\n point = { ...classStyles, ...point };\n }\n const props: QuadrantPointType = {\n x: xAxis(point.x),\n y: yAxis(point.y),\n fill: point.color ?? this.themeConfig.quadrantPointFill,\n radius: point.radius ?? this.config.pointRadius,\n text: {\n text: point.text,\n fill: this.themeConfig.quadrantPointTextFill,\n x: xAxis(point.x),\n y: yAxis(point.y) + this.config.pointTextPadding,\n verticalPos: 'center',\n horizontalPos: 'top',\n fontSize: this.config.pointLabelFontSize,\n rotation: 0,\n },\n strokeColor: point.strokeColor ?? this.themeConfig.quadrantPointFill,\n strokeWidth: point.strokeWidth ?? '0px',\n };\n return props;\n });\n return points;\n }\n\n getBorders(spaceData: CalculateSpaceData): QuadrantLineType[] {\n const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2;\n const { quadrantSpace } = spaceData;\n\n const {\n quadrantHalfHeight,\n quadrantHeight,\n quadrantLeft,\n quadrantHalfWidth,\n quadrantTop,\n quadrantWidth,\n } = quadrantSpace;\n\n const borderLines: QuadrantLineType[] = [\n // top border\n {\n strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,\n strokeWidth: this.config.quadrantExternalBorderStrokeWidth,\n x1: quadrantLeft - halfExternalBorderWidth,\n y1: quadrantTop,\n x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,\n y2: quadrantTop,\n },\n // right border\n {\n strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,\n strokeWidth: this.config.quadrantExternalBorderStrokeWidth,\n x1: quadrantLeft + quadrantWidth,\n y1: quadrantTop + halfExternalBorderWidth,\n x2: quadrantLeft + quadrantWidth,\n y2: quadrantTop + quadrantHeight - halfExternalBorderWidth,\n },\n // bottom border\n {\n strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,\n strokeWidth: this.config.quadrantExternalBorderStrokeWidth,\n x1: quadrantLeft - halfExternalBorderWidth,\n y1: quadrantTop + quadrantHeight,\n x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,\n y2: quadrantTop + quadrantHeight,\n },\n // left border\n {\n strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,\n strokeWidth: this.config.quadrantExternalBorderStrokeWidth,\n x1: quadrantLeft,\n y1: quadrantTop + halfExternalBorderWidth,\n x2: quadrantLeft,\n y2: quadrantTop + quadrantHeight - halfExternalBorderWidth,\n },\n // vertical inner border\n {\n strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,\n strokeWidth: this.config.quadrantInternalBorderStrokeWidth,\n x1: quadrantLeft + quadrantHalfWidth,\n y1: quadrantTop + halfExternalBorderWidth,\n x2: quadrantLeft + quadrantHalfWidth,\n y2: quadrantTop + quadrantHeight - halfExternalBorderWidth,\n },\n // horizontal inner border\n {\n strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,\n strokeWidth: this.config.quadrantInternalBorderStrokeWidth,\n x1: quadrantLeft + halfExternalBorderWidth,\n y1: quadrantTop + quadrantHalfHeight,\n x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth,\n y2: quadrantTop + quadrantHalfHeight,\n },\n ];\n return borderLines;\n }\n\n getTitle(showTitle: boolean): QuadrantTextType | undefined {\n if (showTitle) {\n return {\n text: this.data.titleText,\n fill: this.themeConfig.quadrantTitleFill,\n fontSize: this.config.titleFontSize,\n horizontalPos: 'top',\n verticalPos: 'center',\n rotation: 0,\n y: this.config.titlePadding,\n x: this.config.chartWidth / 2,\n };\n }\n return;\n }\n\n build(): QuadrantBuildType {\n const showXAxis =\n this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText);\n const showYAxis =\n this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText);\n const showTitle = this.config.showTitle && !!this.data.titleText;\n\n const xAxisPosition = this.data.points.length > 0 ? 'bottom' : this.config.xAxisPosition;\n\n const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle);\n\n return {\n points: this.getQuadrantPoints(calculatedSpace),\n quadrants: this.getQuadrants(calculatedSpace),\n axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace),\n borderLines: this.getBorders(calculatedSpace),\n title: this.getTitle(showTitle),\n };\n }\n}\n", "class InvalidStyleError extends Error {\n constructor(style: string, value: string, type: string) {\n super(`value for ${style} ${value} is invalid, please use a valid ${type}`);\n this.name = 'InvalidStyleError';\n }\n}\n\nfunction validateHexCode(value: string): boolean {\n return !/^#?([\\dA-Fa-f]{6}|[\\dA-Fa-f]{3})$/.test(value);\n}\n\nfunction validateNumber(value: string): boolean {\n return !/^\\d+$/.test(value);\n}\n\nfunction validateSizeInPixels(value: string): boolean {\n return !/^\\d+px$/.test(value);\n}\n\nexport { validateHexCode, validateNumber, validateSizeInPixels, InvalidStyleError };\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { sanitizeText } from '../common/common.js';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../common/commonDb.js';\nimport type { StylesObject } from './quadrantBuilder.js';\nimport { QuadrantBuilder } from './quadrantBuilder.js';\nimport {\n validateHexCode,\n validateSizeInPixels,\n validateNumber,\n InvalidStyleError,\n} from './utils.js';\n\nconst config = getConfig();\n\nfunction textSanitizer(text: string) {\n return sanitizeText(text.trim(), config);\n}\n\ninterface LexTextObj {\n text: string;\n type: 'text' | 'markdown';\n}\n\nconst quadrantBuilder = new QuadrantBuilder();\n\nfunction setQuadrant1Text(textObj: LexTextObj) {\n quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) });\n}\n\nfunction setQuadrant2Text(textObj: LexTextObj) {\n quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) });\n}\n\nfunction setQuadrant3Text(textObj: LexTextObj) {\n quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) });\n}\n\nfunction setQuadrant4Text(textObj: LexTextObj) {\n quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) });\n}\n\nfunction setXAxisLeftText(textObj: LexTextObj) {\n quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) });\n}\n\nfunction setXAxisRightText(textObj: LexTextObj) {\n quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) });\n}\n\nfunction setYAxisTopText(textObj: LexTextObj) {\n quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) });\n}\n\nfunction setYAxisBottomText(textObj: LexTextObj) {\n quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) });\n}\n\nfunction parseStyles(styles: string[]): StylesObject {\n const stylesObject: StylesObject = {};\n for (const style of styles) {\n const [key, value] = style.trim().split(/\\s*:\\s*/);\n if (key === 'radius') {\n if (validateNumber(value)) {\n throw new InvalidStyleError(key, value, 'number');\n }\n stylesObject.radius = parseInt(value);\n } else if (key === 'color') {\n if (validateHexCode(value)) {\n throw new InvalidStyleError(key, value, 'hex code');\n }\n stylesObject.color = value;\n } else if (key === 'stroke-color') {\n if (validateHexCode(value)) {\n throw new InvalidStyleError(key, value, 'hex code');\n }\n stylesObject.strokeColor = value;\n } else if (key === 'stroke-width') {\n if (validateSizeInPixels(value)) {\n throw new InvalidStyleError(key, value, 'number of pixels (eg. 10px)');\n }\n stylesObject.strokeWidth = value;\n } else {\n throw new Error(`style named ${key} is not supported.`);\n }\n }\n return stylesObject;\n}\n\nfunction addPoint(textObj: LexTextObj, className: string, x: number, y: number, styles: string[]) {\n const stylesObject = parseStyles(styles);\n quadrantBuilder.addPoints([\n {\n x,\n y,\n text: textSanitizer(textObj.text),\n className,\n ...stylesObject,\n },\n ]);\n}\n\nfunction addClass(className: string, styles: string[]) {\n quadrantBuilder.addClass(className, parseStyles(styles));\n}\n\nfunction setWidth(width: number) {\n quadrantBuilder.setConfig({ chartWidth: width });\n}\n\nfunction setHeight(height: number) {\n quadrantBuilder.setConfig({ chartHeight: height });\n}\n\nfunction getQuadrantData() {\n const config = getConfig();\n const { themeVariables, quadrantChart: quadrantChartConfig } = config;\n if (quadrantChartConfig) {\n quadrantBuilder.setConfig(quadrantChartConfig);\n }\n quadrantBuilder.setThemeConfig({\n quadrant1Fill: themeVariables.quadrant1Fill,\n quadrant2Fill: themeVariables.quadrant2Fill,\n quadrant3Fill: themeVariables.quadrant3Fill,\n quadrant4Fill: themeVariables.quadrant4Fill,\n quadrant1TextFill: themeVariables.quadrant1TextFill,\n quadrant2TextFill: themeVariables.quadrant2TextFill,\n quadrant3TextFill: themeVariables.quadrant3TextFill,\n quadrant4TextFill: themeVariables.quadrant4TextFill,\n quadrantPointFill: themeVariables.quadrantPointFill,\n quadrantPointTextFill: themeVariables.quadrantPointTextFill,\n quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill,\n quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill,\n quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill,\n quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill,\n quadrantTitleFill: themeVariables.quadrantTitleFill,\n });\n quadrantBuilder.setData({ titleText: getDiagramTitle() });\n return quadrantBuilder.build();\n}\n\nconst clear = function () {\n quadrantBuilder.clear();\n commonClear();\n};\n\nexport default {\n setWidth,\n setHeight,\n setQuadrant1Text,\n setQuadrant2Text,\n setQuadrant3Text,\n setQuadrant4Text,\n setXAxisLeftText,\n setXAxisRightText,\n setYAxisTopText,\n setYAxisBottomText,\n parseStyles,\n addPoint,\n addClass,\n getQuadrantData,\n clear,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n};\n", "// @ts-nocheck - don't check until handle it\nimport { select } from 'd3';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type { Diagram } from '../../Diagram.js';\nimport type {\n QuadrantBuildType,\n QuadrantLineType,\n QuadrantPointType,\n QuadrantQuadrantsType,\n QuadrantTextType,\n TextHorizontalPos,\n TextVerticalPos,\n} from './quadrantBuilder.js';\n\nexport const draw = (txt: string, id: string, _version: string, diagObj: Diagram) => {\n function getDominantBaseLine(horizontalPos: TextHorizontalPos) {\n return horizontalPos === 'top' ? 'hanging' : 'middle';\n }\n\n function getTextAnchor(verticalPos: TextVerticalPos) {\n return verticalPos === 'left' ? 'start' : 'middle';\n }\n\n function getTransformation(data: { x: number; y: number; rotation: number }) {\n return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;\n }\n\n const conf = getConfig();\n\n log.debug('Rendering quadrant chart\\n' + txt);\n\n const securityLevel = conf.securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n const svg = root.select(`[id=\"${id}\"]`);\n\n const group = svg.append('g').attr('class', 'main');\n\n const width = conf.quadrantChart?.chartWidth ?? 500;\n const height = conf.quadrantChart?.chartHeight ?? 500;\n\n configureSvgSize(svg, height, width, conf.quadrantChart?.useMaxWidth ?? true);\n\n svg.attr('viewBox', '0 0 ' + width + ' ' + height);\n\n // @ts-ignore: TODO Fix ts errors\n diagObj.db.setHeight(height);\n // @ts-ignore: TODO Fix ts errors\n diagObj.db.setWidth(width);\n\n // @ts-ignore: TODO Fix ts errors\n const quadrantData: QuadrantBuildType = diagObj.db.getQuadrantData();\n\n const quadrantsGroup = group.append('g').attr('class', 'quadrants');\n const borderGroup = group.append('g').attr('class', 'border');\n const dataPointGroup = group.append('g').attr('class', 'data-points');\n const labelGroup = group.append('g').attr('class', 'labels');\n const titleGroup = group.append('g').attr('class', 'title');\n\n if (quadrantData.title) {\n titleGroup\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .attr('fill', quadrantData.title.fill)\n .attr('font-size', quadrantData.title.fontSize)\n .attr('dominant-baseline', getDominantBaseLine(quadrantData.title.horizontalPos))\n .attr('text-anchor', getTextAnchor(quadrantData.title.verticalPos))\n .attr('transform', getTransformation(quadrantData.title))\n .text(quadrantData.title.text);\n }\n\n if (quadrantData.borderLines) {\n borderGroup\n .selectAll('line')\n .data(quadrantData.borderLines)\n .enter()\n .append('line')\n .attr('x1', (data: QuadrantLineType) => data.x1)\n .attr('y1', (data: QuadrantLineType) => data.y1)\n .attr('x2', (data: QuadrantLineType) => data.x2)\n .attr('y2', (data: QuadrantLineType) => data.y2)\n .style('stroke', (data: QuadrantLineType) => data.strokeFill)\n .style('stroke-width', (data: QuadrantLineType) => data.strokeWidth);\n }\n\n const quadrants = quadrantsGroup\n .selectAll('g.quadrant')\n .data(quadrantData.quadrants)\n .enter()\n .append('g')\n .attr('class', 'quadrant');\n\n quadrants\n .append('rect')\n .attr('x', (data: QuadrantQuadrantsType) => data.x)\n .attr('y', (data: QuadrantQuadrantsType) => data.y)\n .attr('width', (data: QuadrantQuadrantsType) => data.width)\n .attr('height', (data: QuadrantQuadrantsType) => data.height)\n .attr('fill', (data: QuadrantQuadrantsType) => data.fill);\n\n quadrants\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .attr('fill', (data: QuadrantQuadrantsType) => data.text.fill)\n .attr('font-size', (data: QuadrantQuadrantsType) => data.text.fontSize)\n .attr('dominant-baseline', (data: QuadrantQuadrantsType) =>\n getDominantBaseLine(data.text.horizontalPos)\n )\n .attr('text-anchor', (data: QuadrantQuadrantsType) => getTextAnchor(data.text.verticalPos))\n .attr('transform', (data: QuadrantQuadrantsType) => getTransformation(data.text))\n .text((data: QuadrantQuadrantsType) => data.text.text);\n\n const labels = labelGroup\n .selectAll('g.label')\n .data(quadrantData.axisLabels)\n .enter()\n .append('g')\n .attr('class', 'label');\n\n labels\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .text((data: QuadrantTextType) => data.text)\n .attr('fill', (data: QuadrantTextType) => data.fill)\n .attr('font-size', (data: QuadrantTextType) => data.fontSize)\n .attr('dominant-baseline', (data: QuadrantTextType) => getDominantBaseLine(data.horizontalPos))\n .attr('text-anchor', (data: QuadrantTextType) => getTextAnchor(data.verticalPos))\n .attr('transform', (data: QuadrantTextType) => getTransformation(data));\n\n const dataPoints = dataPointGroup\n .selectAll('g.data-point')\n .data(quadrantData.points)\n .enter()\n .append('g')\n .attr('class', 'data-point');\n\n dataPoints\n .append('circle')\n .attr('cx', (data: QuadrantPointType) => data.x)\n .attr('cy', (data: QuadrantPointType) => data.y)\n .attr('r', (data: QuadrantPointType) => data.radius)\n .attr('fill', (data: QuadrantPointType) => data.fill)\n .attr('stroke', (data: QuadrantPointType) => data.strokeColor)\n .attr('stroke-width', (data: QuadrantPointType) => data.strokeWidth);\n\n dataPoints\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .text((data: QuadrantPointType) => data.text.text)\n .attr('fill', (data: QuadrantPointType) => data.text.fill)\n .attr('font-size', (data: QuadrantPointType) => data.text.fontSize)\n .attr('dominant-baseline', (data: QuadrantPointType) =>\n getDominantBaseLine(data.text.horizontalPos)\n )\n .attr('text-anchor', (data: QuadrantPointType) => getTextAnchor(data.text.verticalPos))\n .attr('transform', (data: QuadrantPointType) => getTransformation(data.text));\n};\n\nexport default {\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/quadrant.jison';\nimport db from './quadrantDb.js';\nimport renderer from './quadrantRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles: () => '',\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,10,12,14,16,18,19,21,23],$V1=[2,6],$V2=[1,3],$V3=[1,5],$V4=[1,6],$V5=[1,7],$V6=[1,5,10,12,14,16,18,19,21,23,34,35,36],$V7=[1,25],$V8=[1,26],$V9=[1,28],$Va=[1,29],$Vb=[1,30],$Vc=[1,31],$Vd=[1,32],$Ve=[1,33],$Vf=[1,34],$Vg=[1,35],$Vh=[1,36],$Vi=[1,37],$Vj=[1,43],$Vk=[1,42],$Vl=[1,47],$Vm=[1,50],$Vn=[1,10,12,14,16,18,19,21,23,34,35,36],$Vo=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],$Vp=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],$Vq=[1,64];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"eol\":4,\"XYCHART\":5,\"chartConfig\":6,\"document\":7,\"CHART_ORIENTATION\":8,\"statement\":9,\"title\":10,\"text\":11,\"X_AXIS\":12,\"parseXAxis\":13,\"Y_AXIS\":14,\"parseYAxis\":15,\"LINE\":16,\"plotData\":17,\"BAR\":18,\"acc_title\":19,\"acc_title_value\":20,\"acc_descr\":21,\"acc_descr_value\":22,\"acc_descr_multiline_value\":23,\"SQUARE_BRACES_START\":24,\"commaSeparatedNumbers\":25,\"SQUARE_BRACES_END\":26,\"NUMBER_WITH_DECIMAL\":27,\"COMMA\":28,\"xAxisData\":29,\"bandData\":30,\"ARROW_DELIMITER\":31,\"commaSeparatedTexts\":32,\"yAxisData\":33,\"NEWLINE\":34,\"SEMI\":35,\"EOF\":36,\"alphaNum\":37,\"STR\":38,\"MD_STR\":39,\"alphaNumToken\":40,\"AMP\":41,\"NUM\":42,\"ALPHA\":43,\"PLUS\":44,\"EQUALS\":45,\"MULT\":46,\"DOT\":47,\"BRKT\":48,\"MINUS\":49,\"UNDERSCORE\":50,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",5:\"XYCHART\",8:\"CHART_ORIENTATION\",10:\"title\",12:\"X_AXIS\",14:\"Y_AXIS\",16:\"LINE\",18:\"BAR\",19:\"acc_title\",20:\"acc_title_value\",21:\"acc_descr\",22:\"acc_descr_value\",23:\"acc_descr_multiline_value\",24:\"SQUARE_BRACES_START\",26:\"SQUARE_BRACES_END\",27:\"NUMBER_WITH_DECIMAL\",28:\"COMMA\",31:\"ARROW_DELIMITER\",34:\"NEWLINE\",35:\"SEMI\",36:\"EOF\",38:\"STR\",39:\"MD_STR\",41:\"AMP\",42:\"NUM\",43:\"ALPHA\",44:\"PLUS\",45:\"EQUALS\",46:\"MULT\",47:\"DOT\",48:\"BRKT\",49:\"MINUS\",50:\"UNDERSCORE\"},\nproductions_: [0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 5:\n yy.setOrientation($$[$0]); \nbreak;\ncase 9:\n yy.setDiagramTitle($$[$0].text.trim()); \nbreak;\ncase 12:\n yy.setLineData({text: '', type: 'text'}, $$[$0]); \nbreak;\ncase 13:\n yy.setLineData($$[$0-1], $$[$0]); \nbreak;\ncase 14:\n yy.setBarData({text: '', type: 'text'}, $$[$0]); \nbreak;\ncase 15:\n yy.setBarData($$[$0-1], $$[$0]); \nbreak;\ncase 16:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 17: case 18:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 19:\n this.$ = $$[$0-1] \nbreak;\ncase 20:\n this.$ = [Number($$[$0-2]), ...$$[$0]] \nbreak;\ncase 21:\n this.$ = [Number($$[$0])] \nbreak;\ncase 22:\nyy.setXAxisTitle($$[$0]);\nbreak;\ncase 23:\nyy.setXAxisTitle($$[$0-1]);\nbreak;\ncase 24:\nyy.setXAxisTitle({type: 'text', text: ''});\nbreak;\ncase 25:\nyy.setXAxisBand($$[$0]);\nbreak;\ncase 26:\nyy.setXAxisRangeData(Number($$[$0-2]), Number($$[$0]));\nbreak;\ncase 27:\nthis.$ = $$[$0-1]\nbreak;\ncase 28:\n this.$ = [$$[$0-2], ...$$[$0]] \nbreak;\ncase 29:\n this.$ = [$$[$0]] \nbreak;\ncase 30:\nyy.setYAxisTitle($$[$0]);\nbreak;\ncase 31:\nyy.setYAxisTitle($$[$0-1]);\nbreak;\ncase 32:\nyy.setYAxisTitle({type: \"text\", text: \"\"});\nbreak;\ncase 33:\nyy.setYAxisRangeData(Number($$[$0-2]), Number($$[$0]));\nbreak;\ncase 37:\n this.$={text:$$[$0], type: 'text'};\nbreak;\ncase 38:\n this.$={text: $$[$0], type: 'text'};\nbreak;\ncase 39:\n this.$={text: $$[$0], type: 'markdown'};\nbreak;\ncase 40:\nthis.$=$$[$0];\nbreak;\ncase 41:\nthis.$=$$[$0-1]+''+$$[$0];\nbreak;\n}\n},\ntable: [o($V0,$V1,{3:1,4:2,7:4,5:$V2,34:$V3,35:$V4,36:$V5}),{1:[3]},o($V0,$V1,{4:2,7:4,3:8,5:$V2,34:$V3,35:$V4,36:$V5}),o($V0,$V1,{4:2,7:4,6:9,3:10,5:$V2,8:[1,11],34:$V3,35:$V4,36:$V5}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},o($V6,[2,34]),o($V6,[2,35]),o($V6,[2,36]),{1:[2,1]},o($V0,$V1,{4:2,7:4,3:21,5:$V2,34:$V3,35:$V4,36:$V5}),{1:[2,3]},o($V6,[2,5]),o($V0,[2,7],{4:22,34:$V3,35:$V4,36:$V5}),{11:23,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:39,13:38,24:$Vj,27:$Vk,29:40,30:41,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:45,15:44,27:$Vl,33:46,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:49,17:48,24:$Vm,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:52,17:51,24:$Vm,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{20:[1,53]},{22:[1,54]},o($Vn,[2,18]),{1:[2,2]},o($Vn,[2,8]),o($Vn,[2,9]),o($Vo,[2,37],{40:55,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi}),o($Vo,[2,38]),o($Vo,[2,39]),o($Vp,[2,40]),o($Vp,[2,42]),o($Vp,[2,43]),o($Vp,[2,44]),o($Vp,[2,45]),o($Vp,[2,46]),o($Vp,[2,47]),o($Vp,[2,48]),o($Vp,[2,49]),o($Vp,[2,50]),o($Vp,[2,51]),o($Vn,[2,10]),o($Vn,[2,22],{30:41,29:56,24:$Vj,27:$Vk}),o($Vn,[2,24]),o($Vn,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},o($Vn,[2,11]),o($Vn,[2,30],{33:60,27:$Vl}),o($Vn,[2,32]),{31:[1,61]},o($Vn,[2,12]),{17:62,24:$Vm},{25:63,27:$Vq},o($Vn,[2,14]),{17:65,24:$Vm},o($Vn,[2,16]),o($Vn,[2,17]),o($Vp,[2,41]),o($Vn,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},o($Vn,[2,31]),{27:[1,69]},o($Vn,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},o($Vn,[2,15]),o($Vn,[2,26]),o($Vn,[2,27]),{11:59,32:72,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},o($Vn,[2,33]),o($Vn,[2,19]),{25:73,27:$Vq},{26:[2,28]},{26:[2,20]}],\ndefaultActions: {8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip comments */\nbreak;\ncase 1:/* skip comments */\nbreak;\ncase 2: this.popState(); return 34; \nbreak;\ncase 3: this.popState(); return 34; \nbreak;\ncase 4:return 34;\nbreak;\ncase 5:/* do nothing */\nbreak;\ncase 6: return 10; \nbreak;\ncase 7: this.pushState(\"acc_title\");return 19; \nbreak;\ncase 8: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 9: this.pushState(\"acc_descr\");return 21; \nbreak;\ncase 10: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 11: this.pushState(\"acc_descr_multiline\");\nbreak;\ncase 12: this.popState(); \nbreak;\ncase 13: return \"acc_descr_multiline_value\"; \nbreak;\ncase 14:return 5;\nbreak;\ncase 15:return 8\nbreak;\ncase 16: this.pushState(\"axis_data\"); return \"X_AXIS\"; \nbreak;\ncase 17: this.pushState(\"axis_data\"); return \"Y_AXIS\"; \nbreak;\ncase 18: this.pushState(\"axis_band_data\"); return 24; \nbreak;\ncase 19: return 31; \nbreak;\ncase 20: this.pushState(\"data\"); return 16; \nbreak;\ncase 21: this.pushState(\"data\"); return 18; \nbreak;\ncase 22: this.pushState(\"data_inner\"); return 24; \nbreak;\ncase 23: return 27; \nbreak;\ncase 24: this.popState(); return 26; \nbreak;\ncase 25: this.popState(); \nbreak;\ncase 26:this.pushState(\"string\");\nbreak;\ncase 27:this.popState();\nbreak;\ncase 28:return \"STR\";\nbreak;\ncase 29:return 24\nbreak;\ncase 30:return 26\nbreak;\ncase 31:return 43;\nbreak;\ncase 32:return 'COLON';\nbreak;\ncase 33:return 44;\nbreak;\ncase 34:return 28;\nbreak;\ncase 35:return 45;\nbreak;\ncase 36:return 46;\nbreak;\ncase 37:return 48;\nbreak;\ncase 38:return 50;\nbreak;\ncase 39:return 47;\nbreak;\ncase 40:return 41;\nbreak;\ncase 41:return 49;\nbreak;\ncase 42:return 42;\nbreak;\ncase 43:/* skip */\nbreak;\ncase 44:return 35;\nbreak;\ncase 45:return 36;\nbreak;\n}\n},\nrules: [/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:(\\r?\\n))/i,/^(?:(\\r?\\n))/i,/^(?:[\\n\\r]+)/i,/^(?:%%[^\\n]*)/i,/^(?:title\\b)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:\\{)/i,/^(?:[^\\}]*)/i,/^(?:xychart-beta\\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\\b)/i,/^(?:y-axis\\b)/i,/^(?:\\[)/i,/^(?:-->)/i,/^(?:line\\b)/i,/^(?:bar\\b)/i,/^(?:\\[)/i,/^(?:[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+))/i,/^(?:\\])/i,/^(?:(?:`\\) \\{ this\\.pushState\\(md_string\\); \\}\\n\\(\\?:\\(\\?!`\"\\)\\.\\)\\+ \\{ return MD_STR; \\}\\n\\(\\?:`))/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:\\[)/i,/^(?:\\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\\*)/i,/^(?:#)/i,/^(?:[\\_])/i,/^(?:\\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\\s+)/i,/^(?:;)/i,/^(?:$)/i],\nconditions: {\"data_inner\":{\"rules\":[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true},\"data\":{\"rules\":[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true},\"axis_band_data\":{\"rules\":[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true},\"axis_data\":{\"rules\":[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true},\"acc_descr_multiline\":{\"rules\":[12,13],\"inclusive\":false},\"acc_descr\":{\"rules\":[10],\"inclusive\":false},\"acc_title\":{\"rules\":[8],\"inclusive\":false},\"title\":{\"rules\":[],\"inclusive\":false},\"md_string\":{\"rules\":[],\"inclusive\":false},\"string\":{\"rules\":[27,28],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "export interface XYChartAxisThemeConfig {\n titleColor: string;\n labelColor: string;\n tickColor: string;\n axisLineColor: string;\n}\n\nexport interface XYChartThemeConfig {\n backgroundColor: string;\n titleColor: string;\n xAxisLabelColor: string;\n xAxisTitleColor: string;\n xAxisTickColor: string;\n xAxisLineColor: string;\n yAxisLabelColor: string;\n yAxisTitleColor: string;\n yAxisTickColor: string;\n yAxisLineColor: string;\n plotColorPalette: string;\n}\n\nexport interface ChartComponent {\n calculateSpace(availableSpace: Dimension): Dimension;\n setBoundingBoxXY(point: Point): void;\n getDrawableElements(): DrawableElem[];\n}\n\nexport type SimplePlotDataType = [string, number][];\n\nexport interface LinePlotData {\n type: 'line';\n strokeFill: string;\n strokeWidth: number;\n data: SimplePlotDataType;\n}\n\nexport interface BarPlotData {\n type: 'bar';\n fill: string;\n data: SimplePlotDataType;\n}\n\nexport type PlotData = LinePlotData | BarPlotData;\n\nexport function isBarPlot(data: PlotData): data is BarPlotData {\n return data.type === 'bar';\n}\n\nexport interface BandAxisDataType {\n type: 'band';\n title: string;\n categories: string[];\n}\n\nexport interface LinearAxisDataType {\n type: 'linear';\n title: string;\n min: number;\n max: number;\n}\n\nexport type AxisDataType = LinearAxisDataType | BandAxisDataType;\n\nexport function isBandAxisData(data: AxisDataType): data is BandAxisDataType {\n return data.type === 'band';\n}\n\nexport function isLinearAxisData(data: AxisDataType): data is LinearAxisDataType {\n return data.type === 'linear';\n}\n\n/**\n * For now we are keeping this configs as we are removing the required fields while generating the config.type.ts file\n * we should remove `XYChartAxisConfig` and `XYChartConfig` after we started using required fields\n */\nexport interface XYChartAxisConfig {\n showLabel: boolean;\n labelFontSize: number;\n labelPadding: number;\n showTitle: boolean;\n titleFontSize: number;\n titlePadding: number;\n showTick: boolean;\n tickLength: number;\n tickWidth: number;\n showAxisLine: boolean;\n axisLineWidth: number;\n}\n\nexport interface XYChartConfig {\n width: number;\n height: number;\n titleFontSize: number;\n titlePadding: number;\n showTitle: boolean;\n xAxis: XYChartAxisConfig;\n yAxis: XYChartAxisConfig;\n chartOrientation: 'vertical' | 'horizontal';\n plotReservedSpacePercent: number;\n}\n\nexport interface XYChartData {\n xAxis: AxisDataType;\n yAxis: AxisDataType;\n title: string;\n plots: PlotData[];\n}\n\nexport interface Dimension {\n width: number;\n height: number;\n}\n\nexport interface BoundingRect extends Point, Dimension {}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport type TextHorizontalPos = 'left' | 'center' | 'right';\nexport type TextVerticalPos = 'top' | 'middle';\n\nexport interface RectElem extends Point {\n width: number;\n height: number;\n fill: string;\n strokeWidth: number;\n strokeFill: string;\n}\n\nexport interface TextElem extends Point {\n text: string;\n fill: string;\n verticalPos: TextVerticalPos;\n horizontalPos: TextHorizontalPos;\n fontSize: number;\n rotation: number;\n}\n\nexport interface PathElem {\n path: string;\n fill?: string;\n strokeWidth: number;\n strokeFill: string;\n}\n\nexport type DrawableElem =\n | {\n groupTexts: string[];\n type: 'rect';\n data: RectElem[];\n }\n | {\n groupTexts: string[];\n type: 'text';\n data: TextElem[];\n }\n | {\n groupTexts: string[];\n type: 'path';\n data: PathElem[];\n };\n", "import type { SVGGroup } from '../../../diagram-api/types.js';\nimport { computeDimensionOfText } from '../../../rendering-util/createText.js';\nimport type { Dimension } from './interfaces.js';\n\nexport interface TextDimensionCalculator {\n getMaxDimension(texts: string[], fontSize: number): Dimension;\n}\n\nexport class TextDimensionCalculatorWithFont implements TextDimensionCalculator {\n constructor(private parentGroup: SVGGroup) {}\n getMaxDimension(texts: string[], fontSize: number): Dimension {\n if (!this.parentGroup) {\n return {\n width: texts.reduce((acc, cur) => Math.max(cur.length, acc), 0) * fontSize,\n height: fontSize,\n };\n }\n\n const dimension: Dimension = {\n width: 0,\n height: 0,\n };\n\n const elem = this.parentGroup\n .append('g')\n .attr('visibility', 'hidden')\n .attr('font-size', fontSize);\n\n for (const t of texts) {\n const bbox = computeDimensionOfText(elem, 1, t);\n const width = bbox ? bbox.width : t.length * fontSize;\n const height = bbox ? bbox.height : fontSize;\n dimension.width = Math.max(dimension.width, width);\n dimension.height = Math.max(dimension.height, height);\n }\n elem.remove();\n return dimension;\n }\n}\n", "import type {\n BoundingRect,\n Dimension,\n DrawableElem,\n Point,\n XYChartAxisConfig,\n XYChartAxisThemeConfig,\n} from '../../interfaces.js';\nimport type { TextDimensionCalculator } from '../../textDimensionCalculator.js';\nimport type { Axis, AxisPosition } from './index.js';\n\nconst BAR_WIDTH_TO_TICK_WIDTH_RATIO = 0.7;\nconst MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL = 0.2;\n\nexport abstract class BaseAxis implements Axis {\n protected boundingRect: BoundingRect = { x: 0, y: 0, width: 0, height: 0 };\n protected axisPosition: AxisPosition = 'left';\n private range: [number, number];\n protected showTitle = false;\n protected showLabel = false;\n protected showTick = false;\n protected showAxisLine = false;\n protected outerPadding = 0;\n protected titleTextHeight = 0;\n protected labelTextHeight = 0;\n\n constructor(\n protected axisConfig: XYChartAxisConfig,\n protected title: string,\n protected textDimensionCalculator: TextDimensionCalculator,\n protected axisThemeConfig: XYChartAxisThemeConfig\n ) {\n this.range = [0, 10];\n this.boundingRect = { x: 0, y: 0, width: 0, height: 0 };\n this.axisPosition = 'left';\n }\n\n setRange(range: [number, number]): void {\n this.range = range;\n if (this.axisPosition === 'left' || this.axisPosition === 'right') {\n this.boundingRect.height = range[1] - range[0];\n } else {\n this.boundingRect.width = range[1] - range[0];\n }\n this.recalculateScale();\n }\n\n getRange(): [number, number] {\n return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];\n }\n\n setAxisPosition(axisPosition: AxisPosition): void {\n this.axisPosition = axisPosition;\n this.setRange(this.range);\n }\n\n abstract getScaleValue(value: number | string): number;\n\n abstract recalculateScale(): void;\n\n abstract getTickValues(): (string | number)[];\n\n getTickDistance(): number {\n const range = this.getRange();\n return Math.abs(range[0] - range[1]) / this.getTickValues().length;\n }\n\n getAxisOuterPadding(): number {\n return this.outerPadding;\n }\n\n private getLabelDimension(): Dimension {\n return this.textDimensionCalculator.getMaxDimension(\n this.getTickValues().map((tick) => tick.toString()),\n this.axisConfig.labelFontSize\n );\n }\n\n recalculateOuterPaddingToDrawBar(): void {\n if (BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() > this.outerPadding * 2) {\n this.outerPadding = Math.floor((BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance()) / 2);\n }\n this.recalculateScale();\n }\n\n private calculateSpaceIfDrawnHorizontally(availableSpace: Dimension) {\n let availableHeight = availableSpace.height;\n if (this.axisConfig.showAxisLine && availableHeight > this.axisConfig.axisLineWidth) {\n availableHeight -= this.axisConfig.axisLineWidth;\n this.showAxisLine = true;\n }\n if (this.axisConfig.showLabel) {\n const spaceRequired = this.getLabelDimension();\n const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.width;\n this.outerPadding = Math.min(spaceRequired.width / 2, maxPadding);\n\n const heightRequired = spaceRequired.height + this.axisConfig.labelPadding * 2;\n this.labelTextHeight = spaceRequired.height;\n if (heightRequired <= availableHeight) {\n availableHeight -= heightRequired;\n this.showLabel = true;\n }\n }\n if (this.axisConfig.showTick && availableHeight >= this.axisConfig.tickLength) {\n this.showTick = true;\n availableHeight -= this.axisConfig.tickLength;\n }\n if (this.axisConfig.showTitle && this.title) {\n const spaceRequired = this.textDimensionCalculator.getMaxDimension(\n [this.title],\n this.axisConfig.titleFontSize\n );\n const heightRequired = spaceRequired.height + this.axisConfig.titlePadding * 2;\n this.titleTextHeight = spaceRequired.height;\n if (heightRequired <= availableHeight) {\n availableHeight -= heightRequired;\n this.showTitle = true;\n }\n }\n this.boundingRect.width = availableSpace.width;\n this.boundingRect.height = availableSpace.height - availableHeight;\n }\n\n private calculateSpaceIfDrawnVertical(availableSpace: Dimension) {\n let availableWidth = availableSpace.width;\n if (this.axisConfig.showAxisLine && availableWidth > this.axisConfig.axisLineWidth) {\n availableWidth -= this.axisConfig.axisLineWidth;\n this.showAxisLine = true;\n }\n if (this.axisConfig.showLabel) {\n const spaceRequired = this.getLabelDimension();\n const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.height;\n this.outerPadding = Math.min(spaceRequired.height / 2, maxPadding);\n const widthRequired = spaceRequired.width + this.axisConfig.labelPadding * 2;\n if (widthRequired <= availableWidth) {\n availableWidth -= widthRequired;\n this.showLabel = true;\n }\n }\n if (this.axisConfig.showTick && availableWidth >= this.axisConfig.tickLength) {\n this.showTick = true;\n availableWidth -= this.axisConfig.tickLength;\n }\n if (this.axisConfig.showTitle && this.title) {\n const spaceRequired = this.textDimensionCalculator.getMaxDimension(\n [this.title],\n this.axisConfig.titleFontSize\n );\n const widthRequired = spaceRequired.height + this.axisConfig.titlePadding * 2;\n this.titleTextHeight = spaceRequired.height;\n if (widthRequired <= availableWidth) {\n availableWidth -= widthRequired;\n this.showTitle = true;\n }\n }\n this.boundingRect.width = availableSpace.width - availableWidth;\n this.boundingRect.height = availableSpace.height;\n }\n\n calculateSpace(availableSpace: Dimension): Dimension {\n if (this.axisPosition === 'left' || this.axisPosition === 'right') {\n this.calculateSpaceIfDrawnVertical(availableSpace);\n } else {\n this.calculateSpaceIfDrawnHorizontally(availableSpace);\n }\n this.recalculateScale();\n return {\n width: this.boundingRect.width,\n height: this.boundingRect.height,\n };\n }\n\n setBoundingBoxXY(point: Point): void {\n this.boundingRect.x = point.x;\n this.boundingRect.y = point.y;\n }\n\n private getDrawableElementsForLeftAxis(): DrawableElem[] {\n const drawableElement: DrawableElem[] = [];\n if (this.showAxisLine) {\n const x = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;\n drawableElement.push({\n type: 'path',\n groupTexts: ['left-axis', 'axisl-line'],\n data: [\n {\n path: `M ${x},${this.boundingRect.y} L ${x},${\n this.boundingRect.y + this.boundingRect.height\n } `,\n strokeFill: this.axisThemeConfig.axisLineColor,\n strokeWidth: this.axisConfig.axisLineWidth,\n },\n ],\n });\n }\n if (this.showLabel) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['left-axis', 'label'],\n data: this.getTickValues().map((tick) => ({\n text: tick.toString(),\n x:\n this.boundingRect.x +\n this.boundingRect.width -\n (this.showLabel ? this.axisConfig.labelPadding : 0) -\n (this.showTick ? this.axisConfig.tickLength : 0) -\n (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),\n y: this.getScaleValue(tick),\n fill: this.axisThemeConfig.labelColor,\n fontSize: this.axisConfig.labelFontSize,\n rotation: 0,\n verticalPos: 'middle',\n horizontalPos: 'right',\n })),\n });\n }\n if (this.showTick) {\n const x =\n this.boundingRect.x +\n this.boundingRect.width -\n (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);\n drawableElement.push({\n type: 'path',\n groupTexts: ['left-axis', 'ticks'],\n data: this.getTickValues().map((tick) => ({\n path: `M ${x},${this.getScaleValue(tick)} L ${\n x - this.axisConfig.tickLength\n },${this.getScaleValue(tick)}`,\n strokeFill: this.axisThemeConfig.tickColor,\n strokeWidth: this.axisConfig.tickWidth,\n })),\n });\n }\n if (this.showTitle) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['left-axis', 'title'],\n data: [\n {\n text: this.title,\n x: this.boundingRect.x + this.axisConfig.titlePadding,\n y: this.boundingRect.y + this.boundingRect.height / 2,\n fill: this.axisThemeConfig.titleColor,\n fontSize: this.axisConfig.titleFontSize,\n rotation: 270,\n verticalPos: 'top',\n horizontalPos: 'center',\n },\n ],\n });\n }\n return drawableElement;\n }\n private getDrawableElementsForBottomAxis(): DrawableElem[] {\n const drawableElement: DrawableElem[] = [];\n if (this.showAxisLine) {\n const y = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;\n drawableElement.push({\n type: 'path',\n groupTexts: ['bottom-axis', 'axis-line'],\n data: [\n {\n path: `M ${this.boundingRect.x},${y} L ${\n this.boundingRect.x + this.boundingRect.width\n },${y}`,\n strokeFill: this.axisThemeConfig.axisLineColor,\n strokeWidth: this.axisConfig.axisLineWidth,\n },\n ],\n });\n }\n if (this.showLabel) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['bottom-axis', 'label'],\n data: this.getTickValues().map((tick) => ({\n text: tick.toString(),\n x: this.getScaleValue(tick),\n y:\n this.boundingRect.y +\n this.axisConfig.labelPadding +\n (this.showTick ? this.axisConfig.tickLength : 0) +\n (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),\n fill: this.axisThemeConfig.labelColor,\n fontSize: this.axisConfig.labelFontSize,\n rotation: 0,\n verticalPos: 'top',\n horizontalPos: 'center',\n })),\n });\n }\n if (this.showTick) {\n const y = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);\n drawableElement.push({\n type: 'path',\n groupTexts: ['bottom-axis', 'ticks'],\n data: this.getTickValues().map((tick) => ({\n path: `M ${this.getScaleValue(tick)},${y} L ${this.getScaleValue(tick)},${\n y + this.axisConfig.tickLength\n }`,\n strokeFill: this.axisThemeConfig.tickColor,\n strokeWidth: this.axisConfig.tickWidth,\n })),\n });\n }\n if (this.showTitle) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['bottom-axis', 'title'],\n data: [\n {\n text: this.title,\n x: this.range[0] + (this.range[1] - this.range[0]) / 2,\n y:\n this.boundingRect.y +\n this.boundingRect.height -\n this.axisConfig.titlePadding -\n this.titleTextHeight,\n fill: this.axisThemeConfig.titleColor,\n fontSize: this.axisConfig.titleFontSize,\n rotation: 0,\n verticalPos: 'top',\n horizontalPos: 'center',\n },\n ],\n });\n }\n return drawableElement;\n }\n private getDrawableElementsForTopAxis(): DrawableElem[] {\n const drawableElement: DrawableElem[] = [];\n if (this.showAxisLine) {\n const y = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;\n drawableElement.push({\n type: 'path',\n groupTexts: ['top-axis', 'axis-line'],\n data: [\n {\n path: `M ${this.boundingRect.x},${y} L ${\n this.boundingRect.x + this.boundingRect.width\n },${y}`,\n strokeFill: this.axisThemeConfig.axisLineColor,\n strokeWidth: this.axisConfig.axisLineWidth,\n },\n ],\n });\n }\n if (this.showLabel) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['top-axis', 'label'],\n data: this.getTickValues().map((tick) => ({\n text: tick.toString(),\n x: this.getScaleValue(tick),\n y:\n this.boundingRect.y +\n (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) +\n this.axisConfig.labelPadding,\n fill: this.axisThemeConfig.labelColor,\n fontSize: this.axisConfig.labelFontSize,\n rotation: 0,\n verticalPos: 'top',\n horizontalPos: 'center',\n })),\n });\n }\n if (this.showTick) {\n const y = this.boundingRect.y;\n drawableElement.push({\n type: 'path',\n groupTexts: ['top-axis', 'ticks'],\n data: this.getTickValues().map((tick) => ({\n path: `M ${this.getScaleValue(tick)},${\n y + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)\n } L ${this.getScaleValue(tick)},${\n y +\n this.boundingRect.height -\n this.axisConfig.tickLength -\n (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)\n }`,\n strokeFill: this.axisThemeConfig.tickColor,\n strokeWidth: this.axisConfig.tickWidth,\n })),\n });\n }\n if (this.showTitle) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['top-axis', 'title'],\n data: [\n {\n text: this.title,\n x: this.boundingRect.x + this.boundingRect.width / 2,\n y: this.boundingRect.y + this.axisConfig.titlePadding,\n fill: this.axisThemeConfig.titleColor,\n fontSize: this.axisConfig.titleFontSize,\n rotation: 0,\n verticalPos: 'top',\n horizontalPos: 'center',\n },\n ],\n });\n }\n return drawableElement;\n }\n\n getDrawableElements(): DrawableElem[] {\n if (this.axisPosition === 'left') {\n return this.getDrawableElementsForLeftAxis();\n }\n if (this.axisPosition === 'right') {\n throw Error('Drawing of right axis is not implemented');\n }\n if (this.axisPosition === 'bottom') {\n return this.getDrawableElementsForBottomAxis();\n }\n if (this.axisPosition === 'top') {\n return this.getDrawableElementsForTopAxis();\n }\n return [];\n }\n}\n", "import type { ScaleBand } from 'd3';\nimport { scaleBand } from 'd3';\nimport { log } from '../../../../../logger.js';\nimport type { TextDimensionCalculator } from '../../textDimensionCalculator.js';\nimport { BaseAxis } from './baseAxis.js';\nimport type { XYChartAxisThemeConfig, XYChartAxisConfig } from '../../interfaces.js';\n\nexport class BandAxis extends BaseAxis {\n private scale: ScaleBand;\n private categories: string[];\n\n constructor(\n axisConfig: XYChartAxisConfig,\n axisThemeConfig: XYChartAxisThemeConfig,\n categories: string[],\n title: string,\n textDimensionCalculator: TextDimensionCalculator\n ) {\n super(axisConfig, title, textDimensionCalculator, axisThemeConfig);\n this.categories = categories;\n this.scale = scaleBand().domain(this.categories).range(this.getRange());\n }\n\n setRange(range: [number, number]): void {\n super.setRange(range);\n }\n\n recalculateScale(): void {\n this.scale = scaleBand()\n .domain(this.categories)\n .range(this.getRange())\n .paddingInner(1)\n .paddingOuter(0)\n .align(0.5);\n log.trace('BandAxis axis final categories, range: ', this.categories, this.getRange());\n }\n\n getTickValues(): (string | number)[] {\n return this.categories;\n }\n\n getScaleValue(value: string): number {\n return this.scale(value) ?? this.getRange()[0];\n }\n}\n", "import type { ScaleLinear } from 'd3';\nimport { scaleLinear } from 'd3';\nimport type { TextDimensionCalculator } from '../../textDimensionCalculator.js';\nimport { BaseAxis } from './baseAxis.js';\nimport type { XYChartAxisThemeConfig, XYChartAxisConfig } from '../../interfaces.js';\n\nexport class LinearAxis extends BaseAxis {\n private scale: ScaleLinear;\n private domain: [number, number];\n\n constructor(\n axisConfig: XYChartAxisConfig,\n axisThemeConfig: XYChartAxisThemeConfig,\n domain: [number, number],\n title: string,\n textDimensionCalculator: TextDimensionCalculator\n ) {\n super(axisConfig, title, textDimensionCalculator, axisThemeConfig);\n this.domain = domain;\n this.scale = scaleLinear().domain(this.domain).range(this.getRange());\n }\n\n getTickValues(): (string | number)[] {\n return this.scale.ticks();\n }\n\n recalculateScale(): void {\n const domain = [...this.domain]; // copy the array so if reverse is called two times it should not cancel the reverse effect\n if (this.axisPosition === 'left') {\n domain.reverse(); // since y-axis in svg start from top\n }\n this.scale = scaleLinear().domain(domain).range(this.getRange());\n }\n\n getScaleValue(value: number): number {\n return this.scale(value);\n }\n}\n", "import type { SVGGroup } from '../../../../../diagram-api/types.js';\nimport type {\n AxisDataType,\n ChartComponent,\n XYChartAxisConfig,\n XYChartAxisThemeConfig,\n} from '../../interfaces.js';\nimport { isBandAxisData } from '../../interfaces.js';\nimport { TextDimensionCalculatorWithFont } from '../../textDimensionCalculator.js';\nimport { BandAxis } from './bandAxis.js';\nimport { LinearAxis } from './linearAxis.js';\n\nexport type AxisPosition = 'left' | 'right' | 'top' | 'bottom';\n\nexport interface Axis extends ChartComponent {\n getScaleValue(value: string | number): number;\n setAxisPosition(axisPosition: AxisPosition): void;\n getAxisOuterPadding(): number;\n getTickDistance(): number;\n recalculateOuterPaddingToDrawBar(): void;\n setRange(range: [number, number]): void;\n}\n\nexport function getAxis(\n data: AxisDataType,\n axisConfig: XYChartAxisConfig,\n axisThemeConfig: XYChartAxisThemeConfig,\n tmpSVGGroup: SVGGroup\n): Axis {\n const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup);\n if (isBandAxisData(data)) {\n return new BandAxis(\n axisConfig,\n axisThemeConfig,\n data.categories,\n data.title,\n textDimensionCalculator\n );\n }\n return new LinearAxis(\n axisConfig,\n axisThemeConfig,\n [data.min, data.max],\n data.title,\n textDimensionCalculator\n );\n}\n", "import type { SVGGroup } from '../../../../diagram-api/types.js';\nimport type {\n BoundingRect,\n ChartComponent,\n Dimension,\n DrawableElem,\n Point,\n XYChartConfig,\n XYChartData,\n XYChartThemeConfig,\n} from '../interfaces.js';\nimport type { TextDimensionCalculator } from '../textDimensionCalculator.js';\nimport { TextDimensionCalculatorWithFont } from '../textDimensionCalculator.js';\n\nexport class ChartTitle implements ChartComponent {\n private boundingRect: BoundingRect;\n private showChartTitle: boolean;\n constructor(\n private textDimensionCalculator: TextDimensionCalculator,\n private chartConfig: XYChartConfig,\n private chartData: XYChartData,\n private chartThemeConfig: XYChartThemeConfig\n ) {\n this.boundingRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n this.showChartTitle = false;\n }\n setBoundingBoxXY(point: Point): void {\n this.boundingRect.x = point.x;\n this.boundingRect.y = point.y;\n }\n calculateSpace(availableSpace: Dimension): Dimension {\n const titleDimension = this.textDimensionCalculator.getMaxDimension(\n [this.chartData.title],\n this.chartConfig.titleFontSize\n );\n const widthRequired = Math.max(titleDimension.width, availableSpace.width);\n const heightRequired = titleDimension.height + 2 * this.chartConfig.titlePadding;\n if (\n titleDimension.width <= widthRequired &&\n titleDimension.height <= heightRequired &&\n this.chartConfig.showTitle &&\n this.chartData.title\n ) {\n this.boundingRect.width = widthRequired;\n this.boundingRect.height = heightRequired;\n this.showChartTitle = true;\n }\n\n return {\n width: this.boundingRect.width,\n height: this.boundingRect.height,\n };\n }\n getDrawableElements(): DrawableElem[] {\n const drawableElem: DrawableElem[] = [];\n if (this.showChartTitle) {\n drawableElem.push({\n groupTexts: ['chart-title'],\n type: 'text',\n data: [\n {\n fontSize: this.chartConfig.titleFontSize,\n text: this.chartData.title,\n verticalPos: 'middle',\n horizontalPos: 'center',\n x: this.boundingRect.x + this.boundingRect.width / 2,\n y: this.boundingRect.y + this.boundingRect.height / 2,\n fill: this.chartThemeConfig.titleColor,\n rotation: 0,\n },\n ],\n });\n }\n return drawableElem;\n }\n}\n\nexport function getChartTitleComponent(\n chartConfig: XYChartConfig,\n chartData: XYChartData,\n chartThemeConfig: XYChartThemeConfig,\n tmpSVGGroup: SVGGroup\n): ChartComponent {\n const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup);\n return new ChartTitle(textDimensionCalculator, chartConfig, chartData, chartThemeConfig);\n}\n", "import { line } from 'd3';\nimport type { DrawableElem, LinePlotData, XYChartConfig } from '../../interfaces.js';\nimport type { Axis } from '../axis/index.js';\n\nexport class LinePlot {\n constructor(\n private plotData: LinePlotData,\n private xAxis: Axis,\n private yAxis: Axis,\n private orientation: XYChartConfig['chartOrientation'],\n private plotIndex: number\n ) {}\n\n getDrawableElement(): DrawableElem[] {\n const finalData: [number, number][] = this.plotData.data.map((d) => [\n this.xAxis.getScaleValue(d[0]),\n this.yAxis.getScaleValue(d[1]),\n ]);\n\n let path: string | null;\n if (this.orientation === 'horizontal') {\n path = line()\n .y((d) => d[0])\n .x((d) => d[1])(finalData);\n } else {\n path = line()\n .x((d) => d[0])\n .y((d) => d[1])(finalData);\n }\n if (!path) {\n return [];\n }\n return [\n {\n groupTexts: ['plot', `line-plot-${this.plotIndex}`],\n type: 'path',\n data: [\n {\n path,\n strokeFill: this.plotData.strokeFill,\n strokeWidth: this.plotData.strokeWidth,\n },\n ],\n },\n ];\n }\n}\n", "import type { BarPlotData, BoundingRect, DrawableElem, XYChartConfig } from '../../interfaces.js';\nimport type { Axis } from '../axis/index.js';\n\nexport class BarPlot {\n constructor(\n private barData: BarPlotData,\n private boundingRect: BoundingRect,\n private xAxis: Axis,\n private yAxis: Axis,\n private orientation: XYChartConfig['chartOrientation'],\n private plotIndex: number\n ) {}\n\n getDrawableElement(): DrawableElem[] {\n const finalData: [number, number][] = this.barData.data.map((d) => [\n this.xAxis.getScaleValue(d[0]),\n this.yAxis.getScaleValue(d[1]),\n ]);\n\n const barPaddingPercent = 0.05;\n\n const barWidth =\n Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) *\n (1 - barPaddingPercent);\n const barWidthHalf = barWidth / 2;\n\n if (this.orientation === 'horizontal') {\n return [\n {\n groupTexts: ['plot', `bar-plot-${this.plotIndex}`],\n type: 'rect',\n data: finalData.map((data) => ({\n x: this.boundingRect.x,\n y: data[0] - barWidthHalf,\n height: barWidth,\n width: data[1] - this.boundingRect.x,\n fill: this.barData.fill,\n strokeWidth: 0,\n strokeFill: this.barData.fill,\n })),\n },\n ];\n }\n return [\n {\n groupTexts: ['plot', `bar-plot-${this.plotIndex}`],\n type: 'rect',\n data: finalData.map((data) => ({\n x: data[0] - barWidthHalf,\n y: data[1],\n width: barWidth,\n height: this.boundingRect.y + this.boundingRect.height - data[1],\n fill: this.barData.fill,\n strokeWidth: 0,\n strokeFill: this.barData.fill,\n })),\n },\n ];\n }\n}\n", "import type {\n XYChartData,\n Dimension,\n BoundingRect,\n DrawableElem,\n Point,\n XYChartThemeConfig,\n XYChartConfig,\n} from '../../interfaces.js';\nimport type { Axis } from '../axis/index.js';\nimport type { ChartComponent } from '../../interfaces.js';\nimport { LinePlot } from './linePlot.js';\nimport { BarPlot } from './barPlot.js';\n\nexport interface Plot extends ChartComponent {\n setAxes(xAxis: Axis, yAxis: Axis): void;\n}\n\nexport class BasePlot implements Plot {\n private boundingRect: BoundingRect;\n private xAxis?: Axis;\n private yAxis?: Axis;\n\n constructor(\n private chartConfig: XYChartConfig,\n private chartData: XYChartData,\n private chartThemeConfig: XYChartThemeConfig\n ) {\n this.boundingRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n setAxes(xAxis: Axis, yAxis: Axis) {\n this.xAxis = xAxis;\n this.yAxis = yAxis;\n }\n setBoundingBoxXY(point: Point): void {\n this.boundingRect.x = point.x;\n this.boundingRect.y = point.y;\n }\n calculateSpace(availableSpace: Dimension): Dimension {\n this.boundingRect.width = availableSpace.width;\n this.boundingRect.height = availableSpace.height;\n\n return {\n width: this.boundingRect.width,\n height: this.boundingRect.height,\n };\n }\n getDrawableElements(): DrawableElem[] {\n if (!(this.xAxis && this.yAxis)) {\n throw Error('Axes must be passed to render Plots');\n }\n const drawableElem: DrawableElem[] = [];\n for (const [i, plot] of this.chartData.plots.entries()) {\n switch (plot.type) {\n case 'line':\n {\n const linePlot = new LinePlot(\n plot,\n this.xAxis,\n this.yAxis,\n this.chartConfig.chartOrientation,\n i\n );\n drawableElem.push(...linePlot.getDrawableElement());\n }\n break;\n case 'bar':\n {\n const barPlot = new BarPlot(\n plot,\n this.boundingRect,\n this.xAxis,\n this.yAxis,\n this.chartConfig.chartOrientation,\n i\n );\n drawableElem.push(...barPlot.getDrawableElement());\n }\n break;\n }\n }\n return drawableElem;\n }\n}\n\nexport function getPlotComponent(\n chartConfig: XYChartConfig,\n chartData: XYChartData,\n chartThemeConfig: XYChartThemeConfig\n): Plot {\n return new BasePlot(chartConfig, chartData, chartThemeConfig);\n}\n", "import type { SVGGroup } from '../../../diagram-api/types.js';\nimport type { Axis } from './components/axis/index.js';\nimport { getAxis } from './components/axis/index.js';\nimport { getChartTitleComponent } from './components/chartTitle.js';\nimport type { Plot } from './components/plot/index.js';\nimport { getPlotComponent } from './components/plot/index.js';\nimport type {\n ChartComponent,\n DrawableElem,\n XYChartConfig,\n XYChartData,\n XYChartThemeConfig,\n} from './interfaces.js';\nimport { isBarPlot } from './interfaces.js';\n\nexport class Orchestrator {\n private componentStore: {\n title: ChartComponent;\n plot: Plot;\n xAxis: Axis;\n yAxis: Axis;\n };\n constructor(\n private chartConfig: XYChartConfig,\n private chartData: XYChartData,\n chartThemeConfig: XYChartThemeConfig,\n tmpSVGGroup: SVGGroup\n ) {\n this.componentStore = {\n title: getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup),\n plot: getPlotComponent(chartConfig, chartData, chartThemeConfig),\n xAxis: getAxis(\n chartData.xAxis,\n chartConfig.xAxis,\n {\n titleColor: chartThemeConfig.xAxisTitleColor,\n labelColor: chartThemeConfig.xAxisLabelColor,\n tickColor: chartThemeConfig.xAxisTickColor,\n axisLineColor: chartThemeConfig.xAxisLineColor,\n },\n tmpSVGGroup\n ),\n yAxis: getAxis(\n chartData.yAxis,\n chartConfig.yAxis,\n {\n titleColor: chartThemeConfig.yAxisTitleColor,\n labelColor: chartThemeConfig.yAxisLabelColor,\n tickColor: chartThemeConfig.yAxisTickColor,\n axisLineColor: chartThemeConfig.yAxisLineColor,\n },\n tmpSVGGroup\n ),\n };\n }\n\n private calculateVerticalSpace() {\n let availableWidth = this.chartConfig.width;\n let availableHeight = this.chartConfig.height;\n let plotX = 0;\n let plotY = 0;\n let chartWidth = Math.floor((availableWidth * this.chartConfig.plotReservedSpacePercent) / 100);\n let chartHeight = Math.floor(\n (availableHeight * this.chartConfig.plotReservedSpacePercent) / 100\n );\n let spaceUsed = this.componentStore.plot.calculateSpace({\n width: chartWidth,\n height: chartHeight,\n });\n availableWidth -= spaceUsed.width;\n availableHeight -= spaceUsed.height;\n\n spaceUsed = this.componentStore.title.calculateSpace({\n width: this.chartConfig.width,\n height: availableHeight,\n });\n plotY = spaceUsed.height;\n availableHeight -= spaceUsed.height;\n this.componentStore.xAxis.setAxisPosition('bottom');\n spaceUsed = this.componentStore.xAxis.calculateSpace({\n width: availableWidth,\n height: availableHeight,\n });\n availableHeight -= spaceUsed.height;\n this.componentStore.yAxis.setAxisPosition('left');\n spaceUsed = this.componentStore.yAxis.calculateSpace({\n width: availableWidth,\n height: availableHeight,\n });\n plotX = spaceUsed.width;\n availableWidth -= spaceUsed.width;\n if (availableWidth > 0) {\n chartWidth += availableWidth;\n availableWidth = 0;\n }\n if (availableHeight > 0) {\n chartHeight += availableHeight;\n availableHeight = 0;\n }\n this.componentStore.plot.calculateSpace({\n width: chartWidth,\n height: chartHeight,\n });\n\n this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY });\n this.componentStore.xAxis.setRange([plotX, plotX + chartWidth]);\n this.componentStore.xAxis.setBoundingBoxXY({ x: plotX, y: plotY + chartHeight });\n this.componentStore.yAxis.setRange([plotY, plotY + chartHeight]);\n this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: plotY });\n if (this.chartData.plots.some((p) => isBarPlot(p))) {\n this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();\n }\n }\n\n private calculateHorizontalSpace() {\n let availableWidth = this.chartConfig.width;\n let availableHeight = this.chartConfig.height;\n let titleYEnd = 0;\n let plotX = 0;\n let plotY = 0;\n let chartWidth = Math.floor((availableWidth * this.chartConfig.plotReservedSpacePercent) / 100);\n let chartHeight = Math.floor(\n (availableHeight * this.chartConfig.plotReservedSpacePercent) / 100\n );\n let spaceUsed = this.componentStore.plot.calculateSpace({\n width: chartWidth,\n height: chartHeight,\n });\n availableWidth -= spaceUsed.width;\n availableHeight -= spaceUsed.height;\n\n spaceUsed = this.componentStore.title.calculateSpace({\n width: this.chartConfig.width,\n height: availableHeight,\n });\n titleYEnd = spaceUsed.height;\n availableHeight -= spaceUsed.height;\n this.componentStore.xAxis.setAxisPosition('left');\n spaceUsed = this.componentStore.xAxis.calculateSpace({\n width: availableWidth,\n height: availableHeight,\n });\n availableWidth -= spaceUsed.width;\n plotX = spaceUsed.width;\n this.componentStore.yAxis.setAxisPosition('top');\n spaceUsed = this.componentStore.yAxis.calculateSpace({\n width: availableWidth,\n height: availableHeight,\n });\n availableHeight -= spaceUsed.height;\n plotY = titleYEnd + spaceUsed.height;\n if (availableWidth > 0) {\n chartWidth += availableWidth;\n availableWidth = 0;\n }\n if (availableHeight > 0) {\n chartHeight += availableHeight;\n availableHeight = 0;\n }\n this.componentStore.plot.calculateSpace({\n width: chartWidth,\n height: chartHeight,\n });\n\n this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY });\n this.componentStore.yAxis.setRange([plotX, plotX + chartWidth]);\n this.componentStore.yAxis.setBoundingBoxXY({ x: plotX, y: titleYEnd });\n this.componentStore.xAxis.setRange([plotY, plotY + chartHeight]);\n this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: plotY });\n if (this.chartData.plots.some((p) => isBarPlot(p))) {\n this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();\n }\n }\n\n private calculateSpace() {\n if (this.chartConfig.chartOrientation === 'horizontal') {\n this.calculateHorizontalSpace();\n } else {\n this.calculateVerticalSpace();\n }\n }\n\n getDrawableElement() {\n this.calculateSpace();\n const drawableElem: DrawableElem[] = [];\n this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);\n for (const component of Object.values(this.componentStore)) {\n drawableElem.push(...component.getDrawableElements());\n }\n return drawableElem;\n }\n}\n", "import type { SVGGroup } from '../../../diagram-api/types.js';\nimport type { DrawableElem, XYChartConfig, XYChartData, XYChartThemeConfig } from './interfaces.js';\nimport { Orchestrator } from './orchestrator.js';\n\nexport class XYChartBuilder {\n static build(\n config: XYChartConfig,\n chartData: XYChartData,\n chartThemeConfig: XYChartThemeConfig,\n tmpSVGGroup: SVGGroup\n ): DrawableElem[] {\n const orchestrator = new Orchestrator(config, chartData, chartThemeConfig, tmpSVGGroup);\n return orchestrator.getDrawableElement();\n }\n}\n", "import * as configApi from '../../config.js';\nimport defaultConfig from '../../defaultConfig.js';\nimport type { SVGGroup } from '../../diagram-api/types.js';\nimport { getThemeVariables } from '../../themes/theme-default.js';\nimport { cleanAndMerge } from '../../utils.js';\nimport { sanitizeText } from '../common/common.js';\nimport {\n clear as commonClear,\n getAccDescription,\n getAccTitle,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n} from '../common/commonDb.js';\nimport { XYChartBuilder } from './chartBuilder/index.js';\nimport type {\n DrawableElem,\n SimplePlotDataType,\n XYChartConfig,\n XYChartData,\n XYChartThemeConfig,\n} from './chartBuilder/interfaces.js';\nimport { isBandAxisData, isLinearAxisData } from './chartBuilder/interfaces.js';\n\nlet plotIndex = 0;\n\nlet tmpSVGGroup: SVGGroup;\n\nlet xyChartConfig: XYChartConfig = getChartDefaultConfig();\nlet xyChartThemeConfig: XYChartThemeConfig = getChartDefaultThemeConfig();\nlet xyChartData: XYChartData = getChartDefaultData();\nlet plotColorPalette = xyChartThemeConfig.plotColorPalette.split(',').map((color) => color.trim());\nlet hasSetXAxis = false;\nlet hasSetYAxis = false;\n\ninterface NormalTextType {\n type: 'text';\n text: string;\n}\n\nfunction getChartDefaultThemeConfig(): XYChartThemeConfig {\n const defaultThemeVariables = getThemeVariables();\n const config = configApi.getConfig();\n return cleanAndMerge(defaultThemeVariables.xyChart, config.themeVariables.xyChart);\n}\nfunction getChartDefaultConfig(): XYChartConfig {\n const config = configApi.getConfig();\n return cleanAndMerge(\n defaultConfig.xyChart as XYChartConfig,\n config.xyChart as XYChartConfig\n );\n}\n\nfunction getChartDefaultData(): XYChartData {\n return {\n yAxis: {\n type: 'linear',\n title: '',\n min: Infinity,\n max: -Infinity,\n },\n xAxis: {\n type: 'band',\n title: '',\n categories: [],\n },\n title: '',\n plots: [],\n };\n}\n\nfunction textSanitizer(text: string) {\n const config = configApi.getConfig();\n return sanitizeText(text.trim(), config);\n}\n\nfunction setTmpSVGG(SVGG: SVGGroup) {\n tmpSVGGroup = SVGG;\n}\nfunction setOrientation(orientation: string) {\n if (orientation === 'horizontal') {\n xyChartConfig.chartOrientation = 'horizontal';\n } else {\n xyChartConfig.chartOrientation = 'vertical';\n }\n}\nfunction setXAxisTitle(title: NormalTextType) {\n xyChartData.xAxis.title = textSanitizer(title.text);\n}\nfunction setXAxisRangeData(min: number, max: number) {\n xyChartData.xAxis = { type: 'linear', title: xyChartData.xAxis.title, min, max };\n hasSetXAxis = true;\n}\nfunction setXAxisBand(categories: NormalTextType[]) {\n xyChartData.xAxis = {\n type: 'band',\n title: xyChartData.xAxis.title,\n categories: categories.map((c) => textSanitizer(c.text)),\n };\n hasSetXAxis = true;\n}\nfunction setYAxisTitle(title: NormalTextType) {\n xyChartData.yAxis.title = textSanitizer(title.text);\n}\nfunction setYAxisRangeData(min: number, max: number) {\n xyChartData.yAxis = { type: 'linear', title: xyChartData.yAxis.title, min, max };\n hasSetYAxis = true;\n}\n\n// this function does not set `hasSetYAxis` as there can be multiple data so we should calculate the range accordingly\nfunction setYAxisRangeFromPlotData(data: number[]) {\n const minValue = Math.min(...data);\n const maxValue = Math.max(...data);\n const prevMinValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.min : Infinity;\n const prevMaxValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.max : -Infinity;\n xyChartData.yAxis = {\n type: 'linear',\n title: xyChartData.yAxis.title,\n min: Math.min(prevMinValue, minValue),\n max: Math.max(prevMaxValue, maxValue),\n };\n}\n\nfunction transformDataWithoutCategory(data: number[]): SimplePlotDataType {\n let retData: SimplePlotDataType = [];\n if (data.length === 0) {\n return retData;\n }\n if (!hasSetXAxis) {\n const prevMinValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.min : Infinity;\n const prevMaxValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.max : -Infinity;\n setXAxisRangeData(Math.min(prevMinValue, 1), Math.max(prevMaxValue, data.length));\n }\n if (!hasSetYAxis) {\n setYAxisRangeFromPlotData(data);\n }\n\n if (isBandAxisData(xyChartData.xAxis)) {\n retData = xyChartData.xAxis.categories.map((c, i) => [c, data[i]]);\n }\n\n if (isLinearAxisData(xyChartData.xAxis)) {\n const min = xyChartData.xAxis.min;\n const max = xyChartData.xAxis.max;\n const step = (max - min) / (data.length - 1);\n const categories: string[] = [];\n for (let i = min; i <= max; i += step) {\n categories.push(`${i}`);\n }\n retData = categories.map((c, i) => [c, data[i]]);\n }\n\n return retData;\n}\n\nfunction getPlotColorFromPalette(plotIndex: number): string {\n return plotColorPalette[plotIndex === 0 ? 0 : plotIndex % plotColorPalette.length];\n}\n\nfunction setLineData(title: NormalTextType, data: number[]) {\n const plotData = transformDataWithoutCategory(data);\n xyChartData.plots.push({\n type: 'line',\n strokeFill: getPlotColorFromPalette(plotIndex),\n strokeWidth: 2,\n data: plotData,\n });\n plotIndex++;\n}\n\nfunction setBarData(title: NormalTextType, data: number[]) {\n const plotData = transformDataWithoutCategory(data);\n xyChartData.plots.push({\n type: 'bar',\n fill: getPlotColorFromPalette(plotIndex),\n data: plotData,\n });\n plotIndex++;\n}\n\nfunction getDrawableElem(): DrawableElem[] {\n if (xyChartData.plots.length === 0) {\n throw Error('No Plot to render, please provide a plot with some data');\n }\n xyChartData.title = getDiagramTitle();\n return XYChartBuilder.build(xyChartConfig, xyChartData, xyChartThemeConfig, tmpSVGGroup);\n}\n\nfunction getChartThemeConfig() {\n return xyChartThemeConfig;\n}\n\nfunction getChartConfig() {\n return xyChartConfig;\n}\n\nconst clear = function () {\n commonClear();\n plotIndex = 0;\n xyChartConfig = getChartDefaultConfig();\n xyChartData = getChartDefaultData();\n xyChartThemeConfig = getChartDefaultThemeConfig();\n plotColorPalette = xyChartThemeConfig.plotColorPalette.split(',').map((color) => color.trim());\n hasSetXAxis = false;\n hasSetYAxis = false;\n};\n\nexport default {\n getDrawableElem,\n clear,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n setOrientation,\n setXAxisTitle,\n setXAxisRangeData,\n setXAxisBand,\n setYAxisTitle,\n setYAxisRangeData,\n setLineData,\n setBarData,\n setTmpSVGG,\n getChartThemeConfig,\n getChartConfig,\n};\n", "import type { Diagram } from '../../Diagram.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type {\n DrawableElem,\n TextElem,\n TextHorizontalPos,\n TextVerticalPos,\n} from './chartBuilder/interfaces.js';\nimport type XYChartDB from './xychartDb.js';\n\nexport const draw = (txt: string, id: string, _version: string, diagObj: Diagram) => {\n const db = diagObj.db as typeof XYChartDB;\n const themeConfig = db.getChartThemeConfig();\n const chartConfig = db.getChartConfig();\n function getDominantBaseLine(horizontalPos: TextVerticalPos) {\n return horizontalPos === 'top' ? 'text-before-edge' : 'middle';\n }\n\n function getTextAnchor(verticalPos: TextHorizontalPos) {\n return verticalPos === 'left' ? 'start' : verticalPos === 'right' ? 'end' : 'middle';\n }\n\n function getTextTransformation(data: TextElem) {\n return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;\n }\n\n log.debug('Rendering xychart chart\\n' + txt);\n\n const svg = selectSvgElement(id);\n const group = svg.append('g').attr('class', 'main');\n const background = group\n .append('rect')\n .attr('width', chartConfig.width)\n .attr('height', chartConfig.height)\n .attr('class', 'background');\n\n // @ts-ignore: TODO Fix ts errors\n configureSvgSize(svg, chartConfig.height, chartConfig.width, true);\n\n svg.attr('viewBox', `0 0 ${chartConfig.width} ${chartConfig.height}`);\n\n background.attr('fill', themeConfig.backgroundColor);\n\n db.setTmpSVGG(svg.append('g').attr('class', 'mermaid-tmp-group'));\n\n const shapes: DrawableElem[] = db.getDrawableElem();\n\n const groups: Record = {};\n\n function getGroup(gList: string[]) {\n let elem = group;\n let prefix = '';\n for (const [i] of gList.entries()) {\n let parent = group;\n if (i > 0 && groups[prefix]) {\n parent = groups[prefix];\n }\n prefix += gList[i];\n elem = groups[prefix];\n if (!elem) {\n elem = groups[prefix] = parent.append('g').attr('class', gList[i]);\n }\n }\n return elem;\n }\n\n for (const shape of shapes) {\n if (shape.data.length === 0) {\n continue;\n }\n\n const shapeGroup = getGroup(shape.groupTexts);\n\n switch (shape.type) {\n case 'rect':\n shapeGroup\n .selectAll('rect')\n .data(shape.data)\n .enter()\n .append('rect')\n .attr('x', (data) => data.x)\n .attr('y', (data) => data.y)\n .attr('width', (data) => data.width)\n .attr('height', (data) => data.height)\n .attr('fill', (data) => data.fill)\n .attr('stroke', (data) => data.strokeFill)\n .attr('stroke-width', (data) => data.strokeWidth);\n break;\n case 'text':\n shapeGroup\n .selectAll('text')\n .data(shape.data)\n .enter()\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .attr('fill', (data) => data.fill)\n .attr('font-size', (data) => data.fontSize)\n .attr('dominant-baseline', (data) => getDominantBaseLine(data.verticalPos))\n .attr('text-anchor', (data) => getTextAnchor(data.horizontalPos))\n .attr('transform', (data) => getTextTransformation(data))\n .text((data) => data.text);\n break;\n case 'path':\n shapeGroup\n .selectAll('path')\n .data(shape.data)\n .enter()\n .append('path')\n .attr('d', (data) => data.path)\n .attr('fill', (data) => (data.fill ? data.fill : 'none'))\n .attr('stroke', (data) => data.strokeFill)\n .attr('stroke-width', (data) => data.strokeWidth);\n break;\n }\n }\n};\n\nexport default {\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: Jison doesn't support types.\nimport parser from './parser/xychart.jison';\nimport db from './xychartDb.js';\nimport renderer from './xychartRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],$V5=[1,18],$V6=[2,7],$V7=[1,22],$V8=[1,23],$V9=[1,24],$Va=[1,25],$Vb=[1,26],$Vc=[1,27],$Vd=[1,20],$Ve=[1,28],$Vf=[1,29],$Vg=[62,63],$Vh=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],$Vi=[1,47],$Vj=[1,48],$Vk=[1,49],$Vl=[1,50],$Vm=[1,51],$Vn=[1,52],$Vo=[1,53],$Vp=[53,54],$Vq=[1,64],$Vr=[1,60],$Vs=[1,61],$Vt=[1,62],$Vu=[1,63],$Vv=[1,65],$Vw=[1,69],$Vx=[1,70],$Vy=[1,67],$Vz=[1,68],$VA=[5,8,9,11,13,31,32,33,34,35,36,44,62,63];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"directive\":4,\"NEWLINE\":5,\"RD\":6,\"diagram\":7,\"EOF\":8,\"acc_title\":9,\"acc_title_value\":10,\"acc_descr\":11,\"acc_descr_value\":12,\"acc_descr_multiline_value\":13,\"requirementDef\":14,\"elementDef\":15,\"relationshipDef\":16,\"requirementType\":17,\"requirementName\":18,\"STRUCT_START\":19,\"requirementBody\":20,\"ID\":21,\"COLONSEP\":22,\"id\":23,\"TEXT\":24,\"text\":25,\"RISK\":26,\"riskLevel\":27,\"VERIFYMTHD\":28,\"verifyType\":29,\"STRUCT_STOP\":30,\"REQUIREMENT\":31,\"FUNCTIONAL_REQUIREMENT\":32,\"INTERFACE_REQUIREMENT\":33,\"PERFORMANCE_REQUIREMENT\":34,\"PHYSICAL_REQUIREMENT\":35,\"DESIGN_CONSTRAINT\":36,\"LOW_RISK\":37,\"MED_RISK\":38,\"HIGH_RISK\":39,\"VERIFY_ANALYSIS\":40,\"VERIFY_DEMONSTRATION\":41,\"VERIFY_INSPECTION\":42,\"VERIFY_TEST\":43,\"ELEMENT\":44,\"elementName\":45,\"elementBody\":46,\"TYPE\":47,\"type\":48,\"DOCREF\":49,\"ref\":50,\"END_ARROW_L\":51,\"relationship\":52,\"LINE\":53,\"END_ARROW_R\":54,\"CONTAINS\":55,\"COPIES\":56,\"DERIVES\":57,\"SATISFIES\":58,\"VERIFIES\":59,\"REFINES\":60,\"TRACES\":61,\"unqString\":62,\"qString\":63,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",5:\"NEWLINE\",6:\"RD\",8:\"EOF\",9:\"acc_title\",10:\"acc_title_value\",11:\"acc_descr\",12:\"acc_descr_value\",13:\"acc_descr_multiline_value\",19:\"STRUCT_START\",21:\"ID\",22:\"COLONSEP\",24:\"TEXT\",26:\"RISK\",28:\"VERIFYMTHD\",30:\"STRUCT_STOP\",31:\"REQUIREMENT\",32:\"FUNCTIONAL_REQUIREMENT\",33:\"INTERFACE_REQUIREMENT\",34:\"PERFORMANCE_REQUIREMENT\",35:\"PHYSICAL_REQUIREMENT\",36:\"DESIGN_CONSTRAINT\",37:\"LOW_RISK\",38:\"MED_RISK\",39:\"HIGH_RISK\",40:\"VERIFY_ANALYSIS\",41:\"VERIFY_DEMONSTRATION\",42:\"VERIFY_INSPECTION\",43:\"VERIFY_TEST\",44:\"ELEMENT\",47:\"TYPE\",49:\"DOCREF\",51:\"END_ARROW_L\",53:\"LINE\",54:\"END_ARROW_R\",55:\"CONTAINS\",56:\"COPIES\",57:\"DERIVES\",58:\"SATISFIES\",59:\"VERIFIES\",60:\"REFINES\",61:\"TRACES\",62:\"unqString\",63:\"qString\"},\nproductions_: [0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 5: case 6:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 7:\n this.$ = [] \nbreak;\ncase 13:\n yy.addRequirement($$[$0-3], $$[$0-4]) \nbreak;\ncase 14:\n yy.setNewReqId($$[$0-2]); \nbreak;\ncase 15:\n yy.setNewReqText($$[$0-2]); \nbreak;\ncase 16:\n yy.setNewReqRisk($$[$0-2]); \nbreak;\ncase 17:\n yy.setNewReqVerifyMethod($$[$0-2]); \nbreak;\ncase 20:\n this.$=yy.RequirementType.REQUIREMENT;\nbreak;\ncase 21:\n this.$=yy.RequirementType.FUNCTIONAL_REQUIREMENT;\nbreak;\ncase 22:\n this.$=yy.RequirementType.INTERFACE_REQUIREMENT;\nbreak;\ncase 23:\n this.$=yy.RequirementType.PERFORMANCE_REQUIREMENT;\nbreak;\ncase 24:\n this.$=yy.RequirementType.PHYSICAL_REQUIREMENT;\nbreak;\ncase 25:\n this.$=yy.RequirementType.DESIGN_CONSTRAINT;\nbreak;\ncase 26:\n this.$=yy.RiskLevel.LOW_RISK;\nbreak;\ncase 27:\n this.$=yy.RiskLevel.MED_RISK;\nbreak;\ncase 28:\n this.$=yy.RiskLevel.HIGH_RISK;\nbreak;\ncase 29:\n this.$=yy.VerifyType.VERIFY_ANALYSIS;\nbreak;\ncase 30:\n this.$=yy.VerifyType.VERIFY_DEMONSTRATION;\nbreak;\ncase 31:\n this.$=yy.VerifyType.VERIFY_INSPECTION;\nbreak;\ncase 32:\n this.$=yy.VerifyType.VERIFY_TEST;\nbreak;\ncase 33:\n yy.addElement($$[$0-3]) \nbreak;\ncase 34:\n yy.setNewElementType($$[$0-2]); \nbreak;\ncase 35:\n yy.setNewElementDocRef($$[$0-2]); \nbreak;\ncase 38:\n yy.addRelationship($$[$0-2], $$[$0], $$[$0-4]) \nbreak;\ncase 39:\n yy.addRelationship($$[$0-2], $$[$0-4], $$[$0]) \nbreak;\ncase 40:\n this.$=yy.Relationships.CONTAINS;\nbreak;\ncase 41:\n this.$=yy.Relationships.COPIES;\nbreak;\ncase 42:\n this.$=yy.Relationships.DERIVES;\nbreak;\ncase 43:\n this.$=yy.Relationships.SATISFIES;\nbreak;\ncase 44:\n this.$=yy.Relationships.VERIFIES;\nbreak;\ncase 45:\n this.$=yy.Relationships.REFINES;\nbreak;\ncase 46:\n this.$=yy.Relationships.TRACES;\nbreak;\n}\n},\ntable: [{3:1,4:2,6:$V0,9:$V1,11:$V2,13:$V3},{1:[3]},{3:8,4:2,5:[1,7],6:$V0,9:$V1,11:$V2,13:$V3},{5:[1,9]},{10:[1,10]},{12:[1,11]},o($V4,[2,6]),{3:12,4:2,6:$V0,9:$V1,11:$V2,13:$V3},{1:[2,2]},{4:17,5:$V5,7:13,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},o($V4,[2,4]),o($V4,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:$V5,7:31,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{4:17,5:$V5,7:32,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{4:17,5:$V5,7:33,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{4:17,5:$V5,7:34,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{4:17,5:$V5,7:35,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},o($Vg,[2,20]),o($Vg,[2,21]),o($Vg,[2,22]),o($Vg,[2,23]),o($Vg,[2,24]),o($Vg,[2,25]),o($Vh,[2,49]),o($Vh,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:$Vi,56:$Vj,57:$Vk,58:$Vl,59:$Vm,60:$Vn,61:$Vo},{52:54,55:$Vi,56:$Vj,57:$Vk,58:$Vl,59:$Vm,60:$Vn,61:$Vo},{5:[1,55]},{5:[1,56]},{53:[1,57]},o($Vp,[2,40]),o($Vp,[2,41]),o($Vp,[2,42]),o($Vp,[2,43]),o($Vp,[2,44]),o($Vp,[2,45]),o($Vp,[2,46]),{54:[1,58]},{5:$Vq,20:59,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vw,30:$Vx,46:66,47:$Vy,49:$Vz},{23:71,62:$Ve,63:$Vf},{23:72,62:$Ve,63:$Vf},o($VA,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:$Vq,20:77,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},o($VA,[2,19]),o($VA,[2,33]),{22:[1,78]},{22:[1,79]},{5:$Vw,30:$Vx,46:80,47:$Vy,49:$Vz},o($VA,[2,37]),o($VA,[2,38]),o($VA,[2,39]),{23:81,62:$Ve,63:$Vf},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},o($VA,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},o($VA,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:$Vq,20:106,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vq,20:107,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vq,20:108,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vq,20:109,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vw,30:$Vx,46:110,47:$Vy,49:$Vz},{5:$Vw,30:$Vx,46:111,47:$Vy,49:$Vz},o($VA,[2,14]),o($VA,[2,15]),o($VA,[2,16]),o($VA,[2,17]),o($VA,[2,34]),o($VA,[2,35])],\ndefaultActions: {8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 'title';\nbreak;\ncase 1: this.begin(\"acc_title\");return 9; \nbreak;\ncase 2: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 3: this.begin(\"acc_descr\");return 11; \nbreak;\ncase 4: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 5: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 6: this.popState(); \nbreak;\ncase 7:return \"acc_descr_multiline_value\";\nbreak;\ncase 8:return 5;\nbreak;\ncase 9:/* skip all whitespace */\nbreak;\ncase 10:/* skip comments */\nbreak;\ncase 11:/* skip comments */\nbreak;\ncase 12:return 8;\nbreak;\ncase 13:return 6;\nbreak;\ncase 14:return 19;\nbreak;\ncase 15:return 30;\nbreak;\ncase 16:return 22;\nbreak;\ncase 17:return 21;\nbreak;\ncase 18:return 24;\nbreak;\ncase 19:return 26;\nbreak;\ncase 20:return 28;\nbreak;\ncase 21:return 31;\nbreak;\ncase 22:return 32;\nbreak;\ncase 23:return 33;\nbreak;\ncase 24:return 34;\nbreak;\ncase 25:return 35;\nbreak;\ncase 26:return 36;\nbreak;\ncase 27:return 37;\nbreak;\ncase 28:return 38;\nbreak;\ncase 29:return 39;\nbreak;\ncase 30:return 40;\nbreak;\ncase 31:return 41;\nbreak;\ncase 32:return 42;\nbreak;\ncase 33:return 43;\nbreak;\ncase 34:return 44;\nbreak;\ncase 35:return 55;\nbreak;\ncase 36:return 56;\nbreak;\ncase 37:return 57;\nbreak;\ncase 38:return 58;\nbreak;\ncase 39:return 59;\nbreak;\ncase 40:return 60;\nbreak;\ncase 41:return 61;\nbreak;\ncase 42:return 47;\nbreak;\ncase 43:return 49;\nbreak;\ncase 44:return 51;\nbreak;\ncase 45:return 54;\nbreak;\ncase 46:return 53;\nbreak;\ncase 47: this.begin(\"string\"); \nbreak;\ncase 48: this.popState(); \nbreak;\ncase 49: return \"qString\"; \nbreak;\ncase 50: yy_.yytext = yy_.yytext.trim(); return 62;\nbreak;\n}\n},\nrules: [/^(?:title\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:(\\r?\\n)+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\\b)/i,/^(?:\\{)/i,/^(?:\\})/i,/^(?::)/i,/^(?:id\\b)/i,/^(?:text\\b)/i,/^(?:risk\\b)/i,/^(?:verifyMethod\\b)/i,/^(?:requirement\\b)/i,/^(?:functionalRequirement\\b)/i,/^(?:interfaceRequirement\\b)/i,/^(?:performanceRequirement\\b)/i,/^(?:physicalRequirement\\b)/i,/^(?:designConstraint\\b)/i,/^(?:low\\b)/i,/^(?:medium\\b)/i,/^(?:high\\b)/i,/^(?:analysis\\b)/i,/^(?:demonstration\\b)/i,/^(?:inspection\\b)/i,/^(?:test\\b)/i,/^(?:element\\b)/i,/^(?:contains\\b)/i,/^(?:copies\\b)/i,/^(?:derives\\b)/i,/^(?:satisfies\\b)/i,/^(?:verifies\\b)/i,/^(?:refines\\b)/i,/^(?:traces\\b)/i,/^(?:type\\b)/i,/^(?:docref\\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[\\w][^\\r\\n\\{\\<\\>\\-\\=]*)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[6,7],\"inclusive\":false},\"acc_descr\":{\"rules\":[4],\"inclusive\":false},\"acc_title\":{\"rules\":[2],\"inclusive\":false},\"unqString\":{\"rules\":[],\"inclusive\":false},\"token\":{\"rules\":[],\"inclusive\":false},\"string\":{\"rules\":[48,49],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\n\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../common/commonDb.js';\n\nlet relations = [];\nlet latestRequirement = {};\nlet requirements = new Map();\nlet latestElement = {};\nlet elements = new Map();\n\nconst RequirementType = {\n REQUIREMENT: 'Requirement',\n FUNCTIONAL_REQUIREMENT: 'Functional Requirement',\n INTERFACE_REQUIREMENT: 'Interface Requirement',\n PERFORMANCE_REQUIREMENT: 'Performance Requirement',\n PHYSICAL_REQUIREMENT: 'Physical Requirement',\n DESIGN_CONSTRAINT: 'Design Constraint',\n};\n\nconst RiskLevel = {\n LOW_RISK: 'Low',\n MED_RISK: 'Medium',\n HIGH_RISK: 'High',\n};\n\nconst VerifyType = {\n VERIFY_ANALYSIS: 'Analysis',\n VERIFY_DEMONSTRATION: 'Demonstration',\n VERIFY_INSPECTION: 'Inspection',\n VERIFY_TEST: 'Test',\n};\n\nconst Relationships = {\n CONTAINS: 'contains',\n COPIES: 'copies',\n DERIVES: 'derives',\n SATISFIES: 'satisfies',\n VERIFIES: 'verifies',\n REFINES: 'refines',\n TRACES: 'traces',\n};\n\nconst addRequirement = (name, type) => {\n if (!requirements.has(name)) {\n requirements.set(name, {\n name,\n type,\n\n id: latestRequirement.id,\n text: latestRequirement.text,\n risk: latestRequirement.risk,\n verifyMethod: latestRequirement.verifyMethod,\n });\n }\n latestRequirement = {};\n\n return requirements.get(name);\n};\n\nconst getRequirements = () => requirements;\n\nconst setNewReqId = (id) => {\n if (latestRequirement !== undefined) {\n latestRequirement.id = id;\n }\n};\n\nconst setNewReqText = (text) => {\n if (latestRequirement !== undefined) {\n latestRequirement.text = text;\n }\n};\n\nconst setNewReqRisk = (risk) => {\n if (latestRequirement !== undefined) {\n latestRequirement.risk = risk;\n }\n};\n\nconst setNewReqVerifyMethod = (verifyMethod) => {\n if (latestRequirement !== undefined) {\n latestRequirement.verifyMethod = verifyMethod;\n }\n};\n\nconst addElement = (name) => {\n if (!elements.has(name)) {\n elements.set(name, {\n name,\n type: latestElement.type,\n docRef: latestElement.docRef,\n });\n log.info('Added new requirement: ', name);\n }\n latestElement = {};\n\n return elements.get(name);\n};\n\nconst getElements = () => elements;\n\nconst setNewElementType = (type) => {\n if (latestElement !== undefined) {\n latestElement.type = type;\n }\n};\n\nconst setNewElementDocRef = (docRef) => {\n if (latestElement !== undefined) {\n latestElement.docRef = docRef;\n }\n};\n\nconst addRelationship = (type, src, dst) => {\n relations.push({\n type,\n src,\n dst,\n });\n};\n\nconst getRelationships = () => relations;\n\nconst clear = () => {\n relations = [];\n latestRequirement = {};\n requirements = new Map();\n latestElement = {};\n elements = new Map();\n commonClear();\n};\n\nexport default {\n RequirementType,\n RiskLevel,\n VerifyType,\n Relationships,\n\n getConfig: () => getConfig().req,\n\n addRequirement,\n getRequirements,\n setNewReqId,\n setNewReqText,\n setNewReqRisk,\n setNewReqVerifyMethod,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n\n addElement,\n getElements,\n setNewElementType,\n setNewElementDocRef,\n\n addRelationship,\n getRelationships,\n\n clear,\n};\n", "const getStyles = (options) => `\n\n marker {\n fill: ${options.relationColor};\n stroke: ${options.relationColor};\n }\n\n marker.cross {\n stroke: ${options.lineColor};\n }\n\n svg {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n }\n\n .reqBox {\n fill: ${options.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${options.requirementBorderColor};\n stroke-width: ${options.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${options.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${options.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${options.requirementBorderColor};\n stroke-width: ${options.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${options.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${options.relationLabelColor};\n }\n\n`;\n// fill', conf.rect_fill)\nexport default getStyles;\n", "const ReqMarkers = {\n CONTAINS: 'contains',\n ARROW: 'arrow',\n};\n\nconst insertLineEndings = (parentNode, conf) => {\n let containsNode = parentNode\n .append('defs')\n .append('marker')\n .attr('id', ReqMarkers.CONTAINS + '_line_ending')\n .attr('refX', 0)\n .attr('refY', conf.line_height / 2)\n .attr('markerWidth', conf.line_height)\n .attr('markerHeight', conf.line_height)\n .attr('orient', 'auto')\n .append('g');\n\n containsNode\n .append('circle')\n .attr('cx', conf.line_height / 2)\n .attr('cy', conf.line_height / 2)\n .attr('r', conf.line_height / 2)\n // .attr('stroke', conf.rect_border_color)\n // .attr('stroke-width', 1)\n .attr('fill', 'none');\n\n containsNode\n .append('line')\n .attr('x1', 0)\n .attr('x2', conf.line_height)\n .attr('y1', conf.line_height / 2)\n .attr('y2', conf.line_height / 2)\n // .attr('stroke', conf.rect_border_color)\n .attr('stroke-width', 1);\n\n containsNode\n .append('line')\n .attr('y1', 0)\n .attr('y2', conf.line_height)\n .attr('x1', conf.line_height / 2)\n .attr('x2', conf.line_height / 2)\n // .attr('stroke', conf.rect_border_color)\n .attr('stroke-width', 1);\n\n parentNode\n .append('defs')\n .append('marker')\n .attr('id', ReqMarkers.ARROW + '_line_ending')\n .attr('refX', conf.line_height)\n .attr('refY', 0.5 * conf.line_height)\n .attr('markerWidth', conf.line_height)\n .attr('markerHeight', conf.line_height)\n .attr('orient', 'auto')\n .append('path')\n .attr(\n 'd',\n `M0,0\n L${conf.line_height},${conf.line_height / 2}\n M${conf.line_height},${conf.line_height / 2}\n L0,${conf.line_height}`\n )\n .attr('stroke-width', 1);\n // .attr('stroke', conf.rect_border_color);\n};\n\nexport default {\n ReqMarkers,\n insertLineEndings,\n};\n", "import { line, select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport common from '../common/common.js';\nimport markers from './requirementMarkers.js';\n\nlet conf = {};\nlet relCnt = 0;\n\nconst newRectNode = (parentNode, id) => {\n return parentNode\n .insert('rect', '#' + id)\n .attr('class', 'req reqBox')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', conf.rect_min_width + 'px')\n .attr('height', conf.rect_min_height + 'px');\n};\n\nconst newTitleNode = (parentNode, id, txts) => {\n let x = conf.rect_min_width / 2;\n\n let title = parentNode\n .append('text')\n .attr('class', 'req reqLabel reqTitle')\n .attr('id', id)\n .attr('x', x)\n .attr('y', conf.rect_padding)\n .attr('dominant-baseline', 'hanging');\n // .attr(\n // 'style',\n // 'font-family: ' + configApi.getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n // )\n let i = 0;\n txts.forEach((textStr) => {\n if (i == 0) {\n title\n .append('tspan')\n .attr('text-anchor', 'middle')\n .attr('x', conf.rect_min_width / 2)\n .attr('dy', 0)\n .text(textStr);\n } else {\n title\n .append('tspan')\n .attr('text-anchor', 'middle')\n .attr('x', conf.rect_min_width / 2)\n .attr('dy', conf.line_height * 0.75)\n .text(textStr);\n }\n i++;\n });\n\n let yPadding = 1.5 * conf.rect_padding;\n let linePadding = i * conf.line_height * 0.75;\n let totalY = yPadding + linePadding;\n\n parentNode\n .append('line')\n .attr('class', 'req-title-line')\n .attr('x1', '0')\n .attr('x2', conf.rect_min_width)\n .attr('y1', totalY)\n .attr('y2', totalY);\n\n return {\n titleNode: title,\n y: totalY,\n };\n};\n\nconst newBodyNode = (parentNode, id, txts, yStart) => {\n let body = parentNode\n .append('text')\n .attr('class', 'req reqLabel')\n .attr('id', id)\n .attr('x', conf.rect_padding)\n .attr('y', yStart)\n .attr('dominant-baseline', 'hanging');\n // .attr(\n // 'style',\n // 'font-family: ' + configApi.getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n // );\n\n let currentRow = 0;\n const charLimit = 30;\n let wrappedTxts = [];\n txts.forEach((textStr) => {\n let currentTextLen = textStr.length;\n while (currentTextLen > charLimit && currentRow < 3) {\n let firstPart = textStr.substring(0, charLimit);\n textStr = textStr.substring(charLimit, textStr.length);\n currentTextLen = textStr.length;\n wrappedTxts[wrappedTxts.length] = firstPart;\n currentRow++;\n }\n if (currentRow == 3) {\n let lastStr = wrappedTxts[wrappedTxts.length - 1];\n wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + '...';\n } else {\n wrappedTxts[wrappedTxts.length] = textStr;\n }\n currentRow = 0;\n });\n\n wrappedTxts.forEach((textStr) => {\n body.append('tspan').attr('x', conf.rect_padding).attr('dy', conf.line_height).text(textStr);\n });\n\n return body;\n};\n\nconst addEdgeLabel = (parentNode, svgPath, conf, txt) => {\n // Find the half-way point\n const len = svgPath.node().getTotalLength();\n const labelPoint = svgPath.node().getPointAtLength(len * 0.5);\n\n // Append a text node containing the label\n const labelId = 'rel' + relCnt;\n relCnt++;\n\n const labelNode = parentNode\n .append('text')\n .attr('class', 'req relationshipLabel')\n .attr('id', labelId)\n .attr('x', labelPoint.x)\n .attr('y', labelPoint.y)\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n // .attr('style', 'font-family: ' + conf.fontFamily + '; font-size: ' + conf.fontSize + 'px')\n .text(txt);\n\n // Figure out how big the opaque 'container' rectangle needs to be\n const labelBBox = labelNode.node().getBBox();\n\n // Insert the opaque rectangle before the text label\n parentNode\n .insert('rect', '#' + labelId)\n .attr('class', 'req reqLabelBox')\n .attr('x', labelPoint.x - labelBBox.width / 2)\n .attr('y', labelPoint.y - labelBBox.height / 2)\n .attr('width', labelBBox.width)\n .attr('height', labelBBox.height)\n .attr('fill', 'white')\n .attr('fill-opacity', '85%');\n};\n\nconst drawRelationshipFromLayout = function (svg, rel, g, insert, diagObj) {\n // Find the edge relating to this relationship\n const edge = g.edge(elementString(rel.src), elementString(rel.dst));\n\n // Get a function that will generate the line path\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n });\n\n // Insert the line at the right place\n const svgPath = svg\n .insert('path', '#' + insert)\n .attr('class', 'er relationshipLine')\n .attr('d', lineFunction(edge.points))\n .attr('fill', 'none');\n\n if (rel.type == diagObj.db.Relationships.CONTAINS) {\n svgPath.attr(\n 'marker-start',\n 'url(' + common.getUrl(conf.arrowMarkerAbsolute) + '#' + rel.type + '_line_ending' + ')'\n );\n } else {\n svgPath.attr('stroke-dasharray', '10,7');\n svgPath.attr(\n 'marker-end',\n 'url(' +\n common.getUrl(conf.arrowMarkerAbsolute) +\n '#' +\n markers.ReqMarkers.ARROW +\n '_line_ending' +\n ')'\n );\n }\n\n addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`);\n\n return;\n};\n\n/**\n * @param {Map} reqs\n * @param graph\n * @param svgNode\n */\nexport const drawReqs = (reqs, graph, svgNode) => {\n reqs.forEach((req, reqName) => {\n reqName = elementString(reqName);\n log.info('Added new requirement: ', reqName);\n\n const groupNode = svgNode.append('g').attr('id', reqName);\n const textId = 'req-' + reqName;\n const rectNode = newRectNode(groupNode, textId);\n\n let nodes = [];\n\n let titleNodeInfo = newTitleNode(groupNode, reqName + '_title', [\n `<<${req.type}>>`,\n `${req.name}`,\n ]);\n\n nodes.push(titleNodeInfo.titleNode);\n\n let bodyNode = newBodyNode(\n groupNode,\n reqName + '_body',\n [\n `Id: ${req.id}`,\n `Text: ${req.text}`,\n `Risk: ${req.risk}`,\n `Verification: ${req.verifyMethod}`,\n ],\n titleNodeInfo.y\n );\n\n nodes.push(bodyNode);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph\n graph.setNode(reqName, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: reqName,\n });\n });\n};\n\n/**\n * @param {Map} els\n * @param graph\n * @param svgNode\n */\nexport const drawElements = (els, graph, svgNode) => {\n els.forEach((el, elName) => {\n const id = elementString(elName);\n\n const groupNode = svgNode.append('g').attr('id', id);\n const textId = 'element-' + id;\n const rectNode = newRectNode(groupNode, textId);\n\n let nodes = [];\n\n let titleNodeInfo = newTitleNode(groupNode, textId + '_title', [`<>`, `${elName}`]);\n\n nodes.push(titleNodeInfo.titleNode);\n\n let bodyNode = newBodyNode(\n groupNode,\n textId + '_body',\n [`Type: ${el.type || 'Not Specified'}`, `Doc Ref: ${el.docRef || 'None'}`],\n titleNodeInfo.y\n );\n\n nodes.push(bodyNode);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph\n graph.setNode(id, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: id,\n });\n });\n};\n\nconst addRelationships = (relationships, g) => {\n relationships.forEach(function (r) {\n let src = elementString(r.src);\n let dst = elementString(r.dst);\n g.setEdge(src, dst, { relationship: r });\n });\n return relationships;\n};\n\nconst adjustEntities = function (svgNode, graph) {\n graph.nodes().forEach(function (v) {\n if (v !== undefined && graph.node(v) !== undefined) {\n svgNode.select('#' + v);\n svgNode\n .select('#' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y - graph.node(v).height / 2) +\n ' )'\n );\n }\n });\n return;\n};\n\nconst elementString = (str) => {\n return str.replace(/\\s/g, '').replace(/\\./g, '_');\n};\n\nexport const draw = (text, id, _version, diagObj) => {\n conf = getConfig().requirement;\n\n const securityLevel = conf.securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n const svg = root.select(`[id='${id}']`);\n markers.insertLineEndings(svg, conf);\n\n const g = new graphlib.Graph({\n multigraph: false,\n compound: false,\n directed: true,\n })\n .setGraph({\n rankdir: conf.layoutDirection,\n marginx: 20,\n marginy: 20,\n nodesep: 100,\n edgesep: 100,\n ranksep: 100,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n let requirements = diagObj.db.getRequirements();\n let elements = diagObj.db.getElements();\n let relationships = diagObj.db.getRelationships();\n\n drawReqs(requirements, g, svg);\n drawElements(elements, g, svg);\n addRelationships(relationships, g);\n dagreLayout(g);\n adjustEntities(svg, g);\n\n relationships.forEach(function (rel) {\n drawRelationshipFromLayout(svg, rel, g, id, diagObj);\n });\n\n const padding = conf.rect_padding;\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(svg, height, width, conf.useMaxWidth);\n\n svg.attr('viewBox', `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);\n};\n\n// cspell:ignore txts\n\nexport default {\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/requirementDiagram.jison';\nimport db from './requirementDb.js';\nimport styles from './styles.js';\nimport renderer from './requirementRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,13],$V7=[1,14],$V8=[1,16],$V9=[1,17],$Va=[1,18],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,29],$Vh=[1,30],$Vi=[1,31],$Vj=[1,32],$Vk=[1,33],$Vl=[1,34],$Vm=[1,35],$Vn=[1,36],$Vo=[1,37],$Vp=[1,38],$Vq=[1,39],$Vr=[1,41],$Vs=[1,42],$Vt=[1,43],$Vu=[1,44],$Vv=[1,45],$Vw=[1,46],$Vx=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],$Vy=[4,5,16,50,52,53],$Vz=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$VA=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],$VB=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],$VC=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],$VD=[68,69,70],$VE=[1,122];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SPACE\":4,\"NEWLINE\":5,\"SD\":6,\"document\":7,\"line\":8,\"statement\":9,\"box_section\":10,\"box_line\":11,\"participant_statement\":12,\"create\":13,\"box\":14,\"restOfLine\":15,\"end\":16,\"signal\":17,\"autonumber\":18,\"NUM\":19,\"off\":20,\"activate\":21,\"actor\":22,\"deactivate\":23,\"note_statement\":24,\"links_statement\":25,\"link_statement\":26,\"properties_statement\":27,\"details_statement\":28,\"title\":29,\"legacy_title\":30,\"acc_title\":31,\"acc_title_value\":32,\"acc_descr\":33,\"acc_descr_value\":34,\"acc_descr_multiline_value\":35,\"loop\":36,\"rect\":37,\"opt\":38,\"alt\":39,\"else_sections\":40,\"par\":41,\"par_sections\":42,\"par_over\":43,\"critical\":44,\"option_sections\":45,\"break\":46,\"option\":47,\"and\":48,\"else\":49,\"participant\":50,\"AS\":51,\"participant_actor\":52,\"destroy\":53,\"note\":54,\"placement\":55,\"text2\":56,\"over\":57,\"actor_pair\":58,\"links\":59,\"link\":60,\"properties\":61,\"details\":62,\"spaceList\":63,\",\":64,\"left_of\":65,\"right_of\":66,\"signaltype\":67,\"+\":68,\"-\":69,\"ACTOR\":70,\"SOLID_OPEN_ARROW\":71,\"DOTTED_OPEN_ARROW\":72,\"SOLID_ARROW\":73,\"BIDIRECTIONAL_SOLID_ARROW\":74,\"DOTTED_ARROW\":75,\"BIDIRECTIONAL_DOTTED_ARROW\":76,\"SOLID_CROSS\":77,\"DOTTED_CROSS\":78,\"SOLID_POINT\":79,\"DOTTED_POINT\":80,\"TXT\":81,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACE\",5:\"NEWLINE\",6:\"SD\",13:\"create\",14:\"box\",15:\"restOfLine\",16:\"end\",18:\"autonumber\",19:\"NUM\",20:\"off\",21:\"activate\",23:\"deactivate\",29:\"title\",30:\"legacy_title\",31:\"acc_title\",32:\"acc_title_value\",33:\"acc_descr\",34:\"acc_descr_value\",35:\"acc_descr_multiline_value\",36:\"loop\",37:\"rect\",38:\"opt\",39:\"alt\",41:\"par\",43:\"par_over\",44:\"critical\",46:\"break\",47:\"option\",48:\"and\",49:\"else\",50:\"participant\",51:\"AS\",52:\"participant_actor\",53:\"destroy\",54:\"note\",57:\"over\",59:\"links\",60:\"link\",61:\"properties\",62:\"details\",64:\",\",65:\"left_of\",66:\"right_of\",68:\"+\",69:\"-\",70:\"ACTOR\",71:\"SOLID_OPEN_ARROW\",72:\"DOTTED_OPEN_ARROW\",73:\"SOLID_ARROW\",74:\"BIDIRECTIONAL_SOLID_ARROW\",75:\"DOTTED_ARROW\",76:\"BIDIRECTIONAL_DOTTED_ARROW\",77:\"SOLID_CROSS\",78:\"DOTTED_CROSS\",79:\"SOLID_POINT\",80:\"DOTTED_POINT\",81:\"TXT\"},\nproductions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 3:\n yy.apply($$[$0]);return $$[$0]; \nbreak;\ncase 4: case 9:\n this.$ = [] \nbreak;\ncase 5: case 10:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 6: case 7: case 11: case 12:\n this.$ = $$[$0] \nbreak;\ncase 8: case 13:\n this.$=[]; \nbreak;\ncase 15:\n$$[$0].type='createParticipant'; this.$=$$[$0];\nbreak;\ncase 16:\n\n\t\t$$[$0-1].unshift({type: 'boxStart', boxData:yy.parseBoxData($$[$0-2]) });\n\t\t$$[$0-1].push({type: 'boxEnd', boxText:$$[$0-2]});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 18:\n this.$= {type:'sequenceIndex',sequenceIndex: Number($$[$0-2]), sequenceIndexStep:Number($$[$0-1]), sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER};\nbreak;\ncase 19:\n this.$ = {type:'sequenceIndex',sequenceIndex: Number($$[$0-1]), sequenceIndexStep:1, sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER};\nbreak;\ncase 20:\n this.$ = {type:'sequenceIndex', sequenceVisible:false, signalType:yy.LINETYPE.AUTONUMBER};\nbreak;\ncase 21:\nthis.$ = {type:'sequenceIndex', sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER}; \nbreak;\ncase 22:\nthis.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1].actor};\nbreak;\ncase 23:\nthis.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1].actor};\nbreak;\ncase 29:\nyy.setDiagramTitle($$[$0].substring(6));this.$=$$[$0].substring(6);\nbreak;\ncase 30:\nyy.setDiagramTitle($$[$0].substring(7));this.$=$$[$0].substring(7);\nbreak;\ncase 31:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 32: case 33:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 34:\n\n\t\t$$[$0-1].unshift({type: 'loopStart', loopText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.LOOP_START});\n\t\t$$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 35:\n\n\t\t$$[$0-1].unshift({type: 'rectStart', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_START });\n\t\t$$[$0-1].push({type: 'rectEnd', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_END });\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 36:\n\n\t\t$$[$0-1].unshift({type: 'optStart', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_START});\n\t\t$$[$0-1].push({type: 'optEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 37:\n\n\t\t// Alt start\n\t\t$$[$0-1].unshift({type: 'altStart', altText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.ALT_START});\n\t\t// Content in alt is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 38:\n\n\t\t// Parallel start\n\t\t$$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_START});\n\t\t// Content in par is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 39:\n\n\t\t// Parallel (overlapped) start\n\t\t$$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_OVER_START});\n\t\t// Content in par is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 40:\n\n\t\t// critical start\n\t\t$$[$0-1].unshift({type: 'criticalStart', criticalText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.CRITICAL_START});\n\t\t// Content in critical is already in $$[$0-1]\n\t\t// critical end\n\t\t$$[$0-1].push({type: 'criticalEnd', signalType: yy.LINETYPE.CRITICAL_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 41:\n\n\t\t$$[$0-1].unshift({type: 'breakStart', breakText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.BREAK_START});\n\t\t$$[$0-1].push({type: 'breakEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.BREAK_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 43:\n this.$ = $$[$0-3].concat([{type: 'option', optionText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.CRITICAL_OPTION}, $$[$0]]); \nbreak;\ncase 45:\n this.$ = $$[$0-3].concat([{type: 'and', parText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.PAR_AND}, $$[$0]]); \nbreak;\ncase 47:\n this.$ = $$[$0-3].concat([{type: 'else', altText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]); \nbreak;\ncase 48:\n$$[$0-3].draw='participant'; $$[$0-3].type='addParticipant';$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3];\nbreak;\ncase 49:\n$$[$0-1].draw='participant'; $$[$0-1].type='addParticipant';this.$=$$[$0-1];\nbreak;\ncase 50:\n$$[$0-3].draw='actor'; $$[$0-3].type='addParticipant';$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3];\nbreak;\ncase 51:\n$$[$0-1].draw='actor'; $$[$0-1].type='addParticipant'; this.$=$$[$0-1];\nbreak;\ncase 52:\n$$[$0-1].type='destroyParticipant'; this.$=$$[$0-1];\nbreak;\ncase 53:\n\n\t\tthis.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}];\nbreak;\ncase 54:\n\n\t\t// Coerce actor_pair into a [to, from, ...] array\n\t\t$$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2);\n\t\t$$[$0-2][0] = $$[$0-2][0].actor;\n\t\t$$[$0-2][1] = $$[$0-2][1].actor;\n\t\tthis.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}];\nbreak;\ncase 55:\n\n\t\tthis.$ = [$$[$0-1], {type:'addLinks', actor:$$[$0-1].actor, text:$$[$0]}];\n \nbreak;\ncase 56:\n\n\t\tthis.$ = [$$[$0-1], {type:'addALink', actor:$$[$0-1].actor, text:$$[$0]}];\n \nbreak;\ncase 57:\n\n\t\tthis.$ = [$$[$0-1], {type:'addProperties', actor:$$[$0-1].actor, text:$$[$0]}];\n \nbreak;\ncase 58:\n\n\t\tthis.$ = [$$[$0-1], {type:'addDetails', actor:$$[$0-1].actor, text:$$[$0]}];\n \nbreak;\ncase 61:\n this.$ = [$$[$0-2], $$[$0]]; \nbreak;\ncase 62:\n this.$ = $$[$0]; \nbreak;\ncase 63:\n this.$ = yy.PLACEMENT.LEFTOF; \nbreak;\ncase 64:\n this.$ = yy.PLACEMENT.RIGHTOF; \nbreak;\ncase 65:\n this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0], activate: true},\n\t {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1].actor}\n\t ]\nbreak;\ncase 66:\n this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},\n\t {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4].actor}\n\t ]\nbreak;\ncase 67:\n this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}]\nbreak;\ncase 68:\nthis.$={ type: 'addParticipant', actor:$$[$0]}\nbreak;\ncase 69:\n this.$ = yy.LINETYPE.SOLID_OPEN; \nbreak;\ncase 70:\n this.$ = yy.LINETYPE.DOTTED_OPEN; \nbreak;\ncase 71:\n this.$ = yy.LINETYPE.SOLID; \nbreak;\ncase 72:\n this.$ = yy.LINETYPE.BIDIRECTIONAL_SOLID; \nbreak;\ncase 73:\n this.$ = yy.LINETYPE.DOTTED; \nbreak;\ncase 74:\n this.$ = yy.LINETYPE.BIDIRECTIONAL_DOTTED; \nbreak;\ncase 75:\n this.$ = yy.LINETYPE.SOLID_CROSS; \nbreak;\ncase 76:\n this.$ = yy.LINETYPE.DOTTED_CROSS; \nbreak;\ncase 77:\n this.$ = yy.LINETYPE.SOLID_POINT; \nbreak;\ncase 78:\n this.$ = yy.LINETYPE.DOTTED_POINT; \nbreak;\ncase 79:\nthis.$ = yy.parseMessage($$[$0].trim().substring(1)) \nbreak;\n}\n},\ntable: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},o($Vx,[2,5]),{9:47,12:12,13:$V6,14:$V7,17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},o($Vx,[2,7]),o($Vx,[2,8]),o($Vx,[2,14]),{12:48,50:$Vo,52:$Vp,53:$Vq},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:$Vw},{22:55,70:$Vw},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},o($Vx,[2,29]),o($Vx,[2,30]),{32:[1,61]},{34:[1,62]},o($Vx,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:$Vw},{22:72,70:$Vw},{22:73,70:$Vw},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:$Vw},{22:90,70:$Vw},{22:91,70:$Vw},{22:92,70:$Vw},o([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),o($Vx,[2,6]),o($Vx,[2,15]),o($Vy,[2,9],{10:93}),o($Vx,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},o($Vx,[2,21]),{5:[1,97]},{5:[1,98]},o($Vx,[2,24]),o($Vx,[2,25]),o($Vx,[2,26]),o($Vx,[2,27]),o($Vx,[2,28]),o($Vx,[2,31]),o($Vx,[2,32]),o($Vz,$V3,{7:99}),o($Vz,$V3,{7:100}),o($Vz,$V3,{7:101}),o($VA,$V3,{40:102,7:103}),o($VB,$V3,{42:104,7:105}),o($VB,$V3,{7:105,42:106}),o($VC,$V3,{45:107,7:108}),o($Vz,$V3,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:$Vw},o($VD,[2,69]),o($VD,[2,70]),o($VD,[2,71]),o($VD,[2,72]),o($VD,[2,73]),o($VD,[2,74]),o($VD,[2,75]),o($VD,[2,76]),o($VD,[2,77]),o($VD,[2,78]),{22:118,70:$Vw},{22:120,58:119,70:$Vw},{70:[2,63]},{70:[2,64]},{56:121,81:$VE},{56:123,81:$VE},{56:124,81:$VE},{56:125,81:$VE},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:$Vo,52:$Vp,53:$Vq},{5:[1,131]},o($Vx,[2,19]),o($Vx,[2,20]),o($Vx,[2,22]),o($Vx,[2,23]),{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,132],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,133],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,134],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{16:[1,135]},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[2,46],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,49:[1,136],50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{16:[1,137]},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[2,44],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,48:[1,138],50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{16:[1,139]},{16:[1,140]},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[2,42],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,47:[1,141],50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,142],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{15:[1,143]},o($Vx,[2,49]),{15:[1,144]},o($Vx,[2,51]),o($Vx,[2,52]),{22:145,70:$Vw},{22:146,70:$Vw},{56:147,81:$VE},{56:148,81:$VE},{56:149,81:$VE},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},o($Vx,[2,16]),o($Vy,[2,10]),{12:151,50:$Vo,52:$Vp,53:$Vq},o($Vy,[2,12]),o($Vy,[2,13]),o($Vx,[2,18]),o($Vx,[2,34]),o($Vx,[2,35]),o($Vx,[2,36]),o($Vx,[2,37]),{15:[1,152]},o($Vx,[2,38]),{15:[1,153]},o($Vx,[2,39]),o($Vx,[2,40]),{15:[1,154]},o($Vx,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:$VE},{56:158,81:$VE},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:$Vw},o($Vy,[2,11]),o($VA,$V3,{7:103,40:160}),o($VB,$V3,{7:105,42:161}),o($VC,$V3,{7:108,45:162}),o($Vx,[2,48]),o($Vx,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],\ndefaultActions: {5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 5;\nbreak;\ncase 1:/* skip all whitespace */\nbreak;\ncase 2:/* skip same-line whitespace */\nbreak;\ncase 3:/* skip comments */\nbreak;\ncase 4:/* skip comments */\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:return 19;\nbreak;\ncase 7: this.begin('LINE'); return 14; \nbreak;\ncase 8: this.begin('ID'); return 50; \nbreak;\ncase 9: this.begin('ID'); return 52; \nbreak;\ncase 10:return 13;\nbreak;\ncase 11: this.begin('ID'); return 53; \nbreak;\ncase 12: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 70; \nbreak;\ncase 13: this.popState(); this.popState(); this.begin('LINE'); return 51; \nbreak;\ncase 14: this.popState(); this.popState(); return 5; \nbreak;\ncase 15: this.begin('LINE'); return 36; \nbreak;\ncase 16: this.begin('LINE'); return 37; \nbreak;\ncase 17: this.begin('LINE'); return 38; \nbreak;\ncase 18: this.begin('LINE'); return 39; \nbreak;\ncase 19: this.begin('LINE'); return 49; \nbreak;\ncase 20: this.begin('LINE'); return 41; \nbreak;\ncase 21: this.begin('LINE'); return 43; \nbreak;\ncase 22: this.begin('LINE'); return 48; \nbreak;\ncase 23: this.begin('LINE'); return 44; \nbreak;\ncase 24: this.begin('LINE'); return 47; \nbreak;\ncase 25: this.begin('LINE'); return 46; \nbreak;\ncase 26: this.popState(); return 15; \nbreak;\ncase 27:return 16;\nbreak;\ncase 28:return 65;\nbreak;\ncase 29:return 66;\nbreak;\ncase 30:return 59;\nbreak;\ncase 31:return 60;\nbreak;\ncase 32:return 61;\nbreak;\ncase 33:return 62;\nbreak;\ncase 34:return 57;\nbreak;\ncase 35:return 54;\nbreak;\ncase 36: this.begin('ID'); return 21; \nbreak;\ncase 37: this.begin('ID'); return 23; \nbreak;\ncase 38:return 29;\nbreak;\ncase 39:return 30;\nbreak;\ncase 40: this.begin(\"acc_title\");return 31; \nbreak;\ncase 41: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 42: this.begin(\"acc_descr\");return 33; \nbreak;\ncase 43: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 44: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 45: this.popState(); \nbreak;\ncase 46:return \"acc_descr_multiline_value\";\nbreak;\ncase 47:return 6;\nbreak;\ncase 48:return 18;\nbreak;\ncase 49:return 20;\nbreak;\ncase 50:return 64;\nbreak;\ncase 51:return 5;\nbreak;\ncase 52: yy_.yytext = yy_.yytext.trim(); return 70; \nbreak;\ncase 53:return 73;\nbreak;\ncase 54:return 74;\nbreak;\ncase 55:return 75;\nbreak;\ncase 56:return 76;\nbreak;\ncase 57:return 71;\nbreak;\ncase 58:return 72;\nbreak;\ncase 59:return 77;\nbreak;\ncase 60:return 78;\nbreak;\ncase 61:return 79;\nbreak;\ncase 62:return 80;\nbreak;\ncase 63:return 81;\nbreak;\ncase 64:return 68;\nbreak;\ncase 65:return 69;\nbreak;\ncase 66:return 5;\nbreak;\ncase 67:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[0-9]+(?=[ \\n]+))/i,/^(?:box\\b)/i,/^(?:participant\\b)/i,/^(?:actor\\b)/i,/^(?:create\\b)/i,/^(?:destroy\\b)/i,/^(?:[^\\<->\\->:\\n,;]+?([\\-]*[^\\<->\\->:\\n,;]+?)*?(?=((?!\\n)\\s)+as(?!\\n)\\s|[#\\n;]|$))/i,/^(?:as\\b)/i,/^(?:(?:))/i,/^(?:loop\\b)/i,/^(?:rect\\b)/i,/^(?:opt\\b)/i,/^(?:alt\\b)/i,/^(?:else\\b)/i,/^(?:par\\b)/i,/^(?:par_over\\b)/i,/^(?:and\\b)/i,/^(?:critical\\b)/i,/^(?:option\\b)/i,/^(?:break\\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\\n;]*)/i,/^(?:end\\b)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:links\\b)/i,/^(?:link\\b)/i,/^(?:properties\\b)/i,/^(?:details\\b)/i,/^(?:over\\b)/i,/^(?:note\\b)/i,/^(?:activate\\b)/i,/^(?:deactivate\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:title:\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:sequenceDiagram\\b)/i,/^(?:autonumber\\b)/i,/^(?:off\\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\\+\\<->\\->:\\n,;]+((?!(-x|--x|-\\)|--\\)))[\\-]*[^\\+\\<->\\->:\\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\\)])/i,/^(?:--[\\)])/i,/^(?::(?:(?:no)?wrap)?[^#\\n;]+)/i,/^(?:\\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[45,46],\"inclusive\":false},\"acc_descr\":{\"rules\":[43],\"inclusive\":false},\"acc_title\":{\"rules\":[41],\"inclusive\":false},\"ID\":{\"rules\":[2,3,12],\"inclusive\":false},\"ALIAS\":{\"rules\":[2,3,13,14],\"inclusive\":false},\"LINE\":{\"rules\":[2,3,26],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport { ImperativeState } from '../../utils/imperativeState.js';\nimport { sanitizeText } from '../common/common.js';\nimport {\n clear as commonClear,\n getAccDescription,\n getAccTitle,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n} from '../common/commonDb.js';\nimport type { Actor, AddMessageParams, Box, Message, Note } from './types.js';\n\ninterface SequenceState {\n prevActor?: string;\n actors: Map;\n createdActors: Map;\n destroyedActors: Map;\n boxes: Box[];\n messages: Message[];\n notes: Note[];\n sequenceNumbersEnabled: boolean;\n wrapEnabled?: boolean;\n currentBox?: Box;\n lastCreated?: Actor;\n lastDestroyed?: Actor;\n}\n\nconst state = new ImperativeState(() => ({\n prevActor: undefined,\n actors: new Map(),\n createdActors: new Map(),\n destroyedActors: new Map(),\n boxes: [],\n messages: [],\n notes: [],\n sequenceNumbersEnabled: false,\n wrapEnabled: undefined,\n currentBox: undefined,\n lastCreated: undefined,\n lastDestroyed: undefined,\n}));\n\nexport const addBox = function (data: { text: string; color: string; wrap: boolean }) {\n state.records.boxes.push({\n name: data.text,\n wrap: data.wrap ?? autoWrap(),\n fill: data.color,\n actorKeys: [],\n });\n state.records.currentBox = state.records.boxes.slice(-1)[0];\n};\n\nexport const addActor = function (\n id: string,\n name: string,\n description: { text: string; wrap?: boolean | null; type: string },\n type: string\n) {\n let assignedBox = state.records.currentBox;\n const old = state.records.actors.get(id);\n if (old) {\n // If already set and trying to set to a new one throw error\n if (state.records.currentBox && old.box && state.records.currentBox !== old.box) {\n throw new Error(\n `A same participant should only be defined in one Box: ${old.name} can't be in '${old.box.name}' and in '${state.records.currentBox.name}' at the same time.`\n );\n }\n\n // Don't change the box if already\n assignedBox = old.box ? old.box : state.records.currentBox;\n old.box = assignedBox;\n\n // Don't allow description nulling\n if (old && name === old.name && description == null) {\n return;\n }\n }\n\n // Don't allow null descriptions, either\n if (description?.text == null) {\n description = { text: name, type };\n }\n if (type == null || description.text == null) {\n description = { text: name, type };\n }\n\n state.records.actors.set(id, {\n box: assignedBox,\n name: name,\n description: description.text,\n wrap: description.wrap ?? autoWrap(),\n prevActor: state.records.prevActor,\n links: {},\n properties: {},\n actorCnt: null,\n rectData: null,\n type: type ?? 'participant',\n });\n if (state.records.prevActor) {\n const prevActorInRecords = state.records.actors.get(state.records.prevActor);\n if (prevActorInRecords) {\n prevActorInRecords.nextActor = id;\n }\n }\n\n if (state.records.currentBox) {\n state.records.currentBox.actorKeys.push(id);\n }\n state.records.prevActor = id;\n};\n\nconst activationCount = (part: string) => {\n let i;\n let count = 0;\n if (!part) {\n return 0;\n }\n for (i = 0; i < state.records.messages.length; i++) {\n if (\n state.records.messages[i].type === LINETYPE.ACTIVE_START &&\n state.records.messages[i].from === part\n ) {\n count++;\n }\n if (\n state.records.messages[i].type === LINETYPE.ACTIVE_END &&\n state.records.messages[i].from === part\n ) {\n count--;\n }\n }\n return count;\n};\n\nexport const addMessage = function (\n idFrom: Message['from'],\n idTo: Message['to'],\n message: { text: string; wrap?: boolean },\n answer: Message['answer']\n) {\n state.records.messages.push({\n from: idFrom,\n to: idTo,\n message: message.text,\n wrap: message.wrap ?? autoWrap(),\n answer: answer,\n });\n};\n\nexport const addSignal = function (\n idFrom?: Message['from'],\n idTo?: Message['to'],\n message?: { text: string; wrap: boolean },\n messageType?: number,\n activate = false\n) {\n if (messageType === LINETYPE.ACTIVE_END) {\n const cnt = activationCount(idFrom ?? '');\n if (cnt < 1) {\n // Bail out as there is an activation signal from an inactive participant\n const error = new Error('Trying to inactivate an inactive participant (' + idFrom + ')');\n\n // @ts-ignore: we are passing hash param to the error object, however we should define our own custom error class to make it type safe\n error.hash = {\n text: '->>-',\n token: '->>-',\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: [\"'ACTIVE_PARTICIPANT'\"],\n };\n throw error;\n }\n }\n state.records.messages.push({\n from: idFrom,\n to: idTo,\n message: message?.text ?? '',\n wrap: message?.wrap ?? autoWrap(),\n type: messageType,\n activate,\n });\n return true;\n};\n\nexport const hasAtLeastOneBox = function () {\n return state.records.boxes.length > 0;\n};\n\nexport const hasAtLeastOneBoxWithTitle = function () {\n return state.records.boxes.some((b) => b.name);\n};\n\nexport const getMessages = function () {\n return state.records.messages;\n};\n\nexport const getBoxes = function () {\n return state.records.boxes;\n};\nexport const getActors = function () {\n return state.records.actors;\n};\nexport const getCreatedActors = function () {\n return state.records.createdActors;\n};\nexport const getDestroyedActors = function () {\n return state.records.destroyedActors;\n};\nexport const getActor = function (id: string) {\n // TODO: do we ever use this function in a way that it might return undefined?\n return state.records.actors.get(id)!;\n};\nexport const getActorKeys = function () {\n return [...state.records.actors.keys()];\n};\nexport const enableSequenceNumbers = function () {\n state.records.sequenceNumbersEnabled = true;\n};\nexport const disableSequenceNumbers = function () {\n state.records.sequenceNumbersEnabled = false;\n};\nexport const showSequenceNumbers = () => state.records.sequenceNumbersEnabled;\n\nexport const setWrap = function (wrapSetting?: boolean) {\n state.records.wrapEnabled = wrapSetting;\n};\n\nconst extractWrap = (text?: string): { cleanedText?: string; wrap?: boolean } => {\n if (text === undefined) {\n return {};\n }\n text = text.trim();\n const wrap =\n /^:?wrap:/.exec(text) !== null ? true : /^:?nowrap:/.exec(text) !== null ? false : undefined;\n const cleanedText = (wrap === undefined ? text : text.replace(/^:?(?:no)?wrap:/, '')).trim();\n return { cleanedText, wrap };\n};\n\nexport const autoWrap = () => {\n // if setWrap has been called, use that value, otherwise use the value from the config\n // TODO: refactor, always use the config value let setWrap update the config value\n if (state.records.wrapEnabled !== undefined) {\n return state.records.wrapEnabled;\n }\n return getConfig().sequence?.wrap ?? false;\n};\n\nexport const clear = function () {\n state.reset();\n commonClear();\n};\n\nexport const parseMessage = function (str: string) {\n const trimmedStr = str.trim();\n const { wrap, cleanedText } = extractWrap(trimmedStr);\n const message = {\n text: cleanedText,\n wrap,\n };\n log.debug(`parseMessage: ${JSON.stringify(message)}`);\n return message;\n};\n\n// We expect the box statement to be color first then description\n// The color can be rgb,rgba,hsl,hsla, or css code names #hex codes are not supported for now because of the way the char # is handled\n// We extract first segment as color, the rest of the line is considered as text\nexport const parseBoxData = function (str: string) {\n const match = /^((?:rgba?|hsla?)\\s*\\(.*\\)|\\w*)(.*)$/.exec(str);\n let color = match?.[1] ? match[1].trim() : 'transparent';\n let title = match?.[2] ? match[2].trim() : undefined;\n\n // check that the string is a color\n if (window?.CSS) {\n if (!window.CSS.supports('color', color)) {\n color = 'transparent';\n title = str.trim();\n }\n } else {\n const style = new Option().style;\n style.color = color;\n if (style.color !== color) {\n color = 'transparent';\n title = str.trim();\n }\n }\n const { wrap, cleanedText } = extractWrap(title);\n return {\n text: cleanedText ? sanitizeText(cleanedText, getConfig()) : undefined,\n color,\n wrap,\n };\n};\n\nexport const LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25,\n AUTONUMBER: 26,\n CRITICAL_START: 27,\n CRITICAL_OPTION: 28,\n CRITICAL_END: 29,\n BREAK_START: 30,\n BREAK_END: 31,\n PAR_OVER_START: 32,\n BIDIRECTIONAL_SOLID: 33,\n BIDIRECTIONAL_DOTTED: 34,\n};\n\nexport const ARROWTYPE = {\n FILLED: 0,\n OPEN: 1,\n};\n\nexport const PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2,\n};\n\nexport const addNote = function (\n actor: { actor: string },\n placement: Message['placement'],\n message: { text: string; wrap?: boolean }\n) {\n const note: Note = {\n actor: actor,\n placement: placement,\n message: message.text,\n wrap: message.wrap ?? autoWrap(),\n };\n\n //@ts-ignore: Coerce actor into a [to, from, ...] array\n // eslint-disable-next-line unicorn/prefer-spread\n const actors = [].concat(actor, actor);\n state.records.notes.push(note);\n state.records.messages.push({\n from: actors[0],\n to: actors[1],\n message: message.text,\n wrap: message.wrap ?? autoWrap(),\n type: LINETYPE.NOTE,\n placement: placement,\n });\n};\n\nexport const addLinks = function (actorId: string, text: { text: string }) {\n // find the actor\n const actor = getActor(actorId);\n // JSON.parse the text\n try {\n let sanitizedText = sanitizeText(text.text, getConfig());\n sanitizedText = sanitizedText.replace(/&/g, '&');\n sanitizedText = sanitizedText.replace(/=/g, '=');\n const links = JSON.parse(sanitizedText);\n // add the deserialized text to the actor's links field.\n insertLinks(actor, links);\n } catch (e) {\n log.error('error while parsing actor link text', e);\n }\n};\n\nexport const addALink = function (actorId: string, text: { text: string }) {\n // find the actor\n const actor = getActor(actorId);\n try {\n const links: Record = {};\n let sanitizedText = sanitizeText(text.text, getConfig());\n const sep = sanitizedText.indexOf('@');\n sanitizedText = sanitizedText.replace(/&/g, '&');\n sanitizedText = sanitizedText.replace(/=/g, '=');\n const label = sanitizedText.slice(0, sep - 1).trim();\n const link = sanitizedText.slice(sep + 1).trim();\n\n links[label] = link;\n // add the deserialized text to the actor's links field.\n insertLinks(actor, links);\n } catch (e) {\n log.error('error while parsing actor link text', e);\n }\n};\n\n/**\n * @param actor - the actor to add the links to\n * @param links - the links to add to the actor\n */\nfunction insertLinks(actor: Actor, links: Record) {\n if (actor.links == null) {\n actor.links = links;\n } else {\n for (const key in links) {\n actor.links[key] = links[key];\n }\n }\n}\n\nexport const addProperties = function (actorId: string, text: { text: string }) {\n // find the actor\n const actor = getActor(actorId);\n // JSON.parse the text\n try {\n const sanitizedText = sanitizeText(text.text, getConfig());\n const properties: Record = JSON.parse(sanitizedText);\n // add the deserialized text to the actor's property field.\n insertProperties(actor, properties);\n } catch (e) {\n log.error('error while parsing actor properties text', e);\n }\n};\n\n/**\n * @param actor - the actor to add the properties to\n * @param properties - the properties to add to the actor's properties\n */\nfunction insertProperties(actor: Actor, properties: Record) {\n if (actor.properties == null) {\n actor.properties = properties;\n } else {\n for (const key in properties) {\n actor.properties[key] = properties[key];\n }\n }\n}\n\nfunction boxEnd() {\n state.records.currentBox = undefined;\n}\n\nexport const addDetails = function (actorId: string, text: { text: string }) {\n // find the actor\n const actor = getActor(actorId);\n const elem = document.getElementById(text.text)!;\n\n // JSON.parse the text\n try {\n const text = elem.innerHTML;\n const details = JSON.parse(text);\n // add the deserialized text to the actor's property field.\n if (details.properties) {\n insertProperties(actor, details.properties);\n }\n\n if (details.links) {\n insertLinks(actor, details.links);\n }\n } catch (e) {\n log.error('error while parsing actor details text', e);\n }\n};\n\nexport const getActorProperty = function (actor: Actor, key: string) {\n if (actor?.properties !== undefined) {\n return actor.properties[key];\n }\n\n return undefined;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents\nexport const apply = function (param: any | AddMessageParams | AddMessageParams[]) {\n if (Array.isArray(param)) {\n param.forEach(function (item) {\n apply(item);\n });\n } else {\n switch (param.type) {\n case 'sequenceIndex':\n state.records.messages.push({\n from: undefined,\n to: undefined,\n message: {\n start: param.sequenceIndex,\n step: param.sequenceIndexStep,\n visible: param.sequenceVisible,\n },\n wrap: false,\n type: param.signalType,\n });\n break;\n case 'addParticipant':\n addActor(param.actor, param.actor, param.description, param.draw);\n break;\n case 'createParticipant':\n if (state.records.actors.has(param.actor)) {\n throw new Error(\n \"It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior\"\n );\n }\n state.records.lastCreated = param.actor;\n addActor(param.actor, param.actor, param.description, param.draw);\n state.records.createdActors.set(param.actor, state.records.messages.length);\n break;\n case 'destroyParticipant':\n state.records.lastDestroyed = param.actor;\n state.records.destroyedActors.set(param.actor, state.records.messages.length);\n break;\n case 'activeStart':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n case 'activeEnd':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n case 'addNote':\n addNote(param.actor, param.placement, param.text);\n break;\n case 'addLinks':\n addLinks(param.actor, param.text);\n break;\n case 'addALink':\n addALink(param.actor, param.text);\n break;\n case 'addProperties':\n addProperties(param.actor, param.text);\n break;\n case 'addDetails':\n addDetails(param.actor, param.text);\n break;\n case 'addMessage':\n if (state.records.lastCreated) {\n if (param.to !== state.records.lastCreated) {\n throw new Error(\n 'The created participant ' +\n state.records.lastCreated.name +\n ' does not have an associated creating message after its declaration. Please check the sequence diagram.'\n );\n } else {\n state.records.lastCreated = undefined;\n }\n } else if (state.records.lastDestroyed) {\n if (\n param.to !== state.records.lastDestroyed &&\n param.from !== state.records.lastDestroyed\n ) {\n throw new Error(\n 'The destroyed participant ' +\n state.records.lastDestroyed.name +\n ' does not have an associated destroying message after its declaration. Please check the sequence diagram.'\n );\n } else {\n state.records.lastDestroyed = undefined;\n }\n }\n addSignal(param.from, param.to, param.msg, param.signalType, param.activate);\n break;\n case 'boxStart':\n addBox(param.boxData);\n break;\n case 'boxEnd':\n boxEnd();\n break;\n case 'loopStart':\n addSignal(undefined, undefined, param.loopText, param.signalType);\n break;\n case 'loopEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'rectStart':\n addSignal(undefined, undefined, param.color, param.signalType);\n break;\n case 'rectEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'optStart':\n addSignal(undefined, undefined, param.optText, param.signalType);\n break;\n case 'optEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'altStart':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n case 'else':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n case 'altEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'setAccTitle':\n setAccTitle(param.text);\n break;\n case 'parStart':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n case 'and':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n case 'parEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'criticalStart':\n addSignal(undefined, undefined, param.criticalText, param.signalType);\n break;\n case 'option':\n addSignal(undefined, undefined, param.optionText, param.signalType);\n break;\n case 'criticalEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'breakStart':\n addSignal(undefined, undefined, param.breakText, param.signalType);\n break;\n case 'breakEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n }\n }\n};\n\nexport default {\n addActor,\n addMessage,\n addSignal,\n addLinks,\n addDetails,\n addProperties,\n autoWrap,\n setWrap,\n enableSequenceNumbers,\n disableSequenceNumbers,\n showSequenceNumbers,\n getMessages,\n getActors,\n getCreatedActors,\n getDestroyedActors,\n getActor,\n getActorKeys,\n getActorProperty,\n getAccTitle,\n getBoxes,\n getDiagramTitle,\n setDiagramTitle,\n getConfig: () => getConfig().sequence,\n clear,\n parseMessage,\n parseBoxData,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n addNote,\n setAccTitle,\n apply,\n setAccDescription,\n getAccDescription,\n hasAtLeastOneBox,\n hasAtLeastOneBoxWithTitle,\n};\n", "const getStyles = (options) =>\n `.actor {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${options.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${options.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${options.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${options.signalColor};\n }\n\n #arrowhead path {\n fill: ${options.signalColor};\n stroke: ${options.signalColor};\n }\n\n .sequenceNumber {\n fill: ${options.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${options.signalColor};\n }\n\n #crosshead path {\n fill: ${options.signalColor};\n stroke: ${options.signalColor};\n }\n\n .messageText {\n fill: ${options.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${options.labelBoxBorderColor};\n fill: ${options.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${options.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${options.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${options.labelBoxBorderColor};\n fill: ${options.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${options.noteBorderColor};\n fill: ${options.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${options.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .activation1 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .activation2 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${options.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n stroke-width: 2px;\n }\n`;\n\nexport default getStyles;\n", "import common, { calculateMathMLDimensions, hasKatex, renderKatex } from '../common/common.js';\nimport * as svgDrawCommon from '../common/svgDrawCommon.js';\nimport { ZERO_WIDTH_SPACE, parseFontSize } from '../../utils.js';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport * as configApi from '../../config.js';\n\nexport const ACTOR_TYPE_WIDTH = 18 * 2;\nconst TOP_ACTOR_CLASS = 'actor-top';\nconst BOTTOM_ACTOR_CLASS = 'actor-bottom';\nconst ACTOR_BOX_CLASS = 'actor-box';\nconst ACTOR_MAN_FIGURE_CLASS = 'actor-man';\n\nexport const drawRect = function (elem, rectData) {\n return svgDrawCommon.drawRect(elem, rectData);\n};\n\nexport const drawPopup = function (elem, actor, minMenuWidth, textAttrs, forceMenus) {\n if (actor.links === undefined || actor.links === null || Object.keys(actor.links).length === 0) {\n return { height: 0, width: 0 };\n }\n\n const links = actor.links;\n const actorCnt = actor.actorCnt;\n const rectData = actor.rectData;\n\n var displayValue = 'none';\n if (forceMenus) {\n displayValue = 'block !important';\n }\n\n const g = elem.append('g');\n g.attr('id', 'actor' + actorCnt + '_popup');\n g.attr('class', 'actorPopupMenu');\n g.attr('display', displayValue);\n var actorClass = '';\n if (rectData.class !== undefined) {\n actorClass = ' ' + rectData.class;\n }\n\n let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth;\n\n const rectElem = g.append('rect');\n rectElem.attr('class', 'actorPopupMenuPanel' + actorClass);\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.height);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', menuWidth);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n if (links != null) {\n var linkY = 20;\n for (let key in links) {\n var linkElem = g.append('a');\n var sanitizedLink = sanitizeUrl(links[key]);\n linkElem.attr('xlink:href', sanitizedLink);\n linkElem.attr('target', '_blank');\n\n _drawMenuItemTextCandidateFunc(textAttrs)(\n key,\n linkElem,\n rectData.x + 10,\n rectData.height + linkY,\n menuWidth,\n 20,\n { class: 'actor' },\n textAttrs\n );\n\n linkY += 30;\n }\n }\n\n rectElem.attr('height', linkY);\n\n return { height: rectData.height + linkY, width: menuWidth };\n};\n\nconst popupMenuToggle = function (popId) {\n return (\n \"var pu = document.getElementById('\" +\n popId +\n \"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }\"\n );\n};\n\nexport const drawKatex = async function (elem, textData, msgModel = null) {\n let textElem = elem.append('foreignObject');\n const lines = await renderKatex(textData.text, configApi.getConfig());\n\n const divElem = textElem\n .append('xhtml:div')\n .attr('style', 'width: fit-content;')\n .attr('xmlns', 'http://www.w3.org/1999/xhtml')\n .html(lines);\n const dim = divElem.node().getBoundingClientRect();\n\n textElem.attr('height', Math.round(dim.height)).attr('width', Math.round(dim.width));\n\n if (textData.class === 'noteText') {\n const rectElem = elem.node().firstChild;\n\n rectElem.setAttribute('height', dim.height + 2 * textData.textMargin);\n const rectDim = rectElem.getBBox();\n\n textElem\n .attr('x', Math.round(rectDim.x + rectDim.width / 2 - dim.width / 2))\n .attr('y', Math.round(rectDim.y + rectDim.height / 2 - dim.height / 2));\n } else if (msgModel) {\n let { startx, stopx, starty } = msgModel;\n if (startx > stopx) {\n const temp = startx;\n startx = stopx;\n stopx = temp;\n }\n\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n textElem.attr('x', Math.round(startx + Math.abs(startx - stopx) / 2 - dim.width / 2));\n if (textData.class === 'loopText') {\n textElem.attr('y', Math.round(starty));\n } else {\n textElem.attr('y', Math.round(starty - dim.height));\n }\n }\n\n return [textElem];\n};\n\nexport const drawText = function (elem, textData) {\n let prevTextHeight = 0;\n let textHeight = 0;\n const lines = textData.text.split(common.lineBreakRegex);\n\n const [_textFontSize, _textFontSizePx] = parseFontSize(textData.fontSize);\n\n let textElems = [];\n let dy = 0;\n let yfunc = () => textData.y;\n if (\n textData.valign !== undefined &&\n textData.textMargin !== undefined &&\n textData.textMargin > 0\n ) {\n switch (textData.valign) {\n case 'top':\n case 'start':\n yfunc = () => Math.round(textData.y + textData.textMargin);\n break;\n case 'middle':\n case 'center':\n yfunc = () =>\n Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2);\n break;\n case 'bottom':\n case 'end':\n yfunc = () =>\n Math.round(\n textData.y +\n (prevTextHeight + textHeight + 2 * textData.textMargin) -\n textData.textMargin\n );\n break;\n }\n }\n\n if (\n textData.anchor !== undefined &&\n textData.textMargin !== undefined &&\n textData.width !== undefined\n ) {\n switch (textData.anchor) {\n case 'left':\n case 'start':\n textData.x = Math.round(textData.x + textData.textMargin);\n textData.anchor = 'start';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n case 'middle':\n case 'center':\n textData.x = Math.round(textData.x + textData.width / 2);\n textData.anchor = 'middle';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n case 'right':\n case 'end':\n textData.x = Math.round(textData.x + textData.width - textData.textMargin);\n textData.anchor = 'end';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n }\n }\n\n for (let [i, line] of lines.entries()) {\n if (\n textData.textMargin !== undefined &&\n textData.textMargin === 0 &&\n _textFontSize !== undefined\n ) {\n dy = i * _textFontSize;\n }\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', yfunc());\n if (textData.anchor !== undefined) {\n textElem\n .attr('text-anchor', textData.anchor)\n .attr('dominant-baseline', textData.dominantBaseline)\n .attr('alignment-baseline', textData.alignmentBaseline);\n }\n if (textData.fontFamily !== undefined) {\n textElem.style('font-family', textData.fontFamily);\n }\n if (_textFontSizePx !== undefined) {\n textElem.style('font-size', _textFontSizePx);\n }\n if (textData.fontWeight !== undefined) {\n textElem.style('font-weight', textData.fontWeight);\n }\n if (textData.fill !== undefined) {\n textElem.attr('fill', textData.fill);\n }\n if (textData.class !== undefined) {\n textElem.attr('class', textData.class);\n }\n if (textData.dy !== undefined) {\n textElem.attr('dy', textData.dy);\n } else if (dy !== 0) {\n textElem.attr('dy', dy);\n }\n\n const text = line || ZERO_WIDTH_SPACE;\n if (textData.tspan) {\n const span = textElem.append('tspan');\n span.attr('x', textData.x);\n if (textData.fill !== undefined) {\n span.attr('fill', textData.fill);\n }\n span.text(text);\n } else {\n textElem.text(text);\n }\n if (\n textData.valign !== undefined &&\n textData.textMargin !== undefined &&\n textData.textMargin > 0\n ) {\n textHeight += (textElem._groups || textElem)[0][0].getBBox().height;\n prevTextHeight = textHeight;\n }\n\n textElems.push(textElem);\n }\n\n return textElems;\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n * @returns {any}\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.height / 2;\n\n drawText(elem, txtObject);\n return polygon;\n};\n\nlet actorCnt = -1;\n\nexport const fixLifeLineHeights = (diagram, actors, actorKeys, conf) => {\n if (!diagram.select) {\n return;\n }\n actorKeys.forEach((actorKey) => {\n const actor = actors.get(actorKey);\n const actorDOM = diagram.select('#actor' + actor.actorCnt);\n if (!conf.mirrorActors && actor.stopy) {\n actorDOM.attr('y2', actor.stopy + actor.height / 2);\n } else if (conf.mirrorActors) {\n actorDOM.attr('y2', actor.stopy);\n }\n });\n};\n\n/**\n * Draws an actor in the diagram with the attached line\n *\n * @param {any} elem - The diagram we'll draw to.\n * @param {any} actor - The actor to draw.\n * @param {any} conf - DrawText implementation discriminator object\n * @param {boolean} isFooter - If the actor is the footer one\n */\nconst drawActorTypeParticipant = function (elem, actor, conf, isFooter) {\n const actorY = isFooter ? actor.stopy : actor.starty;\n const center = actor.x + actor.width / 2;\n const centerY = actorY + actor.height;\n\n const boxplusLineGroup = elem.append('g').lower();\n var g = boxplusLineGroup;\n\n if (!isFooter) {\n actorCnt++;\n if (Object.keys(actor.links || {}).length && !conf.forceMenus) {\n g.attr('onclick', popupMenuToggle(`actor${actorCnt}_popup`)).attr('cursor', 'pointer');\n }\n g.append('line')\n .attr('id', 'actor' + actorCnt)\n .attr('x1', center)\n .attr('y1', centerY)\n .attr('x2', center)\n .attr('y2', 2000)\n .attr('class', 'actor-line 200')\n .attr('stroke-width', '0.5px')\n .attr('stroke', '#999')\n .attr('name', actor.name);\n\n g = boxplusLineGroup.append('g');\n actor.actorCnt = actorCnt;\n\n if (actor.links != null) {\n g.attr('id', 'root-' + actorCnt);\n }\n }\n\n const rect = svgDrawCommon.getNoteRect();\n var cssclass = 'actor';\n if (actor.properties?.class) {\n cssclass = actor.properties.class;\n } else {\n rect.fill = '#eaeaea';\n }\n if (isFooter) {\n cssclass += ` ${BOTTOM_ACTOR_CLASS}`;\n } else {\n cssclass += ` ${TOP_ACTOR_CLASS}`;\n }\n rect.x = actor.x;\n rect.y = actorY;\n rect.width = actor.width;\n rect.height = actor.height;\n rect.class = cssclass;\n rect.rx = 3;\n rect.ry = 3;\n rect.name = actor.name;\n const rectElem = drawRect(g, rect);\n actor.rectData = rect;\n\n if (actor.properties?.icon) {\n const iconSrc = actor.properties.icon.trim();\n if (iconSrc.charAt(0) === '@') {\n svgDrawCommon.drawEmbeddedImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1));\n } else {\n svgDrawCommon.drawImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc);\n }\n }\n\n _drawTextCandidateFunc(conf, hasKatex(actor.description))(\n actor.description,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: `actor ${ACTOR_BOX_CLASS}` },\n conf\n );\n\n let height = actor.height;\n if (rectElem.node) {\n const bounds = rectElem.node().getBBox();\n actor.height = bounds.height;\n height = bounds.height;\n }\n\n return height;\n};\n\nconst drawActorTypeActor = function (elem, actor, conf, isFooter) {\n const actorY = isFooter ? actor.stopy : actor.starty;\n const center = actor.x + actor.width / 2;\n const centerY = actorY + 80;\n\n const line = elem.append('g').lower();\n\n if (!isFooter) {\n actorCnt++;\n line\n .append('line')\n .attr('id', 'actor' + actorCnt)\n .attr('x1', center)\n .attr('y1', centerY)\n .attr('x2', center)\n .attr('y2', 2000)\n .attr('class', 'actor-line 200')\n .attr('stroke-width', '0.5px')\n .attr('stroke', '#999')\n .attr('name', actor.name);\n\n actor.actorCnt = actorCnt;\n }\n const actElem = elem.append('g');\n let cssClass = ACTOR_MAN_FIGURE_CLASS;\n if (isFooter) {\n cssClass += ` ${BOTTOM_ACTOR_CLASS}`;\n } else {\n cssClass += ` ${TOP_ACTOR_CLASS}`;\n }\n actElem.attr('class', cssClass);\n actElem.attr('name', actor.name);\n\n const rect = svgDrawCommon.getNoteRect();\n rect.x = actor.x;\n rect.y = actorY;\n rect.fill = '#eaeaea';\n rect.width = actor.width;\n rect.height = actor.height;\n rect.class = 'actor';\n rect.rx = 3;\n rect.ry = 3;\n\n actElem\n .append('line')\n .attr('id', 'actor-man-torso' + actorCnt)\n .attr('x1', center)\n .attr('y1', actorY + 25)\n .attr('x2', center)\n .attr('y2', actorY + 45);\n\n actElem\n .append('line')\n .attr('id', 'actor-man-arms' + actorCnt)\n .attr('x1', center - ACTOR_TYPE_WIDTH / 2)\n .attr('y1', actorY + 33)\n .attr('x2', center + ACTOR_TYPE_WIDTH / 2)\n .attr('y2', actorY + 33);\n actElem\n .append('line')\n .attr('x1', center - ACTOR_TYPE_WIDTH / 2)\n .attr('y1', actorY + 60)\n .attr('x2', center)\n .attr('y2', actorY + 45);\n actElem\n .append('line')\n .attr('x1', center)\n .attr('y1', actorY + 45)\n .attr('x2', center + ACTOR_TYPE_WIDTH / 2 - 2)\n .attr('y2', actorY + 60);\n\n const circle = actElem.append('circle');\n circle.attr('cx', actor.x + actor.width / 2);\n circle.attr('cy', actorY + 10);\n circle.attr('r', 15);\n circle.attr('width', actor.width);\n circle.attr('height', actor.height);\n\n const bounds = actElem.node().getBBox();\n actor.height = bounds.height;\n\n _drawTextCandidateFunc(conf, hasKatex(actor.description))(\n actor.description,\n actElem,\n rect.x,\n rect.y + 35,\n rect.width,\n rect.height,\n { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` },\n conf\n );\n\n return actor.height;\n};\n\nexport const drawActor = async function (elem, actor, conf, isFooter) {\n switch (actor.type) {\n case 'actor':\n return await drawActorTypeActor(elem, actor, conf, isFooter);\n case 'participant':\n return await drawActorTypeParticipant(elem, actor, conf, isFooter);\n }\n};\n\nexport const drawBox = function (elem, box, conf) {\n const boxplusTextGroup = elem.append('g');\n const g = boxplusTextGroup;\n drawBackgroundRect(g, box);\n if (box.name) {\n _drawTextCandidateFunc(conf)(\n box.name,\n g,\n box.x,\n box.y + (box.textMaxHeight || 0) / 2,\n box.width,\n 0,\n { class: 'text' },\n conf\n );\n }\n g.lower();\n};\n\nexport const anchorElement = function (elem) {\n return elem.append('g');\n};\n\n/**\n * Draws an activation in the diagram\n *\n * @param {any} elem - Element to append activation rect.\n * @param {any} bounds - Activation box bounds.\n * @param {any} verticalPos - Precise y coordinate of bottom activation box edge.\n * @param {any} conf - Sequence diagram config object.\n * @param {any} actorActivations - Number of activations on the actor.\n */\nexport const drawActivation = function (elem, bounds, verticalPos, conf, actorActivations) {\n const rect = svgDrawCommon.getNoteRect();\n const g = bounds.anchored;\n rect.x = bounds.startx;\n rect.y = bounds.starty;\n rect.class = 'activation' + (actorActivations % 3); // Will evaluate to 0, 1 or 2\n rect.width = bounds.stopx - bounds.startx;\n rect.height = verticalPos - bounds.starty;\n drawRect(g, rect);\n};\n\n/**\n * Draws a loop in the diagram\n *\n * @param {any} elem - Element to append the loop to.\n * @param {any} loopModel - LoopModel of the given loop.\n * @param {any} labelText - Text within the loop.\n * @param {any} conf - Diagram configuration\n * @returns {any}\n */\nexport const drawLoop = async function (elem, loopModel, labelText, conf) {\n const {\n boxMargin,\n boxTextMargin,\n labelBoxHeight,\n labelBoxWidth,\n messageFontFamily: fontFamily,\n messageFontSize: fontSize,\n messageFontWeight: fontWeight,\n } = conf;\n const g = elem.append('g');\n const drawLoopLine = function (startx, starty, stopx, stopy) {\n return g\n .append('line')\n .attr('x1', startx)\n .attr('y1', starty)\n .attr('x2', stopx)\n .attr('y2', stopy)\n .attr('class', 'loopLine');\n };\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty);\n drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy);\n if (loopModel.sections !== undefined) {\n loopModel.sections.forEach(function (item) {\n drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style(\n 'stroke-dasharray',\n '3, 3'\n );\n });\n }\n\n let txt = svgDrawCommon.getTextObj();\n txt.text = labelText;\n txt.x = loopModel.startx;\n txt.y = loopModel.starty;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.width = labelBoxWidth || 50;\n txt.height = labelBoxHeight || 20;\n txt.textMargin = boxTextMargin;\n txt.class = 'labelText';\n\n drawLabel(g, txt);\n txt = getTextObj();\n txt.text = loopModel.title;\n txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.starty + boxMargin + boxTextMargin;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.textMargin = boxTextMargin;\n txt.class = 'loopText';\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = true;\n\n let textElem = hasKatex(txt.text) ? await drawKatex(g, txt, loopModel) : drawText(g, txt);\n\n if (loopModel.sectionTitles !== undefined) {\n for (const [idx, item] of Object.entries(loopModel.sectionTitles)) {\n if (item.message) {\n txt.text = item.message;\n txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin;\n txt.class = 'loopText';\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = loopModel.wrap;\n\n if (hasKatex(txt.text)) {\n loopModel.starty = loopModel.sections[idx].y;\n await drawKatex(g, txt, loopModel);\n } else {\n drawText(g, txt);\n }\n let sectionHeight = Math.round(\n textElem\n .map((te) => (te._groups || te)[0][0].getBBox().height)\n .reduce((acc, curr) => acc + curr)\n );\n loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin);\n }\n }\n }\n\n loopModel.height = Math.round(loopModel.stopy - loopModel.starty);\n return g;\n};\n\n/**\n * Draws a background rectangle\n *\n * @param {any} elem Diagram (reference for bounds)\n * @param {any} bounds Shape of the rectangle\n */\nexport const drawBackgroundRect = function (elem, bounds) {\n svgDrawCommon.drawBackgroundRect(elem, bounds);\n};\n\nexport const insertDatabaseIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'database')\n .attr('fill-rule', 'evenodd')\n .attr('clip-rule', 'evenodd')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z'\n );\n};\n\nexport const insertComputerIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'computer')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z'\n );\n};\n\nexport const insertClockIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'clock')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z'\n );\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param elem\n */\nexport const insertArrowHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 7.9)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto-start-reverse')\n .append('path')\n .attr('d', 'M -1 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowFilledHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'filled-head')\n .attr('refX', 15.5)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Setup node number. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertSequenceNumber = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'sequencenumber')\n .attr('refX', 15)\n .attr('refY', 15)\n .attr('markerWidth', 60)\n .attr('markerHeight', 40)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', 15)\n .attr('cy', 15)\n .attr('r', 6);\n // .style(\"fill\", '#f00');\n};\n\n/**\n * Setup cross head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowCrossHead = function (elem) {\n const defs = elem.append('defs');\n const marker = defs\n .append('marker')\n .attr('id', 'crosshead')\n .attr('markerWidth', 15)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .attr('refX', 4)\n .attr('refY', 4.5);\n // The cross\n marker\n .append('path')\n .attr('fill', 'none')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1pt')\n .attr('d', 'M 1,2 L 6,7 M 6,2 L 1,7');\n // this is actual shape for arrowhead\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: undefined,\n style: '#666',\n width: undefined,\n height: undefined,\n textMargin: 0,\n rx: 0,\n ry: 0,\n tspan: true,\n valign: undefined,\n };\n};\n\nexport const getNoteRect = function () {\n return {\n x: 0,\n y: 0,\n fill: '#EDF2AE',\n stroke: '#666',\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0,\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { actorFontSize, actorFontFamily, actorFontWeight } = conf;\n\n const [_actorFontSize, _actorFontSizePx] = parseFontSize(actorFontSize);\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * _actorFontSize - (_actorFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .style('text-anchor', 'middle')\n .style('font-size', _actorFontSizePx)\n .style('font-weight', actorFontWeight)\n .style('font-family', actorFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n *\n * @param content\n * @param g\n * @param x\n * @param y\n * @param width\n * @param height\n * @param textAttrs\n * @param conf\n */\n async function byKatex(content, g, x, y, width, height, textAttrs, conf) {\n // TODO duplicate render calls, optimize\n\n const dim = await calculateMathMLDimensions(content, configApi.getConfig());\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x + width / 2 - dim.width / 2)\n .attr('y', y + height / 2 - dim.height / 2)\n .attr('width', dim.width)\n .attr('height', dim.height);\n\n const text = f.append('xhtml:div').style('height', '100%').style('width', '100%');\n\n text\n .append('div')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .html(await renderKatex(content, configApi.getConfig()));\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf, hasKatex = false) {\n if (hasKatex) {\n return byKatex;\n }\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst _drawMenuItemTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x)\n .attr('y', y)\n .style('text-anchor', 'start')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { actorFontSize, actorFontFamily, actorFontWeight } = conf;\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * actorFontSize - (actorFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x)\n .attr('y', y)\n .style('text-anchor', 'start')\n .style('font-size', actorFontSize)\n .style('font-weight', actorFontWeight)\n .style('font-family', actorFontFamily);\n text.append('tspan').attr('x', x).attr('dy', dy).text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nexport default {\n drawRect,\n drawText,\n drawLabel,\n drawActor,\n drawBox,\n drawPopup,\n anchorElement,\n drawActivation,\n drawLoop,\n drawBackgroundRect,\n insertArrowHead,\n insertArrowFilledHead,\n insertSequenceNumber,\n insertArrowCrossHead,\n insertDatabaseIcon,\n insertComputerIcon,\n insertClockIcon,\n getTextObj,\n getNoteRect,\n fixLifeLineHeights,\n sanitizeUrl,\n};\n", "// @ts-nocheck TODO: fix file\nimport { select } from 'd3';\nimport svgDraw, { drawKatex, ACTOR_TYPE_WIDTH, drawText, fixLifeLineHeights } from './svgDraw.js';\nimport { log } from '../../logger.js';\nimport common, { calculateMathMLDimensions, hasKatex } from '../common/common.js';\nimport * as svgDrawCommon from '../common/svgDrawCommon.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport assignWithDepth from '../../assignWithDepth.js';\nimport utils from '../../utils.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type { Diagram } from '../../Diagram.js';\n\nlet conf = {};\n\nexport const bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n },\n verticalPos: 0,\n sequenceItems: [],\n activations: [],\n models: {\n getHeight: function () {\n return (\n Math.max.apply(\n null,\n this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0)\n ) +\n (this.loops.length === 0\n ? 0\n : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) +\n (this.messages.length === 0\n ? 0\n : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) +\n (this.notes.length === 0\n ? 0\n : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h))\n );\n },\n clear: function () {\n this.actors = [];\n this.boxes = [];\n this.loops = [];\n this.messages = [];\n this.notes = [];\n },\n addBox: function (boxModel) {\n this.boxes.push(boxModel);\n },\n addActor: function (actorModel) {\n this.actors.push(actorModel);\n },\n addLoop: function (loopModel) {\n this.loops.push(loopModel);\n },\n addMessage: function (msgModel) {\n this.messages.push(msgModel);\n },\n addNote: function (noteModel) {\n this.notes.push(noteModel);\n },\n lastActor: function () {\n return this.actors[this.actors.length - 1];\n },\n lastLoop: function () {\n return this.loops[this.loops.length - 1];\n },\n lastMessage: function () {\n return this.messages[this.messages.length - 1];\n },\n lastNote: function () {\n return this.notes[this.notes.length - 1];\n },\n actors: [],\n boxes: [],\n loops: [],\n messages: [],\n notes: [],\n },\n init: function () {\n this.sequenceItems = [];\n this.activations = [];\n this.models.clear();\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n };\n this.verticalPos = 0;\n setConf(getConfig());\n },\n updateVal: function (obj, key, val, fun) {\n if (obj[key] === undefined) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function (startx, starty, stopx, stopy) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _self = this;\n let cnt = 0;\n /** @param type - Either `activation` or `undefined` */\n function updateFn(type?: 'activation') {\n return function updateItemBounds(item) {\n cnt++;\n // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n const n = _self.sequenceItems.length - cnt + 1;\n\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n this.activations.forEach(updateFn('activation'));\n },\n insert: function (startx, starty, stopx, stopy) {\n const _startx = common.getMin(startx, stopx);\n const _stopx = common.getMax(startx, stopx);\n const _starty = common.getMin(starty, stopy);\n const _stopy = common.getMax(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n newActivation: function (message, diagram, actors) {\n const actorRect = actors.get(message.from);\n const stackedSize = actorActivations(message.from).length || 0;\n const x = actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;\n this.activations.push({\n startx: x,\n starty: this.verticalPos + 2,\n stopx: x + conf.activationWidth,\n stopy: undefined,\n actor: message.from,\n anchored: svgDraw.anchorElement(diagram),\n });\n },\n endActivation: function (message) {\n // find most recent activation for given actor\n const lastActorActivationIdx = this.activations\n .map(function (activation) {\n return activation.actor;\n })\n .lastIndexOf(message.from);\n return this.activations.splice(lastActorActivationIdx, 1)[0];\n },\n createLoop: function (title = { message: undefined, wrap: false, width: undefined }, fill) {\n return {\n startx: undefined,\n starty: this.verticalPos,\n stopx: undefined,\n stopy: undefined,\n title: title.message,\n wrap: title.wrap,\n width: title.width,\n height: 0,\n fill: fill,\n };\n },\n newLoop: function (title = { message: undefined, wrap: false, width: undefined }, fill) {\n this.sequenceItems.push(this.createLoop(title, fill));\n },\n endLoop: function () {\n return this.sequenceItems.pop();\n },\n isLoopOverlap: function () {\n return this.sequenceItems.length\n ? this.sequenceItems[this.sequenceItems.length - 1].overlap\n : false;\n },\n addSectionToLoop: function (message) {\n const loop = this.sequenceItems.pop();\n loop.sections = loop.sections || [];\n loop.sectionTitles = loop.sectionTitles || [];\n loop.sections.push({ y: bounds.getVerticalPos(), height: 0 });\n loop.sectionTitles.push(message);\n this.sequenceItems.push(loop);\n },\n saveVerticalPos: function () {\n if (this.isLoopOverlap()) {\n this.savedVerticalPos = this.verticalPos;\n }\n },\n resetVerticalPos: function () {\n if (this.isLoopOverlap()) {\n this.verticalPos = this.savedVerticalPos;\n }\n },\n bumpVerticalPos: function (bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = common.getMax(this.data.stopy, this.verticalPos);\n },\n getVerticalPos: function () {\n return this.verticalPos;\n },\n getBounds: function () {\n return { bounds: this.data, models: this.models };\n },\n};\n\n/** Options for drawing a note in {@link drawNote} */\ninterface NoteModel {\n /** x axis start position */\n startx: number;\n /** y axis position */\n starty: number;\n /** the message to be shown */\n message: string;\n /** Set this with a custom width to override the default configured width. */\n width: number;\n}\n\n/**\n * Draws an note in the diagram with the attached line\n *\n * @param elem - The diagram to draw to.\n * @param noteModel - Note model options.\n */\nconst drawNote = async function (elem: any, noteModel: NoteModel) {\n bounds.bumpVerticalPos(conf.boxMargin);\n noteModel.height = conf.boxMargin;\n noteModel.starty = bounds.getVerticalPos();\n const rect = svgDrawCommon.getNoteRect();\n rect.x = noteModel.startx;\n rect.y = noteModel.starty;\n rect.width = noteModel.width || conf.width;\n rect.class = 'note';\n\n const g = elem.append('g');\n const rectElem = svgDraw.drawRect(g, rect);\n const textObj = svgDrawCommon.getTextObj();\n textObj.x = noteModel.startx;\n textObj.y = noteModel.starty;\n textObj.width = rect.width;\n textObj.dy = '1em';\n textObj.text = noteModel.message;\n textObj.class = 'noteText';\n textObj.fontFamily = conf.noteFontFamily;\n textObj.fontSize = conf.noteFontSize;\n textObj.fontWeight = conf.noteFontWeight;\n textObj.anchor = conf.noteAlign;\n textObj.textMargin = conf.noteMargin;\n textObj.valign = 'center';\n\n const textElem = hasKatex(textObj.text) ? await drawKatex(g, textObj) : drawText(g, textObj);\n\n const textHeight = Math.round(\n textElem\n .map((te) => (te._groups || te)[0][0].getBBox().height)\n .reduce((acc, curr) => acc + curr)\n );\n\n rectElem.attr('height', textHeight + 2 * conf.noteMargin);\n noteModel.height += textHeight + 2 * conf.noteMargin;\n bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);\n noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin;\n noteModel.stopx = noteModel.startx + rect.width;\n bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy);\n bounds.models.addNote(noteModel);\n};\n\nconst messageFont = (cnf) => {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight,\n };\n};\nconst noteFont = (cnf) => {\n return {\n fontFamily: cnf.noteFontFamily,\n fontSize: cnf.noteFontSize,\n fontWeight: cnf.noteFontWeight,\n };\n};\nconst actorFont = (cnf) => {\n return {\n fontFamily: cnf.actorFontFamily,\n fontSize: cnf.actorFontSize,\n fontWeight: cnf.actorFontWeight,\n };\n};\n\n/**\n * Process a message by adding its dimensions to the bound. It returns the Y coordinate of the\n * message so it can be drawn later. We do not draw the message at this point so the arrowhead can\n * be on top of the activation box.\n *\n * @param _diagram - The parent of the message element.\n * @param msgModel - The model containing fields describing a message\n * @returns `lineStartY` - The Y coordinate at which the message line starts\n */\nasync function boundMessage(_diagram, msgModel): Promise {\n bounds.bumpVerticalPos(10);\n const { startx, stopx, message } = msgModel;\n const lines = common.splitBreaks(message).length;\n const isKatexMsg = hasKatex(message);\n const textDims = isKatexMsg\n ? await calculateMathMLDimensions(message, getConfig())\n : utils.calculateTextDimensions(message, messageFont(conf));\n\n if (!isKatexMsg) {\n const lineHeight = textDims.height / lines;\n msgModel.height += lineHeight;\n bounds.bumpVerticalPos(lineHeight);\n }\n\n let lineStartY;\n let totalOffset = textDims.height - 10;\n const textWidth = textDims.width;\n\n if (startx === stopx) {\n lineStartY = bounds.getVerticalPos() + totalOffset;\n if (!conf.rightAngles) {\n totalOffset += conf.boxMargin;\n lineStartY = bounds.getVerticalPos() + totalOffset;\n }\n totalOffset += 30;\n const dx = common.getMax(textWidth / 2, conf.width / 2);\n bounds.insert(\n startx - dx,\n bounds.getVerticalPos() - 10 + totalOffset,\n stopx + dx,\n bounds.getVerticalPos() + 30 + totalOffset\n );\n } else {\n totalOffset += conf.boxMargin;\n lineStartY = bounds.getVerticalPos() + totalOffset;\n bounds.insert(startx, lineStartY - 10, stopx, lineStartY);\n }\n bounds.bumpVerticalPos(totalOffset);\n msgModel.height += totalOffset;\n msgModel.stopy = msgModel.starty + msgModel.height;\n bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy);\n\n return lineStartY;\n}\n\n/**\n * Draws a message. Note that the bounds have previously been updated by boundMessage.\n *\n * @param diagram - The parent of the message element\n * @param msgModel - The model containing fields describing a message\n * @param lineStartY - The Y coordinate at which the message line starts\n * @param diagObj - The diagram object.\n */\nconst drawMessage = async function (diagram, msgModel, lineStartY: number, diagObj: Diagram) {\n const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel;\n const textDims = utils.calculateTextDimensions(message, messageFont(conf));\n const textObj = svgDrawCommon.getTextObj();\n textObj.x = startx;\n textObj.y = starty + 10;\n textObj.width = stopx - startx;\n textObj.class = 'messageText';\n textObj.dy = '1em';\n textObj.text = message;\n textObj.fontFamily = conf.messageFontFamily;\n textObj.fontSize = conf.messageFontSize;\n textObj.fontWeight = conf.messageFontWeight;\n textObj.anchor = conf.messageAlign;\n textObj.valign = 'center';\n textObj.textMargin = conf.wrapPadding;\n textObj.tspan = false;\n\n if (hasKatex(textObj.text)) {\n await drawKatex(diagram, textObj, { startx, stopx, starty: lineStartY });\n } else {\n drawText(diagram, textObj);\n }\n\n const textWidth = textDims.width;\n\n let line;\n if (startx === stopx) {\n if (conf.rightAngles) {\n line = diagram\n .append('path')\n .attr(\n 'd',\n `M ${startx},${lineStartY} H ${\n startx + common.getMax(conf.width / 2, textWidth / 2)\n } V ${lineStartY + 25} H ${startx}`\n );\n } else {\n line = diagram\n .append('path')\n .attr(\n 'd',\n 'M ' +\n startx +\n ',' +\n lineStartY +\n ' C ' +\n (startx + 60) +\n ',' +\n (lineStartY - 10) +\n ' ' +\n (startx + 60) +\n ',' +\n (lineStartY + 30) +\n ' ' +\n startx +\n ',' +\n (lineStartY + 20)\n );\n }\n } else {\n line = diagram.append('line');\n line.attr('x1', startx);\n line.attr('y1', lineStartY);\n line.attr('x2', stopx);\n line.attr('y2', lineStartY);\n }\n // Make an SVG Container\n // Draw the line\n if (\n type === diagObj.db.LINETYPE.DOTTED ||\n type === diagObj.db.LINETYPE.DOTTED_CROSS ||\n type === diagObj.db.LINETYPE.DOTTED_POINT ||\n type === diagObj.db.LINETYPE.DOTTED_OPEN ||\n type === diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED\n ) {\n line.style('stroke-dasharray', '3, 3');\n line.attr('class', 'messageLine1');\n } else {\n line.attr('class', 'messageLine0');\n }\n\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n line.attr('stroke-width', 2);\n line.attr('stroke', 'none'); // handled by theme/css anyway\n line.style('fill', 'none'); // remove any fill colour\n if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (\n type === diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID ||\n type === diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED\n ) {\n line.attr('marker-start', 'url(' + url + '#arrowhead)');\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) {\n line.attr('marker-end', 'url(' + url + '#filled-head)');\n }\n\n if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) {\n line.attr('marker-end', 'url(' + url + '#crosshead)');\n }\n\n // add node number\n if (sequenceVisible || conf.showSequenceNumbers) {\n line.attr('marker-start', 'url(' + url + '#sequencenumber)');\n diagram\n .append('text')\n .attr('x', startx)\n .attr('y', lineStartY + 4)\n .attr('font-family', 'sans-serif')\n .attr('font-size', '12px')\n .attr('text-anchor', 'middle')\n .attr('class', 'sequenceNumber')\n .text(sequenceIndex);\n }\n};\n\nconst addActorRenderingData = function (\n diagram,\n actors,\n createdActors: Map,\n actorKeys,\n verticalPos,\n messages,\n isFooter\n) {\n let prevWidth = 0;\n let prevMargin = 0;\n let prevBox = undefined;\n let maxHeight = 0;\n\n for (const actorKey of actorKeys) {\n const actor = actors.get(actorKey);\n const box = actor.box;\n\n // end of box\n if (prevBox && prevBox != box) {\n if (!isFooter) {\n bounds.models.addBox(prevBox);\n }\n prevMargin += conf.boxMargin + prevBox.margin;\n }\n\n // new box\n if (box && box != prevBox) {\n if (!isFooter) {\n box.x = prevWidth + prevMargin;\n box.y = verticalPos;\n }\n prevMargin += box.margin;\n }\n\n // Add some rendering data to the object\n actor.width = actor.width || conf.width;\n actor.height = common.getMax(actor.height || conf.height, conf.height);\n actor.margin = actor.margin || conf.actorMargin;\n\n maxHeight = common.getMax(maxHeight, actor.height);\n\n // if the actor is created by a message, widen margin\n if (createdActors.get(actor.name)) {\n prevMargin += actor.width / 2;\n }\n\n actor.x = prevWidth + prevMargin;\n actor.starty = bounds.getVerticalPos();\n\n bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height);\n\n prevWidth += actor.width + prevMargin;\n if (actor.box) {\n actor.box.width = prevWidth + box.margin - actor.box.x;\n }\n prevMargin = actor.margin;\n prevBox = actor.box;\n bounds.models.addActor(actor);\n }\n\n // end of box\n if (prevBox && !isFooter) {\n bounds.models.addBox(prevBox);\n }\n\n // Add a margin between the actor boxes and the first arrow\n bounds.bumpVerticalPos(maxHeight);\n};\n\nexport const drawActors = async function (diagram, actors, actorKeys, isFooter) {\n if (!isFooter) {\n for (const actorKey of actorKeys) {\n const actor = actors.get(actorKey);\n // Draw the box with the attached line\n await svgDraw.drawActor(diagram, actor, conf, false);\n }\n } else {\n let maxHeight = 0;\n bounds.bumpVerticalPos(conf.boxMargin * 2);\n for (const actorKey of actorKeys) {\n const actor = actors.get(actorKey);\n if (!actor.stopy) {\n actor.stopy = bounds.getVerticalPos();\n }\n const height = await svgDraw.drawActor(diagram, actor, conf, true);\n maxHeight = common.getMax(maxHeight, height);\n }\n bounds.bumpVerticalPos(maxHeight + conf.boxMargin);\n }\n};\n\nexport const drawActorsPopup = function (diagram, actors, actorKeys, doc) {\n let maxHeight = 0;\n let maxWidth = 0;\n for (const actorKey of actorKeys) {\n const actor = actors.get(actorKey);\n const minMenuWidth = getRequiredPopupWidth(actor);\n const menuDimensions = svgDraw.drawPopup(\n diagram,\n actor,\n minMenuWidth,\n conf,\n conf.forceMenus,\n doc\n );\n if (menuDimensions.height > maxHeight) {\n maxHeight = menuDimensions.height;\n }\n if (menuDimensions.width + actor.x > maxWidth) {\n maxWidth = menuDimensions.width + actor.x;\n }\n }\n\n return { maxHeight: maxHeight, maxWidth: maxWidth };\n};\n\nexport const setConf = function (cnf) {\n assignWithDepth(conf, cnf);\n\n if (cnf.fontFamily) {\n conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n};\n\nconst actorActivations = function (actor) {\n return bounds.activations.filter(function (activation) {\n return activation.actor === actor;\n });\n};\n\nconst activationBounds = function (actor, actors) {\n // handle multiple stacked activations for same actor\n const actorObj = actors.get(actor);\n const activations = actorActivations(actor);\n\n const left = activations.reduce(\n function (acc, activation) {\n return common.getMin(acc, activation.startx);\n },\n actorObj.x + actorObj.width / 2 - 1\n );\n const right = activations.reduce(\n function (acc, activation) {\n return common.getMax(acc, activation.stopx);\n },\n actorObj.x + actorObj.width / 2 + 1\n );\n return [left, right];\n};\n\nfunction adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) {\n bounds.bumpVerticalPos(preMargin);\n let heightAdjust = postMargin;\n if (msg.id && msg.message && loopWidths[msg.id]) {\n const loopWidth = loopWidths[msg.id].width;\n const textConf = messageFont(conf);\n msg.message = utils.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf);\n msg.width = loopWidth;\n msg.wrap = true;\n\n // const lines = common.splitBreaks(msg.message).length;\n const textDims = utils.calculateTextDimensions(msg.message, textConf);\n const totalOffset = common.getMax(textDims.height, conf.labelBoxHeight);\n heightAdjust = postMargin + totalOffset;\n log.debug(`${totalOffset} - ${msg.message}`);\n }\n addLoopFn(msg);\n bounds.bumpVerticalPos(heightAdjust);\n}\n\n/**\n * Adjust the msgModel and the actor for the rendering in case the latter is created or destroyed by the msg\n * @param msg - the potentially creating or destroying message\n * @param msgModel - the model associated with the message\n * @param lineStartY - the y position of the message line\n * @param index - the index of the current actor under consideration\n * @param actors - the array of all actors\n * @param createdActors - the array of actors created in the diagram\n * @param destroyedActors - the array of actors destroyed in the diagram\n */\nfunction adjustCreatedDestroyedData(\n msg,\n msgModel,\n lineStartY,\n index,\n actors,\n createdActors,\n destroyedActors\n) {\n function receiverAdjustment(actor, adjustment) {\n if (actor.x < actors.get(msg.from).x) {\n bounds.insert(\n msgModel.stopx - adjustment,\n msgModel.starty,\n msgModel.startx,\n msgModel.stopy + actor.height / 2 + conf.noteMargin\n );\n msgModel.stopx = msgModel.stopx + adjustment;\n } else {\n bounds.insert(\n msgModel.startx,\n msgModel.starty,\n msgModel.stopx + adjustment,\n msgModel.stopy + actor.height / 2 + conf.noteMargin\n );\n msgModel.stopx = msgModel.stopx - adjustment;\n }\n }\n\n function senderAdjustment(actor, adjustment) {\n if (actor.x < actors.get(msg.to).x) {\n bounds.insert(\n msgModel.startx - adjustment,\n msgModel.starty,\n msgModel.stopx,\n msgModel.stopy + actor.height / 2 + conf.noteMargin\n );\n msgModel.startx = msgModel.startx + adjustment;\n } else {\n bounds.insert(\n msgModel.stopx,\n msgModel.starty,\n msgModel.startx + adjustment,\n msgModel.stopy + actor.height / 2 + conf.noteMargin\n );\n msgModel.startx = msgModel.startx - adjustment;\n }\n }\n\n // if it is a create message\n if (createdActors.get(msg.to) == index) {\n const actor = actors.get(msg.to);\n const adjustment = actor.type == 'actor' ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;\n receiverAdjustment(actor, adjustment);\n actor.starty = lineStartY - actor.height / 2;\n bounds.bumpVerticalPos(actor.height / 2);\n }\n // if it is a destroy sender message\n else if (destroyedActors.get(msg.from) == index) {\n const actor = actors.get(msg.from);\n if (conf.mirrorActors) {\n const adjustment = actor.type == 'actor' ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2;\n senderAdjustment(actor, adjustment);\n }\n actor.stopy = lineStartY - actor.height / 2;\n bounds.bumpVerticalPos(actor.height / 2);\n }\n // if it is a destroy receiver message\n else if (destroyedActors.get(msg.to) == index) {\n const actor = actors.get(msg.to);\n if (conf.mirrorActors) {\n const adjustment = actor.type == 'actor' ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;\n receiverAdjustment(actor, adjustment);\n }\n actor.stopy = lineStartY - actor.height / 2;\n bounds.bumpVerticalPos(actor.height / 2);\n }\n}\n\n/**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n *\n * @param _text - The text of the diagram\n * @param id - The id of the diagram which will be used as a DOM element id\u00A8\n * @param _version - Mermaid version from package.json\n * @param diagObj - A standard diagram containing the db and the text and type etc of the diagram\n */\nexport const draw = async function (_text: string, id: string, _version: string, diagObj: Diagram) {\n const { securityLevel, sequence } = getConfig();\n conf = sequence;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n bounds.init();\n log.debug(diagObj.db);\n\n const diagram =\n securityLevel === 'sandbox' ? root.select(`[id=\"${id}\"]`) : select(`[id=\"${id}\"]`);\n\n // Fetch data from the parsing\n const actors = diagObj.db.getActors();\n const createdActors = diagObj.db.getCreatedActors();\n const destroyedActors = diagObj.db.getDestroyedActors();\n const boxes = diagObj.db.getBoxes();\n let actorKeys = diagObj.db.getActorKeys();\n const messages = diagObj.db.getMessages();\n const title = diagObj.db.getDiagramTitle();\n const hasBoxes = diagObj.db.hasAtLeastOneBox();\n const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle();\n const maxMessageWidthPerActor = await getMaxMessageWidthPerActor(actors, messages, diagObj);\n conf.height = await calculateActorMargins(actors, maxMessageWidthPerActor, boxes);\n\n svgDraw.insertComputerIcon(diagram);\n svgDraw.insertDatabaseIcon(diagram);\n svgDraw.insertClockIcon(diagram);\n\n if (hasBoxes) {\n bounds.bumpVerticalPos(conf.boxMargin);\n if (hasBoxTitles) {\n bounds.bumpVerticalPos(boxes[0].textMaxHeight);\n }\n }\n\n if (conf.hideUnusedParticipants === true) {\n const newActors = new Set();\n messages.forEach((message) => {\n newActors.add(message.from);\n newActors.add(message.to);\n });\n actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey));\n }\n\n addActorRenderingData(diagram, actors, createdActors, actorKeys, 0, messages, false);\n const loopWidths = await calculateLoopBounds(messages, actors, maxMessageWidthPerActor, diagObj);\n\n // The arrow head definition is attached to the svg once\n svgDraw.insertArrowHead(diagram);\n svgDraw.insertArrowCrossHead(diagram);\n svgDraw.insertArrowFilledHead(diagram);\n svgDraw.insertSequenceNumber(diagram);\n\n /**\n * @param msg - The message to draw.\n * @param verticalPos - The vertical position of the message.\n */\n function activeEnd(msg: any, verticalPos: number) {\n const activationData = bounds.endActivation(msg);\n if (activationData.starty + 18 > verticalPos) {\n activationData.starty = verticalPos - 6;\n verticalPos += 12;\n }\n svgDraw.drawActivation(\n diagram,\n activationData,\n verticalPos,\n conf,\n actorActivations(msg.from).length\n );\n\n bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);\n }\n\n // Draw the messages/signals\n let sequenceIndex = 1;\n let sequenceIndexStep = 1;\n const messagesToDraw = [];\n const backgrounds = [];\n let index = 0;\n for (const msg of messages) {\n let loopModel, noteModel, msgModel;\n\n switch (msg.type) {\n case diagObj.db.LINETYPE.NOTE:\n bounds.resetVerticalPos();\n noteModel = msg.noteModel;\n await drawNote(diagram, noteModel);\n break;\n case diagObj.db.LINETYPE.ACTIVE_START:\n bounds.newActivation(msg, diagram, actors);\n break;\n case diagObj.db.LINETYPE.ACTIVE_END:\n activeEnd(msg, bounds.getVerticalPos());\n break;\n case diagObj.db.LINETYPE.LOOP_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.LOOP_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'loop', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.RECT_START:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin, (message) =>\n bounds.newLoop(undefined, message.message)\n );\n break;\n case diagObj.db.LINETYPE.RECT_END:\n loopModel = bounds.endLoop();\n backgrounds.push(loopModel);\n bounds.models.addLoop(loopModel);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n break;\n case diagObj.db.LINETYPE.OPT_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.OPT_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'opt', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.ALT_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.ALT_ELSE:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n (message) => bounds.addSectionToLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.ALT_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'alt', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.PAR_START:\n case diagObj.db.LINETYPE.PAR_OVER_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n bounds.saveVerticalPos();\n break;\n case diagObj.db.LINETYPE.PAR_AND:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n (message) => bounds.addSectionToLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.PAR_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'par', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.AUTONUMBER:\n sequenceIndex = msg.message.start || sequenceIndex;\n sequenceIndexStep = msg.message.step || sequenceIndexStep;\n if (msg.message.visible) {\n diagObj.db.enableSequenceNumbers();\n } else {\n diagObj.db.disableSequenceNumbers();\n }\n break;\n case diagObj.db.LINETYPE.CRITICAL_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.CRITICAL_OPTION:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n (message) => bounds.addSectionToLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.CRITICAL_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'critical', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.BREAK_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.BREAK_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'break', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n default:\n try {\n msgModel = msg.msgModel;\n msgModel.starty = bounds.getVerticalPos();\n msgModel.sequenceIndex = sequenceIndex;\n msgModel.sequenceVisible = diagObj.db.showSequenceNumbers();\n const lineStartY = await boundMessage(diagram, msgModel);\n adjustCreatedDestroyedData(\n msg,\n msgModel,\n lineStartY,\n index,\n actors,\n createdActors,\n destroyedActors\n );\n messagesToDraw.push({ messageModel: msgModel, lineStartY: lineStartY });\n bounds.models.addMessage(msgModel);\n } catch (e) {\n log.error('error while drawing message', e);\n }\n }\n\n // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc)\n if (\n [\n diagObj.db.LINETYPE.SOLID_OPEN,\n diagObj.db.LINETYPE.DOTTED_OPEN,\n diagObj.db.LINETYPE.SOLID,\n diagObj.db.LINETYPE.DOTTED,\n diagObj.db.LINETYPE.SOLID_CROSS,\n diagObj.db.LINETYPE.DOTTED_CROSS,\n diagObj.db.LINETYPE.SOLID_POINT,\n diagObj.db.LINETYPE.DOTTED_POINT,\n diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID,\n diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED,\n ].includes(msg.type)\n ) {\n sequenceIndex = sequenceIndex + sequenceIndexStep;\n }\n index++;\n }\n\n log.debug('createdActors', createdActors);\n log.debug('destroyedActors', destroyedActors);\n await drawActors(diagram, actors, actorKeys, false);\n\n for (const e of messagesToDraw) {\n await drawMessage(diagram, e.messageModel, e.lineStartY, diagObj);\n }\n if (conf.mirrorActors) {\n await drawActors(diagram, actors, actorKeys, true);\n }\n backgrounds.forEach((e) => svgDraw.drawBackgroundRect(diagram, e));\n fixLifeLineHeights(diagram, actors, actorKeys, conf);\n\n for (const box of bounds.models.boxes) {\n box.height = bounds.getVerticalPos() - box.y;\n bounds.insert(box.x, box.y, box.x + box.width, box.height);\n box.startx = box.x;\n box.starty = box.y;\n box.stopx = box.startx + box.width;\n box.stopy = box.starty + box.height;\n box.stroke = 'rgb(0,0,0, 0.5)';\n svgDraw.drawBox(diagram, box, conf);\n }\n\n if (hasBoxes) {\n bounds.bumpVerticalPos(conf.boxMargin);\n }\n\n // only draw popups for the top row of actors.\n const requiredBoxSize = drawActorsPopup(diagram, actors, actorKeys, doc);\n\n const { bounds: box } = bounds.getBounds();\n\n if (box.startx === undefined) {\n box.startx = 0;\n }\n if (box.starty === undefined) {\n box.starty = 0;\n }\n if (box.stopx === undefined) {\n box.stopx = 0;\n }\n if (box.stopy === undefined) {\n box.stopy = 0;\n }\n\n // Make sure the height of the diagram supports long menus.\n let boxHeight = box.stopy - box.starty;\n if (boxHeight < requiredBoxSize.maxHeight) {\n boxHeight = requiredBoxSize.maxHeight;\n }\n\n let height = boxHeight + 2 * conf.diagramMarginY;\n if (conf.mirrorActors) {\n height = height - conf.boxMargin + conf.bottomMarginAdj;\n }\n\n // Make sure the width of the diagram supports wide menus.\n let boxWidth = box.stopx - box.startx;\n if (boxWidth < requiredBoxSize.maxWidth) {\n boxWidth = requiredBoxSize.maxWidth;\n }\n const width = boxWidth + 2 * conf.diagramMarginX;\n\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX)\n .attr('y', -25);\n }\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n const extraVertForTitle = title ? 40 : 0;\n diagram.attr(\n 'viewBox',\n box.startx -\n conf.diagramMarginX +\n ' -' +\n (conf.diagramMarginY + extraVertForTitle) +\n ' ' +\n width +\n ' ' +\n (height + extraVertForTitle)\n );\n\n log.debug(`models:`, bounds.models);\n};\n\n/**\n * Retrieves the max message width of each actor, supports signals (messages, loops) and notes.\n *\n * It will enumerate each given message, and will determine its text width, in relation to the actor\n * it originates from, and destined to.\n *\n * @param actors - The actors map\n * @param messages - A list of message objects to iterate\n * @param diagObj - The diagram object.\n * @returns The max message width of each actor.\n */\nasync function getMaxMessageWidthPerActor(\n actors: Map,\n messages: any[],\n diagObj: Diagram\n): Promise> {\n const maxMessageWidthPerActor = {};\n\n for (const msg of messages) {\n if (actors.get(msg.to) && actors.get(msg.from)) {\n const actor = actors.get(msg.to);\n\n // If this is the first actor, and the message is left of it, no need to calculate the margin\n if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) {\n continue;\n }\n\n // If this is the last actor, and the message is right of it, no need to calculate the margin\n if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) {\n continue;\n }\n\n const isNote = msg.placement !== undefined;\n const isMessage = !isNote;\n\n const textFont = isNote ? noteFont(conf) : messageFont(conf);\n const wrappedMessage = msg.wrap\n ? utils.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont)\n : msg.message;\n const messageDimensions = hasKatex(wrappedMessage)\n ? await calculateMathMLDimensions(msg.message, getConfig())\n : utils.calculateTextDimensions(wrappedMessage, textFont);\n const messageWidth = messageDimensions.width + 2 * conf.wrapPadding;\n\n /*\n * The following scenarios should be supported:\n *\n * - There's a message (non-note) between fromActor and toActor\n * - If fromActor is on the right and toActor is on the left, we should\n * define the toActor's margin\n * - If fromActor is on the left and toActor is on the right, we should\n * define the fromActor's margin\n * - There's a note, in which case fromActor == toActor\n * - If the note is to the left of the actor, we should define the previous actor\n * margin\n * - If the note is on the actor, we should define both the previous and next actor\n * margins, each being the half of the note size\n * - If the note is on the right of the actor, we should define the current actor\n * margin\n */\n if (isMessage && msg.from === actor.nextActor) {\n maxMessageWidthPerActor[msg.to] = common.getMax(\n maxMessageWidthPerActor[msg.to] || 0,\n messageWidth\n );\n } else if (isMessage && msg.from === actor.prevActor) {\n maxMessageWidthPerActor[msg.from] = common.getMax(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth\n );\n } else if (isMessage && msg.from === msg.to) {\n maxMessageWidthPerActor[msg.from] = common.getMax(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth / 2\n );\n\n maxMessageWidthPerActor[msg.to] = common.getMax(\n maxMessageWidthPerActor[msg.to] || 0,\n messageWidth / 2\n );\n } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {\n maxMessageWidthPerActor[msg.from] = common.getMax(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth\n );\n } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {\n maxMessageWidthPerActor[actor.prevActor] = common.getMax(\n maxMessageWidthPerActor[actor.prevActor] || 0,\n messageWidth\n );\n } else if (msg.placement === diagObj.db.PLACEMENT.OVER) {\n if (actor.prevActor) {\n maxMessageWidthPerActor[actor.prevActor] = common.getMax(\n maxMessageWidthPerActor[actor.prevActor] || 0,\n messageWidth / 2\n );\n }\n\n if (actor.nextActor) {\n maxMessageWidthPerActor[msg.from] = common.getMax(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth / 2\n );\n }\n }\n }\n }\n\n log.debug('maxMessageWidthPerActor:', maxMessageWidthPerActor);\n return maxMessageWidthPerActor;\n}\n\nconst getRequiredPopupWidth = function (actor) {\n let requiredPopupWidth = 0;\n const textFont = actorFont(conf);\n for (const key in actor.links) {\n const labelDimensions = utils.calculateTextDimensions(key, textFont);\n const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin;\n if (requiredPopupWidth < labelWidth) {\n requiredPopupWidth = labelWidth;\n }\n }\n\n return requiredPopupWidth;\n};\n\n/**\n * This will calculate the optimal margin for each given actor,\n * for a given actor \u2192 messageWidth map.\n *\n * An actor's margin is determined by the width of the actor, the width of the largest message that\n * originates from it, and the configured conf.actorMargin.\n *\n * @param actors - The actors map to calculate margins for\n * @param actorToMessageWidth - A map of actor key \u2192 max message width it holds\n * @param boxes - The boxes around the actors if any\n */\nasync function calculateActorMargins(\n actors: Map,\n actorToMessageWidth: Awaited>,\n boxes\n) {\n let maxHeight = 0;\n for (const prop of actors.keys()) {\n const actor = actors.get(prop);\n if (actor.wrap) {\n actor.description = utils.wrapLabel(\n actor.description,\n conf.width - 2 * conf.wrapPadding,\n actorFont(conf)\n );\n }\n const actDims = hasKatex(actor.description)\n ? await calculateMathMLDimensions(actor.description, getConfig())\n : utils.calculateTextDimensions(actor.description, actorFont(conf));\n\n actor.width = actor.wrap\n ? conf.width\n : common.getMax(conf.width, actDims.width + 2 * conf.wrapPadding);\n\n actor.height = actor.wrap ? common.getMax(actDims.height, conf.height) : conf.height;\n maxHeight = common.getMax(maxHeight, actor.height);\n }\n\n for (const actorKey in actorToMessageWidth) {\n const actor = actors.get(actorKey);\n\n if (!actor) {\n continue;\n }\n\n const nextActor = actors.get(actor.nextActor);\n\n // No need to space out an actor that doesn't have a next link\n if (!nextActor) {\n const messageWidth = actorToMessageWidth[actorKey];\n const actorWidth = messageWidth + conf.actorMargin - actor.width / 2;\n actor.margin = common.getMax(actorWidth, conf.actorMargin);\n continue;\n }\n\n const messageWidth = actorToMessageWidth[actorKey];\n const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2;\n\n actor.margin = common.getMax(actorWidth, conf.actorMargin);\n }\n\n let maxBoxHeight = 0;\n boxes.forEach((box) => {\n const textFont = messageFont(conf);\n let totalWidth = box.actorKeys.reduce((total, aKey) => {\n return (total += actors.get(aKey).width + (actors.get(aKey).margin || 0));\n }, 0);\n\n totalWidth -= 2 * conf.boxTextMargin;\n if (box.wrap) {\n box.name = utils.wrapLabel(box.name, totalWidth - 2 * conf.wrapPadding, textFont);\n }\n\n const boxMsgDimensions = utils.calculateTextDimensions(box.name, textFont);\n maxBoxHeight = common.getMax(boxMsgDimensions.height, maxBoxHeight);\n const minWidth = common.getMax(totalWidth, boxMsgDimensions.width + 2 * conf.wrapPadding);\n box.margin = conf.boxTextMargin;\n if (totalWidth < minWidth) {\n const missing = (minWidth - totalWidth) / 2;\n box.margin += missing;\n }\n });\n boxes.forEach((box) => (box.textMaxHeight = maxBoxHeight));\n\n return common.getMax(maxHeight, conf.height);\n}\n\nconst buildNoteModel = async function (msg, actors, diagObj) {\n const fromActor = actors.get(msg.from);\n const toActor = actors.get(msg.to);\n const startx = fromActor.x;\n const stopx = toActor.x;\n const shouldWrap = msg.wrap && msg.message;\n\n let textDimensions: { width: number; height: number; lineHeight?: number } = hasKatex(msg.message)\n ? await calculateMathMLDimensions(msg.message, getConfig())\n : utils.calculateTextDimensions(\n shouldWrap ? utils.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message,\n noteFont(conf)\n );\n const noteModel = {\n width: shouldWrap\n ? conf.width\n : common.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin),\n height: 0,\n startx: fromActor.x,\n stopx: 0,\n starty: 0,\n stopy: 0,\n message: msg.message,\n };\n if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {\n noteModel.width = shouldWrap\n ? common.getMax(conf.width, textDimensions.width)\n : common.getMax(\n fromActor.width / 2 + toActor.width / 2,\n textDimensions.width + 2 * conf.noteMargin\n );\n noteModel.startx = startx + (fromActor.width + conf.actorMargin) / 2;\n } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {\n noteModel.width = shouldWrap\n ? common.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin)\n : common.getMax(\n fromActor.width / 2 + toActor.width / 2,\n textDimensions.width + 2 * conf.noteMargin\n );\n noteModel.startx = startx - noteModel.width + (fromActor.width - conf.actorMargin) / 2;\n } else if (msg.to === msg.from) {\n textDimensions = utils.calculateTextDimensions(\n shouldWrap\n ? utils.wrapLabel(msg.message, common.getMax(conf.width, fromActor.width), noteFont(conf))\n : msg.message,\n noteFont(conf)\n );\n noteModel.width = shouldWrap\n ? common.getMax(conf.width, fromActor.width)\n : common.getMax(fromActor.width, conf.width, textDimensions.width + 2 * conf.noteMargin);\n noteModel.startx = startx + (fromActor.width - noteModel.width) / 2;\n } else {\n noteModel.width =\n Math.abs(startx + fromActor.width / 2 - (stopx + toActor.width / 2)) + conf.actorMargin;\n noteModel.startx =\n startx < stopx\n ? startx + fromActor.width / 2 - conf.actorMargin / 2\n : stopx + toActor.width / 2 - conf.actorMargin / 2;\n }\n if (shouldWrap) {\n noteModel.message = utils.wrapLabel(\n msg.message,\n noteModel.width - 2 * conf.wrapPadding,\n noteFont(conf)\n );\n }\n log.debug(\n `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]`\n );\n return noteModel;\n};\n\nconst buildMessageModel = function (msg, actors, diagObj) {\n if (\n ![\n diagObj.db.LINETYPE.SOLID_OPEN,\n diagObj.db.LINETYPE.DOTTED_OPEN,\n diagObj.db.LINETYPE.SOLID,\n diagObj.db.LINETYPE.DOTTED,\n diagObj.db.LINETYPE.SOLID_CROSS,\n diagObj.db.LINETYPE.DOTTED_CROSS,\n diagObj.db.LINETYPE.SOLID_POINT,\n diagObj.db.LINETYPE.DOTTED_POINT,\n diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID,\n diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED,\n ].includes(msg.type)\n ) {\n return {};\n }\n const [fromLeft, fromRight] = activationBounds(msg.from, actors);\n const [toLeft, toRight] = activationBounds(msg.to, actors);\n const isArrowToRight = fromLeft <= toLeft;\n let startx = isArrowToRight ? fromRight : fromLeft;\n let stopx = isArrowToRight ? toLeft : toRight;\n\n // As the line width is considered, the left and right values will be off by 2.\n const isArrowToActivation = Math.abs(toLeft - toRight) > 2;\n\n /**\n * Adjust the value based on the arrow direction\n * @param value - The value to adjust\n * @returns The adjustment with correct sign to be added to the actual value.\n */\n const adjustValue = (value: number) => {\n return isArrowToRight ? -value : value;\n };\n\n if (msg.from === msg.to) {\n // This is a self reference, so we need to make sure the arrow is drawn correctly\n // There are many checks in the downstream rendering that checks for equality.\n // The lines on loops will be off by few pixels, but that's fine for now.\n stopx = startx;\n } else {\n /**\n * This is an edge case for the first activation.\n * Proper fix would require significant changes.\n * So, we set an activate flag in the message, and cross check that with isToActivation\n * In cases where the message is to an activation that was properly detected, we don't want to move the arrow head\n * The activation will not be detected on the first message, so we need to move the arrow head\n */\n if (msg.activate && !isArrowToActivation) {\n stopx += adjustValue(conf.activationWidth / 2 - 1);\n }\n\n /**\n * Shorten the length of arrow at the end and move the marker forward (using refX) to have a clean arrowhead\n * This is not required for open arrows that don't have arrowheads\n */\n if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) {\n stopx += adjustValue(3);\n }\n\n /**\n * Shorten start position of bidirectional arrow to accommodate for second arrowhead\n */\n if (\n [diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID, diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(\n msg.type\n )\n ) {\n startx -= adjustValue(3);\n }\n }\n\n const allBounds = [fromLeft, fromRight, toLeft, toRight];\n const boundedWidth = Math.abs(startx - stopx);\n if (msg.wrap && msg.message) {\n msg.message = utils.wrapLabel(\n msg.message,\n common.getMax(boundedWidth + 2 * conf.wrapPadding, conf.width),\n messageFont(conf)\n );\n }\n const msgDims = utils.calculateTextDimensions(msg.message, messageFont(conf));\n\n return {\n width: common.getMax(\n msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding,\n boundedWidth + 2 * conf.wrapPadding,\n conf.width\n ),\n height: 0,\n startx,\n stopx,\n starty: 0,\n stopy: 0,\n message: msg.message,\n type: msg.type,\n wrap: msg.wrap,\n fromBounds: Math.min.apply(null, allBounds),\n toBounds: Math.max.apply(null, allBounds),\n };\n};\n\nconst calculateLoopBounds = async function (messages, actors, _maxWidthPerActor, diagObj) {\n const loops = {};\n const stack = [];\n let current, noteModel, msgModel;\n\n for (const msg of messages) {\n msg.id = utils.random({ length: 10 });\n switch (msg.type) {\n case diagObj.db.LINETYPE.LOOP_START:\n case diagObj.db.LINETYPE.ALT_START:\n case diagObj.db.LINETYPE.OPT_START:\n case diagObj.db.LINETYPE.PAR_START:\n case diagObj.db.LINETYPE.PAR_OVER_START:\n case diagObj.db.LINETYPE.CRITICAL_START:\n case diagObj.db.LINETYPE.BREAK_START:\n stack.push({\n id: msg.id,\n msg: msg.message,\n from: Number.MAX_SAFE_INTEGER,\n to: Number.MIN_SAFE_INTEGER,\n width: 0,\n });\n break;\n case diagObj.db.LINETYPE.ALT_ELSE:\n case diagObj.db.LINETYPE.PAR_AND:\n case diagObj.db.LINETYPE.CRITICAL_OPTION:\n if (msg.message) {\n current = stack.pop();\n loops[current.id] = current;\n loops[msg.id] = current;\n stack.push(current);\n }\n break;\n case diagObj.db.LINETYPE.LOOP_END:\n case diagObj.db.LINETYPE.ALT_END:\n case diagObj.db.LINETYPE.OPT_END:\n case diagObj.db.LINETYPE.PAR_END:\n case diagObj.db.LINETYPE.CRITICAL_END:\n case diagObj.db.LINETYPE.BREAK_END:\n current = stack.pop();\n loops[current.id] = current;\n break;\n case diagObj.db.LINETYPE.ACTIVE_START:\n {\n const actorRect = actors.get(msg.from ? msg.from : msg.to.actor);\n const stackedSize = actorActivations(msg.from ? msg.from : msg.to.actor).length;\n const x =\n actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;\n const toAdd = {\n startx: x,\n stopx: x + conf.activationWidth,\n actor: msg.from,\n enabled: true,\n };\n bounds.activations.push(toAdd);\n }\n break;\n case diagObj.db.LINETYPE.ACTIVE_END:\n {\n const lastActorActivationIdx = bounds.activations\n .map((a) => a.actor)\n .lastIndexOf(msg.from);\n bounds.activations.splice(lastActorActivationIdx, 1).splice(0, 1);\n }\n break;\n }\n const isNote = msg.placement !== undefined;\n if (isNote) {\n noteModel = await buildNoteModel(msg, actors, diagObj);\n msg.noteModel = noteModel;\n stack.forEach((stk) => {\n current = stk;\n current.from = common.getMin(current.from, noteModel.startx);\n current.to = common.getMax(current.to, noteModel.startx + noteModel.width);\n current.width =\n common.getMax(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth;\n });\n } else {\n msgModel = buildMessageModel(msg, actors, diagObj);\n msg.msgModel = msgModel;\n if (msgModel.startx && msgModel.stopx && stack.length > 0) {\n stack.forEach((stk) => {\n current = stk;\n if (msgModel.startx === msgModel.stopx) {\n const from = actors.get(msg.from);\n const to = actors.get(msg.to);\n current.from = common.getMin(\n from.x - msgModel.width / 2,\n from.x - from.width / 2,\n current.from\n );\n current.to = common.getMax(\n to.x + msgModel.width / 2,\n to.x + from.width / 2,\n current.to\n );\n current.width =\n common.getMax(current.width, Math.abs(current.to - current.from)) -\n conf.labelBoxWidth;\n } else {\n current.from = common.getMin(msgModel.startx, current.from);\n current.to = common.getMax(msgModel.stopx, current.to);\n current.width = common.getMax(current.width, msgModel.width) - conf.labelBoxWidth;\n }\n });\n }\n }\n }\n bounds.activations = [];\n log.debug('Loop type widths:', loops);\n return loops;\n};\n\nexport default {\n bounds,\n drawActors,\n drawActorsPopup,\n setConf,\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/sequenceDiagram.jison';\nimport db from './sequenceDb.js';\nimport styles from './styles.js';\nimport renderer from './sequenceRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: ({ wrap }) => {\n db.setWrap(wrap);\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,18],$V1=[1,19],$V2=[1,20],$V3=[1,41],$V4=[1,42],$V5=[1,26],$V6=[1,24],$V7=[1,25],$V8=[1,32],$V9=[1,33],$Va=[1,34],$Vb=[1,45],$Vc=[1,35],$Vd=[1,36],$Ve=[1,37],$Vf=[1,38],$Vg=[1,27],$Vh=[1,28],$Vi=[1,29],$Vj=[1,30],$Vk=[1,31],$Vl=[1,44],$Vm=[1,46],$Vn=[1,43],$Vo=[1,47],$Vp=[1,9],$Vq=[1,8,9],$Vr=[1,58],$Vs=[1,59],$Vt=[1,60],$Vu=[1,61],$Vv=[1,62],$Vw=[1,63],$Vx=[1,64],$Vy=[1,8,9,41],$Vz=[1,76],$VA=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],$VB=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],$VC=[13,58,84,99,101,102],$VD=[13,58,71,72,84,99,101,102],$VE=[13,58,66,67,68,69,70,84,99,101,102],$VF=[1,98],$VG=[1,115],$VH=[1,107],$VI=[1,113],$VJ=[1,108],$VK=[1,109],$VL=[1,110],$VM=[1,111],$VN=[1,112],$VO=[1,114],$VP=[22,58,59,80,84,85,86,87,88,89],$VQ=[1,8,9,39,41,44],$VR=[1,8,9,22],$VS=[1,143],$VT=[1,8,9,59],$VU=[1,8,9,22,58,59,80,84,85,86,87,88,89];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mermaidDoc\":4,\"statements\":5,\"graphConfig\":6,\"CLASS_DIAGRAM\":7,\"NEWLINE\":8,\"EOF\":9,\"statement\":10,\"classLabel\":11,\"SQS\":12,\"STR\":13,\"SQE\":14,\"namespaceName\":15,\"alphaNumToken\":16,\"DOT\":17,\"className\":18,\"classLiteralName\":19,\"GENERICTYPE\":20,\"relationStatement\":21,\"LABEL\":22,\"namespaceStatement\":23,\"classStatement\":24,\"memberStatement\":25,\"annotationStatement\":26,\"clickStatement\":27,\"styleStatement\":28,\"cssClassStatement\":29,\"noteStatement\":30,\"classDefStatement\":31,\"direction\":32,\"acc_title\":33,\"acc_title_value\":34,\"acc_descr\":35,\"acc_descr_value\":36,\"acc_descr_multiline_value\":37,\"namespaceIdentifier\":38,\"STRUCT_START\":39,\"classStatements\":40,\"STRUCT_STOP\":41,\"NAMESPACE\":42,\"classIdentifier\":43,\"STYLE_SEPARATOR\":44,\"members\":45,\"CLASS\":46,\"ANNOTATION_START\":47,\"ANNOTATION_END\":48,\"MEMBER\":49,\"SEPARATOR\":50,\"relation\":51,\"NOTE_FOR\":52,\"noteText\":53,\"NOTE\":54,\"CLASSDEF\":55,\"classList\":56,\"stylesOpt\":57,\"ALPHA\":58,\"COMMA\":59,\"direction_tb\":60,\"direction_bt\":61,\"direction_rl\":62,\"direction_lr\":63,\"relationType\":64,\"lineType\":65,\"AGGREGATION\":66,\"EXTENSION\":67,\"COMPOSITION\":68,\"DEPENDENCY\":69,\"LOLLIPOP\":70,\"LINE\":71,\"DOTTED_LINE\":72,\"CALLBACK\":73,\"LINK\":74,\"LINK_TARGET\":75,\"CLICK\":76,\"CALLBACK_NAME\":77,\"CALLBACK_ARGS\":78,\"HREF\":79,\"STYLE\":80,\"CSSCLASS\":81,\"style\":82,\"styleComponent\":83,\"NUM\":84,\"COLON\":85,\"UNIT\":86,\"SPACE\":87,\"BRKT\":88,\"PCT\":89,\"commentToken\":90,\"textToken\":91,\"graphCodeTokens\":92,\"textNoTagsToken\":93,\"TAGSTART\":94,\"TAGEND\":95,\"==\":96,\"--\":97,\"DEFAULT\":98,\"MINUS\":99,\"keywords\":100,\"UNICODE_TEXT\":101,\"BQUOTE_STR\":102,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",7:\"CLASS_DIAGRAM\",8:\"NEWLINE\",9:\"EOF\",12:\"SQS\",13:\"STR\",14:\"SQE\",17:\"DOT\",20:\"GENERICTYPE\",22:\"LABEL\",33:\"acc_title\",34:\"acc_title_value\",35:\"acc_descr\",36:\"acc_descr_value\",37:\"acc_descr_multiline_value\",39:\"STRUCT_START\",41:\"STRUCT_STOP\",42:\"NAMESPACE\",44:\"STYLE_SEPARATOR\",46:\"CLASS\",47:\"ANNOTATION_START\",48:\"ANNOTATION_END\",49:\"MEMBER\",50:\"SEPARATOR\",52:\"NOTE_FOR\",54:\"NOTE\",55:\"CLASSDEF\",58:\"ALPHA\",59:\"COMMA\",60:\"direction_tb\",61:\"direction_bt\",62:\"direction_rl\",63:\"direction_lr\",66:\"AGGREGATION\",67:\"EXTENSION\",68:\"COMPOSITION\",69:\"DEPENDENCY\",70:\"LOLLIPOP\",71:\"LINE\",72:\"DOTTED_LINE\",73:\"CALLBACK\",74:\"LINK\",75:\"LINK_TARGET\",76:\"CLICK\",77:\"CALLBACK_NAME\",78:\"CALLBACK_ARGS\",79:\"HREF\",80:\"STYLE\",81:\"CSSCLASS\",84:\"NUM\",85:\"COLON\",86:\"UNIT\",87:\"SPACE\",88:\"BRKT\",89:\"PCT\",92:\"graphCodeTokens\",94:\"TAGSTART\",95:\"TAGEND\",96:\"==\",97:\"--\",98:\"DEFAULT\",99:\"MINUS\",100:\"keywords\",101:\"UNICODE_TEXT\",102:\"BQUOTE_STR\"},\nproductions_: [0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 8:\n this.$=$$[$0-1]; \nbreak;\ncase 9: case 12: case 14:\n this.$=$$[$0]; \nbreak;\ncase 10: case 13:\n this.$=$$[$0-2]+'.'+$$[$0]; \nbreak;\ncase 11: case 15:\n this.$=$$[$0-1]+$$[$0]; \nbreak;\ncase 16: case 17:\n this.$=$$[$0-1]+'~'+$$[$0]+'~'; \nbreak;\ncase 18:\n yy.addRelation($$[$0]); \nbreak;\ncase 19:\n $$[$0-1].title = yy.cleanupLabel($$[$0]); yy.addRelation($$[$0-1]); \nbreak;\ncase 30:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 31: case 32:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 33:\n yy.addClassesToNamespace($$[$0-3], $$[$0-1]); \nbreak;\ncase 34:\n yy.addClassesToNamespace($$[$0-4], $$[$0-1]); \nbreak;\ncase 35:\n this.$=$$[$0]; yy.addNamespace($$[$0]); \nbreak;\ncase 36:\nthis.$=[$$[$0]]\nbreak;\ncase 37:\nthis.$=[$$[$0-1]]\nbreak;\ncase 38:\n$$[$0].unshift($$[$0-2]); this.$=$$[$0]\nbreak;\ncase 40:\nyy.setCssClass($$[$0-2], $$[$0]);\nbreak;\ncase 41:\nyy.addMembers($$[$0-3],$$[$0-1]);\nbreak;\ncase 42:\nyy.setCssClass($$[$0-5], $$[$0-3]);yy.addMembers($$[$0-5],$$[$0-1]);\nbreak;\ncase 43:\nthis.$=$$[$0]; yy.addClass($$[$0]);\nbreak;\ncase 44:\nthis.$=$$[$0-1]; yy.addClass($$[$0-1]);yy.setClassLabel($$[$0-1], $$[$0]);\nbreak;\ncase 45:\n yy.addAnnotation($$[$0],$$[$0-2]); \nbreak;\ncase 46: case 59:\n this.$ = [$$[$0]]; \nbreak;\ncase 47:\n $$[$0].push($$[$0-1]);this.$=$$[$0];\nbreak;\ncase 48:\n/*console.log('Rel found',$$[$0]);*/\nbreak;\ncase 49:\nyy.addMember($$[$0-1],yy.cleanupLabel($$[$0]));\nbreak;\ncase 50:\n/*console.warn('Member',$$[$0]);*/\nbreak;\ncase 51:\n/*console.log('sep found',$$[$0]);*/\nbreak;\ncase 52:\n this.$ = {'id1':$$[$0-2],'id2':$$[$0], relation:$$[$0-1], relationTitle1:'none', relationTitle2:'none'}; \nbreak;\ncase 53:\n this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-1], relationTitle1:$$[$0-2], relationTitle2:'none'}\nbreak;\ncase 54:\n this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-2], relationTitle1:'none', relationTitle2:$$[$0-1]}; \nbreak;\ncase 55:\n this.$ = {id1:$$[$0-4], id2:$$[$0], relation:$$[$0-2], relationTitle1:$$[$0-3], relationTitle2:$$[$0-1]} \nbreak;\ncase 56:\n yy.addNote($$[$0], $$[$0-1]); \nbreak;\ncase 57:\n yy.addNote($$[$0]); \nbreak;\ncase 58:\nthis.$ = $$[$0-2];yy.defineClass($$[$0-1],$$[$0]);\nbreak;\ncase 60:\n this.$ = $$[$0-2].concat([$$[$0]]); \nbreak;\ncase 61:\n yy.setDirection('TB');\nbreak;\ncase 62:\n yy.setDirection('BT');\nbreak;\ncase 63:\n yy.setDirection('RL');\nbreak;\ncase 64:\n yy.setDirection('LR');\nbreak;\ncase 65:\n this.$={type1:$$[$0-2],type2:$$[$0],lineType:$$[$0-1]}; \nbreak;\ncase 66:\n this.$={type1:'none',type2:$$[$0],lineType:$$[$0-1]}; \nbreak;\ncase 67:\n this.$={type1:$$[$0-1],type2:'none',lineType:$$[$0]}; \nbreak;\ncase 68:\n this.$={type1:'none',type2:'none',lineType:$$[$0]}; \nbreak;\ncase 69:\n this.$=yy.relationType.AGGREGATION;\nbreak;\ncase 70:\n this.$=yy.relationType.EXTENSION;\nbreak;\ncase 71:\n this.$=yy.relationType.COMPOSITION;\nbreak;\ncase 72:\n this.$=yy.relationType.DEPENDENCY;\nbreak;\ncase 73:\n this.$=yy.relationType.LOLLIPOP;\nbreak;\ncase 74:\nthis.$=yy.lineType.LINE;\nbreak;\ncase 75:\nthis.$=yy.lineType.DOTTED_LINE;\nbreak;\ncase 76: case 82:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-1], $$[$0]);\nbreak;\ncase 77: case 83:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]);\nbreak;\ncase 78:\nthis.$ = $$[$0-2];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 79:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1],$$[$0]);\nbreak;\ncase 80:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]);\nbreak;\ncase 81:\nthis.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-2], $$[$0]);yy.setTooltip($$[$0-3], $$[$0-1]);\nbreak;\ncase 84:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 85:\nthis.$ = $$[$0-4];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 86:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0]);\nbreak;\ncase 87:\nthis.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-1], $$[$0]);\nbreak;\ncase 88:\nthis.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-1]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 89:\nthis.$ = $$[$0-5];yy.setLink($$[$0-4], $$[$0-2], $$[$0]);yy.setTooltip($$[$0-4], $$[$0-1]);\nbreak;\ncase 90:\nthis.$ = $$[$0-2];yy.setCssStyle($$[$0-1],$$[$0]);\nbreak;\ncase 91:\nyy.setCssClass($$[$0-1], $$[$0]);\nbreak;\ncase 92:\nthis.$ = [$$[$0]]\nbreak;\ncase 93:\n$$[$0-2].push($$[$0]);this.$ = $$[$0-2];\nbreak;\ncase 95:\nthis.$ = $$[$0-1] + $$[$0];\nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:$V0,35:$V1,37:$V2,38:22,42:$V3,43:23,46:$V4,47:$V5,49:$V6,50:$V7,52:$V8,54:$V9,55:$Va,58:$Vb,60:$Vc,61:$Vd,62:$Ve,63:$Vf,73:$Vg,74:$Vh,76:$Vi,80:$Vj,81:$Vk,84:$Vl,99:$Vm,101:$Vn,102:$Vo},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},o($Vp,[2,5],{8:[1,48]}),{8:[1,49]},o($Vq,[2,18],{22:[1,50]}),o($Vq,[2,20]),o($Vq,[2,21]),o($Vq,[2,22]),o($Vq,[2,23]),o($Vq,[2,24]),o($Vq,[2,25]),o($Vq,[2,26]),o($Vq,[2,27]),o($Vq,[2,28]),o($Vq,[2,29]),{34:[1,51]},{36:[1,52]},o($Vq,[2,32]),o($Vq,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:$Vr,67:$Vs,68:$Vt,69:$Vu,70:$Vv,71:$Vw,72:$Vx}),{39:[1,65]},o($Vy,[2,39],{39:[1,67],44:[1,66]}),o($Vq,[2,50]),o($Vq,[2,51]),{16:68,58:$Vb,84:$Vl,99:$Vm,101:$Vn},{16:39,18:69,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},{16:39,18:70,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},{16:39,18:71,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},{13:$Vz,53:75},{56:77,58:[1,78]},o($Vq,[2,61]),o($Vq,[2,62]),o($Vq,[2,63]),o($Vq,[2,64]),o($VA,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo}),o($VA,[2,14],{20:[1,82]}),{15:83,16:84,58:$Vb,84:$Vl,99:$Vm,101:$Vn},{16:39,18:85,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},o($VB,[2,118]),o($VB,[2,119]),o($VB,[2,120]),o($VB,[2,121]),o([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),o($Vp,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:$V0,35:$V1,37:$V2,42:$V3,46:$V4,47:$V5,49:$V6,50:$V7,52:$V8,54:$V9,55:$Va,58:$Vb,60:$Vc,61:$Vd,62:$Ve,63:$Vf,73:$Vg,74:$Vh,76:$Vi,80:$Vj,81:$Vk,84:$Vl,99:$Vm,101:$Vn,102:$Vo}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:$V0,35:$V1,37:$V2,38:22,42:$V3,43:23,46:$V4,47:$V5,49:$V6,50:$V7,52:$V8,54:$V9,55:$Va,58:$Vb,60:$Vc,61:$Vd,62:$Ve,63:$Vf,73:$Vg,74:$Vh,76:$Vi,80:$Vj,81:$Vk,84:$Vl,99:$Vm,101:$Vn,102:$Vo},o($Vq,[2,19]),o($Vq,[2,30]),o($Vq,[2,31]),{13:[1,89],16:39,18:88,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},{51:90,64:56,65:57,66:$Vr,67:$Vs,68:$Vt,69:$Vu,70:$Vv,71:$Vw,72:$Vx},o($Vq,[2,49]),{65:91,71:$Vw,72:$Vx},o($VC,[2,68],{64:92,66:$Vr,67:$Vs,68:$Vt,69:$Vu,70:$Vv}),o($VD,[2,69]),o($VD,[2,70]),o($VD,[2,71]),o($VD,[2,72]),o($VD,[2,73]),o($VE,[2,74]),o($VE,[2,75]),{8:[1,94],24:95,40:93,43:23,46:$V4},{16:96,58:$Vb,84:$Vl,99:$Vm,101:$Vn},{45:97,49:$VF},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:$VG,57:104,58:$VH,80:$VI,82:105,83:106,84:$VJ,85:$VK,86:$VL,87:$VM,88:$VN,89:$VO},{58:[1,116]},{13:$Vz,53:117},o($Vq,[2,57]),o($Vq,[2,123]),{22:$VG,57:118,58:$VH,59:[1,119],80:$VI,82:105,83:106,84:$VJ,85:$VK,86:$VL,87:$VM,88:$VN,89:$VO},o($VP,[2,59]),{16:39,18:120,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},o($VA,[2,15]),o($VA,[2,16]),o($VA,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:$Vb,84:$Vl,99:$Vm,101:$Vn},o($VQ,[2,43],{11:123,12:[1,124]}),o($Vp,[2,7]),{9:[1,125]},o($VR,[2,52]),{16:39,18:126,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},{13:[1,128],16:39,18:127,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},o($VC,[2,67],{64:129,66:$Vr,67:$Vs,68:$Vt,69:$Vu,70:$Vv}),o($VC,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:$V4},{8:[1,132],41:[2,36]},o($Vy,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:$VF},{16:39,18:136,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},o($Vq,[2,76],{13:[1,137]}),o($Vq,[2,78],{13:[1,139],75:[1,138]}),o($Vq,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},o($Vq,[2,90],{59:$VS}),o($VT,[2,92],{83:144,22:$VG,58:$VH,80:$VI,84:$VJ,85:$VK,86:$VL,87:$VM,88:$VN,89:$VO}),o($VU,[2,94]),o($VU,[2,96]),o($VU,[2,97]),o($VU,[2,98]),o($VU,[2,99]),o($VU,[2,100]),o($VU,[2,101]),o($VU,[2,102]),o($VU,[2,103]),o($VU,[2,104]),o($Vq,[2,91]),o($Vq,[2,56]),o($Vq,[2,58],{59:$VS}),{58:[1,145]},o($VA,[2,13]),{15:146,16:84,58:$Vb,84:$Vl,99:$Vm,101:$Vn},{39:[2,11]},o($VQ,[2,44]),{13:[1,147]},{1:[2,4]},o($VR,[2,54]),o($VR,[2,53]),{16:39,18:148,19:40,58:$Vb,84:$Vl,99:$Vm,101:$Vn,102:$Vo},o($VC,[2,65]),o($Vq,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:$V4},{45:151,49:$VF},o($Vy,[2,41]),{41:[2,47]},o($Vq,[2,45]),o($Vq,[2,77]),o($Vq,[2,79]),o($Vq,[2,80],{75:[1,152]}),o($Vq,[2,83]),o($Vq,[2,84],{13:[1,153]}),o($Vq,[2,86],{13:[1,155],75:[1,154]}),{22:$VG,58:$VH,80:$VI,82:156,83:106,84:$VJ,85:$VK,86:$VL,87:$VM,88:$VN,89:$VO},o($VU,[2,95]),o($VP,[2,60]),{39:[2,10]},{14:[1,157]},o($VR,[2,55]),o($Vq,[2,34]),{41:[2,38]},{41:[1,158]},o($Vq,[2,81]),o($Vq,[2,85]),o($Vq,[2,87]),o($Vq,[2,88],{75:[1,159]}),o($VT,[2,93],{83:144,22:$VG,58:$VH,80:$VI,84:$VJ,85:$VK,86:$VL,87:$VM,88:$VN,89:$VO}),o($VQ,[2,8]),o($Vy,[2,42]),o($Vq,[2,89])],\ndefaultActions: {2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 60;\nbreak;\ncase 1:return 61;\nbreak;\ncase 2:return 62;\nbreak;\ncase 3:return 63;\nbreak;\ncase 4:/* skip comments */\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6: this.begin(\"acc_title\");return 33; \nbreak;\ncase 7: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 8: this.begin(\"acc_descr\");return 35; \nbreak;\ncase 9: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 10: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 11: this.popState(); \nbreak;\ncase 12:return \"acc_descr_multiline_value\";\nbreak;\ncase 13:return 8;\nbreak;\ncase 14:/* skip whitespace */\nbreak;\ncase 15:return 7;\nbreak;\ncase 16:return 7;\nbreak;\ncase 17:return 'EDGE_STATE';\nbreak;\ncase 18:this.begin(\"callback_name\");\nbreak;\ncase 19:this.popState();\nbreak;\ncase 20:this.popState(); this.begin(\"callback_args\");\nbreak;\ncase 21:return 77;\nbreak;\ncase 22:this.popState();\nbreak;\ncase 23:return 78;\nbreak;\ncase 24:this.popState();\nbreak;\ncase 25:return \"STR\";\nbreak;\ncase 26:this.begin(\"string\");\nbreak;\ncase 27:return 80;\nbreak;\ncase 28:return 55;\nbreak;\ncase 29: this.begin('namespace'); return 42; \nbreak;\ncase 30: this.popState(); return 8; \nbreak;\ncase 31:/* skip whitespace */\nbreak;\ncase 32: this.begin(\"namespace-body\"); return 39;\nbreak;\ncase 33: this.popState(); return 41; \nbreak;\ncase 34:return \"EOF_IN_STRUCT\";\nbreak;\ncase 35:return 8;\nbreak;\ncase 36:/* skip whitespace */\nbreak;\ncase 37:return 'EDGE_STATE';\nbreak;\ncase 38: this.begin('class'); return 46;\nbreak;\ncase 39: this.popState(); return 8; \nbreak;\ncase 40:/* skip whitespace */\nbreak;\ncase 41: this.popState(); this.popState(); return 41;\nbreak;\ncase 42: this.begin(\"class-body\"); return 39;\nbreak;\ncase 43: this.popState(); return 41; \nbreak;\ncase 44:return \"EOF_IN_STRUCT\";\nbreak;\ncase 45: return 'EDGE_STATE';\nbreak;\ncase 46:return \"OPEN_IN_STRUCT\";\nbreak;\ncase 47:/* nothing */\nbreak;\ncase 48: return \"MEMBER\";\nbreak;\ncase 49:return 81;\nbreak;\ncase 50:return 73;\nbreak;\ncase 51:return 74;\nbreak;\ncase 52:return 76;\nbreak;\ncase 53:return 52;\nbreak;\ncase 54:return 54;\nbreak;\ncase 55:return 47;\nbreak;\ncase 56:return 48;\nbreak;\ncase 57:return 79;\nbreak;\ncase 58:this.popState();\nbreak;\ncase 59:return \"GENERICTYPE\";\nbreak;\ncase 60:this.begin(\"generic\");\nbreak;\ncase 61:this.popState();\nbreak;\ncase 62:return \"BQUOTE_STR\";\nbreak;\ncase 63:this.begin(\"bqstring\");\nbreak;\ncase 64:return 75;\nbreak;\ncase 65:return 75;\nbreak;\ncase 66:return 75;\nbreak;\ncase 67:return 75;\nbreak;\ncase 68:return 67;\nbreak;\ncase 69:return 67;\nbreak;\ncase 70:return 69;\nbreak;\ncase 71:return 69;\nbreak;\ncase 72:return 68;\nbreak;\ncase 73:return 66;\nbreak;\ncase 74:return 70;\nbreak;\ncase 75:return 71;\nbreak;\ncase 76:return 72;\nbreak;\ncase 77:return 22;\nbreak;\ncase 78:return 44;\nbreak;\ncase 79:return 99;\nbreak;\ncase 80:return 17;\nbreak;\ncase 81:return 'PLUS';\nbreak;\ncase 82:return 85;\nbreak;\ncase 83:return 59;\nbreak;\ncase 84:return 88;\nbreak;\ncase 85:return 88;\nbreak;\ncase 86:return 89;\nbreak;\ncase 87:return 'EQUALS';\nbreak;\ncase 88:return 'EQUALS';\nbreak;\ncase 89:return 58;\nbreak;\ncase 90:return 12;\nbreak;\ncase 91:return 14;\nbreak;\ncase 92:return 'PUNCTUATION';\nbreak;\ncase 93:return 84;\nbreak;\ncase 94:return 101;\nbreak;\ncase 95:return 87;\nbreak;\ncase 96:return 87;\nbreak;\ncase 97:return 9;\nbreak;\n}\n},\nrules: [/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:classDiagram-v2\\b)/,/^(?:classDiagram\\b)/,/^(?:\\[\\*\\])/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:[\"])/,/^(?:style\\b)/,/^(?:classDef\\b)/,/^(?:namespace\\b)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:\\[\\*\\])/,/^(?:class\\b)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\\[\\*\\])/,/^(?:[{])/,/^(?:[\\n])/,/^(?:[^{}\\n]*)/,/^(?:cssClass\\b)/,/^(?:callback\\b)/,/^(?:link\\b)/,/^(?:click\\b)/,/^(?:note for\\b)/,/^(?:note\\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:\\s*<\\|)/,/^(?:\\s*\\|>)/,/^(?:\\s*>)/,/^(?:\\s*<)/,/^(?:\\s*\\*)/,/^(?:\\s*o\\b)/,/^(?:\\s*\\(\\))/,/^(?:--)/,/^(?:\\.\\.)/,/^(?::{1}[^:\\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\\.)/,/^(?:\\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\\w+)/,/^(?:\\[)/,/^(?:\\])/,/^(?:[!\"#$%&'*+,-.`?\\\\/])/,/^(?:[0-9]+)/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u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-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\s)/,/^(?:\\s)/,/^(?:$)/],\nconditions: {\"namespace-body\":{\"rules\":[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"namespace\":{\"rules\":[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"class-body\":{\"rules\":[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"class\":{\"rules\":[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"acc_descr\":{\"rules\":[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"acc_title\":{\"rules\":[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"callback_args\":{\"rules\":[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"callback_name\":{\"rules\":[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"href\":{\"rules\":[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"struct\":{\"rules\":[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"generic\":{\"rules\":[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"bqstring\":{\"rules\":[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"string\":{\"rules\":[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { parseGenericTypes, sanitizeText } from '../common/common.js';\n\nexport interface ClassNode {\n id: string;\n type: string;\n label: string;\n shape: string;\n text: string;\n cssClasses: string;\n methods: ClassMember[];\n members: ClassMember[];\n annotations: string[];\n domId: string;\n styles: string[];\n parent?: string;\n link?: string;\n linkTarget?: string;\n haveCallback?: boolean;\n tooltip?: string;\n look?: string;\n}\n\nexport type Visibility = '#' | '+' | '~' | '-' | '';\nexport const visibilityValues = ['#', '+', '~', '-', ''];\n\n/**\n * Parses and stores class diagram member variables/methods.\n *\n */\nexport class ClassMember {\n id!: string;\n cssStyle!: string;\n memberType!: 'method' | 'attribute';\n visibility!: Visibility;\n text: string;\n /**\n * denote if static or to determine which css class to apply to the node\n * @defaultValue ''\n */\n classifier!: string;\n /**\n * parameters for method\n * @defaultValue ''\n */\n parameters!: string;\n /**\n * return type for method\n * @defaultValue ''\n */\n returnType!: string;\n\n constructor(input: string, memberType: 'method' | 'attribute') {\n this.memberType = memberType;\n this.visibility = '';\n this.classifier = '';\n this.text = '';\n const sanitizedInput = sanitizeText(input, getConfig());\n this.parseMember(sanitizedInput);\n }\n\n getDisplayDetails() {\n let displayText = this.visibility + parseGenericTypes(this.id);\n if (this.memberType === 'method') {\n displayText += `(${parseGenericTypes(this.parameters.trim())})`;\n if (this.returnType) {\n displayText += ' : ' + parseGenericTypes(this.returnType);\n }\n }\n\n displayText = displayText.trim();\n const cssStyle = this.parseClassifier();\n\n return {\n displayText,\n cssStyle,\n };\n }\n\n parseMember(input: string) {\n let potentialClassifier = '';\n\n if (this.memberType === 'method') {\n const methodRegEx = /([#+~-])?(.+)\\((.*)\\)([\\s$*])?(.*)([$*])?/;\n const match = methodRegEx.exec(input);\n if (match) {\n const detectedVisibility = match[1] ? match[1].trim() : '';\n\n if (visibilityValues.includes(detectedVisibility)) {\n this.visibility = detectedVisibility as Visibility;\n }\n\n this.id = match[2];\n this.parameters = match[3] ? match[3].trim() : '';\n potentialClassifier = match[4] ? match[4].trim() : '';\n this.returnType = match[5] ? match[5].trim() : '';\n\n if (potentialClassifier === '') {\n const lastChar = this.returnType.substring(this.returnType.length - 1);\n if (/[$*]/.exec(lastChar)) {\n potentialClassifier = lastChar;\n this.returnType = this.returnType.substring(0, this.returnType.length - 1);\n }\n }\n }\n } else {\n const length = input.length;\n const firstChar = input.substring(0, 1);\n const lastChar = input.substring(length - 1);\n\n if (visibilityValues.includes(firstChar)) {\n this.visibility = firstChar as Visibility;\n }\n\n if (/[$*]/.exec(lastChar)) {\n potentialClassifier = lastChar;\n }\n\n this.id = input.substring(\n this.visibility === '' ? 0 : 1,\n potentialClassifier === '' ? length : length - 1\n );\n }\n\n this.classifier = potentialClassifier;\n // Preserve one space only\n this.id = this.id.startsWith(' ') ? ' ' + this.id.trim() : this.id.trim();\n\n const combinedText = `${this.visibility ? '\\\\' + this.visibility : ''}${parseGenericTypes(this.id)}${this.memberType === 'method' ? `(${parseGenericTypes(this.parameters)})${this.returnType ? ' : ' + parseGenericTypes(this.returnType) : ''}` : ''}`;\n this.text = combinedText.replaceAll('<', '<').replaceAll('>', '>');\n if (this.text.startsWith('\\\\<')) {\n this.text = this.text.replace('\\\\<', '~');\n }\n }\n\n parseClassifier() {\n switch (this.classifier) {\n case '*':\n return 'font-style:italic;';\n case '$':\n return 'text-decoration:underline;';\n default:\n return '';\n }\n }\n}\n\nexport interface ClassNote {\n id: string;\n class: string;\n text: string;\n}\n\nexport interface ClassRelation {\n id1: string;\n id2: string;\n relationTitle1: string;\n relationTitle2: string;\n type: string;\n title: string;\n text: string;\n style: string[];\n relation: {\n type1: number;\n type2: number;\n lineType: number;\n };\n}\n\nexport interface Interface {\n id: string;\n label: string;\n classId: string;\n}\n\nexport interface NamespaceNode {\n id: string;\n domId: string;\n classes: ClassMap;\n children: NamespaceMap;\n}\n\nexport interface StyleClass {\n id: string;\n styles: string[];\n textStyles: string[];\n}\n\nexport type ClassMap = Map;\nexport type NamespaceMap = Map;\n", "import { select, type Selection } from 'd3';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport common from '../common/common.js';\nimport utils, { getEdgeId } from '../../utils.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\nimport { ClassMember } from './classTypes.js';\nimport type {\n ClassRelation,\n ClassNode,\n ClassNote,\n ClassMap,\n NamespaceMap,\n NamespaceNode,\n StyleClass,\n Interface,\n} from './classTypes.js';\nimport type { Node, Edge } from '../../rendering-util/types.js';\n\nconst MERMAID_DOM_ID_PREFIX = 'classId-';\n\nlet relations: ClassRelation[] = [];\nlet classes = new Map();\nconst styleClasses = new Map();\nlet notes: ClassNote[] = [];\nlet interfaces: Interface[] = [];\nlet classCounter = 0;\nlet namespaces = new Map();\nlet namespaceCounter = 0;\n\nlet functions: any[] = [];\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nconst splitClassNameAndType = function (_id: string) {\n const id = common.sanitizeText(_id, getConfig());\n let genericType = '';\n let className = id;\n\n if (id.indexOf('~') > 0) {\n const split = id.split('~');\n className = sanitizeText(split[0]);\n genericType = sanitizeText(split[1]);\n }\n\n return { className: className, type: genericType };\n};\n\nexport const setClassLabel = function (_id: string, label: string) {\n const id = common.sanitizeText(_id, getConfig());\n if (label) {\n label = sanitizeText(label);\n }\n\n const { className } = splitClassNameAndType(id);\n classes.get(className)!.label = label;\n classes.get(className)!.text =\n `${label}${classes.get(className)!.type ? `<${classes.get(className)!.type}>` : ''}`;\n};\n\n/**\n * Function called by parser when a node definition has been found.\n *\n * @param id - Id of the class to add\n * @public\n */\nexport const addClass = function (_id: string) {\n const id = common.sanitizeText(_id, getConfig());\n const { className, type } = splitClassNameAndType(id);\n // Only add class if not exists\n if (classes.has(className)) {\n return;\n }\n // alert('Adding class: ' + className);\n const name = common.sanitizeText(className, getConfig());\n // alert('Adding class after: ' + name);\n classes.set(name, {\n id: name,\n type: type,\n label: name,\n text: `${name}${type ? `<${type}>` : ''}`,\n shape: 'classBox',\n cssClasses: 'default',\n methods: [],\n members: [],\n annotations: [],\n styles: [],\n domId: MERMAID_DOM_ID_PREFIX + name + '-' + classCounter,\n } as ClassNode);\n\n classCounter++;\n};\n\nconst addInterface = function (label: string, classId: string) {\n const classInterface: Interface = {\n id: `interface${interfaces.length}`,\n label,\n classId,\n };\n\n interfaces.push(classInterface);\n};\n\n/**\n * Function to lookup domId from id in the graph definition.\n *\n * @param id - class ID to lookup\n * @public\n */\nexport const lookUpDomId = function (_id: string): string {\n const id = common.sanitizeText(_id, getConfig());\n if (classes.has(id)) {\n return classes.get(id)!.domId;\n }\n throw new Error('Class not found: ' + id);\n};\n\nexport const clear = function () {\n relations = [];\n classes = new Map();\n notes = [];\n interfaces = [];\n functions = [];\n functions.push(setupToolTips);\n namespaces = new Map();\n namespaceCounter = 0;\n direction = 'TB';\n commonClear();\n};\n\nexport const getClass = function (id: string): ClassNode {\n return classes.get(id)!;\n};\n\nexport const getClasses = function (): ClassMap {\n return classes;\n};\n\nexport const getRelations = function (): ClassRelation[] {\n return relations;\n};\n\nexport const getNotes = function () {\n return notes;\n};\n\nexport const addRelation = function (classRelation: ClassRelation) {\n log.debug('Adding relation: ' + JSON.stringify(classRelation));\n // Due to relationType cannot just check if it is equal to 'none' or it complains, can fix this later\n const invalidTypes = [\n relationType.LOLLIPOP,\n relationType.AGGREGATION,\n relationType.COMPOSITION,\n relationType.DEPENDENCY,\n relationType.EXTENSION,\n ];\n\n if (\n classRelation.relation.type1 === relationType.LOLLIPOP &&\n !invalidTypes.includes(classRelation.relation.type2)\n ) {\n addClass(classRelation.id2);\n addInterface(classRelation.id1, classRelation.id2);\n classRelation.id1 = `interface${interfaces.length - 1}`;\n } else if (\n classRelation.relation.type2 === relationType.LOLLIPOP &&\n !invalidTypes.includes(classRelation.relation.type1)\n ) {\n addClass(classRelation.id1);\n addInterface(classRelation.id2, classRelation.id1);\n classRelation.id2 = `interface${interfaces.length - 1}`;\n } else {\n addClass(classRelation.id1);\n addClass(classRelation.id2);\n }\n\n classRelation.id1 = splitClassNameAndType(classRelation.id1).className;\n classRelation.id2 = splitClassNameAndType(classRelation.id2).className;\n\n classRelation.relationTitle1 = common.sanitizeText(\n classRelation.relationTitle1.trim(),\n getConfig()\n );\n\n classRelation.relationTitle2 = common.sanitizeText(\n classRelation.relationTitle2.trim(),\n getConfig()\n );\n\n relations.push(classRelation);\n};\n\n/**\n * Adds an annotation to the specified class Annotations mark special properties of the given type\n * (like 'interface' or 'service')\n *\n * @param className - The class name\n * @param annotation - The name of the annotation without any brackets\n * @public\n */\nexport const addAnnotation = function (className: string, annotation: string) {\n const validatedClassName = splitClassNameAndType(className).className;\n classes.get(validatedClassName)!.annotations.push(annotation);\n};\n\n/**\n * Adds a member to the specified class\n *\n * @param className - The class name\n * @param member - The full name of the member. If the member is enclosed in `<>` it is\n * treated as an annotation If the member is ending with a closing bracket ) it is treated as a\n * method Otherwise the member will be treated as a normal property\n * @public\n */\nexport const addMember = function (className: string, member: string) {\n addClass(className);\n\n const validatedClassName = splitClassNameAndType(className).className;\n const theClass = classes.get(validatedClassName)!;\n\n if (typeof member === 'string') {\n // Member can contain white spaces, we trim them out\n const memberString = member.trim();\n\n if (memberString.startsWith('<<') && memberString.endsWith('>>')) {\n // its an annotation\n theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2)));\n } else if (memberString.indexOf(')') > 0) {\n //its a method\n theClass.methods.push(new ClassMember(memberString, 'method'));\n } else if (memberString) {\n theClass.members.push(new ClassMember(memberString, 'attribute'));\n }\n }\n};\n\nexport const addMembers = function (className: string, members: string[]) {\n if (Array.isArray(members)) {\n members.reverse();\n members.forEach((member) => addMember(className, member));\n }\n};\n\nexport const addNote = function (text: string, className: string) {\n const note = {\n id: `note${notes.length}`,\n class: className,\n text: text,\n };\n notes.push(note);\n};\n\nexport const cleanupLabel = function (label: string) {\n if (label.startsWith(':')) {\n label = label.substring(1);\n }\n return sanitizeText(label.trim());\n};\n\n/**\n * Called by parser when assigning cssClass to a class\n *\n * @param ids - Comma separated list of ids\n * @param className - Class to add\n */\nexport const setCssClass = function (ids: string, className: string) {\n ids.split(',').forEach(function (_id) {\n let id = _id;\n if (/\\d/.exec(_id[0])) {\n id = MERMAID_DOM_ID_PREFIX + id;\n }\n const classNode = classes.get(id);\n if (classNode) {\n classNode.cssClasses += ' ' + className;\n }\n });\n};\n\nexport const defineClass = function (ids: string[], style: string[]) {\n for (const id of ids) {\n let styleClass = styleClasses.get(id);\n if (styleClass === undefined) {\n styleClass = { id, styles: [], textStyles: [] };\n styleClasses.set(id, styleClass);\n }\n\n if (style) {\n style.forEach(function (s) {\n if (/color/.exec(s)) {\n const newStyle = s.replace('fill', 'bgFill'); // .replace('color', 'fill');\n styleClass.textStyles.push(newStyle);\n }\n styleClass.styles.push(s);\n });\n }\n\n classes.forEach((value) => {\n if (value.cssClasses.includes(id)) {\n value.styles.push(...style.flatMap((s) => s.split(',')));\n }\n });\n }\n};\n\n/**\n * Called by parser when a tooltip is found, e.g. a clickable element.\n *\n * @param ids - Comma separated list of ids\n * @param tooltip - Tooltip to add\n */\nconst setTooltip = function (ids: string, tooltip?: string) {\n ids.split(',').forEach(function (id) {\n if (tooltip !== undefined) {\n classes.get(id)!.tooltip = sanitizeText(tooltip);\n }\n });\n};\n\nexport const getTooltip = function (id: string, namespace?: string) {\n if (namespace && namespaces.has(namespace)) {\n return namespaces.get(namespace)!.classes.get(id)!.tooltip;\n }\n\n return classes.get(id)!.tooltip;\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids - Comma separated list of ids\n * @param linkStr - URL to create a link for\n * @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file\n */\nexport const setLink = function (ids: string, linkStr: string, target: string) {\n const config = getConfig();\n ids.split(',').forEach(function (_id) {\n let id = _id;\n if (/\\d/.exec(_id[0])) {\n id = MERMAID_DOM_ID_PREFIX + id;\n }\n const theClass = classes.get(id);\n if (theClass) {\n theClass.link = utils.formatUrl(linkStr, config);\n if (config.securityLevel === 'sandbox') {\n theClass.linkTarget = '_top';\n } else if (typeof target === 'string') {\n theClass.linkTarget = sanitizeText(target);\n } else {\n theClass.linkTarget = '_blank';\n }\n }\n });\n setCssClass(ids, 'clickable');\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids - Comma separated list of ids\n * @param functionName - Function to be called on click\n * @param functionArgs - Function args the function should be called with\n */\nexport const setClickEvent = function (ids: string, functionName: string, functionArgs: string) {\n ids.split(',').forEach(function (id) {\n setClickFunc(id, functionName, functionArgs);\n classes.get(id)!.haveCallback = true;\n });\n setCssClass(ids, 'clickable');\n};\n\nconst setClickFunc = function (_domId: string, functionName: string, functionArgs: string) {\n const domId = common.sanitizeText(_domId, getConfig());\n const config = getConfig();\n if (config.securityLevel !== 'loose') {\n return;\n }\n if (functionName === undefined) {\n return;\n }\n\n const id = domId;\n if (classes.has(id)) {\n const elemId = lookUpDomId(id);\n let argList: string[] = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.startsWith('\"') && item.endsWith('\"')) {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(elemId);\n }\n\n functions.push(function () {\n const elem = document.querySelector(`[id=\"${elemId}\"]`);\n if (elem !== null) {\n elem.addEventListener(\n 'click',\n function () {\n utils.runFunc(functionName, ...argList);\n },\n false\n );\n }\n });\n }\n};\n\nexport const bindFunctions = function (element: Element) {\n functions.forEach(function (fun) {\n fun(element);\n });\n};\n\nexport const lineType = {\n LINE: 0,\n DOTTED_LINE: 1,\n};\n\nexport const relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3,\n LOLLIPOP: 4,\n};\n\nconst setupToolTips = function (element: Element) {\n let tooltipElem: Selection =\n select('.mermaidTooltip');\n // @ts-expect-error - Incorrect types\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n tooltipElem = select('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n }\n\n const svg = select(element).select('svg');\n\n const nodes = svg.selectAll('g.node');\n nodes\n .on('mouseover', function () {\n const el = select(this);\n const title = el.attr('title');\n // Don't try to draw a tooltip if no data is provided\n if (title === null) {\n return;\n }\n // @ts-ignore - getBoundingClientRect is not part of the d3 type definition\n const rect = this.getBoundingClientRect();\n\n tooltipElem.transition().duration(200).style('opacity', '.9');\n tooltipElem\n .text(el.attr('title'))\n .style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')\n .style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n tooltipElem.html(tooltipElem.html().replace(/<br\\/>/g, '
    '));\n el.classed('hover', true);\n })\n .on('mouseout', function () {\n tooltipElem.transition().duration(500).style('opacity', 0);\n const el = select(this);\n el.classed('hover', false);\n });\n};\nfunctions.push(setupToolTips);\n\nlet direction = 'TB';\nconst getDirection = () => direction;\nconst setDirection = (dir: string) => {\n direction = dir;\n};\n\n/**\n * Function called by parser when a namespace definition has been found.\n *\n * @param id - Id of the namespace to add\n * @public\n */\nexport const addNamespace = function (id: string) {\n if (namespaces.has(id)) {\n return;\n }\n\n namespaces.set(id, {\n id: id,\n classes: new Map(),\n children: {},\n domId: MERMAID_DOM_ID_PREFIX + id + '-' + namespaceCounter,\n } as NamespaceNode);\n\n namespaceCounter++;\n};\n\nconst getNamespace = function (name: string): NamespaceNode {\n return namespaces.get(name)!;\n};\n\nconst getNamespaces = function (): NamespaceMap {\n return namespaces;\n};\n\n/**\n * Function called by parser when a namespace definition has been found.\n *\n * @param id - Id of the namespace to add\n * @param classNames - Ids of the class to add\n * @public\n */\nexport const addClassesToNamespace = function (id: string, classNames: string[]) {\n if (!namespaces.has(id)) {\n return;\n }\n for (const name of classNames) {\n const { className } = splitClassNameAndType(name);\n classes.get(className)!.parent = id;\n namespaces.get(id)!.classes.set(className, classes.get(className)!);\n }\n};\n\nexport const setCssStyle = function (id: string, styles: string[]) {\n const thisClass = classes.get(id);\n if (!styles || !thisClass) {\n return;\n }\n for (const s of styles) {\n if (s.includes(',')) {\n thisClass.styles.push(...s.split(','));\n } else {\n thisClass.styles.push(s);\n }\n }\n};\n\n/**\n * Gets the arrow marker for a type index\n *\n * @param type - The type to look for\n * @returns The arrow marker\n */\nfunction getArrowMarker(type: number) {\n let marker;\n switch (type) {\n case 0:\n marker = 'aggregation';\n break;\n case 1:\n marker = 'extension';\n break;\n case 2:\n marker = 'composition';\n break;\n case 3:\n marker = 'dependency';\n break;\n case 4:\n marker = 'lollipop';\n break;\n default:\n marker = 'none';\n }\n return marker;\n}\n\nexport const getData = () => {\n const nodes: Node[] = [];\n const edges: Edge[] = [];\n const config = getConfig();\n\n for (const namespaceKey of namespaces.keys()) {\n const namespace = namespaces.get(namespaceKey);\n if (namespace) {\n const node: Node = {\n id: namespace.id,\n label: namespace.id,\n isGroup: true,\n padding: config.class!.padding ?? 16,\n // parent node must be one of [rect, roundedWithTitle, noteGroup, divider]\n shape: 'rect',\n cssStyles: ['fill: none', 'stroke: black'],\n look: config.look,\n };\n nodes.push(node);\n }\n }\n\n for (const classKey of classes.keys()) {\n const classNode = classes.get(classKey);\n if (classNode) {\n const node = classNode as unknown as Node;\n node.parentId = classNode.parent;\n node.look = config.look;\n nodes.push(node);\n }\n }\n\n let cnt = 0;\n for (const note of notes) {\n cnt++;\n const noteNode: Node = {\n id: note.id,\n label: note.text,\n isGroup: false,\n shape: 'note',\n padding: config.class!.padding ?? 6,\n cssStyles: [\n 'text-align: left',\n 'white-space: nowrap',\n `fill: ${config.themeVariables.noteBkgColor}`,\n `stroke: ${config.themeVariables.noteBorderColor}`,\n ],\n look: config.look,\n };\n nodes.push(noteNode);\n\n const noteClassId = classes.get(note.class)?.id ?? '';\n\n if (noteClassId) {\n const edge: Edge = {\n id: `edgeNote${cnt}`,\n start: note.id,\n end: noteClassId,\n type: 'normal',\n thickness: 'normal',\n classes: 'relation',\n arrowTypeStart: 'none',\n arrowTypeEnd: 'none',\n arrowheadStyle: '',\n labelStyle: [''],\n style: ['fill: none'],\n pattern: 'dotted',\n look: config.look,\n };\n edges.push(edge);\n }\n }\n\n for (const _interface of interfaces) {\n const interfaceNode: Node = {\n id: _interface.id,\n label: _interface.label,\n isGroup: false,\n shape: 'rect',\n cssStyles: ['opacity: 0;'],\n look: config.look,\n };\n nodes.push(interfaceNode);\n }\n\n cnt = 0;\n for (const classRelation of relations) {\n cnt++;\n const edge: Edge = {\n id: getEdgeId(classRelation.id1, classRelation.id2, {\n prefix: 'id',\n counter: cnt,\n }),\n start: classRelation.id1,\n end: classRelation.id2,\n type: 'normal',\n label: classRelation.title,\n labelpos: 'c',\n thickness: 'normal',\n classes: 'relation',\n arrowTypeStart: getArrowMarker(classRelation.relation.type1),\n arrowTypeEnd: getArrowMarker(classRelation.relation.type2),\n startLabelRight: classRelation.relationTitle1 === 'none' ? '' : classRelation.relationTitle1,\n endLabelLeft: classRelation.relationTitle2 === 'none' ? '' : classRelation.relationTitle2,\n arrowheadStyle: '',\n labelStyle: ['display: inline-block'],\n style: classRelation.style || '',\n pattern: classRelation.relation.lineType == 1 ? 'dashed' : 'solid',\n look: config.look,\n };\n edges.push(edge);\n }\n\n return { nodes, edges, other: {}, config, direction: getDirection() };\n};\n\nexport default {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n getConfig: () => getConfig().class,\n addClass,\n bindFunctions,\n clear,\n getClass,\n getClasses,\n getNotes,\n addAnnotation,\n addNote,\n getRelations,\n addRelation,\n getDirection,\n setDirection,\n addMember,\n addMembers,\n cleanupLabel,\n lineType,\n relationType,\n setClickEvent,\n setCssClass,\n defineClass,\n setLink,\n getTooltip,\n setTooltip,\n lookUpDomId,\n setDiagramTitle,\n getDiagramTitle,\n setClassLabel,\n addNamespace,\n addClassesToNamespace,\n getNamespace,\n getNamespaces,\n setCssStyle,\n getData,\n};\n", "const getStyles = (options) =>\n `g.classGroup text {\n fill: ${options.nodeBorder || options.classText};\n stroke: none;\n font-family: ${options.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${options.classText};\n}\n.edgeLabel .label rect {\n fill: ${options.mainBkg};\n}\n.label text {\n fill: ${options.classText};\n}\n\n.labelBkg {\n background: ${options.mainBkg};\n}\n.edgeLabel .label span {\n background: ${options.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${options.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${options.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${options.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${options.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n}\n`;\n\nexport default getStyles;\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DiagramStyleClassDef } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { getDiagramElement } from '../../rendering-util/insertElementsForSize.js';\nimport { getRegisteredLayoutAlgorithm, render } from '../../rendering-util/render.js';\nimport { setupViewPortForSVG } from '../../rendering-util/setupViewPortForSVG.js';\nimport type { LayoutData } from '../../rendering-util/types.js';\nimport utils from '../../utils.js';\n\n/**\n * Get the direction from the statement items.\n * Look through all of the documents (docs) in the parsedItems\n * Because is a _document_ direction, the default direction is not necessarily the same as the overall default _diagram_ direction.\n * @param parsedItem - the parsed statement item to look through\n * @param defaultDir - the direction to use if none is found\n * @returns The direction to use\n */\nexport const getDir = (parsedItem: any, defaultDir = 'TB') => {\n if (!parsedItem.doc) {\n return defaultDir;\n }\n\n let dir = defaultDir;\n\n for (const parsedItemDoc of parsedItem.doc) {\n if (parsedItemDoc.stmt === 'dir') {\n dir = parsedItemDoc.value;\n }\n }\n\n return dir;\n};\n\nexport const getClasses = function (\n text: string,\n diagramObj: any\n): Map {\n return diagramObj.db.getClasses();\n};\n\nexport const draw = async function (text: string, id: string, _version: string, diag: any) {\n log.info('REF0:');\n log.info('Drawing class diagram (v3)', id);\n const { securityLevel, state: conf, layout } = getConfig();\n // Extracting the data from the parsed structure into a more usable form\n // Not related to the refactoring, but this is the first step in the rendering process\n // diag.db.extract(diag.db.getRootDocV2());\n\n // The getData method provided in all supported diagrams is used to extract the data from the parsed structure\n // into the Layout data format\n const data4Layout = diag.db.getData() as LayoutData;\n\n // Create the root SVG - the element is the div containing the SVG element\n const svg = getDiagramElement(id, securityLevel);\n\n data4Layout.type = diag.type;\n data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);\n\n data4Layout.nodeSpacing = conf?.nodeSpacing || 50;\n data4Layout.rankSpacing = conf?.rankSpacing || 50;\n data4Layout.markers = ['aggregation', 'extension', 'composition', 'dependency', 'lollipop'];\n data4Layout.diagramId = id;\n await render(data4Layout, svg);\n const padding = 8;\n utils.insertTitle(\n svg,\n 'classDiagramTitleText',\n conf?.titleTopMargin ?? 25,\n diag.db.getDiagramTitle()\n );\n\n setupViewPortForSVG(svg, padding, 'classDiagram', conf?.useMaxWidth ?? true);\n};\n\nexport default {\n getClasses,\n draw,\n getDir,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/classDiagram.jison';\nimport db from './classDb.js';\nimport styles from './styles.js';\nimport renderer from './classRenderer-v3-unified.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/classDiagram.jison';\nimport db from './classDb.js';\nimport styles from './styles.js';\nimport renderer from './classRenderer-v3-unified.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,16],$V7=[1,17],$V8=[1,18],$V9=[1,19],$Va=[1,32],$Vb=[1,20],$Vc=[1,21],$Vd=[1,22],$Ve=[1,23],$Vf=[1,24],$Vg=[1,26],$Vh=[1,27],$Vi=[1,28],$Vj=[1,29],$Vk=[1,30],$Vl=[1,31],$Vm=[1,34],$Vn=[1,35],$Vo=[1,36],$Vp=[1,37],$Vq=[1,33],$Vr=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],$Vs=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],$Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SPACE\":4,\"NL\":5,\"SD\":6,\"document\":7,\"line\":8,\"statement\":9,\"classDefStatement\":10,\"styleStatement\":11,\"cssClassStatement\":12,\"idStatement\":13,\"DESCR\":14,\"-->\":15,\"HIDE_EMPTY\":16,\"scale\":17,\"WIDTH\":18,\"COMPOSIT_STATE\":19,\"STRUCT_START\":20,\"STRUCT_STOP\":21,\"STATE_DESCR\":22,\"AS\":23,\"ID\":24,\"FORK\":25,\"JOIN\":26,\"CHOICE\":27,\"CONCURRENT\":28,\"note\":29,\"notePosition\":30,\"NOTE_TEXT\":31,\"direction\":32,\"acc_title\":33,\"acc_title_value\":34,\"acc_descr\":35,\"acc_descr_value\":36,\"acc_descr_multiline_value\":37,\"classDef\":38,\"CLASSDEF_ID\":39,\"CLASSDEF_STYLEOPTS\":40,\"DEFAULT\":41,\"style\":42,\"STYLE_IDS\":43,\"STYLEDEF_STYLEOPTS\":44,\"class\":45,\"CLASSENTITY_IDS\":46,\"STYLECLASS\":47,\"direction_tb\":48,\"direction_bt\":49,\"direction_rl\":50,\"direction_lr\":51,\"eol\":52,\";\":53,\"EDGE_STATE\":54,\"STYLE_SEPARATOR\":55,\"left_of\":56,\"right_of\":57,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACE\",5:\"NL\",6:\"SD\",14:\"DESCR\",15:\"-->\",16:\"HIDE_EMPTY\",17:\"scale\",18:\"WIDTH\",19:\"COMPOSIT_STATE\",20:\"STRUCT_START\",21:\"STRUCT_STOP\",22:\"STATE_DESCR\",23:\"AS\",24:\"ID\",25:\"FORK\",26:\"JOIN\",27:\"CHOICE\",28:\"CONCURRENT\",29:\"note\",31:\"NOTE_TEXT\",33:\"acc_title\",34:\"acc_title_value\",35:\"acc_descr\",36:\"acc_descr_value\",37:\"acc_descr_multiline_value\",38:\"classDef\",39:\"CLASSDEF_ID\",40:\"CLASSDEF_STYLEOPTS\",41:\"DEFAULT\",42:\"style\",43:\"STYLE_IDS\",44:\"STYLEDEF_STYLEOPTS\",45:\"class\",46:\"CLASSENTITY_IDS\",47:\"STYLECLASS\",48:\"direction_tb\",49:\"direction_bt\",50:\"direction_rl\",51:\"direction_lr\",53:\";\",54:\"EDGE_STATE\",55:\"STYLE_SEPARATOR\",56:\"left_of\",57:\"right_of\"},\nproductions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 3:\n /* console.log('--> Root document', $$[$0]); */ yy.setRootDoc($$[$0]); return $$[$0]; \nbreak;\ncase 4:\n /*console.log('empty document'); */ this.$ = [] \nbreak;\ncase 5:\n\n if($$[$0] !='nl'){\n /* console.log(' document: 1: ', $$[$0-1], ' pushing 2: ', $$[$0]); */\n $$[$0-1].push($$[$0]); this.$ = $$[$0-1]\n }\n /* console.log('Got document',$$[$0-1], $$[$0]); */\n \nbreak;\ncase 6: case 7:\n this.$ = $$[$0] \nbreak;\ncase 8:\n this.$='nl';\nbreak;\ncase 12:\n /* console.log('got id', $$[$0]); */\n this.$=$$[$0];\n\t \nbreak;\ncase 13:\n\n const stateStmt = $$[$0-1];\n stateStmt.description = yy.trimColon($$[$0]);\n this.$ = stateStmt;\n\t \nbreak;\ncase 14:\n\n /* console.info('got ids: 1: ', $$[$0-2], ' 2:', $$[$0-1],' 3: ', $$[$0]); */\n // console.log(' idStatement --> idStatement : state1 =', $$[$0-2], ' state2 =', $$[$0]);\n this.$={ stmt: 'relation', state1: $$[$0-2], state2: $$[$0]};\n \nbreak;\ncase 15:\n\n const relDescription = yy.trimColon($$[$0]);\n /* console.log(' idStatement --> idStatement DESCR : state1 =', $$[$0-3], ' state2stmt =', $$[$0-1], ' description: ', relDescription); */\n this.$={ stmt: 'relation', state1: $$[$0-3], state2: $$[$0-1], description: relDescription};\n \nbreak;\ncase 19:\n\n // console.log('Adding document for state without id ', $$[$0-3]);\n this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] }\n \nbreak;\ncase 20:\n\n var id=$$[$0];\n var description = $$[$0-2].trim();\n if($$[$0].match(':')){\n var parts = $$[$0].split(':');\n id=parts[0];\n description = [description, parts[1]];\n }\n this.$={stmt: 'state', id: id, type: 'default', description: description};\n\n \nbreak;\ncase 21:\n\n // console.log('state with id ', $$[$0-3],' document = ', $$[$0-1], );\n this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] }\n \nbreak;\ncase 22:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'fork' }\n \nbreak;\ncase 23:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'join' }\n \nbreak;\ncase 24:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'choice' }\n \nbreak;\ncase 25:\n\n this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' }\n \nbreak;\ncase 26:\n\n /* console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/\n this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}};\n \nbreak;\ncase 29:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 30: case 31:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 32: case 33:\n\n this.$ = { stmt: 'classDef', id: $$[$0-1].trim(), classes: $$[$0].trim() };\n \nbreak;\ncase 34:\n\n this.$ = { stmt: 'style', id: $$[$0-1].trim(), styleClass: $$[$0].trim() };\n \nbreak;\ncase 35:\n\n //console.log('apply class: id(s): ',$$[$0-1], ' style class: ', $$[$0]);\n this.$={ stmt: 'applyClass', id: $$[$0-1].trim(), styleClass: $$[$0].trim() };\n \nbreak;\ncase 36:\n yy.setDirection('TB');this.$={stmt:'dir', value:'TB'};\nbreak;\ncase 37:\n yy.setDirection('BT');this.$={stmt:'dir', value:'BT'};\nbreak;\ncase 38:\n yy.setDirection('RL'); this.$={stmt:'dir', value:'RL'};\nbreak;\ncase 39:\n yy.setDirection('LR');this.$={stmt:'dir', value:'LR'};\nbreak;\ncase 42: case 43:\n /* console.log('idStatement id: ', $$[$0]); */\n this.$={ stmt: 'state', id: $$[$0].trim(), type: 'default', description: '' };\n \nbreak;\ncase 44:\n /*console.log('idStatement ID STYLE_SEPARATOR ID'); */\n this.$={ stmt: 'state', id: $$[$0-2].trim(), classes: [$$[$0].trim()], type: 'default', description: '' };\n \nbreak;\ncase 45:\n /*console.log('idStatement EDGE_STATE STYLE_SEPARATOR ID'); */\n this.$={ stmt: 'state', id: $$[$0-2].trim(), classes: [$$[$0].trim()], type: 'default', description: '' };\n \nbreak;\n}\n},\ntable: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,7]),o($Vr,[2,8]),o($Vr,[2,9]),o($Vr,[2,10]),o($Vr,[2,11]),o($Vr,[2,12],{14:[1,39],15:[1,40]}),o($Vr,[2,16]),{18:[1,41]},o($Vr,[2,18],{20:[1,42]}),{23:[1,43]},o($Vr,[2,22]),o($Vr,[2,23]),o($Vr,[2,24]),o($Vr,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},o($Vr,[2,28]),{34:[1,48]},{36:[1,49]},o($Vr,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},o($Vs,[2,42],{55:[1,54]}),o($Vs,[2,43],{55:[1,55]}),o($Vr,[2,36]),o($Vr,[2,37]),o($Vr,[2,38]),o($Vr,[2,39]),o($Vr,[2,6]),o($Vr,[2,13]),{13:56,24:$Va,54:$Vq},o($Vr,[2,17]),o($Vt,$V3,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},o($Vr,[2,29]),o($Vr,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},o($Vr,[2,14],{14:[1,67]}),{4:$V4,5:$V5,8:8,9:10,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,21:[1,68],22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},o($Vr,[2,32]),o($Vr,[2,33]),o($Vr,[2,34]),o($Vr,[2,35]),o($Vs,[2,44]),o($Vs,[2,45]),o($Vr,[2,15]),o($Vr,[2,19]),o($Vt,$V3,{7:72}),o($Vr,[2,26]),o($Vr,[2,27]),{4:$V4,5:$V5,8:8,9:10,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,21:[1,73],22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,21])],\ndefaultActions: {5:[2,1],6:[2,2],46:[2,46],47:[2,47]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 41;\nbreak;\ncase 1:return 48;\nbreak;\ncase 2:return 49;\nbreak;\ncase 3:return 50;\nbreak;\ncase 4:return 51;\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:/* skip comments */{ /*console.log('Crap after close');*/ }\nbreak;\ncase 7:return 5;\nbreak;\ncase 8:/* skip all whitespace */\nbreak;\ncase 9:/* skip same-line whitespace */\nbreak;\ncase 10:/* skip comments */\nbreak;\ncase 11:/* skip comments */\nbreak;\ncase 12: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 17; \nbreak;\ncase 13:return 18;\nbreak;\ncase 14: this.popState(); \nbreak;\ncase 15: this.begin(\"acc_title\");return 33; \nbreak;\ncase 16: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 17: this.begin(\"acc_descr\");return 35; \nbreak;\ncase 18: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 19: this.begin(\"acc_descr_multiline\"); \nbreak;\ncase 20: this.popState(); \nbreak;\ncase 21:return \"acc_descr_multiline_value\";\nbreak;\ncase 22: this.pushState('CLASSDEF'); return 38; \nbreak;\ncase 23: this.popState(); this.pushState('CLASSDEFID'); return 'DEFAULT_CLASSDEF_ID' \nbreak;\ncase 24: this.popState(); this.pushState('CLASSDEFID'); return 39 \nbreak;\ncase 25: this.popState(); return 40 \nbreak;\ncase 26: this.pushState('CLASS'); return 45; \nbreak;\ncase 27: this.popState(); this.pushState('CLASS_STYLE'); return 46 \nbreak;\ncase 28: this.popState(); return 47 \nbreak;\ncase 29: this.pushState('STYLE'); return 42; \nbreak;\ncase 30: this.popState(); this.pushState('STYLEDEF_STYLES'); return 43 \nbreak;\ncase 31: this.popState(); return 44 \nbreak;\ncase 32: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 17; \nbreak;\ncase 33:return 18;\nbreak;\ncase 34:this.popState();\nbreak;\ncase 35: /* console.log('Starting STATE '); */ this.pushState('STATE'); \nbreak;\ncase 36:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim(); /*console.warn('Fork Fork: ',yy_.yytext);*/return 25;\nbreak;\ncase 37:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 26;\nbreak;\ncase 38:this.popState();yy_.yytext=yy_.yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 27;\nbreak;\ncase 39:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Fork: ',yy_.yytext);*/return 25;\nbreak;\ncase 40:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 26;\nbreak;\ncase 41:this.popState();yy_.yytext=yy_.yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 27;\nbreak;\ncase 42: return 48;\nbreak;\ncase 43: return 49;\nbreak;\ncase 44: return 50;\nbreak;\ncase 45: return 51;\nbreak;\ncase 46: /* console.log('Starting STATE_STRING'); */ this.pushState(\"STATE_STRING\"); \nbreak;\ncase 47: this.pushState('STATE_ID'); /* console.log('pushState(STATE_ID)'); */ return \"AS\"; \nbreak;\ncase 48: this.popState(); /* console.log('STATE_ID', yy_.yytext); */ return \"ID\"; \nbreak;\ncase 49: this.popState(); \nbreak;\ncase 50: /* console.log('Long description:', yy_.yytext); */ return \"STATE_DESCR\"; \nbreak;\ncase 51: /* console.log('COMPOSIT_STATE', yy_.yytext); */ return 19; \nbreak;\ncase 52: this.popState(); \nbreak;\ncase 53: this.popState(); this.pushState('struct'); /* console.log('begin struct', yy_.yytext); */ return 20; \nbreak;\ncase 54:/* skip comments inside state*/\nbreak;\ncase 55: /*console.log('Ending struct');*/ this.popState(); return 21;\nbreak;\ncase 56:/* nothing */\nbreak;\ncase 57: this.begin('NOTE'); return 29; \nbreak;\ncase 58: this.popState(); this.pushState('NOTE_ID'); return 56; \nbreak;\ncase 59: this.popState(); this.pushState('NOTE_ID'); return 57; \nbreak;\ncase 60: this.popState(); this.pushState('FLOATING_NOTE'); \nbreak;\ncase 61: this.popState(); this.pushState('FLOATING_NOTE_ID'); return \"AS\"; \nbreak;\ncase 62:/**/\nbreak;\ncase 63: /* console.log('Floating note text: ', yy_.yytext); */ return \"NOTE_TEXT\"; \nbreak;\ncase 64: this.popState(); /* console.log('Floating note ID', yy_.yytext);*/ return \"ID\"; \nbreak;\ncase 65: this.popState(); this.pushState('NOTE_TEXT'); /*console.log('Got ID for note', yy_.yytext);*/ return 24; \nbreak;\ncase 66: this.popState(); /* console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.substr(2).trim(); return 31; \nbreak;\ncase 67: this.popState(); /* console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.slice(0,-8).trim(); return 31; \nbreak;\ncase 68: /* console.log('Got state diagram', yy_.yytext,'#'); */ return 6; \nbreak;\ncase 69: /* console.log('Got state diagram', yy_.yytext,'#'); */ return 6; \nbreak;\ncase 70: /* console.log('HIDE_EMPTY', yy_.yytext,'#'); */ return 16; \nbreak;\ncase 71: /* console.log('EDGE_STATE=',yy_.yytext); */ return 54; \nbreak;\ncase 72: /* console.log('=>ID=',yy_.yytext); */ return 24; \nbreak;\ncase 73: yy_.yytext = yy_.yytext.trim(); /* console.log('Descr = ', yy_.yytext); */ return 14; \nbreak;\ncase 74:return 15;\nbreak;\ncase 75:return 28;\nbreak;\ncase 76:return 55;\nbreak;\ncase 77:return 5;\nbreak;\ncase 78:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:default\\b)/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:[\\s]+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:classDef\\s+)/i,/^(?:DEFAULT\\s+)/i,/^(?:\\w+\\s+)/i,/^(?:[^\\n]*)/i,/^(?:class\\s+)/i,/^(?:(\\w+)+((,\\s*\\w+)*))/i,/^(?:[^\\n]*)/i,/^(?:style\\s+)/i,/^(?:[\\w,]+\\s+)/i,/^(?:[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:state\\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\\[\\[fork\\]\\])/i,/^(?:.*\\[\\[join\\]\\])/i,/^(?:.*\\[\\[choice\\]\\])/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:[\"])/i,/^(?:\\s*as\\s+)/i,/^(?:[^\\n\\{]*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n\\s\\{]+)/i,/^(?:\\n)/i,/^(?:\\{)/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:\\})/i,/^(?:[\\n])/i,/^(?:note\\s+)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:\")/i,/^(?:\\s*as\\s*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n]*)/i,/^(?:\\s*[^:\\n\\s\\-]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:[\\s\\S]*?end note\\b)/i,/^(?:stateDiagram\\s+)/i,/^(?:stateDiagram-v2\\s+)/i,/^(?:hide empty description\\b)/i,/^(?:\\[\\*\\])/i,/^(?:[^:\\n\\s\\-\\{]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"LINE\":{\"rules\":[9,10],\"inclusive\":false},\"struct\":{\"rules\":[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],\"inclusive\":false},\"FLOATING_NOTE_ID\":{\"rules\":[64],\"inclusive\":false},\"FLOATING_NOTE\":{\"rules\":[61,62,63],\"inclusive\":false},\"NOTE_TEXT\":{\"rules\":[66,67],\"inclusive\":false},\"NOTE_ID\":{\"rules\":[65],\"inclusive\":false},\"NOTE\":{\"rules\":[58,59,60],\"inclusive\":false},\"STYLEDEF_STYLEOPTS\":{\"rules\":[],\"inclusive\":false},\"STYLEDEF_STYLES\":{\"rules\":[31],\"inclusive\":false},\"STYLE_IDS\":{\"rules\":[],\"inclusive\":false},\"STYLE\":{\"rules\":[30],\"inclusive\":false},\"CLASS_STYLE\":{\"rules\":[28],\"inclusive\":false},\"CLASS\":{\"rules\":[27],\"inclusive\":false},\"CLASSDEFID\":{\"rules\":[25],\"inclusive\":false},\"CLASSDEF\":{\"rules\":[23,24],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[20,21],\"inclusive\":false},\"acc_descr\":{\"rules\":[18],\"inclusive\":false},\"acc_title\":{\"rules\":[16],\"inclusive\":false},\"SCALE\":{\"rules\":[13,14,33,34],\"inclusive\":false},\"ALIAS\":{\"rules\":[],\"inclusive\":false},\"STATE_ID\":{\"rules\":[48],\"inclusive\":false},\"STATE_STRING\":{\"rules\":[49,50],\"inclusive\":false},\"FORK_STATE\":{\"rules\":[],\"inclusive\":false},\"STATE\":{\"rules\":[9,10,36,37,38,39,40,41,46,47,51,52,53],\"inclusive\":false},\"ID\":{\"rules\":[9,10],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "/**\n * Constants common to all State Diagram code\n */\n\n// default diagram direction\nexport const DEFAULT_DIAGRAM_DIRECTION = 'LR';\n\n// default direction for any nested documents (composites)\nexport const DEFAULT_NESTED_DOC_DIR = 'TB';\n\n// parsed statement type for a state\nexport const STMT_STATE = 'state';\n// parsed statement type for a relation\nexport const STMT_RELATION = 'relation';\n// parsed statement type for a classDef\nexport const STMT_CLASSDEF = 'classDef';\nexport const STMT_STYLEDEF = 'style';\n// parsed statement type for applyClass\nexport const STMT_APPLYCLASS = 'applyClass';\n\nexport const DEFAULT_STATE_TYPE = 'default';\nexport const DIVIDER_TYPE = 'divider';\n\n// Graph edge settings\nexport const G_EDGE_STYLE = 'fill:none';\nexport const G_EDGE_ARROWHEADSTYLE = 'fill: #333';\nexport const G_EDGE_LABELPOS = 'c';\nexport const G_EDGE_LABELTYPE = 'text';\nexport const G_EDGE_THICKNESS = 'normal';\n\nexport const SHAPE_STATE = 'rect';\nexport const SHAPE_STATE_WITH_DESC = 'rectWithTitle';\nexport const SHAPE_START = 'stateStart';\nexport const SHAPE_END = 'stateEnd';\nexport const SHAPE_DIVIDER = 'divider';\nexport const SHAPE_GROUP = 'roundedWithTitle';\nexport const SHAPE_NOTE = 'note';\nexport const SHAPE_NOTEGROUP = 'noteGroup';\n\n// CSS classes\nexport const CSS_DIAGRAM = 'statediagram';\nexport const CSS_STATE = 'state';\nexport const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`;\nexport const CSS_EDGE = 'transition';\nexport const CSS_NOTE = 'note';\nexport const CSS_NOTE_EDGE = 'note-edge';\nexport const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`;\nexport const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`;\nexport const CSS_CLUSTER = 'cluster';\nexport const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`;\nexport const CSS_CLUSTER_ALT = 'cluster-alt';\nexport const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`;\n\nexport const PARENT = 'parent';\nexport const NOTE = 'note';\nexport const DOMID_STATE = 'state';\nexport const DOMID_TYPE_SPACER = '----';\nexport const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`;\nexport const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`;\n// --------------------------------------\n\nexport default {\n DEFAULT_DIAGRAM_DIRECTION,\n DEFAULT_NESTED_DOC_DIR,\n STMT_STATE,\n STMT_RELATION,\n STMT_CLASSDEF,\n STMT_STYLEDEF,\n STMT_APPLYCLASS,\n DEFAULT_STATE_TYPE,\n DIVIDER_TYPE,\n G_EDGE_STYLE,\n G_EDGE_ARROWHEADSTYLE,\n G_EDGE_LABELPOS,\n G_EDGE_LABELTYPE,\n G_EDGE_THICKNESS,\n CSS_EDGE,\n CSS_DIAGRAM,\n SHAPE_STATE,\n SHAPE_STATE_WITH_DESC,\n SHAPE_START,\n SHAPE_END,\n SHAPE_DIVIDER,\n SHAPE_GROUP,\n SHAPE_NOTE,\n SHAPE_NOTEGROUP,\n CSS_STATE,\n CSS_DIAGRAM_STATE,\n CSS_NOTE,\n CSS_NOTE_EDGE,\n CSS_EDGE_NOTE_EDGE,\n CSS_DIAGRAM_NOTE,\n CSS_CLUSTER,\n CSS_DIAGRAM_CLUSTER,\n CSS_CLUSTER_ALT,\n CSS_DIAGRAM_CLUSTER_ALT,\n PARENT,\n NOTE,\n DOMID_STATE,\n DOMID_TYPE_SPACER,\n NOTE_ID,\n PARENT_ID,\n};\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport common from '../common/common.js';\nimport {\n CSS_DIAGRAM_CLUSTER,\n CSS_DIAGRAM_CLUSTER_ALT,\n CSS_DIAGRAM_NOTE,\n CSS_DIAGRAM_STATE,\n CSS_EDGE,\n CSS_EDGE_NOTE_EDGE,\n DEFAULT_NESTED_DOC_DIR,\n DEFAULT_STATE_TYPE,\n DIVIDER_TYPE,\n DOMID_STATE,\n DOMID_TYPE_SPACER,\n G_EDGE_ARROWHEADSTYLE,\n G_EDGE_LABELPOS,\n G_EDGE_LABELTYPE,\n G_EDGE_STYLE,\n G_EDGE_THICKNESS,\n NOTE,\n NOTE_ID,\n PARENT,\n PARENT_ID,\n SHAPE_DIVIDER,\n SHAPE_END,\n SHAPE_GROUP,\n SHAPE_NOTE,\n SHAPE_NOTEGROUP,\n SHAPE_START,\n SHAPE_STATE,\n SHAPE_STATE_WITH_DESC,\n STMT_RELATION,\n STMT_STATE,\n} from './stateCommon.js';\n\n// List of nodes created from the parsed diagram statement items\nlet nodeDb = new Map();\n\nlet graphItemCount = 0; // used to construct ids, etc.\n\n/**\n * Create a standard string for the dom ID of an item.\n * If a type is given, insert that before the counter, preceded by the type spacer\n *\n * @param itemId\n * @param counter\n * @param {string | null} type\n * @param typeSpacer\n * @returns {string}\n */\nexport function stateDomId(itemId = '', counter = 0, type = '', typeSpacer = DOMID_TYPE_SPACER) {\n const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : '';\n return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`;\n}\n\nconst setupDoc = (parentParsedItem, doc, diagramStates, nodes, edges, altFlag, look, classes) => {\n // graphItemCount = 0;\n log.trace('items', doc);\n doc.forEach((item) => {\n switch (item.stmt) {\n case STMT_STATE:\n dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look, classes);\n break;\n case DEFAULT_STATE_TYPE:\n dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look, classes);\n break;\n case STMT_RELATION:\n {\n dataFetcher(\n parentParsedItem,\n item.state1,\n diagramStates,\n nodes,\n edges,\n altFlag,\n look,\n classes\n );\n dataFetcher(\n parentParsedItem,\n item.state2,\n diagramStates,\n nodes,\n edges,\n altFlag,\n look,\n classes\n );\n const edgeData = {\n id: 'edge' + graphItemCount,\n start: item.state1.id,\n end: item.state2.id,\n arrowhead: 'normal',\n arrowTypeEnd: 'arrow_barb',\n style: G_EDGE_STYLE,\n labelStyle: '',\n label: common.sanitizeText(item.description, getConfig()),\n arrowheadStyle: G_EDGE_ARROWHEADSTYLE,\n labelpos: G_EDGE_LABELPOS,\n labelType: G_EDGE_LABELTYPE,\n thickness: G_EDGE_THICKNESS,\n classes: CSS_EDGE,\n look,\n };\n edges.push(edgeData);\n graphItemCount++;\n }\n break;\n }\n });\n};\n\n/**\n * Get the direction from the statement items.\n * Look through all of the documents (docs) in the parsedItems\n * Because is a _document_ direction, the default direction is not necessarily the same as the overall default _diagram_ direction.\n * @param {object[]} parsedItem - the parsed statement item to look through\n * @param [defaultDir] - the direction to use if none is found\n * @returns {string}\n */\nconst getDir = (parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {\n let dir = defaultDir;\n if (parsedItem.doc) {\n for (const parsedItemDoc of parsedItem.doc) {\n if (parsedItemDoc.stmt === 'dir') {\n dir = parsedItemDoc.value;\n }\n }\n }\n return dir;\n};\n\nfunction insertOrUpdateNode(nodes, nodeData, classes) {\n if (!nodeData.id || nodeData.id === '' || nodeData.id === '') {\n return;\n }\n\n //Populate node style attributes if nodeData has classes defined\n if (nodeData.cssClasses) {\n if (!Array.isArray(nodeData.cssCompiledStyles)) {\n nodeData.cssCompiledStyles = [];\n }\n\n nodeData.cssClasses.split(' ').forEach((cssClass) => {\n if (classes.get(cssClass)) {\n const classDef = classes.get(cssClass);\n nodeData.cssCompiledStyles = [...nodeData.cssCompiledStyles, ...classDef.styles];\n }\n });\n }\n const existingNodeData = nodes.find((node) => node.id === nodeData.id);\n if (existingNodeData) {\n //update the existing nodeData\n Object.assign(existingNodeData, nodeData);\n } else {\n nodes.push(nodeData);\n }\n}\n/**\n * Get classes from the db for the info item.\n * If there aren't any or if dbInfoItem isn't defined, return an empty string.\n * Else create 1 string from the list of classes found\n *\n * @param {undefined | null | object} dbInfoItem\n * @returns {string}\n */\nfunction getClassesFromDbInfo(dbInfoItem) {\n return dbInfoItem?.classes?.join(' ') ?? '';\n}\n\nfunction getStylesFromDbInfo(dbInfoItem) {\n return dbInfoItem?.styles ?? [];\n}\n\nexport const dataFetcher = (\n parent,\n parsedItem,\n diagramStates,\n nodes,\n edges,\n altFlag,\n look,\n classes\n) => {\n const itemId = parsedItem.id;\n const dbState = diagramStates.get(itemId);\n const classStr = getClassesFromDbInfo(dbState);\n const style = getStylesFromDbInfo(dbState);\n\n log.info('dataFetcher parsedItem', parsedItem, dbState, style);\n\n if (itemId !== 'root') {\n let shape = SHAPE_STATE;\n // The if === true / false can be removed if we can guarantee that the parsedItem.start is always a boolean\n if (parsedItem.start === true) {\n shape = SHAPE_START;\n } else if (parsedItem.start === false) {\n shape = SHAPE_END;\n }\n if (parsedItem.type !== DEFAULT_STATE_TYPE) {\n shape = parsedItem.type;\n }\n\n // Add the node to our list (nodeDb)\n if (!nodeDb.get(itemId)) {\n nodeDb.set(itemId, {\n id: itemId,\n shape,\n description: common.sanitizeText(itemId, getConfig()),\n cssClasses: `${classStr} ${CSS_DIAGRAM_STATE}`,\n cssStyles: style,\n });\n }\n\n const newNode = nodeDb.get(itemId);\n\n // Save data for description and group so that for instance a statement without description overwrites\n // one with description @todo TODO What does this mean? If important, add a test for it\n\n // Build of the array of description strings\n if (parsedItem.description) {\n if (Array.isArray(newNode.description)) {\n // There already is an array of strings,add to it\n newNode.shape = SHAPE_STATE_WITH_DESC;\n newNode.description.push(parsedItem.description);\n } else {\n if (newNode.description?.length > 0) {\n // if there is a description already transform it to an array\n newNode.shape = SHAPE_STATE_WITH_DESC;\n if (newNode.description === itemId) {\n // If the previous description was this, remove it\n newNode.description = [parsedItem.description];\n } else {\n newNode.description = [newNode.description, parsedItem.description];\n }\n } else {\n newNode.shape = SHAPE_STATE;\n newNode.description = parsedItem.description;\n }\n }\n newNode.description = common.sanitizeTextOrArray(newNode.description, getConfig());\n }\n\n // If there's only 1 description entry, just use a regular state shape\n if (newNode.description?.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) {\n if (newNode.type === 'group') {\n newNode.shape = SHAPE_GROUP;\n } else {\n newNode.shape = SHAPE_STATE;\n }\n }\n\n // group\n if (!newNode.type && parsedItem.doc) {\n log.info('Setting cluster for XCX', itemId, getDir(parsedItem));\n newNode.type = 'group';\n newNode.isGroup = true;\n newNode.dir = getDir(parsedItem);\n newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP;\n newNode.cssClasses = `${newNode.cssClasses} ${CSS_DIAGRAM_CLUSTER} ${altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ''}`;\n }\n\n // This is what will be added to the graph\n const nodeData = {\n labelStyle: '',\n shape: newNode.shape,\n label: newNode.description,\n cssClasses: newNode.cssClasses,\n cssCompiledStyles: [],\n cssStyles: newNode.cssStyles,\n id: itemId,\n dir: newNode.dir,\n domId: stateDomId(itemId, graphItemCount),\n type: newNode.type,\n isGroup: newNode.type === 'group',\n padding: 8,\n rx: 10,\n ry: 10,\n look,\n };\n\n // Clear the label for dividers who have no description\n if (nodeData.shape === SHAPE_DIVIDER) {\n nodeData.label = '';\n }\n\n if (parent && parent.id !== 'root') {\n log.trace('Setting node ', itemId, ' to be child of its parent ', parent.id);\n nodeData.parentId = parent.id;\n }\n\n nodeData.centerLabel = true;\n\n if (parsedItem.note) {\n // Todo: set random id\n const noteData = {\n labelStyle: '',\n shape: SHAPE_NOTE,\n label: parsedItem.note.text,\n cssClasses: CSS_DIAGRAM_NOTE,\n // useHtmlLabels: false,\n cssStyles: [],\n cssCompilesStyles: [],\n id: itemId + NOTE_ID + '-' + graphItemCount,\n domId: stateDomId(itemId, graphItemCount, NOTE),\n type: newNode.type,\n isGroup: newNode.type === 'group',\n padding: getConfig().flowchart.padding,\n look,\n position: parsedItem.note.position,\n };\n const parentNodeId = itemId + PARENT_ID;\n const groupData = {\n labelStyle: '',\n shape: SHAPE_NOTEGROUP,\n label: parsedItem.note.text,\n cssClasses: newNode.cssClasses,\n cssStyles: [],\n id: itemId + PARENT_ID,\n domId: stateDomId(itemId, graphItemCount, PARENT),\n type: 'group',\n isGroup: true,\n padding: 16, //getConfig().flowchart.padding\n look,\n position: parsedItem.note.position,\n };\n graphItemCount++;\n\n //add parent id to groupData\n groupData.id = parentNodeId;\n //add parent id to noteData\n noteData.parentId = parentNodeId;\n //nodeData.parentId = parentNodeId;\n\n //insert groupData\n insertOrUpdateNode(nodes, groupData, classes);\n //insert noteData\n insertOrUpdateNode(nodes, noteData, classes);\n //insert nodeData\n insertOrUpdateNode(nodes, nodeData, classes);\n\n let from = itemId;\n let to = noteData.id;\n\n if (parsedItem.note.position === 'left of') {\n from = noteData.id;\n to = itemId;\n }\n\n edges.push({\n id: from + '-' + to,\n start: from,\n end: to,\n arrowhead: 'none',\n arrowTypeEnd: '',\n style: G_EDGE_STYLE,\n labelStyle: '',\n classes: CSS_EDGE_NOTE_EDGE,\n arrowheadStyle: G_EDGE_ARROWHEADSTYLE,\n labelpos: G_EDGE_LABELPOS,\n labelType: G_EDGE_LABELTYPE,\n thickness: G_EDGE_THICKNESS,\n look,\n });\n } else {\n insertOrUpdateNode(nodes, nodeData, classes);\n }\n }\n if (parsedItem.doc) {\n log.trace('Adding nodes children ');\n setupDoc(parsedItem, parsedItem.doc, diagramStates, nodes, edges, !altFlag, look, classes);\n }\n};\n\nexport const reset = () => {\n nodeDb.clear();\n graphItemCount = 0;\n};\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DiagramStyleClassDef } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { getDiagramElement } from '../../rendering-util/insertElementsForSize.js';\nimport { render } from '../../rendering-util/render.js';\nimport { setupViewPortForSVG } from '../../rendering-util/setupViewPortForSVG.js';\nimport type { LayoutData } from '../../rendering-util/types.js';\nimport utils from '../../utils.js';\nimport { CSS_DIAGRAM, DEFAULT_NESTED_DOC_DIR } from './stateCommon.js';\n\n/**\n * Get the direction from the statement items.\n * Look through all of the documents (docs) in the parsedItems\n * Because is a _document_ direction, the default direction is not necessarily the same as the overall default _diagram_ direction.\n * @param parsedItem - the parsed statement item to look through\n * @param defaultDir - the direction to use if none is found\n * @returns The direction to use\n */\nexport const getDir = (parsedItem: any, defaultDir = DEFAULT_NESTED_DOC_DIR) => {\n if (!parsedItem.doc) {\n return defaultDir;\n }\n\n let dir = defaultDir;\n\n for (const parsedItemDoc of parsedItem.doc) {\n if (parsedItemDoc.stmt === 'dir') {\n dir = parsedItemDoc.value;\n }\n }\n\n return dir;\n};\n\nexport const getClasses = function (\n text: string,\n diagramObj: any\n): Map {\n diagramObj.db.extract(diagramObj.db.getRootDocV2());\n return diagramObj.db.getClasses();\n};\n\nexport const draw = async function (text: string, id: string, _version: string, diag: any) {\n log.info('REF0:');\n log.info('Drawing state diagram (v2)', id);\n const { securityLevel, state: conf, layout } = getConfig();\n // Extracting the data from the parsed structure into a more usable form\n // Not related to the refactoring, but this is the first step in the rendering process\n diag.db.extract(diag.db.getRootDocV2());\n\n //const DIR = getDir(diag.db.getRootDocV2());\n\n // The getData method provided in all supported diagrams is used to extract the data from the parsed structure\n // into the Layout data format\n const data4Layout = diag.db.getData() as LayoutData;\n\n // Create the root SVG - the element is the div containing the SVG element\n const svg = getDiagramElement(id, securityLevel);\n\n data4Layout.type = diag.type;\n data4Layout.layoutAlgorithm = layout;\n\n // TODO: Should we move these two to baseConfig? These types are not there in StateConfig.\n\n data4Layout.nodeSpacing = conf?.nodeSpacing || 50;\n data4Layout.rankSpacing = conf?.rankSpacing || 50;\n data4Layout.markers = ['barb'];\n data4Layout.diagramId = id;\n // console.log('REF1:', data4Layout);\n await render(data4Layout, svg);\n const padding = 8;\n utils.insertTitle(\n svg,\n 'statediagramTitleText',\n conf?.titleTopMargin ?? 25,\n diag.db.getDiagramTitle()\n );\n setupViewPortForSVG(svg, padding, CSS_DIAGRAM, conf?.useMaxWidth ?? true);\n};\n\nexport default {\n getClasses,\n draw,\n getDir,\n};\n", "import { log } from '../../logger.js';\nimport { generateId } from '../../utils.js';\nimport common from '../common/common.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\nimport { dataFetcher, reset as resetDataFetching } from './dataFetcher.js';\nimport { getDir } from './stateRenderer-v3-unified.js';\n\nimport {\n DEFAULT_DIAGRAM_DIRECTION,\n STMT_STATE,\n STMT_RELATION,\n STMT_CLASSDEF,\n STMT_STYLEDEF,\n STMT_APPLYCLASS,\n DEFAULT_STATE_TYPE,\n DIVIDER_TYPE,\n} from './stateCommon.js';\n\nconst START_NODE = '[*]';\nconst START_TYPE = 'start';\nconst END_NODE = START_NODE;\nconst END_TYPE = 'end';\n\nconst COLOR_KEYWORD = 'color';\nconst FILL_KEYWORD = 'fill';\nconst BG_FILL = 'bgFill';\nconst STYLECLASS_SEP = ',';\n\n/**\n * Returns a new list of classes.\n * In the future, this can be replaced with a class common to all diagrams.\n * ClassDef information = { id: id, styles: [], textStyles: [] }\n *\n * @returns {Map}\n */\nfunction newClassesList() {\n return new Map();\n}\n\nlet nodes = [];\nlet edges = [];\n\nlet direction = DEFAULT_DIAGRAM_DIRECTION;\nlet rootDoc = [];\nlet classes = newClassesList(); // style classes defined by a classDef\n\n// --------------------------------------\n\nconst newDoc = () => {\n return {\n /** @type {{ id1: string, id2: string, relationTitle: string }[]} */\n relations: [],\n states: new Map(),\n documents: {},\n };\n};\nlet documents = {\n root: newDoc(),\n};\n\nlet currentDocument = documents.root;\nlet startEndCount = 0;\nlet dividerCnt = 0;\n\nexport const lineType = {\n LINE: 0,\n DOTTED_LINE: 1,\n};\n\nexport const relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3,\n};\n\nconst clone = (o) => JSON.parse(JSON.stringify(o));\n\nconst setRootDoc = (o) => {\n log.info('Setting root doc', o);\n // rootDoc = { id: 'root', doc: o };\n rootDoc = o;\n};\n\nconst getRootDoc = () => rootDoc;\n\nconst docTranslator = (parent, node, first) => {\n if (node.stmt === STMT_RELATION) {\n docTranslator(parent, node.state1, true);\n docTranslator(parent, node.state2, false);\n } else {\n if (node.stmt === STMT_STATE) {\n if (node.id === '[*]') {\n node.id = first ? parent.id + '_start' : parent.id + '_end';\n node.start = first;\n } else {\n // This is just a plain state, not a start or end\n node.id = node.id.trim();\n }\n }\n\n if (node.doc) {\n const doc = [];\n // Check for concurrency\n let currentDoc = [];\n let i;\n for (i = 0; i < node.doc.length; i++) {\n if (node.doc[i].type === DIVIDER_TYPE) {\n // debugger;\n const newNode = clone(node.doc[i]);\n newNode.doc = clone(currentDoc);\n doc.push(newNode);\n currentDoc = [];\n } else {\n currentDoc.push(node.doc[i]);\n }\n }\n\n // If any divider was encountered\n if (doc.length > 0 && currentDoc.length > 0) {\n const newNode = {\n stmt: STMT_STATE,\n id: generateId(),\n type: 'divider',\n doc: clone(currentDoc),\n };\n doc.push(clone(newNode));\n node.doc = doc;\n }\n\n node.doc.forEach((docNode) => docTranslator(node, docNode, true));\n }\n }\n};\nconst getRootDocV2 = () => {\n docTranslator({ id: 'root' }, { id: 'root', doc: rootDoc }, true);\n return { id: 'root', doc: rootDoc };\n // Here\n};\n\n/**\n * Convert all of the statements (stmts) that were parsed into states and relationships.\n * This is done because a state diagram may have nested sections,\n * where each section is a 'document' and has its own set of statements.\n * Ex: the section within a fork has its own statements, and incoming and outgoing statements\n * refer to the fork as a whole (document).\n * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.\n * This will push the statement into the list of statements for the current document.\n *\n * @param _doc\n */\nconst extract = (_doc) => {\n // const res = { states: [], relations: [] };\n let doc;\n if (_doc.doc) {\n doc = _doc.doc;\n } else {\n doc = _doc;\n }\n // let doc = root.doc;\n // if (!doc) {\n // doc = root;\n // }\n log.info(doc);\n clear(true);\n\n log.info('Extract initial document:', doc);\n\n doc.forEach((item) => {\n log.warn('Statement', item.stmt);\n switch (item.stmt) {\n case STMT_STATE:\n addState(\n item.id.trim(),\n item.type,\n item.doc,\n item.description,\n item.note,\n item.classes,\n item.styles,\n item.textStyles\n );\n break;\n case STMT_RELATION:\n addRelation(item.state1, item.state2, item.description);\n break;\n case STMT_CLASSDEF:\n addStyleClass(item.id.trim(), item.classes);\n break;\n case STMT_STYLEDEF:\n {\n const ids = item.id.trim().split(',');\n const styles = item.styleClass.split(',');\n ids.forEach((id) => {\n let foundState = getState(id);\n if (foundState === undefined) {\n const trimmedId = id.trim();\n addState(trimmedId);\n foundState = getState(trimmedId);\n }\n foundState.styles = styles.map((s) => s.replace(/;/g, '')?.trim());\n });\n }\n break;\n case STMT_APPLYCLASS:\n setCssClass(item.id.trim(), item.styleClass);\n break;\n }\n });\n\n const diagramStates = getStates();\n const config = getConfig();\n const look = config.look;\n resetDataFetching();\n dataFetcher(undefined, getRootDocV2(), diagramStates, nodes, edges, true, look, classes);\n nodes.forEach((node) => {\n if (Array.isArray(node.label)) {\n // add the rest as description\n node.description = node.label.slice(1);\n if (node.isGroup && node.description.length > 0) {\n throw new Error(\n 'Group nodes can only have label. Remove the additional description for node [' +\n node.id +\n ']'\n );\n }\n // add first description as label\n node.label = node.label[0];\n }\n });\n};\n\n/**\n * Function called by parser when a node definition has been found.\n *\n * @param {null | string} id\n * @param {null | string} type\n * @param {null | string} doc\n * @param {null | string | string[]} descr - description for the state. Can be a string or a list or strings\n * @param {null | string} note\n * @param {null | string | string[]} classes - class styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 class, convert it to an array of that 1 class.\n * @param {null | string | string[]} styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.\n * @param {null | string | string[]} textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.\n */\nexport const addState = function (\n id,\n type = DEFAULT_STATE_TYPE,\n doc = null,\n descr = null,\n note = null,\n classes = null,\n styles = null,\n textStyles = null\n) {\n const trimmedId = id?.trim();\n // add the state if needed\n if (!currentDocument.states.has(trimmedId)) {\n log.info('Adding state ', trimmedId, descr);\n currentDocument.states.set(trimmedId, {\n id: trimmedId,\n descriptions: [],\n type,\n doc,\n note,\n classes: [],\n styles: [],\n textStyles: [],\n });\n } else {\n if (!currentDocument.states.get(trimmedId).doc) {\n currentDocument.states.get(trimmedId).doc = doc;\n }\n if (!currentDocument.states.get(trimmedId).type) {\n currentDocument.states.get(trimmedId).type = type;\n }\n }\n\n if (descr) {\n log.info('Setting state description', trimmedId, descr);\n if (typeof descr === 'string') {\n addDescription(trimmedId, descr.trim());\n }\n\n if (typeof descr === 'object') {\n descr.forEach((des) => addDescription(trimmedId, des.trim()));\n }\n }\n\n if (note) {\n const doc2 = currentDocument.states.get(trimmedId);\n doc2.note = note;\n doc2.note.text = common.sanitizeText(doc2.note.text, getConfig());\n }\n\n if (classes) {\n log.info('Setting state classes', trimmedId, classes);\n const classesList = typeof classes === 'string' ? [classes] : classes;\n classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim()));\n }\n\n if (styles) {\n log.info('Setting state styles', trimmedId, styles);\n const stylesList = typeof styles === 'string' ? [styles] : styles;\n stylesList.forEach((style) => setStyle(trimmedId, style.trim()));\n }\n\n if (textStyles) {\n log.info('Setting state styles', trimmedId, styles);\n const textStylesList = typeof textStyles === 'string' ? [textStyles] : textStyles;\n textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim()));\n }\n};\n\nexport const clear = function (saveCommon) {\n nodes = [];\n edges = [];\n documents = {\n root: newDoc(),\n };\n currentDocument = documents.root;\n\n // number of start and end nodes; used to construct ids\n startEndCount = 0;\n classes = newClassesList();\n if (!saveCommon) {\n commonClear();\n }\n};\n\nexport const getState = function (id) {\n return currentDocument.states.get(id);\n};\n\nexport const getStates = function () {\n return currentDocument.states;\n};\nexport const logDocuments = function () {\n log.info('Documents = ', documents);\n};\nexport const getRelations = function () {\n return currentDocument.relations;\n};\n\n/**\n * If the id is a start node ( [*] ), then return a new id constructed from\n * the start node name and the current start node count.\n * else return the given id\n *\n * @param {string} id\n * @returns {string} - the id (original or constructed)\n */\nfunction startIdIfNeeded(id = '') {\n let fixedId = id;\n if (id === START_NODE) {\n startEndCount++;\n fixedId = `${START_TYPE}${startEndCount}`;\n }\n return fixedId;\n}\n\n/**\n * If the id is a start node ( [*] ), then return the start type ('start')\n * else return the given type\n *\n * @param {string} id\n * @param {string} type\n * @returns {string} - the type that should be used\n */\nfunction startTypeIfNeeded(id = '', type = DEFAULT_STATE_TYPE) {\n return id === START_NODE ? START_TYPE : type;\n}\n\n/**\n * If the id is an end node ( [*] ), then return a new id constructed from\n * the end node name and the current start_end node count.\n * else return the given id\n *\n * @param {string} id\n * @returns {string} - the id (original or constructed)\n */\nfunction endIdIfNeeded(id = '') {\n let fixedId = id;\n if (id === END_NODE) {\n startEndCount++;\n fixedId = `${END_TYPE}${startEndCount}`;\n }\n return fixedId;\n}\n\n/**\n * If the id is an end node ( [*] ), then return the end type\n * else return the given type\n *\n * @param {string} id\n * @param {string} type\n * @returns {string} - the type that should be used\n */\nfunction endTypeIfNeeded(id = '', type = DEFAULT_STATE_TYPE) {\n return id === END_NODE ? END_TYPE : type;\n}\n\n/**\n *\n * @param item1\n * @param item2\n * @param relationTitle\n */\nexport function addRelationObjs(item1, item2, relationTitle) {\n let id1 = startIdIfNeeded(item1.id.trim());\n let type1 = startTypeIfNeeded(item1.id.trim(), item1.type);\n let id2 = startIdIfNeeded(item2.id.trim());\n let type2 = startTypeIfNeeded(item2.id.trim(), item2.type);\n\n addState(\n id1,\n type1,\n item1.doc,\n item1.description,\n item1.note,\n item1.classes,\n item1.styles,\n item1.textStyles\n );\n addState(\n id2,\n type2,\n item2.doc,\n item2.description,\n item2.note,\n item2.classes,\n item2.styles,\n item2.textStyles\n );\n\n currentDocument.relations.push({\n id1,\n id2,\n relationTitle: common.sanitizeText(relationTitle, getConfig()),\n });\n}\n\n/**\n * Add a relation between two items. The items may be full objects or just the string id of a state.\n *\n * @param {string | object} item1\n * @param {string | object} item2\n * @param {string} title\n */\nexport const addRelation = function (item1, item2, title) {\n if (typeof item1 === 'object') {\n addRelationObjs(item1, item2, title);\n } else {\n const id1 = startIdIfNeeded(item1.trim());\n const type1 = startTypeIfNeeded(item1);\n const id2 = endIdIfNeeded(item2.trim());\n const type2 = endTypeIfNeeded(item2);\n\n addState(id1, type1);\n addState(id2, type2);\n currentDocument.relations.push({\n id1,\n id2,\n title: common.sanitizeText(title, getConfig()),\n });\n }\n};\n\nexport const addDescription = function (id, descr) {\n const theState = currentDocument.states.get(id);\n const _descr = descr.startsWith(':') ? descr.replace(':', '').trim() : descr;\n theState.descriptions.push(common.sanitizeText(_descr, getConfig()));\n};\n\nexport const cleanupLabel = function (label) {\n if (label.substring(0, 1) === ':') {\n return label.substr(2).trim();\n } else {\n return label.trim();\n }\n};\n\nconst getDividerId = () => {\n dividerCnt++;\n return 'divider-id-' + dividerCnt;\n};\n\n/**\n * Called when the parser comes across a (style) class definition\n * @example classDef my-style fill:#f96;\n *\n * @param {string} id - the id of this (style) class\n * @param {string | null} styleAttributes - the string with 1 or more style attributes (each separated by a comma)\n */\nexport const addStyleClass = function (id, styleAttributes = '') {\n // create a new style class object with this id\n if (!classes.has(id)) {\n classes.set(id, { id: id, styles: [], textStyles: [] }); // This is a classDef\n }\n const foundClass = classes.get(id);\n if (styleAttributes !== undefined && styleAttributes !== null) {\n styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {\n // remove any trailing ;\n const fixedAttrib = attrib.replace(/([^;]*);/, '$1').trim();\n\n // replace some style keywords\n if (RegExp(COLOR_KEYWORD).exec(attrib)) {\n const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);\n const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);\n foundClass.textStyles.push(newStyle2);\n }\n foundClass.styles.push(fixedAttrib);\n });\n }\n};\n\n/**\n * Return all of the style classes\n * @returns {{} | any | classes}\n */\nexport const getClasses = function () {\n return classes;\n};\n\n/**\n * Add a (style) class or css class to a state with the given id.\n * If the state isn't already in the list of known states, add it.\n * Might be called by parser when a style class or CSS class should be applied to a state\n *\n * @param {string | string[]} itemIds The id or a list of ids of the item(s) to apply the css class to\n * @param {string} cssClassName CSS class name\n */\nexport const setCssClass = function (itemIds, cssClassName) {\n itemIds.split(',').forEach(function (id) {\n let foundState = getState(id);\n if (foundState === undefined) {\n const trimmedId = id.trim();\n addState(trimmedId);\n foundState = getState(trimmedId);\n }\n foundState.classes.push(cssClassName);\n });\n};\n\n/**\n * Add a style to a state with the given id.\n * @example style stateId fill:#f9f,stroke:#333,stroke-width:4px\n * where 'style' is the keyword\n * stateId is the id of a state\n * the rest of the string is the styleText (all of the attributes to be applied to the state)\n *\n * @param itemId The id of item to apply the style to\n * @param styleText - the text of the attributes for the style\n */\nexport const setStyle = function (itemId, styleText) {\n const item = getState(itemId);\n if (item !== undefined) {\n item.styles.push(styleText);\n }\n};\n\n/**\n * Add a text style to a state with the given id\n *\n * @param itemId The id of item to apply the css class to\n * @param cssClassName CSS class name\n */\nexport const setTextStyle = function (itemId, cssClassName) {\n const item = getState(itemId);\n if (item !== undefined) {\n item.textStyles.push(cssClassName);\n }\n};\n\nconst getDirection = () => direction;\nconst setDirection = (dir) => {\n direction = dir;\n};\n\nconst trimColon = (str) => (str && str[0] === ':' ? str.substr(1).trim() : str.trim());\n\nexport const getData = () => {\n const config = getConfig();\n return { nodes, edges, other: {}, config, direction: getDir(getRootDocV2()) };\n};\n\nexport default {\n getConfig: () => getConfig().state,\n getData,\n addState,\n clear,\n getState,\n getStates,\n getRelations,\n getClasses,\n getDirection,\n addRelation,\n getDividerId,\n setDirection,\n cleanupLabel,\n lineType,\n relationType,\n logDocuments,\n getRootDoc,\n setRootDoc,\n getRootDocV2,\n extract,\n trimColon,\n getAccTitle,\n setAccTitle,\n getAccDescription,\n setAccDescription,\n addStyleClass,\n setCssClass,\n addDescription,\n setDiagramTitle,\n getDiagramTitle,\n};\n", "const getStyles = (options) =>\n `\ndefs #statediagram-barbEnd {\n fill: ${options.transitionColor};\n stroke: ${options.transitionColor};\n }\ng.stateGroup text {\n fill: ${options.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${options.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${options.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${options.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${options.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${options.noteBorderColor};\n fill: ${options.noteBkgColor};\n\n text {\n fill: ${options.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${options.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${options.edgeLabelBackground};\n p {\n background-color: ${options.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${options.transitionLabelColor || options.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${options.transitionLabelColor || options.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${options.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${options.specialStateColor};\n stroke: ${options.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${options.specialStateColor};\n stroke: ${options.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${options.innerEndBackground};\n stroke: ${options.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${options.compositeBackground || options.background};\n // stroke: ${options.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${options.stateBkg || options.mainBkg};\n stroke: ${options.stateBorder || options.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${options.mainBkg};\n stroke: ${options.stateBorder || options.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${options.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${options.compositeTitleBackground};\n stroke: ${options.stateBorder || options.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${options.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${options.stateBorder || options.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${options.compositeBackground || options.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${options.altBackground ? options.altBackground : '#efefef'};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${options.altBackground ? options.altBackground : '#efefef'};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${options.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${options.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${options.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${options.lineColor};\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n}\n`;\n\n// todo: change composit to composite\n// cspell:ignore composit\n\nexport default getStyles;\n", "const idCache = {};\n\nexport const set = (key, val) => {\n idCache[key] = val;\n};\n\nexport const get = (k) => idCache[k];\nexport const keys = () => Object.keys(idCache);\nexport const size = () => keys().length;\n\nexport default {\n get,\n set,\n keys,\n size,\n};\n", "import { line, curveBasis } from 'd3';\nimport idCache from './id-cache.js';\nimport stateDb from './stateDb.js';\nimport utils from '../../utils.js';\nimport common from '../common/common.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\n\n/**\n * Draws a start state as a black circle\n *\n * @param {any} g\n */\nexport const drawStartState = (g) =>\n g\n .append('circle')\n // .style('stroke', 'black')\n // .style('fill', 'black')\n .attr('class', 'start-state')\n .attr('r', getConfig().state.sizeUnit)\n .attr('cx', getConfig().state.padding + getConfig().state.sizeUnit)\n .attr('cy', getConfig().state.padding + getConfig().state.sizeUnit);\n\n/**\n * Draws a start state as a black circle\n *\n * @param {any} g\n */\nexport const drawDivider = (g) =>\n g\n .append('line')\n .style('stroke', 'grey')\n .style('stroke-dasharray', '3')\n .attr('x1', getConfig().state.textHeight)\n .attr('class', 'divider')\n .attr('x2', getConfig().state.textHeight * 2)\n .attr('y1', 0)\n .attr('y2', 0);\n\n/**\n * Draws a an end state as a black circle\n *\n * @param {any} g\n * @param {any} stateDef\n */\nexport const drawSimpleState = (g, stateDef) => {\n const state = g\n .append('text')\n .attr('x', 2 * getConfig().state.padding)\n .attr('y', getConfig().state.textHeight + 2 * getConfig().state.padding)\n .attr('font-size', getConfig().state.fontSize)\n .attr('class', 'state-title')\n .text(stateDef.id);\n\n const classBox = state.node().getBBox();\n g.insert('rect', ':first-child')\n .attr('x', getConfig().state.padding)\n .attr('y', getConfig().state.padding)\n .attr('width', classBox.width + 2 * getConfig().state.padding)\n .attr('height', classBox.height + 2 * getConfig().state.padding)\n .attr('rx', getConfig().state.radius);\n\n return state;\n};\n\n/**\n * Draws a state with descriptions\n *\n * @param {any} g The d3 svg object to add the state to\n * @param {any} stateDef\n * @returns {any} The d3 svg state\n */\nexport const drawDescrState = (g, stateDef) => {\n const addTspan = function (textEl, txt, isFirst) {\n const tSpan = textEl\n .append('tspan')\n .attr('x', 2 * getConfig().state.padding)\n .text(txt);\n if (!isFirst) {\n tSpan.attr('dy', getConfig().state.textHeight);\n }\n };\n const title = g\n .append('text')\n .attr('x', 2 * getConfig().state.padding)\n .attr('y', getConfig().state.textHeight + 1.3 * getConfig().state.padding)\n .attr('font-size', getConfig().state.fontSize)\n .attr('class', 'state-title')\n .text(stateDef.descriptions[0]);\n\n const titleBox = title.node().getBBox();\n const titleHeight = titleBox.height;\n\n const description = g\n .append('text') // text label for the x axis\n .attr('x', getConfig().state.padding)\n .attr(\n 'y',\n titleHeight +\n getConfig().state.padding * 0.4 +\n getConfig().state.dividerMargin +\n getConfig().state.textHeight\n )\n .attr('class', 'state-description');\n\n let isFirst = true;\n let isSecond = true;\n stateDef.descriptions.forEach(function (descr) {\n if (!isFirst) {\n addTspan(description, descr, isSecond);\n isSecond = false;\n }\n isFirst = false;\n });\n\n const descrLine = g\n .append('line') // text label for the x axis\n .attr('x1', getConfig().state.padding)\n .attr('y1', getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2)\n .attr('y2', getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2)\n .attr('class', 'descr-divider');\n const descrBox = description.node().getBBox();\n const width = Math.max(descrBox.width, titleBox.width);\n\n descrLine.attr('x2', width + 3 * getConfig().state.padding);\n // const classBox = title.node().getBBox();\n\n g.insert('rect', ':first-child')\n .attr('x', getConfig().state.padding)\n .attr('y', getConfig().state.padding)\n .attr('width', width + 2 * getConfig().state.padding)\n .attr('height', descrBox.height + titleHeight + 2 * getConfig().state.padding)\n .attr('rx', getConfig().state.radius);\n\n return g;\n};\n\n/** Adds the creates a box around the existing content and adds a panel for the id on top of the content. */\n/**\n * Function that creates an title row and a frame around a substate for a composite state diagram.\n * The function returns a new d3 svg object with updated width and height properties;\n *\n * @param {any} g The d3 svg object for the substate to framed\n * @param {any} stateDef The info about the\n * @param {any} altBkg\n */\nexport const addTitleAndBox = (g, stateDef, altBkg) => {\n const pad = getConfig().state.padding;\n const dblPad = 2 * getConfig().state.padding;\n const orgBox = g.node().getBBox();\n const orgWidth = orgBox.width;\n const orgX = orgBox.x;\n\n const title = g\n .append('text')\n .attr('x', 0)\n .attr('y', getConfig().state.titleShift)\n .attr('font-size', getConfig().state.fontSize)\n .attr('class', 'state-title')\n .text(stateDef.id);\n\n const titleBox = title.node().getBBox();\n const titleWidth = titleBox.width + dblPad;\n let width = Math.max(titleWidth, orgWidth); // + dblPad;\n if (width === orgWidth) {\n width = width + dblPad;\n }\n let startX;\n // const lineY = 1 - getConfig().state.textHeight;\n // const descrLine = g\n // .append('line') // text label for the x axis\n // .attr('x1', 0)\n // .attr('y1', lineY)\n // .attr('y2', lineY)\n // .attr('class', 'descr-divider');\n\n const graphBox = g.node().getBBox();\n // descrLine.attr('x2', graphBox.width + getConfig().state.padding);\n\n if (stateDef.doc) {\n // console.warn(\n // stateDef.id,\n // 'orgX: ',\n // orgX,\n // 'width: ',\n // width,\n // 'titleWidth: ',\n // titleWidth,\n // 'orgWidth: ',\n // orgWidth,\n // 'width',\n // width\n // );\n }\n\n startX = orgX - pad;\n if (titleWidth > orgWidth) {\n startX = (orgWidth - width) / 2 + pad;\n }\n if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) {\n startX = orgX - (titleWidth - orgWidth) / 2;\n }\n\n const lineY = 1 - getConfig().state.textHeight;\n // White color\n g.insert('rect', ':first-child')\n .attr('x', startX)\n .attr('y', lineY)\n .attr('class', altBkg ? 'alt-composit' : 'composit') // cspell:disable-line\n .attr('width', width)\n .attr(\n 'height',\n graphBox.height + getConfig().state.textHeight + getConfig().state.titleShift + 1\n )\n .attr('rx', '0');\n\n title.attr('x', startX + pad);\n if (titleWidth <= orgWidth) {\n title.attr('x', orgX + (width - dblPad) / 2 - titleWidth / 2 + pad);\n }\n\n // Title background\n g.insert('rect', ':first-child')\n .attr('x', startX)\n .attr(\n 'y',\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n )\n .attr('width', width)\n // Just needs to be higher then the descr line, will be clipped by the white color box\n .attr('height', getConfig().state.textHeight * 3)\n .attr('rx', getConfig().state.radius);\n\n // Full background\n g.insert('rect', ':first-child')\n .attr('x', startX)\n .attr(\n 'y',\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n )\n .attr('width', width)\n .attr('height', graphBox.height + 3 + 2 * getConfig().state.textHeight)\n .attr('rx', getConfig().state.radius);\n\n return g;\n};\n\nconst drawEndState = (g) => {\n g.append('circle')\n // .style('stroke', 'black')\n // .style('fill', 'white')\n .attr('class', 'end-state-outer')\n .attr('r', getConfig().state.sizeUnit + getConfig().state.miniPadding)\n .attr(\n 'cx',\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n )\n .attr(\n 'cy',\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n );\n\n return (\n g\n .append('circle')\n // .style('stroke', 'black')\n // .style('fill', 'black')\n .attr('class', 'end-state-inner')\n .attr('r', getConfig().state.sizeUnit)\n .attr('cx', getConfig().state.padding + getConfig().state.sizeUnit + 2)\n .attr('cy', getConfig().state.padding + getConfig().state.sizeUnit + 2)\n );\n};\nconst drawForkJoinState = (g, stateDef) => {\n let width = getConfig().state.forkWidth;\n let height = getConfig().state.forkHeight;\n\n if (stateDef.parentId) {\n let tmp = width;\n width = height;\n height = tmp;\n }\n return g\n .append('rect')\n .style('stroke', 'black')\n .style('fill', 'black')\n .attr('width', width)\n .attr('height', height)\n .attr('x', getConfig().state.padding)\n .attr('y', getConfig().state.padding);\n};\n\nexport const drawText = function (elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.attr('fill', textData.fill);\n if (textData.class !== undefined) {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n\n return textElem;\n};\n\nconst _drawLongText = (_text, x, y, g) => {\n let textHeight = 0;\n\n const textElem = g.append('text');\n textElem.style('text-anchor', 'start');\n textElem.attr('class', 'noteText');\n\n let text = _text.replace(/\\r\\n/g, '
    ');\n text = text.replace(/\\n/g, '
    ');\n const lines = text.split(common.lineBreakRegex);\n\n let tHeight = 1.25 * getConfig().state.noteMargin;\n for (const line of lines) {\n const txt = line.trim();\n\n if (txt.length > 0) {\n const span = textElem.append('tspan');\n span.text(txt);\n if (tHeight === 0) {\n const textBounds = span.node().getBBox();\n tHeight += textBounds.height;\n }\n textHeight += tHeight;\n span.attr('x', x + getConfig().state.noteMargin);\n span.attr('y', y + textHeight + 1.25 * getConfig().state.noteMargin);\n }\n }\n return { textWidth: textElem.node().getBBox().width, textHeight };\n};\n\n/**\n * Draws a note to the diagram\n *\n * @param text - The text of the given note.\n * @param g - The element the note is attached to.\n */\n\nexport const drawNote = (text, g) => {\n g.attr('class', 'state-note');\n const note = g.append('rect').attr('x', 0).attr('y', getConfig().state.padding);\n const rectElem = g.append('g');\n\n const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);\n note.attr('height', textHeight + 2 * getConfig().state.noteMargin);\n note.attr('width', textWidth + getConfig().state.noteMargin * 2);\n\n return note;\n};\n\n/**\n * Starting point for drawing a state. The function finds out the specifics about the state and\n * renders with appropriate function.\n *\n * @param {any} elem\n * @param {any} stateDef\n */\n\nexport const drawState = function (elem, stateDef) {\n const id = stateDef.id;\n const stateInfo = {\n id: id,\n label: stateDef.id,\n width: 0,\n height: 0,\n };\n\n const g = elem.append('g').attr('id', id).attr('class', 'stateGroup');\n\n if (stateDef.type === 'start') {\n drawStartState(g);\n }\n if (stateDef.type === 'end') {\n drawEndState(g);\n }\n if (stateDef.type === 'fork' || stateDef.type === 'join') {\n drawForkJoinState(g, stateDef);\n }\n if (stateDef.type === 'note') {\n drawNote(stateDef.note.text, g);\n }\n if (stateDef.type === 'divider') {\n drawDivider(g);\n }\n if (stateDef.type === 'default' && stateDef.descriptions.length === 0) {\n drawSimpleState(g, stateDef);\n }\n if (stateDef.type === 'default' && stateDef.descriptions.length > 0) {\n drawDescrState(g, stateDef);\n }\n\n const stateBox = g.node().getBBox();\n stateInfo.width = stateBox.width + 2 * getConfig().state.padding;\n stateInfo.height = stateBox.height + 2 * getConfig().state.padding;\n\n idCache.set(id, stateInfo);\n // stateCnt++;\n return stateInfo;\n};\n\nlet edgeCount = 0;\nexport const drawEdge = function (elem, path, relation) {\n const getRelationType = function (type) {\n switch (type) {\n case stateDb.relationType.AGGREGATION:\n return 'aggregation';\n case stateDb.relationType.EXTENSION:\n return 'extension';\n case stateDb.relationType.COMPOSITION:\n return 'composition';\n case stateDb.relationType.DEPENDENCY:\n return 'dependency';\n }\n };\n\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n\n // The data for our line\n const lineData = path.points;\n\n // This is the accessor function we talked about above\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', 'edge' + edgeCount)\n .attr('class', 'transition');\n let url = '';\n if (getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n svgPath.attr(\n 'marker-end',\n 'url(' + url + '#' + getRelationType(stateDb.relationType.DEPENDENCY) + 'End' + ')'\n );\n\n if (relation.title !== undefined) {\n const label = elem.append('g').attr('class', 'stateLabel');\n\n const { x, y } = utils.calcLabelPosition(path.points);\n\n const rows = common.getRows(relation.title);\n\n let titleHeight = 0;\n const titleRows = [];\n let maxWidth = 0;\n let minX = 0;\n\n for (let i = 0; i <= rows.length; i++) {\n const title = label\n .append('text')\n .attr('text-anchor', 'middle')\n .text(rows[i])\n .attr('x', x)\n .attr('y', y + titleHeight);\n\n const boundsTmp = title.node().getBBox();\n maxWidth = Math.max(maxWidth, boundsTmp.width);\n minX = Math.min(minX, boundsTmp.x);\n\n log.info(boundsTmp.x, x, y + titleHeight);\n\n if (titleHeight === 0) {\n const titleBox = title.node().getBBox();\n titleHeight = titleBox.height;\n log.info('Title height', titleHeight, y);\n }\n titleRows.push(title);\n }\n\n let boxHeight = titleHeight * rows.length;\n if (rows.length > 1) {\n const heightAdj = (rows.length - 1) * titleHeight * 0.5;\n\n titleRows.forEach((title, i) => title.attr('y', y + i * titleHeight - heightAdj));\n boxHeight = titleHeight * rows.length;\n }\n\n const bounds = label.node().getBBox();\n\n label\n .insert('rect', ':first-child')\n .attr('class', 'box')\n .attr('x', x - maxWidth / 2 - getConfig().state.padding / 2)\n .attr('y', y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5)\n .attr('width', maxWidth + getConfig().state.padding)\n .attr('height', boxHeight + getConfig().state.padding);\n\n log.info(bounds);\n\n //label.attr('transform', '0 -' + (bounds.y / 2));\n\n // Debug points\n // path.points.forEach(point => {\n // g.append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n // g.append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 1)\n // .attr('cx', x)\n // .attr('cy', y);\n }\n\n edgeCount++;\n};\n", "import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger.js';\nimport common from '../common/common.js';\nimport { drawState, addTitleAndBox, drawEdge } from './shapes.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\n// TODO Move conf object to main conf in mermaidAPI\nlet conf;\n\nconst transformationLog = {};\n\nexport const setConf = function () {\n //no-op\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {any} text\n * @param {any} id\n * @param _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n conf = getConfig().state;\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n log.debug('Rendering diagram ' + text);\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n const rootDoc = diagObj.db.getRootDoc();\n renderDoc(rootDoc, diagram, undefined, false, root, doc, diagObj);\n\n const padding = conf.padding;\n const bounds = diagram.node().getBBox();\n\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n\n // zoom in a bit\n const svgWidth = width * 1.75;\n configureSvgSize(diagram, height, svgWidth, conf.useMaxWidth);\n\n diagram.attr(\n 'viewBox',\n `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + ' ' + height\n );\n};\nconst getLabelWidth = (text) => {\n return text ? text.length * conf.fontSizeFactor : 1;\n};\n\nconst renderDoc = (doc, diagram, parentId, altBkg, root, domDocument, diagObj) => {\n // Layout graph, Create a new directed graph\n const graph = new graphlib.Graph({\n compound: true,\n multigraph: true,\n });\n\n let i;\n let edgeFreeDoc = true;\n for (i = 0; i < doc.length; i++) {\n if (doc[i].stmt === 'relation') {\n edgeFreeDoc = false;\n break;\n }\n }\n\n // Set an object for the graph label\n if (parentId) {\n graph.setGraph({\n rankdir: 'LR',\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n ranker: 'tight-tree',\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n isMultiGraph: true,\n // ranksep: 5,\n // nodesep: 1\n });\n } else {\n graph.setGraph({\n rankdir: 'TB',\n multigraph: true,\n compound: true,\n // isCompound: true,\n // acyclicer: 'greedy',\n // ranker: 'longest-path'\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n ranker: 'tight-tree',\n // ranker: 'network-simplex'\n isMultiGraph: true,\n });\n }\n\n // Default to assigning a new object as a label for each new edge.\n graph.setDefaultEdgeLabel(function () {\n return {};\n });\n\n diagObj.db.extract(doc);\n const states = diagObj.db.getStates();\n const relations = diagObj.db.getRelations();\n\n const keys = Object.keys(states);\n\n let first = true;\n\n for (const key of keys) {\n const stateDef = states[key];\n\n if (parentId) {\n stateDef.parentId = parentId;\n }\n\n let node;\n if (stateDef.doc) {\n let sub = diagram.append('g').attr('id', stateDef.id).attr('class', 'stateGroup');\n node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj);\n\n if (first) {\n // first = false;\n sub = addTitleAndBox(sub, stateDef, altBkg);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height + conf.padding / 2;\n transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n } else {\n // sub = addIdAndBox(sub, stateDef);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height;\n // transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n }\n } else {\n node = drawState(diagram, stateDef, graph);\n }\n\n if (stateDef.note) {\n // Draw note note\n const noteDef = {\n descriptions: [],\n id: stateDef.id + '-note',\n note: stateDef.note,\n type: 'note',\n };\n const note = drawState(diagram, noteDef, graph);\n\n // graph.setNode(node.id, node);\n if (stateDef.note.position === 'left of') {\n graph.setNode(node.id + '-note', note);\n graph.setNode(node.id, node);\n } else {\n graph.setNode(node.id, node);\n graph.setNode(node.id + '-note', note);\n }\n // graph.setNode(node.id);\n graph.setParent(node.id, node.id + '-group');\n graph.setParent(node.id + '-note', node.id + '-group');\n } else {\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n graph.setNode(node.id, node);\n }\n }\n\n log.debug('Count=', graph.nodeCount(), graph);\n let cnt = 0;\n relations.forEach(function (relation) {\n cnt++;\n log.debug('Setting edge', relation);\n graph.setEdge(\n relation.id1,\n relation.id2,\n {\n relation: relation,\n width: getLabelWidth(relation.title),\n height: conf.labelHeight * common.getRows(relation.title).length,\n labelpos: 'c',\n },\n 'id' + cnt\n );\n });\n\n dagreLayout(graph);\n\n log.debug('Graph after layout', graph.nodes());\n const svgElem = diagram.node();\n\n graph.nodes().forEach(function (v) {\n if (v !== undefined && graph.node(v) !== undefined) {\n log.warn('Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n root\n .select('#' + svgElem.id + ' #' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y +\n (transformationLog[v] ? transformationLog[v].y : 0) -\n graph.node(v).height / 2) +\n ' )'\n );\n root\n .select('#' + svgElem.id + ' #' + v)\n .attr('data-x-shift', graph.node(v).x - graph.node(v).width / 2);\n const dividers = domDocument.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider');\n dividers.forEach((divider) => {\n const parent = divider.parentElement;\n let pWidth = 0;\n let pShift = 0;\n if (parent) {\n if (parent.parentElement) {\n pWidth = parent.parentElement.getBBox().width;\n }\n pShift = parseInt(parent.getAttribute('data-x-shift'), 10);\n if (Number.isNaN(pShift)) {\n pShift = 0;\n }\n }\n divider.setAttribute('x1', 0 - pShift + 8);\n divider.setAttribute('x2', pWidth - pShift - 8);\n });\n } else {\n log.debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n }\n });\n\n let stateBox = svgElem.getBBox();\n\n graph.edges().forEach(function (e) {\n if (e !== undefined && graph.edge(e) !== undefined) {\n log.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n drawEdge(diagram, graph.edge(e), graph.edge(e).relation);\n }\n });\n\n stateBox = svgElem.getBBox();\n\n const stateInfo = {\n id: parentId ? parentId : 'root',\n label: parentId ? parentId : 'root',\n width: 0,\n height: 0,\n };\n\n stateInfo.width = stateBox.width + 2 * conf.padding;\n stateInfo.height = stateBox.height + 2 * conf.padding;\n\n log.debug('Doc rendered', stateInfo, graph);\n return stateInfo;\n};\n\nexport default {\n setConf,\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/stateDiagram.jison';\nimport db from './stateDb.js';\nimport styles from './styles.js';\nimport renderer from './stateRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/stateDiagram.jison';\nimport db from './stateDb.js';\nimport styles from './styles.js';\nimport renderer from './stateRenderer-v3-unified.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,11,12,14,16,17,18],$V1=[1,9],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[1,14];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"journey\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NEWLINE\":10,\"title\":11,\"acc_title\":12,\"acc_title_value\":13,\"acc_descr\":14,\"acc_descr_value\":15,\"acc_descr_multiline_value\":16,\"section\":17,\"taskName\":18,\"taskData\":19,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"journey\",6:\"EOF\",8:\"SPACE\",10:\"NEWLINE\",11:\"title\",12:\"acc_title\",13:\"acc_title_value\",14:\"acc_descr\",15:\"acc_descr_value\",16:\"acc_descr_multiline_value\",17:\"section\",18:\"taskName\",19:\"taskData\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\nyy.setDiagramTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 9:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 10: case 11:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 12:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 13:\nyy.addTask($$[$0-1], $$[$0]);this.$='task';\nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:$V6},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:15,11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:$V6},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,8]),{13:[1,16]},{15:[1,17]},o($V0,[2,11]),o($V0,[2,12]),{19:[1,18]},o($V0,[2,4]),o($V0,[2,9]),o($V0,[2,10]),o($V0,[2,13])],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip comments */\nbreak;\ncase 1:/* skip comments */\nbreak;\ncase 2:return 10;\nbreak;\ncase 3:/* skip whitespace */\nbreak;\ncase 4:/* skip comments */\nbreak;\ncase 5:return 4;\nbreak;\ncase 6:return 11;\nbreak;\ncase 7: this.begin(\"acc_title\");return 12; \nbreak;\ncase 8: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 9: this.begin(\"acc_descr\");return 14; \nbreak;\ncase 10: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 11: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 12: this.popState(); \nbreak;\ncase 13:return \"acc_descr_multiline_value\";\nbreak;\ncase 14:return 17;\nbreak;\ncase 15:return 18;\nbreak;\ncase 16:return 19;\nbreak;\ncase 17:return ':';\nbreak;\ncase 18:return 6;\nbreak;\ncase 19:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:journey\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:section\\s[^#:\\n;]+)/i,/^(?:[^#:\\n;]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[12,13],\"inclusive\":false},\"acc_descr\":{\"rules\":[10],\"inclusive\":false},\"acc_title\":{\"rules\":[8],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../common/commonDb.js';\n\nlet currentSection = '';\n\nconst sections = [];\nconst tasks = [];\nconst rawTasks = [];\n\nexport const clear = function () {\n sections.length = 0;\n tasks.length = 0;\n currentSection = '';\n rawTasks.length = 0;\n commonClear();\n};\n\nexport const addSection = function (txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function () {\n return sections;\n};\n\nexport const getTasks = function () {\n let allItemsProcessed = compileTasks();\n const maxDepth = 100;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks.push(...rawTasks);\n\n return tasks;\n};\n\nconst updateActors = function () {\n const tempActors = [];\n tasks.forEach((task) => {\n if (task.people) {\n tempActors.push(...task.people);\n }\n });\n\n const unique = new Set(tempActors);\n return [...unique].sort();\n};\n\nexport const addTask = function (descr, taskData) {\n const pieces = taskData.substr(1).split(':');\n\n let score = 0;\n let peeps = [];\n if (pieces.length === 1) {\n score = Number(pieces[0]);\n peeps = [];\n } else {\n score = Number(pieces[0]);\n peeps = pieces[1].split(',');\n }\n const peopleList = peeps.map((s) => s.trim());\n\n const rawTask = {\n section: currentSection,\n type: currentSection,\n people: peopleList,\n task: descr,\n score,\n };\n\n rawTasks.push(rawTask);\n};\n\nexport const addTaskOrg = function (descr) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: [],\n };\n tasks.push(newTask);\n};\n\nconst compileTasks = function () {\n const compileTask = function (pos) {\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (const [i, rawTask] of rawTasks.entries()) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTask.processed;\n }\n return allProcessed;\n};\n\nconst getActors = function () {\n return updateActors();\n};\n\nexport default {\n getConfig: () => getConfig().journey,\n clear,\n setDiagramTitle,\n getDiagramTitle,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n addSection,\n getSections,\n getTasks,\n addTask,\n addTaskOrg,\n getActors,\n};\n", "const getStyles = (options) =>\n `.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${options.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${options.textColor}\n }\n\n .legend {\n fill: ${options.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${options.textColor}\n }\n\n .face {\n ${options.faceColor ? `fill: ${options.faceColor}` : 'fill: #FFF8DC'};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${options.fillType0 ? `fill: ${options.fillType0}` : ''};\n }\n .task-type-1, .section-type-1 {\n ${options.fillType0 ? `fill: ${options.fillType1}` : ''};\n }\n .task-type-2, .section-type-2 {\n ${options.fillType0 ? `fill: ${options.fillType2}` : ''};\n }\n .task-type-3, .section-type-3 {\n ${options.fillType0 ? `fill: ${options.fillType3}` : ''};\n }\n .task-type-4, .section-type-4 {\n ${options.fillType0 ? `fill: ${options.fillType4}` : ''};\n }\n .task-type-5, .section-type-5 {\n ${options.fillType0 ? `fill: ${options.fillType5}` : ''};\n }\n .task-type-6, .section-type-6 {\n ${options.fillType0 ? `fill: ${options.fillType6}` : ''};\n }\n .task-type-7, .section-type-7 {\n ${options.fillType0 ? `fill: ${options.fillType7}` : ''};\n }\n\n .actor-0 {\n ${options.actor0 ? `fill: ${options.actor0}` : ''};\n }\n .actor-1 {\n ${options.actor1 ? `fill: ${options.actor1}` : ''};\n }\n .actor-2 {\n ${options.actor2 ? `fill: ${options.actor2}` : ''};\n }\n .actor-3 {\n ${options.actor3 ? `fill: ${options.actor3}` : ''};\n }\n .actor-4 {\n ${options.actor4 ? `fill: ${options.actor4}` : ''};\n }\n .actor-5 {\n ${options.actor5 ? `fill: ${options.actor5}` : ''};\n }\n`;\n\nexport default getStyles;\n", "import { arc as d3arc } from 'd3';\nimport * as svgDrawCommon from '../common/svgDrawCommon.js';\n\nexport const drawRect = function (elem, rectData) {\n return svgDrawCommon.drawRect(elem, rectData);\n};\n\nexport const drawFace = function (element, faceData) {\n const radius = 15;\n const circleElement = element\n .append('circle')\n .attr('cx', faceData.cx)\n .attr('cy', faceData.cy)\n .attr('class', 'face')\n .attr('r', radius)\n .attr('stroke-width', 2)\n .attr('overflow', 'visible');\n\n const face = element.append('g');\n\n //left eye\n face\n .append('circle')\n .attr('cx', faceData.cx - radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n //right eye\n face\n .append('circle')\n .attr('cx', faceData.cx + radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n /** @param {any} face */\n function smile(face) {\n const arc = d3arc()\n .startAngle(Math.PI / 2)\n .endAngle(3 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');\n }\n\n /** @param {any} face */\n function sad(face) {\n const arc = d3arc()\n .startAngle((3 * Math.PI) / 2)\n .endAngle(5 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');\n }\n\n /** @param {any} face */\n function ambivalent(face) {\n face\n .append('line')\n .attr('class', 'mouth')\n .attr('stroke', 2)\n .attr('x1', faceData.cx - 5)\n .attr('y1', faceData.cy + 7)\n .attr('x2', faceData.cx + 5)\n .attr('y2', faceData.cy + 7)\n .attr('class', 'mouth')\n .attr('stroke-width', '1px')\n .attr('stroke', '#666');\n }\n\n if (faceData.score > 3) {\n smile(face);\n } else if (faceData.score < 3) {\n sad(face);\n } else {\n ambivalent(face);\n }\n\n return circleElement;\n};\n\nexport const drawCircle = function (element, circleData) {\n const circleElement = element.append('circle');\n circleElement.attr('cx', circleData.cx);\n circleElement.attr('cy', circleData.cy);\n circleElement.attr('class', 'actor-' + circleData.pos);\n circleElement.attr('fill', circleData.fill);\n circleElement.attr('stroke', circleData.stroke);\n circleElement.attr('r', circleData.r);\n\n if (circleElement.class !== undefined) {\n circleElement.attr('class', circleElement.class);\n }\n\n if (circleData.title !== undefined) {\n circleElement.append('title').text(circleData.title);\n }\n\n return circleElement;\n};\n\nexport const drawText = function (elem, textData) {\n return svgDrawCommon.drawText(elem, textData);\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.labelMargin;\n txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n drawText(elem, txtObject);\n};\n\nexport const drawSection = function (elem, section, conf) {\n const g = elem.append('g');\n\n const rect = svgDrawCommon.getNoteRect();\n rect.x = section.x;\n rect.y = section.y;\n rect.fill = section.fill;\n // section width covers all nested tasks\n rect.width =\n conf.width * section.taskCount + // width of the tasks\n conf.diagramMarginX * (section.taskCount - 1); // width of space between tasks\n rect.height = conf.height;\n rect.class = 'journey-section section-type-' + section.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n section.text,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'journey-section section-type-' + section.num },\n conf,\n section.colour\n );\n};\n\nlet taskCount = -1;\n/**\n * Draws an actor in the diagram with the attached line\n *\n * @param {any} elem The HTML element\n * @param {any} task The task to render\n * @param {any} conf The global configuration\n */\nexport const drawTask = function (elem, task, conf) {\n const center = task.x + conf.width / 2;\n const g = elem.append('g');\n taskCount++;\n const maxHeight = 300 + 5 * 30;\n g.append('line')\n .attr('id', 'task' + taskCount)\n .attr('x1', center)\n .attr('y1', task.y)\n .attr('x2', center)\n .attr('y2', maxHeight)\n .attr('class', 'task-line')\n .attr('stroke-width', '1px')\n .attr('stroke-dasharray', '4 2')\n .attr('stroke', '#666');\n\n drawFace(g, {\n cx: center,\n cy: 300 + (5 - task.score) * 30,\n score: task.score,\n });\n\n const rect = svgDrawCommon.getNoteRect();\n rect.x = task.x;\n rect.y = task.y;\n rect.fill = task.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'task task-type-' + task.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n let xPos = task.x + 14;\n task.people.forEach((person) => {\n const colour = task.actors[person].color;\n\n const circle = {\n cx: xPos,\n cy: task.y,\n r: 7,\n fill: colour,\n stroke: '#000',\n title: person,\n pos: task.actors[person].position,\n };\n\n drawCircle(g, circle);\n xPos += 10;\n });\n\n _drawTextCandidateFunc(conf)(\n task.task,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'task' },\n conf,\n task.colour\n );\n};\n\n/**\n * Draws a background rectangle\n *\n * @param {any} elem The html element\n * @param {any} bounds The bounds of the drawing\n */\nexport const drawBackgroundRect = function (elem, bounds) {\n svgDrawCommon.drawBackgroundRect(elem, bounds);\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} colour\n */\n function byText(content, g, x, y, width, height, textAttrs, colour) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('font-color', colour)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n * @param {any} colour\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n const { taskFontSize, taskFontFamily } = conf;\n\n const lines = content.split(//gi);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * taskFontSize - (taskFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .attr('fill', colour)\n .style('text-anchor', 'middle')\n .style('font-size', taskFontSize)\n .style('font-family', taskFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const body = g.append('switch');\n const f = body\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('position', 'fixed');\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .attr('class', 'label')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, body, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (key in fromTextAttrsDict) {\n // noinspection JSUnfilteredForInLoop\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst initGraphics = function (graphics) {\n graphics\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 5)\n .attr('refY', 2)\n .attr('markerWidth', 6)\n .attr('markerHeight', 4)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n};\n\nexport default {\n drawRect,\n drawCircle,\n drawSection,\n drawText,\n drawLabel,\n drawTask,\n drawBackgroundRect,\n initGraphics,\n};\n", "// @ts-nocheck TODO: fix file\nimport { select } from 'd3';\nimport svgDraw from './svgDraw.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n};\n\nconst actors = {};\n\n/** @param diagram - The diagram to draw to. */\nfunction drawActorLegend(diagram) {\n const conf = getConfig().journey;\n // Draw the actors\n let yPos = 60;\n Object.keys(actors).forEach((person) => {\n const colour = actors[person].color;\n\n const circleData = {\n cx: 20,\n cy: yPos,\n r: 7,\n fill: colour,\n stroke: '#000',\n pos: actors[person].position,\n };\n svgDraw.drawCircle(diagram, circleData);\n\n const labelData = {\n x: 40,\n y: yPos + 7,\n fill: '#666',\n text: person,\n textMargin: conf.boxTextMargin | 5,\n };\n svgDraw.drawText(diagram, labelData);\n\n yPos += 20;\n });\n}\n// TODO: Cleanup?\nconst conf = getConfig().journey;\nconst LEFT_MARGIN = conf.leftMargin;\nexport const draw = function (text, id, version, diagObj) {\n const conf = getConfig().journey;\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n // const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n bounds.init();\n const diagram = root.select('#' + id);\n\n svgDraw.initGraphics(diagram);\n\n const tasks = diagObj.db.getTasks();\n const title = diagObj.db.getDiagramTitle();\n\n const actorNames = diagObj.db.getActors();\n for (const member in actors) {\n delete actors[member];\n }\n let actorPos = 0;\n actorNames.forEach((actorName) => {\n actors[actorName] = {\n color: conf.actorColours[actorPos % conf.actorColours.length],\n position: actorPos,\n };\n actorPos++;\n });\n\n drawActorLegend(diagram);\n bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);\n drawTasks(diagram, tasks, 0);\n\n const box = bounds.getBounds();\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', LEFT_MARGIN)\n .attr('font-size', '4ex')\n .attr('font-weight', 'bold')\n .attr('y', 25);\n }\n\n const height = box.stopy - box.starty + 2 * conf.diagramMarginY;\n const width = LEFT_MARGIN + box.stopx + 2 * conf.diagramMarginX;\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n // Draw activity line\n diagram\n .append('line')\n .attr('x1', LEFT_MARGIN)\n .attr('y1', conf.height * 4) // One section head + one task + margins\n .attr('x2', width - LEFT_MARGIN - 4) // Subtract stroke width so arrow point is retained\n .attr('y2', conf.height * 4)\n .attr('stroke-width', 4)\n .attr('stroke', 'black')\n .attr('marker-end', 'url(#arrowhead)');\n\n const extraVertForTitle = title ? 70 : 0;\n diagram.attr('viewBox', `${box.startx} -25 ${width} ${height + extraVertForTitle}`);\n diagram.attr('preserveAspectRatio', 'xMinYMin meet');\n diagram.attr('height', height + extraVertForTitle + 25);\n};\n\nexport const bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n },\n verticalPos: 0,\n\n sequenceItems: [],\n init: function () {\n this.sequenceItems = [];\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n };\n this.verticalPos = 0;\n },\n updateVal: function (obj, key, val, fun) {\n if (obj[key] === undefined) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function (startx, starty, stopx, stopy) {\n const conf = getConfig().journey;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _self = this;\n let cnt = 0;\n /** @param type - Set to `activation` if activation */\n function updateFn(type?: 'activation') {\n return function updateItemBounds(item) {\n cnt++;\n // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n const n = _self.sequenceItems.length - cnt + 1;\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n },\n insert: function (startx, starty, stopx, stopy) {\n const _startx = Math.min(startx, stopx);\n const _stopx = Math.max(startx, stopx);\n const _starty = Math.min(starty, stopy);\n const _stopy = Math.max(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n bumpVerticalPos: function (bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = this.verticalPos;\n },\n getVerticalPos: function () {\n return this.verticalPos;\n },\n getBounds: function () {\n return this.data;\n },\n};\n\nconst fills = conf.sectionFills;\nconst textColours = conf.sectionColours;\n\nexport const drawTasks = function (diagram, tasks, verticalPos) {\n const conf = getConfig().journey;\n let lastSection = '';\n const sectionVHeight = conf.height * 2 + conf.diagramMarginY;\n const taskPos = verticalPos + sectionVHeight;\n\n let sectionNumber = 0;\n let fill = '#CCC';\n let colour = 'black';\n let num = 0;\n\n // Draw the tasks\n for (const [i, task] of tasks.entries()) {\n if (lastSection !== task.section) {\n fill = fills[sectionNumber % fills.length];\n num = sectionNumber % fills.length;\n colour = textColours[sectionNumber % textColours.length];\n\n // count how many consecutive tasks have the same section\n let taskInSectionCount = 0;\n const currentSection = task.section;\n for (let taskIndex = i; taskIndex < tasks.length; taskIndex++) {\n if (tasks[taskIndex].section == currentSection) {\n taskInSectionCount = taskInSectionCount + 1;\n } else {\n break;\n }\n }\n\n const section = {\n x: i * conf.taskMargin + i * conf.width + LEFT_MARGIN,\n y: 50,\n text: task.section,\n fill,\n num,\n colour,\n taskCount: taskInSectionCount,\n };\n\n svgDraw.drawSection(diagram, section, conf);\n lastSection = task.section;\n sectionNumber++;\n }\n\n // Collect the actors involved in the task\n const taskActors = task.people.reduce((acc, actorName) => {\n if (actors[actorName]) {\n acc[actorName] = actors[actorName];\n }\n\n return acc;\n }, {});\n\n // Add some rendering data to the object\n task.x = i * conf.taskMargin + i * conf.width + LEFT_MARGIN;\n task.y = taskPos;\n task.width = conf.diagramMarginX;\n task.height = conf.diagramMarginY;\n task.colour = colour;\n task.fill = fill;\n task.num = num;\n task.actors = taskActors;\n\n // Draw the box with the attached line\n svgDraw.drawTask(diagram, task, conf);\n bounds.insert(task.x, task.y, task.x + task.width + conf.taskMargin, 300 + 5 * 30); // stopY is the length of the descenders.\n }\n};\n\nexport default {\n setConf,\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/journey.jison';\nimport db from './journeyDb.js';\nimport styles from './styles.js';\nimport renderer from './journeyRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n renderer.setConf(cnf.journey);\n db.clear();\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,11,12,14,16,17,20,21],$V1=[1,9],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[1,16],$V7=[1,17];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"timeline\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NEWLINE\":10,\"title\":11,\"acc_title\":12,\"acc_title_value\":13,\"acc_descr\":14,\"acc_descr_value\":15,\"acc_descr_multiline_value\":16,\"section\":17,\"period_statement\":18,\"event_statement\":19,\"period\":20,\"event\":21,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"timeline\",6:\"EOF\",8:\"SPACE\",10:\"NEWLINE\",11:\"title\",12:\"acc_title\",13:\"acc_title_value\",14:\"acc_descr\",15:\"acc_descr_value\",16:\"acc_descr_multiline_value\",17:\"section\",20:\"period\",21:\"event\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\nyy.getCommonDb().setDiagramTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 9:\n this.$=$$[$0].trim();yy.getCommonDb().setAccTitle(this.$); \nbreak;\ncase 10: case 11:\n this.$=$$[$0].trim();yy.getCommonDb().setAccDescription(this.$); \nbreak;\ncase 12:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 15:\nyy.addTask($$[$0],0,'');this.$=$$[$0];\nbreak;\ncase 16:\nyy.addEvent($$[$0].substr(2));this.$=$$[$0];\nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:14,19:15,20:$V6,21:$V7},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:18,11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:14,19:15,20:$V6,21:$V7},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,8]),{13:[1,19]},{15:[1,20]},o($V0,[2,11]),o($V0,[2,12]),o($V0,[2,13]),o($V0,[2,14]),o($V0,[2,15]),o($V0,[2,16]),o($V0,[2,4]),o($V0,[2,9]),o($V0,[2,10])],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip comments */\nbreak;\ncase 1:/* skip comments */\nbreak;\ncase 2:return 10;\nbreak;\ncase 3:/* skip whitespace */\nbreak;\ncase 4:/* skip comments */\nbreak;\ncase 5:return 4;\nbreak;\ncase 6:return 11;\nbreak;\ncase 7: this.begin(\"acc_title\");return 12; \nbreak;\ncase 8: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 9: this.begin(\"acc_descr\");return 14; \nbreak;\ncase 10: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 11: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 12: this.popState(); \nbreak;\ncase 13:return \"acc_descr_multiline_value\";\nbreak;\ncase 14:return 17;\nbreak;\ncase 15:return 21;\nbreak;\ncase 16:return 20;\nbreak;\ncase 17:return 6;\nbreak;\ncase 18:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:timeline\\b)/i,/^(?:title\\s[^\\n]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:section\\s[^:\\n]+)/i,/^(?::\\s[^:\\n]+)/i,/^(?:[^#:\\n]+)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[12,13],\"inclusive\":false},\"acc_descr\":{\"rules\":[10],\"inclusive\":false},\"acc_title\":{\"rules\":[8],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import * as commonDb from '../common/commonDb.js';\nlet currentSection = '';\nlet currentTaskId = 0;\n\nconst sections = [];\nconst tasks = [];\nconst rawTasks = [];\n\nexport const getCommonDb = () => commonDb;\n\nexport const clear = function () {\n sections.length = 0;\n tasks.length = 0;\n currentSection = '';\n rawTasks.length = 0;\n commonDb.clear();\n};\n\nexport const addSection = function (txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function () {\n return sections;\n};\n\nexport const getTasks = function () {\n let allItemsProcessed = compileTasks();\n const maxDepth = 100;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks.push(...rawTasks);\n\n return tasks;\n};\n\nexport const addTask = function (period, length, event) {\n const rawTask = {\n id: currentTaskId++,\n section: currentSection,\n type: currentSection,\n task: period,\n score: length ? length : 0,\n //if event is defined, then add it the events array\n events: event ? [event] : [],\n };\n rawTasks.push(rawTask);\n};\n\nexport const addEvent = function (event) {\n // fetch current task with currentTaskId\n const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1);\n //add event to the events array\n currentTask.events.push(event);\n};\n\nexport const addTaskOrg = function (descr) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: [],\n };\n tasks.push(newTask);\n};\n\n/**\n * Compiles the raw tasks into a list of tasks with events\n * @returns {boolean} true if all items are processed\n * @private\n * @memberof timelineDb\n */\nconst compileTasks = function () {\n const compileTask = function (pos) {\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (const [i, rawTask] of rawTasks.entries()) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTask.processed;\n }\n return allProcessed;\n};\n\nexport default {\n clear,\n getCommonDb,\n addSection,\n getSections,\n getTasks,\n addTask,\n addTaskOrg,\n addEvent,\n};\n", "import { arc as d3arc, select } from 'd3';\nconst MAX_SECTIONS = 12;\n\nexport const drawRect = function (elem, rectData) {\n const rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (rectData.class !== undefined) {\n rectElem.attr('class', rectData.class);\n }\n\n return rectElem;\n};\n\nexport const drawFace = function (element, faceData) {\n const radius = 15;\n const circleElement = element\n .append('circle')\n .attr('cx', faceData.cx)\n .attr('cy', faceData.cy)\n .attr('class', 'face')\n .attr('r', radius)\n .attr('stroke-width', 2)\n .attr('overflow', 'visible');\n\n const face = element.append('g');\n\n //left eye\n face\n .append('circle')\n .attr('cx', faceData.cx - radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n //right eye\n face\n .append('circle')\n .attr('cx', faceData.cx + radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n /** @param {any} face */\n function smile(face) {\n const arc = d3arc()\n .startAngle(Math.PI / 2)\n .endAngle(3 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');\n }\n\n /** @param {any} face */\n function sad(face) {\n const arc = d3arc()\n .startAngle((3 * Math.PI) / 2)\n .endAngle(5 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');\n }\n\n /** @param {any} face */\n function ambivalent(face) {\n face\n .append('line')\n .attr('class', 'mouth')\n .attr('stroke', 2)\n .attr('x1', faceData.cx - 5)\n .attr('y1', faceData.cy + 7)\n .attr('x2', faceData.cx + 5)\n .attr('y2', faceData.cy + 7)\n .attr('class', 'mouth')\n .attr('stroke-width', '1px')\n .attr('stroke', '#666');\n }\n\n if (faceData.score > 3) {\n smile(face);\n } else if (faceData.score < 3) {\n sad(face);\n } else {\n ambivalent(face);\n }\n\n return circleElement;\n};\n\nexport const drawCircle = function (element, circleData) {\n const circleElement = element.append('circle');\n circleElement.attr('cx', circleData.cx);\n circleElement.attr('cy', circleData.cy);\n circleElement.attr('class', 'actor-' + circleData.pos);\n circleElement.attr('fill', circleData.fill);\n circleElement.attr('stroke', circleData.stroke);\n circleElement.attr('r', circleData.r);\n\n if (circleElement.class !== undefined) {\n circleElement.attr('class', circleElement.class);\n }\n\n if (circleData.title !== undefined) {\n circleElement.append('title').text(circleData.title);\n }\n\n return circleElement;\n};\n\nexport const drawText = function (elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(//gi, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.attr('class', 'legend');\n\n textElem.style('text-anchor', textData.anchor);\n\n if (textData.class !== undefined) {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.text(nText);\n\n return textElem;\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.labelMargin;\n txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n drawText(elem, txtObject);\n};\n\nexport const drawSection = function (elem, section, conf) {\n const g = elem.append('g');\n\n const rect = getNoteRect();\n rect.x = section.x;\n rect.y = section.y;\n rect.fill = section.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'journey-section section-type-' + section.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n section.text,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'journey-section section-type-' + section.num },\n conf,\n section.colour\n );\n};\n\nlet taskCount = -1;\n/**\n * Draws an actor in the diagram with the attached line\n *\n * @param {any} elem The HTML element\n * @param {any} task The task to render\n * @param {any} conf The global configuration\n */\nexport const drawTask = function (elem, task, conf) {\n const center = task.x + conf.width / 2;\n const g = elem.append('g');\n taskCount++;\n const maxHeight = 300 + 5 * 30;\n g.append('line')\n .attr('id', 'task' + taskCount)\n .attr('x1', center)\n .attr('y1', task.y)\n .attr('x2', center)\n .attr('y2', maxHeight)\n .attr('class', 'task-line')\n .attr('stroke-width', '1px')\n .attr('stroke-dasharray', '4 2')\n .attr('stroke', '#666');\n\n drawFace(g, {\n cx: center,\n cy: 300 + (5 - task.score) * 30,\n score: task.score,\n });\n\n const rect = getNoteRect();\n rect.x = task.x;\n rect.y = task.y;\n rect.fill = task.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'task task-type-' + task.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n task.task,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'task' },\n conf,\n task.colour\n );\n};\n\n/**\n * Draws a background rectangle\n *\n * @param {any} elem The html element\n * @param {any} bounds The bounds of the drawing\n */\nexport const drawBackgroundRect = function (elem, bounds) {\n const rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n class: 'rect',\n });\n rectElem.lower();\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n 'text-anchor': 'start',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n };\n};\n\nexport const getNoteRect = function () {\n return {\n x: 0,\n y: 0,\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0,\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} colour\n */\n function byText(content, g, x, y, width, height, textAttrs, colour) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('font-color', colour)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n * @param {any} colour\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n const { taskFontSize, taskFontFamily } = conf;\n\n const lines = content.split(//gi);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * taskFontSize - (taskFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .attr('fill', colour)\n .style('text-anchor', 'middle')\n .style('font-size', taskFontSize)\n .style('font-family', taskFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const body = g.append('switch');\n const f = body\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('position', 'fixed');\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .attr('class', 'label')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, body, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (key in fromTextAttrsDict) {\n // noinspection JSUnfilteredForInLoop\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst initGraphics = function (graphics) {\n graphics\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 5)\n .attr('refY', 2)\n .attr('markerWidth', 6)\n .attr('markerHeight', 4)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n};\n\n/**\n * @param {string} text The text to be wrapped\n * @param {number} width The max width of the text\n */\nfunction wrap(text, width) {\n text.each(function () {\n var text = select(this),\n words = text\n .text()\n .split(/(\\s+|
    )/)\n .reverse(),\n word,\n line = [],\n lineHeight = 1.1, // ems\n y = text.attr('y'),\n dy = parseFloat(text.attr('dy')),\n tspan = text\n .text(null)\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', dy + 'em');\n for (let j = 0; j < words.length; j++) {\n word = words[words.length - 1 - j];\n line.push(word);\n tspan.text(line.join(' ').trim());\n if (tspan.node().getComputedTextLength() > width || word === '
    ') {\n line.pop();\n tspan.text(line.join(' ').trim());\n if (word === '
    ') {\n line = [''];\n } else {\n line = [word];\n }\n\n tspan = text\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', lineHeight + 'em')\n .text(word);\n }\n }\n });\n}\n\nexport const drawNode = function (elem, node, fullSection, conf) {\n const section = (fullSection % MAX_SECTIONS) - 1;\n const nodeElem = elem.append('g');\n node.section = section;\n nodeElem.attr(\n 'class',\n (node.class ? node.class + ' ' : '') + 'timeline-node ' + ('section-' + section)\n );\n const bkgElem = nodeElem.append('g');\n\n // Create the wrapped text element\n const textElem = nodeElem.append('g');\n\n const txt = textElem\n .append('text')\n .text(node.descr)\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .call(wrap, node.width);\n const bbox = txt.node().getBBox();\n const fontSize = conf.fontSize?.replace ? conf.fontSize.replace('px', '') : conf.fontSize;\n node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;\n node.height = Math.max(node.height, node.maxHeight);\n node.width = node.width + 2 * node.padding;\n\n textElem.attr('transform', 'translate(' + node.width / 2 + ', ' + node.padding / 2 + ')');\n\n // Create the background element\n defaultBkg(bkgElem, node, section, conf);\n\n return node;\n};\n\nexport const getVirtualNodeHeight = function (elem, node, conf) {\n const textElem = elem.append('g');\n const txt = textElem\n .append('text')\n .text(node.descr)\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .call(wrap, node.width);\n const bbox = txt.node().getBBox();\n const fontSize = conf.fontSize?.replace ? conf.fontSize.replace('px', '') : conf.fontSize;\n textElem.remove();\n return bbox.height + fontSize * 1.1 * 0.5 + node.padding;\n};\n\nconst defaultBkg = function (elem, node, section) {\n const rd = 5;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + node.type)\n .attr(\n 'd',\n `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${\n node.width - 2 * rd\n } q5,0 5,5 v${node.height - rd} H0 Z`\n );\n\n elem\n .append('line')\n .attr('class', 'node-line-' + section)\n .attr('x1', 0)\n .attr('y1', node.height)\n .attr('x2', node.width)\n .attr('y2', node.height);\n};\n\nexport default {\n drawRect,\n drawCircle,\n drawSection,\n drawText,\n drawLabel,\n drawTask,\n drawBackgroundRect,\n getTextObj,\n getNoteRect,\n initGraphics,\n drawNode,\n getVirtualNodeHeight,\n};\n", "// @ts-nocheck - don't check until handle it\nimport type { Selection } from 'd3';\nimport { select } from 'd3';\nimport svgDraw from './svgDraw.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport type { Diagram } from '../../Diagram.js';\nimport type { MermaidConfig } from '../../config.type.js';\n\ninterface Block {\n number: number;\n descr: TDesc;\n section: TSection;\n width: number;\n padding: number;\n maxHeight: number;\n}\n\ninterface TimelineTask {\n id: number;\n section: string;\n type: string;\n task: string;\n score: number;\n events: string[];\n}\nexport const draw = function (text: string, id: string, version: string, diagObj: Diagram) {\n //1. Fetch the configuration\n const conf = getConfig();\n // @ts-expect-error - wrong config?\n const LEFT_MARGIN = conf.leftMargin ?? 50;\n\n log.debug('timeline', diagObj.db);\n\n const securityLevel = conf.securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n const svg = root.select('#' + id);\n\n svg.append('g');\n\n //4. Fetch the diagram data\n // @ts-expect-error - db not typed yet\n const tasks: TimelineTask[] = diagObj.db.getTasks();\n // @ts-expect-error - db not typed yet\n const title = diagObj.db.getCommonDb().getDiagramTitle();\n log.debug('task', tasks);\n\n //5. Initialize the diagram\n svgDraw.initGraphics(svg);\n\n // fetch Sections\n // @ts-expect-error - db not typed yet\n const sections: string[] = diagObj.db.getSections();\n log.debug('sections', sections);\n\n let maxSectionHeight = 0;\n let maxTaskHeight = 0;\n //let sectionBeginX = 0;\n let depthY = 0;\n let sectionBeginY = 0;\n let masterX = 50 + LEFT_MARGIN;\n //sectionBeginX = masterX;\n let masterY = 50;\n sectionBeginY = 50;\n //draw sections\n let sectionNumber = 0;\n let hasSections = true;\n\n //Calculate the max height of the sections\n sections.forEach(function (section: string) {\n const sectionNode: Block = {\n number: sectionNumber,\n descr: section,\n section: sectionNumber,\n width: 150,\n padding: 20,\n maxHeight: maxSectionHeight,\n };\n const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf);\n log.debug('sectionHeight before draw', sectionHeight);\n maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20);\n });\n\n //tasks length and maxEventCount\n let maxEventCount = 0;\n let maxEventLineLength = 0;\n log.debug('tasks.length', tasks.length);\n //calculate max task height\n // for loop till tasks.length\n\n for (const [i, task] of tasks.entries()) {\n const taskNode: Block = {\n number: i,\n descr: task,\n section: task.section,\n width: 150,\n padding: 20,\n maxHeight: maxTaskHeight,\n };\n const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf);\n log.debug('taskHeight before draw', taskHeight);\n maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20);\n\n //calculate maxEventCount\n maxEventCount = Math.max(maxEventCount, task.events.length);\n //calculate maxEventLineLength\n let maxEventLineLengthTemp = 0;\n for (const event of task.events) {\n const eventNode = {\n descr: event,\n section: task.section,\n number: task.section,\n width: 150,\n padding: 20,\n maxHeight: 50,\n };\n maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf);\n }\n maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp);\n }\n\n log.debug('maxSectionHeight before draw', maxSectionHeight);\n log.debug('maxTaskHeight before draw', maxTaskHeight);\n\n if (sections && sections.length > 0) {\n sections.forEach((section) => {\n //filter task where tasks.section == section\n const tasksForSection = tasks.filter((task) => task.section === section);\n\n const sectionNode: Block = {\n number: sectionNumber,\n descr: section,\n section: sectionNumber,\n width: 200 * Math.max(tasksForSection.length, 1) - 50,\n padding: 20,\n maxHeight: maxSectionHeight,\n };\n log.debug('sectionNode', sectionNode);\n const sectionNodeWrapper = svg.append('g');\n const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf);\n log.debug('sectionNode output', node);\n\n sectionNodeWrapper.attr('transform', `translate(${masterX}, ${sectionBeginY})`);\n\n masterY += maxSectionHeight + 50;\n\n //draw tasks for this section\n if (tasksForSection.length > 0) {\n drawTasks(\n svg,\n tasksForSection,\n sectionNumber,\n masterX,\n masterY,\n maxTaskHeight,\n conf,\n maxEventCount,\n maxEventLineLength,\n maxSectionHeight,\n false\n );\n }\n // todo replace with total width of section and its tasks\n masterX += 200 * Math.max(tasksForSection.length, 1);\n\n masterY = sectionBeginY;\n sectionNumber++;\n });\n } else {\n //draw tasks\n hasSections = false;\n drawTasks(\n svg,\n tasks,\n sectionNumber,\n masterX,\n masterY,\n maxTaskHeight,\n conf,\n maxEventCount,\n maxEventLineLength,\n maxSectionHeight,\n true\n );\n }\n\n // Get BBox of the diagram\n const box = svg.node().getBBox();\n log.debug('bounds', box);\n\n if (title) {\n svg\n .append('text')\n .text(title)\n .attr('x', box.width / 2 - LEFT_MARGIN)\n .attr('font-size', '4ex')\n .attr('font-weight', 'bold')\n .attr('y', 20);\n }\n //5. Draw the diagram\n depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100;\n\n const lineWrapper = svg.append('g').attr('class', 'lineWrapper');\n // Draw activity line\n lineWrapper\n .append('line')\n .attr('x1', LEFT_MARGIN)\n .attr('y1', depthY) // One section head + one task + margins\n .attr('x2', box.width + 3 * LEFT_MARGIN) // Subtract stroke width so arrow point is retained\n .attr('y2', depthY)\n .attr('stroke-width', 4)\n .attr('stroke', 'black')\n .attr('marker-end', 'url(#arrowhead)');\n\n // Setup the view box and size of the svg element\n setupGraphViewbox(\n undefined,\n svg,\n conf.timeline?.padding ?? 50,\n conf.timeline?.useMaxWidth ?? false\n );\n\n // addSVGAccessibilityFields(diagObj.db, diagram, id);\n};\n\nexport const drawTasks = function (\n diagram: Selection,\n tasks: TimelineTask[],\n sectionColor: number,\n masterX: number,\n masterY: number,\n maxTaskHeight: number,\n conf: MermaidConfig,\n maxEventCount: number,\n maxEventLineLength: number,\n maxSectionHeight: number,\n isWithoutSections: boolean\n) {\n // Draw the tasks\n for (const task of tasks) {\n // create node from task\n const taskNode = {\n descr: task.task,\n section: sectionColor,\n number: sectionColor,\n width: 150,\n padding: 20,\n maxHeight: maxTaskHeight,\n };\n\n log.debug('taskNode', taskNode);\n // create task wrapper\n\n const taskWrapper = diagram.append('g').attr('class', 'taskWrapper');\n const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf);\n const taskHeight = node.height;\n //log task height\n log.debug('taskHeight after draw', taskHeight);\n taskWrapper.attr('transform', `translate(${masterX}, ${masterY})`);\n\n // update max task height\n maxTaskHeight = Math.max(maxTaskHeight, taskHeight);\n\n // if task has events, draw them\n if (task.events) {\n // draw a line between the task and the events\n const lineWrapper = diagram.append('g').attr('class', 'lineWrapper');\n let lineLength = maxTaskHeight;\n //add margin to task\n masterY += 100;\n lineLength =\n lineLength + drawEvents(diagram, task.events, sectionColor, masterX, masterY, conf);\n masterY -= 100;\n\n lineWrapper\n .append('line')\n .attr('x1', masterX + 190 / 2)\n .attr('y1', masterY + maxTaskHeight) // One section head + one task + margins\n .attr('x2', masterX + 190 / 2) // Subtract stroke width so arrow point is retained\n .attr(\n 'y2',\n masterY +\n maxTaskHeight +\n (isWithoutSections ? maxTaskHeight : maxSectionHeight) +\n maxEventLineLength +\n 120\n )\n .attr('stroke-width', 2)\n .attr('stroke', 'black')\n .attr('marker-end', 'url(#arrowhead)')\n .attr('stroke-dasharray', '5,5');\n }\n\n masterX = masterX + 200;\n if (isWithoutSections && !conf.timeline?.disableMulticolor) {\n sectionColor++;\n }\n }\n\n // reset Y coordinate for next section\n masterY = masterY - 10;\n};\n\nexport const drawEvents = function (\n diagram: Selection,\n events: string[],\n sectionColor: number,\n masterX: number,\n masterY: number,\n conf: MermaidConfig\n) {\n let maxEventHeight = 0;\n const eventBeginY = masterY;\n masterY = masterY + 100;\n // Draw the events\n for (const event of events) {\n // create node from event\n const eventNode: Block = {\n descr: event,\n section: sectionColor,\n number: sectionColor,\n width: 150,\n padding: 20,\n maxHeight: 50,\n };\n\n //log task node\n log.debug('eventNode', eventNode);\n // create event wrapper\n const eventWrapper = diagram.append('g').attr('class', 'eventWrapper');\n const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf);\n const eventHeight = node.height;\n maxEventHeight = maxEventHeight + eventHeight;\n eventWrapper.attr('transform', `translate(${masterX}, ${masterY})`);\n masterY = masterY + 10 + eventHeight;\n }\n // set masterY back to eventBeginY\n masterY = eventBeginY;\n return maxEventHeight;\n};\n\nexport default {\n setConf: () => {\n // no-op\n },\n draw,\n};\n", "import { darken, lighten, isDark } from 'khroma';\n\nconst genSections = (options) => {\n let sections = '';\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n options['lineColor' + i] = options['lineColor' + i] || options['cScaleInv' + i];\n if (isDark(options['lineColor' + i])) {\n options['lineColor' + i] = lighten(options['lineColor' + i], 20);\n } else {\n options['lineColor' + i] = darken(options['lineColor' + i], 20);\n }\n }\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n const sw = '' + (17 - 3 * i);\n sections += `\n .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${\n i - 1\n } path {\n fill: ${options['cScale' + i]};\n }\n .section-${i - 1} text {\n fill: ${options['cScaleLabel' + i]};\n }\n .node-icon-${i - 1} {\n font-size: 40px;\n color: ${options['cScaleLabel' + i]};\n }\n .section-edge-${i - 1}{\n stroke: ${options['cScale' + i]};\n }\n .edge-depth-${i - 1}{\n stroke-width: ${sw};\n }\n .section-${i - 1} line {\n stroke: ${options['cScaleInv' + i]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${options['cScaleLabel' + i]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `;\n }\n return sections;\n};\n\nconst getStyles = (options) =>\n `\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`;\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport parser from './parser/timeline.jison';\nimport * as db from './timelineDb.js';\nimport renderer from './timelineRenderer.js';\nimport styles from './styles.js';\n\nexport const diagram = {\n db,\n renderer,\n parser,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,13],$V2=[1,12],$V3=[1,15],$V4=[1,16],$V5=[1,20],$V6=[1,19],$V7=[6,7,8],$V8=[1,26],$V9=[1,24],$Va=[1,25],$Vb=[6,7,11],$Vc=[1,6,13,15,16,19,22],$Vd=[1,33],$Ve=[1,34],$Vf=[1,6,7,11,13,15,16,19,22];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mindMap\":4,\"spaceLines\":5,\"SPACELINE\":6,\"NL\":7,\"MINDMAP\":8,\"document\":9,\"stop\":10,\"EOF\":11,\"statement\":12,\"SPACELIST\":13,\"node\":14,\"ICON\":15,\"CLASS\":16,\"nodeWithId\":17,\"nodeWithoutId\":18,\"NODE_DSTART\":19,\"NODE_DESCR\":20,\"NODE_DEND\":21,\"NODE_ID\":22,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",6:\"SPACELINE\",7:\"NL\",8:\"MINDMAP\",11:\"EOF\",13:\"SPACELIST\",15:\"ICON\",16:\"CLASS\",19:\"NODE_DSTART\",20:\"NODE_DESCR\",21:\"NODE_DEND\",22:\"NODE_ID\"},\nproductions_: [0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 6: case 7:\n return yy; \nbreak;\ncase 8:\nyy.getLogger().trace('Stop NL ');\nbreak;\ncase 9:\nyy.getLogger().trace('Stop EOF ');\nbreak;\ncase 11:\nyy.getLogger().trace('Stop NL2 ');\nbreak;\ncase 12:\nyy.getLogger().trace('Stop EOF2 ');\nbreak;\ncase 15:\n yy.getLogger().info('Node: ',$$[$0].id);yy.addNode($$[$0-1].length, $$[$0].id, $$[$0].descr, $$[$0].type); \nbreak;\ncase 16:\n yy.getLogger().trace('Icon: ',$$[$0]);yy.decorateNode({icon: $$[$0]}); \nbreak;\ncase 17: case 21:\n yy.decorateNode({class: $$[$0]}); \nbreak;\ncase 18:\n yy.getLogger().trace('SPACELIST');\nbreak;\ncase 19:\n yy.getLogger().trace('Node: ',$$[$0].id);yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); \nbreak;\ncase 20:\n yy.decorateNode({icon: $$[$0]}); \nbreak;\ncase 25:\n yy.getLogger().trace(\"node found ..\", $$[$0-2]); this.$ = { id: $$[$0-1], descr: $$[$0-1], type: yy.getType($$[$0-2], $$[$0]) }; \nbreak;\ncase 26:\n this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT }; \nbreak;\ncase 27:\n yy.getLogger().trace(\"node found ..\", $$[$0-3]); this.$ = { id: $$[$0-3], descr: $$[$0-1], type: yy.getType($$[$0-2], $$[$0]) }; \nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:[1,5],8:$V0},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:$V0},{6:$V1,7:[1,10],9:9,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($V7,[2,3]),{1:[2,2]},o($V7,[2,4]),o($V7,[2,5]),{1:[2,6],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V1,9:22,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V8,7:$V9,10:23,11:$Va},o($Vb,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:$V5,22:$V6}),o($Vb,[2,18]),o($Vb,[2,19]),o($Vb,[2,20]),o($Vb,[2,21]),o($Vb,[2,23]),o($Vb,[2,24]),o($Vb,[2,26],{19:[1,30]}),{20:[1,31]},{6:$V8,7:$V9,10:32,11:$Va},{1:[2,7],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($Vc,[2,14],{7:$Vd,11:$Ve}),o($Vf,[2,8]),o($Vf,[2,9]),o($Vf,[2,10]),o($Vb,[2,15]),o($Vb,[2,16]),o($Vb,[2,17]),{20:[1,35]},{21:[1,36]},o($Vc,[2,13],{7:$Vd,11:$Ve}),o($Vf,[2,11]),o($Vf,[2,12]),{21:[1,37]},o($Vb,[2,25]),o($Vb,[2,27])],\ndefaultActions: {2:[2,1],6:[2,2]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\n\t// Pre-lexer code can go here\n\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:yy.getLogger().trace('Found comment',yy_.yytext); return 6;\nbreak;\ncase 1:return 8;\nbreak;\ncase 2: this.begin('CLASS'); \nbreak;\ncase 3: this.popState();return 16; \nbreak;\ncase 4: this.popState();\nbreak;\ncase 5: yy.getLogger().trace('Begin icon');this.begin('ICON'); \nbreak;\ncase 6:yy.getLogger().trace('SPACELINE');return 6 /* skip all whitespace */ ;\nbreak;\ncase 7:return 7;\nbreak;\ncase 8: return 15; \nbreak;\ncase 9:yy.getLogger().trace('end icon');this.popState();\nbreak;\ncase 10: yy.getLogger().trace('Exploding node'); this.begin('NODE');return 19; \nbreak;\ncase 11: yy.getLogger().trace('Cloud'); this.begin('NODE');return 19; \nbreak;\ncase 12: yy.getLogger().trace('Explosion Bang'); this.begin('NODE');return 19; \nbreak;\ncase 13: yy.getLogger().trace('Cloud Bang'); this.begin('NODE');return 19; \nbreak;\ncase 14: this.begin('NODE');return 19; \nbreak;\ncase 15: this.begin('NODE');return 19; \nbreak;\ncase 16: this.begin('NODE');return 19; \nbreak;\ncase 17: this.begin('NODE');return 19; \nbreak;\ncase 18:return 13 /* skip all whitespace */ ;\nbreak;\ncase 19:return 22;\nbreak;\ncase 20:return 11;\nbreak;\ncase 21: this.begin(\"NSTR2\");\nbreak;\ncase 22: return \"NODE_DESCR\";\nbreak;\ncase 23: this.popState();\nbreak;\ncase 24: yy.getLogger().trace('Starting NSTR');this.begin(\"NSTR\");\nbreak;\ncase 25: yy.getLogger().trace('description:', yy_.yytext); return \"NODE_DESCR\";\nbreak;\ncase 26:this.popState();\nbreak;\ncase 27:this.popState();yy.getLogger().trace('node end ))');return \"NODE_DEND\";\nbreak;\ncase 28:this.popState();yy.getLogger().trace('node end )');return \"NODE_DEND\";\nbreak;\ncase 29:this.popState();yy.getLogger().trace('node end ...',yy_.yytext);return \"NODE_DEND\";\nbreak;\ncase 30:this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";\nbreak;\ncase 31:this.popState();yy.getLogger().trace('node end (-');return \"NODE_DEND\";\nbreak;\ncase 32:this.popState();yy.getLogger().trace('node end (-');return \"NODE_DEND\";\nbreak;\ncase 33:this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";\nbreak;\ncase 34:this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";\nbreak;\ncase 35: yy.getLogger().trace('Long description:', yy_.yytext); return 20;\nbreak;\ncase 36: yy.getLogger().trace('Long description:', yy_.yytext); return 20;\nbreak;\n}\n},\nrules: [/^(?:\\s*%%.*)/i,/^(?:mindmap\\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\\n)/i,/^(?:::icon\\()/i,/^(?:[\\s]+[\\n])/i,/^(?:[\\n]+)/i,/^(?:[^\\)]+)/i,/^(?:\\))/i,/^(?:-\\))/i,/^(?:\\(-)/i,/^(?:\\)\\))/i,/^(?:\\))/i,/^(?:\\(\\()/i,/^(?:\\{\\{)/i,/^(?:\\()/i,/^(?:\\[)/i,/^(?:[\\s]+)/i,/^(?:[^\\(\\[\\n\\)\\{\\}]+)/i,/^(?:$)/i,/^(?:[\"][`])/i,/^(?:[^`\"]+)/i,/^(?:[`][\"])/i,/^(?:[\"])/i,/^(?:[^\"]+)/i,/^(?:[\"])/i,/^(?:[\\)]\\))/i,/^(?:[\\)])/i,/^(?:[\\]])/i,/^(?:\\}\\})/i,/^(?:\\(-)/i,/^(?:-\\))/i,/^(?:\\(\\()/i,/^(?:\\()/i,/^(?:[^\\)\\]\\(\\}]+)/i,/^(?:.+(?!\\(\\())/i],\nconditions: {\"CLASS\":{\"rules\":[3,4],\"inclusive\":false},\"ICON\":{\"rules\":[8,9],\"inclusive\":false},\"NSTR2\":{\"rules\":[22,23],\"inclusive\":false},\"NSTR\":{\"rules\":[25,26],\"inclusive\":false},\"NODE\":{\"rules\":[21,24,27,28,29,30,31,32,33,34,35,36],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { D3Element } from '../../types.js';\nimport { sanitizeText } from '../../diagrams/common/common.js';\nimport { log } from '../../logger.js';\nimport type { MindmapNode } from './mindmapTypes.js';\nimport defaultConfig from '../../defaultConfig.js';\n\nlet nodes: MindmapNode[] = [];\nlet cnt = 0;\nlet elements: Record = {};\n\nconst clear = () => {\n nodes = [];\n cnt = 0;\n elements = {};\n};\n\nconst getParent = function (level: number) {\n for (let i = nodes.length - 1; i >= 0; i--) {\n if (nodes[i].level < level) {\n return nodes[i];\n }\n }\n // No parent found\n return null;\n};\n\nconst getMindmap = () => {\n return nodes.length > 0 ? nodes[0] : null;\n};\n\nconst addNode = (level: number, id: string, descr: string, type: number) => {\n log.info('addNode', level, id, descr, type);\n const conf = getConfig();\n let padding: number = conf.mindmap?.padding ?? defaultConfig.mindmap.padding;\n switch (type) {\n case nodeType.ROUNDED_RECT:\n case nodeType.RECT:\n case nodeType.HEXAGON:\n padding *= 2;\n }\n\n const node = {\n id: cnt++,\n nodeId: sanitizeText(id, conf),\n level,\n descr: sanitizeText(descr, conf),\n type,\n children: [],\n width: conf.mindmap?.maxNodeWidth ?? defaultConfig.mindmap.maxNodeWidth,\n padding,\n } satisfies MindmapNode;\n\n const parent = getParent(level);\n if (parent) {\n parent.children.push(node);\n // Keep all nodes in the list\n nodes.push(node);\n } else {\n if (nodes.length === 0) {\n // First node, the root\n nodes.push(node);\n } else {\n // Syntax error ... there can only bee one root\n throw new Error(\n 'There can be only one root. No parent could be found for (\"' + node.descr + '\")'\n );\n }\n }\n};\n\nconst nodeType = {\n DEFAULT: 0,\n NO_BORDER: 0,\n ROUNDED_RECT: 1,\n RECT: 2,\n CIRCLE: 3,\n CLOUD: 4,\n BANG: 5,\n HEXAGON: 6,\n};\n\nconst getType = (startStr: string, endStr: string): number => {\n log.debug('In get type', startStr, endStr);\n switch (startStr) {\n case '[':\n return nodeType.RECT;\n case '(':\n return endStr === ')' ? nodeType.ROUNDED_RECT : nodeType.CLOUD;\n case '((':\n return nodeType.CIRCLE;\n case ')':\n return nodeType.CLOUD;\n case '))':\n return nodeType.BANG;\n case '{{':\n return nodeType.HEXAGON;\n default:\n return nodeType.DEFAULT;\n }\n};\n\nconst setElementForId = (id: number, element: D3Element) => {\n elements[id] = element;\n};\n\nconst decorateNode = (decoration?: { class?: string; icon?: string }) => {\n if (!decoration) {\n return;\n }\n const config = getConfig();\n const node = nodes[nodes.length - 1];\n if (decoration.icon) {\n node.icon = sanitizeText(decoration.icon, config);\n }\n if (decoration.class) {\n node.class = sanitizeText(decoration.class, config);\n }\n};\n\nconst type2Str = (type: number) => {\n switch (type) {\n case nodeType.DEFAULT:\n return 'no-border';\n case nodeType.RECT:\n return 'rect';\n case nodeType.ROUNDED_RECT:\n return 'rounded-rect';\n case nodeType.CIRCLE:\n return 'circle';\n case nodeType.CLOUD:\n return 'cloud';\n case nodeType.BANG:\n return 'bang';\n case nodeType.HEXAGON:\n return 'hexgon'; // cspell: disable-line\n default:\n return 'no-border';\n }\n};\n\n// Expose logger to grammar\nconst getLogger = () => log;\nconst getElementById = (id: number) => elements[id];\n\nconst db = {\n clear,\n addNode,\n getMindmap,\n nodeType,\n getType,\n setElementForId,\n decorateNode,\n type2Str,\n getLogger,\n getElementById,\n} as const;\n\nexport default db;\n", "/**\n * Copyright (c) 2016-2024, The Cytoscape Consortium.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \u201CSoftware\u201D), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \u201CAS IS\u201D, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _defineProperty$1(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _s, _e;\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function () {};\n return {\n s: F,\n n: function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function (e) {\n throw e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function () {\n it = it.call(o);\n },\n n: function () {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function (e) {\n didErr = true;\n err = e;\n },\n f: function () {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nvar _window = typeof window === 'undefined' ? null : window; // eslint-disable-line no-undef\n\nvar navigator = _window ? _window.navigator : null;\n_window ? _window.document : null;\nvar typeofstr = _typeof('');\nvar typeofobj = _typeof({});\nvar typeoffn = _typeof(function () {});\nvar typeofhtmlele = typeof HTMLElement === \"undefined\" ? \"undefined\" : _typeof(HTMLElement);\nvar instanceStr = function instanceStr(obj) {\n return obj && obj.instanceString && fn$6(obj.instanceString) ? obj.instanceString() : null;\n};\n\nvar string = function string(obj) {\n return obj != null && _typeof(obj) == typeofstr;\n};\nvar fn$6 = function fn(obj) {\n return obj != null && _typeof(obj) === typeoffn;\n};\nvar array = function array(obj) {\n return !elementOrCollection(obj) && (Array.isArray ? Array.isArray(obj) : obj != null && obj instanceof Array);\n};\nvar plainObject = function plainObject(obj) {\n return obj != null && _typeof(obj) === typeofobj && !array(obj) && obj.constructor === Object;\n};\nvar object = function object(obj) {\n return obj != null && _typeof(obj) === typeofobj;\n};\nvar number$1 = function number(obj) {\n return obj != null && _typeof(obj) === _typeof(1) && !isNaN(obj);\n};\nvar integer = function integer(obj) {\n return number$1(obj) && Math.floor(obj) === obj;\n};\nvar htmlElement = function htmlElement(obj) {\n if ('undefined' === typeofhtmlele) {\n return undefined;\n } else {\n return null != obj && obj instanceof HTMLElement;\n }\n};\nvar elementOrCollection = function elementOrCollection(obj) {\n return element(obj) || collection(obj);\n};\nvar element = function element(obj) {\n return instanceStr(obj) === 'collection' && obj._private.single;\n};\nvar collection = function collection(obj) {\n return instanceStr(obj) === 'collection' && !obj._private.single;\n};\nvar core = function core(obj) {\n return instanceStr(obj) === 'core';\n};\nvar stylesheet = function stylesheet(obj) {\n return instanceStr(obj) === 'stylesheet';\n};\nvar event = function event(obj) {\n return instanceStr(obj) === 'event';\n};\nvar emptyString = function emptyString(obj) {\n if (obj === undefined || obj === null) {\n // null is empty\n return true;\n } else if (obj === '' || obj.match(/^\\s+$/)) {\n return true; // empty string is empty\n }\n\n return false; // otherwise, we don't know what we've got\n};\nvar domElement = function domElement(obj) {\n if (typeof HTMLElement === 'undefined') {\n return false; // we're not in a browser so it doesn't matter\n } else {\n return obj instanceof HTMLElement;\n }\n};\nvar boundingBox = function boundingBox(obj) {\n return plainObject(obj) && number$1(obj.x1) && number$1(obj.x2) && number$1(obj.y1) && number$1(obj.y2);\n};\nvar promise = function promise(obj) {\n return object(obj) && fn$6(obj.then);\n};\nvar ms = function ms() {\n return navigator && navigator.userAgent.match(/msie|trident|edge/i);\n}; // probably a better way to detect this...\n\nvar memoize$1 = function memoize(fn, keyFn) {\n if (!keyFn) {\n keyFn = function keyFn() {\n if (arguments.length === 1) {\n return arguments[0];\n } else if (arguments.length === 0) {\n return 'undefined';\n }\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n return args.join('$');\n };\n }\n var memoizedFn = function memoizedFn() {\n var self = this;\n var args = arguments;\n var ret;\n var k = keyFn.apply(self, args);\n var cache = memoizedFn.cache;\n if (!(ret = cache[k])) {\n ret = cache[k] = fn.apply(self, args);\n }\n return ret;\n };\n memoizedFn.cache = {};\n return memoizedFn;\n};\n\nvar camel2dash = memoize$1(function (str) {\n return str.replace(/([A-Z])/g, function (v) {\n return '-' + v.toLowerCase();\n });\n});\nvar dash2camel = memoize$1(function (str) {\n return str.replace(/(-\\w)/g, function (v) {\n return v[1].toUpperCase();\n });\n});\nvar prependCamel = memoize$1(function (prefix, str) {\n return prefix + str[0].toUpperCase() + str.substring(1);\n}, function (prefix, str) {\n return prefix + '$' + str;\n});\nvar capitalize = function capitalize(str) {\n if (emptyString(str)) {\n return str;\n }\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar number = '(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))';\nvar rgba = 'rgb[a]?\\\\((' + number + '[%]?)\\\\s*,\\\\s*(' + number + '[%]?)\\\\s*,\\\\s*(' + number + '[%]?)(?:\\\\s*,\\\\s*(' + number + '))?\\\\)';\nvar rgbaNoBackRefs = 'rgb[a]?\\\\((?:' + number + '[%]?)\\\\s*,\\\\s*(?:' + number + '[%]?)\\\\s*,\\\\s*(?:' + number + '[%]?)(?:\\\\s*,\\\\s*(?:' + number + '))?\\\\)';\nvar hsla = 'hsl[a]?\\\\((' + number + ')\\\\s*,\\\\s*(' + number + '[%])\\\\s*,\\\\s*(' + number + '[%])(?:\\\\s*,\\\\s*(' + number + '))?\\\\)';\nvar hslaNoBackRefs = 'hsl[a]?\\\\((?:' + number + ')\\\\s*,\\\\s*(?:' + number + '[%])\\\\s*,\\\\s*(?:' + number + '[%])(?:\\\\s*,\\\\s*(?:' + number + '))?\\\\)';\nvar hex3 = '\\\\#[0-9a-fA-F]{3}';\nvar hex6 = '\\\\#[0-9a-fA-F]{6}';\n\nvar ascending = function ascending(a, b) {\n if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n } else {\n return 0;\n }\n};\nvar descending = function descending(a, b) {\n return -1 * ascending(a, b);\n};\n\nvar extend = Object.assign != null ? Object.assign.bind(Object) : function (tgt) {\n var args = arguments;\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n if (obj == null) {\n continue;\n }\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; j++) {\n var k = keys[j];\n tgt[k] = obj[k];\n }\n }\n return tgt;\n};\n\n// get [r, g, b] from #abc or #aabbcc\nvar hex2tuple = function hex2tuple(hex) {\n if (!(hex.length === 4 || hex.length === 7) || hex[0] !== '#') {\n return;\n }\n var shortHex = hex.length === 4;\n var r, g, b;\n var base = 16;\n if (shortHex) {\n r = parseInt(hex[1] + hex[1], base);\n g = parseInt(hex[2] + hex[2], base);\n b = parseInt(hex[3] + hex[3], base);\n } else {\n r = parseInt(hex[1] + hex[2], base);\n g = parseInt(hex[3] + hex[4], base);\n b = parseInt(hex[5] + hex[6], base);\n }\n return [r, g, b];\n};\n\n// get [r, g, b, a] from hsl(0, 0, 0) or hsla(0, 0, 0, 0)\nvar hsl2tuple = function hsl2tuple(hsl) {\n var ret;\n var h, s, l, a, r, g, b;\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n var m = new RegExp('^' + hsla + '$').exec(hsl);\n if (m) {\n // get hue\n h = parseInt(m[1]);\n if (h < 0) {\n h = (360 - -1 * h % 360) % 360;\n } else if (h > 360) {\n h = h % 360;\n }\n h /= 360; // normalise on [0, 1]\n\n s = parseFloat(m[2]);\n if (s < 0 || s > 100) {\n return;\n } // saturation is [0, 100]\n s = s / 100; // normalise on [0, 1]\n\n l = parseFloat(m[3]);\n if (l < 0 || l > 100) {\n return;\n } // lightness is [0, 100]\n l = l / 100; // normalise on [0, 1]\n\n a = m[4];\n if (a !== undefined) {\n a = parseFloat(a);\n if (a < 0 || a > 1) {\n return;\n } // alpha is [0, 1]\n }\n\n // now, convert to rgb\n // code from http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript\n if (s === 0) {\n r = g = b = Math.round(l * 255); // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = Math.round(255 * hue2rgb(p, q, h + 1 / 3));\n g = Math.round(255 * hue2rgb(p, q, h));\n b = Math.round(255 * hue2rgb(p, q, h - 1 / 3));\n }\n ret = [r, g, b, a];\n }\n return ret;\n};\n\n// get [r, g, b, a] from rgb(0, 0, 0) or rgba(0, 0, 0, 0)\nvar rgb2tuple = function rgb2tuple(rgb) {\n var ret;\n var m = new RegExp('^' + rgba + '$').exec(rgb);\n if (m) {\n ret = [];\n var isPct = [];\n for (var i = 1; i <= 3; i++) {\n var channel = m[i];\n if (channel[channel.length - 1] === '%') {\n isPct[i] = true;\n }\n channel = parseFloat(channel);\n if (isPct[i]) {\n channel = channel / 100 * 255; // normalise to [0, 255]\n }\n\n if (channel < 0 || channel > 255) {\n return;\n } // invalid channel value\n\n ret.push(Math.floor(channel));\n }\n var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3];\n var allArePct = isPct[1] && isPct[2] && isPct[3];\n if (atLeastOneIsPct && !allArePct) {\n return;\n } // must all be percent values if one is\n\n var alpha = m[4];\n if (alpha !== undefined) {\n alpha = parseFloat(alpha);\n if (alpha < 0 || alpha > 1) {\n return;\n } // invalid alpha value\n\n ret.push(alpha);\n }\n }\n return ret;\n};\nvar colorname2tuple = function colorname2tuple(color) {\n return colors[color.toLowerCase()];\n};\nvar color2tuple = function color2tuple(color) {\n return (array(color) ? color : null) || colorname2tuple(color) || hex2tuple(color) || rgb2tuple(color) || hsl2tuple(color);\n};\nvar colors = {\n // special colour names\n transparent: [0, 0, 0, 0],\n // NB alpha === 0\n\n // regular colours\n aliceblue: [240, 248, 255],\n antiquewhite: [250, 235, 215],\n aqua: [0, 255, 255],\n aquamarine: [127, 255, 212],\n azure: [240, 255, 255],\n beige: [245, 245, 220],\n bisque: [255, 228, 196],\n black: [0, 0, 0],\n blanchedalmond: [255, 235, 205],\n blue: [0, 0, 255],\n blueviolet: [138, 43, 226],\n brown: [165, 42, 42],\n burlywood: [222, 184, 135],\n cadetblue: [95, 158, 160],\n chartreuse: [127, 255, 0],\n chocolate: [210, 105, 30],\n coral: [255, 127, 80],\n cornflowerblue: [100, 149, 237],\n cornsilk: [255, 248, 220],\n crimson: [220, 20, 60],\n cyan: [0, 255, 255],\n darkblue: [0, 0, 139],\n darkcyan: [0, 139, 139],\n darkgoldenrod: [184, 134, 11],\n darkgray: [169, 169, 169],\n darkgreen: [0, 100, 0],\n darkgrey: [169, 169, 169],\n darkkhaki: [189, 183, 107],\n darkmagenta: [139, 0, 139],\n darkolivegreen: [85, 107, 47],\n darkorange: [255, 140, 0],\n darkorchid: [153, 50, 204],\n darkred: [139, 0, 0],\n darksalmon: [233, 150, 122],\n darkseagreen: [143, 188, 143],\n darkslateblue: [72, 61, 139],\n darkslategray: [47, 79, 79],\n darkslategrey: [47, 79, 79],\n darkturquoise: [0, 206, 209],\n darkviolet: [148, 0, 211],\n deeppink: [255, 20, 147],\n deepskyblue: [0, 191, 255],\n dimgray: [105, 105, 105],\n dimgrey: [105, 105, 105],\n dodgerblue: [30, 144, 255],\n firebrick: [178, 34, 34],\n floralwhite: [255, 250, 240],\n forestgreen: [34, 139, 34],\n fuchsia: [255, 0, 255],\n gainsboro: [220, 220, 220],\n ghostwhite: [248, 248, 255],\n gold: [255, 215, 0],\n goldenrod: [218, 165, 32],\n gray: [128, 128, 128],\n grey: [128, 128, 128],\n green: [0, 128, 0],\n greenyellow: [173, 255, 47],\n honeydew: [240, 255, 240],\n hotpink: [255, 105, 180],\n indianred: [205, 92, 92],\n indigo: [75, 0, 130],\n ivory: [255, 255, 240],\n khaki: [240, 230, 140],\n lavender: [230, 230, 250],\n lavenderblush: [255, 240, 245],\n lawngreen: [124, 252, 0],\n lemonchiffon: [255, 250, 205],\n lightblue: [173, 216, 230],\n lightcoral: [240, 128, 128],\n lightcyan: [224, 255, 255],\n lightgoldenrodyellow: [250, 250, 210],\n lightgray: [211, 211, 211],\n lightgreen: [144, 238, 144],\n lightgrey: [211, 211, 211],\n lightpink: [255, 182, 193],\n lightsalmon: [255, 160, 122],\n lightseagreen: [32, 178, 170],\n lightskyblue: [135, 206, 250],\n lightslategray: [119, 136, 153],\n lightslategrey: [119, 136, 153],\n lightsteelblue: [176, 196, 222],\n lightyellow: [255, 255, 224],\n lime: [0, 255, 0],\n limegreen: [50, 205, 50],\n linen: [250, 240, 230],\n magenta: [255, 0, 255],\n maroon: [128, 0, 0],\n mediumaquamarine: [102, 205, 170],\n mediumblue: [0, 0, 205],\n mediumorchid: [186, 85, 211],\n mediumpurple: [147, 112, 219],\n mediumseagreen: [60, 179, 113],\n mediumslateblue: [123, 104, 238],\n mediumspringgreen: [0, 250, 154],\n mediumturquoise: [72, 209, 204],\n mediumvioletred: [199, 21, 133],\n midnightblue: [25, 25, 112],\n mintcream: [245, 255, 250],\n mistyrose: [255, 228, 225],\n moccasin: [255, 228, 181],\n navajowhite: [255, 222, 173],\n navy: [0, 0, 128],\n oldlace: [253, 245, 230],\n olive: [128, 128, 0],\n olivedrab: [107, 142, 35],\n orange: [255, 165, 0],\n orangered: [255, 69, 0],\n orchid: [218, 112, 214],\n palegoldenrod: [238, 232, 170],\n palegreen: [152, 251, 152],\n paleturquoise: [175, 238, 238],\n palevioletred: [219, 112, 147],\n papayawhip: [255, 239, 213],\n peachpuff: [255, 218, 185],\n peru: [205, 133, 63],\n pink: [255, 192, 203],\n plum: [221, 160, 221],\n powderblue: [176, 224, 230],\n purple: [128, 0, 128],\n red: [255, 0, 0],\n rosybrown: [188, 143, 143],\n royalblue: [65, 105, 225],\n saddlebrown: [139, 69, 19],\n salmon: [250, 128, 114],\n sandybrown: [244, 164, 96],\n seagreen: [46, 139, 87],\n seashell: [255, 245, 238],\n sienna: [160, 82, 45],\n silver: [192, 192, 192],\n skyblue: [135, 206, 235],\n slateblue: [106, 90, 205],\n slategray: [112, 128, 144],\n slategrey: [112, 128, 144],\n snow: [255, 250, 250],\n springgreen: [0, 255, 127],\n steelblue: [70, 130, 180],\n tan: [210, 180, 140],\n teal: [0, 128, 128],\n thistle: [216, 191, 216],\n tomato: [255, 99, 71],\n turquoise: [64, 224, 208],\n violet: [238, 130, 238],\n wheat: [245, 222, 179],\n white: [255, 255, 255],\n whitesmoke: [245, 245, 245],\n yellow: [255, 255, 0],\n yellowgreen: [154, 205, 50]\n};\n\n// sets the value in a map (map may not be built)\nvar setMap = function setMap(options) {\n var obj = options.map;\n var keys = options.keys;\n var l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (plainObject(key)) {\n throw Error('Tried to set map with object key');\n }\n if (i < keys.length - 1) {\n // extend the map if necessary\n if (obj[key] == null) {\n obj[key] = {};\n }\n obj = obj[key];\n } else {\n // set the value\n obj[key] = options.value;\n }\n }\n};\n\n// gets the value in a map even if it's not built in places\nvar getMap = function getMap(options) {\n var obj = options.map;\n var keys = options.keys;\n var l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (plainObject(key)) {\n throw Error('Tried to get map with object key');\n }\n obj = obj[key];\n if (obj == null) {\n return obj;\n }\n }\n return obj;\n};\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nvar isObject_1 = isObject;\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\nvar _freeGlobal = freeGlobal;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = _freeGlobal || freeSelf || Function('return this')();\n\nvar _root = root;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return _root.Date.now();\n};\n\nvar now_1 = now;\n\n/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nvar _trimmedEndIndex = trimmedEndIndex;\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nvar _baseTrim = baseTrim;\n\n/** Built-in value references. */\nvar Symbol$1 = _root.Symbol;\n\nvar _Symbol = Symbol$1;\n\n/** Used for built-in method references. */\nvar objectProto$5 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$4 = objectProto$5.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString$1 = objectProto$5.toString;\n\n/** Built-in value references. */\nvar symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty$4.call(value, symToStringTag$1),\n tag = value[symToStringTag$1];\n\n try {\n value[symToStringTag$1] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString$1.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag$1] = tag;\n } else {\n delete value[symToStringTag$1];\n }\n }\n return result;\n}\n\nvar _getRawTag = getRawTag;\n\n/** Used for built-in method references. */\nvar objectProto$4 = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto$4.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nvar _objectToString = objectToString;\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? _getRawTag(value)\n : _objectToString(value);\n}\n\nvar _baseGetTag = baseGetTag;\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nvar isObjectLike_1 = isObjectLike;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);\n}\n\nvar isSymbol_1 = isSymbol;\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol_1(value)) {\n return NAN;\n }\n if (isObject_1(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject_1(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = _baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nvar toNumber_1 = toNumber;\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT$1 = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT$1);\n }\n wait = toNumber_1(wait) || 0;\n if (isObject_1(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now_1();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now_1());\n }\n\n function debounced() {\n var time = now_1(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nvar debounce_1 = debounce;\n\nvar performance = _window ? _window.performance : null;\nvar pnow = performance && performance.now ? function () {\n return performance.now();\n} : function () {\n return Date.now();\n};\nvar raf = function () {\n if (_window) {\n if (_window.requestAnimationFrame) {\n return function (fn) {\n _window.requestAnimationFrame(fn);\n };\n } else if (_window.mozRequestAnimationFrame) {\n return function (fn) {\n _window.mozRequestAnimationFrame(fn);\n };\n } else if (_window.webkitRequestAnimationFrame) {\n return function (fn) {\n _window.webkitRequestAnimationFrame(fn);\n };\n } else if (_window.msRequestAnimationFrame) {\n return function (fn) {\n _window.msRequestAnimationFrame(fn);\n };\n }\n }\n return function (fn) {\n if (fn) {\n setTimeout(function () {\n fn(pnow());\n }, 1000 / 60);\n }\n };\n}();\nvar requestAnimationFrame = function requestAnimationFrame(fn) {\n return raf(fn);\n};\nvar performanceNow = pnow;\n\nvar DEFAULT_HASH_SEED = 9261;\nvar K = 65599; // 37 also works pretty well\nvar DEFAULT_HASH_SEED_ALT = 5381;\nvar hashIterableInts = function hashIterableInts(iterator) {\n var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED;\n // sdbm/string-hash\n var hash = seed;\n var entry;\n for (;;) {\n entry = iterator.next();\n if (entry.done) {\n break;\n }\n hash = hash * K + entry.value | 0;\n }\n return hash;\n};\nvar hashInt = function hashInt(num) {\n var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED;\n // sdbm/string-hash\n return seed * K + num | 0;\n};\nvar hashIntAlt = function hashIntAlt(num) {\n var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED_ALT;\n // djb2/string-hash\n return (seed << 5) + seed + num | 0;\n};\nvar combineHashes = function combineHashes(hash1, hash2) {\n return hash1 * 0x200000 + hash2;\n};\nvar combineHashesArray = function combineHashesArray(hashes) {\n return hashes[0] * 0x200000 + hashes[1];\n};\nvar hashArrays = function hashArrays(hashes1, hashes2) {\n return [hashInt(hashes1[0], hashes2[0]), hashIntAlt(hashes1[1], hashes2[1])];\n};\nvar hashIntsArray = function hashIntsArray(ints, seed) {\n var entry = {\n value: 0,\n done: false\n };\n var i = 0;\n var length = ints.length;\n var iterator = {\n next: function next() {\n if (i < length) {\n entry.value = ints[i++];\n } else {\n entry.done = true;\n }\n return entry;\n }\n };\n return hashIterableInts(iterator, seed);\n};\nvar hashString = function hashString(str, seed) {\n var entry = {\n value: 0,\n done: false\n };\n var i = 0;\n var length = str.length;\n var iterator = {\n next: function next() {\n if (i < length) {\n entry.value = str.charCodeAt(i++);\n } else {\n entry.done = true;\n }\n return entry;\n }\n };\n return hashIterableInts(iterator, seed);\n};\nvar hashStrings = function hashStrings() {\n return hashStringsArray(arguments);\n};\nvar hashStringsArray = function hashStringsArray(strs) {\n var hash;\n for (var i = 0; i < strs.length; i++) {\n var str = strs[i];\n if (i === 0) {\n hash = hashString(str);\n } else {\n hash = hashString(str, hash);\n }\n }\n return hash;\n};\n\n/*global console */\nvar warningsEnabled = true;\nvar warnSupported = console.warn != null; // eslint-disable-line no-console\nvar traceSupported = console.trace != null; // eslint-disable-line no-console\n\nvar MAX_INT$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;\nvar trueify = function trueify() {\n return true;\n};\nvar falsify = function falsify() {\n return false;\n};\nvar zeroify = function zeroify() {\n return 0;\n};\nvar noop$1 = function noop() {};\nvar error = function error(msg) {\n throw new Error(msg);\n};\nvar warnings = function warnings(enabled) {\n if (enabled !== undefined) {\n warningsEnabled = !!enabled;\n } else {\n return warningsEnabled;\n }\n};\nvar warn = function warn(msg) {\n /* eslint-disable no-console */\n if (!warnings()) {\n return;\n }\n if (warnSupported) {\n console.warn(msg);\n } else {\n console.log(msg);\n if (traceSupported) {\n console.trace();\n }\n }\n}; /* eslint-enable */\n\nvar clone = function clone(obj) {\n return extend({}, obj);\n};\n\n// gets a shallow copy of the argument\nvar copy = function copy(obj) {\n if (obj == null) {\n return obj;\n }\n if (array(obj)) {\n return obj.slice();\n } else if (plainObject(obj)) {\n return clone(obj);\n } else {\n return obj;\n }\n};\nvar copyArray$1 = function copyArray(arr) {\n return arr.slice();\n};\nvar uuid = function uuid(a, b /* placeholders */) {\n for (\n // loop :)\n b = a = '';\n // b - result , a - numeric letiable\n a++ < 36;\n //\n b += a * 51 & 52 // if \"a\" is not 9 or 14 or 19 or 24\n ?\n // return a random number or 4\n (a ^ 15 // if \"a\" is not 15\n ?\n // generate a random number from 0 to 15\n 8 ^ Math.random() * (a ^ 20 ? 16 : 4) // unless \"a\" is 20, in which case a random number from 8 to 11\n : 4 // otherwise 4\n ).toString(16) : '-' // in other cases (if \"a\" is 9,14,19,24) insert \"-\"\n ) {\n }\n return b;\n};\nvar _staticEmptyObject = {};\nvar staticEmptyObject = function staticEmptyObject() {\n return _staticEmptyObject;\n};\nvar defaults$g = function defaults(_defaults) {\n var keys = Object.keys(_defaults);\n return function (opts) {\n var filledOpts = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var optVal = opts == null ? undefined : opts[key];\n filledOpts[key] = optVal === undefined ? _defaults[key] : optVal;\n }\n return filledOpts;\n };\n};\nvar removeFromArray = function removeFromArray(arr, ele, oneCopy) {\n for (var i = arr.length - 1; i >= 0; i--) {\n if (arr[i] === ele) {\n arr.splice(i, 1);\n if (oneCopy) {\n break;\n }\n }\n }\n};\nvar clearArray = function clearArray(arr) {\n arr.splice(0, arr.length);\n};\nvar push = function push(arr, otherArr) {\n for (var i = 0; i < otherArr.length; i++) {\n var el = otherArr[i];\n arr.push(el);\n }\n};\nvar getPrefixedProperty = function getPrefixedProperty(obj, propName, prefix) {\n if (prefix) {\n propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth\n }\n\n return obj[propName];\n};\nvar setPrefixedProperty = function setPrefixedProperty(obj, propName, prefix, value) {\n if (prefix) {\n propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth\n }\n\n obj[propName] = value;\n};\n\n/* global Map */\nvar ObjectMap = /*#__PURE__*/function () {\n function ObjectMap() {\n _classCallCheck(this, ObjectMap);\n this._obj = {};\n }\n _createClass(ObjectMap, [{\n key: \"set\",\n value: function set(key, val) {\n this._obj[key] = val;\n return this;\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n this._obj[key] = undefined;\n return this;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this._obj = {};\n }\n }, {\n key: \"has\",\n value: function has(key) {\n return this._obj[key] !== undefined;\n }\n }, {\n key: \"get\",\n value: function get(key) {\n return this._obj[key];\n }\n }]);\n return ObjectMap;\n}();\nvar Map$2 = typeof Map !== 'undefined' ? Map : ObjectMap;\n\n/* global Set */\n\nvar undef = \"undefined\" ;\nvar ObjectSet = /*#__PURE__*/function () {\n function ObjectSet(arrayOrObjectSet) {\n _classCallCheck(this, ObjectSet);\n this._obj = Object.create(null);\n this.size = 0;\n if (arrayOrObjectSet != null) {\n var arr;\n if (arrayOrObjectSet.instanceString != null && arrayOrObjectSet.instanceString() === this.instanceString()) {\n arr = arrayOrObjectSet.toArray();\n } else {\n arr = arrayOrObjectSet;\n }\n for (var i = 0; i < arr.length; i++) {\n this.add(arr[i]);\n }\n }\n }\n _createClass(ObjectSet, [{\n key: \"instanceString\",\n value: function instanceString() {\n return 'set';\n }\n }, {\n key: \"add\",\n value: function add(val) {\n var o = this._obj;\n if (o[val] !== 1) {\n o[val] = 1;\n this.size++;\n }\n }\n }, {\n key: \"delete\",\n value: function _delete(val) {\n var o = this._obj;\n if (o[val] === 1) {\n o[val] = 0;\n this.size--;\n }\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this._obj = Object.create(null);\n }\n }, {\n key: \"has\",\n value: function has(val) {\n return this._obj[val] === 1;\n }\n }, {\n key: \"toArray\",\n value: function toArray() {\n var _this = this;\n return Object.keys(this._obj).filter(function (key) {\n return _this.has(key);\n });\n }\n }, {\n key: \"forEach\",\n value: function forEach(callback, thisArg) {\n return this.toArray().forEach(callback, thisArg);\n }\n }]);\n return ObjectSet;\n}();\nvar Set$1 = (typeof Set === \"undefined\" ? \"undefined\" : _typeof(Set)) !== undef ? Set : ObjectSet;\n\n// represents a node or an edge\nvar Element = function Element(cy, params) {\n var restore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n if (cy === undefined || params === undefined || !core(cy)) {\n error('An element must have a core reference and parameters set');\n return;\n }\n var group = params.group;\n\n // try to automatically infer the group if unspecified\n if (group == null) {\n if (params.data && params.data.source != null && params.data.target != null) {\n group = 'edges';\n } else {\n group = 'nodes';\n }\n }\n\n // validate group\n if (group !== 'nodes' && group !== 'edges') {\n error('An element must be of type `nodes` or `edges`; you specified `' + group + '`');\n return;\n }\n\n // make the element array-like, just like a collection\n this.length = 1;\n this[0] = this;\n\n // NOTE: when something is added here, add also to ele.json()\n var _p = this._private = {\n cy: cy,\n single: true,\n // indicates this is an element\n data: params.data || {},\n // data object\n position: params.position || {\n x: 0,\n y: 0\n },\n // (x, y) position pair\n autoWidth: undefined,\n // width and height of nodes calculated by the renderer when set to special 'auto' value\n autoHeight: undefined,\n autoPadding: undefined,\n compoundBoundsClean: false,\n // whether the compound dimensions need to be recalculated the next time dimensions are read\n listeners: [],\n // array of bound listeners\n group: group,\n // string; 'nodes' or 'edges'\n style: {},\n // properties as set by the style\n rstyle: {},\n // properties for style sent from the renderer to the core\n styleCxts: [],\n // applied style contexts from the styler\n styleKeys: {},\n // per-group keys of style property values\n removed: true,\n // whether it's inside the vis; true if removed (set true here since we call restore)\n selected: params.selected ? true : false,\n // whether it's selected\n selectable: params.selectable === undefined ? true : params.selectable ? true : false,\n // whether it's selectable\n locked: params.locked ? true : false,\n // whether the element is locked (cannot be moved)\n grabbed: false,\n // whether the element is grabbed by the mouse; renderer sets this privately\n grabbable: params.grabbable === undefined ? true : params.grabbable ? true : false,\n // whether the element can be grabbed\n pannable: params.pannable === undefined ? group === 'edges' ? true : false : params.pannable ? true : false,\n // whether the element has passthrough panning enabled\n active: false,\n // whether the element is active from user interaction\n classes: new Set$1(),\n // map ( className => true )\n animation: {\n // object for currently-running animations\n current: [],\n queue: []\n },\n rscratch: {},\n // object in which the renderer can store information\n scratch: params.scratch || {},\n // scratch objects\n edges: [],\n // array of connected edges\n children: [],\n // array of children\n parent: params.parent && params.parent.isNode() ? params.parent : null,\n // parent ref\n traversalCache: {},\n // cache of output of traversal functions\n backgrounding: false,\n // whether background images are loading\n bbCache: null,\n // cache of the current bounding box\n bbCacheShift: {\n x: 0,\n y: 0\n },\n // shift applied to cached bb to be applied on next get\n bodyBounds: null,\n // bounds cache of element body, w/o overlay\n overlayBounds: null,\n // bounds cache of element body, including overlay\n labelBounds: {\n // bounds cache of labels\n all: null,\n source: null,\n target: null,\n main: null\n },\n arrowBounds: {\n // bounds cache of edge arrows\n source: null,\n target: null,\n 'mid-source': null,\n 'mid-target': null\n }\n };\n if (_p.position.x == null) {\n _p.position.x = 0;\n }\n if (_p.position.y == null) {\n _p.position.y = 0;\n }\n\n // renderedPosition overrides if specified\n if (params.renderedPosition) {\n var rpos = params.renderedPosition;\n var pan = cy.pan();\n var zoom = cy.zoom();\n _p.position = {\n x: (rpos.x - pan.x) / zoom,\n y: (rpos.y - pan.y) / zoom\n };\n }\n var classes = [];\n if (array(params.classes)) {\n classes = params.classes;\n } else if (string(params.classes)) {\n classes = params.classes.split(/\\s+/);\n }\n for (var i = 0, l = classes.length; i < l; i++) {\n var cls = classes[i];\n if (!cls || cls === '') {\n continue;\n }\n _p.classes.add(cls);\n }\n this.createEmitter();\n var bypass = params.style || params.css;\n if (bypass) {\n warn('Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead.');\n this.style(bypass);\n }\n if (restore === undefined || restore) {\n this.restore();\n }\n};\n\nvar defineSearch = function defineSearch(params) {\n params = {\n bfs: params.bfs || !params.dfs,\n dfs: params.dfs || !params.bfs\n };\n\n // from pseudocode on wikipedia\n return function searchFn(roots, fn, directed) {\n var options;\n if (plainObject(roots) && !elementOrCollection(roots)) {\n options = roots;\n roots = options.roots || options.root;\n fn = options.visit;\n directed = options.directed;\n }\n directed = arguments.length === 2 && !fn$6(fn) ? fn : directed;\n fn = fn$6(fn) ? fn : function () {};\n var cy = this._private.cy;\n var v = roots = string(roots) ? this.filter(roots) : roots;\n var Q = [];\n var connectedNodes = [];\n var connectedBy = {};\n var id2depth = {};\n var V = {};\n var j = 0;\n var found;\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n\n // enqueue v\n for (var i = 0; i < v.length; i++) {\n var vi = v[i];\n var viId = vi.id();\n if (vi.isNode()) {\n Q.unshift(vi);\n if (params.bfs) {\n V[viId] = true;\n connectedNodes.push(vi);\n }\n id2depth[viId] = 0;\n }\n }\n var _loop = function _loop() {\n var v = params.bfs ? Q.shift() : Q.pop();\n var vId = v.id();\n if (params.dfs) {\n if (V[vId]) {\n return \"continue\";\n }\n V[vId] = true;\n connectedNodes.push(v);\n }\n var depth = id2depth[vId];\n var prevEdge = connectedBy[vId];\n var src = prevEdge != null ? prevEdge.source() : null;\n var tgt = prevEdge != null ? prevEdge.target() : null;\n var prevNode = prevEdge == null ? undefined : v.same(src) ? tgt[0] : src[0];\n var ret = void 0;\n ret = fn(v, prevEdge, prevNode, j++, depth);\n if (ret === true) {\n found = v;\n return \"break\";\n }\n if (ret === false) {\n return \"break\";\n }\n var vwEdges = v.connectedEdges().filter(function (e) {\n return (!directed || e.source().same(v)) && edges.has(e);\n });\n for (var _i2 = 0; _i2 < vwEdges.length; _i2++) {\n var e = vwEdges[_i2];\n var w = e.connectedNodes().filter(function (n) {\n return !n.same(v) && nodes.has(n);\n });\n var wId = w.id();\n if (w.length !== 0 && !V[wId]) {\n w = w[0];\n Q.push(w);\n if (params.bfs) {\n V[wId] = true;\n connectedNodes.push(w);\n }\n connectedBy[wId] = e;\n id2depth[wId] = id2depth[vId] + 1;\n }\n }\n };\n while (Q.length !== 0) {\n var _ret = _loop();\n if (_ret === \"continue\") continue;\n if (_ret === \"break\") break;\n }\n var connectedEles = cy.collection();\n for (var _i = 0; _i < connectedNodes.length; _i++) {\n var node = connectedNodes[_i];\n var edge = connectedBy[node.id()];\n if (edge != null) {\n connectedEles.push(edge);\n }\n connectedEles.push(node);\n }\n return {\n path: cy.collection(connectedEles),\n found: cy.collection(found)\n };\n };\n};\n\n// search, spanning trees, etc\nvar elesfn$v = {\n breadthFirstSearch: defineSearch({\n bfs: true\n }),\n depthFirstSearch: defineSearch({\n dfs: true\n })\n};\n\n// nice, short mathematical alias\nelesfn$v.bfs = elesfn$v.breadthFirstSearch;\nelesfn$v.dfs = elesfn$v.depthFirstSearch;\n\nvar heap$1 = createCommonjsModule(function (module, exports) {\n// Generated by CoffeeScript 1.8.0\n(function() {\n var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min, nlargest, nsmallest, updateItem, _siftdown, _siftup;\n\n floor = Math.floor, min = Math.min;\n\n\n /*\n Default comparison function to be used\n */\n\n defaultCmp = function(x, y) {\n if (x < y) {\n return -1;\n }\n if (x > y) {\n return 1;\n }\n return 0;\n };\n\n\n /*\n Insert item x in list a, and keep it sorted assuming a is sorted.\n \n If x is already in a, insert it to the right of the rightmost x.\n \n Optional args lo (default 0) and hi (default a.length) bound the slice\n of a to be searched.\n */\n\n insort = function(a, x, lo, hi, cmp) {\n var mid;\n if (lo == null) {\n lo = 0;\n }\n if (cmp == null) {\n cmp = defaultCmp;\n }\n if (lo < 0) {\n throw new Error('lo must be non-negative');\n }\n if (hi == null) {\n hi = a.length;\n }\n while (lo < hi) {\n mid = floor((lo + hi) / 2);\n if (cmp(x, a[mid]) < 0) {\n hi = mid;\n } else {\n lo = mid + 1;\n }\n }\n return ([].splice.apply(a, [lo, lo - lo].concat(x)), x);\n };\n\n\n /*\n Push item onto heap, maintaining the heap invariant.\n */\n\n heappush = function(array, item, cmp) {\n if (cmp == null) {\n cmp = defaultCmp;\n }\n array.push(item);\n return _siftdown(array, 0, array.length - 1, cmp);\n };\n\n\n /*\n Pop the smallest item off the heap, maintaining the heap invariant.\n */\n\n heappop = function(array, cmp) {\n var lastelt, returnitem;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n lastelt = array.pop();\n if (array.length) {\n returnitem = array[0];\n array[0] = lastelt;\n _siftup(array, 0, cmp);\n } else {\n returnitem = lastelt;\n }\n return returnitem;\n };\n\n\n /*\n Pop and return the current smallest value, and add the new item.\n \n This is more efficient than heappop() followed by heappush(), and can be\n more appropriate when using a fixed size heap. Note that the value\n returned may be larger than item! That constrains reasonable use of\n this routine unless written as part of a conditional replacement:\n if item > array[0]\n item = heapreplace(array, item)\n */\n\n heapreplace = function(array, item, cmp) {\n var returnitem;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n returnitem = array[0];\n array[0] = item;\n _siftup(array, 0, cmp);\n return returnitem;\n };\n\n\n /*\n Fast version of a heappush followed by a heappop.\n */\n\n heappushpop = function(array, item, cmp) {\n var _ref;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n if (array.length && cmp(array[0], item) < 0) {\n _ref = [array[0], item], item = _ref[0], array[0] = _ref[1];\n _siftup(array, 0, cmp);\n }\n return item;\n };\n\n\n /*\n Transform list into a heap, in-place, in O(array.length) time.\n */\n\n heapify = function(array, cmp) {\n var i, _i, _len, _ref1, _results, _results1;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n _ref1 = (function() {\n _results1 = [];\n for (var _j = 0, _ref = floor(array.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--){ _results1.push(_j); }\n return _results1;\n }).apply(this).reverse();\n _results = [];\n for (_i = 0, _len = _ref1.length; _i < _len; _i++) {\n i = _ref1[_i];\n _results.push(_siftup(array, i, cmp));\n }\n return _results;\n };\n\n\n /*\n Update the position of the given item in the heap.\n This function should be called every time the item is being modified.\n */\n\n updateItem = function(array, item, cmp) {\n var pos;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n pos = array.indexOf(item);\n if (pos === -1) {\n return;\n }\n _siftdown(array, 0, pos, cmp);\n return _siftup(array, pos, cmp);\n };\n\n\n /*\n Find the n largest elements in a dataset.\n */\n\n nlargest = function(array, n, cmp) {\n var elem, result, _i, _len, _ref;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n result = array.slice(0, n);\n if (!result.length) {\n return result;\n }\n heapify(result, cmp);\n _ref = array.slice(n);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n elem = _ref[_i];\n heappushpop(result, elem, cmp);\n }\n return result.sort(cmp).reverse();\n };\n\n\n /*\n Find the n smallest elements in a dataset.\n */\n\n nsmallest = function(array, n, cmp) {\n var elem, los, result, _i, _j, _len, _ref, _ref1, _results;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n if (n * 10 <= array.length) {\n result = array.slice(0, n).sort(cmp);\n if (!result.length) {\n return result;\n }\n los = result[result.length - 1];\n _ref = array.slice(n);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n elem = _ref[_i];\n if (cmp(elem, los) < 0) {\n insort(result, elem, 0, null, cmp);\n result.pop();\n los = result[result.length - 1];\n }\n }\n return result;\n }\n heapify(array, cmp);\n _results = [];\n for (_j = 0, _ref1 = min(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; 0 <= _ref1 ? ++_j : --_j) {\n _results.push(heappop(array, cmp));\n }\n return _results;\n };\n\n _siftdown = function(array, startpos, pos, cmp) {\n var newitem, parent, parentpos;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n newitem = array[pos];\n while (pos > startpos) {\n parentpos = (pos - 1) >> 1;\n parent = array[parentpos];\n if (cmp(newitem, parent) < 0) {\n array[pos] = parent;\n pos = parentpos;\n continue;\n }\n break;\n }\n return array[pos] = newitem;\n };\n\n _siftup = function(array, pos, cmp) {\n var childpos, endpos, newitem, rightpos, startpos;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n endpos = array.length;\n startpos = pos;\n newitem = array[pos];\n childpos = 2 * pos + 1;\n while (childpos < endpos) {\n rightpos = childpos + 1;\n if (rightpos < endpos && !(cmp(array[childpos], array[rightpos]) < 0)) {\n childpos = rightpos;\n }\n array[pos] = array[childpos];\n pos = childpos;\n childpos = 2 * pos + 1;\n }\n array[pos] = newitem;\n return _siftdown(array, startpos, pos, cmp);\n };\n\n Heap = (function() {\n Heap.push = heappush;\n\n Heap.pop = heappop;\n\n Heap.replace = heapreplace;\n\n Heap.pushpop = heappushpop;\n\n Heap.heapify = heapify;\n\n Heap.updateItem = updateItem;\n\n Heap.nlargest = nlargest;\n\n Heap.nsmallest = nsmallest;\n\n function Heap(cmp) {\n this.cmp = cmp != null ? cmp : defaultCmp;\n this.nodes = [];\n }\n\n Heap.prototype.push = function(x) {\n return heappush(this.nodes, x, this.cmp);\n };\n\n Heap.prototype.pop = function() {\n return heappop(this.nodes, this.cmp);\n };\n\n Heap.prototype.peek = function() {\n return this.nodes[0];\n };\n\n Heap.prototype.contains = function(x) {\n return this.nodes.indexOf(x) !== -1;\n };\n\n Heap.prototype.replace = function(x) {\n return heapreplace(this.nodes, x, this.cmp);\n };\n\n Heap.prototype.pushpop = function(x) {\n return heappushpop(this.nodes, x, this.cmp);\n };\n\n Heap.prototype.heapify = function() {\n return heapify(this.nodes, this.cmp);\n };\n\n Heap.prototype.updateItem = function(x) {\n return updateItem(this.nodes, x, this.cmp);\n };\n\n Heap.prototype.clear = function() {\n return this.nodes = [];\n };\n\n Heap.prototype.empty = function() {\n return this.nodes.length === 0;\n };\n\n Heap.prototype.size = function() {\n return this.nodes.length;\n };\n\n Heap.prototype.clone = function() {\n var heap;\n heap = new Heap();\n heap.nodes = this.nodes.slice(0);\n return heap;\n };\n\n Heap.prototype.toArray = function() {\n return this.nodes.slice(0);\n };\n\n Heap.prototype.insert = Heap.prototype.push;\n\n Heap.prototype.top = Heap.prototype.peek;\n\n Heap.prototype.front = Heap.prototype.peek;\n\n Heap.prototype.has = Heap.prototype.contains;\n\n Heap.prototype.copy = Heap.prototype.clone;\n\n return Heap;\n\n })();\n\n (function(root, factory) {\n {\n return module.exports = factory();\n }\n })(this, function() {\n return Heap;\n });\n\n}).call(commonjsGlobal);\n});\n\nvar heap = heap$1;\n\nvar dijkstraDefaults = defaults$g({\n root: null,\n weight: function weight(edge) {\n return 1;\n },\n directed: false\n});\nvar elesfn$u = {\n dijkstra: function dijkstra(options) {\n if (!plainObject(options)) {\n var args = arguments;\n options = {\n root: args[0],\n weight: args[1],\n directed: args[2]\n };\n }\n var _dijkstraDefaults = dijkstraDefaults(options),\n root = _dijkstraDefaults.root,\n weight = _dijkstraDefaults.weight,\n directed = _dijkstraDefaults.directed;\n var eles = this;\n var weightFn = weight;\n var source = string(root) ? this.filter(root)[0] : root[0];\n var dist = {};\n var prev = {};\n var knownDist = {};\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n edges.unmergeBy(function (ele) {\n return ele.isLoop();\n });\n var getDist = function getDist(node) {\n return dist[node.id()];\n };\n var setDist = function setDist(node, d) {\n dist[node.id()] = d;\n Q.updateItem(node);\n };\n var Q = new heap(function (a, b) {\n return getDist(a) - getDist(b);\n });\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n dist[node.id()] = node.same(source) ? 0 : Infinity;\n Q.push(node);\n }\n var distBetween = function distBetween(u, v) {\n var uvs = (directed ? u.edgesTo(v) : u.edgesWith(v)).intersect(edges);\n var smallestDistance = Infinity;\n var smallestEdge;\n for (var _i = 0; _i < uvs.length; _i++) {\n var edge = uvs[_i];\n var _weight = weightFn(edge);\n if (_weight < smallestDistance || !smallestEdge) {\n smallestDistance = _weight;\n smallestEdge = edge;\n }\n }\n return {\n edge: smallestEdge,\n dist: smallestDistance\n };\n };\n while (Q.size() > 0) {\n var u = Q.pop();\n var smalletsDist = getDist(u);\n var uid = u.id();\n knownDist[uid] = smalletsDist;\n if (smalletsDist === Infinity) {\n continue;\n }\n var neighbors = u.neighborhood().intersect(nodes);\n for (var _i2 = 0; _i2 < neighbors.length; _i2++) {\n var v = neighbors[_i2];\n var vid = v.id();\n var vDist = distBetween(u, v);\n var alt = smalletsDist + vDist.dist;\n if (alt < getDist(v)) {\n setDist(v, alt);\n prev[vid] = {\n node: u,\n edge: vDist.edge\n };\n }\n } // for\n } // while\n\n return {\n distanceTo: function distanceTo(node) {\n var target = string(node) ? nodes.filter(node)[0] : node[0];\n return knownDist[target.id()];\n },\n pathTo: function pathTo(node) {\n var target = string(node) ? nodes.filter(node)[0] : node[0];\n var S = [];\n var u = target;\n var uid = u.id();\n if (target.length > 0) {\n S.unshift(target);\n while (prev[uid]) {\n var p = prev[uid];\n S.unshift(p.edge);\n S.unshift(p.node);\n u = p.node;\n uid = u.id();\n }\n }\n return eles.spawn(S);\n }\n };\n }\n};\n\nvar elesfn$t = {\n // kruskal's algorithm (finds min spanning tree, assuming undirected graph)\n // implemented from pseudocode from wikipedia\n kruskal: function kruskal(weightFn) {\n weightFn = weightFn || function (edge) {\n return 1;\n };\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n var numNodes = nodes.length;\n var forest = new Array(numNodes);\n var A = nodes; // assumes byGroup() creates new collections that can be safely mutated\n\n var findSetIndex = function findSetIndex(ele) {\n for (var i = 0; i < forest.length; i++) {\n var eles = forest[i];\n if (eles.has(ele)) {\n return i;\n }\n }\n };\n\n // start with one forest per node\n for (var i = 0; i < numNodes; i++) {\n forest[i] = this.spawn(nodes[i]);\n }\n var S = edges.sort(function (a, b) {\n return weightFn(a) - weightFn(b);\n });\n for (var _i = 0; _i < S.length; _i++) {\n var edge = S[_i];\n var u = edge.source()[0];\n var v = edge.target()[0];\n var setUIndex = findSetIndex(u);\n var setVIndex = findSetIndex(v);\n var setU = forest[setUIndex];\n var setV = forest[setVIndex];\n if (setUIndex !== setVIndex) {\n A.merge(edge);\n\n // combine forests for u and v\n setU.merge(setV);\n forest.splice(setVIndex, 1);\n }\n }\n return A;\n }\n};\n\nvar aStarDefaults = defaults$g({\n root: null,\n goal: null,\n weight: function weight(edge) {\n return 1;\n },\n heuristic: function heuristic(edge) {\n return 0;\n },\n directed: false\n});\nvar elesfn$s = {\n // Implemented from pseudocode from wikipedia\n aStar: function aStar(options) {\n var cy = this.cy();\n var _aStarDefaults = aStarDefaults(options),\n root = _aStarDefaults.root,\n goal = _aStarDefaults.goal,\n heuristic = _aStarDefaults.heuristic,\n directed = _aStarDefaults.directed,\n weight = _aStarDefaults.weight;\n root = cy.collection(root)[0];\n goal = cy.collection(goal)[0];\n var sid = root.id();\n var tid = goal.id();\n var gScore = {};\n var fScore = {};\n var closedSetIds = {};\n var openSet = new heap(function (a, b) {\n return fScore[a.id()] - fScore[b.id()];\n });\n var openSetIds = new Set$1();\n var cameFrom = {};\n var cameFromEdge = {};\n var addToOpenSet = function addToOpenSet(ele, id) {\n openSet.push(ele);\n openSetIds.add(id);\n };\n var cMin, cMinId;\n var popFromOpenSet = function popFromOpenSet() {\n cMin = openSet.pop();\n cMinId = cMin.id();\n openSetIds[\"delete\"](cMinId);\n };\n var isInOpenSet = function isInOpenSet(id) {\n return openSetIds.has(id);\n };\n addToOpenSet(root, sid);\n gScore[sid] = 0;\n fScore[sid] = heuristic(root);\n\n // Counter\n var steps = 0;\n\n // Main loop\n while (openSet.size() > 0) {\n popFromOpenSet();\n steps++;\n\n // If we've found our goal, then we are done\n if (cMinId === tid) {\n var path = [];\n var pathNode = goal;\n var pathNodeId = tid;\n var pathEdge = cameFromEdge[pathNodeId];\n for (;;) {\n path.unshift(pathNode);\n if (pathEdge != null) {\n path.unshift(pathEdge);\n }\n pathNode = cameFrom[pathNodeId];\n if (pathNode == null) {\n break;\n }\n pathNodeId = pathNode.id();\n pathEdge = cameFromEdge[pathNodeId];\n }\n return {\n found: true,\n distance: gScore[cMinId],\n path: this.spawn(path),\n steps: steps\n };\n }\n\n // Add cMin to processed nodes\n closedSetIds[cMinId] = true;\n\n // Update scores for neighbors of cMin\n // Take into account if graph is directed or not\n var vwEdges = cMin._private.edges;\n for (var i = 0; i < vwEdges.length; i++) {\n var e = vwEdges[i];\n\n // edge must be in set of calling eles\n if (!this.hasElementWithId(e.id())) {\n continue;\n }\n\n // cMin must be the source of edge if directed\n if (directed && e.data('source') !== cMinId) {\n continue;\n }\n var wSrc = e.source();\n var wTgt = e.target();\n var w = wSrc.id() !== cMinId ? wSrc : wTgt;\n var wid = w.id();\n\n // node must be in set of calling eles\n if (!this.hasElementWithId(wid)) {\n continue;\n }\n\n // if node is in closedSet, ignore it\n if (closedSetIds[wid]) {\n continue;\n }\n\n // New tentative score for node w\n var tempScore = gScore[cMinId] + weight(e);\n\n // Update gScore for node w if:\n // w not present in openSet\n // OR\n // tentative gScore is less than previous value\n\n // w not in openSet\n if (!isInOpenSet(wid)) {\n gScore[wid] = tempScore;\n fScore[wid] = tempScore + heuristic(w);\n addToOpenSet(w, wid);\n cameFrom[wid] = cMin;\n cameFromEdge[wid] = e;\n continue;\n }\n\n // w already in openSet, but with greater gScore\n if (tempScore < gScore[wid]) {\n gScore[wid] = tempScore;\n fScore[wid] = tempScore + heuristic(w);\n cameFrom[wid] = cMin;\n cameFromEdge[wid] = e;\n }\n } // End of neighbors update\n } // End of main loop\n\n // If we've reached here, then we've not reached our goal\n return {\n found: false,\n distance: undefined,\n path: undefined,\n steps: steps\n };\n }\n}; // elesfn\n\nvar floydWarshallDefaults = defaults$g({\n weight: function weight(edge) {\n return 1;\n },\n directed: false\n});\nvar elesfn$r = {\n // Implemented from pseudocode from wikipedia\n floydWarshall: function floydWarshall(options) {\n var cy = this.cy();\n var _floydWarshallDefault = floydWarshallDefaults(options),\n weight = _floydWarshallDefault.weight,\n directed = _floydWarshallDefault.directed;\n var weightFn = weight;\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n var N = nodes.length;\n var Nsq = N * N;\n var indexOf = function indexOf(node) {\n return nodes.indexOf(node);\n };\n var atIndex = function atIndex(i) {\n return nodes[i];\n };\n\n // Initialize distance matrix\n var dist = new Array(Nsq);\n for (var n = 0; n < Nsq; n++) {\n var j = n % N;\n var i = (n - j) / N;\n if (i === j) {\n dist[n] = 0;\n } else {\n dist[n] = Infinity;\n }\n }\n\n // Initialize matrix used for path reconstruction\n // Initialize distance matrix\n var next = new Array(Nsq);\n var edgeNext = new Array(Nsq);\n\n // Process edges\n for (var _i = 0; _i < edges.length; _i++) {\n var edge = edges[_i];\n var src = edge.source()[0];\n var tgt = edge.target()[0];\n if (src === tgt) {\n continue;\n } // exclude loops\n\n var s = indexOf(src);\n var t = indexOf(tgt);\n var st = s * N + t; // source to target index\n var _weight = weightFn(edge);\n\n // Check if already process another edge between same 2 nodes\n if (dist[st] > _weight) {\n dist[st] = _weight;\n next[st] = t;\n edgeNext[st] = edge;\n }\n\n // If undirected graph, process 'reversed' edge\n if (!directed) {\n var ts = t * N + s; // target to source index\n\n if (!directed && dist[ts] > _weight) {\n dist[ts] = _weight;\n next[ts] = s;\n edgeNext[ts] = edge;\n }\n }\n }\n\n // Main loop\n for (var k = 0; k < N; k++) {\n for (var _i2 = 0; _i2 < N; _i2++) {\n var ik = _i2 * N + k;\n for (var _j = 0; _j < N; _j++) {\n var ij = _i2 * N + _j;\n var kj = k * N + _j;\n if (dist[ik] + dist[kj] < dist[ij]) {\n dist[ij] = dist[ik] + dist[kj];\n next[ij] = next[ik];\n }\n }\n }\n }\n var getArgEle = function getArgEle(ele) {\n return (string(ele) ? cy.filter(ele) : ele)[0];\n };\n var indexOfArgEle = function indexOfArgEle(ele) {\n return indexOf(getArgEle(ele));\n };\n var res = {\n distance: function distance(from, to) {\n var i = indexOfArgEle(from);\n var j = indexOfArgEle(to);\n return dist[i * N + j];\n },\n path: function path(from, to) {\n var i = indexOfArgEle(from);\n var j = indexOfArgEle(to);\n var fromNode = atIndex(i);\n if (i === j) {\n return fromNode.collection();\n }\n if (next[i * N + j] == null) {\n return cy.collection();\n }\n var path = cy.collection();\n var prev = i;\n var edge;\n path.merge(fromNode);\n while (i !== j) {\n prev = i;\n i = next[i * N + j];\n edge = edgeNext[prev * N + i];\n path.merge(edge);\n path.merge(atIndex(i));\n }\n return path;\n }\n };\n return res;\n } // floydWarshall\n}; // elesfn\n\nvar bellmanFordDefaults = defaults$g({\n weight: function weight(edge) {\n return 1;\n },\n directed: false,\n root: null\n});\nvar elesfn$q = {\n // Implemented from pseudocode from wikipedia\n bellmanFord: function bellmanFord(options) {\n var _this = this;\n var _bellmanFordDefaults = bellmanFordDefaults(options),\n weight = _bellmanFordDefaults.weight,\n directed = _bellmanFordDefaults.directed,\n root = _bellmanFordDefaults.root;\n var weightFn = weight;\n var eles = this;\n var cy = this.cy();\n var _this$byGroup = this.byGroup(),\n edges = _this$byGroup.edges,\n nodes = _this$byGroup.nodes;\n var numNodes = nodes.length;\n var infoMap = new Map$2();\n var hasNegativeWeightCycle = false;\n var negativeWeightCycles = [];\n root = cy.collection(root)[0]; // in case selector passed\n\n edges.unmergeBy(function (edge) {\n return edge.isLoop();\n });\n var numEdges = edges.length;\n var getInfo = function getInfo(node) {\n var obj = infoMap.get(node.id());\n if (!obj) {\n obj = {};\n infoMap.set(node.id(), obj);\n }\n return obj;\n };\n var getNodeFromTo = function getNodeFromTo(to) {\n return (string(to) ? cy.$(to) : to)[0];\n };\n var distanceTo = function distanceTo(to) {\n return getInfo(getNodeFromTo(to)).dist;\n };\n var pathTo = function pathTo(to) {\n var thisStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : root;\n var end = getNodeFromTo(to);\n var path = [];\n var node = end;\n for (;;) {\n if (node == null) {\n return _this.spawn();\n }\n var _getInfo = getInfo(node),\n edge = _getInfo.edge,\n pred = _getInfo.pred;\n path.unshift(node[0]);\n if (node.same(thisStart) && path.length > 0) {\n break;\n }\n if (edge != null) {\n path.unshift(edge);\n }\n node = pred;\n }\n return eles.spawn(path);\n };\n\n // Initializations { dist, pred, edge }\n for (var i = 0; i < numNodes; i++) {\n var node = nodes[i];\n var info = getInfo(node);\n if (node.same(root)) {\n info.dist = 0;\n } else {\n info.dist = Infinity;\n }\n info.pred = null;\n info.edge = null;\n }\n\n // Edges relaxation\n var replacedEdge = false;\n var checkForEdgeReplacement = function checkForEdgeReplacement(node1, node2, edge, info1, info2, weight) {\n var dist = info1.dist + weight;\n if (dist < info2.dist && !edge.same(info1.edge)) {\n info2.dist = dist;\n info2.pred = node1;\n info2.edge = edge;\n replacedEdge = true;\n }\n };\n for (var _i = 1; _i < numNodes; _i++) {\n replacedEdge = false;\n for (var e = 0; e < numEdges; e++) {\n var edge = edges[e];\n var src = edge.source();\n var tgt = edge.target();\n var _weight = weightFn(edge);\n var srcInfo = getInfo(src);\n var tgtInfo = getInfo(tgt);\n checkForEdgeReplacement(src, tgt, edge, srcInfo, tgtInfo, _weight);\n\n // If undirected graph, we need to take into account the 'reverse' edge\n if (!directed) {\n checkForEdgeReplacement(tgt, src, edge, tgtInfo, srcInfo, _weight);\n }\n }\n if (!replacedEdge) {\n break;\n }\n }\n if (replacedEdge) {\n // Check for negative weight cycles\n var negativeWeightCycleIds = [];\n for (var _e = 0; _e < numEdges; _e++) {\n var _edge = edges[_e];\n var _src = _edge.source();\n var _tgt = _edge.target();\n var _weight2 = weightFn(_edge);\n var srcDist = getInfo(_src).dist;\n var tgtDist = getInfo(_tgt).dist;\n if (srcDist + _weight2 < tgtDist || !directed && tgtDist + _weight2 < srcDist) {\n if (!hasNegativeWeightCycle) {\n warn('Graph contains a negative weight cycle for Bellman-Ford');\n hasNegativeWeightCycle = true;\n }\n if (options.findNegativeWeightCycles !== false) {\n var negativeNodes = [];\n if (srcDist + _weight2 < tgtDist) {\n negativeNodes.push(_src);\n }\n if (!directed && tgtDist + _weight2 < srcDist) {\n negativeNodes.push(_tgt);\n }\n var numNegativeNodes = negativeNodes.length;\n for (var n = 0; n < numNegativeNodes; n++) {\n var start = negativeNodes[n];\n var cycle = [start];\n cycle.push(getInfo(start).edge);\n var _node = getInfo(start).pred;\n while (cycle.indexOf(_node) === -1) {\n cycle.push(_node);\n cycle.push(getInfo(_node).edge);\n _node = getInfo(_node).pred;\n }\n cycle = cycle.slice(cycle.indexOf(_node));\n var smallestId = cycle[0].id();\n var smallestIndex = 0;\n for (var c = 2; c < cycle.length; c += 2) {\n if (cycle[c].id() < smallestId) {\n smallestId = cycle[c].id();\n smallestIndex = c;\n }\n }\n cycle = cycle.slice(smallestIndex).concat(cycle.slice(0, smallestIndex));\n cycle.push(cycle[0]);\n var cycleId = cycle.map(function (el) {\n return el.id();\n }).join(\",\");\n if (negativeWeightCycleIds.indexOf(cycleId) === -1) {\n negativeWeightCycles.push(eles.spawn(cycle));\n negativeWeightCycleIds.push(cycleId);\n }\n }\n } else {\n break;\n }\n }\n }\n }\n return {\n distanceTo: distanceTo,\n pathTo: pathTo,\n hasNegativeWeightCycle: hasNegativeWeightCycle,\n negativeWeightCycles: negativeWeightCycles\n };\n } // bellmanFord\n}; // elesfn\n\nvar sqrt2 = Math.sqrt(2);\n\n// Function which colapses 2 (meta) nodes into one\n// Updates the remaining edge lists\n// Receives as a paramater the edge which causes the collapse\nvar collapse = function collapse(edgeIndex, nodeMap, remainingEdges) {\n if (remainingEdges.length === 0) {\n error(\"Karger-Stein must be run on a connected (sub)graph\");\n }\n var edgeInfo = remainingEdges[edgeIndex];\n var sourceIn = edgeInfo[1];\n var targetIn = edgeInfo[2];\n var partition1 = nodeMap[sourceIn];\n var partition2 = nodeMap[targetIn];\n var newEdges = remainingEdges; // re-use array\n\n // Delete all edges between partition1 and partition2\n for (var i = newEdges.length - 1; i >= 0; i--) {\n var edge = newEdges[i];\n var src = edge[1];\n var tgt = edge[2];\n if (nodeMap[src] === partition1 && nodeMap[tgt] === partition2 || nodeMap[src] === partition2 && nodeMap[tgt] === partition1) {\n newEdges.splice(i, 1);\n }\n }\n\n // All edges pointing to partition2 should now point to partition1\n for (var _i = 0; _i < newEdges.length; _i++) {\n var _edge = newEdges[_i];\n if (_edge[1] === partition2) {\n // Check source\n newEdges[_i] = _edge.slice(); // copy\n newEdges[_i][1] = partition1;\n } else if (_edge[2] === partition2) {\n // Check target\n newEdges[_i] = _edge.slice(); // copy\n newEdges[_i][2] = partition1;\n }\n }\n\n // Move all nodes from partition2 to partition1\n for (var _i2 = 0; _i2 < nodeMap.length; _i2++) {\n if (nodeMap[_i2] === partition2) {\n nodeMap[_i2] = partition1;\n }\n }\n return newEdges;\n};\n\n// Contracts a graph until we reach a certain number of meta nodes\nvar contractUntil = function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) {\n while (size > sizeLimit) {\n // Choose an edge randomly\n var edgeIndex = Math.floor(Math.random() * remainingEdges.length);\n\n // Collapse graph based on edge\n remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges);\n size--;\n }\n return remainingEdges;\n};\nvar elesfn$p = {\n // Computes the minimum cut of an undirected graph\n // Returns the correct answer with high probability\n kargerStein: function kargerStein() {\n var _this = this;\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n edges.unmergeBy(function (edge) {\n return edge.isLoop();\n });\n var numNodes = nodes.length;\n var numEdges = edges.length;\n var numIter = Math.ceil(Math.pow(Math.log(numNodes) / Math.LN2, 2));\n var stopSize = Math.floor(numNodes / sqrt2);\n if (numNodes < 2) {\n error('At least 2 nodes are required for Karger-Stein algorithm');\n return undefined;\n }\n\n // Now store edge destination as indexes\n // Format for each edge (edge index, source node index, target node index)\n var edgeIndexes = [];\n for (var i = 0; i < numEdges; i++) {\n var e = edges[i];\n edgeIndexes.push([i, nodes.indexOf(e.source()), nodes.indexOf(e.target())]);\n }\n\n // We will store the best cut found here\n var minCutSize = Infinity;\n var minCutEdgeIndexes = [];\n var minCutNodeMap = new Array(numNodes);\n\n // Initial meta node partition\n var metaNodeMap = new Array(numNodes);\n var metaNodeMap2 = new Array(numNodes);\n var copyNodesMap = function copyNodesMap(from, to) {\n for (var _i3 = 0; _i3 < numNodes; _i3++) {\n to[_i3] = from[_i3];\n }\n };\n\n // Main loop\n for (var iter = 0; iter <= numIter; iter++) {\n // Reset meta node partition\n for (var _i4 = 0; _i4 < numNodes; _i4++) {\n metaNodeMap[_i4] = _i4;\n }\n\n // Contract until stop point (stopSize nodes)\n var edgesState = contractUntil(metaNodeMap, edgeIndexes.slice(), numNodes, stopSize);\n var edgesState2 = edgesState.slice(); // copy\n\n // Create a copy of the colapsed nodes state\n copyNodesMap(metaNodeMap, metaNodeMap2);\n\n // Run 2 iterations starting in the stop state\n var res1 = contractUntil(metaNodeMap, edgesState, stopSize, 2);\n var res2 = contractUntil(metaNodeMap2, edgesState2, stopSize, 2);\n\n // Is any of the 2 results the best cut so far?\n if (res1.length <= res2.length && res1.length < minCutSize) {\n minCutSize = res1.length;\n minCutEdgeIndexes = res1;\n copyNodesMap(metaNodeMap, minCutNodeMap);\n } else if (res2.length <= res1.length && res2.length < minCutSize) {\n minCutSize = res2.length;\n minCutEdgeIndexes = res2;\n copyNodesMap(metaNodeMap2, minCutNodeMap);\n }\n } // end of main loop\n\n // Construct result\n var cut = this.spawn(minCutEdgeIndexes.map(function (e) {\n return edges[e[0]];\n }));\n var partition1 = this.spawn();\n var partition2 = this.spawn();\n\n // traverse metaNodeMap for best cut\n var witnessNodePartition = minCutNodeMap[0];\n for (var _i5 = 0; _i5 < minCutNodeMap.length; _i5++) {\n var partitionId = minCutNodeMap[_i5];\n var node = nodes[_i5];\n if (partitionId === witnessNodePartition) {\n partition1.merge(node);\n } else {\n partition2.merge(node);\n }\n }\n\n // construct components corresponding to each disjoint subset of nodes\n var constructComponent = function constructComponent(subset) {\n var component = _this.spawn();\n subset.forEach(function (node) {\n component.merge(node);\n node.connectedEdges().forEach(function (edge) {\n // ensure edge is within calling collection and edge is not in cut\n if (_this.contains(edge) && !cut.contains(edge)) {\n component.merge(edge);\n }\n });\n });\n return component;\n };\n var components = [constructComponent(partition1), constructComponent(partition2)];\n var ret = {\n cut: cut,\n components: components,\n // n.b. partitions are included to be compatible with the old api spec\n // (could be removed in a future major version)\n partition1: partition1,\n partition2: partition2\n };\n return ret;\n }\n}; // elesfn\n\nvar copyPosition = function copyPosition(p) {\n return {\n x: p.x,\n y: p.y\n };\n};\nvar modelToRenderedPosition = function modelToRenderedPosition(p, zoom, pan) {\n return {\n x: p.x * zoom + pan.x,\n y: p.y * zoom + pan.y\n };\n};\nvar renderedToModelPosition = function renderedToModelPosition(p, zoom, pan) {\n return {\n x: (p.x - pan.x) / zoom,\n y: (p.y - pan.y) / zoom\n };\n};\nvar array2point = function array2point(arr) {\n return {\n x: arr[0],\n y: arr[1]\n };\n};\nvar min = function min(arr) {\n var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length;\n var min = Infinity;\n for (var i = begin; i < end; i++) {\n var val = arr[i];\n if (isFinite(val)) {\n min = Math.min(val, min);\n }\n }\n return min;\n};\nvar max = function max(arr) {\n var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length;\n var max = -Infinity;\n for (var i = begin; i < end; i++) {\n var val = arr[i];\n if (isFinite(val)) {\n max = Math.max(val, max);\n }\n }\n return max;\n};\nvar mean = function mean(arr) {\n var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length;\n var total = 0;\n var n = 0;\n for (var i = begin; i < end; i++) {\n var val = arr[i];\n if (isFinite(val)) {\n total += val;\n n++;\n }\n }\n return total / n;\n};\nvar median = function median(arr) {\n var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length;\n var copy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var sort = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var includeHoles = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n if (copy) {\n arr = arr.slice(begin, end);\n } else {\n if (end < arr.length) {\n arr.splice(end, arr.length - end);\n }\n if (begin > 0) {\n arr.splice(0, begin);\n }\n }\n\n // all non finite (e.g. Infinity, NaN) elements must be -Infinity so they go to the start\n var off = 0; // offset from non-finite values\n for (var i = arr.length - 1; i >= 0; i--) {\n var v = arr[i];\n if (includeHoles) {\n if (!isFinite(v)) {\n arr[i] = -Infinity;\n off++;\n }\n } else {\n // just remove it if we don't want to consider holes\n arr.splice(i, 1);\n }\n }\n if (sort) {\n arr.sort(function (a, b) {\n return a - b;\n }); // requires copy = true if you don't want to change the orig\n }\n\n var len = arr.length;\n var mid = Math.floor(len / 2);\n if (len % 2 !== 0) {\n return arr[mid + 1 + off];\n } else {\n return (arr[mid - 1 + off] + arr[mid + off]) / 2;\n }\n};\nvar deg2rad = function deg2rad(deg) {\n return Math.PI * deg / 180;\n};\nvar getAngleFromDisp = function getAngleFromDisp(dispX, dispY) {\n return Math.atan2(dispY, dispX) - Math.PI / 2;\n};\nvar log2 = Math.log2 || function (n) {\n return Math.log(n) / Math.log(2);\n};\nvar signum = function signum(x) {\n if (x > 0) {\n return 1;\n } else if (x < 0) {\n return -1;\n } else {\n return 0;\n }\n};\nvar dist = function dist(p1, p2) {\n return Math.sqrt(sqdist(p1, p2));\n};\nvar sqdist = function sqdist(p1, p2) {\n var dx = p2.x - p1.x;\n var dy = p2.y - p1.y;\n return dx * dx + dy * dy;\n};\nvar inPlaceSumNormalize = function inPlaceSumNormalize(v) {\n var length = v.length;\n\n // First, get sum of all elements\n var total = 0;\n for (var i = 0; i < length; i++) {\n total += v[i];\n }\n\n // Now, divide each by the sum of all elements\n for (var _i = 0; _i < length; _i++) {\n v[_i] = v[_i] / total;\n }\n return v;\n};\n\n// from http://en.wikipedia.org/wiki/B\u00E9zier_curve#Quadratic_curves\nvar qbezierAt = function qbezierAt(p0, p1, p2, t) {\n return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2;\n};\nvar qbezierPtAt = function qbezierPtAt(p0, p1, p2, t) {\n return {\n x: qbezierAt(p0.x, p1.x, p2.x, t),\n y: qbezierAt(p0.y, p1.y, p2.y, t)\n };\n};\nvar lineAt = function lineAt(p0, p1, t, d) {\n var vec = {\n x: p1.x - p0.x,\n y: p1.y - p0.y\n };\n var vecDist = dist(p0, p1);\n var normVec = {\n x: vec.x / vecDist,\n y: vec.y / vecDist\n };\n t = t == null ? 0 : t;\n d = d != null ? d : t * vecDist;\n return {\n x: p0.x + normVec.x * d,\n y: p0.y + normVec.y * d\n };\n};\nvar bound = function bound(min, val, max) {\n return Math.max(min, Math.min(max, val));\n};\n\n// makes a full bb (x1, y1, x2, y2, w, h) from implicit params\nvar makeBoundingBox = function makeBoundingBox(bb) {\n if (bb == null) {\n return {\n x1: Infinity,\n y1: Infinity,\n x2: -Infinity,\n y2: -Infinity,\n w: 0,\n h: 0\n };\n } else if (bb.x1 != null && bb.y1 != null) {\n if (bb.x2 != null && bb.y2 != null && bb.x2 >= bb.x1 && bb.y2 >= bb.y1) {\n return {\n x1: bb.x1,\n y1: bb.y1,\n x2: bb.x2,\n y2: bb.y2,\n w: bb.x2 - bb.x1,\n h: bb.y2 - bb.y1\n };\n } else if (bb.w != null && bb.h != null && bb.w >= 0 && bb.h >= 0) {\n return {\n x1: bb.x1,\n y1: bb.y1,\n x2: bb.x1 + bb.w,\n y2: bb.y1 + bb.h,\n w: bb.w,\n h: bb.h\n };\n }\n }\n};\nvar copyBoundingBox = function copyBoundingBox(bb) {\n return {\n x1: bb.x1,\n x2: bb.x2,\n w: bb.w,\n y1: bb.y1,\n y2: bb.y2,\n h: bb.h\n };\n};\nvar clearBoundingBox = function clearBoundingBox(bb) {\n bb.x1 = Infinity;\n bb.y1 = Infinity;\n bb.x2 = -Infinity;\n bb.y2 = -Infinity;\n bb.w = 0;\n bb.h = 0;\n};\nvar shiftBoundingBox = function shiftBoundingBox(bb, dx, dy) {\n return {\n x1: bb.x1 + dx,\n x2: bb.x2 + dx,\n y1: bb.y1 + dy,\n y2: bb.y2 + dy,\n w: bb.w,\n h: bb.h\n };\n};\nvar updateBoundingBox = function updateBoundingBox(bb1, bb2) {\n // update bb1 with bb2 bounds\n\n bb1.x1 = Math.min(bb1.x1, bb2.x1);\n bb1.x2 = Math.max(bb1.x2, bb2.x2);\n bb1.w = bb1.x2 - bb1.x1;\n bb1.y1 = Math.min(bb1.y1, bb2.y1);\n bb1.y2 = Math.max(bb1.y2, bb2.y2);\n bb1.h = bb1.y2 - bb1.y1;\n};\nvar expandBoundingBoxByPoint = function expandBoundingBoxByPoint(bb, x, y) {\n bb.x1 = Math.min(bb.x1, x);\n bb.x2 = Math.max(bb.x2, x);\n bb.w = bb.x2 - bb.x1;\n bb.y1 = Math.min(bb.y1, y);\n bb.y2 = Math.max(bb.y2, y);\n bb.h = bb.y2 - bb.y1;\n};\nvar expandBoundingBox = function expandBoundingBox(bb) {\n var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n bb.x1 -= padding;\n bb.x2 += padding;\n bb.y1 -= padding;\n bb.y2 += padding;\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n return bb;\n};\nvar expandBoundingBoxSides = function expandBoundingBoxSides(bb) {\n var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0];\n var top, right, bottom, left;\n if (padding.length === 1) {\n top = right = bottom = left = padding[0];\n } else if (padding.length === 2) {\n top = bottom = padding[0];\n left = right = padding[1];\n } else if (padding.length === 4) {\n var _padding = _slicedToArray(padding, 4);\n top = _padding[0];\n right = _padding[1];\n bottom = _padding[2];\n left = _padding[3];\n }\n bb.x1 -= left;\n bb.x2 += right;\n bb.y1 -= top;\n bb.y2 += bottom;\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n return bb;\n};\n\n// assign the values of bb2 into bb1\nvar assignBoundingBox = function assignBoundingBox(bb1, bb2) {\n bb1.x1 = bb2.x1;\n bb1.y1 = bb2.y1;\n bb1.x2 = bb2.x2;\n bb1.y2 = bb2.y2;\n bb1.w = bb1.x2 - bb1.x1;\n bb1.h = bb1.y2 - bb1.y1;\n};\nvar boundingBoxesIntersect = function boundingBoxesIntersect(bb1, bb2) {\n // case: one bb to right of other\n if (bb1.x1 > bb2.x2) {\n return false;\n }\n if (bb2.x1 > bb1.x2) {\n return false;\n }\n\n // case: one bb to left of other\n if (bb1.x2 < bb2.x1) {\n return false;\n }\n if (bb2.x2 < bb1.x1) {\n return false;\n }\n\n // case: one bb above other\n if (bb1.y2 < bb2.y1) {\n return false;\n }\n if (bb2.y2 < bb1.y1) {\n return false;\n }\n\n // case: one bb below other\n if (bb1.y1 > bb2.y2) {\n return false;\n }\n if (bb2.y1 > bb1.y2) {\n return false;\n }\n\n // otherwise, must have some overlap\n return true;\n};\nvar inBoundingBox = function inBoundingBox(bb, x, y) {\n return bb.x1 <= x && x <= bb.x2 && bb.y1 <= y && y <= bb.y2;\n};\nvar pointInBoundingBox = function pointInBoundingBox(bb, pt) {\n return inBoundingBox(bb, pt.x, pt.y);\n};\nvar boundingBoxInBoundingBox = function boundingBoxInBoundingBox(bb1, bb2) {\n return inBoundingBox(bb1, bb2.x1, bb2.y1) && inBoundingBox(bb1, bb2.x2, bb2.y2);\n};\nvar roundRectangleIntersectLine = function roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding) {\n var radius = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'auto';\n var cornerRadius = radius === 'auto' ? getRoundRectangleRadius(width, height) : radius;\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n cornerRadius = Math.min(cornerRadius, halfWidth, halfHeight);\n var doWidth = cornerRadius !== halfWidth,\n doHeight = cornerRadius !== halfHeight;\n\n // Check intersections with straight line segments\n var straightLineIntersections;\n\n // Top segment, left to right\n if (doWidth) {\n var topStartX = nodeX - halfWidth + cornerRadius - padding;\n var topStartY = nodeY - halfHeight - padding;\n var topEndX = nodeX + halfWidth - cornerRadius + padding;\n var topEndY = topStartY;\n straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false);\n if (straightLineIntersections.length > 0) {\n return straightLineIntersections;\n }\n }\n\n // Right segment, top to bottom\n if (doHeight) {\n var rightStartX = nodeX + halfWidth + padding;\n var rightStartY = nodeY - halfHeight + cornerRadius - padding;\n var rightEndX = rightStartX;\n var rightEndY = nodeY + halfHeight - cornerRadius + padding;\n straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false);\n if (straightLineIntersections.length > 0) {\n return straightLineIntersections;\n }\n }\n\n // Bottom segment, left to right\n if (doWidth) {\n var bottomStartX = nodeX - halfWidth + cornerRadius - padding;\n var bottomStartY = nodeY + halfHeight + padding;\n var bottomEndX = nodeX + halfWidth - cornerRadius + padding;\n var bottomEndY = bottomStartY;\n straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false);\n if (straightLineIntersections.length > 0) {\n return straightLineIntersections;\n }\n }\n\n // Left segment, top to bottom\n if (doHeight) {\n var leftStartX = nodeX - halfWidth - padding;\n var leftStartY = nodeY - halfHeight + cornerRadius - padding;\n var leftEndX = leftStartX;\n var leftEndY = nodeY + halfHeight - cornerRadius + padding;\n straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false);\n if (straightLineIntersections.length > 0) {\n return straightLineIntersections;\n }\n }\n\n // Check intersections with arc segments\n var arcIntersections;\n\n // Top Left\n {\n var topLeftCenterX = nodeX - halfWidth + cornerRadius;\n var topLeftCenterY = nodeY - halfHeight + cornerRadius;\n arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topLeftCenterX, topLeftCenterY, cornerRadius + padding);\n\n // Ensure the intersection is on the desired quarter of the circle\n if (arcIntersections.length > 0 && arcIntersections[0] <= topLeftCenterX && arcIntersections[1] <= topLeftCenterY) {\n return [arcIntersections[0], arcIntersections[1]];\n }\n }\n\n // Top Right\n {\n var topRightCenterX = nodeX + halfWidth - cornerRadius;\n var topRightCenterY = nodeY - halfHeight + cornerRadius;\n arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topRightCenterX, topRightCenterY, cornerRadius + padding);\n\n // Ensure the intersection is on the desired quarter of the circle\n if (arcIntersections.length > 0 && arcIntersections[0] >= topRightCenterX && arcIntersections[1] <= topRightCenterY) {\n return [arcIntersections[0], arcIntersections[1]];\n }\n }\n\n // Bottom Right\n {\n var bottomRightCenterX = nodeX + halfWidth - cornerRadius;\n var bottomRightCenterY = nodeY + halfHeight - cornerRadius;\n arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomRightCenterX, bottomRightCenterY, cornerRadius + padding);\n\n // Ensure the intersection is on the desired quarter of the circle\n if (arcIntersections.length > 0 && arcIntersections[0] >= bottomRightCenterX && arcIntersections[1] >= bottomRightCenterY) {\n return [arcIntersections[0], arcIntersections[1]];\n }\n }\n\n // Bottom Left\n {\n var bottomLeftCenterX = nodeX - halfWidth + cornerRadius;\n var bottomLeftCenterY = nodeY + halfHeight - cornerRadius;\n arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding);\n\n // Ensure the intersection is on the desired quarter of the circle\n if (arcIntersections.length > 0 && arcIntersections[0] <= bottomLeftCenterX && arcIntersections[1] >= bottomLeftCenterY) {\n return [arcIntersections[0], arcIntersections[1]];\n }\n }\n return []; // if nothing\n};\n\nvar inLineVicinity = function inLineVicinity(x, y, lx1, ly1, lx2, ly2, tolerance) {\n var t = tolerance;\n var x1 = Math.min(lx1, lx2);\n var x2 = Math.max(lx1, lx2);\n var y1 = Math.min(ly1, ly2);\n var y2 = Math.max(ly1, ly2);\n return x1 - t <= x && x <= x2 + t && y1 - t <= y && y <= y2 + t;\n};\nvar inBezierVicinity = function inBezierVicinity(x, y, x1, y1, x2, y2, x3, y3, tolerance) {\n var bb = {\n x1: Math.min(x1, x3, x2) - tolerance,\n x2: Math.max(x1, x3, x2) + tolerance,\n y1: Math.min(y1, y3, y2) - tolerance,\n y2: Math.max(y1, y3, y2) + tolerance\n };\n\n // if outside the rough bounding box for the bezier, then it can't be a hit\n if (x < bb.x1 || x > bb.x2 || y < bb.y1 || y > bb.y2) {\n // console.log('bezier out of rough bb')\n return false;\n } else {\n // console.log('do more expensive check');\n return true;\n }\n};\nvar solveQuadratic = function solveQuadratic(a, b, c, val) {\n c -= val;\n var r = b * b - 4 * a * c;\n if (r < 0) {\n return [];\n }\n var sqrtR = Math.sqrt(r);\n var denom = 2 * a;\n var root1 = (-b + sqrtR) / denom;\n var root2 = (-b - sqrtR) / denom;\n return [root1, root2];\n};\nvar solveCubic = function solveCubic(a, b, c, d, result) {\n // Solves a cubic function, returns root in form [r1, i1, r2, i2, r3, i3], where\n // r is the real component, i is the imaginary component\n\n // An implementation of the Cardano method from the year 1545\n // http://en.wikipedia.org/wiki/Cubic_function#The_nature_of_the_roots\n\n var epsilon = 0.00001;\n\n // avoid division by zero while keeping the overall expression close in value\n if (a === 0) {\n a = epsilon;\n }\n b /= a;\n c /= a;\n d /= a;\n var discriminant, q, r, dum1, s, t, term1, r13;\n q = (3.0 * c - b * b) / 9.0;\n r = -(27.0 * d) + b * (9.0 * c - 2.0 * (b * b));\n r /= 54.0;\n discriminant = q * q * q + r * r;\n result[1] = 0;\n term1 = b / 3.0;\n if (discriminant > 0) {\n s = r + Math.sqrt(discriminant);\n s = s < 0 ? -Math.pow(-s, 1.0 / 3.0) : Math.pow(s, 1.0 / 3.0);\n t = r - Math.sqrt(discriminant);\n t = t < 0 ? -Math.pow(-t, 1.0 / 3.0) : Math.pow(t, 1.0 / 3.0);\n result[0] = -term1 + s + t;\n term1 += (s + t) / 2.0;\n result[4] = result[2] = -term1;\n term1 = Math.sqrt(3.0) * (-t + s) / 2;\n result[3] = term1;\n result[5] = -term1;\n return;\n }\n result[5] = result[3] = 0;\n if (discriminant === 0) {\n r13 = r < 0 ? -Math.pow(-r, 1.0 / 3.0) : Math.pow(r, 1.0 / 3.0);\n result[0] = -term1 + 2.0 * r13;\n result[4] = result[2] = -(r13 + term1);\n return;\n }\n q = -q;\n dum1 = q * q * q;\n dum1 = Math.acos(r / Math.sqrt(dum1));\n r13 = 2.0 * Math.sqrt(q);\n result[0] = -term1 + r13 * Math.cos(dum1 / 3.0);\n result[2] = -term1 + r13 * Math.cos((dum1 + 2.0 * Math.PI) / 3.0);\n result[4] = -term1 + r13 * Math.cos((dum1 + 4.0 * Math.PI) / 3.0);\n return;\n};\nvar sqdistToQuadraticBezier = function sqdistToQuadraticBezier(x, y, x1, y1, x2, y2, x3, y3) {\n // Find minimum distance by using the minimum of the distance\n // function between the given point and the curve\n\n // This gives the coefficients of the resulting cubic equation\n // whose roots tell us where a possible minimum is\n // (Coefficients are divided by 4)\n\n var a = 1.0 * x1 * x1 - 4 * x1 * x2 + 2 * x1 * x3 + 4 * x2 * x2 - 4 * x2 * x3 + x3 * x3 + y1 * y1 - 4 * y1 * y2 + 2 * y1 * y3 + 4 * y2 * y2 - 4 * y2 * y3 + y3 * y3;\n var b = 1.0 * 9 * x1 * x2 - 3 * x1 * x1 - 3 * x1 * x3 - 6 * x2 * x2 + 3 * x2 * x3 + 9 * y1 * y2 - 3 * y1 * y1 - 3 * y1 * y3 - 6 * y2 * y2 + 3 * y2 * y3;\n var c = 1.0 * 3 * x1 * x1 - 6 * x1 * x2 + x1 * x3 - x1 * x + 2 * x2 * x2 + 2 * x2 * x - x3 * x + 3 * y1 * y1 - 6 * y1 * y2 + y1 * y3 - y1 * y + 2 * y2 * y2 + 2 * y2 * y - y3 * y;\n var d = 1.0 * x1 * x2 - x1 * x1 + x1 * x - x2 * x + y1 * y2 - y1 * y1 + y1 * y - y2 * y;\n\n // debug(\"coefficients: \" + a / a + \", \" + b / a + \", \" + c / a + \", \" + d / a);\n\n var roots = [];\n\n // Use the cubic solving algorithm\n solveCubic(a, b, c, d, roots);\n var zeroThreshold = 0.0000001;\n var params = [];\n for (var index = 0; index < 6; index += 2) {\n if (Math.abs(roots[index + 1]) < zeroThreshold && roots[index] >= 0 && roots[index] <= 1.0) {\n params.push(roots[index]);\n }\n }\n params.push(1.0);\n params.push(0.0);\n var minDistanceSquared = -1;\n var curX, curY, distSquared;\n for (var i = 0; i < params.length; i++) {\n curX = Math.pow(1.0 - params[i], 2.0) * x1 + 2.0 * (1 - params[i]) * params[i] * x2 + params[i] * params[i] * x3;\n curY = Math.pow(1 - params[i], 2.0) * y1 + 2 * (1.0 - params[i]) * params[i] * y2 + params[i] * params[i] * y3;\n distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2);\n // debug('distance for param ' + params[i] + \": \" + Math.sqrt(distSquared));\n if (minDistanceSquared >= 0) {\n if (distSquared < minDistanceSquared) {\n minDistanceSquared = distSquared;\n }\n } else {\n minDistanceSquared = distSquared;\n }\n }\n return minDistanceSquared;\n};\nvar sqdistToFiniteLine = function sqdistToFiniteLine(x, y, x1, y1, x2, y2) {\n var offset = [x - x1, y - y1];\n var line = [x2 - x1, y2 - y1];\n var lineSq = line[0] * line[0] + line[1] * line[1];\n var hypSq = offset[0] * offset[0] + offset[1] * offset[1];\n var dotProduct = offset[0] * line[0] + offset[1] * line[1];\n var adjSq = dotProduct * dotProduct / lineSq;\n if (dotProduct < 0) {\n return hypSq;\n }\n if (adjSq > lineSq) {\n return (x - x2) * (x - x2) + (y - y2) * (y - y2);\n }\n return hypSq - adjSq;\n};\nvar pointInsidePolygonPoints = function pointInsidePolygonPoints(x, y, points) {\n var x1, y1, x2, y2;\n var y3;\n\n // Intersect with vertical line through (x, y)\n var up = 0;\n // let down = 0;\n for (var i = 0; i < points.length / 2; i++) {\n x1 = points[i * 2];\n y1 = points[i * 2 + 1];\n if (i + 1 < points.length / 2) {\n x2 = points[(i + 1) * 2];\n y2 = points[(i + 1) * 2 + 1];\n } else {\n x2 = points[(i + 1 - points.length / 2) * 2];\n y2 = points[(i + 1 - points.length / 2) * 2 + 1];\n }\n if (x1 == x && x2 == x) ; else if (x1 >= x && x >= x2 || x1 <= x && x <= x2) {\n y3 = (x - x1) / (x2 - x1) * (y2 - y1) + y1;\n if (y3 > y) {\n up++;\n }\n\n // if( y3 < y ){\n // down++;\n // }\n } else {\n continue;\n }\n }\n if (up % 2 === 0) {\n return false;\n } else {\n return true;\n }\n};\nvar pointInsidePolygon = function pointInsidePolygon(x, y, basePoints, centerX, centerY, width, height, direction, padding) {\n var transformedPoints = new Array(basePoints.length);\n\n // Gives negative angle\n var angle;\n if (direction[0] != null) {\n angle = Math.atan(direction[1] / direction[0]);\n if (direction[0] < 0) {\n angle = angle + Math.PI / 2;\n } else {\n angle = -angle - Math.PI / 2;\n }\n } else {\n angle = direction;\n }\n var cos = Math.cos(-angle);\n var sin = Math.sin(-angle);\n\n // console.log(\"base: \" + basePoints);\n for (var i = 0; i < transformedPoints.length / 2; i++) {\n transformedPoints[i * 2] = width / 2 * (basePoints[i * 2] * cos - basePoints[i * 2 + 1] * sin);\n transformedPoints[i * 2 + 1] = height / 2 * (basePoints[i * 2 + 1] * cos + basePoints[i * 2] * sin);\n transformedPoints[i * 2] += centerX;\n transformedPoints[i * 2 + 1] += centerY;\n }\n var points;\n if (padding > 0) {\n var expandedLineSet = expandPolygon(transformedPoints, -padding);\n points = joinLines(expandedLineSet);\n } else {\n points = transformedPoints;\n }\n return pointInsidePolygonPoints(x, y, points);\n};\nvar pointInsideRoundPolygon = function pointInsideRoundPolygon(x, y, basePoints, centerX, centerY, width, height, corners) {\n var cutPolygonPoints = new Array(basePoints.length * 2);\n for (var i = 0; i < corners.length; i++) {\n var corner = corners[i];\n cutPolygonPoints[i * 4 + 0] = corner.startX;\n cutPolygonPoints[i * 4 + 1] = corner.startY;\n cutPolygonPoints[i * 4 + 2] = corner.stopX;\n cutPolygonPoints[i * 4 + 3] = corner.stopY;\n var squaredDistance = Math.pow(corner.cx - x, 2) + Math.pow(corner.cy - y, 2);\n if (squaredDistance <= Math.pow(corner.radius, 2)) {\n return true;\n }\n }\n return pointInsidePolygonPoints(x, y, cutPolygonPoints);\n};\nvar joinLines = function joinLines(lineSet) {\n var vertices = new Array(lineSet.length / 2);\n var currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY;\n var nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY;\n for (var i = 0; i < lineSet.length / 4; i++) {\n currentLineStartX = lineSet[i * 4];\n currentLineStartY = lineSet[i * 4 + 1];\n currentLineEndX = lineSet[i * 4 + 2];\n currentLineEndY = lineSet[i * 4 + 3];\n if (i < lineSet.length / 4 - 1) {\n nextLineStartX = lineSet[(i + 1) * 4];\n nextLineStartY = lineSet[(i + 1) * 4 + 1];\n nextLineEndX = lineSet[(i + 1) * 4 + 2];\n nextLineEndY = lineSet[(i + 1) * 4 + 3];\n } else {\n nextLineStartX = lineSet[0];\n nextLineStartY = lineSet[1];\n nextLineEndX = lineSet[2];\n nextLineEndY = lineSet[3];\n }\n var intersection = finiteLinesIntersect(currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY, nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY, true);\n vertices[i * 2] = intersection[0];\n vertices[i * 2 + 1] = intersection[1];\n }\n return vertices;\n};\nvar expandPolygon = function expandPolygon(points, pad) {\n var expandedLineSet = new Array(points.length * 2);\n var currentPointX, currentPointY, nextPointX, nextPointY;\n for (var i = 0; i < points.length / 2; i++) {\n currentPointX = points[i * 2];\n currentPointY = points[i * 2 + 1];\n if (i < points.length / 2 - 1) {\n nextPointX = points[(i + 1) * 2];\n nextPointY = points[(i + 1) * 2 + 1];\n } else {\n nextPointX = points[0];\n nextPointY = points[1];\n }\n\n // Current line: [currentPointX, currentPointY] to [nextPointX, nextPointY]\n\n // Assume CCW polygon winding\n\n var offsetX = nextPointY - currentPointY;\n var offsetY = -(nextPointX - currentPointX);\n\n // Normalize\n var offsetLength = Math.sqrt(offsetX * offsetX + offsetY * offsetY);\n var normalizedOffsetX = offsetX / offsetLength;\n var normalizedOffsetY = offsetY / offsetLength;\n expandedLineSet[i * 4] = currentPointX + normalizedOffsetX * pad;\n expandedLineSet[i * 4 + 1] = currentPointY + normalizedOffsetY * pad;\n expandedLineSet[i * 4 + 2] = nextPointX + normalizedOffsetX * pad;\n expandedLineSet[i * 4 + 3] = nextPointY + normalizedOffsetY * pad;\n }\n return expandedLineSet;\n};\nvar intersectLineEllipse = function intersectLineEllipse(x, y, centerX, centerY, ellipseWradius, ellipseHradius) {\n var dispX = centerX - x;\n var dispY = centerY - y;\n dispX /= ellipseWradius;\n dispY /= ellipseHradius;\n var len = Math.sqrt(dispX * dispX + dispY * dispY);\n var newLength = len - 1;\n if (newLength < 0) {\n return [];\n }\n var lenProportion = newLength / len;\n return [(centerX - x) * lenProportion + x, (centerY - y) * lenProportion + y];\n};\nvar checkInEllipse = function checkInEllipse(x, y, width, height, centerX, centerY, padding) {\n x -= centerX;\n y -= centerY;\n x /= width / 2 + padding;\n y /= height / 2 + padding;\n return x * x + y * y <= 1;\n};\n\n// Returns intersections of increasing distance from line's start point\nvar intersectLineCircle = function intersectLineCircle(x1, y1, x2, y2, centerX, centerY, radius) {\n // Calculate d, direction vector of line\n var d = [x2 - x1, y2 - y1]; // Direction vector of line\n var f = [x1 - centerX, y1 - centerY];\n var a = d[0] * d[0] + d[1] * d[1];\n var b = 2 * (f[0] * d[0] + f[1] * d[1]);\n var c = f[0] * f[0] + f[1] * f[1] - radius * radius;\n var discriminant = b * b - 4 * a * c;\n if (discriminant < 0) {\n return [];\n }\n var t1 = (-b + Math.sqrt(discriminant)) / (2 * a);\n var t2 = (-b - Math.sqrt(discriminant)) / (2 * a);\n var tMin = Math.min(t1, t2);\n var tMax = Math.max(t1, t2);\n var inRangeParams = [];\n if (tMin >= 0 && tMin <= 1) {\n inRangeParams.push(tMin);\n }\n if (tMax >= 0 && tMax <= 1) {\n inRangeParams.push(tMax);\n }\n if (inRangeParams.length === 0) {\n return [];\n }\n var nearIntersectionX = inRangeParams[0] * d[0] + x1;\n var nearIntersectionY = inRangeParams[0] * d[1] + y1;\n if (inRangeParams.length > 1) {\n if (inRangeParams[0] == inRangeParams[1]) {\n return [nearIntersectionX, nearIntersectionY];\n } else {\n var farIntersectionX = inRangeParams[1] * d[0] + x1;\n var farIntersectionY = inRangeParams[1] * d[1] + y1;\n return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY];\n }\n } else {\n return [nearIntersectionX, nearIntersectionY];\n }\n};\nvar midOfThree = function midOfThree(a, b, c) {\n if (b <= a && a <= c || c <= a && a <= b) {\n return a;\n } else if (a <= b && b <= c || c <= b && b <= a) {\n return b;\n } else {\n return c;\n }\n};\n\n// (x1,y1)=>(x2,y2) intersect with (x3,y3)=>(x4,y4)\nvar finiteLinesIntersect = function finiteLinesIntersect(x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) {\n var dx13 = x1 - x3;\n var dx21 = x2 - x1;\n var dx43 = x4 - x3;\n var dy13 = y1 - y3;\n var dy21 = y2 - y1;\n var dy43 = y4 - y3;\n var ua_t = dx43 * dy13 - dy43 * dx13;\n var ub_t = dx21 * dy13 - dy21 * dx13;\n var u_b = dy43 * dx21 - dx43 * dy21;\n if (u_b !== 0) {\n var ua = ua_t / u_b;\n var ub = ub_t / u_b;\n var flptThreshold = 0.001;\n var _min = 0 - flptThreshold;\n var _max = 1 + flptThreshold;\n if (_min <= ua && ua <= _max && _min <= ub && ub <= _max) {\n return [x1 + ua * dx21, y1 + ua * dy21];\n } else {\n if (!infiniteLines) {\n return [];\n } else {\n return [x1 + ua * dx21, y1 + ua * dy21];\n }\n }\n } else {\n if (ua_t === 0 || ub_t === 0) {\n // Parallel, coincident lines. Check if overlap\n\n // Check endpoint of second line\n if (midOfThree(x1, x2, x4) === x4) {\n return [x4, y4];\n }\n\n // Check start point of second line\n if (midOfThree(x1, x2, x3) === x3) {\n return [x3, y3];\n }\n\n // Endpoint of first line\n if (midOfThree(x3, x4, x2) === x2) {\n return [x2, y2];\n }\n return [];\n } else {\n // Parallel, non-coincident\n return [];\n }\n }\n};\n\n// math.polygonIntersectLine( x, y, basePoints, centerX, centerY, width, height, padding )\n// intersect a node polygon (pts transformed)\n//\n// math.polygonIntersectLine( x, y, basePoints, centerX, centerY )\n// intersect the points (no transform)\nvar polygonIntersectLine = function polygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) {\n var intersections = [];\n var intersection;\n var transformedPoints = new Array(basePoints.length);\n var doTransform = true;\n if (width == null) {\n doTransform = false;\n }\n var points;\n if (doTransform) {\n for (var i = 0; i < transformedPoints.length / 2; i++) {\n transformedPoints[i * 2] = basePoints[i * 2] * width + centerX;\n transformedPoints[i * 2 + 1] = basePoints[i * 2 + 1] * height + centerY;\n }\n if (padding > 0) {\n var expandedLineSet = expandPolygon(transformedPoints, -padding);\n points = joinLines(expandedLineSet);\n } else {\n points = transformedPoints;\n }\n } else {\n points = basePoints;\n }\n var currentX, currentY, nextX, nextY;\n for (var _i2 = 0; _i2 < points.length / 2; _i2++) {\n currentX = points[_i2 * 2];\n currentY = points[_i2 * 2 + 1];\n if (_i2 < points.length / 2 - 1) {\n nextX = points[(_i2 + 1) * 2];\n nextY = points[(_i2 + 1) * 2 + 1];\n } else {\n nextX = points[0];\n nextY = points[1];\n }\n intersection = finiteLinesIntersect(x, y, centerX, centerY, currentX, currentY, nextX, nextY);\n if (intersection.length !== 0) {\n intersections.push(intersection[0], intersection[1]);\n }\n }\n return intersections;\n};\nvar roundPolygonIntersectLine = function roundPolygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding, corners) {\n var intersections = [];\n var intersection;\n var lines = new Array(basePoints.length * 2);\n corners.forEach(function (corner, i) {\n if (i === 0) {\n lines[lines.length - 2] = corner.startX;\n lines[lines.length - 1] = corner.startY;\n } else {\n lines[i * 4 - 2] = corner.startX;\n lines[i * 4 - 1] = corner.startY;\n }\n lines[i * 4] = corner.stopX;\n lines[i * 4 + 1] = corner.stopY;\n intersection = intersectLineCircle(x, y, centerX, centerY, corner.cx, corner.cy, corner.radius);\n if (intersection.length !== 0) {\n intersections.push(intersection[0], intersection[1]);\n }\n });\n for (var i = 0; i < lines.length / 4; i++) {\n intersection = finiteLinesIntersect(x, y, centerX, centerY, lines[i * 4], lines[i * 4 + 1], lines[i * 4 + 2], lines[i * 4 + 3], false);\n if (intersection.length !== 0) {\n intersections.push(intersection[0], intersection[1]);\n }\n }\n if (intersections.length > 2) {\n var lowestIntersection = [intersections[0], intersections[1]];\n var lowestSquaredDistance = Math.pow(lowestIntersection[0] - x, 2) + Math.pow(lowestIntersection[1] - y, 2);\n for (var _i3 = 1; _i3 < intersections.length / 2; _i3++) {\n var squaredDistance = Math.pow(intersections[_i3 * 2] - x, 2) + Math.pow(intersections[_i3 * 2 + 1] - y, 2);\n if (squaredDistance <= lowestSquaredDistance) {\n lowestIntersection[0] = intersections[_i3 * 2];\n lowestIntersection[1] = intersections[_i3 * 2 + 1];\n lowestSquaredDistance = squaredDistance;\n }\n }\n return lowestIntersection;\n }\n return intersections;\n};\nvar shortenIntersection = function shortenIntersection(intersection, offset, amount) {\n var disp = [intersection[0] - offset[0], intersection[1] - offset[1]];\n var length = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]);\n var lenRatio = (length - amount) / length;\n if (lenRatio < 0) {\n lenRatio = 0.00001;\n }\n return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]];\n};\nvar generateUnitNgonPointsFitToSquare = function generateUnitNgonPointsFitToSquare(sides, rotationRadians) {\n var points = generateUnitNgonPoints(sides, rotationRadians);\n points = fitPolygonToSquare(points);\n return points;\n};\nvar fitPolygonToSquare = function fitPolygonToSquare(points) {\n var x, y;\n var sides = points.length / 2;\n var minX = Infinity,\n minY = Infinity,\n maxX = -Infinity,\n maxY = -Infinity;\n for (var i = 0; i < sides; i++) {\n x = points[2 * i];\n y = points[2 * i + 1];\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n\n // stretch factors\n var sx = 2 / (maxX - minX);\n var sy = 2 / (maxY - minY);\n for (var _i4 = 0; _i4 < sides; _i4++) {\n x = points[2 * _i4] = points[2 * _i4] * sx;\n y = points[2 * _i4 + 1] = points[2 * _i4 + 1] * sy;\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n if (minY < -1) {\n for (var _i5 = 0; _i5 < sides; _i5++) {\n y = points[2 * _i5 + 1] = points[2 * _i5 + 1] + (-1 - minY);\n }\n }\n return points;\n};\nvar generateUnitNgonPoints = function generateUnitNgonPoints(sides, rotationRadians) {\n var increment = 1.0 / sides * 2 * Math.PI;\n var startAngle = sides % 2 === 0 ? Math.PI / 2.0 + increment / 2.0 : Math.PI / 2.0;\n startAngle += rotationRadians;\n var points = new Array(sides * 2);\n var currentAngle;\n for (var i = 0; i < sides; i++) {\n currentAngle = i * increment + startAngle;\n points[2 * i] = Math.cos(currentAngle); // x\n points[2 * i + 1] = Math.sin(-currentAngle); // y\n }\n\n return points;\n};\n\n// Set the default radius, unless half of width or height is smaller than default\nvar getRoundRectangleRadius = function getRoundRectangleRadius(width, height) {\n return Math.min(width / 4, height / 4, 8);\n};\n\n// Set the default radius\nvar getRoundPolygonRadius = function getRoundPolygonRadius(width, height) {\n return Math.min(width / 10, height / 10, 8);\n};\nvar getCutRectangleCornerLength = function getCutRectangleCornerLength() {\n return 8;\n};\nvar bezierPtsToQuadCoeff = function bezierPtsToQuadCoeff(p0, p1, p2) {\n return [p0 - 2 * p1 + p2, 2 * (p1 - p0), p0];\n};\n\n// get curve width, height, and control point position offsets as a percentage of node height / width\nvar getBarrelCurveConstants = function getBarrelCurveConstants(width, height) {\n return {\n heightOffset: Math.min(15, 0.05 * height),\n widthOffset: Math.min(100, 0.25 * width),\n ctrlPtOffsetPct: 0.05\n };\n};\n\nvar pageRankDefaults = defaults$g({\n dampingFactor: 0.8,\n precision: 0.000001,\n iterations: 200,\n weight: function weight(edge) {\n return 1;\n }\n});\nvar elesfn$o = {\n pageRank: function pageRank(options) {\n var _pageRankDefaults = pageRankDefaults(options),\n dampingFactor = _pageRankDefaults.dampingFactor,\n precision = _pageRankDefaults.precision,\n iterations = _pageRankDefaults.iterations,\n weight = _pageRankDefaults.weight;\n var cy = this._private.cy;\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n var numNodes = nodes.length;\n var numNodesSqd = numNodes * numNodes;\n var numEdges = edges.length;\n\n // Construct transposed adjacency matrix\n // First lets have a zeroed matrix of the right size\n // We'll also keep track of the sum of each column\n var matrix = new Array(numNodesSqd);\n var columnSum = new Array(numNodes);\n var additionalProb = (1 - dampingFactor) / numNodes;\n\n // Create null matrix\n for (var i = 0; i < numNodes; i++) {\n for (var j = 0; j < numNodes; j++) {\n var n = i * numNodes + j;\n matrix[n] = 0;\n }\n columnSum[i] = 0;\n }\n\n // Now, process edges\n for (var _i = 0; _i < numEdges; _i++) {\n var edge = edges[_i];\n var srcId = edge.data('source');\n var tgtId = edge.data('target');\n\n // Don't include loops in the matrix\n if (srcId === tgtId) {\n continue;\n }\n var s = nodes.indexOfId(srcId);\n var t = nodes.indexOfId(tgtId);\n var w = weight(edge);\n var _n = t * numNodes + s;\n\n // Update matrix\n matrix[_n] += w;\n\n // Update column sum\n columnSum[s] += w;\n }\n\n // Add additional probability based on damping factor\n // Also, take into account columns that have sum = 0\n var p = 1.0 / numNodes + additionalProb; // Shorthand\n\n // Traverse matrix, column by column\n for (var _j = 0; _j < numNodes; _j++) {\n if (columnSum[_j] === 0) {\n // No 'links' out from node jth, assume equal probability for each possible node\n for (var _i2 = 0; _i2 < numNodes; _i2++) {\n var _n2 = _i2 * numNodes + _j;\n matrix[_n2] = p;\n }\n } else {\n // Node jth has outgoing link, compute normalized probabilities\n for (var _i3 = 0; _i3 < numNodes; _i3++) {\n var _n3 = _i3 * numNodes + _j;\n matrix[_n3] = matrix[_n3] / columnSum[_j] + additionalProb;\n }\n }\n }\n\n // Compute dominant eigenvector using power method\n var eigenvector = new Array(numNodes);\n var temp = new Array(numNodes);\n var previous;\n\n // Start with a vector of all 1's\n // Also, initialize a null vector which will be used as shorthand\n for (var _i4 = 0; _i4 < numNodes; _i4++) {\n eigenvector[_i4] = 1;\n }\n for (var iter = 0; iter < iterations; iter++) {\n // Temp array with all 0's\n for (var _i5 = 0; _i5 < numNodes; _i5++) {\n temp[_i5] = 0;\n }\n\n // Multiply matrix with previous result\n for (var _i6 = 0; _i6 < numNodes; _i6++) {\n for (var _j2 = 0; _j2 < numNodes; _j2++) {\n var _n4 = _i6 * numNodes + _j2;\n temp[_i6] += matrix[_n4] * eigenvector[_j2];\n }\n }\n inPlaceSumNormalize(temp);\n previous = eigenvector;\n eigenvector = temp;\n temp = previous;\n var diff = 0;\n // Compute difference (squared module) of both vectors\n for (var _i7 = 0; _i7 < numNodes; _i7++) {\n var delta = previous[_i7] - eigenvector[_i7];\n diff += delta * delta;\n }\n\n // If difference is less than the desired threshold, stop iterating\n if (diff < precision) {\n break;\n }\n }\n\n // Construct result\n var res = {\n rank: function rank(node) {\n node = cy.collection(node)[0];\n return eigenvector[nodes.indexOf(node)];\n }\n };\n return res;\n } // pageRank\n}; // elesfn\n\nvar defaults$f = defaults$g({\n root: null,\n weight: function weight(edge) {\n return 1;\n },\n directed: false,\n alpha: 0\n});\nvar elesfn$n = {\n degreeCentralityNormalized: function degreeCentralityNormalized(options) {\n options = defaults$f(options);\n var cy = this.cy();\n var nodes = this.nodes();\n var numNodes = nodes.length;\n if (!options.directed) {\n var degrees = {};\n var maxDegree = 0;\n for (var i = 0; i < numNodes; i++) {\n var node = nodes[i];\n\n // add current node to the current options object and call degreeCentrality\n options.root = node;\n var currDegree = this.degreeCentrality(options);\n if (maxDegree < currDegree.degree) {\n maxDegree = currDegree.degree;\n }\n degrees[node.id()] = currDegree.degree;\n }\n return {\n degree: function degree(node) {\n if (maxDegree === 0) {\n return 0;\n }\n if (string(node)) {\n // from is a selector string\n node = cy.filter(node);\n }\n return degrees[node.id()] / maxDegree;\n }\n };\n } else {\n var indegrees = {};\n var outdegrees = {};\n var maxIndegree = 0;\n var maxOutdegree = 0;\n for (var _i = 0; _i < numNodes; _i++) {\n var _node = nodes[_i];\n var id = _node.id();\n\n // add current node to the current options object and call degreeCentrality\n options.root = _node;\n var _currDegree = this.degreeCentrality(options);\n if (maxIndegree < _currDegree.indegree) maxIndegree = _currDegree.indegree;\n if (maxOutdegree < _currDegree.outdegree) maxOutdegree = _currDegree.outdegree;\n indegrees[id] = _currDegree.indegree;\n outdegrees[id] = _currDegree.outdegree;\n }\n return {\n indegree: function indegree(node) {\n if (maxIndegree == 0) {\n return 0;\n }\n if (string(node)) {\n // from is a selector string\n node = cy.filter(node);\n }\n return indegrees[node.id()] / maxIndegree;\n },\n outdegree: function outdegree(node) {\n if (maxOutdegree === 0) {\n return 0;\n }\n if (string(node)) {\n // from is a selector string\n node = cy.filter(node);\n }\n return outdegrees[node.id()] / maxOutdegree;\n }\n };\n }\n },\n // degreeCentralityNormalized\n\n // Implemented from the algorithm in Opsahl's paper\n // \"Node centrality in weighted networks: Generalizing degree and shortest paths\"\n // check the heading 2 \"Degree\"\n degreeCentrality: function degreeCentrality(options) {\n options = defaults$f(options);\n var cy = this.cy();\n var callingEles = this;\n var _options = options,\n root = _options.root,\n weight = _options.weight,\n directed = _options.directed,\n alpha = _options.alpha;\n root = cy.collection(root)[0];\n if (!directed) {\n var connEdges = root.connectedEdges().intersection(callingEles);\n var k = connEdges.length;\n var s = 0;\n\n // Now, sum edge weights\n for (var i = 0; i < connEdges.length; i++) {\n s += weight(connEdges[i]);\n }\n return {\n degree: Math.pow(k, 1 - alpha) * Math.pow(s, alpha)\n };\n } else {\n var edges = root.connectedEdges();\n var incoming = edges.filter(function (edge) {\n return edge.target().same(root) && callingEles.has(edge);\n });\n var outgoing = edges.filter(function (edge) {\n return edge.source().same(root) && callingEles.has(edge);\n });\n var k_in = incoming.length;\n var k_out = outgoing.length;\n var s_in = 0;\n var s_out = 0;\n\n // Now, sum incoming edge weights\n for (var _i2 = 0; _i2 < incoming.length; _i2++) {\n s_in += weight(incoming[_i2]);\n }\n\n // Now, sum outgoing edge weights\n for (var _i3 = 0; _i3 < outgoing.length; _i3++) {\n s_out += weight(outgoing[_i3]);\n }\n return {\n indegree: Math.pow(k_in, 1 - alpha) * Math.pow(s_in, alpha),\n outdegree: Math.pow(k_out, 1 - alpha) * Math.pow(s_out, alpha)\n };\n }\n } // degreeCentrality\n}; // elesfn\n\n// nice, short mathematical alias\nelesfn$n.dc = elesfn$n.degreeCentrality;\nelesfn$n.dcn = elesfn$n.degreeCentralityNormalised = elesfn$n.degreeCentralityNormalized;\n\nvar defaults$e = defaults$g({\n harmonic: true,\n weight: function weight() {\n return 1;\n },\n directed: false,\n root: null\n});\nvar elesfn$m = {\n closenessCentralityNormalized: function closenessCentralityNormalized(options) {\n var _defaults = defaults$e(options),\n harmonic = _defaults.harmonic,\n weight = _defaults.weight,\n directed = _defaults.directed;\n var cy = this.cy();\n var closenesses = {};\n var maxCloseness = 0;\n var nodes = this.nodes();\n var fw = this.floydWarshall({\n weight: weight,\n directed: directed\n });\n\n // Compute closeness for every node and find the maximum closeness\n for (var i = 0; i < nodes.length; i++) {\n var currCloseness = 0;\n var node_i = nodes[i];\n for (var j = 0; j < nodes.length; j++) {\n if (i !== j) {\n var d = fw.distance(node_i, nodes[j]);\n if (harmonic) {\n currCloseness += 1 / d;\n } else {\n currCloseness += d;\n }\n }\n }\n if (!harmonic) {\n currCloseness = 1 / currCloseness;\n }\n if (maxCloseness < currCloseness) {\n maxCloseness = currCloseness;\n }\n closenesses[node_i.id()] = currCloseness;\n }\n return {\n closeness: function closeness(node) {\n if (maxCloseness == 0) {\n return 0;\n }\n if (string(node)) {\n // from is a selector string\n node = cy.filter(node)[0].id();\n } else {\n // from is a node\n node = node.id();\n }\n return closenesses[node] / maxCloseness;\n }\n };\n },\n // Implemented from pseudocode from wikipedia\n closenessCentrality: function closenessCentrality(options) {\n var _defaults2 = defaults$e(options),\n root = _defaults2.root,\n weight = _defaults2.weight,\n directed = _defaults2.directed,\n harmonic = _defaults2.harmonic;\n root = this.filter(root)[0];\n\n // we need distance from this node to every other node\n var dijkstra = this.dijkstra({\n root: root,\n weight: weight,\n directed: directed\n });\n var totalDistance = 0;\n var nodes = this.nodes();\n for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n if (!n.same(root)) {\n var d = dijkstra.distanceTo(n);\n if (harmonic) {\n totalDistance += 1 / d;\n } else {\n totalDistance += d;\n }\n }\n }\n return harmonic ? totalDistance : 1 / totalDistance;\n } // closenessCentrality\n}; // elesfn\n\n// nice, short mathematical alias\nelesfn$m.cc = elesfn$m.closenessCentrality;\nelesfn$m.ccn = elesfn$m.closenessCentralityNormalised = elesfn$m.closenessCentralityNormalized;\n\nvar defaults$d = defaults$g({\n weight: null,\n directed: false\n});\nvar elesfn$l = {\n // Implemented from the algorithm in the paper \"On Variants of Shortest-Path Betweenness Centrality and their Generic Computation\" by Ulrik Brandes\n betweennessCentrality: function betweennessCentrality(options) {\n var _defaults = defaults$d(options),\n directed = _defaults.directed,\n weight = _defaults.weight;\n var weighted = weight != null;\n var cy = this.cy();\n\n // starting\n var V = this.nodes();\n var A = {};\n var _C = {};\n var max = 0;\n var C = {\n set: function set(key, val) {\n _C[key] = val;\n if (val > max) {\n max = val;\n }\n },\n get: function get(key) {\n return _C[key];\n }\n };\n\n // A contains the neighborhoods of every node\n for (var i = 0; i < V.length; i++) {\n var v = V[i];\n var vid = v.id();\n if (directed) {\n A[vid] = v.outgoers().nodes(); // get outgoers of every node\n } else {\n A[vid] = v.openNeighborhood().nodes(); // get neighbors of every node\n }\n\n C.set(vid, 0);\n }\n var _loop = function _loop(s) {\n var sid = V[s].id();\n var S = []; // stack\n var P = {};\n var g = {};\n var d = {};\n var Q = new heap(function (a, b) {\n return d[a] - d[b];\n }); // queue\n\n // init dictionaries\n for (var _i = 0; _i < V.length; _i++) {\n var _vid = V[_i].id();\n P[_vid] = [];\n g[_vid] = 0;\n d[_vid] = Infinity;\n }\n g[sid] = 1; // sigma\n d[sid] = 0; // distance to s\n\n Q.push(sid);\n while (!Q.empty()) {\n var _v = Q.pop();\n S.push(_v);\n if (weighted) {\n for (var j = 0; j < A[_v].length; j++) {\n var w = A[_v][j];\n var vEle = cy.getElementById(_v);\n var edge = void 0;\n if (vEle.edgesTo(w).length > 0) {\n edge = vEle.edgesTo(w)[0];\n } else {\n edge = w.edgesTo(vEle)[0];\n }\n var edgeWeight = weight(edge);\n w = w.id();\n if (d[w] > d[_v] + edgeWeight) {\n d[w] = d[_v] + edgeWeight;\n if (Q.nodes.indexOf(w) < 0) {\n //if w is not in Q\n Q.push(w);\n } else {\n // update position if w is in Q\n Q.updateItem(w);\n }\n g[w] = 0;\n P[w] = [];\n }\n if (d[w] == d[_v] + edgeWeight) {\n g[w] = g[w] + g[_v];\n P[w].push(_v);\n }\n }\n } else {\n for (var _j = 0; _j < A[_v].length; _j++) {\n var _w = A[_v][_j].id();\n if (d[_w] == Infinity) {\n Q.push(_w);\n d[_w] = d[_v] + 1;\n }\n if (d[_w] == d[_v] + 1) {\n g[_w] = g[_w] + g[_v];\n P[_w].push(_v);\n }\n }\n }\n }\n var e = {};\n for (var _i2 = 0; _i2 < V.length; _i2++) {\n e[V[_i2].id()] = 0;\n }\n while (S.length > 0) {\n var _w2 = S.pop();\n for (var _j2 = 0; _j2 < P[_w2].length; _j2++) {\n var _v2 = P[_w2][_j2];\n e[_v2] = e[_v2] + g[_v2] / g[_w2] * (1 + e[_w2]);\n }\n if (_w2 != V[s].id()) {\n C.set(_w2, C.get(_w2) + e[_w2]);\n }\n }\n };\n for (var s = 0; s < V.length; s++) {\n _loop(s);\n }\n var ret = {\n betweenness: function betweenness(node) {\n var id = cy.collection(node).id();\n return C.get(id);\n },\n betweennessNormalized: function betweennessNormalized(node) {\n if (max == 0) {\n return 0;\n }\n var id = cy.collection(node).id();\n return C.get(id) / max;\n }\n };\n\n // alias\n ret.betweennessNormalised = ret.betweennessNormalized;\n return ret;\n } // betweennessCentrality\n}; // elesfn\n\n// nice, short mathematical alias\nelesfn$l.bc = elesfn$l.betweennessCentrality;\n\n// Implemented by Zoe Xi @zoexi for GSOC 2016\n\n/* eslint-disable no-unused-vars */\nvar defaults$c = defaults$g({\n expandFactor: 2,\n // affects time of computation and cluster granularity to some extent: M * M\n inflateFactor: 2,\n // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j)\n multFactor: 1,\n // optional self loops for each node. Use a neutral value to improve cluster computations.\n maxIterations: 20,\n // maximum number of iterations of the MCL algorithm in a single run\n attributes: [\n // attributes/features used to group nodes, ie. similarity values between nodes\n function (edge) {\n return 1;\n }]\n});\n/* eslint-enable */\n\nvar setOptions$3 = function setOptions(options) {\n return defaults$c(options);\n};\n/* eslint-enable */\n\nvar getSimilarity$1 = function getSimilarity(edge, attributes) {\n var total = 0;\n for (var i = 0; i < attributes.length; i++) {\n total += attributes[i](edge);\n }\n return total;\n};\nvar addLoops = function addLoops(M, n, val) {\n for (var i = 0; i < n; i++) {\n M[i * n + i] = val;\n }\n};\nvar normalize = function normalize(M, n) {\n var sum;\n for (var col = 0; col < n; col++) {\n sum = 0;\n for (var row = 0; row < n; row++) {\n sum += M[row * n + col];\n }\n for (var _row = 0; _row < n; _row++) {\n M[_row * n + col] = M[_row * n + col] / sum;\n }\n }\n};\n\n// TODO: blocked matrix multiplication?\nvar mmult = function mmult(A, B, n) {\n var C = new Array(n * n);\n for (var i = 0; i < n; i++) {\n for (var j = 0; j < n; j++) {\n C[i * n + j] = 0;\n }\n for (var k = 0; k < n; k++) {\n for (var _j = 0; _j < n; _j++) {\n C[i * n + _j] += A[i * n + k] * B[k * n + _j];\n }\n }\n }\n return C;\n};\nvar expand = function expand(M, n, expandFactor /** power **/) {\n var _M = M.slice(0);\n for (var p = 1; p < expandFactor; p++) {\n M = mmult(M, _M, n);\n }\n return M;\n};\nvar inflate = function inflate(M, n, inflateFactor /** r **/) {\n var _M = new Array(n * n);\n\n // M(i,j) ^ inflatePower\n for (var i = 0; i < n * n; i++) {\n _M[i] = Math.pow(M[i], inflateFactor);\n }\n normalize(_M, n);\n return _M;\n};\nvar hasConverged = function hasConverged(M, _M, n2, roundFactor) {\n // Check that both matrices have the same elements (i,j)\n for (var i = 0; i < n2; i++) {\n var v1 = Math.round(M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); // truncate to 'roundFactor' decimal places\n var v2 = Math.round(_M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor);\n if (v1 !== v2) {\n return false;\n }\n }\n return true;\n};\nvar assign$2 = function assign(M, n, nodes, cy) {\n var clusters = [];\n for (var i = 0; i < n; i++) {\n var cluster = [];\n for (var j = 0; j < n; j++) {\n // Row-wise attractors and elements that they attract belong in same cluster\n if (Math.round(M[i * n + j] * 1000) / 1000 > 0) {\n cluster.push(nodes[j]);\n }\n }\n if (cluster.length !== 0) {\n clusters.push(cy.collection(cluster));\n }\n }\n return clusters;\n};\nvar isDuplicate = function isDuplicate(c1, c2) {\n for (var i = 0; i < c1.length; i++) {\n if (!c2[i] || c1[i].id() !== c2[i].id()) {\n return false;\n }\n }\n return true;\n};\nvar removeDuplicates = function removeDuplicates(clusters) {\n for (var i = 0; i < clusters.length; i++) {\n for (var j = 0; j < clusters.length; j++) {\n if (i != j && isDuplicate(clusters[i], clusters[j])) {\n clusters.splice(j, 1);\n }\n }\n }\n return clusters;\n};\nvar markovClustering = function markovClustering(options) {\n var nodes = this.nodes();\n var edges = this.edges();\n var cy = this.cy();\n\n // Set parameters of algorithm:\n var opts = setOptions$3(options);\n\n // Map each node to its position in node array\n var id2position = {};\n for (var i = 0; i < nodes.length; i++) {\n id2position[nodes[i].id()] = i;\n }\n\n // Generate stochastic matrix M from input graph G (should be symmetric/undirected)\n var n = nodes.length,\n n2 = n * n;\n var M = new Array(n2),\n _M;\n for (var _i = 0; _i < n2; _i++) {\n M[_i] = 0;\n }\n for (var e = 0; e < edges.length; e++) {\n var edge = edges[e];\n var _i2 = id2position[edge.source().id()];\n var j = id2position[edge.target().id()];\n var sim = getSimilarity$1(edge, opts.attributes);\n M[_i2 * n + j] += sim; // G should be symmetric and undirected\n M[j * n + _i2] += sim;\n }\n\n // Begin Markov cluster algorithm\n\n // Step 1: Add self loops to each node, ie. add multFactor to matrix diagonal\n addLoops(M, n, opts.multFactor);\n\n // Step 2: M = normalize( M );\n normalize(M, n);\n var isStillMoving = true;\n var iterations = 0;\n while (isStillMoving && iterations < opts.maxIterations) {\n isStillMoving = false;\n\n // Step 3:\n _M = expand(M, n, opts.expandFactor);\n\n // Step 4:\n M = inflate(_M, n, opts.inflateFactor);\n\n // Step 5: check to see if ~steady state has been reached\n if (!hasConverged(M, _M, n2, 4)) {\n isStillMoving = true;\n }\n iterations++;\n }\n\n // Build clusters from matrix\n var clusters = assign$2(M, n, nodes, cy);\n\n // Remove duplicate clusters due to symmetry of graph and M matrix\n clusters = removeDuplicates(clusters);\n return clusters;\n};\nvar markovClustering$1 = {\n markovClustering: markovClustering,\n mcl: markovClustering\n};\n\n// Common distance metrics for clustering algorithms\nvar identity = function identity(x) {\n return x;\n};\nvar absDiff = function absDiff(p, q) {\n return Math.abs(q - p);\n};\nvar addAbsDiff = function addAbsDiff(total, p, q) {\n return total + absDiff(p, q);\n};\nvar addSquaredDiff = function addSquaredDiff(total, p, q) {\n return total + Math.pow(q - p, 2);\n};\nvar sqrt = function sqrt(x) {\n return Math.sqrt(x);\n};\nvar maxAbsDiff = function maxAbsDiff(currentMax, p, q) {\n return Math.max(currentMax, absDiff(p, q));\n};\nvar getDistance = function getDistance(length, getP, getQ, init, visit) {\n var post = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : identity;\n var ret = init;\n var p, q;\n for (var dim = 0; dim < length; dim++) {\n p = getP(dim);\n q = getQ(dim);\n ret = visit(ret, p, q);\n }\n return post(ret);\n};\nvar distances = {\n euclidean: function euclidean(length, getP, getQ) {\n if (length >= 2) {\n return getDistance(length, getP, getQ, 0, addSquaredDiff, sqrt);\n } else {\n // for single attr case, more efficient to avoid sqrt\n return getDistance(length, getP, getQ, 0, addAbsDiff);\n }\n },\n squaredEuclidean: function squaredEuclidean(length, getP, getQ) {\n return getDistance(length, getP, getQ, 0, addSquaredDiff);\n },\n manhattan: function manhattan(length, getP, getQ) {\n return getDistance(length, getP, getQ, 0, addAbsDiff);\n },\n max: function max(length, getP, getQ) {\n return getDistance(length, getP, getQ, -Infinity, maxAbsDiff);\n }\n};\n\n// in case the user accidentally doesn't use camel case\ndistances['squared-euclidean'] = distances['squaredEuclidean'];\ndistances['squaredeuclidean'] = distances['squaredEuclidean'];\nfunction clusteringDistance (method, length, getP, getQ, nodeP, nodeQ) {\n var impl;\n if (fn$6(method)) {\n impl = method;\n } else {\n impl = distances[method] || distances.euclidean;\n }\n if (length === 0 && fn$6(method)) {\n return impl(nodeP, nodeQ);\n } else {\n return impl(length, getP, getQ, nodeP, nodeQ);\n }\n}\n\nvar defaults$b = defaults$g({\n k: 2,\n m: 2,\n sensitivityThreshold: 0.0001,\n distance: 'euclidean',\n maxIterations: 10,\n attributes: [],\n testMode: false,\n testCentroids: null\n});\nvar setOptions$2 = function setOptions(options) {\n return defaults$b(options);\n};\n\nvar getDist = function getDist(type, node, centroid, attributes, mode) {\n var noNodeP = mode !== 'kMedoids';\n var getP = noNodeP ? function (i) {\n return centroid[i];\n } : function (i) {\n return attributes[i](centroid);\n };\n var getQ = function getQ(i) {\n return attributes[i](node);\n };\n var nodeP = centroid;\n var nodeQ = node;\n return clusteringDistance(type, attributes.length, getP, getQ, nodeP, nodeQ);\n};\nvar randomCentroids = function randomCentroids(nodes, k, attributes) {\n var ndim = attributes.length;\n var min = new Array(ndim);\n var max = new Array(ndim);\n var centroids = new Array(k);\n var centroid = null;\n\n // Find min, max values for each attribute dimension\n for (var i = 0; i < ndim; i++) {\n min[i] = nodes.min(attributes[i]).value;\n max[i] = nodes.max(attributes[i]).value;\n }\n\n // Build k centroids, each represented as an n-dim feature vector\n for (var c = 0; c < k; c++) {\n centroid = [];\n for (var _i = 0; _i < ndim; _i++) {\n centroid[_i] = Math.random() * (max[_i] - min[_i]) + min[_i]; // random initial value\n }\n\n centroids[c] = centroid;\n }\n return centroids;\n};\nvar classify = function classify(node, centroids, distance, attributes, type) {\n var min = Infinity;\n var index = 0;\n for (var i = 0; i < centroids.length; i++) {\n var dist = getDist(distance, node, centroids[i], attributes, type);\n if (dist < min) {\n min = dist;\n index = i;\n }\n }\n return index;\n};\nvar buildCluster = function buildCluster(centroid, nodes, assignment) {\n var cluster = [];\n var node = null;\n for (var n = 0; n < nodes.length; n++) {\n node = nodes[n];\n if (assignment[node.id()] === centroid) {\n //console.log(\"Node \" + node.id() + \" is associated with medoid #: \" + m);\n cluster.push(node);\n }\n }\n return cluster;\n};\nvar haveValuesConverged = function haveValuesConverged(v1, v2, sensitivityThreshold) {\n return Math.abs(v2 - v1) <= sensitivityThreshold;\n};\nvar haveMatricesConverged = function haveMatricesConverged(v1, v2, sensitivityThreshold) {\n for (var i = 0; i < v1.length; i++) {\n for (var j = 0; j < v1[i].length; j++) {\n var diff = Math.abs(v1[i][j] - v2[i][j]);\n if (diff > sensitivityThreshold) {\n return false;\n }\n }\n }\n return true;\n};\nvar seenBefore = function seenBefore(node, medoids, n) {\n for (var i = 0; i < n; i++) {\n if (node === medoids[i]) return true;\n }\n return false;\n};\nvar randomMedoids = function randomMedoids(nodes, k) {\n var medoids = new Array(k);\n\n // For small data sets, the probability of medoid conflict is greater,\n // so we need to check to see if we've already seen or chose this node before.\n if (nodes.length < 50) {\n // Randomly select k medoids from the n nodes\n for (var i = 0; i < k; i++) {\n var node = nodes[Math.floor(Math.random() * nodes.length)];\n\n // If we've already chosen this node to be a medoid, don't choose it again (for small data sets).\n // Instead choose a different random node.\n while (seenBefore(node, medoids, i)) {\n node = nodes[Math.floor(Math.random() * nodes.length)];\n }\n medoids[i] = node;\n }\n } else {\n // Relatively large data set, so pretty safe to not check and just select random nodes\n for (var _i2 = 0; _i2 < k; _i2++) {\n medoids[_i2] = nodes[Math.floor(Math.random() * nodes.length)];\n }\n }\n return medoids;\n};\nvar findCost = function findCost(potentialNewMedoid, cluster, attributes) {\n var cost = 0;\n for (var n = 0; n < cluster.length; n++) {\n cost += getDist('manhattan', cluster[n], potentialNewMedoid, attributes, 'kMedoids');\n }\n return cost;\n};\nvar kMeans = function kMeans(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n var node = null;\n\n // Set parameters of algorithm: # of clusters, distance metric, etc.\n var opts = setOptions$2(options);\n\n // Begin k-means algorithm\n var clusters = new Array(opts.k);\n var assignment = {};\n var centroids;\n\n // Step 1: Initialize centroid positions\n if (opts.testMode) {\n if (typeof opts.testCentroids === 'number') {\n // TODO: implement a seeded random number generator.\n opts.testCentroids;\n centroids = randomCentroids(nodes, opts.k, opts.attributes);\n } else if (_typeof(opts.testCentroids) === 'object') {\n centroids = opts.testCentroids;\n } else {\n centroids = randomCentroids(nodes, opts.k, opts.attributes);\n }\n } else {\n centroids = randomCentroids(nodes, opts.k, opts.attributes);\n }\n var isStillMoving = true;\n var iterations = 0;\n while (isStillMoving && iterations < opts.maxIterations) {\n // Step 2: Assign nodes to the nearest centroid\n for (var n = 0; n < nodes.length; n++) {\n node = nodes[n];\n // Determine which cluster this node belongs to: node id => cluster #\n assignment[node.id()] = classify(node, centroids, opts.distance, opts.attributes, 'kMeans');\n }\n\n // Step 3: For each of the k clusters, update its centroid\n isStillMoving = false;\n for (var c = 0; c < opts.k; c++) {\n // Get all nodes that belong to this cluster\n var cluster = buildCluster(c, nodes, assignment);\n if (cluster.length === 0) {\n // If cluster is empty, break out early & move to next cluster\n continue;\n }\n\n // Update centroids by calculating avg of all nodes within the cluster.\n var ndim = opts.attributes.length;\n var centroid = centroids[c]; // [ dim_1, dim_2, dim_3, ... , dim_n ]\n var newCentroid = new Array(ndim);\n var sum = new Array(ndim);\n for (var d = 0; d < ndim; d++) {\n sum[d] = 0.0;\n for (var i = 0; i < cluster.length; i++) {\n node = cluster[i];\n sum[d] += opts.attributes[d](node);\n }\n newCentroid[d] = sum[d] / cluster.length;\n\n // Check to see if algorithm has converged, i.e. when centroids no longer change\n if (!haveValuesConverged(newCentroid[d], centroid[d], opts.sensitivityThreshold)) {\n isStillMoving = true;\n }\n }\n centroids[c] = newCentroid;\n clusters[c] = cy.collection(cluster);\n }\n iterations++;\n }\n return clusters;\n};\nvar kMedoids = function kMedoids(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n var node = null;\n var opts = setOptions$2(options);\n\n // Begin k-medoids algorithm\n var clusters = new Array(opts.k);\n var medoids;\n var assignment = {};\n var curCost;\n var minCosts = new Array(opts.k); // minimum cost configuration for each cluster\n\n // Step 1: Initialize k medoids\n if (opts.testMode) {\n if (typeof opts.testCentroids === 'number') ; else if (_typeof(opts.testCentroids) === 'object') {\n medoids = opts.testCentroids;\n } else {\n medoids = randomMedoids(nodes, opts.k);\n }\n } else {\n medoids = randomMedoids(nodes, opts.k);\n }\n var isStillMoving = true;\n var iterations = 0;\n while (isStillMoving && iterations < opts.maxIterations) {\n // Step 2: Assign nodes to the nearest medoid\n for (var n = 0; n < nodes.length; n++) {\n node = nodes[n];\n // Determine which cluster this node belongs to: node id => cluster #\n assignment[node.id()] = classify(node, medoids, opts.distance, opts.attributes, 'kMedoids');\n }\n isStillMoving = false;\n // Step 3: For each medoid m, and for each node associated with mediod m,\n // select the node with the lowest configuration cost as new medoid.\n for (var m = 0; m < medoids.length; m++) {\n // Get all nodes that belong to this medoid\n var cluster = buildCluster(m, nodes, assignment);\n if (cluster.length === 0) {\n // If cluster is empty, break out early & move to next cluster\n continue;\n }\n minCosts[m] = findCost(medoids[m], cluster, opts.attributes); // original cost\n\n // Select different medoid if its configuration has the lowest cost\n for (var _n = 0; _n < cluster.length; _n++) {\n curCost = findCost(cluster[_n], cluster, opts.attributes);\n if (curCost < minCosts[m]) {\n minCosts[m] = curCost;\n medoids[m] = cluster[_n];\n isStillMoving = true;\n }\n }\n clusters[m] = cy.collection(cluster);\n }\n iterations++;\n }\n return clusters;\n};\nvar updateCentroids = function updateCentroids(centroids, nodes, U, weight, opts) {\n var numerator, denominator;\n for (var n = 0; n < nodes.length; n++) {\n for (var c = 0; c < centroids.length; c++) {\n weight[n][c] = Math.pow(U[n][c], opts.m);\n }\n }\n for (var _c = 0; _c < centroids.length; _c++) {\n for (var dim = 0; dim < opts.attributes.length; dim++) {\n numerator = 0;\n denominator = 0;\n for (var _n2 = 0; _n2 < nodes.length; _n2++) {\n numerator += weight[_n2][_c] * opts.attributes[dim](nodes[_n2]);\n denominator += weight[_n2][_c];\n }\n centroids[_c][dim] = numerator / denominator;\n }\n }\n};\nvar updateMembership = function updateMembership(U, _U, centroids, nodes, opts) {\n // Save previous step\n for (var i = 0; i < U.length; i++) {\n _U[i] = U[i].slice();\n }\n var sum, numerator, denominator;\n var pow = 2 / (opts.m - 1);\n for (var c = 0; c < centroids.length; c++) {\n for (var n = 0; n < nodes.length; n++) {\n sum = 0;\n for (var k = 0; k < centroids.length; k++) {\n // against all other centroids\n numerator = getDist(opts.distance, nodes[n], centroids[c], opts.attributes, 'cmeans');\n denominator = getDist(opts.distance, nodes[n], centroids[k], opts.attributes, 'cmeans');\n sum += Math.pow(numerator / denominator, pow);\n }\n U[n][c] = 1 / sum;\n }\n }\n};\nvar assign$1 = function assign(nodes, U, opts, cy) {\n var clusters = new Array(opts.k);\n for (var c = 0; c < clusters.length; c++) {\n clusters[c] = [];\n }\n var max;\n var index;\n for (var n = 0; n < U.length; n++) {\n // for each node (U is N x C matrix)\n max = -Infinity;\n index = -1;\n // Determine which cluster the node is most likely to belong in\n for (var _c2 = 0; _c2 < U[0].length; _c2++) {\n if (U[n][_c2] > max) {\n max = U[n][_c2];\n index = _c2;\n }\n }\n clusters[index].push(nodes[n]);\n }\n\n // Turn every array into a collection of nodes\n for (var _c3 = 0; _c3 < clusters.length; _c3++) {\n clusters[_c3] = cy.collection(clusters[_c3]);\n }\n return clusters;\n};\nvar fuzzyCMeans = function fuzzyCMeans(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n var opts = setOptions$2(options);\n\n // Begin fuzzy c-means algorithm\n var clusters;\n var centroids;\n var U;\n var _U;\n var weight;\n\n // Step 1: Initialize letiables.\n _U = new Array(nodes.length);\n for (var i = 0; i < nodes.length; i++) {\n // N x C matrix\n _U[i] = new Array(opts.k);\n }\n U = new Array(nodes.length);\n for (var _i3 = 0; _i3 < nodes.length; _i3++) {\n // N x C matrix\n U[_i3] = new Array(opts.k);\n }\n for (var _i4 = 0; _i4 < nodes.length; _i4++) {\n var total = 0;\n for (var j = 0; j < opts.k; j++) {\n U[_i4][j] = Math.random();\n total += U[_i4][j];\n }\n for (var _j = 0; _j < opts.k; _j++) {\n U[_i4][_j] = U[_i4][_j] / total;\n }\n }\n centroids = new Array(opts.k);\n for (var _i5 = 0; _i5 < opts.k; _i5++) {\n centroids[_i5] = new Array(opts.attributes.length);\n }\n weight = new Array(nodes.length);\n for (var _i6 = 0; _i6 < nodes.length; _i6++) {\n // N x C matrix\n weight[_i6] = new Array(opts.k);\n }\n // end init FCM\n\n var isStillMoving = true;\n var iterations = 0;\n while (isStillMoving && iterations < opts.maxIterations) {\n isStillMoving = false;\n\n // Step 2: Calculate the centroids for each step.\n updateCentroids(centroids, nodes, U, weight, opts);\n\n // Step 3: Update the partition matrix U.\n updateMembership(U, _U, centroids, nodes, opts);\n\n // Step 4: Check for convergence.\n if (!haveMatricesConverged(U, _U, opts.sensitivityThreshold)) {\n isStillMoving = true;\n }\n iterations++;\n }\n\n // Assign nodes to clusters with highest probability.\n clusters = assign$1(nodes, U, opts, cy);\n return {\n clusters: clusters,\n degreeOfMembership: U\n };\n};\nvar kClustering = {\n kMeans: kMeans,\n kMedoids: kMedoids,\n fuzzyCMeans: fuzzyCMeans,\n fcm: fuzzyCMeans\n};\n\n// Implemented by Zoe Xi @zoexi for GSOC 2016\nvar defaults$a = defaults$g({\n distance: 'euclidean',\n // distance metric to compare nodes\n linkage: 'min',\n // linkage criterion : how to determine the distance between clusters of nodes\n mode: 'threshold',\n // mode:'threshold' => clusters must be threshold distance apart\n threshold: Infinity,\n // the distance threshold\n // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters\n addDendrogram: false,\n // whether to add the dendrogram to the graph for viz\n dendrogramDepth: 0,\n // depth at which dendrogram branches are merged into the returned clusters\n attributes: [] // array of attr functions\n});\n\nvar linkageAliases = {\n 'single': 'min',\n 'complete': 'max'\n};\nvar setOptions$1 = function setOptions(options) {\n var opts = defaults$a(options);\n var preferredAlias = linkageAliases[opts.linkage];\n if (preferredAlias != null) {\n opts.linkage = preferredAlias;\n }\n return opts;\n};\nvar mergeClosest = function mergeClosest(clusters, index, dists, mins, opts) {\n // Find two closest clusters from cached mins\n var minKey = 0;\n var min = Infinity;\n var dist;\n var attrs = opts.attributes;\n var getDist = function getDist(n1, n2) {\n return clusteringDistance(opts.distance, attrs.length, function (i) {\n return attrs[i](n1);\n }, function (i) {\n return attrs[i](n2);\n }, n1, n2);\n };\n for (var i = 0; i < clusters.length; i++) {\n var key = clusters[i].key;\n var _dist = dists[key][mins[key]];\n if (_dist < min) {\n minKey = key;\n min = _dist;\n }\n }\n if (opts.mode === 'threshold' && min >= opts.threshold || opts.mode === 'dendrogram' && clusters.length === 1) {\n return false;\n }\n var c1 = index[minKey];\n var c2 = index[mins[minKey]];\n var merged;\n\n // Merge two closest clusters\n if (opts.mode === 'dendrogram') {\n merged = {\n left: c1,\n right: c2,\n key: c1.key\n };\n } else {\n merged = {\n value: c1.value.concat(c2.value),\n key: c1.key\n };\n }\n clusters[c1.index] = merged;\n clusters.splice(c2.index, 1);\n index[c1.key] = merged;\n\n // Update distances with new merged cluster\n for (var _i = 0; _i < clusters.length; _i++) {\n var cur = clusters[_i];\n if (c1.key === cur.key) {\n dist = Infinity;\n } else if (opts.linkage === 'min') {\n dist = dists[c1.key][cur.key];\n if (dists[c1.key][cur.key] > dists[c2.key][cur.key]) {\n dist = dists[c2.key][cur.key];\n }\n } else if (opts.linkage === 'max') {\n dist = dists[c1.key][cur.key];\n if (dists[c1.key][cur.key] < dists[c2.key][cur.key]) {\n dist = dists[c2.key][cur.key];\n }\n } else if (opts.linkage === 'mean') {\n dist = (dists[c1.key][cur.key] * c1.size + dists[c2.key][cur.key] * c2.size) / (c1.size + c2.size);\n } else {\n if (opts.mode === 'dendrogram') dist = getDist(cur.value, c1.value);else dist = getDist(cur.value[0], c1.value[0]);\n }\n dists[c1.key][cur.key] = dists[cur.key][c1.key] = dist; // distance matrix is symmetric\n }\n\n // Update cached mins\n for (var _i2 = 0; _i2 < clusters.length; _i2++) {\n var key1 = clusters[_i2].key;\n if (mins[key1] === c1.key || mins[key1] === c2.key) {\n var _min = key1;\n for (var j = 0; j < clusters.length; j++) {\n var key2 = clusters[j].key;\n if (dists[key1][key2] < dists[key1][_min]) {\n _min = key2;\n }\n }\n mins[key1] = _min;\n }\n clusters[_i2].index = _i2;\n }\n\n // Clean up meta data used for clustering\n c1.key = c2.key = c1.index = c2.index = null;\n return true;\n};\nvar getAllChildren = function getAllChildren(root, arr, cy) {\n if (!root) return;\n if (root.value) {\n arr.push(root.value);\n } else {\n if (root.left) getAllChildren(root.left, arr);\n if (root.right) getAllChildren(root.right, arr);\n }\n};\nvar buildDendrogram = function buildDendrogram(root, cy) {\n if (!root) return '';\n if (root.left && root.right) {\n var leftStr = buildDendrogram(root.left, cy);\n var rightStr = buildDendrogram(root.right, cy);\n var node = cy.add({\n group: 'nodes',\n data: {\n id: leftStr + ',' + rightStr\n }\n });\n cy.add({\n group: 'edges',\n data: {\n source: leftStr,\n target: node.id()\n }\n });\n cy.add({\n group: 'edges',\n data: {\n source: rightStr,\n target: node.id()\n }\n });\n return node.id();\n } else if (root.value) {\n return root.value.id();\n }\n};\nvar buildClustersFromTree = function buildClustersFromTree(root, k, cy) {\n if (!root) return [];\n var left = [],\n right = [],\n leaves = [];\n if (k === 0) {\n // don't cut tree, simply return all nodes as 1 single cluster\n if (root.left) getAllChildren(root.left, left);\n if (root.right) getAllChildren(root.right, right);\n leaves = left.concat(right);\n return [cy.collection(leaves)];\n } else if (k === 1) {\n // cut at root\n\n if (root.value) {\n // leaf node\n return [cy.collection(root.value)];\n } else {\n if (root.left) getAllChildren(root.left, left);\n if (root.right) getAllChildren(root.right, right);\n return [cy.collection(left), cy.collection(right)];\n }\n } else {\n if (root.value) {\n return [cy.collection(root.value)];\n } else {\n if (root.left) left = buildClustersFromTree(root.left, k - 1, cy);\n if (root.right) right = buildClustersFromTree(root.right, k - 1, cy);\n return left.concat(right);\n }\n }\n};\n\nvar hierarchicalClustering = function hierarchicalClustering(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n\n // Set parameters of algorithm: linkage type, distance metric, etc.\n var opts = setOptions$1(options);\n var attrs = opts.attributes;\n var getDist = function getDist(n1, n2) {\n return clusteringDistance(opts.distance, attrs.length, function (i) {\n return attrs[i](n1);\n }, function (i) {\n return attrs[i](n2);\n }, n1, n2);\n };\n\n // Begin hierarchical algorithm\n var clusters = [];\n var dists = []; // distances between each pair of clusters\n var mins = []; // closest cluster for each cluster\n var index = []; // hash of all clusters by key\n\n // In agglomerative (bottom-up) clustering, each node starts as its own cluster\n for (var n = 0; n < nodes.length; n++) {\n var cluster = {\n value: opts.mode === 'dendrogram' ? nodes[n] : [nodes[n]],\n key: n,\n index: n\n };\n clusters[n] = cluster;\n index[n] = cluster;\n dists[n] = [];\n mins[n] = 0;\n }\n\n // Calculate the distance between each pair of clusters\n for (var i = 0; i < clusters.length; i++) {\n for (var j = 0; j <= i; j++) {\n var dist = void 0;\n if (opts.mode === 'dendrogram') {\n // modes store cluster values differently\n dist = i === j ? Infinity : getDist(clusters[i].value, clusters[j].value);\n } else {\n dist = i === j ? Infinity : getDist(clusters[i].value[0], clusters[j].value[0]);\n }\n dists[i][j] = dist;\n dists[j][i] = dist;\n if (dist < dists[i][mins[i]]) {\n mins[i] = j; // Cache mins: closest cluster to cluster i is cluster j\n }\n }\n }\n\n // Find the closest pair of clusters and merge them into a single cluster.\n // Update distances between new cluster and each of the old clusters, and loop until threshold reached.\n var merged = mergeClosest(clusters, index, dists, mins, opts);\n while (merged) {\n merged = mergeClosest(clusters, index, dists, mins, opts);\n }\n var retClusters;\n\n // Dendrogram mode builds the hierarchy and adds intermediary nodes + edges\n // in addition to returning the clusters.\n if (opts.mode === 'dendrogram') {\n retClusters = buildClustersFromTree(clusters[0], opts.dendrogramDepth, cy);\n if (opts.addDendrogram) buildDendrogram(clusters[0], cy);\n } else {\n // Regular mode simply returns the clusters\n\n retClusters = new Array(clusters.length);\n clusters.forEach(function (cluster, i) {\n // Clean up meta data used for clustering\n cluster.key = cluster.index = null;\n retClusters[i] = cy.collection(cluster.value);\n });\n }\n return retClusters;\n};\nvar hierarchicalClustering$1 = {\n hierarchicalClustering: hierarchicalClustering,\n hca: hierarchicalClustering\n};\n\n// Implemented by Zoe Xi @zoexi for GSOC 2016\nvar defaults$9 = defaults$g({\n distance: 'euclidean',\n // distance metric to compare attributes between two nodes\n preference: 'median',\n // suitability of a data point to serve as an exemplar\n damping: 0.8,\n // damping factor between [0.5, 1)\n maxIterations: 1000,\n // max number of iterations to run\n minIterations: 100,\n // min number of iterations to run in order for clustering to stop\n attributes: [// functions to quantify the similarity between any two points\n // e.g. node => node.data('weight')\n ]\n});\nvar setOptions = function setOptions(options) {\n var dmp = options.damping;\n var pref = options.preference;\n if (!(0.5 <= dmp && dmp < 1)) {\n error(\"Damping must range on [0.5, 1). Got: \".concat(dmp));\n }\n var validPrefs = ['median', 'mean', 'min', 'max'];\n if (!(validPrefs.some(function (v) {\n return v === pref;\n }) || number$1(pref))) {\n error(\"Preference must be one of [\".concat(validPrefs.map(function (p) {\n return \"'\".concat(p, \"'\");\n }).join(', '), \"] or a number. Got: \").concat(pref));\n }\n return defaults$9(options);\n};\n\nvar getSimilarity = function getSimilarity(type, n1, n2, attributes) {\n var attr = function attr(n, i) {\n return attributes[i](n);\n };\n\n // nb negative because similarity should have an inverse relationship to distance\n return -clusteringDistance(type, attributes.length, function (i) {\n return attr(n1, i);\n }, function (i) {\n return attr(n2, i);\n }, n1, n2);\n};\nvar getPreference = function getPreference(S, preference) {\n // larger preference = greater # of clusters\n var p = null;\n if (preference === 'median') {\n p = median(S);\n } else if (preference === 'mean') {\n p = mean(S);\n } else if (preference === 'min') {\n p = min(S);\n } else if (preference === 'max') {\n p = max(S);\n } else {\n // Custom preference number, as set by user\n p = preference;\n }\n return p;\n};\nvar findExemplars = function findExemplars(n, R, A) {\n var indices = [];\n for (var i = 0; i < n; i++) {\n if (R[i * n + i] + A[i * n + i] > 0) {\n indices.push(i);\n }\n }\n return indices;\n};\nvar assignClusters = function assignClusters(n, S, exemplars) {\n var clusters = [];\n for (var i = 0; i < n; i++) {\n var index = -1;\n var max = -Infinity;\n for (var ei = 0; ei < exemplars.length; ei++) {\n var e = exemplars[ei];\n if (S[i * n + e] > max) {\n index = e;\n max = S[i * n + e];\n }\n }\n if (index > 0) {\n clusters.push(index);\n }\n }\n for (var _ei = 0; _ei < exemplars.length; _ei++) {\n clusters[exemplars[_ei]] = exemplars[_ei];\n }\n return clusters;\n};\nvar assign = function assign(n, S, exemplars) {\n var clusters = assignClusters(n, S, exemplars);\n for (var ei = 0; ei < exemplars.length; ei++) {\n var ii = [];\n for (var c = 0; c < clusters.length; c++) {\n if (clusters[c] === exemplars[ei]) {\n ii.push(c);\n }\n }\n var maxI = -1;\n var maxSum = -Infinity;\n for (var i = 0; i < ii.length; i++) {\n var sum = 0;\n for (var j = 0; j < ii.length; j++) {\n sum += S[ii[j] * n + ii[i]];\n }\n if (sum > maxSum) {\n maxI = i;\n maxSum = sum;\n }\n }\n exemplars[ei] = ii[maxI];\n }\n clusters = assignClusters(n, S, exemplars);\n return clusters;\n};\nvar affinityPropagation = function affinityPropagation(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n var opts = setOptions(options);\n\n // Map each node to its position in node array\n var id2position = {};\n for (var i = 0; i < nodes.length; i++) {\n id2position[nodes[i].id()] = i;\n }\n\n // Begin affinity propagation algorithm\n\n var n; // number of data points\n var n2; // size of matrices\n var S; // similarity matrix (1D array)\n var p; // preference/suitability of a data point to serve as an exemplar\n var R; // responsibility matrix (1D array)\n var A; // availability matrix (1D array)\n\n n = nodes.length;\n n2 = n * n;\n\n // Initialize and build S similarity matrix\n S = new Array(n2);\n for (var _i = 0; _i < n2; _i++) {\n S[_i] = -Infinity; // for cases where two data points shouldn't be linked together\n }\n\n for (var _i2 = 0; _i2 < n; _i2++) {\n for (var j = 0; j < n; j++) {\n if (_i2 !== j) {\n S[_i2 * n + j] = getSimilarity(opts.distance, nodes[_i2], nodes[j], opts.attributes);\n }\n }\n }\n\n // Place preferences on the diagonal of S\n p = getPreference(S, opts.preference);\n for (var _i3 = 0; _i3 < n; _i3++) {\n S[_i3 * n + _i3] = p;\n }\n\n // Initialize R responsibility matrix\n R = new Array(n2);\n for (var _i4 = 0; _i4 < n2; _i4++) {\n R[_i4] = 0.0;\n }\n\n // Initialize A availability matrix\n A = new Array(n2);\n for (var _i5 = 0; _i5 < n2; _i5++) {\n A[_i5] = 0.0;\n }\n var old = new Array(n);\n var Rp = new Array(n);\n var se = new Array(n);\n for (var _i6 = 0; _i6 < n; _i6++) {\n old[_i6] = 0.0;\n Rp[_i6] = 0.0;\n se[_i6] = 0;\n }\n var e = new Array(n * opts.minIterations);\n for (var _i7 = 0; _i7 < e.length; _i7++) {\n e[_i7] = 0;\n }\n var iter;\n for (iter = 0; iter < opts.maxIterations; iter++) {\n // main algorithmic loop\n\n // Update R responsibility matrix\n for (var _i8 = 0; _i8 < n; _i8++) {\n var max = -Infinity,\n max2 = -Infinity,\n maxI = -1,\n AS = 0.0;\n for (var _j = 0; _j < n; _j++) {\n old[_j] = R[_i8 * n + _j];\n AS = A[_i8 * n + _j] + S[_i8 * n + _j];\n if (AS >= max) {\n max2 = max;\n max = AS;\n maxI = _j;\n } else if (AS > max2) {\n max2 = AS;\n }\n }\n for (var _j2 = 0; _j2 < n; _j2++) {\n R[_i8 * n + _j2] = (1 - opts.damping) * (S[_i8 * n + _j2] - max) + opts.damping * old[_j2];\n }\n R[_i8 * n + maxI] = (1 - opts.damping) * (S[_i8 * n + maxI] - max2) + opts.damping * old[maxI];\n }\n\n // Update A availability matrix\n for (var _i9 = 0; _i9 < n; _i9++) {\n var sum = 0;\n for (var _j3 = 0; _j3 < n; _j3++) {\n old[_j3] = A[_j3 * n + _i9];\n Rp[_j3] = Math.max(0, R[_j3 * n + _i9]);\n sum += Rp[_j3];\n }\n sum -= Rp[_i9];\n Rp[_i9] = R[_i9 * n + _i9];\n sum += Rp[_i9];\n for (var _j4 = 0; _j4 < n; _j4++) {\n A[_j4 * n + _i9] = (1 - opts.damping) * Math.min(0, sum - Rp[_j4]) + opts.damping * old[_j4];\n }\n A[_i9 * n + _i9] = (1 - opts.damping) * (sum - Rp[_i9]) + opts.damping * old[_i9];\n }\n\n // Check for convergence\n var K = 0;\n for (var _i10 = 0; _i10 < n; _i10++) {\n var E = A[_i10 * n + _i10] + R[_i10 * n + _i10] > 0 ? 1 : 0;\n e[iter % opts.minIterations * n + _i10] = E;\n K += E;\n }\n if (K > 0 && (iter >= opts.minIterations - 1 || iter == opts.maxIterations - 1)) {\n var _sum = 0;\n for (var _i11 = 0; _i11 < n; _i11++) {\n se[_i11] = 0;\n for (var _j5 = 0; _j5 < opts.minIterations; _j5++) {\n se[_i11] += e[_j5 * n + _i11];\n }\n if (se[_i11] === 0 || se[_i11] === opts.minIterations) {\n _sum++;\n }\n }\n if (_sum === n) {\n // then we have convergence\n break;\n }\n }\n }\n\n // Identify exemplars (cluster centers)\n var exemplarsIndices = findExemplars(n, R, A);\n\n // Assign nodes to clusters\n var clusterIndices = assign(n, S, exemplarsIndices);\n var clusters = {};\n for (var c = 0; c < exemplarsIndices.length; c++) {\n clusters[exemplarsIndices[c]] = [];\n }\n for (var _i12 = 0; _i12 < nodes.length; _i12++) {\n var pos = id2position[nodes[_i12].id()];\n var clusterIndex = clusterIndices[pos];\n if (clusterIndex != null) {\n // the node may have not been assigned a cluster if no valid attributes were specified\n clusters[clusterIndex].push(nodes[_i12]);\n }\n }\n var retClusters = new Array(exemplarsIndices.length);\n for (var _c = 0; _c < exemplarsIndices.length; _c++) {\n retClusters[_c] = cy.collection(clusters[exemplarsIndices[_c]]);\n }\n return retClusters;\n};\nvar affinityPropagation$1 = {\n affinityPropagation: affinityPropagation,\n ap: affinityPropagation\n};\n\nvar hierholzerDefaults = defaults$g({\n root: undefined,\n directed: false\n});\nvar elesfn$k = {\n hierholzer: function hierholzer(options) {\n if (!plainObject(options)) {\n var args = arguments;\n options = {\n root: args[0],\n directed: args[1]\n };\n }\n var _hierholzerDefaults = hierholzerDefaults(options),\n root = _hierholzerDefaults.root,\n directed = _hierholzerDefaults.directed;\n var eles = this;\n var dflag = false;\n var oddIn;\n var oddOut;\n var startVertex;\n if (root) startVertex = string(root) ? this.filter(root)[0].id() : root[0].id();\n var nodes = {};\n var edges = {};\n if (directed) {\n eles.forEach(function (ele) {\n var id = ele.id();\n if (ele.isNode()) {\n var ind = ele.indegree(true);\n var outd = ele.outdegree(true);\n var d1 = ind - outd;\n var d2 = outd - ind;\n if (d1 == 1) {\n if (oddIn) dflag = true;else oddIn = id;\n } else if (d2 == 1) {\n if (oddOut) dflag = true;else oddOut = id;\n } else if (d2 > 1 || d1 > 1) {\n dflag = true;\n }\n nodes[id] = [];\n ele.outgoers().forEach(function (e) {\n if (e.isEdge()) nodes[id].push(e.id());\n });\n } else {\n edges[id] = [undefined, ele.target().id()];\n }\n });\n } else {\n eles.forEach(function (ele) {\n var id = ele.id();\n if (ele.isNode()) {\n var d = ele.degree(true);\n if (d % 2) {\n if (!oddIn) oddIn = id;else if (!oddOut) oddOut = id;else dflag = true;\n }\n nodes[id] = [];\n ele.connectedEdges().forEach(function (e) {\n return nodes[id].push(e.id());\n });\n } else {\n edges[id] = [ele.source().id(), ele.target().id()];\n }\n });\n }\n var result = {\n found: false,\n trail: undefined\n };\n if (dflag) return result;else if (oddOut && oddIn) {\n if (directed) {\n if (startVertex && oddOut != startVertex) {\n return result;\n }\n startVertex = oddOut;\n } else {\n if (startVertex && oddOut != startVertex && oddIn != startVertex) {\n return result;\n } else if (!startVertex) {\n startVertex = oddOut;\n }\n }\n } else {\n if (!startVertex) startVertex = eles[0].id();\n }\n var walk = function walk(v) {\n var currentNode = v;\n var subtour = [v];\n var adj, adjTail, adjHead;\n while (nodes[currentNode].length) {\n adj = nodes[currentNode].shift();\n adjTail = edges[adj][0];\n adjHead = edges[adj][1];\n if (currentNode != adjHead) {\n nodes[adjHead] = nodes[adjHead].filter(function (e) {\n return e != adj;\n });\n currentNode = adjHead;\n } else if (!directed && currentNode != adjTail) {\n nodes[adjTail] = nodes[adjTail].filter(function (e) {\n return e != adj;\n });\n currentNode = adjTail;\n }\n subtour.unshift(adj);\n subtour.unshift(currentNode);\n }\n return subtour;\n };\n var trail = [];\n var subtour = [];\n subtour = walk(startVertex);\n while (subtour.length != 1) {\n if (nodes[subtour[0]].length == 0) {\n trail.unshift(eles.getElementById(subtour.shift()));\n trail.unshift(eles.getElementById(subtour.shift()));\n } else {\n subtour = walk(subtour.shift()).concat(subtour);\n }\n }\n trail.unshift(eles.getElementById(subtour.shift())); // final node\n\n for (var d in nodes) {\n if (nodes[d].length) {\n return result;\n }\n }\n result.found = true;\n result.trail = this.spawn(trail, true);\n return result;\n }\n};\n\nvar hopcroftTarjanBiconnected = function hopcroftTarjanBiconnected() {\n var eles = this;\n var nodes = {};\n var id = 0;\n var edgeCount = 0;\n var components = [];\n var stack = [];\n var visitedEdges = {};\n var buildComponent = function buildComponent(x, y) {\n var i = stack.length - 1;\n var cutset = [];\n var component = eles.spawn();\n while (stack[i].x != x || stack[i].y != y) {\n cutset.push(stack.pop().edge);\n i--;\n }\n cutset.push(stack.pop().edge);\n cutset.forEach(function (edge) {\n var connectedNodes = edge.connectedNodes().intersection(eles);\n component.merge(edge);\n connectedNodes.forEach(function (node) {\n var nodeId = node.id();\n var connectedEdges = node.connectedEdges().intersection(eles);\n component.merge(node);\n if (!nodes[nodeId].cutVertex) {\n component.merge(connectedEdges);\n } else {\n component.merge(connectedEdges.filter(function (edge) {\n return edge.isLoop();\n }));\n }\n });\n });\n components.push(component);\n };\n var biconnectedSearch = function biconnectedSearch(root, currentNode, parent) {\n if (root === parent) edgeCount += 1;\n nodes[currentNode] = {\n id: id,\n low: id++,\n cutVertex: false\n };\n var edges = eles.getElementById(currentNode).connectedEdges().intersection(eles);\n if (edges.size() === 0) {\n components.push(eles.spawn(eles.getElementById(currentNode)));\n } else {\n var sourceId, targetId, otherNodeId, edgeId;\n edges.forEach(function (edge) {\n sourceId = edge.source().id();\n targetId = edge.target().id();\n otherNodeId = sourceId === currentNode ? targetId : sourceId;\n if (otherNodeId !== parent) {\n edgeId = edge.id();\n if (!visitedEdges[edgeId]) {\n visitedEdges[edgeId] = true;\n stack.push({\n x: currentNode,\n y: otherNodeId,\n edge: edge\n });\n }\n if (!(otherNodeId in nodes)) {\n biconnectedSearch(root, otherNodeId, currentNode);\n nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].low);\n if (nodes[currentNode].id <= nodes[otherNodeId].low) {\n nodes[currentNode].cutVertex = true;\n buildComponent(currentNode, otherNodeId);\n }\n } else {\n nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].id);\n }\n }\n });\n }\n };\n eles.forEach(function (ele) {\n if (ele.isNode()) {\n var nodeId = ele.id();\n if (!(nodeId in nodes)) {\n edgeCount = 0;\n biconnectedSearch(nodeId, nodeId);\n nodes[nodeId].cutVertex = edgeCount > 1;\n }\n }\n });\n var cutVertices = Object.keys(nodes).filter(function (id) {\n return nodes[id].cutVertex;\n }).map(function (id) {\n return eles.getElementById(id);\n });\n return {\n cut: eles.spawn(cutVertices),\n components: components\n };\n};\nvar hopcroftTarjanBiconnected$1 = {\n hopcroftTarjanBiconnected: hopcroftTarjanBiconnected,\n htbc: hopcroftTarjanBiconnected,\n htb: hopcroftTarjanBiconnected,\n hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected\n};\n\nvar tarjanStronglyConnected = function tarjanStronglyConnected() {\n var eles = this;\n var nodes = {};\n var index = 0;\n var components = [];\n var stack = [];\n var cut = eles.spawn(eles);\n var stronglyConnectedSearch = function stronglyConnectedSearch(sourceNodeId) {\n stack.push(sourceNodeId);\n nodes[sourceNodeId] = {\n index: index,\n low: index++,\n explored: false\n };\n var connectedEdges = eles.getElementById(sourceNodeId).connectedEdges().intersection(eles);\n connectedEdges.forEach(function (edge) {\n var targetNodeId = edge.target().id();\n if (targetNodeId !== sourceNodeId) {\n if (!(targetNodeId in nodes)) {\n stronglyConnectedSearch(targetNodeId);\n }\n if (!nodes[targetNodeId].explored) {\n nodes[sourceNodeId].low = Math.min(nodes[sourceNodeId].low, nodes[targetNodeId].low);\n }\n }\n });\n if (nodes[sourceNodeId].index === nodes[sourceNodeId].low) {\n var componentNodes = eles.spawn();\n for (;;) {\n var nodeId = stack.pop();\n componentNodes.merge(eles.getElementById(nodeId));\n nodes[nodeId].low = nodes[sourceNodeId].index;\n nodes[nodeId].explored = true;\n if (nodeId === sourceNodeId) {\n break;\n }\n }\n var componentEdges = componentNodes.edgesWith(componentNodes);\n var component = componentNodes.merge(componentEdges);\n components.push(component);\n cut = cut.difference(component);\n }\n };\n eles.forEach(function (ele) {\n if (ele.isNode()) {\n var nodeId = ele.id();\n if (!(nodeId in nodes)) {\n stronglyConnectedSearch(nodeId);\n }\n }\n });\n return {\n cut: cut,\n components: components\n };\n};\nvar tarjanStronglyConnected$1 = {\n tarjanStronglyConnected: tarjanStronglyConnected,\n tsc: tarjanStronglyConnected,\n tscc: tarjanStronglyConnected,\n tarjanStronglyConnectedComponents: tarjanStronglyConnected\n};\n\nvar elesfn$j = {};\n[elesfn$v, elesfn$u, elesfn$t, elesfn$s, elesfn$r, elesfn$q, elesfn$p, elesfn$o, elesfn$n, elesfn$m, elesfn$l, markovClustering$1, kClustering, hierarchicalClustering$1, affinityPropagation$1, elesfn$k, hopcroftTarjanBiconnected$1, tarjanStronglyConnected$1].forEach(function (props) {\n extend(elesfn$j, props);\n});\n\n/*!\nEmbeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable\nCopyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)\nLicensed under The MIT License (http://opensource.org/licenses/MIT)\n*/\n\n/* promise states [Promises/A+ 2.1] */\nvar STATE_PENDING = 0; /* [Promises/A+ 2.1.1] */\nvar STATE_FULFILLED = 1; /* [Promises/A+ 2.1.2] */\nvar STATE_REJECTED = 2; /* [Promises/A+ 2.1.3] */\n\n/* promise object constructor */\nvar api = function api(executor) {\n /* optionally support non-constructor/plain-function call */\n if (!(this instanceof api)) return new api(executor);\n\n /* initialize object */\n this.id = 'Thenable/1.0.7';\n this.state = STATE_PENDING; /* initial state */\n this.fulfillValue = undefined; /* initial value */ /* [Promises/A+ 1.3, 2.1.2.2] */\n this.rejectReason = undefined; /* initial reason */ /* [Promises/A+ 1.5, 2.1.3.2] */\n this.onFulfilled = []; /* initial handlers */\n this.onRejected = []; /* initial handlers */\n\n /* provide optional information-hiding proxy */\n this.proxy = {\n then: this.then.bind(this)\n };\n\n /* support optional executor function */\n if (typeof executor === 'function') executor.call(this, this.fulfill.bind(this), this.reject.bind(this));\n};\n\n/* promise API methods */\napi.prototype = {\n /* promise resolving methods */\n fulfill: function fulfill(value) {\n return deliver(this, STATE_FULFILLED, 'fulfillValue', value);\n },\n reject: function reject(value) {\n return deliver(this, STATE_REJECTED, 'rejectReason', value);\n },\n /* \"The then Method\" [Promises/A+ 1.1, 1.2, 2.2] */\n then: function then(onFulfilled, onRejected) {\n var curr = this;\n var next = new api(); /* [Promises/A+ 2.2.7] */\n curr.onFulfilled.push(resolver(onFulfilled, next, 'fulfill')); /* [Promises/A+ 2.2.2/2.2.6] */\n curr.onRejected.push(resolver(onRejected, next, 'reject')); /* [Promises/A+ 2.2.3/2.2.6] */\n execute(curr);\n return next.proxy; /* [Promises/A+ 2.2.7, 3.3] */\n }\n};\n\n/* deliver an action */\nvar deliver = function deliver(curr, state, name, value) {\n if (curr.state === STATE_PENDING) {\n curr.state = state; /* [Promises/A+ 2.1.2.1, 2.1.3.1] */\n curr[name] = value; /* [Promises/A+ 2.1.2.2, 2.1.3.2] */\n execute(curr);\n }\n return curr;\n};\n\n/* execute all handlers */\nvar execute = function execute(curr) {\n if (curr.state === STATE_FULFILLED) execute_handlers(curr, 'onFulfilled', curr.fulfillValue);else if (curr.state === STATE_REJECTED) execute_handlers(curr, 'onRejected', curr.rejectReason);\n};\n\n/* execute particular set of handlers */\nvar execute_handlers = function execute_handlers(curr, name, value) {\n /* global setImmediate: true */\n /* global setTimeout: true */\n\n /* short-circuit processing */\n if (curr[name].length === 0) return;\n\n /* iterate over all handlers, exactly once */\n var handlers = curr[name];\n curr[name] = []; /* [Promises/A+ 2.2.2.3, 2.2.3.3] */\n var func = function func() {\n for (var i = 0; i < handlers.length; i++) {\n handlers[i](value);\n } /* [Promises/A+ 2.2.5] */\n };\n\n /* execute procedure asynchronously */ /* [Promises/A+ 2.2.4, 3.1] */\n if (typeof setImmediate === 'function') setImmediate(func);else setTimeout(func, 0);\n};\n\n/* generate a resolver function */\nvar resolver = function resolver(cb, next, method) {\n return function (value) {\n if (typeof cb !== 'function') /* [Promises/A+ 2.2.1, 2.2.7.3, 2.2.7.4] */\n next[method].call(next, value); /* [Promises/A+ 2.2.7.3, 2.2.7.4] */else {\n var result;\n try {\n result = cb(value);\n } /* [Promises/A+ 2.2.2.1, 2.2.3.1, 2.2.5, 3.2] */ catch (e) {\n next.reject(e); /* [Promises/A+ 2.2.7.2] */\n return;\n }\n resolve(next, result); /* [Promises/A+ 2.2.7.1] */\n }\n };\n};\n\n/* \"Promise Resolution Procedure\" */ /* [Promises/A+ 2.3] */\nvar resolve = function resolve(promise, x) {\n /* sanity check arguments */ /* [Promises/A+ 2.3.1] */\n if (promise === x || promise.proxy === x) {\n promise.reject(new TypeError('cannot resolve promise with itself'));\n return;\n }\n\n /* surgically check for a \"then\" method\n (mainly to just call the \"getter\" of \"then\" only once) */\n var then;\n if (_typeof(x) === 'object' && x !== null || typeof x === 'function') {\n try {\n then = x.then;\n } /* [Promises/A+ 2.3.3.1, 3.5] */ catch (e) {\n promise.reject(e); /* [Promises/A+ 2.3.3.2] */\n return;\n }\n }\n\n /* handle own Thenables [Promises/A+ 2.3.2]\n and similar \"thenables\" [Promises/A+ 2.3.3] */\n if (typeof then === 'function') {\n var resolved = false;\n try {\n /* call retrieved \"then\" method */ /* [Promises/A+ 2.3.3.3] */\n then.call(x, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */\n function (y) {\n if (resolved) return;\n resolved = true; /* [Promises/A+ 2.3.3.3.3] */\n if (y === x) /* [Promises/A+ 3.6] */\n promise.reject(new TypeError('circular thenable chain'));else resolve(promise, y);\n }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */\n function (r) {\n if (resolved) return;\n resolved = true; /* [Promises/A+ 2.3.3.3.3] */\n promise.reject(r);\n });\n } catch (e) {\n if (!resolved) /* [Promises/A+ 2.3.3.3.3] */\n promise.reject(e); /* [Promises/A+ 2.3.3.3.4] */\n }\n\n return;\n }\n\n /* handle other values */\n promise.fulfill(x); /* [Promises/A+ 2.3.4, 2.3.3.4] */\n};\n\n// so we always have Promise.all()\napi.all = function (ps) {\n return new api(function (resolveAll, rejectAll) {\n var vals = new Array(ps.length);\n var doneCount = 0;\n var fulfill = function fulfill(i, val) {\n vals[i] = val;\n doneCount++;\n if (doneCount === ps.length) {\n resolveAll(vals);\n }\n };\n for (var i = 0; i < ps.length; i++) {\n (function (i) {\n var p = ps[i];\n var isPromise = p != null && p.then != null;\n if (isPromise) {\n p.then(function (val) {\n fulfill(i, val);\n }, function (err) {\n rejectAll(err);\n });\n } else {\n var val = p;\n fulfill(i, val);\n }\n })(i);\n }\n });\n};\napi.resolve = function (val) {\n return new api(function (resolve, reject) {\n resolve(val);\n });\n};\napi.reject = function (val) {\n return new api(function (resolve, reject) {\n reject(val);\n });\n};\nvar Promise$1 = typeof Promise !== 'undefined' ? Promise : api; // eslint-disable-line no-undef\n\nvar Animation = function Animation(target, opts, opts2) {\n var isCore = core(target);\n var isEle = !isCore;\n var _p = this._private = extend({\n duration: 1000\n }, opts, opts2);\n _p.target = target;\n _p.style = _p.style || _p.css;\n _p.started = false;\n _p.playing = false;\n _p.hooked = false;\n _p.applying = false;\n _p.progress = 0;\n _p.completes = [];\n _p.frames = [];\n if (_p.complete && fn$6(_p.complete)) {\n _p.completes.push(_p.complete);\n }\n if (isEle) {\n var pos = target.position();\n _p.startPosition = _p.startPosition || {\n x: pos.x,\n y: pos.y\n };\n _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style);\n }\n if (isCore) {\n var pan = target.pan();\n _p.startPan = {\n x: pan.x,\n y: pan.y\n };\n _p.startZoom = target.zoom();\n }\n\n // for future timeline/animations impl\n this.length = 1;\n this[0] = this;\n};\nvar anifn = Animation.prototype;\nextend(anifn, {\n instanceString: function instanceString() {\n return 'animation';\n },\n hook: function hook() {\n var _p = this._private;\n if (!_p.hooked) {\n // add to target's animation queue\n var q;\n var tAni = _p.target._private.animation;\n if (_p.queue) {\n q = tAni.queue;\n } else {\n q = tAni.current;\n }\n q.push(this);\n\n // add to the animation loop pool\n if (elementOrCollection(_p.target)) {\n _p.target.cy().addToAnimationPool(_p.target);\n }\n _p.hooked = true;\n }\n return this;\n },\n play: function play() {\n var _p = this._private;\n\n // autorewind\n if (_p.progress === 1) {\n _p.progress = 0;\n }\n _p.playing = true;\n _p.started = false; // needs to be started by animation loop\n _p.stopped = false;\n this.hook();\n\n // the animation loop will start the animation...\n\n return this;\n },\n playing: function playing() {\n return this._private.playing;\n },\n apply: function apply() {\n var _p = this._private;\n _p.applying = true;\n _p.started = false; // needs to be started by animation loop\n _p.stopped = false;\n this.hook();\n\n // the animation loop will apply the animation at this progress\n\n return this;\n },\n applying: function applying() {\n return this._private.applying;\n },\n pause: function pause() {\n var _p = this._private;\n _p.playing = false;\n _p.started = false;\n return this;\n },\n stop: function stop() {\n var _p = this._private;\n _p.playing = false;\n _p.started = false;\n _p.stopped = true; // to be removed from animation queues\n\n return this;\n },\n rewind: function rewind() {\n return this.progress(0);\n },\n fastforward: function fastforward() {\n return this.progress(1);\n },\n time: function time(t) {\n var _p = this._private;\n if (t === undefined) {\n return _p.progress * _p.duration;\n } else {\n return this.progress(t / _p.duration);\n }\n },\n progress: function progress(p) {\n var _p = this._private;\n var wasPlaying = _p.playing;\n if (p === undefined) {\n return _p.progress;\n } else {\n if (wasPlaying) {\n this.pause();\n }\n _p.progress = p;\n _p.started = false;\n if (wasPlaying) {\n this.play();\n }\n }\n return this;\n },\n completed: function completed() {\n return this._private.progress === 1;\n },\n reverse: function reverse() {\n var _p = this._private;\n var wasPlaying = _p.playing;\n if (wasPlaying) {\n this.pause();\n }\n _p.progress = 1 - _p.progress;\n _p.started = false;\n var swap = function swap(a, b) {\n var _pa = _p[a];\n if (_pa == null) {\n return;\n }\n _p[a] = _p[b];\n _p[b] = _pa;\n };\n swap('zoom', 'startZoom');\n swap('pan', 'startPan');\n swap('position', 'startPosition');\n\n // swap styles\n if (_p.style) {\n for (var i = 0; i < _p.style.length; i++) {\n var prop = _p.style[i];\n var name = prop.name;\n var startStyleProp = _p.startStyle[name];\n _p.startStyle[name] = prop;\n _p.style[i] = startStyleProp;\n }\n }\n if (wasPlaying) {\n this.play();\n }\n return this;\n },\n promise: function promise(type) {\n var _p = this._private;\n var arr;\n switch (type) {\n case 'frame':\n arr = _p.frames;\n break;\n default:\n case 'complete':\n case 'completed':\n arr = _p.completes;\n }\n return new Promise$1(function (resolve, reject) {\n arr.push(function () {\n resolve();\n });\n });\n }\n});\nanifn.complete = anifn.completed;\nanifn.run = anifn.play;\nanifn.running = anifn.playing;\n\nvar define$3 = {\n animated: function animated() {\n return function animatedImpl() {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return false;\n }\n var ele = all[0];\n if (ele) {\n return ele._private.animation.current.length > 0;\n }\n };\n },\n // animated\n\n clearQueue: function clearQueue() {\n return function clearQueueImpl() {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n for (var i = 0; i < all.length; i++) {\n var ele = all[i];\n ele._private.animation.queue = [];\n }\n return this;\n };\n },\n // clearQueue\n\n delay: function delay() {\n return function delayImpl(time, complete) {\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n return this.animate({\n delay: time,\n duration: time,\n complete: complete\n });\n };\n },\n // delay\n\n delayAnimation: function delayAnimation() {\n return function delayAnimationImpl(time, complete) {\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n return this.animation({\n delay: time,\n duration: time,\n complete: complete\n });\n };\n },\n // delay\n\n animation: function animation() {\n return function animationImpl(properties, params) {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n var isCore = !selfIsArrayLike;\n var isEles = !isCore;\n if (!cy.styleEnabled()) {\n return this;\n }\n var style = cy.style();\n properties = extend({}, properties, params);\n var propertiesEmpty = Object.keys(properties).length === 0;\n if (propertiesEmpty) {\n return new Animation(all[0], properties); // nothing to animate\n }\n\n if (properties.duration === undefined) {\n properties.duration = 400;\n }\n switch (properties.duration) {\n case 'slow':\n properties.duration = 600;\n break;\n case 'fast':\n properties.duration = 200;\n break;\n }\n if (isEles) {\n properties.style = style.getPropsList(properties.style || properties.css);\n properties.css = undefined;\n }\n if (isEles && properties.renderedPosition != null) {\n var rpos = properties.renderedPosition;\n var pan = cy.pan();\n var zoom = cy.zoom();\n properties.position = renderedToModelPosition(rpos, zoom, pan);\n }\n\n // override pan w/ panBy if set\n if (isCore && properties.panBy != null) {\n var panBy = properties.panBy;\n var cyPan = cy.pan();\n properties.pan = {\n x: cyPan.x + panBy.x,\n y: cyPan.y + panBy.y\n };\n }\n\n // override pan w/ center if set\n var center = properties.center || properties.centre;\n if (isCore && center != null) {\n var centerPan = cy.getCenterPan(center.eles, properties.zoom);\n if (centerPan != null) {\n properties.pan = centerPan;\n }\n }\n\n // override pan & zoom w/ fit if set\n if (isCore && properties.fit != null) {\n var fit = properties.fit;\n var fitVp = cy.getFitViewport(fit.eles || fit.boundingBox, fit.padding);\n if (fitVp != null) {\n properties.pan = fitVp.pan;\n properties.zoom = fitVp.zoom;\n }\n }\n\n // override zoom (& potentially pan) w/ zoom obj if set\n if (isCore && plainObject(properties.zoom)) {\n var vp = cy.getZoomedViewport(properties.zoom);\n if (vp != null) {\n if (vp.zoomed) {\n properties.zoom = vp.zoom;\n }\n if (vp.panned) {\n properties.pan = vp.pan;\n }\n } else {\n properties.zoom = null; // an inavalid zoom (e.g. no delta) gets automatically destroyed\n }\n }\n\n return new Animation(all[0], properties);\n };\n },\n // animate\n\n animate: function animate() {\n return function animateImpl(properties, params) {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n if (params) {\n properties = extend({}, properties, params);\n }\n\n // manually hook and run the animation\n for (var i = 0; i < all.length; i++) {\n var ele = all[i];\n var queue = ele.animated() && (properties.queue === undefined || properties.queue);\n var ani = ele.animation(properties, queue ? {\n queue: true\n } : undefined);\n ani.play();\n }\n return this; // chaining\n };\n },\n\n // animate\n\n stop: function stop() {\n return function stopImpl(clearQueue, jumpToEnd) {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n for (var i = 0; i < all.length; i++) {\n var ele = all[i];\n var _p = ele._private;\n var anis = _p.animation.current;\n for (var j = 0; j < anis.length; j++) {\n var ani = anis[j];\n var ani_p = ani._private;\n if (jumpToEnd) {\n // next iteration of the animation loop, the animation\n // will go straight to the end and be removed\n ani_p.duration = 0;\n }\n }\n\n // clear the queue of future animations\n if (clearQueue) {\n _p.animation.queue = [];\n }\n if (!jumpToEnd) {\n _p.animation.current = [];\n }\n }\n\n // we have to notify (the animation loop doesn't do it for us on `stop`)\n cy.notify('draw');\n return this;\n };\n } // stop\n}; // define\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nvar isArray_1 = isArray;\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray_1(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol_1(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nvar _isKey = isKey;\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject_1(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = _baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nvar isFunction_1 = isFunction;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = _root['__core-js_shared__'];\n\nvar _coreJsData = coreJsData;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nvar _isMasked = isMasked;\n\n/** Used for built-in method references. */\nvar funcProto$1 = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString$1 = funcProto$1.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString$1.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nvar _toSource = toSource;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto$3 = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$3 = objectProto$3.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty$3).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject_1(value) || _isMasked(value)) {\n return false;\n }\n var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;\n return pattern.test(_toSource(value));\n}\n\nvar _baseIsNative = baseIsNative;\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue$1(object, key) {\n return object == null ? undefined : object[key];\n}\n\nvar _getValue = getValue$1;\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = _getValue(object, key);\n return _baseIsNative(value) ? value : undefined;\n}\n\nvar _getNative = getNative;\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = _getNative(Object, 'create');\n\nvar _nativeCreate = nativeCreate;\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = _nativeCreate ? _nativeCreate(null) : {};\n this.size = 0;\n}\n\nvar _hashClear = hashClear;\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nvar _hashDelete = hashDelete;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED$1 = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto$2 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$2 = objectProto$2.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (_nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED$1 ? undefined : result;\n }\n return hasOwnProperty$2.call(data, key) ? data[key] : undefined;\n}\n\nvar _hashGet = hashGet;\n\n/** Used for built-in method references. */\nvar objectProto$1 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$1 = objectProto$1.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);\n}\n\nvar _hashHas = hashHas;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nvar _hashSet = hashSet;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = _hashClear;\nHash.prototype['delete'] = _hashDelete;\nHash.prototype.get = _hashGet;\nHash.prototype.has = _hashHas;\nHash.prototype.set = _hashSet;\n\nvar _Hash = Hash;\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nvar _listCacheClear = listCacheClear;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nvar eq_1 = eq;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq_1(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nvar _assocIndexOf = assocIndexOf;\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = _assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nvar _listCacheDelete = listCacheDelete;\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = _assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nvar _listCacheGet = listCacheGet;\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return _assocIndexOf(this.__data__, key) > -1;\n}\n\nvar _listCacheHas = listCacheHas;\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = _assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nvar _listCacheSet = listCacheSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = _listCacheClear;\nListCache.prototype['delete'] = _listCacheDelete;\nListCache.prototype.get = _listCacheGet;\nListCache.prototype.has = _listCacheHas;\nListCache.prototype.set = _listCacheSet;\n\nvar _ListCache = ListCache;\n\n/* Built-in method references that are verified to be native. */\nvar Map$1 = _getNative(_root, 'Map');\n\nvar _Map = Map$1;\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n}\n\nvar _mapCacheClear = mapCacheClear;\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nvar _isKeyable = isKeyable;\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return _isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nvar _getMapData = getMapData;\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = _getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nvar _mapCacheDelete = mapCacheDelete;\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return _getMapData(this, key).get(key);\n}\n\nvar _mapCacheGet = mapCacheGet;\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return _getMapData(this, key).has(key);\n}\n\nvar _mapCacheHas = mapCacheHas;\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = _getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nvar _mapCacheSet = mapCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = _mapCacheClear;\nMapCache.prototype['delete'] = _mapCacheDelete;\nMapCache.prototype.get = _mapCacheGet;\nMapCache.prototype.has = _mapCacheHas;\nMapCache.prototype.set = _mapCacheSet;\n\nvar _MapCache = MapCache;\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || _MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = _MapCache;\n\nvar memoize_1 = memoize;\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize_1(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nvar _memoizeCapped = memoizeCapped;\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = _memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nvar _stringToPath = stringToPath;\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nvar _arrayMap = arrayMap;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY$1 = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = _Symbol ? _Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray_1(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return _arrayMap(value, baseToString) + '';\n }\n if (isSymbol_1(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;\n}\n\nvar _baseToString = baseToString;\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString$1(value) {\n return value == null ? '' : _baseToString(value);\n}\n\nvar toString_1 = toString$1;\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray_1(value)) {\n return value;\n }\n return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));\n}\n\nvar _castPath = castPath;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol_1(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nvar _toKey = toKey;\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = _castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[_toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nvar _baseGet = baseGet;\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : _baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nvar get_1 = get;\n\nvar defineProperty = (function() {\n try {\n var func = _getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nvar _defineProperty = defineProperty;\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && _defineProperty) {\n _defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nvar _baseAssignValue = baseAssignValue;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq_1(objValue, value)) ||\n (value === undefined && !(key in object))) {\n _baseAssignValue(object, key, value);\n }\n}\n\nvar _assignValue = assignValue;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nvar _isIndex = isIndex;\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject_1(object)) {\n return object;\n }\n path = _castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = _toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject_1(objValue)\n ? objValue\n : (_isIndex(path[index + 1]) ? [] : {});\n }\n }\n _assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nvar _baseSet = baseSet;\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : _baseSet(object, path, value);\n}\n\nvar set_1 = set;\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nvar _copyArray = copyArray;\n\n/**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\nfunction toPath(value) {\n if (isArray_1(value)) {\n return _arrayMap(value, _toKey);\n }\n return isSymbol_1(value) ? [value] : _copyArray(_stringToPath(toString_1(value)));\n}\n\nvar toPath_1 = toPath;\n\nvar define$2 = {\n // access data field\n data: function data(params) {\n var defaults = {\n field: 'data',\n bindingEvent: 'data',\n allowBinding: false,\n allowSetting: false,\n allowGetting: false,\n settingEvent: 'data',\n settingTriggersEvent: false,\n triggerFnName: 'trigger',\n immutableKeys: {},\n // key => true if immutable\n updateStyle: false,\n beforeGet: function beforeGet(self) {},\n beforeSet: function beforeSet(self, obj) {},\n onSet: function onSet(self) {},\n canSet: function canSet(self) {\n return true;\n }\n };\n params = extend({}, defaults, params);\n return function dataImpl(name, value) {\n var p = params;\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var single = selfIsArrayLike ? self[0] : self;\n\n // .data('foo', ...)\n if (string(name)) {\n // set or get property\n var isPathLike = name.indexOf('.') !== -1; // there might be a normal field with a dot \n var path = isPathLike && toPath_1(name);\n\n // .data('foo')\n if (p.allowGetting && value === undefined) {\n // get\n\n var ret;\n if (single) {\n p.beforeGet(single);\n\n // check if it's path and a field with the same name doesn't exist\n if (path && single._private[p.field][name] === undefined) {\n ret = get_1(single._private[p.field], path);\n } else {\n ret = single._private[p.field][name];\n }\n }\n return ret;\n\n // .data('foo', 'bar')\n } else if (p.allowSetting && value !== undefined) {\n // set\n var valid = !p.immutableKeys[name];\n if (valid) {\n var change = _defineProperty$1({}, name, value);\n p.beforeSet(self, change);\n for (var i = 0, l = all.length; i < l; i++) {\n var ele = all[i];\n if (p.canSet(ele)) {\n if (path && single._private[p.field][name] === undefined) {\n set_1(ele._private[p.field], path, value);\n } else {\n ele._private[p.field][name] = value;\n }\n }\n }\n\n // update mappers if asked\n if (p.updateStyle) {\n self.updateStyle();\n }\n\n // call onSet callback\n p.onSet(self);\n if (p.settingTriggersEvent) {\n self[p.triggerFnName](p.settingEvent);\n }\n }\n }\n\n // .data({ 'foo': 'bar' })\n } else if (p.allowSetting && plainObject(name)) {\n // extend\n var obj = name;\n var k, v;\n var keys = Object.keys(obj);\n p.beforeSet(self, obj);\n for (var _i = 0; _i < keys.length; _i++) {\n k = keys[_i];\n v = obj[k];\n var _valid = !p.immutableKeys[k];\n if (_valid) {\n for (var j = 0; j < all.length; j++) {\n var _ele = all[j];\n if (p.canSet(_ele)) {\n _ele._private[p.field][k] = v;\n }\n }\n }\n }\n\n // update mappers if asked\n if (p.updateStyle) {\n self.updateStyle();\n }\n\n // call onSet callback\n p.onSet(self);\n if (p.settingTriggersEvent) {\n self[p.triggerFnName](p.settingEvent);\n }\n\n // .data(function(){ ... })\n } else if (p.allowBinding && fn$6(name)) {\n // bind to event\n var fn = name;\n self.on(p.bindingEvent, fn);\n\n // .data()\n } else if (p.allowGetting && name === undefined) {\n // get whole object\n var _ret;\n if (single) {\n p.beforeGet(single);\n _ret = single._private[p.field];\n }\n return _ret;\n }\n return self; // maintain chainability\n }; // function\n },\n\n // data\n\n // remove data field\n removeData: function removeData(params) {\n var defaults = {\n field: 'data',\n event: 'data',\n triggerFnName: 'trigger',\n triggerEvent: false,\n immutableKeys: {} // key => true if immutable\n };\n\n params = extend({}, defaults, params);\n return function removeDataImpl(names) {\n var p = params;\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n\n // .removeData('foo bar')\n if (string(names)) {\n // then get the list of keys, and delete them\n var keys = names.split(/\\s+/);\n var l = keys.length;\n for (var i = 0; i < l; i++) {\n // delete each non-empty key\n var key = keys[i];\n if (emptyString(key)) {\n continue;\n }\n var valid = !p.immutableKeys[key]; // not valid if immutable\n if (valid) {\n for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) {\n all[i_a]._private[p.field][key] = undefined;\n }\n }\n }\n if (p.triggerEvent) {\n self[p.triggerFnName](p.event);\n }\n\n // .removeData()\n } else if (names === undefined) {\n // then delete all keys\n\n for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) {\n var _privateFields = all[_i_a]._private[p.field];\n var _keys = Object.keys(_privateFields);\n for (var _i2 = 0; _i2 < _keys.length; _i2++) {\n var _key = _keys[_i2];\n var validKeyToDelete = !p.immutableKeys[_key];\n if (validKeyToDelete) {\n _privateFields[_key] = undefined;\n }\n }\n }\n if (p.triggerEvent) {\n self[p.triggerFnName](p.event);\n }\n }\n return self; // maintain chaining\n }; // function\n } // removeData\n}; // define\n\nvar define$1 = {\n eventAliasesOn: function eventAliasesOn(proto) {\n var p = proto;\n p.addListener = p.listen = p.bind = p.on;\n p.unlisten = p.unbind = p.off = p.removeListener;\n p.trigger = p.emit;\n\n // this is just a wrapper alias of .on()\n p.pon = p.promiseOn = function (events, selector) {\n var self = this;\n var args = Array.prototype.slice.call(arguments, 0);\n return new Promise$1(function (resolve, reject) {\n var callback = function callback(e) {\n self.off.apply(self, offArgs);\n resolve(e);\n };\n var onArgs = args.concat([callback]);\n var offArgs = onArgs.concat([]);\n self.on.apply(self, onArgs);\n });\n };\n }\n}; // define\n\n// use this module to cherry pick functions into your prototype\nvar define = {};\n[define$3, define$2, define$1].forEach(function (m) {\n extend(define, m);\n});\n\nvar elesfn$i = {\n animate: define.animate(),\n animation: define.animation(),\n animated: define.animated(),\n clearQueue: define.clearQueue(),\n delay: define.delay(),\n delayAnimation: define.delayAnimation(),\n stop: define.stop()\n};\n\nvar elesfn$h = {\n classes: function classes(_classes) {\n var self = this;\n if (_classes === undefined) {\n var ret = [];\n self[0]._private.classes.forEach(function (cls) {\n return ret.push(cls);\n });\n return ret;\n } else if (!array(_classes)) {\n // extract classes from string\n _classes = (_classes || '').match(/\\S+/g) || [];\n }\n var changed = [];\n var classesSet = new Set$1(_classes);\n\n // check and update each ele\n for (var j = 0; j < self.length; j++) {\n var ele = self[j];\n var _p = ele._private;\n var eleClasses = _p.classes;\n var changedEle = false;\n\n // check if ele has all of the passed classes\n for (var i = 0; i < _classes.length; i++) {\n var cls = _classes[i];\n var eleHasClass = eleClasses.has(cls);\n if (!eleHasClass) {\n changedEle = true;\n break;\n }\n }\n\n // check if ele has classes outside of those passed\n if (!changedEle) {\n changedEle = eleClasses.size !== _classes.length;\n }\n if (changedEle) {\n _p.classes = classesSet;\n changed.push(ele);\n }\n }\n\n // trigger update style on those eles that had class changes\n if (changed.length > 0) {\n this.spawn(changed).updateStyle().emit('class');\n }\n return self;\n },\n addClass: function addClass(classes) {\n return this.toggleClass(classes, true);\n },\n hasClass: function hasClass(className) {\n var ele = this[0];\n return ele != null && ele._private.classes.has(className);\n },\n toggleClass: function toggleClass(classes, toggle) {\n if (!array(classes)) {\n // extract classes from string\n classes = classes.match(/\\S+/g) || [];\n }\n var self = this;\n var toggleUndefd = toggle === undefined;\n var changed = []; // eles who had classes changed\n\n for (var i = 0, il = self.length; i < il; i++) {\n var ele = self[i];\n var eleClasses = ele._private.classes;\n var changedEle = false;\n for (var j = 0; j < classes.length; j++) {\n var cls = classes[j];\n var hasClass = eleClasses.has(cls);\n var changedNow = false;\n if (toggle || toggleUndefd && !hasClass) {\n eleClasses.add(cls);\n changedNow = true;\n } else if (!toggle || toggleUndefd && hasClass) {\n eleClasses[\"delete\"](cls);\n changedNow = true;\n }\n if (!changedEle && changedNow) {\n changed.push(ele);\n changedEle = true;\n }\n } // for j classes\n } // for i eles\n\n // trigger update style on those eles that had class changes\n if (changed.length > 0) {\n this.spawn(changed).updateStyle().emit('class');\n }\n return self;\n },\n removeClass: function removeClass(classes) {\n return this.toggleClass(classes, false);\n },\n flashClass: function flashClass(classes, duration) {\n var self = this;\n if (duration == null) {\n duration = 250;\n } else if (duration === 0) {\n return self; // nothing to do really\n }\n\n self.addClass(classes);\n setTimeout(function () {\n self.removeClass(classes);\n }, duration);\n return self;\n }\n};\nelesfn$h.className = elesfn$h.classNames = elesfn$h.classes;\n\n// tokens in the query language\nvar tokens = {\n metaChar: '[\\\\!\\\\\"\\\\#\\\\$\\\\%\\\\&\\\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\.\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\]\\\\^\\\\`\\\\{\\\\|\\\\}\\\\~]',\n // chars we need to escape in let names, etc\n comparatorOp: '=|\\\\!=|>|>=|<|<=|\\\\$=|\\\\^=|\\\\*=',\n // binary comparison op (used in data selectors)\n boolOp: '\\\\?|\\\\!|\\\\^',\n // boolean (unary) operators (used in data selectors)\n string: '\"(?:\\\\\\\\\"|[^\"])*\"' + '|' + \"'(?:\\\\\\\\'|[^'])*'\",\n // string literals (used in data selectors) -- doublequotes | singlequotes\n number: number,\n // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123\n meta: 'degree|indegree|outdegree',\n // allowed metadata fields (i.e. allowed functions to use from Collection)\n separator: '\\\\s*,\\\\s*',\n // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass\n descendant: '\\\\s+',\n child: '\\\\s+>\\\\s+',\n subject: '\\\\$',\n group: 'node|edge|\\\\*',\n directedEdge: '\\\\s+->\\\\s+',\n undirectedEdge: '\\\\s+<->\\\\s+'\n};\ntokens.variable = '(?:[\\\\w-.]|(?:\\\\\\\\' + tokens.metaChar + '))+'; // a variable name can have letters, numbers, dashes, and periods\ntokens.className = '(?:[\\\\w-]|(?:\\\\\\\\' + tokens.metaChar + '))+'; // a class name has the same rules as a variable except it can't have a '.' in the name\ntokens.value = tokens.string + '|' + tokens.number; // a value literal, either a string or number\ntokens.id = tokens.variable; // an element id (follows variable conventions)\n\n(function () {\n var ops, op, i;\n\n // add @ variants to comparatorOp\n ops = tokens.comparatorOp.split('|');\n for (i = 0; i < ops.length; i++) {\n op = ops[i];\n tokens.comparatorOp += '|@' + op;\n }\n\n // add ! variants to comparatorOp\n ops = tokens.comparatorOp.split('|');\n for (i = 0; i < ops.length; i++) {\n op = ops[i];\n if (op.indexOf('!') >= 0) {\n continue;\n } // skip ops that explicitly contain !\n if (op === '=') {\n continue;\n } // skip = b/c != is explicitly defined\n\n tokens.comparatorOp += '|\\\\!' + op;\n }\n})();\n\n/**\n * Make a new query object\n *\n * @prop type {Type} The type enum (int) of the query\n * @prop checks List of checks to make against an ele to test for a match\n */\nvar newQuery = function newQuery() {\n return {\n checks: []\n };\n};\n\n/**\n * A check type enum-like object. Uses integer values for fast match() lookup.\n * The ordering does not matter as long as the ints are unique.\n */\nvar Type = {\n /** E.g. node */\n GROUP: 0,\n /** A collection of elements */\n COLLECTION: 1,\n /** A filter(ele) function */\n FILTER: 2,\n /** E.g. [foo > 1] */\n DATA_COMPARE: 3,\n /** E.g. [foo] */\n DATA_EXIST: 4,\n /** E.g. [?foo] */\n DATA_BOOL: 5,\n /** E.g. [[degree > 2]] */\n META_COMPARE: 6,\n /** E.g. :selected */\n STATE: 7,\n /** E.g. #foo */\n ID: 8,\n /** E.g. .foo */\n CLASS: 9,\n /** E.g. #foo <-> #bar */\n UNDIRECTED_EDGE: 10,\n /** E.g. #foo -> #bar */\n DIRECTED_EDGE: 11,\n /** E.g. $#foo -> #bar */\n NODE_SOURCE: 12,\n /** E.g. #foo -> $#bar */\n NODE_TARGET: 13,\n /** E.g. $#foo <-> #bar */\n NODE_NEIGHBOR: 14,\n /** E.g. #foo > #bar */\n CHILD: 15,\n /** E.g. #foo #bar */\n DESCENDANT: 16,\n /** E.g. $#foo > #bar */\n PARENT: 17,\n /** E.g. $#foo #bar */\n ANCESTOR: 18,\n /** E.g. #foo > $bar > #baz */\n COMPOUND_SPLIT: 19,\n /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */\n TRUE: 20\n};\n\nvar stateSelectors = [{\n selector: ':selected',\n matches: function matches(ele) {\n return ele.selected();\n }\n}, {\n selector: ':unselected',\n matches: function matches(ele) {\n return !ele.selected();\n }\n}, {\n selector: ':selectable',\n matches: function matches(ele) {\n return ele.selectable();\n }\n}, {\n selector: ':unselectable',\n matches: function matches(ele) {\n return !ele.selectable();\n }\n}, {\n selector: ':locked',\n matches: function matches(ele) {\n return ele.locked();\n }\n}, {\n selector: ':unlocked',\n matches: function matches(ele) {\n return !ele.locked();\n }\n}, {\n selector: ':visible',\n matches: function matches(ele) {\n return ele.visible();\n }\n}, {\n selector: ':hidden',\n matches: function matches(ele) {\n return !ele.visible();\n }\n}, {\n selector: ':transparent',\n matches: function matches(ele) {\n return ele.transparent();\n }\n}, {\n selector: ':grabbed',\n matches: function matches(ele) {\n return ele.grabbed();\n }\n}, {\n selector: ':free',\n matches: function matches(ele) {\n return !ele.grabbed();\n }\n}, {\n selector: ':removed',\n matches: function matches(ele) {\n return ele.removed();\n }\n}, {\n selector: ':inside',\n matches: function matches(ele) {\n return !ele.removed();\n }\n}, {\n selector: ':grabbable',\n matches: function matches(ele) {\n return ele.grabbable();\n }\n}, {\n selector: ':ungrabbable',\n matches: function matches(ele) {\n return !ele.grabbable();\n }\n}, {\n selector: ':animated',\n matches: function matches(ele) {\n return ele.animated();\n }\n}, {\n selector: ':unanimated',\n matches: function matches(ele) {\n return !ele.animated();\n }\n}, {\n selector: ':parent',\n matches: function matches(ele) {\n return ele.isParent();\n }\n}, {\n selector: ':childless',\n matches: function matches(ele) {\n return ele.isChildless();\n }\n}, {\n selector: ':child',\n matches: function matches(ele) {\n return ele.isChild();\n }\n}, {\n selector: ':orphan',\n matches: function matches(ele) {\n return ele.isOrphan();\n }\n}, {\n selector: ':nonorphan',\n matches: function matches(ele) {\n return ele.isChild();\n }\n}, {\n selector: ':compound',\n matches: function matches(ele) {\n if (ele.isNode()) {\n return ele.isParent();\n } else {\n return ele.source().isParent() || ele.target().isParent();\n }\n }\n}, {\n selector: ':loop',\n matches: function matches(ele) {\n return ele.isLoop();\n }\n}, {\n selector: ':simple',\n matches: function matches(ele) {\n return ele.isSimple();\n }\n}, {\n selector: ':active',\n matches: function matches(ele) {\n return ele.active();\n }\n}, {\n selector: ':inactive',\n matches: function matches(ele) {\n return !ele.active();\n }\n}, {\n selector: ':backgrounding',\n matches: function matches(ele) {\n return ele.backgrounding();\n }\n}, {\n selector: ':nonbackgrounding',\n matches: function matches(ele) {\n return !ele.backgrounding();\n }\n}].sort(function (a, b) {\n // n.b. selectors that are starting substrings of others must have the longer ones first\n return descending(a.selector, b.selector);\n});\nvar lookup = function () {\n var selToFn = {};\n var s;\n for (var i = 0; i < stateSelectors.length; i++) {\n s = stateSelectors[i];\n selToFn[s.selector] = s.matches;\n }\n return selToFn;\n}();\nvar stateSelectorMatches = function stateSelectorMatches(sel, ele) {\n return lookup[sel](ele);\n};\nvar stateSelectorRegex = '(' + stateSelectors.map(function (s) {\n return s.selector;\n}).join('|') + ')';\n\n// when a token like a variable has escaped meta characters, we need to clean the backslashes out\n// so that values get compared properly in Selector.filter()\nvar cleanMetaChars = function cleanMetaChars(str) {\n return str.replace(new RegExp('\\\\\\\\(' + tokens.metaChar + ')', 'g'), function (match, $1) {\n return $1;\n });\n};\nvar replaceLastQuery = function replaceLastQuery(selector, examiningQuery, replacementQuery) {\n selector[selector.length - 1] = replacementQuery;\n};\n\n// NOTE: add new expression syntax here to have it recognised by the parser;\n// - a query contains all adjacent (i.e. no separator in between) expressions;\n// - the current query is stored in selector[i]\n// - you need to check the query objects in match() for it actually filter properly, but that's pretty straight forward\nvar exprs = [{\n name: 'group',\n // just used for identifying when debugging\n query: true,\n regex: '(' + tokens.group + ')',\n populate: function populate(selector, query, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n group = _ref2[0];\n query.checks.push({\n type: Type.GROUP,\n value: group === '*' ? group : group + 's'\n });\n }\n}, {\n name: 'state',\n query: true,\n regex: stateSelectorRegex,\n populate: function populate(selector, query, _ref3) {\n var _ref4 = _slicedToArray(_ref3, 1),\n state = _ref4[0];\n query.checks.push({\n type: Type.STATE,\n value: state\n });\n }\n}, {\n name: 'id',\n query: true,\n regex: '\\\\#(' + tokens.id + ')',\n populate: function populate(selector, query, _ref5) {\n var _ref6 = _slicedToArray(_ref5, 1),\n id = _ref6[0];\n query.checks.push({\n type: Type.ID,\n value: cleanMetaChars(id)\n });\n }\n}, {\n name: 'className',\n query: true,\n regex: '\\\\.(' + tokens.className + ')',\n populate: function populate(selector, query, _ref7) {\n var _ref8 = _slicedToArray(_ref7, 1),\n className = _ref8[0];\n query.checks.push({\n type: Type.CLASS,\n value: cleanMetaChars(className)\n });\n }\n}, {\n name: 'dataExists',\n query: true,\n regex: '\\\\[\\\\s*(' + tokens.variable + ')\\\\s*\\\\]',\n populate: function populate(selector, query, _ref9) {\n var _ref10 = _slicedToArray(_ref9, 1),\n variable = _ref10[0];\n query.checks.push({\n type: Type.DATA_EXIST,\n field: cleanMetaChars(variable)\n });\n }\n}, {\n name: 'dataCompare',\n query: true,\n regex: '\\\\[\\\\s*(' + tokens.variable + ')\\\\s*(' + tokens.comparatorOp + ')\\\\s*(' + tokens.value + ')\\\\s*\\\\]',\n populate: function populate(selector, query, _ref11) {\n var _ref12 = _slicedToArray(_ref11, 3),\n variable = _ref12[0],\n comparatorOp = _ref12[1],\n value = _ref12[2];\n var valueIsString = new RegExp('^' + tokens.string + '$').exec(value) != null;\n if (valueIsString) {\n value = value.substring(1, value.length - 1);\n } else {\n value = parseFloat(value);\n }\n query.checks.push({\n type: Type.DATA_COMPARE,\n field: cleanMetaChars(variable),\n operator: comparatorOp,\n value: value\n });\n }\n}, {\n name: 'dataBool',\n query: true,\n regex: '\\\\[\\\\s*(' + tokens.boolOp + ')\\\\s*(' + tokens.variable + ')\\\\s*\\\\]',\n populate: function populate(selector, query, _ref13) {\n var _ref14 = _slicedToArray(_ref13, 2),\n boolOp = _ref14[0],\n variable = _ref14[1];\n query.checks.push({\n type: Type.DATA_BOOL,\n field: cleanMetaChars(variable),\n operator: boolOp\n });\n }\n}, {\n name: 'metaCompare',\n query: true,\n regex: '\\\\[\\\\[\\\\s*(' + tokens.meta + ')\\\\s*(' + tokens.comparatorOp + ')\\\\s*(' + tokens.number + ')\\\\s*\\\\]\\\\]',\n populate: function populate(selector, query, _ref15) {\n var _ref16 = _slicedToArray(_ref15, 3),\n meta = _ref16[0],\n comparatorOp = _ref16[1],\n number = _ref16[2];\n query.checks.push({\n type: Type.META_COMPARE,\n field: cleanMetaChars(meta),\n operator: comparatorOp,\n value: parseFloat(number)\n });\n }\n}, {\n name: 'nextQuery',\n separator: true,\n regex: tokens.separator,\n populate: function populate(selector, query) {\n var currentSubject = selector.currentSubject;\n var edgeCount = selector.edgeCount;\n var compoundCount = selector.compoundCount;\n var lastQ = selector[selector.length - 1];\n if (currentSubject != null) {\n lastQ.subject = currentSubject;\n selector.currentSubject = null;\n }\n lastQ.edgeCount = edgeCount;\n lastQ.compoundCount = compoundCount;\n selector.edgeCount = 0;\n selector.compoundCount = 0;\n\n // go on to next query\n var nextQuery = selector[selector.length++] = newQuery();\n return nextQuery; // this is the new query to be filled by the following exprs\n }\n}, {\n name: 'directedEdge',\n separator: true,\n regex: tokens.directedEdge,\n populate: function populate(selector, query) {\n if (selector.currentSubject == null) {\n // undirected edge\n var edgeQuery = newQuery();\n var source = query;\n var target = newQuery();\n edgeQuery.checks.push({\n type: Type.DIRECTED_EDGE,\n source: source,\n target: target\n });\n\n // the query in the selector should be the edge rather than the source\n replaceLastQuery(selector, query, edgeQuery);\n selector.edgeCount++;\n\n // we're now populating the target query with expressions that follow\n return target;\n } else {\n // source/target\n var srcTgtQ = newQuery();\n var _source = query;\n var _target = newQuery();\n srcTgtQ.checks.push({\n type: Type.NODE_SOURCE,\n source: _source,\n target: _target\n });\n\n // the query in the selector should be the neighbourhood rather than the node\n replaceLastQuery(selector, query, srcTgtQ);\n selector.edgeCount++;\n return _target; // now populating the target with the following expressions\n }\n }\n}, {\n name: 'undirectedEdge',\n separator: true,\n regex: tokens.undirectedEdge,\n populate: function populate(selector, query) {\n if (selector.currentSubject == null) {\n // undirected edge\n var edgeQuery = newQuery();\n var source = query;\n var target = newQuery();\n edgeQuery.checks.push({\n type: Type.UNDIRECTED_EDGE,\n nodes: [source, target]\n });\n\n // the query in the selector should be the edge rather than the source\n replaceLastQuery(selector, query, edgeQuery);\n selector.edgeCount++;\n\n // we're now populating the target query with expressions that follow\n return target;\n } else {\n // neighbourhood\n var nhoodQ = newQuery();\n var node = query;\n var neighbor = newQuery();\n nhoodQ.checks.push({\n type: Type.NODE_NEIGHBOR,\n node: node,\n neighbor: neighbor\n });\n\n // the query in the selector should be the neighbourhood rather than the node\n replaceLastQuery(selector, query, nhoodQ);\n return neighbor; // now populating the neighbor with following expressions\n }\n }\n}, {\n name: 'child',\n separator: true,\n regex: tokens.child,\n populate: function populate(selector, query) {\n if (selector.currentSubject == null) {\n // default: child query\n var parentChildQuery = newQuery();\n var child = newQuery();\n var parent = selector[selector.length - 1];\n parentChildQuery.checks.push({\n type: Type.CHILD,\n parent: parent,\n child: child\n });\n\n // the query in the selector should be the '>' itself\n replaceLastQuery(selector, query, parentChildQuery);\n selector.compoundCount++;\n\n // we're now populating the child query with expressions that follow\n return child;\n } else if (selector.currentSubject === query) {\n // compound split query\n var compound = newQuery();\n var left = selector[selector.length - 1];\n var right = newQuery();\n var subject = newQuery();\n var _child = newQuery();\n var _parent = newQuery();\n\n // set up the root compound q\n compound.checks.push({\n type: Type.COMPOUND_SPLIT,\n left: left,\n right: right,\n subject: subject\n });\n\n // populate the subject and replace the q at the old spot (within left) with TRUE\n subject.checks = query.checks; // take the checks from the left\n query.checks = [{\n type: Type.TRUE\n }]; // checks under left refs the subject implicitly\n\n // set up the right q\n _parent.checks.push({\n type: Type.TRUE\n }); // parent implicitly refs the subject\n right.checks.push({\n type: Type.PARENT,\n // type is swapped on right side queries\n parent: _parent,\n child: _child // empty for now\n });\n\n replaceLastQuery(selector, left, compound);\n\n // update the ref since we moved things around for `query`\n selector.currentSubject = subject;\n selector.compoundCount++;\n return _child; // now populating the right side's child\n } else {\n // parent query\n // info for parent query\n var _parent2 = newQuery();\n var _child2 = newQuery();\n var pcQChecks = [{\n type: Type.PARENT,\n parent: _parent2,\n child: _child2\n }];\n\n // the parent-child query takes the place of the query previously being populated\n _parent2.checks = query.checks; // the previous query contains the checks for the parent\n query.checks = pcQChecks; // pc query takes over\n\n selector.compoundCount++;\n return _child2; // we're now populating the child\n }\n }\n}, {\n name: 'descendant',\n separator: true,\n regex: tokens.descendant,\n populate: function populate(selector, query) {\n if (selector.currentSubject == null) {\n // default: descendant query\n var ancChQuery = newQuery();\n var descendant = newQuery();\n var ancestor = selector[selector.length - 1];\n ancChQuery.checks.push({\n type: Type.DESCENDANT,\n ancestor: ancestor,\n descendant: descendant\n });\n\n // the query in the selector should be the '>' itself\n replaceLastQuery(selector, query, ancChQuery);\n selector.compoundCount++;\n\n // we're now populating the descendant query with expressions that follow\n return descendant;\n } else if (selector.currentSubject === query) {\n // compound split query\n var compound = newQuery();\n var left = selector[selector.length - 1];\n var right = newQuery();\n var subject = newQuery();\n var _descendant = newQuery();\n var _ancestor = newQuery();\n\n // set up the root compound q\n compound.checks.push({\n type: Type.COMPOUND_SPLIT,\n left: left,\n right: right,\n subject: subject\n });\n\n // populate the subject and replace the q at the old spot (within left) with TRUE\n subject.checks = query.checks; // take the checks from the left\n query.checks = [{\n type: Type.TRUE\n }]; // checks under left refs the subject implicitly\n\n // set up the right q\n _ancestor.checks.push({\n type: Type.TRUE\n }); // ancestor implicitly refs the subject\n right.checks.push({\n type: Type.ANCESTOR,\n // type is swapped on right side queries\n ancestor: _ancestor,\n descendant: _descendant // empty for now\n });\n\n replaceLastQuery(selector, left, compound);\n\n // update the ref since we moved things around for `query`\n selector.currentSubject = subject;\n selector.compoundCount++;\n return _descendant; // now populating the right side's descendant\n } else {\n // ancestor query\n // info for parent query\n var _ancestor2 = newQuery();\n var _descendant2 = newQuery();\n var adQChecks = [{\n type: Type.ANCESTOR,\n ancestor: _ancestor2,\n descendant: _descendant2\n }];\n\n // the parent-child query takes the place of the query previously being populated\n _ancestor2.checks = query.checks; // the previous query contains the checks for the parent\n query.checks = adQChecks; // pc query takes over\n\n selector.compoundCount++;\n return _descendant2; // we're now populating the child\n }\n }\n}, {\n name: 'subject',\n modifier: true,\n regex: tokens.subject,\n populate: function populate(selector, query) {\n if (selector.currentSubject != null && selector.currentSubject !== query) {\n warn('Redefinition of subject in selector `' + selector.toString() + '`');\n return false;\n }\n selector.currentSubject = query;\n var topQ = selector[selector.length - 1];\n var topChk = topQ.checks[0];\n var topType = topChk == null ? null : topChk.type;\n if (topType === Type.DIRECTED_EDGE) {\n // directed edge with subject on the target\n\n // change to target node check\n topChk.type = Type.NODE_TARGET;\n } else if (topType === Type.UNDIRECTED_EDGE) {\n // undirected edge with subject on the second node\n\n // change to neighbor check\n topChk.type = Type.NODE_NEIGHBOR;\n topChk.node = topChk.nodes[1]; // second node is subject\n topChk.neighbor = topChk.nodes[0];\n\n // clean up unused fields for new type\n topChk.nodes = null;\n }\n }\n}];\nexprs.forEach(function (e) {\n return e.regexObj = new RegExp('^' + e.regex);\n});\n\n/**\n * Of all the expressions, find the first match in the remaining text.\n * @param {string} remaining The remaining text to parse\n * @returns The matched expression and the newly remaining text `{ expr, match, name, remaining }`\n */\nvar consumeExpr = function consumeExpr(remaining) {\n var expr;\n var match;\n var name;\n for (var j = 0; j < exprs.length; j++) {\n var e = exprs[j];\n var n = e.name;\n var m = remaining.match(e.regexObj);\n if (m != null) {\n match = m;\n expr = e;\n name = n;\n var consumed = m[0];\n remaining = remaining.substring(consumed.length);\n break; // we've consumed one expr, so we can return now\n }\n }\n\n return {\n expr: expr,\n match: match,\n name: name,\n remaining: remaining\n };\n};\n\n/**\n * Consume all the leading whitespace\n * @param {string} remaining The text to consume\n * @returns The text with the leading whitespace removed\n */\nvar consumeWhitespace = function consumeWhitespace(remaining) {\n var match = remaining.match(/^\\s+/);\n if (match) {\n var consumed = match[0];\n remaining = remaining.substring(consumed.length);\n }\n return remaining;\n};\n\n/**\n * Parse the string and store the parsed representation in the Selector.\n * @param {string} selector The selector string\n * @returns `true` if the selector was successfully parsed, `false` otherwise\n */\nvar parse = function parse(selector) {\n var self = this;\n var remaining = self.inputText = selector;\n var currentQuery = self[0] = newQuery();\n self.length = 1;\n remaining = consumeWhitespace(remaining); // get rid of leading whitespace\n\n for (;;) {\n var exprInfo = consumeExpr(remaining);\n if (exprInfo.expr == null) {\n warn('The selector `' + selector + '`is invalid');\n return false;\n } else {\n var args = exprInfo.match.slice(1);\n\n // let the token populate the selector object in currentQuery\n var ret = exprInfo.expr.populate(self, currentQuery, args);\n if (ret === false) {\n return false; // exit if population failed\n } else if (ret != null) {\n currentQuery = ret; // change the current query to be filled if the expr specifies\n }\n }\n\n remaining = exprInfo.remaining;\n\n // we're done when there's nothing left to parse\n if (remaining.match(/^\\s*$/)) {\n break;\n }\n }\n var lastQ = self[self.length - 1];\n if (self.currentSubject != null) {\n lastQ.subject = self.currentSubject;\n }\n lastQ.edgeCount = self.edgeCount;\n lastQ.compoundCount = self.compoundCount;\n for (var i = 0; i < self.length; i++) {\n var q = self[i];\n\n // in future, this could potentially be allowed if there were operator precedence and detection of invalid combinations\n if (q.compoundCount > 0 && q.edgeCount > 0) {\n warn('The selector `' + selector + '` is invalid because it uses both a compound selector and an edge selector');\n return false;\n }\n if (q.edgeCount > 1) {\n warn('The selector `' + selector + '` is invalid because it uses multiple edge selectors');\n return false;\n } else if (q.edgeCount === 1) {\n warn('The selector `' + selector + '` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.');\n }\n }\n return true; // success\n};\n\n/**\n * Get the selector represented as a string. This value uses default formatting,\n * so things like spacing may differ from the input text passed to the constructor.\n * @returns {string} The selector string\n */\nvar toString = function toString() {\n if (this.toStringCache != null) {\n return this.toStringCache;\n }\n var clean = function clean(obj) {\n if (obj == null) {\n return '';\n } else {\n return obj;\n }\n };\n var cleanVal = function cleanVal(val) {\n if (string(val)) {\n return '\"' + val + '\"';\n } else {\n return clean(val);\n }\n };\n var space = function space(val) {\n return ' ' + val + ' ';\n };\n var checkToString = function checkToString(check, subject) {\n var type = check.type,\n value = check.value;\n switch (type) {\n case Type.GROUP:\n {\n var group = clean(value);\n return group.substring(0, group.length - 1);\n }\n case Type.DATA_COMPARE:\n {\n var field = check.field,\n operator = check.operator;\n return '[' + field + space(clean(operator)) + cleanVal(value) + ']';\n }\n case Type.DATA_BOOL:\n {\n var _operator = check.operator,\n _field = check.field;\n return '[' + clean(_operator) + _field + ']';\n }\n case Type.DATA_EXIST:\n {\n var _field2 = check.field;\n return '[' + _field2 + ']';\n }\n case Type.META_COMPARE:\n {\n var _operator2 = check.operator,\n _field3 = check.field;\n return '[[' + _field3 + space(clean(_operator2)) + cleanVal(value) + ']]';\n }\n case Type.STATE:\n {\n return value;\n }\n case Type.ID:\n {\n return '#' + value;\n }\n case Type.CLASS:\n {\n return '.' + value;\n }\n case Type.PARENT:\n case Type.CHILD:\n {\n return queryToString(check.parent, subject) + space('>') + queryToString(check.child, subject);\n }\n case Type.ANCESTOR:\n case Type.DESCENDANT:\n {\n return queryToString(check.ancestor, subject) + ' ' + queryToString(check.descendant, subject);\n }\n case Type.COMPOUND_SPLIT:\n {\n var lhs = queryToString(check.left, subject);\n var sub = queryToString(check.subject, subject);\n var rhs = queryToString(check.right, subject);\n return lhs + (lhs.length > 0 ? ' ' : '') + sub + rhs;\n }\n case Type.TRUE:\n {\n return '';\n }\n }\n };\n var queryToString = function queryToString(query, subject) {\n return query.checks.reduce(function (str, chk, i) {\n return str + (subject === query && i === 0 ? '$' : '') + checkToString(chk, subject);\n }, '');\n };\n var str = '';\n for (var i = 0; i < this.length; i++) {\n var query = this[i];\n str += queryToString(query, query.subject);\n if (this.length > 1 && i < this.length - 1) {\n str += ', ';\n }\n }\n this.toStringCache = str;\n return str;\n};\nvar parse$1 = {\n parse: parse,\n toString: toString\n};\n\nvar valCmp = function valCmp(fieldVal, operator, value) {\n var matches;\n var isFieldStr = string(fieldVal);\n var isFieldNum = number$1(fieldVal);\n var isValStr = string(value);\n var fieldStr, valStr;\n var caseInsensitive = false;\n var notExpr = false;\n var isIneqCmp = false;\n if (operator.indexOf('!') >= 0) {\n operator = operator.replace('!', '');\n notExpr = true;\n }\n if (operator.indexOf('@') >= 0) {\n operator = operator.replace('@', '');\n caseInsensitive = true;\n }\n if (isFieldStr || isValStr || caseInsensitive) {\n fieldStr = !isFieldStr && !isFieldNum ? '' : '' + fieldVal;\n valStr = '' + value;\n }\n\n // if we're doing a case insensitive comparison, then we're using a STRING comparison\n // even if we're comparing numbers\n if (caseInsensitive) {\n fieldVal = fieldStr = fieldStr.toLowerCase();\n value = valStr = valStr.toLowerCase();\n }\n switch (operator) {\n case '*=':\n matches = fieldStr.indexOf(valStr) >= 0;\n break;\n case '$=':\n matches = fieldStr.indexOf(valStr, fieldStr.length - valStr.length) >= 0;\n break;\n case '^=':\n matches = fieldStr.indexOf(valStr) === 0;\n break;\n case '=':\n matches = fieldVal === value;\n break;\n case '>':\n isIneqCmp = true;\n matches = fieldVal > value;\n break;\n case '>=':\n isIneqCmp = true;\n matches = fieldVal >= value;\n break;\n case '<':\n isIneqCmp = true;\n matches = fieldVal < value;\n break;\n case '<=':\n isIneqCmp = true;\n matches = fieldVal <= value;\n break;\n default:\n matches = false;\n break;\n }\n\n // apply the not op, but null vals for inequalities should always stay non-matching\n if (notExpr && (fieldVal != null || !isIneqCmp)) {\n matches = !matches;\n }\n return matches;\n};\nvar boolCmp = function boolCmp(fieldVal, operator) {\n switch (operator) {\n case '?':\n return fieldVal ? true : false;\n case '!':\n return fieldVal ? false : true;\n case '^':\n return fieldVal === undefined;\n }\n};\nvar existCmp = function existCmp(fieldVal) {\n return fieldVal !== undefined;\n};\nvar data$1 = function data(ele, field) {\n return ele.data(field);\n};\nvar meta = function meta(ele, field) {\n return ele[field]();\n};\n\n/** A lookup of `match(check, ele)` functions by `Type` int */\nvar match = [];\n\n/**\n * Returns whether the query matches for the element\n * @param query The `{ type, value, ... }` query object\n * @param ele The element to compare against\n*/\nvar matches$1 = function matches(query, ele) {\n return query.checks.every(function (chk) {\n return match[chk.type](chk, ele);\n });\n};\nmatch[Type.GROUP] = function (check, ele) {\n var group = check.value;\n return group === '*' || group === ele.group();\n};\nmatch[Type.STATE] = function (check, ele) {\n var stateSelector = check.value;\n return stateSelectorMatches(stateSelector, ele);\n};\nmatch[Type.ID] = function (check, ele) {\n var id = check.value;\n return ele.id() === id;\n};\nmatch[Type.CLASS] = function (check, ele) {\n var cls = check.value;\n return ele.hasClass(cls);\n};\nmatch[Type.META_COMPARE] = function (check, ele) {\n var field = check.field,\n operator = check.operator,\n value = check.value;\n return valCmp(meta(ele, field), operator, value);\n};\nmatch[Type.DATA_COMPARE] = function (check, ele) {\n var field = check.field,\n operator = check.operator,\n value = check.value;\n return valCmp(data$1(ele, field), operator, value);\n};\nmatch[Type.DATA_BOOL] = function (check, ele) {\n var field = check.field,\n operator = check.operator;\n return boolCmp(data$1(ele, field), operator);\n};\nmatch[Type.DATA_EXIST] = function (check, ele) {\n var field = check.field;\n check.operator;\n return existCmp(data$1(ele, field));\n};\nmatch[Type.UNDIRECTED_EDGE] = function (check, ele) {\n var qA = check.nodes[0];\n var qB = check.nodes[1];\n var src = ele.source();\n var tgt = ele.target();\n return matches$1(qA, src) && matches$1(qB, tgt) || matches$1(qB, src) && matches$1(qA, tgt);\n};\nmatch[Type.NODE_NEIGHBOR] = function (check, ele) {\n return matches$1(check.node, ele) && ele.neighborhood().some(function (n) {\n return n.isNode() && matches$1(check.neighbor, n);\n });\n};\nmatch[Type.DIRECTED_EDGE] = function (check, ele) {\n return matches$1(check.source, ele.source()) && matches$1(check.target, ele.target());\n};\nmatch[Type.NODE_SOURCE] = function (check, ele) {\n return matches$1(check.source, ele) && ele.outgoers().some(function (n) {\n return n.isNode() && matches$1(check.target, n);\n });\n};\nmatch[Type.NODE_TARGET] = function (check, ele) {\n return matches$1(check.target, ele) && ele.incomers().some(function (n) {\n return n.isNode() && matches$1(check.source, n);\n });\n};\nmatch[Type.CHILD] = function (check, ele) {\n return matches$1(check.child, ele) && matches$1(check.parent, ele.parent());\n};\nmatch[Type.PARENT] = function (check, ele) {\n return matches$1(check.parent, ele) && ele.children().some(function (c) {\n return matches$1(check.child, c);\n });\n};\nmatch[Type.DESCENDANT] = function (check, ele) {\n return matches$1(check.descendant, ele) && ele.ancestors().some(function (a) {\n return matches$1(check.ancestor, a);\n });\n};\nmatch[Type.ANCESTOR] = function (check, ele) {\n return matches$1(check.ancestor, ele) && ele.descendants().some(function (d) {\n return matches$1(check.descendant, d);\n });\n};\nmatch[Type.COMPOUND_SPLIT] = function (check, ele) {\n return matches$1(check.subject, ele) && matches$1(check.left, ele) && matches$1(check.right, ele);\n};\nmatch[Type.TRUE] = function () {\n return true;\n};\nmatch[Type.COLLECTION] = function (check, ele) {\n var collection = check.value;\n return collection.has(ele);\n};\nmatch[Type.FILTER] = function (check, ele) {\n var filter = check.value;\n return filter(ele);\n};\n\n// filter an existing collection\nvar filter = function filter(collection) {\n var self = this;\n\n // for 1 id #foo queries, just get the element\n if (self.length === 1 && self[0].checks.length === 1 && self[0].checks[0].type === Type.ID) {\n return collection.getElementById(self[0].checks[0].value).collection();\n }\n var selectorFunction = function selectorFunction(element) {\n for (var j = 0; j < self.length; j++) {\n var query = self[j];\n if (matches$1(query, element)) {\n return true;\n }\n }\n return false;\n };\n if (self.text() == null) {\n selectorFunction = function selectorFunction() {\n return true;\n };\n }\n return collection.filter(selectorFunction);\n}; // filter\n\n// does selector match a single element?\nvar matches = function matches(ele) {\n var self = this;\n for (var j = 0; j < self.length; j++) {\n var query = self[j];\n if (matches$1(query, ele)) {\n return true;\n }\n }\n return false;\n}; // matches\n\nvar matching = {\n matches: matches,\n filter: filter\n};\n\nvar Selector = function Selector(selector) {\n this.inputText = selector;\n this.currentSubject = null;\n this.compoundCount = 0;\n this.edgeCount = 0;\n this.length = 0;\n if (selector == null || string(selector) && selector.match(/^\\s*$/)) ; else if (elementOrCollection(selector)) {\n this.addQuery({\n checks: [{\n type: Type.COLLECTION,\n value: selector.collection()\n }]\n });\n } else if (fn$6(selector)) {\n this.addQuery({\n checks: [{\n type: Type.FILTER,\n value: selector\n }]\n });\n } else if (string(selector)) {\n if (!this.parse(selector)) {\n this.invalid = true;\n }\n } else {\n error('A selector must be created from a string; found ');\n }\n};\nvar selfn = Selector.prototype;\n[parse$1, matching].forEach(function (p) {\n return extend(selfn, p);\n});\nselfn.text = function () {\n return this.inputText;\n};\nselfn.size = function () {\n return this.length;\n};\nselfn.eq = function (i) {\n return this[i];\n};\nselfn.sameText = function (otherSel) {\n return !this.invalid && !otherSel.invalid && this.text() === otherSel.text();\n};\nselfn.addQuery = function (q) {\n this[this.length++] = q;\n};\nselfn.selector = selfn.toString;\n\nvar elesfn$g = {\n allAre: function allAre(selector) {\n var selObj = new Selector(selector);\n return this.every(function (ele) {\n return selObj.matches(ele);\n });\n },\n is: function is(selector) {\n var selObj = new Selector(selector);\n return this.some(function (ele) {\n return selObj.matches(ele);\n });\n },\n some: function some(fn, thisArg) {\n for (var i = 0; i < this.length; i++) {\n var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]);\n if (ret) {\n return true;\n }\n }\n return false;\n },\n every: function every(fn, thisArg) {\n for (var i = 0; i < this.length; i++) {\n var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]);\n if (!ret) {\n return false;\n }\n }\n return true;\n },\n same: function same(collection) {\n // cheap collection ref check\n if (this === collection) {\n return true;\n }\n collection = this.cy().collection(collection);\n var thisLength = this.length;\n var collectionLength = collection.length;\n\n // cheap length check\n if (thisLength !== collectionLength) {\n return false;\n }\n\n // cheap element ref check\n if (thisLength === 1) {\n return this[0] === collection[0];\n }\n return this.every(function (ele) {\n return collection.hasElementWithId(ele.id());\n });\n },\n anySame: function anySame(collection) {\n collection = this.cy().collection(collection);\n return this.some(function (ele) {\n return collection.hasElementWithId(ele.id());\n });\n },\n allAreNeighbors: function allAreNeighbors(collection) {\n collection = this.cy().collection(collection);\n var nhood = this.neighborhood();\n return collection.every(function (ele) {\n return nhood.hasElementWithId(ele.id());\n });\n },\n contains: function contains(collection) {\n collection = this.cy().collection(collection);\n var self = this;\n return collection.every(function (ele) {\n return self.hasElementWithId(ele.id());\n });\n }\n};\nelesfn$g.allAreNeighbours = elesfn$g.allAreNeighbors;\nelesfn$g.has = elesfn$g.contains;\nelesfn$g.equal = elesfn$g.equals = elesfn$g.same;\n\nvar cache = function cache(fn, name) {\n return function traversalCache(arg1, arg2, arg3, arg4) {\n var selectorOrEles = arg1;\n var eles = this;\n var key;\n if (selectorOrEles == null) {\n key = '';\n } else if (elementOrCollection(selectorOrEles) && selectorOrEles.length === 1) {\n key = selectorOrEles.id();\n }\n if (eles.length === 1 && key) {\n var _p = eles[0]._private;\n var tch = _p.traversalCache = _p.traversalCache || {};\n var ch = tch[name] = tch[name] || [];\n var hash = hashString(key);\n var cacheHit = ch[hash];\n if (cacheHit) {\n return cacheHit;\n } else {\n return ch[hash] = fn.call(eles, arg1, arg2, arg3, arg4);\n }\n } else {\n return fn.call(eles, arg1, arg2, arg3, arg4);\n }\n };\n};\n\nvar elesfn$f = {\n parent: function parent(selector) {\n var parents = [];\n\n // optimisation for single ele call\n if (this.length === 1) {\n var parent = this[0]._private.parent;\n if (parent) {\n return parent;\n }\n }\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var _parent = ele._private.parent;\n if (_parent) {\n parents.push(_parent);\n }\n }\n return this.spawn(parents, true).filter(selector);\n },\n parents: function parents(selector) {\n var parents = [];\n var eles = this.parent();\n while (eles.nonempty()) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n parents.push(ele);\n }\n eles = eles.parent();\n }\n return this.spawn(parents, true).filter(selector);\n },\n commonAncestors: function commonAncestors(selector) {\n var ancestors;\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var parents = ele.parents();\n ancestors = ancestors || parents;\n ancestors = ancestors.intersect(parents); // current list must be common with current ele parents set\n }\n\n return ancestors.filter(selector);\n },\n orphans: function orphans(selector) {\n return this.stdFilter(function (ele) {\n return ele.isOrphan();\n }).filter(selector);\n },\n nonorphans: function nonorphans(selector) {\n return this.stdFilter(function (ele) {\n return ele.isChild();\n }).filter(selector);\n },\n children: cache(function (selector) {\n var children = [];\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var eleChildren = ele._private.children;\n for (var j = 0; j < eleChildren.length; j++) {\n children.push(eleChildren[j]);\n }\n }\n return this.spawn(children, true).filter(selector);\n }, 'children'),\n siblings: function siblings(selector) {\n return this.parent().children().not(this).filter(selector);\n },\n isParent: function isParent() {\n var ele = this[0];\n if (ele) {\n return ele.isNode() && ele._private.children.length !== 0;\n }\n },\n isChildless: function isChildless() {\n var ele = this[0];\n if (ele) {\n return ele.isNode() && ele._private.children.length === 0;\n }\n },\n isChild: function isChild() {\n var ele = this[0];\n if (ele) {\n return ele.isNode() && ele._private.parent != null;\n }\n },\n isOrphan: function isOrphan() {\n var ele = this[0];\n if (ele) {\n return ele.isNode() && ele._private.parent == null;\n }\n },\n descendants: function descendants(selector) {\n var elements = [];\n function add(eles) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n elements.push(ele);\n if (ele.children().nonempty()) {\n add(ele.children());\n }\n }\n }\n add(this.children());\n return this.spawn(elements, true).filter(selector);\n }\n};\nfunction forEachCompound(eles, fn, includeSelf, recursiveStep) {\n var q = [];\n var did = new Set$1();\n var cy = eles.cy();\n var hasCompounds = cy.hasCompoundNodes();\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (includeSelf) {\n q.push(ele);\n } else if (hasCompounds) {\n recursiveStep(q, did, ele);\n }\n }\n while (q.length > 0) {\n var _ele = q.shift();\n fn(_ele);\n did.add(_ele.id());\n if (hasCompounds) {\n recursiveStep(q, did, _ele);\n }\n }\n return eles;\n}\nfunction addChildren(q, did, ele) {\n if (ele.isParent()) {\n var children = ele._private.children;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (!did.has(child.id())) {\n q.push(child);\n }\n }\n }\n}\n\n// very efficient version of eles.add( eles.descendants() ).forEach()\n// for internal use\nelesfn$f.forEachDown = function (fn) {\n var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n return forEachCompound(this, fn, includeSelf, addChildren);\n};\nfunction addParent(q, did, ele) {\n if (ele.isChild()) {\n var parent = ele._private.parent;\n if (!did.has(parent.id())) {\n q.push(parent);\n }\n }\n}\nelesfn$f.forEachUp = function (fn) {\n var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n return forEachCompound(this, fn, includeSelf, addParent);\n};\nfunction addParentAndChildren(q, did, ele) {\n addParent(q, did, ele);\n addChildren(q, did, ele);\n}\nelesfn$f.forEachUpAndDown = function (fn) {\n var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n return forEachCompound(this, fn, includeSelf, addParentAndChildren);\n};\n\n// aliases\nelesfn$f.ancestors = elesfn$f.parents;\n\nvar fn$5, elesfn$e;\nfn$5 = elesfn$e = {\n data: define.data({\n field: 'data',\n bindingEvent: 'data',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'data',\n settingTriggersEvent: true,\n triggerFnName: 'trigger',\n allowGetting: true,\n immutableKeys: {\n 'id': true,\n 'source': true,\n 'target': true,\n 'parent': true\n },\n updateStyle: true\n }),\n removeData: define.removeData({\n field: 'data',\n event: 'data',\n triggerFnName: 'trigger',\n triggerEvent: true,\n immutableKeys: {\n 'id': true,\n 'source': true,\n 'target': true,\n 'parent': true\n },\n updateStyle: true\n }),\n scratch: define.data({\n field: 'scratch',\n bindingEvent: 'scratch',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'scratch',\n settingTriggersEvent: true,\n triggerFnName: 'trigger',\n allowGetting: true,\n updateStyle: true\n }),\n removeScratch: define.removeData({\n field: 'scratch',\n event: 'scratch',\n triggerFnName: 'trigger',\n triggerEvent: true,\n updateStyle: true\n }),\n rscratch: define.data({\n field: 'rscratch',\n allowBinding: false,\n allowSetting: true,\n settingTriggersEvent: false,\n allowGetting: true\n }),\n removeRscratch: define.removeData({\n field: 'rscratch',\n triggerEvent: false\n }),\n id: function id() {\n var ele = this[0];\n if (ele) {\n return ele._private.data.id;\n }\n }\n};\n\n// aliases\nfn$5.attr = fn$5.data;\nfn$5.removeAttr = fn$5.removeData;\nvar data = elesfn$e;\n\nvar elesfn$d = {};\nfunction defineDegreeFunction(callback) {\n return function (includeLoops) {\n var self = this;\n if (includeLoops === undefined) {\n includeLoops = true;\n }\n if (self.length === 0) {\n return;\n }\n if (self.isNode() && !self.removed()) {\n var degree = 0;\n var node = self[0];\n var connectedEdges = node._private.edges;\n for (var i = 0; i < connectedEdges.length; i++) {\n var edge = connectedEdges[i];\n if (!includeLoops && edge.isLoop()) {\n continue;\n }\n degree += callback(node, edge);\n }\n return degree;\n } else {\n return;\n }\n };\n}\nextend(elesfn$d, {\n degree: defineDegreeFunction(function (node, edge) {\n if (edge.source().same(edge.target())) {\n return 2;\n } else {\n return 1;\n }\n }),\n indegree: defineDegreeFunction(function (node, edge) {\n if (edge.target().same(node)) {\n return 1;\n } else {\n return 0;\n }\n }),\n outdegree: defineDegreeFunction(function (node, edge) {\n if (edge.source().same(node)) {\n return 1;\n } else {\n return 0;\n }\n })\n});\nfunction defineDegreeBoundsFunction(degreeFn, callback) {\n return function (includeLoops) {\n var ret;\n var nodes = this.nodes();\n for (var i = 0; i < nodes.length; i++) {\n var ele = nodes[i];\n var degree = ele[degreeFn](includeLoops);\n if (degree !== undefined && (ret === undefined || callback(degree, ret))) {\n ret = degree;\n }\n }\n return ret;\n };\n}\nextend(elesfn$d, {\n minDegree: defineDegreeBoundsFunction('degree', function (degree, min) {\n return degree < min;\n }),\n maxDegree: defineDegreeBoundsFunction('degree', function (degree, max) {\n return degree > max;\n }),\n minIndegree: defineDegreeBoundsFunction('indegree', function (degree, min) {\n return degree < min;\n }),\n maxIndegree: defineDegreeBoundsFunction('indegree', function (degree, max) {\n return degree > max;\n }),\n minOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, min) {\n return degree < min;\n }),\n maxOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, max) {\n return degree > max;\n })\n});\nextend(elesfn$d, {\n totalDegree: function totalDegree(includeLoops) {\n var total = 0;\n var nodes = this.nodes();\n for (var i = 0; i < nodes.length; i++) {\n total += nodes[i].degree(includeLoops);\n }\n return total;\n }\n});\n\nvar fn$4, elesfn$c;\nvar beforePositionSet = function beforePositionSet(eles, newPos, silent) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (!ele.locked()) {\n var oldPos = ele._private.position;\n var delta = {\n x: newPos.x != null ? newPos.x - oldPos.x : 0,\n y: newPos.y != null ? newPos.y - oldPos.y : 0\n };\n if (ele.isParent() && !(delta.x === 0 && delta.y === 0)) {\n ele.children().shift(delta, silent);\n }\n ele.dirtyBoundingBoxCache();\n }\n }\n};\nvar positionDef = {\n field: 'position',\n bindingEvent: 'position',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'position',\n settingTriggersEvent: true,\n triggerFnName: 'emitAndNotify',\n allowGetting: true,\n validKeys: ['x', 'y'],\n beforeGet: function beforeGet(ele) {\n ele.updateCompoundBounds();\n },\n beforeSet: function beforeSet(eles, newPos) {\n beforePositionSet(eles, newPos, false);\n },\n onSet: function onSet(eles) {\n eles.dirtyCompoundBoundsCache();\n },\n canSet: function canSet(ele) {\n return !ele.locked();\n }\n};\nfn$4 = elesfn$c = {\n position: define.data(positionDef),\n // position but no notification to renderer\n silentPosition: define.data(extend({}, positionDef, {\n allowBinding: false,\n allowSetting: true,\n settingTriggersEvent: false,\n allowGetting: false,\n beforeSet: function beforeSet(eles, newPos) {\n beforePositionSet(eles, newPos, true);\n },\n onSet: function onSet(eles) {\n eles.dirtyCompoundBoundsCache();\n }\n })),\n positions: function positions(pos, silent) {\n if (plainObject(pos)) {\n if (silent) {\n this.silentPosition(pos);\n } else {\n this.position(pos);\n }\n } else if (fn$6(pos)) {\n var _fn = pos;\n var cy = this.cy();\n cy.startBatch();\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var _pos = void 0;\n if (_pos = _fn(ele, i)) {\n if (silent) {\n ele.silentPosition(_pos);\n } else {\n ele.position(_pos);\n }\n }\n }\n cy.endBatch();\n }\n return this; // chaining\n },\n\n silentPositions: function silentPositions(pos) {\n return this.positions(pos, true);\n },\n shift: function shift(dim, val, silent) {\n var delta;\n if (plainObject(dim)) {\n delta = {\n x: number$1(dim.x) ? dim.x : 0,\n y: number$1(dim.y) ? dim.y : 0\n };\n silent = val;\n } else if (string(dim) && number$1(val)) {\n delta = {\n x: 0,\n y: 0\n };\n delta[dim] = val;\n }\n if (delta != null) {\n var cy = this.cy();\n cy.startBatch();\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n\n // exclude any node that is a descendant of the calling collection\n if (cy.hasCompoundNodes() && ele.isChild() && ele.ancestors().anySame(this)) {\n continue;\n }\n var pos = ele.position();\n var newPos = {\n x: pos.x + delta.x,\n y: pos.y + delta.y\n };\n if (silent) {\n ele.silentPosition(newPos);\n } else {\n ele.position(newPos);\n }\n }\n cy.endBatch();\n }\n return this;\n },\n silentShift: function silentShift(dim, val) {\n if (plainObject(dim)) {\n this.shift(dim, true);\n } else if (string(dim) && number$1(val)) {\n this.shift(dim, val, true);\n }\n return this;\n },\n // get/set the rendered (i.e. on screen) positon of the element\n renderedPosition: function renderedPosition(dim, val) {\n var ele = this[0];\n var cy = this.cy();\n var zoom = cy.zoom();\n var pan = cy.pan();\n var rpos = plainObject(dim) ? dim : undefined;\n var setting = rpos !== undefined || val !== undefined && string(dim);\n if (ele && ele.isNode()) {\n // must have an element and must be a node to return position\n if (setting) {\n for (var i = 0; i < this.length; i++) {\n var _ele = this[i];\n if (val !== undefined) {\n // set one dimension\n _ele.position(dim, (val - pan[dim]) / zoom);\n } else if (rpos !== undefined) {\n // set whole position\n _ele.position(renderedToModelPosition(rpos, zoom, pan));\n }\n }\n } else {\n // getting\n var pos = ele.position();\n rpos = modelToRenderedPosition(pos, zoom, pan);\n if (dim === undefined) {\n // then return the whole rendered position\n return rpos;\n } else {\n // then return the specified dimension\n return rpos[dim];\n }\n }\n } else if (!setting) {\n return undefined; // for empty collection case\n }\n\n return this; // chaining\n },\n\n // get/set the position relative to the parent\n relativePosition: function relativePosition(dim, val) {\n var ele = this[0];\n var cy = this.cy();\n var ppos = plainObject(dim) ? dim : undefined;\n var setting = ppos !== undefined || val !== undefined && string(dim);\n var hasCompoundNodes = cy.hasCompoundNodes();\n if (ele && ele.isNode()) {\n // must have an element and must be a node to return position\n if (setting) {\n for (var i = 0; i < this.length; i++) {\n var _ele2 = this[i];\n var parent = hasCompoundNodes ? _ele2.parent() : null;\n var hasParent = parent && parent.length > 0;\n var relativeToParent = hasParent;\n if (hasParent) {\n parent = parent[0];\n }\n var origin = relativeToParent ? parent.position() : {\n x: 0,\n y: 0\n };\n if (val !== undefined) {\n // set one dimension\n _ele2.position(dim, val + origin[dim]);\n } else if (ppos !== undefined) {\n // set whole position\n _ele2.position({\n x: ppos.x + origin.x,\n y: ppos.y + origin.y\n });\n }\n }\n } else {\n // getting\n var pos = ele.position();\n var _parent = hasCompoundNodes ? ele.parent() : null;\n var _hasParent = _parent && _parent.length > 0;\n var _relativeToParent = _hasParent;\n if (_hasParent) {\n _parent = _parent[0];\n }\n var _origin = _relativeToParent ? _parent.position() : {\n x: 0,\n y: 0\n };\n ppos = {\n x: pos.x - _origin.x,\n y: pos.y - _origin.y\n };\n if (dim === undefined) {\n // then return the whole rendered position\n return ppos;\n } else {\n // then return the specified dimension\n return ppos[dim];\n }\n }\n } else if (!setting) {\n return undefined; // for empty collection case\n }\n\n return this; // chaining\n }\n};\n\n// aliases\nfn$4.modelPosition = fn$4.point = fn$4.position;\nfn$4.modelPositions = fn$4.points = fn$4.positions;\nfn$4.renderedPoint = fn$4.renderedPosition;\nfn$4.relativePoint = fn$4.relativePosition;\nvar position = elesfn$c;\n\nvar fn$3, elesfn$b;\nfn$3 = elesfn$b = {};\nelesfn$b.renderedBoundingBox = function (options) {\n var bb = this.boundingBox(options);\n var cy = this.cy();\n var zoom = cy.zoom();\n var pan = cy.pan();\n var x1 = bb.x1 * zoom + pan.x;\n var x2 = bb.x2 * zoom + pan.x;\n var y1 = bb.y1 * zoom + pan.y;\n var y2 = bb.y2 * zoom + pan.y;\n return {\n x1: x1,\n x2: x2,\n y1: y1,\n y2: y2,\n w: x2 - x1,\n h: y2 - y1\n };\n};\nelesfn$b.dirtyCompoundBoundsCache = function () {\n var silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var cy = this.cy();\n if (!cy.styleEnabled() || !cy.hasCompoundNodes()) {\n return this;\n }\n this.forEachUp(function (ele) {\n if (ele.isParent()) {\n var _p = ele._private;\n _p.compoundBoundsClean = false;\n _p.bbCache = null;\n if (!silent) {\n ele.emitAndNotify('bounds');\n }\n }\n });\n return this;\n};\nelesfn$b.updateCompoundBounds = function () {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var cy = this.cy();\n\n // not possible to do on non-compound graphs or with the style disabled\n if (!cy.styleEnabled() || !cy.hasCompoundNodes()) {\n return this;\n }\n\n // save cycles when batching -- but bounds will be stale (or not exist yet)\n if (!force && cy.batching()) {\n return this;\n }\n function update(parent) {\n if (!parent.isParent()) {\n return;\n }\n var _p = parent._private;\n var children = parent.children();\n var includeLabels = parent.pstyle('compound-sizing-wrt-labels').value === 'include';\n var min = {\n width: {\n val: parent.pstyle('min-width').pfValue,\n left: parent.pstyle('min-width-bias-left'),\n right: parent.pstyle('min-width-bias-right')\n },\n height: {\n val: parent.pstyle('min-height').pfValue,\n top: parent.pstyle('min-height-bias-top'),\n bottom: parent.pstyle('min-height-bias-bottom')\n }\n };\n var bb = children.boundingBox({\n includeLabels: includeLabels,\n includeOverlays: false,\n // updating the compound bounds happens outside of the regular\n // cache cycle (i.e. before fired events)\n useCache: false\n });\n var pos = _p.position;\n\n // if children take up zero area then keep position and fall back on stylesheet w/h\n if (bb.w === 0 || bb.h === 0) {\n bb = {\n w: parent.pstyle('width').pfValue,\n h: parent.pstyle('height').pfValue\n };\n bb.x1 = pos.x - bb.w / 2;\n bb.x2 = pos.x + bb.w / 2;\n bb.y1 = pos.y - bb.h / 2;\n bb.y2 = pos.y + bb.h / 2;\n }\n function computeBiasValues(propDiff, propBias, propBiasComplement) {\n var biasDiff = 0;\n var biasComplementDiff = 0;\n var biasTotal = propBias + propBiasComplement;\n if (propDiff > 0 && biasTotal > 0) {\n biasDiff = propBias / biasTotal * propDiff;\n biasComplementDiff = propBiasComplement / biasTotal * propDiff;\n }\n return {\n biasDiff: biasDiff,\n biasComplementDiff: biasComplementDiff\n };\n }\n function computePaddingValues(width, height, paddingObject, relativeTo) {\n // Assuming percentage is number from 0 to 1\n if (paddingObject.units === '%') {\n switch (relativeTo) {\n case 'width':\n return width > 0 ? paddingObject.pfValue * width : 0;\n case 'height':\n return height > 0 ? paddingObject.pfValue * height : 0;\n case 'average':\n return width > 0 && height > 0 ? paddingObject.pfValue * (width + height) / 2 : 0;\n case 'min':\n return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * height : paddingObject.pfValue * width : 0;\n case 'max':\n return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * width : paddingObject.pfValue * height : 0;\n default:\n return 0;\n }\n } else if (paddingObject.units === 'px') {\n return paddingObject.pfValue;\n } else {\n return 0;\n }\n }\n var leftVal = min.width.left.value;\n if (min.width.left.units === 'px' && min.width.val > 0) {\n leftVal = leftVal * 100 / min.width.val;\n }\n var rightVal = min.width.right.value;\n if (min.width.right.units === 'px' && min.width.val > 0) {\n rightVal = rightVal * 100 / min.width.val;\n }\n var topVal = min.height.top.value;\n if (min.height.top.units === 'px' && min.height.val > 0) {\n topVal = topVal * 100 / min.height.val;\n }\n var bottomVal = min.height.bottom.value;\n if (min.height.bottom.units === 'px' && min.height.val > 0) {\n bottomVal = bottomVal * 100 / min.height.val;\n }\n var widthBiasDiffs = computeBiasValues(min.width.val - bb.w, leftVal, rightVal);\n var diffLeft = widthBiasDiffs.biasDiff;\n var diffRight = widthBiasDiffs.biasComplementDiff;\n var heightBiasDiffs = computeBiasValues(min.height.val - bb.h, topVal, bottomVal);\n var diffTop = heightBiasDiffs.biasDiff;\n var diffBottom = heightBiasDiffs.biasComplementDiff;\n _p.autoPadding = computePaddingValues(bb.w, bb.h, parent.pstyle('padding'), parent.pstyle('padding-relative-to').value);\n _p.autoWidth = Math.max(bb.w, min.width.val);\n pos.x = (-diffLeft + bb.x1 + bb.x2 + diffRight) / 2;\n _p.autoHeight = Math.max(bb.h, min.height.val);\n pos.y = (-diffTop + bb.y1 + bb.y2 + diffBottom) / 2;\n }\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var _p = ele._private;\n if (!_p.compoundBoundsClean || force) {\n update(ele);\n if (!cy.batching()) {\n _p.compoundBoundsClean = true;\n }\n }\n }\n return this;\n};\nvar noninf = function noninf(x) {\n if (x === Infinity || x === -Infinity) {\n return 0;\n }\n return x;\n};\nvar updateBounds = function updateBounds(b, x1, y1, x2, y2) {\n // don't update with zero area boxes\n if (x2 - x1 === 0 || y2 - y1 === 0) {\n return;\n }\n\n // don't update with null dim\n if (x1 == null || y1 == null || x2 == null || y2 == null) {\n return;\n }\n b.x1 = x1 < b.x1 ? x1 : b.x1;\n b.x2 = x2 > b.x2 ? x2 : b.x2;\n b.y1 = y1 < b.y1 ? y1 : b.y1;\n b.y2 = y2 > b.y2 ? y2 : b.y2;\n b.w = b.x2 - b.x1;\n b.h = b.y2 - b.y1;\n};\nvar updateBoundsFromBox = function updateBoundsFromBox(b, b2) {\n if (b2 == null) {\n return b;\n }\n return updateBounds(b, b2.x1, b2.y1, b2.x2, b2.y2);\n};\nvar prefixedProperty = function prefixedProperty(obj, field, prefix) {\n return getPrefixedProperty(obj, field, prefix);\n};\nvar updateBoundsFromArrow = function updateBoundsFromArrow(bounds, ele, prefix) {\n if (ele.cy().headless()) {\n return;\n }\n var _p = ele._private;\n var rstyle = _p.rstyle;\n var halfArW = rstyle.arrowWidth / 2;\n var arrowType = ele.pstyle(prefix + '-arrow-shape').value;\n var x;\n var y;\n if (arrowType !== 'none') {\n if (prefix === 'source') {\n x = rstyle.srcX;\n y = rstyle.srcY;\n } else if (prefix === 'target') {\n x = rstyle.tgtX;\n y = rstyle.tgtY;\n } else {\n x = rstyle.midX;\n y = rstyle.midY;\n }\n\n // always store the individual arrow bounds\n var bbs = _p.arrowBounds = _p.arrowBounds || {};\n var bb = bbs[prefix] = bbs[prefix] || {};\n bb.x1 = x - halfArW;\n bb.y1 = y - halfArW;\n bb.x2 = x + halfArW;\n bb.y2 = y + halfArW;\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n expandBoundingBox(bb, 1);\n updateBounds(bounds, bb.x1, bb.y1, bb.x2, bb.y2);\n }\n};\nvar updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix) {\n if (ele.cy().headless()) {\n return;\n }\n var prefixDash;\n if (prefix) {\n prefixDash = prefix + '-';\n } else {\n prefixDash = '';\n }\n var _p = ele._private;\n var rstyle = _p.rstyle;\n var label = ele.pstyle(prefixDash + 'label').strValue;\n if (label) {\n var halign = ele.pstyle('text-halign');\n var valign = ele.pstyle('text-valign');\n var labelWidth = prefixedProperty(rstyle, 'labelWidth', prefix);\n var labelHeight = prefixedProperty(rstyle, 'labelHeight', prefix);\n var labelX = prefixedProperty(rstyle, 'labelX', prefix);\n var labelY = prefixedProperty(rstyle, 'labelY', prefix);\n var marginX = ele.pstyle(prefixDash + 'text-margin-x').pfValue;\n var marginY = ele.pstyle(prefixDash + 'text-margin-y').pfValue;\n var isEdge = ele.isEdge();\n var rotation = ele.pstyle(prefixDash + 'text-rotation');\n var outlineWidth = ele.pstyle('text-outline-width').pfValue;\n var borderWidth = ele.pstyle('text-border-width').pfValue;\n var halfBorderWidth = borderWidth / 2;\n var padding = ele.pstyle('text-background-padding').pfValue;\n var marginOfError = 2; // expand to work around browser dimension inaccuracies\n\n var lh = labelHeight;\n var lw = labelWidth;\n var lw_2 = lw / 2;\n var lh_2 = lh / 2;\n var lx1, lx2, ly1, ly2;\n if (isEdge) {\n lx1 = labelX - lw_2;\n lx2 = labelX + lw_2;\n ly1 = labelY - lh_2;\n ly2 = labelY + lh_2;\n } else {\n switch (halign.value) {\n case 'left':\n lx1 = labelX - lw;\n lx2 = labelX;\n break;\n case 'center':\n lx1 = labelX - lw_2;\n lx2 = labelX + lw_2;\n break;\n case 'right':\n lx1 = labelX;\n lx2 = labelX + lw;\n break;\n }\n switch (valign.value) {\n case 'top':\n ly1 = labelY - lh;\n ly2 = labelY;\n break;\n case 'center':\n ly1 = labelY - lh_2;\n ly2 = labelY + lh_2;\n break;\n case 'bottom':\n ly1 = labelY;\n ly2 = labelY + lh;\n break;\n }\n }\n\n // shift by margin and expand by outline and border\n lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;\n lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;\n ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;\n ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;\n\n // always store the unrotated label bounds separately\n var bbPrefix = prefix || 'main';\n var bbs = _p.labelBounds;\n var bb = bbs[bbPrefix] = bbs[bbPrefix] || {};\n bb.x1 = lx1;\n bb.y1 = ly1;\n bb.x2 = lx2;\n bb.y2 = ly2;\n bb.w = lx2 - lx1;\n bb.h = ly2 - ly1;\n var isAutorotate = isEdge && rotation.strValue === 'autorotate';\n var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0;\n if (isAutorotate || isPfValue) {\n var theta = isAutorotate ? prefixedProperty(_p.rstyle, 'labelAngle', prefix) : rotation.pfValue;\n var cos = Math.cos(theta);\n var sin = Math.sin(theta);\n\n // rotation point (default value for center-center)\n var xo = (lx1 + lx2) / 2;\n var yo = (ly1 + ly2) / 2;\n if (!isEdge) {\n switch (halign.value) {\n case 'left':\n xo = lx2;\n break;\n case 'right':\n xo = lx1;\n break;\n }\n switch (valign.value) {\n case 'top':\n yo = ly2;\n break;\n case 'bottom':\n yo = ly1;\n break;\n }\n }\n var rotate = function rotate(x, y) {\n x = x - xo;\n y = y - yo;\n return {\n x: x * cos - y * sin + xo,\n y: x * sin + y * cos + yo\n };\n };\n var px1y1 = rotate(lx1, ly1);\n var px1y2 = rotate(lx1, ly2);\n var px2y1 = rotate(lx2, ly1);\n var px2y2 = rotate(lx2, ly2);\n lx1 = Math.min(px1y1.x, px1y2.x, px2y1.x, px2y2.x);\n lx2 = Math.max(px1y1.x, px1y2.x, px2y1.x, px2y2.x);\n ly1 = Math.min(px1y1.y, px1y2.y, px2y1.y, px2y2.y);\n ly2 = Math.max(px1y1.y, px1y2.y, px2y1.y, px2y2.y);\n }\n var bbPrefixRot = bbPrefix + 'Rot';\n var bbRot = bbs[bbPrefixRot] = bbs[bbPrefixRot] || {};\n bbRot.x1 = lx1;\n bbRot.y1 = ly1;\n bbRot.x2 = lx2;\n bbRot.y2 = ly2;\n bbRot.w = lx2 - lx1;\n bbRot.h = ly2 - ly1;\n updateBounds(bounds, lx1, ly1, lx2, ly2);\n updateBounds(_p.labelBounds.all, lx1, ly1, lx2, ly2);\n }\n return bounds;\n};\nvar updateBoundsFromOutline = function updateBoundsFromOutline(bounds, ele) {\n if (ele.cy().headless()) {\n return;\n }\n var outlineOpacity = ele.pstyle('outline-opacity').value;\n var outlineWidth = ele.pstyle('outline-width').value;\n if (outlineOpacity > 0 && outlineWidth > 0) {\n var outlineOffset = ele.pstyle('outline-offset').value;\n var nodeShape = ele.pstyle('shape').value;\n var outlineSize = outlineWidth + outlineOffset;\n var scaleX = (bounds.w + outlineSize * 2) / bounds.w;\n var scaleY = (bounds.h + outlineSize * 2) / bounds.h;\n var xOffset = 0;\n var yOffset = 0;\n if ([\"diamond\", \"pentagon\", \"round-triangle\"].includes(nodeShape)) {\n scaleX = (bounds.w + outlineSize * 2.4) / bounds.w;\n yOffset = -outlineSize / 3.6;\n } else if ([\"concave-hexagon\", \"rhomboid\", \"right-rhomboid\"].includes(nodeShape)) {\n scaleX = (bounds.w + outlineSize * 2.4) / bounds.w;\n } else if (nodeShape === \"star\") {\n scaleX = (bounds.w + outlineSize * 2.8) / bounds.w;\n scaleY = (bounds.h + outlineSize * 2.6) / bounds.h;\n yOffset = -outlineSize / 3.8;\n } else if (nodeShape === \"triangle\") {\n scaleX = (bounds.w + outlineSize * 2.8) / bounds.w;\n scaleY = (bounds.h + outlineSize * 2.4) / bounds.h;\n yOffset = -outlineSize / 1.4;\n } else if (nodeShape === \"vee\") {\n scaleX = (bounds.w + outlineSize * 4.4) / bounds.w;\n scaleY = (bounds.h + outlineSize * 3.8) / bounds.h;\n yOffset = -outlineSize * .5;\n }\n var hDelta = bounds.h * scaleY - bounds.h;\n var wDelta = bounds.w * scaleX - bounds.w;\n expandBoundingBoxSides(bounds, [Math.ceil(hDelta / 2), Math.ceil(wDelta / 2)]);\n if (xOffset != 0 || yOffset !== 0) {\n var oBounds = shiftBoundingBox(bounds, xOffset, yOffset);\n updateBoundingBox(bounds, oBounds);\n }\n }\n};\n\n// get the bounding box of the elements (in raw model position)\nvar boundingBoxImpl = function boundingBoxImpl(ele, options) {\n var cy = ele._private.cy;\n var styleEnabled = cy.styleEnabled();\n var headless = cy.headless();\n var bounds = makeBoundingBox();\n var _p = ele._private;\n var isNode = ele.isNode();\n var isEdge = ele.isEdge();\n var ex1, ex2, ey1, ey2; // extrema of body / lines\n var x, y; // node pos\n var rstyle = _p.rstyle;\n var manualExpansion = isNode && styleEnabled ? ele.pstyle('bounds-expansion').pfValue : [0];\n\n // must use `display` prop only, as reading `compound.width()` causes recursion\n // (other factors like width values will be considered later in this function anyway)\n var isDisplayed = function isDisplayed(ele) {\n return ele.pstyle('display').value !== 'none';\n };\n var displayed = !styleEnabled || isDisplayed(ele)\n\n // must take into account connected nodes b/c of implicit edge hiding on display:none node\n && (!isEdge || isDisplayed(ele.source()) && isDisplayed(ele.target()));\n if (displayed) {\n // displayed suffices, since we will find zero area eles anyway\n var overlayOpacity = 0;\n var overlayPadding = 0;\n if (styleEnabled && options.includeOverlays) {\n overlayOpacity = ele.pstyle('overlay-opacity').value;\n if (overlayOpacity !== 0) {\n overlayPadding = ele.pstyle('overlay-padding').value;\n }\n }\n var underlayOpacity = 0;\n var underlayPadding = 0;\n if (styleEnabled && options.includeUnderlays) {\n underlayOpacity = ele.pstyle('underlay-opacity').value;\n if (underlayOpacity !== 0) {\n underlayPadding = ele.pstyle('underlay-padding').value;\n }\n }\n var padding = Math.max(overlayPadding, underlayPadding);\n var w = 0;\n var wHalf = 0;\n if (styleEnabled) {\n w = ele.pstyle('width').pfValue;\n wHalf = w / 2;\n }\n if (isNode && options.includeNodes) {\n var pos = ele.position();\n x = pos.x;\n y = pos.y;\n var _w = ele.outerWidth();\n var halfW = _w / 2;\n var h = ele.outerHeight();\n var halfH = h / 2;\n\n // handle node dimensions\n /////////////////////////\n\n ex1 = x - halfW;\n ex2 = x + halfW;\n ey1 = y - halfH;\n ey2 = y + halfH;\n updateBounds(bounds, ex1, ey1, ex2, ey2);\n if (styleEnabled && options.includeOutlines) {\n updateBoundsFromOutline(bounds, ele);\n }\n } else if (isEdge && options.includeEdges) {\n if (styleEnabled && !headless) {\n var curveStyle = ele.pstyle('curve-style').strValue;\n\n // handle edge dimensions (rough box estimate)\n //////////////////////////////////////////////\n\n ex1 = Math.min(rstyle.srcX, rstyle.midX, rstyle.tgtX);\n ex2 = Math.max(rstyle.srcX, rstyle.midX, rstyle.tgtX);\n ey1 = Math.min(rstyle.srcY, rstyle.midY, rstyle.tgtY);\n ey2 = Math.max(rstyle.srcY, rstyle.midY, rstyle.tgtY);\n\n // take into account edge width\n ex1 -= wHalf;\n ex2 += wHalf;\n ey1 -= wHalf;\n ey2 += wHalf;\n updateBounds(bounds, ex1, ey1, ex2, ey2);\n\n // precise edges\n ////////////////\n\n if (curveStyle === 'haystack') {\n var hpts = rstyle.haystackPts;\n if (hpts && hpts.length === 2) {\n ex1 = hpts[0].x;\n ey1 = hpts[0].y;\n ex2 = hpts[1].x;\n ey2 = hpts[1].y;\n if (ex1 > ex2) {\n var temp = ex1;\n ex1 = ex2;\n ex2 = temp;\n }\n if (ey1 > ey2) {\n var _temp = ey1;\n ey1 = ey2;\n ey2 = _temp;\n }\n updateBounds(bounds, ex1 - wHalf, ey1 - wHalf, ex2 + wHalf, ey2 + wHalf);\n }\n } else if (curveStyle === 'bezier' || curveStyle === 'unbundled-bezier' || curveStyle.endsWith('segments') || curveStyle.endsWith('taxi')) {\n var pts;\n switch (curveStyle) {\n case 'bezier':\n case 'unbundled-bezier':\n pts = rstyle.bezierPts;\n break;\n case 'segments':\n case 'taxi':\n case 'round-segments':\n case 'round-taxi':\n pts = rstyle.linePts;\n break;\n }\n if (pts != null) {\n for (var j = 0; j < pts.length; j++) {\n var pt = pts[j];\n ex1 = pt.x - wHalf;\n ex2 = pt.x + wHalf;\n ey1 = pt.y - wHalf;\n ey2 = pt.y + wHalf;\n updateBounds(bounds, ex1, ey1, ex2, ey2);\n }\n }\n } // bezier-like or segment-like edge\n } else {\n // headless or style disabled\n\n // fallback on source and target positions\n //////////////////////////////////////////\n\n var n1 = ele.source();\n var n1pos = n1.position();\n var n2 = ele.target();\n var n2pos = n2.position();\n ex1 = n1pos.x;\n ex2 = n2pos.x;\n ey1 = n1pos.y;\n ey2 = n2pos.y;\n if (ex1 > ex2) {\n var _temp2 = ex1;\n ex1 = ex2;\n ex2 = _temp2;\n }\n if (ey1 > ey2) {\n var _temp3 = ey1;\n ey1 = ey2;\n ey2 = _temp3;\n }\n\n // take into account edge width\n ex1 -= wHalf;\n ex2 += wHalf;\n ey1 -= wHalf;\n ey2 += wHalf;\n updateBounds(bounds, ex1, ey1, ex2, ey2);\n } // headless or style disabled\n } // edges\n\n // handle edge arrow size\n /////////////////////////\n\n if (styleEnabled && options.includeEdges && isEdge) {\n updateBoundsFromArrow(bounds, ele, 'mid-source');\n updateBoundsFromArrow(bounds, ele, 'mid-target');\n updateBoundsFromArrow(bounds, ele, 'source');\n updateBoundsFromArrow(bounds, ele, 'target');\n }\n\n // ghost\n ////////\n\n if (styleEnabled) {\n var ghost = ele.pstyle('ghost').value === 'yes';\n if (ghost) {\n var gx = ele.pstyle('ghost-offset-x').pfValue;\n var gy = ele.pstyle('ghost-offset-y').pfValue;\n updateBounds(bounds, bounds.x1 + gx, bounds.y1 + gy, bounds.x2 + gx, bounds.y2 + gy);\n }\n }\n\n // always store the body bounds separately from the labels\n var bbBody = _p.bodyBounds = _p.bodyBounds || {};\n assignBoundingBox(bbBody, bounds);\n expandBoundingBoxSides(bbBody, manualExpansion);\n expandBoundingBox(bbBody, 1); // expand to work around browser dimension inaccuracies\n\n // overlay\n //////////\n\n if (styleEnabled) {\n ex1 = bounds.x1;\n ex2 = bounds.x2;\n ey1 = bounds.y1;\n ey2 = bounds.y2;\n updateBounds(bounds, ex1 - padding, ey1 - padding, ex2 + padding, ey2 + padding);\n }\n\n // always store the body bounds separately from the labels\n var bbOverlay = _p.overlayBounds = _p.overlayBounds || {};\n assignBoundingBox(bbOverlay, bounds);\n expandBoundingBoxSides(bbOverlay, manualExpansion);\n expandBoundingBox(bbOverlay, 1); // expand to work around browser dimension inaccuracies\n\n // handle label dimensions\n //////////////////////////\n\n var bbLabels = _p.labelBounds = _p.labelBounds || {};\n if (bbLabels.all != null) {\n clearBoundingBox(bbLabels.all);\n } else {\n bbLabels.all = makeBoundingBox();\n }\n if (styleEnabled && options.includeLabels) {\n if (options.includeMainLabels) {\n updateBoundsFromLabel(bounds, ele, null);\n }\n if (isEdge) {\n if (options.includeSourceLabels) {\n updateBoundsFromLabel(bounds, ele, 'source');\n }\n if (options.includeTargetLabels) {\n updateBoundsFromLabel(bounds, ele, 'target');\n }\n }\n } // style enabled for labels\n } // if displayed\n\n bounds.x1 = noninf(bounds.x1);\n bounds.y1 = noninf(bounds.y1);\n bounds.x2 = noninf(bounds.x2);\n bounds.y2 = noninf(bounds.y2);\n bounds.w = noninf(bounds.x2 - bounds.x1);\n bounds.h = noninf(bounds.y2 - bounds.y1);\n if (bounds.w > 0 && bounds.h > 0 && displayed) {\n expandBoundingBoxSides(bounds, manualExpansion);\n\n // expand bounds by 1 because antialiasing can increase the visual/effective size by 1 on all sides\n expandBoundingBox(bounds, 1);\n }\n return bounds;\n};\nvar getKey = function getKey(opts) {\n var i = 0;\n var tf = function tf(val) {\n return (val ? 1 : 0) << i++;\n };\n var key = 0;\n key += tf(opts.incudeNodes);\n key += tf(opts.includeEdges);\n key += tf(opts.includeLabels);\n key += tf(opts.includeMainLabels);\n key += tf(opts.includeSourceLabels);\n key += tf(opts.includeTargetLabels);\n key += tf(opts.includeOverlays);\n key += tf(opts.includeOutlines);\n return key;\n};\nvar getBoundingBoxPosKey = function getBoundingBoxPosKey(ele) {\n if (ele.isEdge()) {\n var p1 = ele.source().position();\n var p2 = ele.target().position();\n var r = function r(x) {\n return Math.round(x);\n };\n return hashIntsArray([r(p1.x), r(p1.y), r(p2.x), r(p2.y)]);\n } else {\n return 0;\n }\n};\nvar cachedBoundingBoxImpl = function cachedBoundingBoxImpl(ele, opts) {\n var _p = ele._private;\n var bb;\n var isEdge = ele.isEdge();\n var key = opts == null ? defBbOptsKey : getKey(opts);\n var usingDefOpts = key === defBbOptsKey;\n var currPosKey = getBoundingBoxPosKey(ele);\n var isPosKeySame = _p.bbCachePosKey === currPosKey;\n var useCache = opts.useCache && isPosKeySame;\n var isDirty = function isDirty(ele) {\n return ele._private.bbCache == null || ele._private.styleDirty;\n };\n var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target());\n if (needRecalc) {\n if (!isPosKeySame) {\n ele.recalculateRenderedStyle(useCache);\n }\n bb = boundingBoxImpl(ele, defBbOpts);\n _p.bbCache = bb;\n _p.bbCachePosKey = currPosKey;\n } else {\n bb = _p.bbCache;\n }\n\n // not using def opts => need to build up bb from combination of sub bbs\n if (!usingDefOpts) {\n var isNode = ele.isNode();\n bb = makeBoundingBox();\n if (opts.includeNodes && isNode || opts.includeEdges && !isNode) {\n if (opts.includeOverlays) {\n updateBoundsFromBox(bb, _p.overlayBounds);\n } else {\n updateBoundsFromBox(bb, _p.bodyBounds);\n }\n }\n if (opts.includeLabels) {\n if (opts.includeMainLabels && (!isEdge || opts.includeSourceLabels && opts.includeTargetLabels)) {\n updateBoundsFromBox(bb, _p.labelBounds.all);\n } else {\n if (opts.includeMainLabels) {\n updateBoundsFromBox(bb, _p.labelBounds.mainRot);\n }\n if (opts.includeSourceLabels) {\n updateBoundsFromBox(bb, _p.labelBounds.sourceRot);\n }\n if (opts.includeTargetLabels) {\n updateBoundsFromBox(bb, _p.labelBounds.targetRot);\n }\n }\n }\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n }\n return bb;\n};\nvar defBbOpts = {\n includeNodes: true,\n includeEdges: true,\n includeLabels: true,\n includeMainLabels: true,\n includeSourceLabels: true,\n includeTargetLabels: true,\n includeOverlays: true,\n includeUnderlays: true,\n includeOutlines: true,\n useCache: true\n};\nvar defBbOptsKey = getKey(defBbOpts);\nvar filledBbOpts = defaults$g(defBbOpts);\nelesfn$b.boundingBox = function (options) {\n var bounds;\n\n // the main usecase is ele.boundingBox() for a single element with no/def options\n // specified s.t. the cache is used, so check for this case to make it faster by\n // avoiding the overhead of the rest of the function\n if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (options === undefined || options.useCache === undefined || options.useCache === true)) {\n if (options === undefined) {\n options = defBbOpts;\n } else {\n options = filledBbOpts(options);\n }\n bounds = cachedBoundingBoxImpl(this[0], options);\n } else {\n bounds = makeBoundingBox();\n options = options || defBbOpts;\n var opts = filledBbOpts(options);\n var eles = this;\n var cy = eles.cy();\n var styleEnabled = cy.styleEnabled();\n if (styleEnabled) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _p = ele._private;\n var currPosKey = getBoundingBoxPosKey(ele);\n var isPosKeySame = _p.bbCachePosKey === currPosKey;\n var useCache = opts.useCache && isPosKeySame && !_p.styleDirty;\n ele.recalculateRenderedStyle(useCache);\n }\n }\n this.updateCompoundBounds(!options.useCache);\n for (var _i = 0; _i < eles.length; _i++) {\n var _ele = eles[_i];\n updateBoundsFromBox(bounds, cachedBoundingBoxImpl(_ele, opts));\n }\n }\n bounds.x1 = noninf(bounds.x1);\n bounds.y1 = noninf(bounds.y1);\n bounds.x2 = noninf(bounds.x2);\n bounds.y2 = noninf(bounds.y2);\n bounds.w = noninf(bounds.x2 - bounds.x1);\n bounds.h = noninf(bounds.y2 - bounds.y1);\n return bounds;\n};\nelesfn$b.dirtyBoundingBoxCache = function () {\n for (var i = 0; i < this.length; i++) {\n var _p = this[i]._private;\n _p.bbCache = null;\n _p.bbCachePosKey = null;\n _p.bodyBounds = null;\n _p.overlayBounds = null;\n _p.labelBounds.all = null;\n _p.labelBounds.source = null;\n _p.labelBounds.target = null;\n _p.labelBounds.main = null;\n _p.labelBounds.sourceRot = null;\n _p.labelBounds.targetRot = null;\n _p.labelBounds.mainRot = null;\n _p.arrowBounds.source = null;\n _p.arrowBounds.target = null;\n _p.arrowBounds['mid-source'] = null;\n _p.arrowBounds['mid-target'] = null;\n }\n this.emitAndNotify('bounds');\n return this;\n};\n\n// private helper to get bounding box for custom node positions\n// - good for perf in certain cases but currently requires dirtying the rendered style\n// - would be better to not modify the nodes but the nodes are read directly everywhere in the renderer...\n// - try to use for only things like discrete layouts where the node position would change anyway\nelesfn$b.boundingBoxAt = function (fn) {\n var nodes = this.nodes();\n var cy = this.cy();\n var hasCompoundNodes = cy.hasCompoundNodes();\n var parents = cy.collection();\n if (hasCompoundNodes) {\n parents = nodes.filter(function (node) {\n return node.isParent();\n });\n nodes = nodes.not(parents);\n }\n if (plainObject(fn)) {\n var obj = fn;\n fn = function fn() {\n return obj;\n };\n }\n var storeOldPos = function storeOldPos(node, i) {\n return node._private.bbAtOldPos = fn(node, i);\n };\n var getOldPos = function getOldPos(node) {\n return node._private.bbAtOldPos;\n };\n cy.startBatch();\n nodes.forEach(storeOldPos).silentPositions(fn);\n if (hasCompoundNodes) {\n parents.dirtyCompoundBoundsCache();\n parents.dirtyBoundingBoxCache();\n parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle\n }\n\n var bb = copyBoundingBox(this.boundingBox({\n useCache: false\n }));\n nodes.silentPositions(getOldPos);\n if (hasCompoundNodes) {\n parents.dirtyCompoundBoundsCache();\n parents.dirtyBoundingBoxCache();\n parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle\n }\n\n cy.endBatch();\n return bb;\n};\nfn$3.boundingbox = fn$3.bb = fn$3.boundingBox;\nfn$3.renderedBoundingbox = fn$3.renderedBoundingBox;\nvar bounds = elesfn$b;\n\nvar fn$2, elesfn$a;\nfn$2 = elesfn$a = {};\nvar defineDimFns = function defineDimFns(opts) {\n opts.uppercaseName = capitalize(opts.name);\n opts.autoName = 'auto' + opts.uppercaseName;\n opts.labelName = 'label' + opts.uppercaseName;\n opts.outerName = 'outer' + opts.uppercaseName;\n opts.uppercaseOuterName = capitalize(opts.outerName);\n fn$2[opts.name] = function dimImpl() {\n var ele = this[0];\n var _p = ele._private;\n var cy = _p.cy;\n var styleEnabled = cy._private.styleEnabled;\n if (ele) {\n if (styleEnabled) {\n if (ele.isParent()) {\n ele.updateCompoundBounds();\n return _p[opts.autoName] || 0;\n }\n var d = ele.pstyle(opts.name);\n switch (d.strValue) {\n case 'label':\n ele.recalculateRenderedStyle();\n return _p.rstyle[opts.labelName] || 0;\n default:\n return d.pfValue;\n }\n } else {\n return 1;\n }\n }\n };\n fn$2['outer' + opts.uppercaseName] = function outerDimImpl() {\n var ele = this[0];\n var _p = ele._private;\n var cy = _p.cy;\n var styleEnabled = cy._private.styleEnabled;\n if (ele) {\n if (styleEnabled) {\n var dim = ele[opts.name]();\n var border = ele.pstyle('border-width').pfValue; // n.b. 1/2 each side\n var padding = 2 * ele.padding();\n return dim + border + padding;\n } else {\n return 1;\n }\n }\n };\n fn$2['rendered' + opts.uppercaseName] = function renderedDimImpl() {\n var ele = this[0];\n if (ele) {\n var d = ele[opts.name]();\n return d * this.cy().zoom();\n }\n };\n fn$2['rendered' + opts.uppercaseOuterName] = function renderedOuterDimImpl() {\n var ele = this[0];\n if (ele) {\n var od = ele[opts.outerName]();\n return od * this.cy().zoom();\n }\n };\n};\ndefineDimFns({\n name: 'width'\n});\ndefineDimFns({\n name: 'height'\n});\nelesfn$a.padding = function () {\n var ele = this[0];\n var _p = ele._private;\n if (ele.isParent()) {\n ele.updateCompoundBounds();\n if (_p.autoPadding !== undefined) {\n return _p.autoPadding;\n } else {\n return ele.pstyle('padding').pfValue;\n }\n } else {\n return ele.pstyle('padding').pfValue;\n }\n};\nelesfn$a.paddedHeight = function () {\n var ele = this[0];\n return ele.height() + 2 * ele.padding();\n};\nelesfn$a.paddedWidth = function () {\n var ele = this[0];\n return ele.width() + 2 * ele.padding();\n};\nvar widthHeight = elesfn$a;\n\nvar ifEdge = function ifEdge(ele, getValue) {\n if (ele.isEdge()) {\n return getValue(ele);\n }\n};\nvar ifEdgeRenderedPosition = function ifEdgeRenderedPosition(ele, getPoint) {\n if (ele.isEdge()) {\n var cy = ele.cy();\n return modelToRenderedPosition(getPoint(ele), cy.zoom(), cy.pan());\n }\n};\nvar ifEdgeRenderedPositions = function ifEdgeRenderedPositions(ele, getPoints) {\n if (ele.isEdge()) {\n var cy = ele.cy();\n var pan = cy.pan();\n var zoom = cy.zoom();\n return getPoints(ele).map(function (p) {\n return modelToRenderedPosition(p, zoom, pan);\n });\n }\n};\nvar controlPoints = function controlPoints(ele) {\n return ele.renderer().getControlPoints(ele);\n};\nvar segmentPoints = function segmentPoints(ele) {\n return ele.renderer().getSegmentPoints(ele);\n};\nvar sourceEndpoint = function sourceEndpoint(ele) {\n return ele.renderer().getSourceEndpoint(ele);\n};\nvar targetEndpoint = function targetEndpoint(ele) {\n return ele.renderer().getTargetEndpoint(ele);\n};\nvar midpoint = function midpoint(ele) {\n return ele.renderer().getEdgeMidpoint(ele);\n};\nvar pts = {\n controlPoints: {\n get: controlPoints,\n mult: true\n },\n segmentPoints: {\n get: segmentPoints,\n mult: true\n },\n sourceEndpoint: {\n get: sourceEndpoint\n },\n targetEndpoint: {\n get: targetEndpoint\n },\n midpoint: {\n get: midpoint\n }\n};\nvar renderedName = function renderedName(name) {\n return 'rendered' + name[0].toUpperCase() + name.substr(1);\n};\nvar edgePoints = Object.keys(pts).reduce(function (obj, name) {\n var spec = pts[name];\n var rName = renderedName(name);\n obj[name] = function () {\n return ifEdge(this, spec.get);\n };\n if (spec.mult) {\n obj[rName] = function () {\n return ifEdgeRenderedPositions(this, spec.get);\n };\n } else {\n obj[rName] = function () {\n return ifEdgeRenderedPosition(this, spec.get);\n };\n }\n return obj;\n}, {});\n\nvar dimensions = extend({}, position, bounds, widthHeight, edgePoints);\n\n/*!\nEvent object based on jQuery events, MIT license\n\nhttps://jquery.org/license/\nhttps://tldrlegal.com/license/mit-license\nhttps://github.com/jquery/jquery/blob/master/src/event.js\n*/\n\nvar Event = function Event(src, props) {\n this.recycle(src, props);\n};\nfunction returnFalse() {\n return false;\n}\nfunction returnTrue() {\n return true;\n}\n\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\nEvent.prototype = {\n instanceString: function instanceString() {\n return 'event';\n },\n recycle: function recycle(src, props) {\n this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = returnFalse;\n if (src != null && src.preventDefault) {\n // Browser Event object\n this.type = src.type;\n\n // Events bubbling up the document may have been marked as prevented\n // by a handler lower down the tree; reflect the correct value.\n this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse;\n } else if (src != null && src.type) {\n // Plain object containing all event details\n props = src;\n } else {\n // Event string\n this.type = src;\n }\n\n // Put explicitly provided properties onto the event object\n if (props != null) {\n // more efficient to manually copy fields we use\n this.originalEvent = props.originalEvent;\n this.type = props.type != null ? props.type : this.type;\n this.cy = props.cy;\n this.target = props.target;\n this.position = props.position;\n this.renderedPosition = props.renderedPosition;\n this.namespace = props.namespace;\n this.layout = props.layout;\n }\n if (this.cy != null && this.position != null && this.renderedPosition == null) {\n // create a rendered position based on the passed position\n var pos = this.position;\n var zoom = this.cy.zoom();\n var pan = this.cy.pan();\n this.renderedPosition = {\n x: pos.x * zoom + pan.x,\n y: pos.y * zoom + pan.y\n };\n }\n\n // Create a timestamp if incoming event doesn't have one\n this.timeStamp = src && src.timeStamp || Date.now();\n },\n preventDefault: function preventDefault() {\n this.isDefaultPrevented = returnTrue;\n var e = this.originalEvent;\n if (!e) {\n return;\n }\n\n // if preventDefault exists run it on the original event\n if (e.preventDefault) {\n e.preventDefault();\n }\n },\n stopPropagation: function stopPropagation() {\n this.isPropagationStopped = returnTrue;\n var e = this.originalEvent;\n if (!e) {\n return;\n }\n\n // if stopPropagation exists run it on the original event\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n },\n stopImmediatePropagation: function stopImmediatePropagation() {\n this.isImmediatePropagationStopped = returnTrue;\n this.stopPropagation();\n },\n isDefaultPrevented: returnFalse,\n isPropagationStopped: returnFalse,\n isImmediatePropagationStopped: returnFalse\n};\n\nvar eventRegex = /^([^.]+)(\\.(?:[^.]+))?$/; // regex for matching event strings (e.g. \"click.namespace\")\nvar universalNamespace = '.*'; // matches as if no namespace specified and prevents users from unbinding accidentally\n\nvar defaults$8 = {\n qualifierCompare: function qualifierCompare(q1, q2) {\n return q1 === q2;\n },\n eventMatches: function eventMatches( /*context, listener, eventObj*/\n ) {\n return true;\n },\n addEventFields: function addEventFields( /*context, evt*/\n ) {},\n callbackContext: function callbackContext(context /*, listener, eventObj*/) {\n return context;\n },\n beforeEmit: function beforeEmit( /* context, listener, eventObj */\n ) {},\n afterEmit: function afterEmit( /* context, listener, eventObj */\n ) {},\n bubble: function bubble( /*context*/\n ) {\n return false;\n },\n parent: function parent( /*context*/\n ) {\n return null;\n },\n context: null\n};\nvar defaultsKeys = Object.keys(defaults$8);\nvar emptyOpts = {};\nfunction Emitter() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyOpts;\n var context = arguments.length > 1 ? arguments[1] : undefined;\n // micro-optimisation vs Object.assign() -- reduces Element instantiation time\n for (var i = 0; i < defaultsKeys.length; i++) {\n var key = defaultsKeys[i];\n this[key] = opts[key] || defaults$8[key];\n }\n this.context = context || this.context;\n this.listeners = [];\n this.emitting = 0;\n}\nvar p = Emitter.prototype;\nvar forEachEvent = function forEachEvent(self, handler, events, qualifier, callback, conf, confOverrides) {\n if (fn$6(qualifier)) {\n callback = qualifier;\n qualifier = null;\n }\n if (confOverrides) {\n if (conf == null) {\n conf = confOverrides;\n } else {\n conf = extend({}, conf, confOverrides);\n }\n }\n var eventList = array(events) ? events : events.split(/\\s+/);\n for (var i = 0; i < eventList.length; i++) {\n var evt = eventList[i];\n if (emptyString(evt)) {\n continue;\n }\n var match = evt.match(eventRegex); // type[.namespace]\n\n if (match) {\n var type = match[1];\n var namespace = match[2] ? match[2] : null;\n var ret = handler(self, evt, type, namespace, qualifier, callback, conf);\n if (ret === false) {\n break;\n } // allow exiting early\n }\n }\n};\n\nvar makeEventObj = function makeEventObj(self, obj) {\n self.addEventFields(self.context, obj);\n return new Event(obj.type, obj);\n};\nvar forEachEventObj = function forEachEventObj(self, handler, events) {\n if (event(events)) {\n handler(self, events);\n return;\n } else if (plainObject(events)) {\n handler(self, makeEventObj(self, events));\n return;\n }\n var eventList = array(events) ? events : events.split(/\\s+/);\n for (var i = 0; i < eventList.length; i++) {\n var evt = eventList[i];\n if (emptyString(evt)) {\n continue;\n }\n var match = evt.match(eventRegex); // type[.namespace]\n\n if (match) {\n var type = match[1];\n var namespace = match[2] ? match[2] : null;\n var eventObj = makeEventObj(self, {\n type: type,\n namespace: namespace,\n target: self.context\n });\n handler(self, eventObj);\n }\n }\n};\np.on = p.addListener = function (events, qualifier, callback, conf, confOverrides) {\n forEachEvent(this, function (self, event, type, namespace, qualifier, callback, conf) {\n if (fn$6(callback)) {\n self.listeners.push({\n event: event,\n // full event string\n callback: callback,\n // callback to run\n type: type,\n // the event type (e.g. 'click')\n namespace: namespace,\n // the event namespace (e.g. \".foo\")\n qualifier: qualifier,\n // a restriction on whether to match this emitter\n conf: conf // additional configuration\n });\n }\n }, events, qualifier, callback, conf, confOverrides);\n return this;\n};\np.one = function (events, qualifier, callback, conf) {\n return this.on(events, qualifier, callback, conf, {\n one: true\n });\n};\np.removeListener = p.off = function (events, qualifier, callback, conf) {\n var _this = this;\n if (this.emitting !== 0) {\n this.listeners = copyArray$1(this.listeners);\n }\n var listeners = this.listeners;\n var _loop = function _loop(i) {\n var listener = listeners[i];\n forEachEvent(_this, function (self, event, type, namespace, qualifier, callback /*, conf*/) {\n if ((listener.type === type || events === '*') && (!namespace && listener.namespace !== '.*' || listener.namespace === namespace) && (!qualifier || self.qualifierCompare(listener.qualifier, qualifier)) && (!callback || listener.callback === callback)) {\n listeners.splice(i, 1);\n return false;\n }\n }, events, qualifier, callback, conf);\n };\n for (var i = listeners.length - 1; i >= 0; i--) {\n _loop(i);\n }\n return this;\n};\np.removeAllListeners = function () {\n return this.removeListener('*');\n};\np.emit = p.trigger = function (events, extraParams, manualCallback) {\n var listeners = this.listeners;\n var numListenersBeforeEmit = listeners.length;\n this.emitting++;\n if (!array(extraParams)) {\n extraParams = [extraParams];\n }\n forEachEventObj(this, function (self, eventObj) {\n if (manualCallback != null) {\n listeners = [{\n event: eventObj.event,\n type: eventObj.type,\n namespace: eventObj.namespace,\n callback: manualCallback\n }];\n numListenersBeforeEmit = listeners.length;\n }\n var _loop2 = function _loop2(i) {\n var listener = listeners[i];\n if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self.eventMatches(self.context, listener, eventObj)) {\n var args = [eventObj];\n if (extraParams != null) {\n push(args, extraParams);\n }\n self.beforeEmit(self.context, listener, eventObj);\n if (listener.conf && listener.conf.one) {\n self.listeners = self.listeners.filter(function (l) {\n return l !== listener;\n });\n }\n var context = self.callbackContext(self.context, listener, eventObj);\n var ret = listener.callback.apply(context, args);\n self.afterEmit(self.context, listener, eventObj);\n if (ret === false) {\n eventObj.stopPropagation();\n eventObj.preventDefault();\n }\n } // if listener matches\n };\n for (var i = 0; i < numListenersBeforeEmit; i++) {\n _loop2(i);\n } // for listener\n\n if (self.bubble(self.context) && !eventObj.isPropagationStopped()) {\n self.parent(self.context).emit(eventObj, extraParams);\n }\n }, events);\n this.emitting--;\n return this;\n};\n\nvar emitterOptions$1 = {\n qualifierCompare: function qualifierCompare(selector1, selector2) {\n if (selector1 == null || selector2 == null) {\n return selector1 == null && selector2 == null;\n } else {\n return selector1.sameText(selector2);\n }\n },\n eventMatches: function eventMatches(ele, listener, eventObj) {\n var selector = listener.qualifier;\n if (selector != null) {\n return ele !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target);\n }\n return true;\n },\n addEventFields: function addEventFields(ele, evt) {\n evt.cy = ele.cy();\n evt.target = ele;\n },\n callbackContext: function callbackContext(ele, listener, eventObj) {\n return listener.qualifier != null ? eventObj.target : ele;\n },\n beforeEmit: function beforeEmit(context, listener /*, eventObj*/) {\n if (listener.conf && listener.conf.once) {\n listener.conf.onceCollection.removeListener(listener.event, listener.qualifier, listener.callback);\n }\n },\n bubble: function bubble() {\n return true;\n },\n parent: function parent(ele) {\n return ele.isChild() ? ele.parent() : ele.cy();\n }\n};\nvar argSelector$1 = function argSelector(arg) {\n if (string(arg)) {\n return new Selector(arg);\n } else {\n return arg;\n }\n};\nvar elesfn$9 = {\n createEmitter: function createEmitter() {\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var _p = ele._private;\n if (!_p.emitter) {\n _p.emitter = new Emitter(emitterOptions$1, ele);\n }\n }\n return this;\n },\n emitter: function emitter() {\n return this._private.emitter;\n },\n on: function on(events, selector, callback) {\n var argSel = argSelector$1(selector);\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().on(events, argSel, callback);\n }\n return this;\n },\n removeListener: function removeListener(events, selector, callback) {\n var argSel = argSelector$1(selector);\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().removeListener(events, argSel, callback);\n }\n return this;\n },\n removeAllListeners: function removeAllListeners() {\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().removeAllListeners();\n }\n return this;\n },\n one: function one(events, selector, callback) {\n var argSel = argSelector$1(selector);\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().one(events, argSel, callback);\n }\n return this;\n },\n once: function once(events, selector, callback) {\n var argSel = argSelector$1(selector);\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().on(events, argSel, callback, {\n once: true,\n onceCollection: this\n });\n }\n },\n emit: function emit(events, extraParams) {\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().emit(events, extraParams);\n }\n return this;\n },\n emitAndNotify: function emitAndNotify(event, extraParams) {\n // for internal use only\n if (this.length === 0) {\n return;\n } // empty collections don't need to notify anything\n\n // notify renderer\n this.cy().notify(event, this);\n this.emit(event, extraParams);\n return this;\n }\n};\ndefine.eventAliasesOn(elesfn$9);\n\nvar elesfn$8 = {\n nodes: function nodes(selector) {\n return this.filter(function (ele) {\n return ele.isNode();\n }).filter(selector);\n },\n edges: function edges(selector) {\n return this.filter(function (ele) {\n return ele.isEdge();\n }).filter(selector);\n },\n // internal helper to get nodes and edges as separate collections with single iteration over elements\n byGroup: function byGroup() {\n var nodes = this.spawn();\n var edges = this.spawn();\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n if (ele.isNode()) {\n nodes.push(ele);\n } else {\n edges.push(ele);\n }\n }\n return {\n nodes: nodes,\n edges: edges\n };\n },\n filter: function filter(_filter, thisArg) {\n if (_filter === undefined) {\n // check this first b/c it's the most common/performant case\n return this;\n } else if (string(_filter) || elementOrCollection(_filter)) {\n return new Selector(_filter).filter(this);\n } else if (fn$6(_filter)) {\n var filterEles = this.spawn();\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var include = thisArg ? _filter.apply(thisArg, [ele, i, eles]) : _filter(ele, i, eles);\n if (include) {\n filterEles.push(ele);\n }\n }\n return filterEles;\n }\n return this.spawn(); // if not handled by above, give 'em an empty collection\n },\n\n not: function not(toRemove) {\n if (!toRemove) {\n return this;\n } else {\n if (string(toRemove)) {\n toRemove = this.filter(toRemove);\n }\n var elements = this.spawn();\n for (var i = 0; i < this.length; i++) {\n var element = this[i];\n var remove = toRemove.has(element);\n if (!remove) {\n elements.push(element);\n }\n }\n return elements;\n }\n },\n absoluteComplement: function absoluteComplement() {\n var cy = this.cy();\n return cy.mutableElements().not(this);\n },\n intersect: function intersect(other) {\n // if a selector is specified, then filter by it instead\n if (string(other)) {\n var selector = other;\n return this.filter(selector);\n }\n var elements = this.spawn();\n var col1 = this;\n var col2 = other;\n var col1Smaller = this.length < other.length;\n var colS = col1Smaller ? col1 : col2;\n var colL = col1Smaller ? col2 : col1;\n for (var i = 0; i < colS.length; i++) {\n var ele = colS[i];\n if (colL.has(ele)) {\n elements.push(ele);\n }\n }\n return elements;\n },\n xor: function xor(other) {\n var cy = this._private.cy;\n if (string(other)) {\n other = cy.$(other);\n }\n var elements = this.spawn();\n var col1 = this;\n var col2 = other;\n var add = function add(col, other) {\n for (var i = 0; i < col.length; i++) {\n var ele = col[i];\n var id = ele._private.data.id;\n var inOther = other.hasElementWithId(id);\n if (!inOther) {\n elements.push(ele);\n }\n }\n };\n add(col1, col2);\n add(col2, col1);\n return elements;\n },\n diff: function diff(other) {\n var cy = this._private.cy;\n if (string(other)) {\n other = cy.$(other);\n }\n var left = this.spawn();\n var right = this.spawn();\n var both = this.spawn();\n var col1 = this;\n var col2 = other;\n var add = function add(col, other, retEles) {\n for (var i = 0; i < col.length; i++) {\n var ele = col[i];\n var id = ele._private.data.id;\n var inOther = other.hasElementWithId(id);\n if (inOther) {\n both.merge(ele);\n } else {\n retEles.push(ele);\n }\n }\n };\n add(col1, col2, left);\n add(col2, col1, right);\n return {\n left: left,\n right: right,\n both: both\n };\n },\n add: function add(toAdd) {\n var cy = this._private.cy;\n if (!toAdd) {\n return this;\n }\n if (string(toAdd)) {\n var selector = toAdd;\n toAdd = cy.mutableElements().filter(selector);\n }\n var elements = this.spawnSelf();\n for (var i = 0; i < toAdd.length; i++) {\n var ele = toAdd[i];\n var add = !this.has(ele);\n if (add) {\n elements.push(ele);\n }\n }\n return elements;\n },\n // in place merge on calling collection\n merge: function merge(toAdd) {\n var _p = this._private;\n var cy = _p.cy;\n if (!toAdd) {\n return this;\n }\n if (toAdd && string(toAdd)) {\n var selector = toAdd;\n toAdd = cy.mutableElements().filter(selector);\n }\n var map = _p.map;\n for (var i = 0; i < toAdd.length; i++) {\n var toAddEle = toAdd[i];\n var id = toAddEle._private.data.id;\n var add = !map.has(id);\n if (add) {\n var index = this.length++;\n this[index] = toAddEle;\n map.set(id, {\n ele: toAddEle,\n index: index\n });\n }\n }\n return this; // chaining\n },\n\n unmergeAt: function unmergeAt(i) {\n var ele = this[i];\n var id = ele.id();\n var _p = this._private;\n var map = _p.map;\n\n // remove ele\n this[i] = undefined;\n map[\"delete\"](id);\n var unmergedLastEle = i === this.length - 1;\n\n // replace empty spot with last ele in collection\n if (this.length > 1 && !unmergedLastEle) {\n var lastEleI = this.length - 1;\n var lastEle = this[lastEleI];\n var lastEleId = lastEle._private.data.id;\n this[lastEleI] = undefined;\n this[i] = lastEle;\n map.set(lastEleId, {\n ele: lastEle,\n index: i\n });\n }\n\n // the collection is now 1 ele smaller\n this.length--;\n return this;\n },\n // remove single ele in place in calling collection\n unmergeOne: function unmergeOne(ele) {\n ele = ele[0];\n var _p = this._private;\n var id = ele._private.data.id;\n var map = _p.map;\n var entry = map.get(id);\n if (!entry) {\n return this; // no need to remove\n }\n\n var i = entry.index;\n this.unmergeAt(i);\n return this;\n },\n // remove eles in place on calling collection\n unmerge: function unmerge(toRemove) {\n var cy = this._private.cy;\n if (!toRemove) {\n return this;\n }\n if (toRemove && string(toRemove)) {\n var selector = toRemove;\n toRemove = cy.mutableElements().filter(selector);\n }\n for (var i = 0; i < toRemove.length; i++) {\n this.unmergeOne(toRemove[i]);\n }\n return this; // chaining\n },\n\n unmergeBy: function unmergeBy(toRmFn) {\n for (var i = this.length - 1; i >= 0; i--) {\n var ele = this[i];\n if (toRmFn(ele)) {\n this.unmergeAt(i);\n }\n }\n return this;\n },\n map: function map(mapFn, thisArg) {\n var arr = [];\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var ret = thisArg ? mapFn.apply(thisArg, [ele, i, eles]) : mapFn(ele, i, eles);\n arr.push(ret);\n }\n return arr;\n },\n reduce: function reduce(fn, initialValue) {\n var val = initialValue;\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n val = fn(val, eles[i], i, eles);\n }\n return val;\n },\n max: function max(valFn, thisArg) {\n var max = -Infinity;\n var maxEle;\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles);\n if (val > max) {\n max = val;\n maxEle = ele;\n }\n }\n return {\n value: max,\n ele: maxEle\n };\n },\n min: function min(valFn, thisArg) {\n var min = Infinity;\n var minEle;\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles);\n if (val < min) {\n min = val;\n minEle = ele;\n }\n }\n return {\n value: min,\n ele: minEle\n };\n }\n};\n\n// aliases\nvar fn$1 = elesfn$8;\nfn$1['u'] = fn$1['|'] = fn$1['+'] = fn$1.union = fn$1.or = fn$1.add;\nfn$1['\\\\'] = fn$1['!'] = fn$1['-'] = fn$1.difference = fn$1.relativeComplement = fn$1.subtract = fn$1.not;\nfn$1['n'] = fn$1['&'] = fn$1['.'] = fn$1.and = fn$1.intersection = fn$1.intersect;\nfn$1['^'] = fn$1['(+)'] = fn$1['(-)'] = fn$1.symmetricDifference = fn$1.symdiff = fn$1.xor;\nfn$1.fnFilter = fn$1.filterFn = fn$1.stdFilter = fn$1.filter;\nfn$1.complement = fn$1.abscomp = fn$1.absoluteComplement;\n\nvar elesfn$7 = {\n isNode: function isNode() {\n return this.group() === 'nodes';\n },\n isEdge: function isEdge() {\n return this.group() === 'edges';\n },\n isLoop: function isLoop() {\n return this.isEdge() && this.source()[0] === this.target()[0];\n },\n isSimple: function isSimple() {\n return this.isEdge() && this.source()[0] !== this.target()[0];\n },\n group: function group() {\n var ele = this[0];\n if (ele) {\n return ele._private.group;\n }\n }\n};\n\n/**\n * Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges),\n * and z-index (low to high). These styles affect how this applies:\n *\n * z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the\n * same depth as the root of the compound graph, followed by the default value `auto` which draws in order from\n * root to leaves of the compound graph. The last drawn is `top`.\n * z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes.\n * `manual` ignores this convention and draws based on the `z-index` value setting.\n * z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher\n * `z-index` will be drawn on top of an element with a lower `z-index`.\n */\nvar zIndexSort = function zIndexSort(a, b) {\n var cy = a.cy();\n var hasCompoundNodes = cy.hasCompoundNodes();\n function getDepth(ele) {\n var style = ele.pstyle('z-compound-depth');\n if (style.value === 'auto') {\n return hasCompoundNodes ? ele.zDepth() : 0;\n } else if (style.value === 'bottom') {\n return -1;\n } else if (style.value === 'top') {\n return MAX_INT$1;\n }\n // 'orphan'\n return 0;\n }\n var depthDiff = getDepth(a) - getDepth(b);\n if (depthDiff !== 0) {\n return depthDiff;\n }\n function getEleDepth(ele) {\n var style = ele.pstyle('z-index-compare');\n if (style.value === 'auto') {\n return ele.isNode() ? 1 : 0;\n }\n // 'manual'\n return 0;\n }\n var eleDiff = getEleDepth(a) - getEleDepth(b);\n if (eleDiff !== 0) {\n return eleDiff;\n }\n var zDiff = a.pstyle('z-index').value - b.pstyle('z-index').value;\n if (zDiff !== 0) {\n return zDiff;\n }\n // compare indices in the core (order added to graph w/ last on top)\n return a.poolIndex() - b.poolIndex();\n};\n\nvar elesfn$6 = {\n forEach: function forEach(fn, thisArg) {\n if (fn$6(fn)) {\n var N = this.length;\n for (var i = 0; i < N; i++) {\n var ele = this[i];\n var ret = thisArg ? fn.apply(thisArg, [ele, i, this]) : fn(ele, i, this);\n if (ret === false) {\n break;\n } // exit each early on return false\n }\n }\n\n return this;\n },\n toArray: function toArray() {\n var array = [];\n for (var i = 0; i < this.length; i++) {\n array.push(this[i]);\n }\n return array;\n },\n slice: function slice(start, end) {\n var array = [];\n var thisSize = this.length;\n if (end == null) {\n end = thisSize;\n }\n if (start == null) {\n start = 0;\n }\n if (start < 0) {\n start = thisSize + start;\n }\n if (end < 0) {\n end = thisSize + end;\n }\n for (var i = start; i >= 0 && i < end && i < thisSize; i++) {\n array.push(this[i]);\n }\n return this.spawn(array);\n },\n size: function size() {\n return this.length;\n },\n eq: function eq(i) {\n return this[i] || this.spawn();\n },\n first: function first() {\n return this[0] || this.spawn();\n },\n last: function last() {\n return this[this.length - 1] || this.spawn();\n },\n empty: function empty() {\n return this.length === 0;\n },\n nonempty: function nonempty() {\n return !this.empty();\n },\n sort: function sort(sortFn) {\n if (!fn$6(sortFn)) {\n return this;\n }\n var sorted = this.toArray().sort(sortFn);\n return this.spawn(sorted);\n },\n sortByZIndex: function sortByZIndex() {\n return this.sort(zIndexSort);\n },\n zDepth: function zDepth() {\n var ele = this[0];\n if (!ele) {\n return undefined;\n }\n\n // let cy = ele.cy();\n var _p = ele._private;\n var group = _p.group;\n if (group === 'nodes') {\n var depth = _p.data.parent ? ele.parents().size() : 0;\n if (!ele.isParent()) {\n return MAX_INT$1 - 1; // childless nodes always on top\n }\n\n return depth;\n } else {\n var src = _p.source;\n var tgt = _p.target;\n var srcDepth = src.zDepth();\n var tgtDepth = tgt.zDepth();\n return Math.max(srcDepth, tgtDepth, 0); // depth of deepest parent\n }\n }\n};\n\nelesfn$6.each = elesfn$6.forEach;\nvar defineSymbolIterator = function defineSymbolIterator() {\n var typeofUndef = \"undefined\" ;\n var isIteratorSupported = (typeof Symbol === \"undefined\" ? \"undefined\" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; // eslint-disable-line no-undef\n\n if (isIteratorSupported) {\n elesfn$6[Symbol.iterator] = function () {\n var _this = this;\n // eslint-disable-line no-undef\n var entry = {\n value: undefined,\n done: false\n };\n var i = 0;\n var length = this.length;\n return _defineProperty$1({\n next: function next() {\n if (i < length) {\n entry.value = _this[i++];\n } else {\n entry.value = undefined;\n entry.done = true;\n }\n return entry;\n }\n }, Symbol.iterator, function () {\n // eslint-disable-line no-undef\n return this;\n });\n };\n }\n};\ndefineSymbolIterator();\n\nvar getLayoutDimensionOptions = defaults$g({\n nodeDimensionsIncludeLabels: false\n});\nvar elesfn$5 = {\n // Calculates and returns node dimensions { x, y } based on options given\n layoutDimensions: function layoutDimensions(options) {\n options = getLayoutDimensionOptions(options);\n var dims;\n if (!this.takesUpSpace()) {\n dims = {\n w: 0,\n h: 0\n };\n } else if (options.nodeDimensionsIncludeLabels) {\n var bbDim = this.boundingBox();\n dims = {\n w: bbDim.w,\n h: bbDim.h\n };\n } else {\n dims = {\n w: this.outerWidth(),\n h: this.outerHeight()\n };\n }\n\n // sanitise the dimensions for external layouts (avoid division by zero)\n if (dims.w === 0 || dims.h === 0) {\n dims.w = dims.h = 1;\n }\n return dims;\n },\n // using standard layout options, apply position function (w/ or w/o animation)\n layoutPositions: function layoutPositions(layout, options, fn) {\n var nodes = this.nodes().filter(function (n) {\n return !n.isParent();\n });\n var cy = this.cy();\n var layoutEles = options.eles; // nodes & edges\n var getMemoizeKey = function getMemoizeKey(node) {\n return node.id();\n };\n var fnMem = memoize$1(fn, getMemoizeKey); // memoized version of position function\n\n layout.emit({\n type: 'layoutstart',\n layout: layout\n });\n layout.animations = [];\n var calculateSpacing = function calculateSpacing(spacing, nodesBb, pos) {\n var center = {\n x: nodesBb.x1 + nodesBb.w / 2,\n y: nodesBb.y1 + nodesBb.h / 2\n };\n var spacingVector = {\n // scale from center of bounding box (not necessarily 0,0)\n x: (pos.x - center.x) * spacing,\n y: (pos.y - center.y) * spacing\n };\n return {\n x: center.x + spacingVector.x,\n y: center.y + spacingVector.y\n };\n };\n var useSpacingFactor = options.spacingFactor && options.spacingFactor !== 1;\n var spacingBb = function spacingBb() {\n if (!useSpacingFactor) {\n return null;\n }\n var bb = makeBoundingBox();\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var pos = fnMem(node, i);\n expandBoundingBoxByPoint(bb, pos.x, pos.y);\n }\n return bb;\n };\n var bb = spacingBb();\n var getFinalPos = memoize$1(function (node, i) {\n var newPos = fnMem(node, i);\n if (useSpacingFactor) {\n var spacing = Math.abs(options.spacingFactor);\n newPos = calculateSpacing(spacing, bb, newPos);\n }\n if (options.transform != null) {\n newPos = options.transform(node, newPos);\n }\n return newPos;\n }, getMemoizeKey);\n if (options.animate) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var newPos = getFinalPos(node, i);\n var animateNode = options.animateFilter == null || options.animateFilter(node, i);\n if (animateNode) {\n var ani = node.animation({\n position: newPos,\n duration: options.animationDuration,\n easing: options.animationEasing\n });\n layout.animations.push(ani);\n } else {\n node.position(newPos);\n }\n }\n if (options.fit) {\n var fitAni = cy.animation({\n fit: {\n boundingBox: layoutEles.boundingBoxAt(getFinalPos),\n padding: options.padding\n },\n duration: options.animationDuration,\n easing: options.animationEasing\n });\n layout.animations.push(fitAni);\n } else if (options.zoom !== undefined && options.pan !== undefined) {\n var zoomPanAni = cy.animation({\n zoom: options.zoom,\n pan: options.pan,\n duration: options.animationDuration,\n easing: options.animationEasing\n });\n layout.animations.push(zoomPanAni);\n }\n layout.animations.forEach(function (ani) {\n return ani.play();\n });\n layout.one('layoutready', options.ready);\n layout.emit({\n type: 'layoutready',\n layout: layout\n });\n Promise$1.all(layout.animations.map(function (ani) {\n return ani.promise();\n })).then(function () {\n layout.one('layoutstop', options.stop);\n layout.emit({\n type: 'layoutstop',\n layout: layout\n });\n });\n } else {\n nodes.positions(getFinalPos);\n if (options.fit) {\n cy.fit(options.eles, options.padding);\n }\n if (options.zoom != null) {\n cy.zoom(options.zoom);\n }\n if (options.pan) {\n cy.pan(options.pan);\n }\n layout.one('layoutready', options.ready);\n layout.emit({\n type: 'layoutready',\n layout: layout\n });\n layout.one('layoutstop', options.stop);\n layout.emit({\n type: 'layoutstop',\n layout: layout\n });\n }\n return this; // chaining\n },\n\n layout: function layout(options) {\n var cy = this.cy();\n return cy.makeLayout(extend({}, options, {\n eles: this\n }));\n }\n};\n\n// aliases:\nelesfn$5.createLayout = elesfn$5.makeLayout = elesfn$5.layout;\n\nfunction styleCache(key, fn, ele) {\n var _p = ele._private;\n var cache = _p.styleCache = _p.styleCache || [];\n var val;\n if ((val = cache[key]) != null) {\n return val;\n } else {\n val = cache[key] = fn(ele);\n return val;\n }\n}\nfunction cacheStyleFunction(key, fn) {\n key = hashString(key);\n return function cachedStyleFunction(ele) {\n return styleCache(key, fn, ele);\n };\n}\nfunction cachePrototypeStyleFunction(key, fn) {\n key = hashString(key);\n var selfFn = function selfFn(ele) {\n return fn.call(ele);\n };\n return function cachedPrototypeStyleFunction() {\n var ele = this[0];\n if (ele) {\n return styleCache(key, selfFn, ele);\n }\n };\n}\nvar elesfn$4 = {\n recalculateRenderedStyle: function recalculateRenderedStyle(useCache) {\n var cy = this.cy();\n var renderer = cy.renderer();\n var styleEnabled = cy.styleEnabled();\n if (renderer && styleEnabled) {\n renderer.recalculateRenderedStyle(this, useCache);\n }\n return this;\n },\n dirtyStyleCache: function dirtyStyleCache() {\n var cy = this.cy();\n var dirty = function dirty(ele) {\n return ele._private.styleCache = null;\n };\n if (cy.hasCompoundNodes()) {\n var eles;\n eles = this.spawnSelf().merge(this.descendants()).merge(this.parents());\n eles.merge(eles.connectedEdges());\n eles.forEach(dirty);\n } else {\n this.forEach(function (ele) {\n dirty(ele);\n ele.connectedEdges().forEach(dirty);\n });\n }\n return this;\n },\n // fully updates (recalculates) the style for the elements\n updateStyle: function updateStyle(notifyRenderer) {\n var cy = this._private.cy;\n if (!cy.styleEnabled()) {\n return this;\n }\n if (cy.batching()) {\n var bEles = cy._private.batchStyleEles;\n bEles.merge(this);\n return this; // chaining and exit early when batching\n }\n\n var hasCompounds = cy.hasCompoundNodes();\n var updatedEles = this;\n notifyRenderer = notifyRenderer || notifyRenderer === undefined ? true : false;\n if (hasCompounds) {\n // then add everything up and down for compound selector checks\n updatedEles = this.spawnSelf().merge(this.descendants()).merge(this.parents());\n }\n\n // let changedEles = style.apply( updatedEles );\n var changedEles = updatedEles;\n if (notifyRenderer) {\n changedEles.emitAndNotify('style'); // let renderer know we changed style\n } else {\n changedEles.emit('style'); // just fire the event\n }\n\n updatedEles.forEach(function (ele) {\n return ele._private.styleDirty = true;\n });\n return this; // chaining\n },\n\n // private: clears dirty flag and recalculates style\n cleanStyle: function cleanStyle() {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return;\n }\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n if (ele._private.styleDirty) {\n // n.b. this flag should be set before apply() to avoid potential infinite recursion\n ele._private.styleDirty = false;\n cy.style().apply(ele);\n }\n }\n },\n // get the internal parsed style object for the specified property\n parsedStyle: function parsedStyle(property) {\n var includeNonDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ele = this[0];\n var cy = ele.cy();\n if (!cy.styleEnabled()) {\n return;\n }\n if (ele) {\n this.cleanStyle();\n var overriddenStyle = ele._private.style[property];\n if (overriddenStyle != null) {\n return overriddenStyle;\n } else if (includeNonDefault) {\n return cy.style().getDefaultProperty(property);\n } else {\n return null;\n }\n }\n },\n numericStyle: function numericStyle(property) {\n var ele = this[0];\n if (!ele.cy().styleEnabled()) {\n return;\n }\n if (ele) {\n var pstyle = ele.pstyle(property);\n return pstyle.pfValue !== undefined ? pstyle.pfValue : pstyle.value;\n }\n },\n numericStyleUnits: function numericStyleUnits(property) {\n var ele = this[0];\n if (!ele.cy().styleEnabled()) {\n return;\n }\n if (ele) {\n return ele.pstyle(property).units;\n }\n },\n // get the specified css property as a rendered value (i.e. on-screen value)\n // or get the whole rendered style if no property specified (NB doesn't allow setting)\n renderedStyle: function renderedStyle(property) {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return this;\n }\n var ele = this[0];\n if (ele) {\n return cy.style().getRenderedStyle(ele, property);\n }\n },\n // read the calculated css style of the element or override the style (via a bypass)\n style: function style(name, value) {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return this;\n }\n var updateTransitions = false;\n var style = cy.style();\n if (plainObject(name)) {\n // then extend the bypass\n var props = name;\n style.applyBypass(this, props, updateTransitions);\n this.emitAndNotify('style'); // let the renderer know we've updated style\n } else if (string(name)) {\n if (value === undefined) {\n // then get the property from the style\n var ele = this[0];\n if (ele) {\n return style.getStylePropertyValue(ele, name);\n } else {\n // empty collection => can't get any value\n return;\n }\n } else {\n // then set the bypass with the property value\n style.applyBypass(this, name, value, updateTransitions);\n this.emitAndNotify('style'); // let the renderer know we've updated style\n }\n } else if (name === undefined) {\n var _ele = this[0];\n if (_ele) {\n return style.getRawStyle(_ele);\n } else {\n // empty collection => can't get any value\n return;\n }\n }\n return this; // chaining\n },\n\n removeStyle: function removeStyle(names) {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return this;\n }\n var updateTransitions = false;\n var style = cy.style();\n var eles = this;\n if (names === undefined) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n style.removeAllBypasses(ele, updateTransitions);\n }\n } else {\n names = names.split(/\\s+/);\n for (var _i = 0; _i < eles.length; _i++) {\n var _ele2 = eles[_i];\n style.removeBypasses(_ele2, names, updateTransitions);\n }\n }\n this.emitAndNotify('style'); // let the renderer know we've updated style\n\n return this; // chaining\n },\n\n show: function show() {\n this.css('display', 'element');\n return this; // chaining\n },\n\n hide: function hide() {\n this.css('display', 'none');\n return this; // chaining\n },\n\n effectiveOpacity: function effectiveOpacity() {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return 1;\n }\n var hasCompoundNodes = cy.hasCompoundNodes();\n var ele = this[0];\n if (ele) {\n var _p = ele._private;\n var parentOpacity = ele.pstyle('opacity').value;\n if (!hasCompoundNodes) {\n return parentOpacity;\n }\n var parents = !_p.data.parent ? null : ele.parents();\n if (parents) {\n for (var i = 0; i < parents.length; i++) {\n var parent = parents[i];\n var opacity = parent.pstyle('opacity').value;\n parentOpacity = opacity * parentOpacity;\n }\n }\n return parentOpacity;\n }\n },\n transparent: function transparent() {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return false;\n }\n var ele = this[0];\n var hasCompoundNodes = ele.cy().hasCompoundNodes();\n if (ele) {\n if (!hasCompoundNodes) {\n return ele.pstyle('opacity').value === 0;\n } else {\n return ele.effectiveOpacity() === 0;\n }\n }\n },\n backgrounding: function backgrounding() {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return false;\n }\n var ele = this[0];\n return ele._private.backgrounding ? true : false;\n }\n};\nfunction checkCompound(ele, parentOk) {\n var _p = ele._private;\n var parents = _p.data.parent ? ele.parents() : null;\n if (parents) {\n for (var i = 0; i < parents.length; i++) {\n var parent = parents[i];\n if (!parentOk(parent)) {\n return false;\n }\n }\n }\n return true;\n}\nfunction defineDerivedStateFunction(specs) {\n var ok = specs.ok;\n var edgeOkViaNode = specs.edgeOkViaNode || specs.ok;\n var parentOk = specs.parentOk || specs.ok;\n return function () {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return true;\n }\n var ele = this[0];\n var hasCompoundNodes = cy.hasCompoundNodes();\n if (ele) {\n var _p = ele._private;\n if (!ok(ele)) {\n return false;\n }\n if (ele.isNode()) {\n return !hasCompoundNodes || checkCompound(ele, parentOk);\n } else {\n var src = _p.source;\n var tgt = _p.target;\n return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode)));\n }\n }\n };\n}\nvar eleTakesUpSpace = cacheStyleFunction('eleTakesUpSpace', function (ele) {\n return ele.pstyle('display').value === 'element' && ele.width() !== 0 && (ele.isNode() ? ele.height() !== 0 : true);\n});\nelesfn$4.takesUpSpace = cachePrototypeStyleFunction('takesUpSpace', defineDerivedStateFunction({\n ok: eleTakesUpSpace\n}));\nvar eleInteractive = cacheStyleFunction('eleInteractive', function (ele) {\n return ele.pstyle('events').value === 'yes' && ele.pstyle('visibility').value === 'visible' && eleTakesUpSpace(ele);\n});\nvar parentInteractive = cacheStyleFunction('parentInteractive', function (parent) {\n return parent.pstyle('visibility').value === 'visible' && eleTakesUpSpace(parent);\n});\nelesfn$4.interactive = cachePrototypeStyleFunction('interactive', defineDerivedStateFunction({\n ok: eleInteractive,\n parentOk: parentInteractive,\n edgeOkViaNode: eleTakesUpSpace\n}));\nelesfn$4.noninteractive = function () {\n var ele = this[0];\n if (ele) {\n return !ele.interactive();\n }\n};\nvar eleVisible = cacheStyleFunction('eleVisible', function (ele) {\n return ele.pstyle('visibility').value === 'visible' && ele.pstyle('opacity').pfValue !== 0 && eleTakesUpSpace(ele);\n});\nvar edgeVisibleViaNode = eleTakesUpSpace;\nelesfn$4.visible = cachePrototypeStyleFunction('visible', defineDerivedStateFunction({\n ok: eleVisible,\n edgeOkViaNode: edgeVisibleViaNode\n}));\nelesfn$4.hidden = function () {\n var ele = this[0];\n if (ele) {\n return !ele.visible();\n }\n};\nelesfn$4.isBundledBezier = cachePrototypeStyleFunction('isBundledBezier', function () {\n if (!this.cy().styleEnabled()) {\n return false;\n }\n return !this.removed() && this.pstyle('curve-style').value === 'bezier' && this.takesUpSpace();\n});\nelesfn$4.bypass = elesfn$4.css = elesfn$4.style;\nelesfn$4.renderedCss = elesfn$4.renderedStyle;\nelesfn$4.removeBypass = elesfn$4.removeCss = elesfn$4.removeStyle;\nelesfn$4.pstyle = elesfn$4.parsedStyle;\n\nvar elesfn$3 = {};\nfunction defineSwitchFunction(params) {\n return function () {\n var args = arguments;\n var changedEles = [];\n\n // e.g. cy.nodes().select( data, handler )\n if (args.length === 2) {\n var data = args[0];\n var handler = args[1];\n this.on(params.event, data, handler);\n }\n\n // e.g. cy.nodes().select( handler )\n else if (args.length === 1 && fn$6(args[0])) {\n var _handler = args[0];\n this.on(params.event, _handler);\n }\n\n // e.g. cy.nodes().select()\n // e.g. (private) cy.nodes().select(['tapselect'])\n else if (args.length === 0 || args.length === 1 && array(args[0])) {\n var addlEvents = args.length === 1 ? args[0] : null;\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var able = !params.ableField || ele._private[params.ableField];\n var changed = ele._private[params.field] != params.value;\n if (params.overrideAble) {\n var overrideAble = params.overrideAble(ele);\n if (overrideAble !== undefined) {\n able = overrideAble;\n if (!overrideAble) {\n return this;\n } // to save cycles assume not able for all on override\n }\n }\n\n if (able) {\n ele._private[params.field] = params.value;\n if (changed) {\n changedEles.push(ele);\n }\n }\n }\n var changedColl = this.spawn(changedEles);\n changedColl.updateStyle(); // change of state => possible change of style\n changedColl.emit(params.event);\n if (addlEvents) {\n changedColl.emit(addlEvents);\n }\n }\n return this;\n };\n}\nfunction defineSwitchSet(params) {\n elesfn$3[params.field] = function () {\n var ele = this[0];\n if (ele) {\n if (params.overrideField) {\n var val = params.overrideField(ele);\n if (val !== undefined) {\n return val;\n }\n }\n return ele._private[params.field];\n }\n };\n elesfn$3[params.on] = defineSwitchFunction({\n event: params.on,\n field: params.field,\n ableField: params.ableField,\n overrideAble: params.overrideAble,\n value: true\n });\n elesfn$3[params.off] = defineSwitchFunction({\n event: params.off,\n field: params.field,\n ableField: params.ableField,\n overrideAble: params.overrideAble,\n value: false\n });\n}\ndefineSwitchSet({\n field: 'locked',\n overrideField: function overrideField(ele) {\n return ele.cy().autolock() ? true : undefined;\n },\n on: 'lock',\n off: 'unlock'\n});\ndefineSwitchSet({\n field: 'grabbable',\n overrideField: function overrideField(ele) {\n return ele.cy().autoungrabify() || ele.pannable() ? false : undefined;\n },\n on: 'grabify',\n off: 'ungrabify'\n});\ndefineSwitchSet({\n field: 'selected',\n ableField: 'selectable',\n overrideAble: function overrideAble(ele) {\n return ele.cy().autounselectify() ? false : undefined;\n },\n on: 'select',\n off: 'unselect'\n});\ndefineSwitchSet({\n field: 'selectable',\n overrideField: function overrideField(ele) {\n return ele.cy().autounselectify() ? false : undefined;\n },\n on: 'selectify',\n off: 'unselectify'\n});\nelesfn$3.deselect = elesfn$3.unselect;\nelesfn$3.grabbed = function () {\n var ele = this[0];\n if (ele) {\n return ele._private.grabbed;\n }\n};\ndefineSwitchSet({\n field: 'active',\n on: 'activate',\n off: 'unactivate'\n});\ndefineSwitchSet({\n field: 'pannable',\n on: 'panify',\n off: 'unpanify'\n});\nelesfn$3.inactive = function () {\n var ele = this[0];\n if (ele) {\n return !ele._private.active;\n }\n};\n\nvar elesfn$2 = {};\n\n// DAG functions\n////////////////\n\nvar defineDagExtremity = function defineDagExtremity(params) {\n return function dagExtremityImpl(selector) {\n var eles = this;\n var ret = [];\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (!ele.isNode()) {\n continue;\n }\n var disqualified = false;\n var edges = ele.connectedEdges();\n for (var j = 0; j < edges.length; j++) {\n var edge = edges[j];\n var src = edge.source();\n var tgt = edge.target();\n if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) {\n disqualified = true;\n break;\n }\n }\n if (!disqualified) {\n ret.push(ele);\n }\n }\n return this.spawn(ret, true).filter(selector);\n };\n};\nvar defineDagOneHop = function defineDagOneHop(params) {\n return function (selector) {\n var eles = this;\n var oEles = [];\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (!ele.isNode()) {\n continue;\n }\n var edges = ele.connectedEdges();\n for (var j = 0; j < edges.length; j++) {\n var edge = edges[j];\n var src = edge.source();\n var tgt = edge.target();\n if (params.outgoing && src === ele) {\n oEles.push(edge);\n oEles.push(tgt);\n } else if (params.incoming && tgt === ele) {\n oEles.push(edge);\n oEles.push(src);\n }\n }\n }\n return this.spawn(oEles, true).filter(selector);\n };\n};\nvar defineDagAllHops = function defineDagAllHops(params) {\n return function (selector) {\n var eles = this;\n var sEles = [];\n var sElesIds = {};\n for (;;) {\n var next = params.outgoing ? eles.outgoers() : eles.incomers();\n if (next.length === 0) {\n break;\n } // done if none left\n\n var newNext = false;\n for (var i = 0; i < next.length; i++) {\n var n = next[i];\n var nid = n.id();\n if (!sElesIds[nid]) {\n sElesIds[nid] = true;\n sEles.push(n);\n newNext = true;\n }\n }\n if (!newNext) {\n break;\n } // done if touched all outgoers already\n\n eles = next;\n }\n return this.spawn(sEles, true).filter(selector);\n };\n};\nelesfn$2.clearTraversalCache = function () {\n for (var i = 0; i < this.length; i++) {\n this[i]._private.traversalCache = null;\n }\n};\nextend(elesfn$2, {\n // get the root nodes in the DAG\n roots: defineDagExtremity({\n noIncomingEdges: true\n }),\n // get the leaf nodes in the DAG\n leaves: defineDagExtremity({\n noOutgoingEdges: true\n }),\n // normally called children in graph theory\n // these nodes =edges=> outgoing nodes\n outgoers: cache(defineDagOneHop({\n outgoing: true\n }), 'outgoers'),\n // aka DAG descendants\n successors: defineDagAllHops({\n outgoing: true\n }),\n // normally called parents in graph theory\n // these nodes <=edges= incoming nodes\n incomers: cache(defineDagOneHop({\n incoming: true\n }), 'incomers'),\n // aka DAG ancestors\n predecessors: defineDagAllHops({\n incoming: true\n })\n});\n\n// Neighbourhood functions\n//////////////////////////\n\nextend(elesfn$2, {\n neighborhood: cache(function (selector) {\n var elements = [];\n var nodes = this.nodes();\n for (var i = 0; i < nodes.length; i++) {\n // for all nodes\n var node = nodes[i];\n var connectedEdges = node.connectedEdges();\n\n // for each connected edge, add the edge and the other node\n for (var j = 0; j < connectedEdges.length; j++) {\n var edge = connectedEdges[j];\n var src = edge.source();\n var tgt = edge.target();\n var otherNode = node === src ? tgt : src;\n\n // need check in case of loop\n if (otherNode.length > 0) {\n elements.push(otherNode[0]); // add node 1 hop away\n }\n\n // add connected edge\n elements.push(edge[0]);\n }\n }\n return this.spawn(elements, true).filter(selector);\n }, 'neighborhood'),\n closedNeighborhood: function closedNeighborhood(selector) {\n return this.neighborhood().add(this).filter(selector);\n },\n openNeighborhood: function openNeighborhood(selector) {\n return this.neighborhood(selector);\n }\n});\n\n// aliases\nelesfn$2.neighbourhood = elesfn$2.neighborhood;\nelesfn$2.closedNeighbourhood = elesfn$2.closedNeighborhood;\nelesfn$2.openNeighbourhood = elesfn$2.openNeighborhood;\n\n// Edge functions\n/////////////////\n\nextend(elesfn$2, {\n source: cache(function sourceImpl(selector) {\n var ele = this[0];\n var src;\n if (ele) {\n src = ele._private.source || ele.cy().collection();\n }\n return src && selector ? src.filter(selector) : src;\n }, 'source'),\n target: cache(function targetImpl(selector) {\n var ele = this[0];\n var tgt;\n if (ele) {\n tgt = ele._private.target || ele.cy().collection();\n }\n return tgt && selector ? tgt.filter(selector) : tgt;\n }, 'target'),\n sources: defineSourceFunction({\n attr: 'source'\n }),\n targets: defineSourceFunction({\n attr: 'target'\n })\n});\nfunction defineSourceFunction(params) {\n return function sourceImpl(selector) {\n var sources = [];\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var src = ele._private[params.attr];\n if (src) {\n sources.push(src);\n }\n }\n return this.spawn(sources, true).filter(selector);\n };\n}\nextend(elesfn$2, {\n edgesWith: cache(defineEdgesWithFunction(), 'edgesWith'),\n edgesTo: cache(defineEdgesWithFunction({\n thisIsSrc: true\n }), 'edgesTo')\n});\nfunction defineEdgesWithFunction(params) {\n return function edgesWithImpl(otherNodes) {\n var elements = [];\n var cy = this._private.cy;\n var p = params || {};\n\n // get elements if a selector is specified\n if (string(otherNodes)) {\n otherNodes = cy.$(otherNodes);\n }\n for (var h = 0; h < otherNodes.length; h++) {\n var edges = otherNodes[h]._private.edges;\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var edgeData = edge._private.data;\n var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target);\n var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target);\n var edgeConnectsThisAndOther = thisToOther || otherToThis;\n if (!edgeConnectsThisAndOther) {\n continue;\n }\n if (p.thisIsSrc || p.thisIsTgt) {\n if (p.thisIsSrc && !thisToOther) {\n continue;\n }\n if (p.thisIsTgt && !otherToThis) {\n continue;\n }\n }\n elements.push(edge);\n }\n }\n return this.spawn(elements, true);\n };\n}\nextend(elesfn$2, {\n connectedEdges: cache(function (selector) {\n var retEles = [];\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var node = eles[i];\n if (!node.isNode()) {\n continue;\n }\n var edges = node._private.edges;\n for (var j = 0; j < edges.length; j++) {\n var edge = edges[j];\n retEles.push(edge);\n }\n }\n return this.spawn(retEles, true).filter(selector);\n }, 'connectedEdges'),\n connectedNodes: cache(function (selector) {\n var retEles = [];\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var edge = eles[i];\n if (!edge.isEdge()) {\n continue;\n }\n retEles.push(edge.source()[0]);\n retEles.push(edge.target()[0]);\n }\n return this.spawn(retEles, true).filter(selector);\n }, 'connectedNodes'),\n parallelEdges: cache(defineParallelEdgesFunction(), 'parallelEdges'),\n codirectedEdges: cache(defineParallelEdgesFunction({\n codirected: true\n }), 'codirectedEdges')\n});\nfunction defineParallelEdgesFunction(params) {\n var defaults = {\n codirected: false\n };\n params = extend({}, defaults, params);\n return function parallelEdgesImpl(selector) {\n // micro-optimised for renderer\n var elements = [];\n var edges = this.edges();\n var p = params;\n\n // look at all the edges in the collection\n for (var i = 0; i < edges.length; i++) {\n var edge1 = edges[i];\n var edge1_p = edge1._private;\n var src1 = edge1_p.source;\n var srcid1 = src1._private.data.id;\n var tgtid1 = edge1_p.data.target;\n var srcEdges1 = src1._private.edges;\n\n // look at edges connected to the src node of this edge\n for (var j = 0; j < srcEdges1.length; j++) {\n var edge2 = srcEdges1[j];\n var edge2data = edge2._private.data;\n var tgtid2 = edge2data.target;\n var srcid2 = edge2data.source;\n var codirected = tgtid2 === tgtid1 && srcid2 === srcid1;\n var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2;\n if (p.codirected && codirected || !p.codirected && (codirected || oppdirected)) {\n elements.push(edge2);\n }\n }\n }\n return this.spawn(elements, true).filter(selector);\n };\n}\n\n// Misc functions\n/////////////////\n\nextend(elesfn$2, {\n components: function components(root) {\n var self = this;\n var cy = self.cy();\n var visited = cy.collection();\n var unvisited = root == null ? self.nodes() : root.nodes();\n var components = [];\n if (root != null && unvisited.empty()) {\n // root may contain only edges\n unvisited = root.sources(); // doesn't matter which node to use (undirected), so just use the source sides\n }\n\n var visitInComponent = function visitInComponent(node, component) {\n visited.merge(node);\n unvisited.unmerge(node);\n component.merge(node);\n };\n if (unvisited.empty()) {\n return self.spawn();\n }\n var _loop = function _loop() {\n // each iteration yields a component\n var cmpt = cy.collection();\n components.push(cmpt);\n var root = unvisited[0];\n visitInComponent(root, cmpt);\n self.bfs({\n directed: false,\n roots: root,\n visit: function visit(v) {\n return visitInComponent(v, cmpt);\n }\n });\n cmpt.forEach(function (node) {\n node.connectedEdges().forEach(function (e) {\n // connectedEdges() usually cached\n if (self.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) {\n // has() is cheap\n cmpt.merge(e); // forEach() only considers nodes -- sets N at call time\n }\n });\n });\n };\n do {\n _loop();\n } while (unvisited.length > 0);\n return components;\n },\n component: function component() {\n var ele = this[0];\n return ele.cy().mutableElements().components(ele)[0];\n }\n});\nelesfn$2.componentsOf = elesfn$2.components;\n\n// represents a set of nodes, edges, or both together\nvar Collection = function Collection(cy, elements) {\n var unique = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var removed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n if (cy === undefined) {\n error('A collection must have a reference to the core');\n return;\n }\n var map = new Map$2();\n var createdElements = false;\n if (!elements) {\n elements = [];\n } else if (elements.length > 0 && plainObject(elements[0]) && !element(elements[0])) {\n createdElements = true;\n\n // make elements from json and restore all at once later\n var eles = [];\n var elesIds = new Set$1();\n for (var i = 0, l = elements.length; i < l; i++) {\n var json = elements[i];\n if (json.data == null) {\n json.data = {};\n }\n var _data = json.data;\n\n // make sure newly created elements have valid ids\n if (_data.id == null) {\n _data.id = uuid();\n } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) {\n continue; // can't create element if prior id already exists\n }\n\n var ele = new Element(cy, json, false);\n eles.push(ele);\n elesIds.add(_data.id);\n }\n elements = eles;\n }\n this.length = 0;\n for (var _i = 0, _l = elements.length; _i < _l; _i++) {\n var element$1 = elements[_i][0]; // [0] in case elements is an array of collections, rather than array of elements\n if (element$1 == null) {\n continue;\n }\n var id = element$1._private.data.id;\n if (!unique || !map.has(id)) {\n if (unique) {\n map.set(id, {\n index: this.length,\n ele: element$1\n });\n }\n this[this.length] = element$1;\n this.length++;\n }\n }\n this._private = {\n eles: this,\n cy: cy,\n get map() {\n if (this.lazyMap == null) {\n this.rebuildMap();\n }\n return this.lazyMap;\n },\n set map(m) {\n this.lazyMap = m;\n },\n rebuildMap: function rebuildMap() {\n var m = this.lazyMap = new Map$2();\n var eles = this.eles;\n for (var _i2 = 0; _i2 < eles.length; _i2++) {\n var _ele = eles[_i2];\n m.set(_ele.id(), {\n index: _i2,\n ele: _ele\n });\n }\n }\n };\n if (unique) {\n this._private.map = map;\n }\n\n // restore the elements if we created them from json\n if (createdElements && !removed) {\n this.restore();\n }\n};\n\n// Functions\n////////////////////////////////////////////////////////////////////////////////////////////////////\n\n// keep the prototypes in sync (an element has the same functions as a collection)\n// and use elefn and elesfn as shorthands to the prototypes\nvar elesfn$1 = Element.prototype = Collection.prototype = Object.create(Array.prototype);\nelesfn$1.instanceString = function () {\n return 'collection';\n};\nelesfn$1.spawn = function (eles, unique) {\n return new Collection(this.cy(), eles, unique);\n};\nelesfn$1.spawnSelf = function () {\n return this.spawn(this);\n};\nelesfn$1.cy = function () {\n return this._private.cy;\n};\nelesfn$1.renderer = function () {\n return this._private.cy.renderer();\n};\nelesfn$1.element = function () {\n return this[0];\n};\nelesfn$1.collection = function () {\n if (collection(this)) {\n return this;\n } else {\n // an element\n return new Collection(this._private.cy, [this]);\n }\n};\nelesfn$1.unique = function () {\n return new Collection(this._private.cy, this, true);\n};\nelesfn$1.hasElementWithId = function (id) {\n id = '' + id; // id must be string\n\n return this._private.map.has(id);\n};\nelesfn$1.getElementById = function (id) {\n id = '' + id; // id must be string\n\n var cy = this._private.cy;\n var entry = this._private.map.get(id);\n return entry ? entry.ele : new Collection(cy); // get ele or empty collection\n};\n\nelesfn$1.$id = elesfn$1.getElementById;\nelesfn$1.poolIndex = function () {\n var cy = this._private.cy;\n var eles = cy._private.elements;\n var id = this[0]._private.data.id;\n return eles._private.map.get(id).index;\n};\nelesfn$1.indexOf = function (ele) {\n var id = ele[0]._private.data.id;\n return this._private.map.get(id).index;\n};\nelesfn$1.indexOfId = function (id) {\n id = '' + id; // id must be string\n\n return this._private.map.get(id).index;\n};\nelesfn$1.json = function (obj) {\n var ele = this.element();\n var cy = this.cy();\n if (ele == null && obj) {\n return this;\n } // can't set to no eles\n\n if (ele == null) {\n return undefined;\n } // can't get from no eles\n\n var p = ele._private;\n if (plainObject(obj)) {\n // set\n\n cy.startBatch();\n if (obj.data) {\n ele.data(obj.data);\n var _data2 = p.data;\n if (ele.isEdge()) {\n // source and target are immutable via data()\n var move = false;\n var spec = {};\n var src = obj.data.source;\n var tgt = obj.data.target;\n if (src != null && src != _data2.source) {\n spec.source = '' + src; // id must be string\n move = true;\n }\n if (tgt != null && tgt != _data2.target) {\n spec.target = '' + tgt; // id must be string\n move = true;\n }\n if (move) {\n ele = ele.move(spec);\n }\n } else {\n // parent is immutable via data()\n var newParentValSpecd = ('parent' in obj.data);\n var parent = obj.data.parent;\n if (newParentValSpecd && (parent != null || _data2.parent != null) && parent != _data2.parent) {\n if (parent === undefined) {\n // can't set undefined imperatively, so use null\n parent = null;\n }\n if (parent != null) {\n parent = '' + parent; // id must be string\n }\n\n ele = ele.move({\n parent: parent\n });\n }\n }\n }\n if (obj.position) {\n ele.position(obj.position);\n }\n\n // ignore group -- immutable\n\n var checkSwitch = function checkSwitch(k, trueFnName, falseFnName) {\n var obj_k = obj[k];\n if (obj_k != null && obj_k !== p[k]) {\n if (obj_k) {\n ele[trueFnName]();\n } else {\n ele[falseFnName]();\n }\n }\n };\n checkSwitch('removed', 'remove', 'restore');\n checkSwitch('selected', 'select', 'unselect');\n checkSwitch('selectable', 'selectify', 'unselectify');\n checkSwitch('locked', 'lock', 'unlock');\n checkSwitch('grabbable', 'grabify', 'ungrabify');\n checkSwitch('pannable', 'panify', 'unpanify');\n if (obj.classes != null) {\n ele.classes(obj.classes);\n }\n cy.endBatch();\n return this;\n } else if (obj === undefined) {\n // get\n\n var json = {\n data: copy(p.data),\n position: copy(p.position),\n group: p.group,\n removed: p.removed,\n selected: p.selected,\n selectable: p.selectable,\n locked: p.locked,\n grabbable: p.grabbable,\n pannable: p.pannable,\n classes: null\n };\n json.classes = '';\n var i = 0;\n p.classes.forEach(function (cls) {\n return json.classes += i++ === 0 ? cls : ' ' + cls;\n });\n return json;\n }\n};\nelesfn$1.jsons = function () {\n var jsons = [];\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var json = ele.json();\n jsons.push(json);\n }\n return jsons;\n};\nelesfn$1.clone = function () {\n var cy = this.cy();\n var elesArr = [];\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var json = ele.json();\n var clone = new Element(cy, json, false); // NB no restore\n\n elesArr.push(clone);\n }\n return new Collection(cy, elesArr);\n};\nelesfn$1.copy = elesfn$1.clone;\nelesfn$1.restore = function () {\n var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var addToPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var self = this;\n var cy = self.cy();\n var cy_p = cy._private;\n\n // create arrays of nodes and edges, since we need to\n // restore the nodes first\n var nodes = [];\n var edges = [];\n var elements;\n for (var _i3 = 0, l = self.length; _i3 < l; _i3++) {\n var ele = self[_i3];\n if (addToPool && !ele.removed()) {\n // don't need to handle this ele\n continue;\n }\n\n // keep nodes first in the array and edges after\n if (ele.isNode()) {\n // put to front of array if node\n nodes.push(ele);\n } else {\n // put to end of array if edge\n edges.push(ele);\n }\n }\n elements = nodes.concat(edges);\n var i;\n var removeFromElements = function removeFromElements() {\n elements.splice(i, 1);\n i--;\n };\n\n // now, restore each element\n for (i = 0; i < elements.length; i++) {\n var _ele2 = elements[i];\n var _private = _ele2._private;\n var _data3 = _private.data;\n\n // the traversal cache should start fresh when ele is added\n _ele2.clearTraversalCache();\n\n // set id and validate\n if (!addToPool && !_private.removed) ; else if (_data3.id === undefined) {\n _data3.id = uuid();\n } else if (number$1(_data3.id)) {\n _data3.id = '' + _data3.id; // now it's a string\n } else if (emptyString(_data3.id) || !string(_data3.id)) {\n error('Can not create element with invalid string ID `' + _data3.id + '`');\n\n // can't create element if it has empty string as id or non-string id\n removeFromElements();\n continue;\n } else if (cy.hasElementWithId(_data3.id)) {\n error('Can not create second element with ID `' + _data3.id + '`');\n\n // can't create element if one already has that id\n removeFromElements();\n continue;\n }\n var id = _data3.id; // id is finalised, now let's keep a ref\n\n if (_ele2.isNode()) {\n // extra checks for nodes\n var pos = _private.position;\n\n // make sure the nodes have a defined position\n\n if (pos.x == null) {\n pos.x = 0;\n }\n if (pos.y == null) {\n pos.y = 0;\n }\n }\n if (_ele2.isEdge()) {\n // extra checks for edges\n\n var edge = _ele2;\n var fields = ['source', 'target'];\n var fieldsLength = fields.length;\n var badSourceOrTarget = false;\n for (var j = 0; j < fieldsLength; j++) {\n var field = fields[j];\n var val = _data3[field];\n if (number$1(val)) {\n val = _data3[field] = '' + _data3[field]; // now string\n }\n\n if (val == null || val === '') {\n // can't create if source or target is not defined properly\n error('Can not create edge `' + id + '` with unspecified ' + field);\n badSourceOrTarget = true;\n } else if (!cy.hasElementWithId(val)) {\n // can't create edge if one of its nodes doesn't exist\n error('Can not create edge `' + id + '` with nonexistant ' + field + ' `' + val + '`');\n badSourceOrTarget = true;\n }\n }\n if (badSourceOrTarget) {\n removeFromElements();\n continue;\n } // can't create this\n\n var src = cy.getElementById(_data3.source);\n var tgt = cy.getElementById(_data3.target);\n\n // only one edge in node if loop\n if (src.same(tgt)) {\n src._private.edges.push(edge);\n } else {\n src._private.edges.push(edge);\n tgt._private.edges.push(edge);\n }\n edge._private.source = src;\n edge._private.target = tgt;\n } // if is edge\n\n // create mock ids / indexes maps for element so it can be used like collections\n _private.map = new Map$2();\n _private.map.set(id, {\n ele: _ele2,\n index: 0\n });\n _private.removed = false;\n if (addToPool) {\n cy.addToPool(_ele2);\n }\n } // for each element\n\n // do compound node sanity checks\n for (var _i4 = 0; _i4 < nodes.length; _i4++) {\n // each node\n var node = nodes[_i4];\n var _data4 = node._private.data;\n if (number$1(_data4.parent)) {\n // then automake string\n _data4.parent = '' + _data4.parent;\n }\n var parentId = _data4.parent;\n var specifiedParent = parentId != null;\n if (specifiedParent || node._private.parent) {\n var parent = node._private.parent ? cy.collection().merge(node._private.parent) : cy.getElementById(parentId);\n if (parent.empty()) {\n // non-existant parent; just remove it\n _data4.parent = undefined;\n } else if (parent[0].removed()) {\n warn('Node added with missing parent, reference to parent removed');\n _data4.parent = undefined;\n node._private.parent = null;\n } else {\n var selfAsParent = false;\n var ancestor = parent;\n while (!ancestor.empty()) {\n if (node.same(ancestor)) {\n // mark self as parent and remove from data\n selfAsParent = true;\n _data4.parent = undefined; // remove parent reference\n\n // exit or we loop forever\n break;\n }\n ancestor = ancestor.parent();\n }\n if (!selfAsParent) {\n // connect with children\n parent[0]._private.children.push(node);\n node._private.parent = parent[0];\n\n // let the core know we have a compound graph\n cy_p.hasCompoundNodes = true;\n }\n } // else\n } // if specified parent\n } // for each node\n\n if (elements.length > 0) {\n var restored = elements.length === self.length ? self : new Collection(cy, elements);\n for (var _i5 = 0; _i5 < restored.length; _i5++) {\n var _ele3 = restored[_i5];\n if (_ele3.isNode()) {\n continue;\n }\n\n // adding an edge invalidates the traversal caches for the parallel edges\n _ele3.parallelEdges().clearTraversalCache();\n\n // adding an edge invalidates the traversal cache for the connected nodes\n _ele3.source().clearTraversalCache();\n _ele3.target().clearTraversalCache();\n }\n var toUpdateStyle;\n if (cy_p.hasCompoundNodes) {\n toUpdateStyle = cy.collection().merge(restored).merge(restored.connectedNodes()).merge(restored.parent());\n } else {\n toUpdateStyle = restored;\n }\n toUpdateStyle.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(notifyRenderer);\n if (notifyRenderer) {\n restored.emitAndNotify('add');\n } else if (addToPool) {\n restored.emit('add');\n }\n }\n return self; // chainability\n};\n\nelesfn$1.removed = function () {\n var ele = this[0];\n return ele && ele._private.removed;\n};\nelesfn$1.inside = function () {\n var ele = this[0];\n return ele && !ele._private.removed;\n};\nelesfn$1.remove = function () {\n var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var removeFromPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var self = this;\n var elesToRemove = [];\n var elesToRemoveIds = {};\n var cy = self._private.cy;\n\n // add connected edges\n function addConnectedEdges(node) {\n var edges = node._private.edges;\n for (var i = 0; i < edges.length; i++) {\n add(edges[i]);\n }\n }\n\n // add descendant nodes\n function addChildren(node) {\n var children = node._private.children;\n for (var i = 0; i < children.length; i++) {\n add(children[i]);\n }\n }\n function add(ele) {\n var alreadyAdded = elesToRemoveIds[ele.id()];\n if (removeFromPool && ele.removed() || alreadyAdded) {\n return;\n } else {\n elesToRemoveIds[ele.id()] = true;\n }\n if (ele.isNode()) {\n elesToRemove.push(ele); // nodes are removed last\n\n addConnectedEdges(ele);\n addChildren(ele);\n } else {\n elesToRemove.unshift(ele); // edges are removed first\n }\n }\n\n // make the list of elements to remove\n // (may be removing more than specified due to connected edges etc)\n\n for (var i = 0, l = self.length; i < l; i++) {\n var ele = self[i];\n add(ele);\n }\n function removeEdgeRef(node, edge) {\n var connectedEdges = node._private.edges;\n removeFromArray(connectedEdges, edge);\n\n // removing an edges invalidates the traversal cache for its nodes\n node.clearTraversalCache();\n }\n function removeParallelRef(pllEdge) {\n // removing an edge invalidates the traversal caches for the parallel edges\n pllEdge.clearTraversalCache();\n }\n var alteredParents = [];\n alteredParents.ids = {};\n function removeChildRef(parent, ele) {\n ele = ele[0];\n parent = parent[0];\n var children = parent._private.children;\n var pid = parent.id();\n removeFromArray(children, ele); // remove parent => child ref\n\n ele._private.parent = null; // remove child => parent ref\n\n if (!alteredParents.ids[pid]) {\n alteredParents.ids[pid] = true;\n alteredParents.push(parent);\n }\n }\n self.dirtyCompoundBoundsCache();\n if (removeFromPool) {\n cy.removeFromPool(elesToRemove); // remove from core pool\n }\n\n for (var _i6 = 0; _i6 < elesToRemove.length; _i6++) {\n var _ele4 = elesToRemove[_i6];\n if (_ele4.isEdge()) {\n // remove references to this edge in its connected nodes\n var src = _ele4.source()[0];\n var tgt = _ele4.target()[0];\n removeEdgeRef(src, _ele4);\n removeEdgeRef(tgt, _ele4);\n var pllEdges = _ele4.parallelEdges();\n for (var j = 0; j < pllEdges.length; j++) {\n var pllEdge = pllEdges[j];\n removeParallelRef(pllEdge);\n if (pllEdge.isBundledBezier()) {\n pllEdge.dirtyBoundingBoxCache();\n }\n }\n } else {\n // remove reference to parent\n var parent = _ele4.parent();\n if (parent.length !== 0) {\n removeChildRef(parent, _ele4);\n }\n }\n if (removeFromPool) {\n // mark as removed\n _ele4._private.removed = true;\n }\n }\n\n // check to see if we have a compound graph or not\n var elesStillInside = cy._private.elements;\n cy._private.hasCompoundNodes = false;\n for (var _i7 = 0; _i7 < elesStillInside.length; _i7++) {\n var _ele5 = elesStillInside[_i7];\n if (_ele5.isParent()) {\n cy._private.hasCompoundNodes = true;\n break;\n }\n }\n var removedElements = new Collection(this.cy(), elesToRemove);\n if (removedElements.size() > 0) {\n // must manually notify since trigger won't do this automatically once removed\n\n if (notifyRenderer) {\n removedElements.emitAndNotify('remove');\n } else if (removeFromPool) {\n removedElements.emit('remove');\n }\n }\n\n // the parents who were modified by the removal need their style updated\n for (var _i8 = 0; _i8 < alteredParents.length; _i8++) {\n var _ele6 = alteredParents[_i8];\n if (!removeFromPool || !_ele6.removed()) {\n _ele6.updateStyle();\n }\n }\n return removedElements;\n};\nelesfn$1.move = function (struct) {\n var cy = this._private.cy;\n var eles = this;\n\n // just clean up refs, caches, etc. in the same way as when removing and then restoring\n // (our calls to remove/restore do not remove from the graph or make events)\n var notifyRenderer = false;\n var modifyPool = false;\n var toString = function toString(id) {\n return id == null ? id : '' + id;\n }; // id must be string\n\n if (struct.source !== undefined || struct.target !== undefined) {\n var srcId = toString(struct.source);\n var tgtId = toString(struct.target);\n var srcExists = srcId != null && cy.hasElementWithId(srcId);\n var tgtExists = tgtId != null && cy.hasElementWithId(tgtId);\n if (srcExists || tgtExists) {\n cy.batch(function () {\n // avoid duplicate style updates\n eles.remove(notifyRenderer, modifyPool); // clean up refs etc.\n eles.emitAndNotify('moveout');\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _data5 = ele._private.data;\n if (ele.isEdge()) {\n if (srcExists) {\n _data5.source = srcId;\n }\n if (tgtExists) {\n _data5.target = tgtId;\n }\n }\n }\n eles.restore(notifyRenderer, modifyPool); // make new refs, style, etc.\n });\n\n eles.emitAndNotify('move');\n }\n } else if (struct.parent !== undefined) {\n // move node to new parent\n var parentId = toString(struct.parent);\n var parentExists = parentId === null || cy.hasElementWithId(parentId);\n if (parentExists) {\n var pidToAssign = parentId === null ? undefined : parentId;\n cy.batch(function () {\n // avoid duplicate style updates\n var updated = eles.remove(notifyRenderer, modifyPool); // clean up refs etc.\n updated.emitAndNotify('moveout');\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _data6 = ele._private.data;\n if (ele.isNode()) {\n _data6.parent = pidToAssign;\n }\n }\n updated.restore(notifyRenderer, modifyPool); // make new refs, style, etc.\n });\n\n eles.emitAndNotify('move');\n }\n }\n return this;\n};\n[elesfn$j, elesfn$i, elesfn$h, elesfn$g, elesfn$f, data, elesfn$d, dimensions, elesfn$9, elesfn$8, elesfn$7, elesfn$6, elesfn$5, elesfn$4, elesfn$3, elesfn$2].forEach(function (props) {\n extend(elesfn$1, props);\n});\n\nvar corefn$9 = {\n add: function add(opts) {\n var elements;\n var cy = this;\n\n // add the elements\n if (elementOrCollection(opts)) {\n var eles = opts;\n if (eles._private.cy === cy) {\n // same instance => just restore\n elements = eles.restore();\n } else {\n // otherwise, copy from json\n var jsons = [];\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n jsons.push(ele.json());\n }\n elements = new Collection(cy, jsons);\n }\n }\n\n // specify an array of options\n else if (array(opts)) {\n var _jsons = opts;\n elements = new Collection(cy, _jsons);\n }\n\n // specify via opts.nodes and opts.edges\n else if (plainObject(opts) && (array(opts.nodes) || array(opts.edges))) {\n var elesByGroup = opts;\n var _jsons2 = [];\n var grs = ['nodes', 'edges'];\n for (var _i = 0, il = grs.length; _i < il; _i++) {\n var group = grs[_i];\n var elesArray = elesByGroup[group];\n if (array(elesArray)) {\n for (var j = 0, jl = elesArray.length; j < jl; j++) {\n var json = extend({\n group: group\n }, elesArray[j]);\n _jsons2.push(json);\n }\n }\n }\n elements = new Collection(cy, _jsons2);\n }\n\n // specify options for one element\n else {\n var _json = opts;\n elements = new Element(cy, _json).collection();\n }\n return elements;\n },\n remove: function remove(collection) {\n if (elementOrCollection(collection)) ; else if (string(collection)) {\n var selector = collection;\n collection = this.$(selector);\n }\n return collection.remove();\n }\n};\n\n/* global Float32Array */\n\n/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */\nfunction generateCubicBezier(mX1, mY1, mX2, mY2) {\n var NEWTON_ITERATIONS = 4,\n NEWTON_MIN_SLOPE = 0.001,\n SUBDIVISION_PRECISION = 0.0000001,\n SUBDIVISION_MAX_ITERATIONS = 10,\n kSplineTableSize = 11,\n kSampleStepSize = 1.0 / (kSplineTableSize - 1.0),\n float32ArraySupported = typeof Float32Array !== 'undefined';\n\n /* Must contain four arguments. */\n if (arguments.length !== 4) {\n return false;\n }\n\n /* Arguments must be numbers. */\n for (var i = 0; i < 4; ++i) {\n if (typeof arguments[i] !== \"number\" || isNaN(arguments[i]) || !isFinite(arguments[i])) {\n return false;\n }\n }\n\n /* X values must be in the [0, 1] range. */\n mX1 = Math.min(mX1, 1);\n mX2 = Math.min(mX2, 1);\n mX1 = Math.max(mX1, 0);\n mX2 = Math.max(mX2, 0);\n var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n function A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n }\n function B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n }\n function C(aA1) {\n return 3.0 * aA1;\n }\n function calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n }\n function getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }\n function newtonRaphsonIterate(aX, aGuessT) {\n for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n }\n function calcSampleValues() {\n for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) {\n mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2);\n }\n }\n function binarySubdivide(aX, aA, aB) {\n var currentX,\n currentT,\n i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n }\n function getTForX(aX) {\n var intervalStart = 0.0,\n currentSample = 1,\n lastSample = kSplineTableSize - 1;\n for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]),\n guessForT = intervalStart + dist * kSampleStepSize,\n initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);\n }\n }\n var _precomputed = false;\n function precompute() {\n _precomputed = true;\n if (mX1 !== mY1 || mX2 !== mY2) {\n calcSampleValues();\n }\n }\n var f = function f(aX) {\n if (!_precomputed) {\n precompute();\n }\n if (mX1 === mY1 && mX2 === mY2) {\n return aX;\n }\n if (aX === 0) {\n return 0;\n }\n if (aX === 1) {\n return 1;\n }\n return calcBezier(getTForX(aX), mY1, mY2);\n };\n f.getControlPoints = function () {\n return [{\n x: mX1,\n y: mY1\n }, {\n x: mX2,\n y: mY2\n }];\n };\n var str = \"generateBezier(\" + [mX1, mY1, mX2, mY2] + \")\";\n f.toString = function () {\n return str;\n };\n return f;\n}\n\n/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */\n/* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass\n then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */\nvar generateSpringRK4 = function () {\n function springAccelerationForState(state) {\n return -state.tension * state.x - state.friction * state.v;\n }\n function springEvaluateStateWithDerivative(initialState, dt, derivative) {\n var state = {\n x: initialState.x + derivative.dx * dt,\n v: initialState.v + derivative.dv * dt,\n tension: initialState.tension,\n friction: initialState.friction\n };\n return {\n dx: state.v,\n dv: springAccelerationForState(state)\n };\n }\n function springIntegrateState(state, dt) {\n var a = {\n dx: state.v,\n dv: springAccelerationForState(state)\n },\n b = springEvaluateStateWithDerivative(state, dt * 0.5, a),\n c = springEvaluateStateWithDerivative(state, dt * 0.5, b),\n d = springEvaluateStateWithDerivative(state, dt, c),\n dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx),\n dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv);\n state.x = state.x + dxdt * dt;\n state.v = state.v + dvdt * dt;\n return state;\n }\n return function springRK4Factory(tension, friction, duration) {\n var initState = {\n x: -1,\n v: 0,\n tension: null,\n friction: null\n },\n path = [0],\n time_lapsed = 0,\n tolerance = 1 / 10000,\n DT = 16 / 1000,\n have_duration,\n dt,\n last_state;\n tension = parseFloat(tension) || 500;\n friction = parseFloat(friction) || 20;\n duration = duration || null;\n initState.tension = tension;\n initState.friction = friction;\n have_duration = duration !== null;\n\n /* Calculate the actual time it takes for this animation to complete with the provided conditions. */\n if (have_duration) {\n /* Run the simulation without a duration. */\n time_lapsed = springRK4Factory(tension, friction);\n /* Compute the adjusted time delta. */\n dt = time_lapsed / duration * DT;\n } else {\n dt = DT;\n }\n for (;;) {\n /* Next/step function .*/\n last_state = springIntegrateState(last_state || initState, dt);\n /* Store the position. */\n path.push(1 + last_state.x);\n time_lapsed += 16;\n /* If the change threshold is reached, break. */\n if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) {\n break;\n }\n }\n\n /* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the\n computed path and returns a snapshot of the position according to a given percentComplete. */\n return !have_duration ? time_lapsed : function (percentComplete) {\n return path[percentComplete * (path.length - 1) | 0];\n };\n };\n}();\n\nvar cubicBezier = function cubicBezier(t1, p1, t2, p2) {\n var bezier = generateCubicBezier(t1, p1, t2, p2);\n return function (start, end, percent) {\n return start + (end - start) * bezier(percent);\n };\n};\nvar easings = {\n 'linear': function linear(start, end, percent) {\n return start + (end - start) * percent;\n },\n // default easings\n 'ease': cubicBezier(0.25, 0.1, 0.25, 1),\n 'ease-in': cubicBezier(0.42, 0, 1, 1),\n 'ease-out': cubicBezier(0, 0, 0.58, 1),\n 'ease-in-out': cubicBezier(0.42, 0, 0.58, 1),\n // sine\n 'ease-in-sine': cubicBezier(0.47, 0, 0.745, 0.715),\n 'ease-out-sine': cubicBezier(0.39, 0.575, 0.565, 1),\n 'ease-in-out-sine': cubicBezier(0.445, 0.05, 0.55, 0.95),\n // quad\n 'ease-in-quad': cubicBezier(0.55, 0.085, 0.68, 0.53),\n 'ease-out-quad': cubicBezier(0.25, 0.46, 0.45, 0.94),\n 'ease-in-out-quad': cubicBezier(0.455, 0.03, 0.515, 0.955),\n // cubic\n 'ease-in-cubic': cubicBezier(0.55, 0.055, 0.675, 0.19),\n 'ease-out-cubic': cubicBezier(0.215, 0.61, 0.355, 1),\n 'ease-in-out-cubic': cubicBezier(0.645, 0.045, 0.355, 1),\n // quart\n 'ease-in-quart': cubicBezier(0.895, 0.03, 0.685, 0.22),\n 'ease-out-quart': cubicBezier(0.165, 0.84, 0.44, 1),\n 'ease-in-out-quart': cubicBezier(0.77, 0, 0.175, 1),\n // quint\n 'ease-in-quint': cubicBezier(0.755, 0.05, 0.855, 0.06),\n 'ease-out-quint': cubicBezier(0.23, 1, 0.32, 1),\n 'ease-in-out-quint': cubicBezier(0.86, 0, 0.07, 1),\n // expo\n 'ease-in-expo': cubicBezier(0.95, 0.05, 0.795, 0.035),\n 'ease-out-expo': cubicBezier(0.19, 1, 0.22, 1),\n 'ease-in-out-expo': cubicBezier(1, 0, 0, 1),\n // circ\n 'ease-in-circ': cubicBezier(0.6, 0.04, 0.98, 0.335),\n 'ease-out-circ': cubicBezier(0.075, 0.82, 0.165, 1),\n 'ease-in-out-circ': cubicBezier(0.785, 0.135, 0.15, 0.86),\n // user param easings...\n\n 'spring': function spring(tension, friction, duration) {\n if (duration === 0) {\n // can't get a spring w/ duration 0\n return easings.linear; // duration 0 => jump to end so impl doesn't matter\n }\n\n var spring = generateSpringRK4(tension, friction, duration);\n return function (start, end, percent) {\n return start + (end - start) * spring(percent);\n };\n },\n 'cubic-bezier': cubicBezier\n};\n\nfunction getEasedValue(type, start, end, percent, easingFn) {\n if (percent === 1) {\n return end;\n }\n if (start === end) {\n return end;\n }\n var val = easingFn(start, end, percent);\n if (type == null) {\n return val;\n }\n if (type.roundValue || type.color) {\n val = Math.round(val);\n }\n if (type.min !== undefined) {\n val = Math.max(val, type.min);\n }\n if (type.max !== undefined) {\n val = Math.min(val, type.max);\n }\n return val;\n}\nfunction getValue(prop, spec) {\n if (prop.pfValue != null || prop.value != null) {\n if (prop.pfValue != null && (spec == null || spec.type.units !== '%')) {\n return prop.pfValue;\n } else {\n return prop.value;\n }\n } else {\n return prop;\n }\n}\nfunction ease(startProp, endProp, percent, easingFn, propSpec) {\n var type = propSpec != null ? propSpec.type : null;\n if (percent < 0) {\n percent = 0;\n } else if (percent > 1) {\n percent = 1;\n }\n var start = getValue(startProp, propSpec);\n var end = getValue(endProp, propSpec);\n if (number$1(start) && number$1(end)) {\n return getEasedValue(type, start, end, percent, easingFn);\n } else if (array(start) && array(end)) {\n var easedArr = [];\n for (var i = 0; i < end.length; i++) {\n var si = start[i];\n var ei = end[i];\n if (si != null && ei != null) {\n var val = getEasedValue(type, si, ei, percent, easingFn);\n easedArr.push(val);\n } else {\n easedArr.push(ei);\n }\n }\n return easedArr;\n }\n return undefined;\n}\n\nfunction step$1(self, ani, now, isCore) {\n var isEles = !isCore;\n var _p = self._private;\n var ani_p = ani._private;\n var pEasing = ani_p.easing;\n var startTime = ani_p.startTime;\n var cy = isCore ? self : self.cy();\n var style = cy.style();\n if (!ani_p.easingImpl) {\n if (pEasing == null) {\n // use default\n ani_p.easingImpl = easings['linear'];\n } else {\n // then define w/ name\n var easingVals;\n if (string(pEasing)) {\n var easingProp = style.parse('transition-timing-function', pEasing);\n easingVals = easingProp.value;\n } else {\n // then assume preparsed array\n easingVals = pEasing;\n }\n var name, args;\n if (string(easingVals)) {\n name = easingVals;\n args = [];\n } else {\n name = easingVals[1];\n args = easingVals.slice(2).map(function (n) {\n return +n;\n });\n }\n if (args.length > 0) {\n // create with args\n if (name === 'spring') {\n args.push(ani_p.duration); // need duration to generate spring\n }\n\n ani_p.easingImpl = easings[name].apply(null, args);\n } else {\n // static impl by name\n ani_p.easingImpl = easings[name];\n }\n }\n }\n var easing = ani_p.easingImpl;\n var percent;\n if (ani_p.duration === 0) {\n percent = 1;\n } else {\n percent = (now - startTime) / ani_p.duration;\n }\n if (ani_p.applying) {\n percent = ani_p.progress;\n }\n if (percent < 0) {\n percent = 0;\n } else if (percent > 1) {\n percent = 1;\n }\n if (ani_p.delay == null) {\n // then update\n\n var startPos = ani_p.startPosition;\n var endPos = ani_p.position;\n if (endPos && isEles && !self.locked()) {\n var newPos = {};\n if (valid(startPos.x, endPos.x)) {\n newPos.x = ease(startPos.x, endPos.x, percent, easing);\n }\n if (valid(startPos.y, endPos.y)) {\n newPos.y = ease(startPos.y, endPos.y, percent, easing);\n }\n self.position(newPos);\n }\n var startPan = ani_p.startPan;\n var endPan = ani_p.pan;\n var pan = _p.pan;\n var animatingPan = endPan != null && isCore;\n if (animatingPan) {\n if (valid(startPan.x, endPan.x)) {\n pan.x = ease(startPan.x, endPan.x, percent, easing);\n }\n if (valid(startPan.y, endPan.y)) {\n pan.y = ease(startPan.y, endPan.y, percent, easing);\n }\n self.emit('pan');\n }\n var startZoom = ani_p.startZoom;\n var endZoom = ani_p.zoom;\n var animatingZoom = endZoom != null && isCore;\n if (animatingZoom) {\n if (valid(startZoom, endZoom)) {\n _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom);\n }\n self.emit('zoom');\n }\n if (animatingPan || animatingZoom) {\n self.emit('viewport');\n }\n var props = ani_p.style;\n if (props && props.length > 0 && isEles) {\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n var _name = prop.name;\n var end = prop;\n var start = ani_p.startStyle[_name];\n var propSpec = style.properties[start.name];\n var easedVal = ease(start, end, percent, easing, propSpec);\n style.overrideBypass(self, _name, easedVal);\n } // for props\n\n self.emit('style');\n } // if\n }\n\n ani_p.progress = percent;\n return percent;\n}\nfunction valid(start, end) {\n if (start == null || end == null) {\n return false;\n }\n if (number$1(start) && number$1(end)) {\n return true;\n } else if (start && end) {\n return true;\n }\n return false;\n}\n\nfunction startAnimation(self, ani, now, isCore) {\n var ani_p = ani._private;\n ani_p.started = true;\n ani_p.startTime = now - ani_p.progress * ani_p.duration;\n}\n\nfunction stepAll(now, cy) {\n var eles = cy._private.aniEles;\n var doneEles = [];\n function stepOne(ele, isCore) {\n var _p = ele._private;\n var current = _p.animation.current;\n var queue = _p.animation.queue;\n var ranAnis = false;\n\n // if nothing currently animating, get something from the queue\n if (current.length === 0) {\n var next = queue.shift();\n if (next) {\n current.push(next);\n }\n }\n var callbacks = function callbacks(_callbacks) {\n for (var j = _callbacks.length - 1; j >= 0; j--) {\n var cb = _callbacks[j];\n cb();\n }\n _callbacks.splice(0, _callbacks.length);\n };\n\n // step and remove if done\n for (var i = current.length - 1; i >= 0; i--) {\n var ani = current[i];\n var ani_p = ani._private;\n if (ani_p.stopped) {\n current.splice(i, 1);\n ani_p.hooked = false;\n ani_p.playing = false;\n ani_p.started = false;\n callbacks(ani_p.frames);\n continue;\n }\n if (!ani_p.playing && !ani_p.applying) {\n continue;\n }\n\n // an apply() while playing shouldn't do anything\n if (ani_p.playing && ani_p.applying) {\n ani_p.applying = false;\n }\n if (!ani_p.started) {\n startAnimation(ele, ani, now);\n }\n step$1(ele, ani, now, isCore);\n if (ani_p.applying) {\n ani_p.applying = false;\n }\n callbacks(ani_p.frames);\n if (ani_p.step != null) {\n ani_p.step(now);\n }\n if (ani.completed()) {\n current.splice(i, 1);\n ani_p.hooked = false;\n ani_p.playing = false;\n ani_p.started = false;\n callbacks(ani_p.completes);\n }\n ranAnis = true;\n }\n if (!isCore && current.length === 0 && queue.length === 0) {\n doneEles.push(ele);\n }\n return ranAnis;\n } // stepElement\n\n // handle all eles\n var ranEleAni = false;\n for (var e = 0; e < eles.length; e++) {\n var ele = eles[e];\n var handledThisEle = stepOne(ele);\n ranEleAni = ranEleAni || handledThisEle;\n } // each element\n\n var ranCoreAni = stepOne(cy, true);\n\n // notify renderer\n if (ranEleAni || ranCoreAni) {\n if (eles.length > 0) {\n cy.notify('draw', eles);\n } else {\n cy.notify('draw');\n }\n }\n\n // remove elements from list of currently animating if its queues are empty\n eles.unmerge(doneEles);\n cy.emit('step');\n} // stepAll\n\nvar corefn$8 = {\n // pull in animation functions\n animate: define.animate(),\n animation: define.animation(),\n animated: define.animated(),\n clearQueue: define.clearQueue(),\n delay: define.delay(),\n delayAnimation: define.delayAnimation(),\n stop: define.stop(),\n addToAnimationPool: function addToAnimationPool(eles) {\n var cy = this;\n if (!cy.styleEnabled()) {\n return;\n } // save cycles when no style used\n\n cy._private.aniEles.merge(eles);\n },\n stopAnimationLoop: function stopAnimationLoop() {\n this._private.animationsRunning = false;\n },\n startAnimationLoop: function startAnimationLoop() {\n var cy = this;\n cy._private.animationsRunning = true;\n if (!cy.styleEnabled()) {\n return;\n } // save cycles when no style used\n\n // NB the animation loop will exec in headless environments if style enabled\n // and explicit cy.destroy() is necessary to stop the loop\n\n function headlessStep() {\n if (!cy._private.animationsRunning) {\n return;\n }\n requestAnimationFrame(function animationStep(now) {\n stepAll(now, cy);\n headlessStep();\n });\n }\n var renderer = cy.renderer();\n if (renderer && renderer.beforeRender) {\n // let the renderer schedule animations\n renderer.beforeRender(function rendererAnimationStep(willDraw, now) {\n stepAll(now, cy);\n }, renderer.beforeRenderPriorities.animations);\n } else {\n // manage the animation loop ourselves\n headlessStep(); // first call\n }\n }\n};\n\nvar emitterOptions = {\n qualifierCompare: function qualifierCompare(selector1, selector2) {\n if (selector1 == null || selector2 == null) {\n return selector1 == null && selector2 == null;\n } else {\n return selector1.sameText(selector2);\n }\n },\n eventMatches: function eventMatches(cy, listener, eventObj) {\n var selector = listener.qualifier;\n if (selector != null) {\n return cy !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target);\n }\n return true;\n },\n addEventFields: function addEventFields(cy, evt) {\n evt.cy = cy;\n evt.target = cy;\n },\n callbackContext: function callbackContext(cy, listener, eventObj) {\n return listener.qualifier != null ? eventObj.target : cy;\n }\n};\nvar argSelector = function argSelector(arg) {\n if (string(arg)) {\n return new Selector(arg);\n } else {\n return arg;\n }\n};\nvar elesfn = {\n createEmitter: function createEmitter() {\n var _p = this._private;\n if (!_p.emitter) {\n _p.emitter = new Emitter(emitterOptions, this);\n }\n return this;\n },\n emitter: function emitter() {\n return this._private.emitter;\n },\n on: function on(events, selector, callback) {\n this.emitter().on(events, argSelector(selector), callback);\n return this;\n },\n removeListener: function removeListener(events, selector, callback) {\n this.emitter().removeListener(events, argSelector(selector), callback);\n return this;\n },\n removeAllListeners: function removeAllListeners() {\n this.emitter().removeAllListeners();\n return this;\n },\n one: function one(events, selector, callback) {\n this.emitter().one(events, argSelector(selector), callback);\n return this;\n },\n once: function once(events, selector, callback) {\n this.emitter().one(events, argSelector(selector), callback);\n return this;\n },\n emit: function emit(events, extraParams) {\n this.emitter().emit(events, extraParams);\n return this;\n },\n emitAndNotify: function emitAndNotify(event, eles) {\n this.emit(event);\n this.notify(event, eles);\n return this;\n }\n};\ndefine.eventAliasesOn(elesfn);\n\nvar corefn$7 = {\n png: function png(options) {\n var renderer = this._private.renderer;\n options = options || {};\n return renderer.png(options);\n },\n jpg: function jpg(options) {\n var renderer = this._private.renderer;\n options = options || {};\n options.bg = options.bg || '#fff';\n return renderer.jpg(options);\n }\n};\ncorefn$7.jpeg = corefn$7.jpg;\n\nvar corefn$6 = {\n layout: function layout(options) {\n var cy = this;\n if (options == null) {\n error('Layout options must be specified to make a layout');\n return;\n }\n if (options.name == null) {\n error('A `name` must be specified to make a layout');\n return;\n }\n var name = options.name;\n var Layout = cy.extension('layout', name);\n if (Layout == null) {\n error('No such layout `' + name + '` found. Did you forget to import it and `cytoscape.use()` it?');\n return;\n }\n var eles;\n if (string(options.eles)) {\n eles = cy.$(options.eles);\n } else {\n eles = options.eles != null ? options.eles : cy.$();\n }\n var layout = new Layout(extend({}, options, {\n cy: cy,\n eles: eles\n }));\n return layout;\n }\n};\ncorefn$6.createLayout = corefn$6.makeLayout = corefn$6.layout;\n\nvar corefn$5 = {\n notify: function notify(eventName, eventEles) {\n var _p = this._private;\n if (this.batching()) {\n _p.batchNotifications = _p.batchNotifications || {};\n var eles = _p.batchNotifications[eventName] = _p.batchNotifications[eventName] || this.collection();\n if (eventEles != null) {\n eles.merge(eventEles);\n }\n return; // notifications are disabled during batching\n }\n\n if (!_p.notificationsEnabled) {\n return;\n } // exit on disabled\n\n var renderer = this.renderer();\n\n // exit if destroy() called on core or renderer in between frames #1499 #1528\n if (this.destroyed() || !renderer) {\n return;\n }\n renderer.notify(eventName, eventEles);\n },\n notifications: function notifications(bool) {\n var p = this._private;\n if (bool === undefined) {\n return p.notificationsEnabled;\n } else {\n p.notificationsEnabled = bool ? true : false;\n }\n return this;\n },\n noNotifications: function noNotifications(callback) {\n this.notifications(false);\n callback();\n this.notifications(true);\n },\n batching: function batching() {\n return this._private.batchCount > 0;\n },\n startBatch: function startBatch() {\n var _p = this._private;\n if (_p.batchCount == null) {\n _p.batchCount = 0;\n }\n if (_p.batchCount === 0) {\n _p.batchStyleEles = this.collection();\n _p.batchNotifications = {};\n }\n _p.batchCount++;\n return this;\n },\n endBatch: function endBatch() {\n var _p = this._private;\n if (_p.batchCount === 0) {\n return this;\n }\n _p.batchCount--;\n if (_p.batchCount === 0) {\n // update style for dirty eles\n _p.batchStyleEles.updateStyle();\n var renderer = this.renderer();\n\n // notify the renderer of queued eles and event types\n Object.keys(_p.batchNotifications).forEach(function (eventName) {\n var eles = _p.batchNotifications[eventName];\n if (eles.empty()) {\n renderer.notify(eventName);\n } else {\n renderer.notify(eventName, eles);\n }\n });\n }\n return this;\n },\n batch: function batch(callback) {\n this.startBatch();\n callback();\n this.endBatch();\n return this;\n },\n // for backwards compatibility\n batchData: function batchData(map) {\n var cy = this;\n return this.batch(function () {\n var ids = Object.keys(map);\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var data = map[id];\n var ele = cy.getElementById(id);\n ele.data(data);\n }\n });\n }\n};\n\nvar rendererDefaults = defaults$g({\n hideEdgesOnViewport: false,\n textureOnViewport: false,\n motionBlur: false,\n motionBlurOpacity: 0.05,\n pixelRatio: undefined,\n desktopTapThreshold: 4,\n touchTapThreshold: 8,\n wheelSensitivity: 1,\n debug: false,\n showFps: false\n});\nvar corefn$4 = {\n renderTo: function renderTo(context, zoom, pan, pxRatio) {\n var r = this._private.renderer;\n r.renderTo(context, zoom, pan, pxRatio);\n return this;\n },\n renderer: function renderer() {\n return this._private.renderer;\n },\n forceRender: function forceRender() {\n this.notify('draw');\n return this;\n },\n resize: function resize() {\n this.invalidateSize();\n this.emitAndNotify('resize');\n return this;\n },\n initRenderer: function initRenderer(options) {\n var cy = this;\n var RendererProto = cy.extension('renderer', options.name);\n if (RendererProto == null) {\n error(\"Can not initialise: No such renderer `\".concat(options.name, \"` found. Did you forget to import it and `cytoscape.use()` it?\"));\n return;\n }\n if (options.wheelSensitivity !== undefined) {\n warn(\"You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.\");\n }\n var rOpts = rendererDefaults(options);\n rOpts.cy = cy;\n cy._private.renderer = new RendererProto(rOpts);\n this.notify('init');\n },\n destroyRenderer: function destroyRenderer() {\n var cy = this;\n cy.notify('destroy'); // destroy the renderer\n\n var domEle = cy.container();\n if (domEle) {\n domEle._cyreg = null;\n while (domEle.childNodes.length > 0) {\n domEle.removeChild(domEle.childNodes[0]);\n }\n }\n cy._private.renderer = null; // to be extra safe, remove the ref\n cy.mutableElements().forEach(function (ele) {\n var _p = ele._private;\n _p.rscratch = {};\n _p.rstyle = {};\n _p.animation.current = [];\n _p.animation.queue = [];\n });\n },\n onRender: function onRender(fn) {\n return this.on('render', fn);\n },\n offRender: function offRender(fn) {\n return this.off('render', fn);\n }\n};\ncorefn$4.invalidateDimensions = corefn$4.resize;\n\nvar corefn$3 = {\n // get a collection\n // - empty collection on no args\n // - collection of elements in the graph on selector arg\n // - guarantee a returned collection when elements or collection specified\n collection: function collection(eles, opts) {\n if (string(eles)) {\n return this.$(eles);\n } else if (elementOrCollection(eles)) {\n return eles.collection();\n } else if (array(eles)) {\n if (!opts) {\n opts = {};\n }\n return new Collection(this, eles, opts.unique, opts.removed);\n }\n return new Collection(this);\n },\n nodes: function nodes(selector) {\n var nodes = this.$(function (ele) {\n return ele.isNode();\n });\n if (selector) {\n return nodes.filter(selector);\n }\n return nodes;\n },\n edges: function edges(selector) {\n var edges = this.$(function (ele) {\n return ele.isEdge();\n });\n if (selector) {\n return edges.filter(selector);\n }\n return edges;\n },\n // search the graph like jQuery\n $: function $(selector) {\n var eles = this._private.elements;\n if (selector) {\n return eles.filter(selector);\n } else {\n return eles.spawnSelf();\n }\n },\n mutableElements: function mutableElements() {\n return this._private.elements;\n }\n};\n\n// aliases\ncorefn$3.elements = corefn$3.filter = corefn$3.$;\n\nvar styfn$8 = {};\n\n// keys for style blocks, e.g. ttfftt\nvar TRUE = 't';\nvar FALSE = 'f';\n\n// (potentially expensive calculation)\n// apply the style to the element based on\n// - its bypass\n// - what selectors match it\nstyfn$8.apply = function (eles) {\n var self = this;\n var _p = self._private;\n var cy = _p.cy;\n var updatedEles = cy.collection();\n for (var ie = 0; ie < eles.length; ie++) {\n var ele = eles[ie];\n var cxtMeta = self.getContextMeta(ele);\n if (cxtMeta.empty) {\n continue;\n }\n var cxtStyle = self.getContextStyle(cxtMeta);\n var app = self.applyContextStyle(cxtMeta, cxtStyle, ele);\n if (ele._private.appliedInitStyle) {\n self.updateTransitions(ele, app.diffProps);\n } else {\n ele._private.appliedInitStyle = true;\n }\n var hintsDiff = self.updateStyleHints(ele);\n if (hintsDiff) {\n updatedEles.push(ele);\n }\n } // for elements\n\n return updatedEles;\n};\nstyfn$8.getPropertiesDiff = function (oldCxtKey, newCxtKey) {\n var self = this;\n var cache = self._private.propDiffs = self._private.propDiffs || {};\n var dualCxtKey = oldCxtKey + '-' + newCxtKey;\n var cachedVal = cache[dualCxtKey];\n if (cachedVal) {\n return cachedVal;\n }\n var diffProps = [];\n var addedProp = {};\n for (var i = 0; i < self.length; i++) {\n var cxt = self[i];\n var oldHasCxt = oldCxtKey[i] === TRUE;\n var newHasCxt = newCxtKey[i] === TRUE;\n var cxtHasDiffed = oldHasCxt !== newHasCxt;\n var cxtHasMappedProps = cxt.mappedProperties.length > 0;\n if (cxtHasDiffed || newHasCxt && cxtHasMappedProps) {\n var props = void 0;\n if (cxtHasDiffed && cxtHasMappedProps) {\n props = cxt.properties; // suffices b/c mappedProperties is a subset of properties\n } else if (cxtHasDiffed) {\n props = cxt.properties; // need to check them all\n } else if (cxtHasMappedProps) {\n props = cxt.mappedProperties; // only need to check mapped\n }\n\n for (var j = 0; j < props.length; j++) {\n var prop = props[j];\n var name = prop.name;\n\n // if a later context overrides this property, then the fact that this context has switched/diffed doesn't matter\n // (semi expensive check since it makes this function O(n^2) on context length, but worth it since overall result\n // is cached)\n var laterCxtOverrides = false;\n for (var k = i + 1; k < self.length; k++) {\n var laterCxt = self[k];\n var hasLaterCxt = newCxtKey[k] === TRUE;\n if (!hasLaterCxt) {\n continue;\n } // can't override unless the context is active\n\n laterCxtOverrides = laterCxt.properties[prop.name] != null;\n if (laterCxtOverrides) {\n break;\n } // exit early as long as one later context overrides\n }\n\n if (!addedProp[name] && !laterCxtOverrides) {\n addedProp[name] = true;\n diffProps.push(name);\n }\n } // for props\n } // if\n } // for contexts\n\n cache[dualCxtKey] = diffProps;\n return diffProps;\n};\nstyfn$8.getContextMeta = function (ele) {\n var self = this;\n var cxtKey = '';\n var diffProps;\n var prevKey = ele._private.styleCxtKey || '';\n\n // get the cxt key\n for (var i = 0; i < self.length; i++) {\n var context = self[i];\n var contextSelectorMatches = context.selector && context.selector.matches(ele); // NB: context.selector may be null for 'core'\n\n if (contextSelectorMatches) {\n cxtKey += TRUE;\n } else {\n cxtKey += FALSE;\n }\n } // for context\n\n diffProps = self.getPropertiesDiff(prevKey, cxtKey);\n ele._private.styleCxtKey = cxtKey;\n return {\n key: cxtKey,\n diffPropNames: diffProps,\n empty: diffProps.length === 0\n };\n};\n\n// gets a computed ele style object based on matched contexts\nstyfn$8.getContextStyle = function (cxtMeta) {\n var cxtKey = cxtMeta.key;\n var self = this;\n var cxtStyles = this._private.contextStyles = this._private.contextStyles || {};\n\n // if already computed style, returned cached copy\n if (cxtStyles[cxtKey]) {\n return cxtStyles[cxtKey];\n }\n var style = {\n _private: {\n key: cxtKey\n }\n };\n for (var i = 0; i < self.length; i++) {\n var cxt = self[i];\n var hasCxt = cxtKey[i] === TRUE;\n if (!hasCxt) {\n continue;\n }\n for (var j = 0; j < cxt.properties.length; j++) {\n var prop = cxt.properties[j];\n style[prop.name] = prop;\n }\n }\n cxtStyles[cxtKey] = style;\n return style;\n};\nstyfn$8.applyContextStyle = function (cxtMeta, cxtStyle, ele) {\n var self = this;\n var diffProps = cxtMeta.diffPropNames;\n var retDiffProps = {};\n var types = self.types;\n for (var i = 0; i < diffProps.length; i++) {\n var diffPropName = diffProps[i];\n var cxtProp = cxtStyle[diffPropName];\n var eleProp = ele.pstyle(diffPropName);\n if (!cxtProp) {\n // no context prop means delete\n if (!eleProp) {\n continue; // no existing prop means nothing needs to be removed\n // nb affects initial application on mapped values like control-point-distances\n } else if (eleProp.bypass) {\n cxtProp = {\n name: diffPropName,\n deleteBypassed: true\n };\n } else {\n cxtProp = {\n name: diffPropName,\n \"delete\": true\n };\n }\n }\n\n // save cycles when the context prop doesn't need to be applied\n if (eleProp === cxtProp) {\n continue;\n }\n\n // save cycles when a mapped context prop doesn't need to be applied\n if (cxtProp.mapped === types.fn // context prop is function mapper\n && eleProp != null // some props can be null even by default (e.g. a prop that overrides another one)\n && eleProp.mapping != null // ele prop is a concrete value from from a mapper\n && eleProp.mapping.value === cxtProp.value // the current prop on the ele is a flat prop value for the function mapper\n ) {\n // NB don't write to cxtProp, as it's shared among eles (stored in stylesheet)\n var mapping = eleProp.mapping; // can write to mapping, as it's a per-ele copy\n var fnValue = mapping.fnValue = cxtProp.value(ele); // temporarily cache the value in case of a miss\n\n if (fnValue === mapping.prevFnValue) {\n continue;\n }\n }\n var retDiffProp = retDiffProps[diffPropName] = {\n prev: eleProp\n };\n self.applyParsedProperty(ele, cxtProp);\n retDiffProp.next = ele.pstyle(diffPropName);\n if (retDiffProp.next && retDiffProp.next.bypass) {\n retDiffProp.next = retDiffProp.next.bypassed;\n }\n }\n return {\n diffProps: retDiffProps\n };\n};\nstyfn$8.updateStyleHints = function (ele) {\n var _p = ele._private;\n var self = this;\n var propNames = self.propertyGroupNames;\n var propGrKeys = self.propertyGroupKeys;\n var propHash = function propHash(ele, propNames, seedKey) {\n return self.getPropertiesHash(ele, propNames, seedKey);\n };\n var oldStyleKey = _p.styleKey;\n if (ele.removed()) {\n return false;\n }\n var isNode = _p.group === 'nodes';\n\n // get the style key hashes per prop group\n // but lazily -- only use non-default prop values to reduce the number of hashes\n //\n\n var overriddenStyles = ele._private.style;\n propNames = Object.keys(overriddenStyles);\n for (var i = 0; i < propGrKeys.length; i++) {\n var grKey = propGrKeys[i];\n _p.styleKeys[grKey] = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT];\n }\n var updateGrKey1 = function updateGrKey1(val, grKey) {\n return _p.styleKeys[grKey][0] = hashInt(val, _p.styleKeys[grKey][0]);\n };\n var updateGrKey2 = function updateGrKey2(val, grKey) {\n return _p.styleKeys[grKey][1] = hashIntAlt(val, _p.styleKeys[grKey][1]);\n };\n var updateGrKey = function updateGrKey(val, grKey) {\n updateGrKey1(val, grKey);\n updateGrKey2(val, grKey);\n };\n var updateGrKeyWStr = function updateGrKeyWStr(strVal, grKey) {\n for (var j = 0; j < strVal.length; j++) {\n var ch = strVal.charCodeAt(j);\n updateGrKey1(ch, grKey);\n updateGrKey2(ch, grKey);\n }\n };\n\n // - hashing works on 32 bit ints b/c we use bitwise ops\n // - small numbers get cut off (e.g. 0.123 is seen as 0 by the hashing function)\n // - raise up small numbers so more significant digits are seen by hashing\n // - make small numbers larger than a normal value to avoid collisions\n // - works in practice and it's relatively cheap\n var N = 2000000000;\n var cleanNum = function cleanNum(val) {\n return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val;\n };\n for (var _i = 0; _i < propNames.length; _i++) {\n var name = propNames[_i];\n var parsedProp = overriddenStyles[name];\n if (parsedProp == null) {\n continue;\n }\n var propInfo = this.properties[name];\n var type = propInfo.type;\n var _grKey = propInfo.groupKey;\n var normalizedNumberVal = void 0;\n if (propInfo.hashOverride != null) {\n normalizedNumberVal = propInfo.hashOverride(ele, parsedProp);\n } else if (parsedProp.pfValue != null) {\n normalizedNumberVal = parsedProp.pfValue;\n }\n\n // might not be a number if it allows enums\n var numberVal = propInfo.enums == null ? parsedProp.value : null;\n var haveNormNum = normalizedNumberVal != null;\n var haveUnitedNum = numberVal != null;\n var haveNum = haveNormNum || haveUnitedNum;\n var units = parsedProp.units;\n\n // numbers are cheaper to hash than strings\n // 1 hash op vs n hash ops (for length n string)\n if (type.number && haveNum && !type.multiple) {\n var v = haveNormNum ? normalizedNumberVal : numberVal;\n updateGrKey(cleanNum(v), _grKey);\n if (!haveNormNum && units != null) {\n updateGrKeyWStr(units, _grKey);\n }\n } else {\n updateGrKeyWStr(parsedProp.strValue, _grKey);\n }\n }\n\n // overall style key\n //\n\n var hash = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT];\n for (var _i2 = 0; _i2 < propGrKeys.length; _i2++) {\n var _grKey2 = propGrKeys[_i2];\n var grHash = _p.styleKeys[_grKey2];\n hash[0] = hashInt(grHash[0], hash[0]);\n hash[1] = hashIntAlt(grHash[1], hash[1]);\n }\n _p.styleKey = combineHashes(hash[0], hash[1]);\n\n // label dims\n //\n\n var sk = _p.styleKeys;\n _p.labelDimsKey = combineHashesArray(sk.labelDimensions);\n var labelKeys = propHash(ele, ['label'], sk.labelDimensions);\n _p.labelKey = combineHashesArray(labelKeys);\n _p.labelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, labelKeys));\n if (!isNode) {\n var sourceLabelKeys = propHash(ele, ['source-label'], sk.labelDimensions);\n _p.sourceLabelKey = combineHashesArray(sourceLabelKeys);\n _p.sourceLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, sourceLabelKeys));\n var targetLabelKeys = propHash(ele, ['target-label'], sk.labelDimensions);\n _p.targetLabelKey = combineHashesArray(targetLabelKeys);\n _p.targetLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, targetLabelKeys));\n }\n\n // node\n //\n\n if (isNode) {\n var _p$styleKeys = _p.styleKeys,\n nodeBody = _p$styleKeys.nodeBody,\n nodeBorder = _p$styleKeys.nodeBorder,\n nodeOutline = _p$styleKeys.nodeOutline,\n backgroundImage = _p$styleKeys.backgroundImage,\n compound = _p$styleKeys.compound,\n pie = _p$styleKeys.pie;\n var nodeKeys = [nodeBody, nodeBorder, nodeOutline, backgroundImage, compound, pie].filter(function (k) {\n return k != null;\n }).reduce(hashArrays, [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]);\n _p.nodeKey = combineHashesArray(nodeKeys);\n _p.hasPie = pie != null && pie[0] !== DEFAULT_HASH_SEED && pie[1] !== DEFAULT_HASH_SEED_ALT;\n }\n return oldStyleKey !== _p.styleKey;\n};\nstyfn$8.clearStyleHints = function (ele) {\n var _p = ele._private;\n _p.styleCxtKey = '';\n _p.styleKeys = {};\n _p.styleKey = null;\n _p.labelKey = null;\n _p.labelStyleKey = null;\n _p.sourceLabelKey = null;\n _p.sourceLabelStyleKey = null;\n _p.targetLabelKey = null;\n _p.targetLabelStyleKey = null;\n _p.nodeKey = null;\n _p.hasPie = null;\n};\n\n// apply a property to the style (for internal use)\n// returns whether application was successful\n//\n// now, this function flattens the property, and here's how:\n//\n// for parsedProp:{ bypass: true, deleteBypass: true }\n// no property is generated, instead the bypass property in the\n// element's style is replaced by what's pointed to by the `bypassed`\n// field in the bypass property (i.e. restoring the property the\n// bypass was overriding)\n//\n// for parsedProp:{ mapped: truthy }\n// the generated flattenedProp:{ mapping: prop }\n//\n// for parsedProp:{ bypass: true }\n// the generated flattenedProp:{ bypassed: parsedProp }\nstyfn$8.applyParsedProperty = function (ele, parsedProp) {\n var self = this;\n var prop = parsedProp;\n var style = ele._private.style;\n var flatProp;\n var types = self.types;\n var type = self.properties[prop.name].type;\n var propIsBypass = prop.bypass;\n var origProp = style[prop.name];\n var origPropIsBypass = origProp && origProp.bypass;\n var _p = ele._private;\n var flatPropMapping = 'mapping';\n var getVal = function getVal(p) {\n if (p == null) {\n return null;\n } else if (p.pfValue != null) {\n return p.pfValue;\n } else {\n return p.value;\n }\n };\n var checkTriggers = function checkTriggers() {\n var fromVal = getVal(origProp);\n var toVal = getVal(prop);\n self.checkTriggers(ele, prop.name, fromVal, toVal);\n };\n\n // edge sanity checks to prevent the client from making serious mistakes\n if (parsedProp.name === 'curve-style' && ele.isEdge() && (\n // loops must be bundled beziers\n parsedProp.value !== 'bezier' && ele.isLoop() ||\n // edges connected to compound nodes can not be haystacks\n parsedProp.value === 'haystack' && (ele.source().isParent() || ele.target().isParent()))) {\n prop = parsedProp = this.parse(parsedProp.name, 'bezier', propIsBypass);\n }\n if (prop[\"delete\"]) {\n // delete the property and use the default value on falsey value\n style[prop.name] = undefined;\n checkTriggers();\n return true;\n }\n if (prop.deleteBypassed) {\n // delete the property that the\n if (!origProp) {\n checkTriggers();\n return true; // can't delete if no prop\n } else if (origProp.bypass) {\n // delete bypassed\n origProp.bypassed = undefined;\n checkTriggers();\n return true;\n } else {\n return false; // we're unsuccessful deleting the bypassed\n }\n }\n\n // check if we need to delete the current bypass\n if (prop.deleteBypass) {\n // then this property is just here to indicate we need to delete\n if (!origProp) {\n checkTriggers();\n return true; // property is already not defined\n } else if (origProp.bypass) {\n // then replace the bypass property with the original\n // because the bypassed property was already applied (and therefore parsed), we can just replace it (no reapplying necessary)\n style[prop.name] = origProp.bypassed;\n checkTriggers();\n return true;\n } else {\n return false; // we're unsuccessful deleting the bypass\n }\n }\n\n var printMappingErr = function printMappingErr() {\n warn('Do not assign mappings to elements without corresponding data (i.e. ele `' + ele.id() + '` has no mapping for property `' + prop.name + '` with data field `' + prop.field + '`); try a `[' + prop.field + ']` selector to limit scope to elements with `' + prop.field + '` defined');\n };\n\n // put the property in the style objects\n switch (prop.mapped) {\n // flatten the property if mapped\n case types.mapData:\n {\n // flatten the field (e.g. data.foo.bar)\n var fields = prop.field.split('.');\n var fieldVal = _p.data;\n for (var i = 0; i < fields.length && fieldVal; i++) {\n var field = fields[i];\n fieldVal = fieldVal[field];\n }\n if (fieldVal == null) {\n printMappingErr();\n return false;\n }\n var percent;\n if (!number$1(fieldVal)) {\n // then don't apply and fall back on the existing style\n warn('Do not use continuous mappers without specifying numeric data (i.e. `' + prop.field + ': ' + fieldVal + '` for `' + ele.id() + '` is non-numeric)');\n return false;\n } else {\n var fieldWidth = prop.fieldMax - prop.fieldMin;\n if (fieldWidth === 0) {\n // safety check -- not strictly necessary as no props of zero range should be passed here\n percent = 0;\n } else {\n percent = (fieldVal - prop.fieldMin) / fieldWidth;\n }\n }\n\n // make sure to bound percent value\n if (percent < 0) {\n percent = 0;\n } else if (percent > 1) {\n percent = 1;\n }\n if (type.color) {\n var r1 = prop.valueMin[0];\n var r2 = prop.valueMax[0];\n var g1 = prop.valueMin[1];\n var g2 = prop.valueMax[1];\n var b1 = prop.valueMin[2];\n var b2 = prop.valueMax[2];\n var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3];\n var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3];\n var clr = [Math.round(r1 + (r2 - r1) * percent), Math.round(g1 + (g2 - g1) * percent), Math.round(b1 + (b2 - b1) * percent), Math.round(a1 + (a2 - a1) * percent)];\n flatProp = {\n // colours are simple, so just create the flat property instead of expensive string parsing\n bypass: prop.bypass,\n // we're a bypass if the mapping property is a bypass\n name: prop.name,\n value: clr,\n strValue: 'rgb(' + clr[0] + ', ' + clr[1] + ', ' + clr[2] + ')'\n };\n } else if (type.number) {\n var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent;\n flatProp = this.parse(prop.name, calcValue, prop.bypass, flatPropMapping);\n } else {\n return false; // can only map to colours and numbers\n }\n\n if (!flatProp) {\n // if we can't flatten the property, then don't apply the property and fall back on the existing style\n printMappingErr();\n return false;\n }\n flatProp.mapping = prop; // keep a reference to the mapping\n prop = flatProp; // the flattened (mapped) property is the one we want\n\n break;\n }\n\n // direct mapping\n case types.data:\n {\n // flatten the field (e.g. data.foo.bar)\n var _fields = prop.field.split('.');\n var _fieldVal = _p.data;\n for (var _i3 = 0; _i3 < _fields.length && _fieldVal; _i3++) {\n var _field = _fields[_i3];\n _fieldVal = _fieldVal[_field];\n }\n if (_fieldVal != null) {\n flatProp = this.parse(prop.name, _fieldVal, prop.bypass, flatPropMapping);\n }\n if (!flatProp) {\n // if we can't flatten the property, then don't apply and fall back on the existing style\n printMappingErr();\n return false;\n }\n flatProp.mapping = prop; // keep a reference to the mapping\n prop = flatProp; // the flattened (mapped) property is the one we want\n\n break;\n }\n case types.fn:\n {\n var fn = prop.value;\n var fnRetVal = prop.fnValue != null ? prop.fnValue : fn(ele); // check for cached value before calling function\n\n prop.prevFnValue = fnRetVal;\n if (fnRetVal == null) {\n warn('Custom function mappers may not return null (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is null)');\n return false;\n }\n flatProp = this.parse(prop.name, fnRetVal, prop.bypass, flatPropMapping);\n if (!flatProp) {\n warn('Custom function mappers may not return invalid values for the property type (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is invalid)');\n return false;\n }\n flatProp.mapping = copy(prop); // keep a reference to the mapping\n prop = flatProp; // the flattened (mapped) property is the one we want\n\n break;\n }\n case undefined:\n break;\n // just set the property\n\n default:\n return false;\n // not a valid mapping\n }\n\n // if the property is a bypass property, then link the resultant property to the original one\n if (propIsBypass) {\n if (origPropIsBypass) {\n // then this bypass overrides the existing one\n prop.bypassed = origProp.bypassed; // steal bypassed prop from old bypass\n } else {\n // then link the orig prop to the new bypass\n prop.bypassed = origProp;\n }\n style[prop.name] = prop; // and set\n } else {\n // prop is not bypass\n if (origPropIsBypass) {\n // then keep the orig prop (since it's a bypass) and link to the new prop\n origProp.bypassed = prop;\n } else {\n // then just replace the old prop with the new one\n style[prop.name] = prop;\n }\n }\n checkTriggers();\n return true;\n};\nstyfn$8.cleanElements = function (eles, keepBypasses) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n this.clearStyleHints(ele);\n ele.dirtyCompoundBoundsCache();\n ele.dirtyBoundingBoxCache();\n if (!keepBypasses) {\n ele._private.style = {};\n } else {\n var style = ele._private.style;\n var propNames = Object.keys(style);\n for (var j = 0; j < propNames.length; j++) {\n var propName = propNames[j];\n var eleProp = style[propName];\n if (eleProp != null) {\n if (eleProp.bypass) {\n eleProp.bypassed = null;\n } else {\n style[propName] = null;\n }\n }\n }\n }\n }\n};\n\n// updates the visual style for all elements (useful for manual style modification after init)\nstyfn$8.update = function () {\n var cy = this._private.cy;\n var eles = cy.mutableElements();\n eles.updateStyle();\n};\n\n// diffProps : { name => { prev, next } }\nstyfn$8.updateTransitions = function (ele, diffProps) {\n var self = this;\n var _p = ele._private;\n var props = ele.pstyle('transition-property').value;\n var duration = ele.pstyle('transition-duration').pfValue;\n var delay = ele.pstyle('transition-delay').pfValue;\n if (props.length > 0 && duration > 0) {\n var style = {};\n\n // build up the style to animate towards\n var anyPrev = false;\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n var styProp = ele.pstyle(prop);\n var diffProp = diffProps[prop];\n if (!diffProp) {\n continue;\n }\n var prevProp = diffProp.prev;\n var fromProp = prevProp;\n var toProp = diffProp.next != null ? diffProp.next : styProp;\n var diff = false;\n var initVal = void 0;\n var initDt = 0.000001; // delta time % value for initVal (allows animating out of init zero opacity)\n\n if (!fromProp) {\n continue;\n }\n\n // consider px values\n if (number$1(fromProp.pfValue) && number$1(toProp.pfValue)) {\n diff = toProp.pfValue - fromProp.pfValue; // nonzero is truthy\n initVal = fromProp.pfValue + initDt * diff;\n\n // consider numerical values\n } else if (number$1(fromProp.value) && number$1(toProp.value)) {\n diff = toProp.value - fromProp.value; // nonzero is truthy\n initVal = fromProp.value + initDt * diff;\n\n // consider colour values\n } else if (array(fromProp.value) && array(toProp.value)) {\n diff = fromProp.value[0] !== toProp.value[0] || fromProp.value[1] !== toProp.value[1] || fromProp.value[2] !== toProp.value[2];\n initVal = fromProp.strValue;\n }\n\n // the previous value is good for an animation only if it's different\n if (diff) {\n style[prop] = toProp.strValue; // to val\n this.applyBypass(ele, prop, initVal); // from val\n anyPrev = true;\n }\n } // end if props allow ani\n\n // can't transition if there's nothing previous to transition from\n if (!anyPrev) {\n return;\n }\n _p.transitioning = true;\n new Promise$1(function (resolve) {\n if (delay > 0) {\n ele.delayAnimation(delay).play().promise().then(resolve);\n } else {\n resolve();\n }\n }).then(function () {\n return ele.animation({\n style: style,\n duration: duration,\n easing: ele.pstyle('transition-timing-function').value,\n queue: false\n }).play().promise();\n }).then(function () {\n // if( !isBypass ){\n self.removeBypasses(ele, props);\n ele.emitAndNotify('style');\n // }\n\n _p.transitioning = false;\n });\n } else if (_p.transitioning) {\n this.removeBypasses(ele, props);\n ele.emitAndNotify('style');\n _p.transitioning = false;\n }\n};\nstyfn$8.checkTrigger = function (ele, name, fromValue, toValue, getTrigger, onTrigger) {\n var prop = this.properties[name];\n var triggerCheck = getTrigger(prop);\n if (triggerCheck != null && triggerCheck(fromValue, toValue)) {\n onTrigger(prop);\n }\n};\nstyfn$8.checkZOrderTrigger = function (ele, name, fromValue, toValue) {\n var _this = this;\n this.checkTrigger(ele, name, fromValue, toValue, function (prop) {\n return prop.triggersZOrder;\n }, function () {\n _this._private.cy.notify('zorder', ele);\n });\n};\nstyfn$8.checkBoundsTrigger = function (ele, name, fromValue, toValue) {\n this.checkTrigger(ele, name, fromValue, toValue, function (prop) {\n return prop.triggersBounds;\n }, function (prop) {\n ele.dirtyCompoundBoundsCache();\n ele.dirtyBoundingBoxCache();\n\n // if the prop change makes the bb of pll bezier edges invalid,\n // then dirty the pll edge bb cache as well\n if (\n // only for beziers -- so performance of other edges isn't affected\n prop.triggersBoundsOfParallelBeziers && name === 'curve-style' && (fromValue === 'bezier' || toValue === 'bezier')) {\n ele.parallelEdges().forEach(function (pllEdge) {\n if (pllEdge.isBundledBezier()) {\n pllEdge.dirtyBoundingBoxCache();\n }\n });\n }\n if (prop.triggersBoundsOfConnectedEdges && name === 'display' && (fromValue === 'none' || toValue === 'none')) {\n ele.connectedEdges().forEach(function (edge) {\n edge.dirtyBoundingBoxCache();\n });\n }\n });\n};\nstyfn$8.checkTriggers = function (ele, name, fromValue, toValue) {\n ele.dirtyStyleCache();\n this.checkZOrderTrigger(ele, name, fromValue, toValue);\n this.checkBoundsTrigger(ele, name, fromValue, toValue);\n};\n\nvar styfn$7 = {};\n\n// bypasses are applied to an existing style on an element, and just tacked on temporarily\n// returns true iff application was successful for at least 1 specified property\nstyfn$7.applyBypass = function (eles, name, value, updateTransitions) {\n var self = this;\n var props = [];\n var isBypass = true;\n\n // put all the properties (can specify one or many) in an array after parsing them\n if (name === '*' || name === '**') {\n // apply to all property names\n\n if (value !== undefined) {\n for (var i = 0; i < self.properties.length; i++) {\n var prop = self.properties[i];\n var _name = prop.name;\n var parsedProp = this.parse(_name, value, true);\n if (parsedProp) {\n props.push(parsedProp);\n }\n }\n }\n } else if (string(name)) {\n // then parse the single property\n var _parsedProp = this.parse(name, value, true);\n if (_parsedProp) {\n props.push(_parsedProp);\n }\n } else if (plainObject(name)) {\n // then parse each property\n var specifiedProps = name;\n updateTransitions = value;\n var names = Object.keys(specifiedProps);\n for (var _i = 0; _i < names.length; _i++) {\n var _name2 = names[_i];\n var _value = specifiedProps[_name2];\n if (_value === undefined) {\n // try camel case name too\n _value = specifiedProps[dash2camel(_name2)];\n }\n if (_value !== undefined) {\n var _parsedProp2 = this.parse(_name2, _value, true);\n if (_parsedProp2) {\n props.push(_parsedProp2);\n }\n }\n }\n } else {\n // can't do anything without well defined properties\n return false;\n }\n\n // we've failed if there are no valid properties\n if (props.length === 0) {\n return false;\n }\n\n // now, apply the bypass properties on the elements\n var ret = false; // return true if at least one succesful bypass applied\n for (var _i2 = 0; _i2 < eles.length; _i2++) {\n // for each ele\n var ele = eles[_i2];\n var diffProps = {};\n var diffProp = void 0;\n for (var j = 0; j < props.length; j++) {\n // for each prop\n var _prop = props[j];\n if (updateTransitions) {\n var prevProp = ele.pstyle(_prop.name);\n diffProp = diffProps[_prop.name] = {\n prev: prevProp\n };\n }\n ret = this.applyParsedProperty(ele, copy(_prop)) || ret;\n if (updateTransitions) {\n diffProp.next = ele.pstyle(_prop.name);\n }\n } // for props\n\n if (ret) {\n this.updateStyleHints(ele);\n }\n if (updateTransitions) {\n this.updateTransitions(ele, diffProps, isBypass);\n }\n } // for eles\n\n return ret;\n};\n\n// only useful in specific cases like animation\nstyfn$7.overrideBypass = function (eles, name, value) {\n name = camel2dash(name);\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var prop = ele._private.style[name];\n var type = this.properties[name].type;\n var isColor = type.color;\n var isMulti = type.mutiple;\n var oldValue = !prop ? null : prop.pfValue != null ? prop.pfValue : prop.value;\n if (!prop || !prop.bypass) {\n // need a bypass if one doesn't exist\n this.applyBypass(ele, name, value);\n } else {\n prop.value = value;\n if (prop.pfValue != null) {\n prop.pfValue = value;\n }\n if (isColor) {\n prop.strValue = 'rgb(' + value.join(',') + ')';\n } else if (isMulti) {\n prop.strValue = value.join(' ');\n } else {\n prop.strValue = '' + value;\n }\n this.updateStyleHints(ele);\n }\n this.checkTriggers(ele, name, oldValue, value);\n }\n};\nstyfn$7.removeAllBypasses = function (eles, updateTransitions) {\n return this.removeBypasses(eles, this.propertyNames, updateTransitions);\n};\nstyfn$7.removeBypasses = function (eles, props, updateTransitions) {\n var isBypass = true;\n for (var j = 0; j < eles.length; j++) {\n var ele = eles[j];\n var diffProps = {};\n for (var i = 0; i < props.length; i++) {\n var name = props[i];\n var prop = this.properties[name];\n var prevProp = ele.pstyle(prop.name);\n if (!prevProp || !prevProp.bypass) {\n // if a bypass doesn't exist for the prop, nothing needs to be removed\n continue;\n }\n var value = ''; // empty => remove bypass\n var parsedProp = this.parse(name, value, true);\n var diffProp = diffProps[prop.name] = {\n prev: prevProp\n };\n this.applyParsedProperty(ele, parsedProp);\n diffProp.next = ele.pstyle(prop.name);\n } // for props\n\n this.updateStyleHints(ele);\n if (updateTransitions) {\n this.updateTransitions(ele, diffProps, isBypass);\n }\n } // for eles\n};\n\nvar styfn$6 = {};\n\n// gets what an em size corresponds to in pixels relative to a dom element\nstyfn$6.getEmSizeInPixels = function () {\n var px = this.containerCss('font-size');\n if (px != null) {\n return parseFloat(px);\n } else {\n return 1; // for headless\n }\n};\n\n// gets css property from the core container\nstyfn$6.containerCss = function (propName) {\n var cy = this._private.cy;\n var domElement = cy.container();\n var containerWindow = cy.window();\n if (containerWindow && domElement && containerWindow.getComputedStyle) {\n return containerWindow.getComputedStyle(domElement).getPropertyValue(propName);\n }\n};\n\nvar styfn$5 = {};\n\n// gets the rendered style for an element\nstyfn$5.getRenderedStyle = function (ele, prop) {\n if (prop) {\n return this.getStylePropertyValue(ele, prop, true);\n } else {\n return this.getRawStyle(ele, true);\n }\n};\n\n// gets the raw style for an element\nstyfn$5.getRawStyle = function (ele, isRenderedVal) {\n var self = this;\n ele = ele[0]; // insure it's an element\n\n if (ele) {\n var rstyle = {};\n for (var i = 0; i < self.properties.length; i++) {\n var prop = self.properties[i];\n var val = self.getStylePropertyValue(ele, prop.name, isRenderedVal);\n if (val != null) {\n rstyle[prop.name] = val;\n rstyle[dash2camel(prop.name)] = val;\n }\n }\n return rstyle;\n }\n};\nstyfn$5.getIndexedStyle = function (ele, property, subproperty, index) {\n var pstyle = ele.pstyle(property)[subproperty][index];\n return pstyle != null ? pstyle : ele.cy().style().getDefaultProperty(property)[subproperty][0];\n};\nstyfn$5.getStylePropertyValue = function (ele, propName, isRenderedVal) {\n var self = this;\n ele = ele[0]; // insure it's an element\n\n if (ele) {\n var prop = self.properties[propName];\n if (prop.alias) {\n prop = prop.pointsTo;\n }\n var type = prop.type;\n var styleProp = ele.pstyle(prop.name);\n if (styleProp) {\n var value = styleProp.value,\n units = styleProp.units,\n strValue = styleProp.strValue;\n if (isRenderedVal && type.number && value != null && number$1(value)) {\n var zoom = ele.cy().zoom();\n var getRenderedValue = function getRenderedValue(val) {\n return val * zoom;\n };\n var getValueStringWithUnits = function getValueStringWithUnits(val, units) {\n return getRenderedValue(val) + units;\n };\n var isArrayValue = array(value);\n var haveUnits = isArrayValue ? units.every(function (u) {\n return u != null;\n }) : units != null;\n if (haveUnits) {\n if (isArrayValue) {\n return value.map(function (v, i) {\n return getValueStringWithUnits(v, units[i]);\n }).join(' ');\n } else {\n return getValueStringWithUnits(value, units);\n }\n } else {\n if (isArrayValue) {\n return value.map(function (v) {\n return string(v) ? v : '' + getRenderedValue(v);\n }).join(' ');\n } else {\n return '' + getRenderedValue(value);\n }\n }\n } else if (strValue != null) {\n return strValue;\n }\n }\n return null;\n }\n};\nstyfn$5.getAnimationStartStyle = function (ele, aniProps) {\n var rstyle = {};\n for (var i = 0; i < aniProps.length; i++) {\n var aniProp = aniProps[i];\n var name = aniProp.name;\n var styleProp = ele.pstyle(name);\n if (styleProp !== undefined) {\n // then make a prop of it\n if (plainObject(styleProp)) {\n styleProp = this.parse(name, styleProp.strValue);\n } else {\n styleProp = this.parse(name, styleProp);\n }\n }\n if (styleProp) {\n rstyle[name] = styleProp;\n }\n }\n return rstyle;\n};\nstyfn$5.getPropsList = function (propsObj) {\n var self = this;\n var rstyle = [];\n var style = propsObj;\n var props = self.properties;\n if (style) {\n var names = Object.keys(style);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n var val = style[name];\n var prop = props[name] || props[camel2dash(name)];\n var styleProp = this.parse(prop.name, val);\n if (styleProp) {\n rstyle.push(styleProp);\n }\n }\n }\n return rstyle;\n};\nstyfn$5.getNonDefaultPropertiesHash = function (ele, propNames, seed) {\n var hash = seed.slice();\n var name, val, strVal, chVal;\n var i, j;\n for (i = 0; i < propNames.length; i++) {\n name = propNames[i];\n val = ele.pstyle(name, false);\n if (val == null) {\n continue;\n } else if (val.pfValue != null) {\n hash[0] = hashInt(chVal, hash[0]);\n hash[1] = hashIntAlt(chVal, hash[1]);\n } else {\n strVal = val.strValue;\n for (j = 0; j < strVal.length; j++) {\n chVal = strVal.charCodeAt(j);\n hash[0] = hashInt(chVal, hash[0]);\n hash[1] = hashIntAlt(chVal, hash[1]);\n }\n }\n }\n return hash;\n};\nstyfn$5.getPropertiesHash = styfn$5.getNonDefaultPropertiesHash;\n\nvar styfn$4 = {};\nstyfn$4.appendFromJson = function (json) {\n var style = this;\n for (var i = 0; i < json.length; i++) {\n var context = json[i];\n var selector = context.selector;\n var props = context.style || context.css;\n var names = Object.keys(props);\n style.selector(selector); // apply selector\n\n for (var j = 0; j < names.length; j++) {\n var name = names[j];\n var value = props[name];\n style.css(name, value); // apply property\n }\n }\n\n return style;\n};\n\n// accessible cy.style() function\nstyfn$4.fromJson = function (json) {\n var style = this;\n style.resetToDefault();\n style.appendFromJson(json);\n return style;\n};\n\n// get json from cy.style() api\nstyfn$4.json = function () {\n var json = [];\n for (var i = this.defaultLength; i < this.length; i++) {\n var cxt = this[i];\n var selector = cxt.selector;\n var props = cxt.properties;\n var css = {};\n for (var j = 0; j < props.length; j++) {\n var prop = props[j];\n css[prop.name] = prop.strValue;\n }\n json.push({\n selector: !selector ? 'core' : selector.toString(),\n style: css\n });\n }\n return json;\n};\n\nvar styfn$3 = {};\nstyfn$3.appendFromString = function (string) {\n var self = this;\n var style = this;\n var remaining = '' + string;\n var selAndBlockStr;\n var blockRem;\n var propAndValStr;\n\n // remove comments from the style string\n remaining = remaining.replace(/[/][*](\\s|.)+?[*][/]/g, '');\n function removeSelAndBlockFromRemaining() {\n // remove the parsed selector and block from the remaining text to parse\n if (remaining.length > selAndBlockStr.length) {\n remaining = remaining.substr(selAndBlockStr.length);\n } else {\n remaining = '';\n }\n }\n function removePropAndValFromRem() {\n // remove the parsed property and value from the remaining block text to parse\n if (blockRem.length > propAndValStr.length) {\n blockRem = blockRem.substr(propAndValStr.length);\n } else {\n blockRem = '';\n }\n }\n for (;;) {\n var nothingLeftToParse = remaining.match(/^\\s*$/);\n if (nothingLeftToParse) {\n break;\n }\n var selAndBlock = remaining.match(/^\\s*((?:.|\\s)+?)\\s*\\{((?:.|\\s)+?)\\}/);\n if (!selAndBlock) {\n warn('Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: ' + remaining);\n break;\n }\n selAndBlockStr = selAndBlock[0];\n\n // parse the selector\n var selectorStr = selAndBlock[1];\n if (selectorStr !== 'core') {\n var selector = new Selector(selectorStr);\n if (selector.invalid) {\n warn('Skipping parsing of block: Invalid selector found in string stylesheet: ' + selectorStr);\n\n // skip this selector and block\n removeSelAndBlockFromRemaining();\n continue;\n }\n }\n\n // parse the block of properties and values\n var blockStr = selAndBlock[2];\n var invalidBlock = false;\n blockRem = blockStr;\n var props = [];\n for (;;) {\n var _nothingLeftToParse = blockRem.match(/^\\s*$/);\n if (_nothingLeftToParse) {\n break;\n }\n var propAndVal = blockRem.match(/^\\s*(.+?)\\s*:\\s*(.+?)(?:\\s*;|\\s*$)/);\n if (!propAndVal) {\n warn('Skipping parsing of block: Invalid formatting of style property and value definitions found in:' + blockStr);\n invalidBlock = true;\n break;\n }\n propAndValStr = propAndVal[0];\n var propStr = propAndVal[1];\n var valStr = propAndVal[2];\n var prop = self.properties[propStr];\n if (!prop) {\n warn('Skipping property: Invalid property name in: ' + propAndValStr);\n\n // skip this property in the block\n removePropAndValFromRem();\n continue;\n }\n var parsedProp = style.parse(propStr, valStr);\n if (!parsedProp) {\n warn('Skipping property: Invalid property definition in: ' + propAndValStr);\n\n // skip this property in the block\n removePropAndValFromRem();\n continue;\n }\n props.push({\n name: propStr,\n val: valStr\n });\n removePropAndValFromRem();\n }\n if (invalidBlock) {\n removeSelAndBlockFromRemaining();\n break;\n }\n\n // put the parsed block in the style\n style.selector(selectorStr);\n for (var i = 0; i < props.length; i++) {\n var _prop = props[i];\n style.css(_prop.name, _prop.val);\n }\n removeSelAndBlockFromRemaining();\n }\n return style;\n};\nstyfn$3.fromString = function (string) {\n var style = this;\n style.resetToDefault();\n style.appendFromString(string);\n return style;\n};\n\nvar styfn$2 = {};\n(function () {\n var number$1 = number;\n var rgba = rgbaNoBackRefs;\n var hsla = hslaNoBackRefs;\n var hex3$1 = hex3;\n var hex6$1 = hex6;\n var data = function data(prefix) {\n return '^' + prefix + '\\\\s*\\\\(\\\\s*([\\\\w\\\\.]+)\\\\s*\\\\)$';\n };\n var mapData = function mapData(prefix) {\n var mapArg = number$1 + '|\\\\w+|' + rgba + '|' + hsla + '|' + hex3$1 + '|' + hex6$1;\n return '^' + prefix + '\\\\s*\\\\(([\\\\w\\\\.]+)\\\\s*\\\\,\\\\s*(' + number$1 + ')\\\\s*\\\\,\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + mapArg + ')\\\\s*\\\\,\\\\s*(' + mapArg + ')\\\\)$';\n };\n var urlRegexes = ['^url\\\\s*\\\\(\\\\s*[\\'\"]?(.+?)[\\'\"]?\\\\s*\\\\)$', '^(none)$', '^(.+)$'];\n\n // each visual style property has a type and needs to be validated according to it\n styfn$2.types = {\n time: {\n number: true,\n min: 0,\n units: 's|ms',\n implicitUnits: 'ms'\n },\n percent: {\n number: true,\n min: 0,\n max: 100,\n units: '%',\n implicitUnits: '%'\n },\n percentages: {\n number: true,\n min: 0,\n max: 100,\n units: '%',\n implicitUnits: '%',\n multiple: true\n },\n zeroOneNumber: {\n number: true,\n min: 0,\n max: 1,\n unitless: true\n },\n zeroOneNumbers: {\n number: true,\n min: 0,\n max: 1,\n unitless: true,\n multiple: true\n },\n nOneOneNumber: {\n number: true,\n min: -1,\n max: 1,\n unitless: true\n },\n nonNegativeInt: {\n number: true,\n min: 0,\n integer: true,\n unitless: true\n },\n nonNegativeNumber: {\n number: true,\n min: 0,\n unitless: true\n },\n position: {\n enums: ['parent', 'origin']\n },\n nodeSize: {\n number: true,\n min: 0,\n enums: ['label']\n },\n number: {\n number: true,\n unitless: true\n },\n numbers: {\n number: true,\n unitless: true,\n multiple: true\n },\n positiveNumber: {\n number: true,\n unitless: true,\n min: 0,\n strictMin: true\n },\n size: {\n number: true,\n min: 0\n },\n bidirectionalSize: {\n number: true\n },\n // allows negative\n bidirectionalSizeMaybePercent: {\n number: true,\n allowPercent: true\n },\n // allows negative\n bidirectionalSizes: {\n number: true,\n multiple: true\n },\n // allows negative\n sizeMaybePercent: {\n number: true,\n min: 0,\n allowPercent: true\n },\n axisDirection: {\n enums: ['horizontal', 'leftward', 'rightward', 'vertical', 'upward', 'downward', 'auto']\n },\n paddingRelativeTo: {\n enums: ['width', 'height', 'average', 'min', 'max']\n },\n bgWH: {\n number: true,\n min: 0,\n allowPercent: true,\n enums: ['auto'],\n multiple: true\n },\n bgPos: {\n number: true,\n allowPercent: true,\n multiple: true\n },\n bgRelativeTo: {\n enums: ['inner', 'include-padding'],\n multiple: true\n },\n bgRepeat: {\n enums: ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'],\n multiple: true\n },\n bgFit: {\n enums: ['none', 'contain', 'cover'],\n multiple: true\n },\n bgCrossOrigin: {\n enums: ['anonymous', 'use-credentials', 'null'],\n multiple: true\n },\n bgClip: {\n enums: ['none', 'node'],\n multiple: true\n },\n bgContainment: {\n enums: ['inside', 'over'],\n multiple: true\n },\n color: {\n color: true\n },\n colors: {\n color: true,\n multiple: true\n },\n fill: {\n enums: ['solid', 'linear-gradient', 'radial-gradient']\n },\n bool: {\n enums: ['yes', 'no']\n },\n bools: {\n enums: ['yes', 'no'],\n multiple: true\n },\n lineStyle: {\n enums: ['solid', 'dotted', 'dashed']\n },\n lineCap: {\n enums: ['butt', 'round', 'square']\n },\n linePosition: {\n enums: ['center', 'inside', 'outside']\n },\n lineJoin: {\n enums: ['round', 'bevel', 'miter']\n },\n borderStyle: {\n enums: ['solid', 'dotted', 'dashed', 'double']\n },\n curveStyle: {\n enums: ['bezier', 'unbundled-bezier', 'haystack', 'segments', 'straight', 'straight-triangle', 'taxi', 'round-segments', 'round-taxi']\n },\n radiusType: {\n enums: ['arc-radius', 'influence-radius'],\n multiple: true\n },\n fontFamily: {\n regex: '^([\\\\w- \\\\\"]+(?:\\\\s*,\\\\s*[\\\\w- \\\\\"]+)*)$'\n },\n fontStyle: {\n enums: ['italic', 'normal', 'oblique']\n },\n fontWeight: {\n enums: ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '800', '900', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n },\n textDecoration: {\n enums: ['none', 'underline', 'overline', 'line-through']\n },\n textTransform: {\n enums: ['none', 'uppercase', 'lowercase']\n },\n textWrap: {\n enums: ['none', 'wrap', 'ellipsis']\n },\n textOverflowWrap: {\n enums: ['whitespace', 'anywhere']\n },\n textBackgroundShape: {\n enums: ['rectangle', 'roundrectangle', 'round-rectangle']\n },\n nodeShape: {\n enums: ['rectangle', 'roundrectangle', 'round-rectangle', 'cutrectangle', 'cut-rectangle', 'bottomroundrectangle', 'bottom-round-rectangle', 'barrel', 'ellipse', 'triangle', 'round-triangle', 'square', 'pentagon', 'round-pentagon', 'hexagon', 'round-hexagon', 'concavehexagon', 'concave-hexagon', 'heptagon', 'round-heptagon', 'octagon', 'round-octagon', 'tag', 'round-tag', 'star', 'diamond', 'round-diamond', 'vee', 'rhomboid', 'right-rhomboid', 'polygon']\n },\n overlayShape: {\n enums: ['roundrectangle', 'round-rectangle', 'ellipse']\n },\n cornerRadius: {\n number: true,\n min: 0,\n units: 'px|em',\n implicitUnits: 'px',\n enums: ['auto']\n },\n compoundIncludeLabels: {\n enums: ['include', 'exclude']\n },\n arrowShape: {\n enums: ['tee', 'triangle', 'triangle-tee', 'circle-triangle', 'triangle-cross', 'triangle-backcurve', 'vee', 'square', 'circle', 'diamond', 'chevron', 'none']\n },\n arrowFill: {\n enums: ['filled', 'hollow']\n },\n arrowWidth: {\n number: true,\n units: '%|px|em',\n implicitUnits: 'px',\n enums: ['match-line']\n },\n display: {\n enums: ['element', 'none']\n },\n visibility: {\n enums: ['hidden', 'visible']\n },\n zCompoundDepth: {\n enums: ['bottom', 'orphan', 'auto', 'top']\n },\n zIndexCompare: {\n enums: ['auto', 'manual']\n },\n valign: {\n enums: ['top', 'center', 'bottom']\n },\n halign: {\n enums: ['left', 'center', 'right']\n },\n justification: {\n enums: ['left', 'center', 'right', 'auto']\n },\n text: {\n string: true\n },\n data: {\n mapping: true,\n regex: data('data')\n },\n layoutData: {\n mapping: true,\n regex: data('layoutData')\n },\n scratch: {\n mapping: true,\n regex: data('scratch')\n },\n mapData: {\n mapping: true,\n regex: mapData('mapData')\n },\n mapLayoutData: {\n mapping: true,\n regex: mapData('mapLayoutData')\n },\n mapScratch: {\n mapping: true,\n regex: mapData('mapScratch')\n },\n fn: {\n mapping: true,\n fn: true\n },\n url: {\n regexes: urlRegexes,\n singleRegexMatchValue: true\n },\n urls: {\n regexes: urlRegexes,\n singleRegexMatchValue: true,\n multiple: true\n },\n propList: {\n propList: true\n },\n angle: {\n number: true,\n units: 'deg|rad',\n implicitUnits: 'rad'\n },\n textRotation: {\n number: true,\n units: 'deg|rad',\n implicitUnits: 'rad',\n enums: ['none', 'autorotate']\n },\n polygonPointList: {\n number: true,\n multiple: true,\n evenMultiple: true,\n min: -1,\n max: 1,\n unitless: true\n },\n edgeDistances: {\n enums: ['intersection', 'node-position', 'endpoints']\n },\n edgeEndpoint: {\n number: true,\n multiple: true,\n units: '%|px|em|deg|rad',\n implicitUnits: 'px',\n enums: ['inside-to-node', 'outside-to-node', 'outside-to-node-or-label', 'outside-to-line', 'outside-to-line-or-label'],\n singleEnum: true,\n validate: function validate(valArr, unitsArr) {\n switch (valArr.length) {\n case 2:\n // can be % or px only\n return unitsArr[0] !== 'deg' && unitsArr[0] !== 'rad' && unitsArr[1] !== 'deg' && unitsArr[1] !== 'rad';\n case 1:\n // can be enum, deg, or rad only\n return string(valArr[0]) || unitsArr[0] === 'deg' || unitsArr[0] === 'rad';\n default:\n return false;\n }\n }\n },\n easing: {\n regexes: ['^(spring)\\\\s*\\\\(\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + number$1 + ')\\\\s*\\\\)$', '^(cubic-bezier)\\\\s*\\\\(\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + number$1 + ')\\\\s*\\\\)$'],\n enums: ['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'ease-in-sine', 'ease-out-sine', 'ease-in-out-sine', 'ease-in-quad', 'ease-out-quad', 'ease-in-out-quad', 'ease-in-cubic', 'ease-out-cubic', 'ease-in-out-cubic', 'ease-in-quart', 'ease-out-quart', 'ease-in-out-quart', 'ease-in-quint', 'ease-out-quint', 'ease-in-out-quint', 'ease-in-expo', 'ease-out-expo', 'ease-in-out-expo', 'ease-in-circ', 'ease-out-circ', 'ease-in-out-circ']\n },\n gradientDirection: {\n enums: ['to-bottom', 'to-top', 'to-left', 'to-right', 'to-bottom-right', 'to-bottom-left', 'to-top-right', 'to-top-left', 'to-right-bottom', 'to-left-bottom', 'to-right-top', 'to-left-top' // different order\n ]\n },\n\n boundsExpansion: {\n number: true,\n multiple: true,\n min: 0,\n validate: function validate(valArr) {\n var length = valArr.length;\n return length === 1 || length === 2 || length === 4;\n }\n }\n };\n var diff = {\n zeroNonZero: function zeroNonZero(val1, val2) {\n if ((val1 == null || val2 == null) && val1 !== val2) {\n return true; // null cases could represent any value\n }\n if (val1 == 0 && val2 != 0) {\n return true;\n } else if (val1 != 0 && val2 == 0) {\n return true;\n } else {\n return false;\n }\n },\n any: function any(val1, val2) {\n return val1 != val2;\n },\n emptyNonEmpty: function emptyNonEmpty(str1, str2) {\n var empty1 = emptyString(str1);\n var empty2 = emptyString(str2);\n return empty1 && !empty2 || !empty1 && empty2;\n }\n };\n\n // define visual style properties\n //\n // - n.b. adding a new group of props may require updates to updateStyleHints()\n // - adding new props to an existing group gets handled automatically\n\n var t = styfn$2.types;\n var mainLabel = [{\n name: 'label',\n type: t.text,\n triggersBounds: diff.any,\n triggersZOrder: diff.emptyNonEmpty\n }, {\n name: 'text-rotation',\n type: t.textRotation,\n triggersBounds: diff.any\n }, {\n name: 'text-margin-x',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'text-margin-y',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }];\n var sourceLabel = [{\n name: 'source-label',\n type: t.text,\n triggersBounds: diff.any\n }, {\n name: 'source-text-rotation',\n type: t.textRotation,\n triggersBounds: diff.any\n }, {\n name: 'source-text-margin-x',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'source-text-margin-y',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'source-text-offset',\n type: t.size,\n triggersBounds: diff.any\n }];\n var targetLabel = [{\n name: 'target-label',\n type: t.text,\n triggersBounds: diff.any\n }, {\n name: 'target-text-rotation',\n type: t.textRotation,\n triggersBounds: diff.any\n }, {\n name: 'target-text-margin-x',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'target-text-margin-y',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'target-text-offset',\n type: t.size,\n triggersBounds: diff.any\n }];\n var labelDimensions = [{\n name: 'font-family',\n type: t.fontFamily,\n triggersBounds: diff.any\n }, {\n name: 'font-style',\n type: t.fontStyle,\n triggersBounds: diff.any\n }, {\n name: 'font-weight',\n type: t.fontWeight,\n triggersBounds: diff.any\n }, {\n name: 'font-size',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'text-transform',\n type: t.textTransform,\n triggersBounds: diff.any\n }, {\n name: 'text-wrap',\n type: t.textWrap,\n triggersBounds: diff.any\n }, {\n name: 'text-overflow-wrap',\n type: t.textOverflowWrap,\n triggersBounds: diff.any\n }, {\n name: 'text-max-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'text-outline-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'line-height',\n type: t.positiveNumber,\n triggersBounds: diff.any\n }];\n var commonLabel = [{\n name: 'text-valign',\n type: t.valign,\n triggersBounds: diff.any\n }, {\n name: 'text-halign',\n type: t.halign,\n triggersBounds: diff.any\n }, {\n name: 'color',\n type: t.color\n }, {\n name: 'text-outline-color',\n type: t.color\n }, {\n name: 'text-outline-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'text-background-color',\n type: t.color\n }, {\n name: 'text-background-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'text-background-padding',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'text-border-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'text-border-color',\n type: t.color\n }, {\n name: 'text-border-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'text-border-style',\n type: t.borderStyle,\n triggersBounds: diff.any\n }, {\n name: 'text-background-shape',\n type: t.textBackgroundShape,\n triggersBounds: diff.any\n }, {\n name: 'text-justification',\n type: t.justification\n }];\n var behavior = [{\n name: 'events',\n type: t.bool,\n triggersZOrder: diff.any\n }, {\n name: 'text-events',\n type: t.bool,\n triggersZOrder: diff.any\n }];\n var visibility = [{\n name: 'display',\n type: t.display,\n triggersZOrder: diff.any,\n triggersBounds: diff.any,\n triggersBoundsOfConnectedEdges: true\n }, {\n name: 'visibility',\n type: t.visibility,\n triggersZOrder: diff.any\n }, {\n name: 'opacity',\n type: t.zeroOneNumber,\n triggersZOrder: diff.zeroNonZero\n }, {\n name: 'text-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'min-zoomed-font-size',\n type: t.size\n }, {\n name: 'z-compound-depth',\n type: t.zCompoundDepth,\n triggersZOrder: diff.any\n }, {\n name: 'z-index-compare',\n type: t.zIndexCompare,\n triggersZOrder: diff.any\n }, {\n name: 'z-index',\n type: t.number,\n triggersZOrder: diff.any\n }];\n var overlay = [{\n name: 'overlay-padding',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'overlay-color',\n type: t.color\n }, {\n name: 'overlay-opacity',\n type: t.zeroOneNumber,\n triggersBounds: diff.zeroNonZero\n }, {\n name: 'overlay-shape',\n type: t.overlayShape,\n triggersBounds: diff.any\n }, {\n name: 'overlay-corner-radius',\n type: t.cornerRadius\n }];\n var underlay = [{\n name: 'underlay-padding',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'underlay-color',\n type: t.color\n }, {\n name: 'underlay-opacity',\n type: t.zeroOneNumber,\n triggersBounds: diff.zeroNonZero\n }, {\n name: 'underlay-shape',\n type: t.overlayShape,\n triggersBounds: diff.any\n }, {\n name: 'underlay-corner-radius',\n type: t.cornerRadius\n }];\n var transition = [{\n name: 'transition-property',\n type: t.propList\n }, {\n name: 'transition-duration',\n type: t.time\n }, {\n name: 'transition-delay',\n type: t.time\n }, {\n name: 'transition-timing-function',\n type: t.easing\n }];\n var nodeSizeHashOverride = function nodeSizeHashOverride(ele, parsedProp) {\n if (parsedProp.value === 'label') {\n return -ele.poolIndex(); // no hash key hits is using label size (hitrate for perf probably low anyway)\n } else {\n return parsedProp.pfValue;\n }\n };\n var nodeBody = [{\n name: 'height',\n type: t.nodeSize,\n triggersBounds: diff.any,\n hashOverride: nodeSizeHashOverride\n }, {\n name: 'width',\n type: t.nodeSize,\n triggersBounds: diff.any,\n hashOverride: nodeSizeHashOverride\n }, {\n name: 'shape',\n type: t.nodeShape,\n triggersBounds: diff.any\n }, {\n name: 'shape-polygon-points',\n type: t.polygonPointList,\n triggersBounds: diff.any\n }, {\n name: 'corner-radius',\n type: t.cornerRadius\n }, {\n name: 'background-color',\n type: t.color\n }, {\n name: 'background-fill',\n type: t.fill\n }, {\n name: 'background-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'background-blacken',\n type: t.nOneOneNumber\n }, {\n name: 'background-gradient-stop-colors',\n type: t.colors\n }, {\n name: 'background-gradient-stop-positions',\n type: t.percentages\n }, {\n name: 'background-gradient-direction',\n type: t.gradientDirection\n }, {\n name: 'padding',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'padding-relative-to',\n type: t.paddingRelativeTo,\n triggersBounds: diff.any\n }, {\n name: 'bounds-expansion',\n type: t.boundsExpansion,\n triggersBounds: diff.any\n }];\n var nodeBorder = [{\n name: 'border-color',\n type: t.color\n }, {\n name: 'border-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'border-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'border-style',\n type: t.borderStyle\n }, {\n name: 'border-cap',\n type: t.lineCap\n }, {\n name: 'border-join',\n type: t.lineJoin\n }, {\n name: 'border-dash-pattern',\n type: t.numbers\n }, {\n name: 'border-dash-offset',\n type: t.number\n }, {\n name: 'border-position',\n type: t.linePosition\n }];\n var nodeOutline = [{\n name: 'outline-color',\n type: t.color\n }, {\n name: 'outline-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'outline-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'outline-style',\n type: t.borderStyle\n }, {\n name: 'outline-offset',\n type: t.size,\n triggersBounds: diff.any\n }];\n var backgroundImage = [{\n name: 'background-image',\n type: t.urls\n }, {\n name: 'background-image-crossorigin',\n type: t.bgCrossOrigin\n }, {\n name: 'background-image-opacity',\n type: t.zeroOneNumbers\n }, {\n name: 'background-image-containment',\n type: t.bgContainment\n }, {\n name: 'background-image-smoothing',\n type: t.bools\n }, {\n name: 'background-position-x',\n type: t.bgPos\n }, {\n name: 'background-position-y',\n type: t.bgPos\n }, {\n name: 'background-width-relative-to',\n type: t.bgRelativeTo\n }, {\n name: 'background-height-relative-to',\n type: t.bgRelativeTo\n }, {\n name: 'background-repeat',\n type: t.bgRepeat\n }, {\n name: 'background-fit',\n type: t.bgFit\n }, {\n name: 'background-clip',\n type: t.bgClip\n }, {\n name: 'background-width',\n type: t.bgWH\n }, {\n name: 'background-height',\n type: t.bgWH\n }, {\n name: 'background-offset-x',\n type: t.bgPos\n }, {\n name: 'background-offset-y',\n type: t.bgPos\n }];\n var compound = [{\n name: 'position',\n type: t.position,\n triggersBounds: diff.any\n }, {\n name: 'compound-sizing-wrt-labels',\n type: t.compoundIncludeLabels,\n triggersBounds: diff.any\n }, {\n name: 'min-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'min-width-bias-left',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'min-width-bias-right',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'min-height',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'min-height-bias-top',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'min-height-bias-bottom',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }];\n var edgeLine = [{\n name: 'line-style',\n type: t.lineStyle\n }, {\n name: 'line-color',\n type: t.color\n }, {\n name: 'line-fill',\n type: t.fill\n }, {\n name: 'line-cap',\n type: t.lineCap\n }, {\n name: 'line-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'line-dash-pattern',\n type: t.numbers\n }, {\n name: 'line-dash-offset',\n type: t.number\n }, {\n name: 'line-outline-width',\n type: t.size\n }, {\n name: 'line-outline-color',\n type: t.color\n }, {\n name: 'line-gradient-stop-colors',\n type: t.colors\n }, {\n name: 'line-gradient-stop-positions',\n type: t.percentages\n }, {\n name: 'curve-style',\n type: t.curveStyle,\n triggersBounds: diff.any,\n triggersBoundsOfParallelBeziers: true\n }, {\n name: 'haystack-radius',\n type: t.zeroOneNumber,\n triggersBounds: diff.any\n }, {\n name: 'source-endpoint',\n type: t.edgeEndpoint,\n triggersBounds: diff.any\n }, {\n name: 'target-endpoint',\n type: t.edgeEndpoint,\n triggersBounds: diff.any\n }, {\n name: 'control-point-step-size',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'control-point-distances',\n type: t.bidirectionalSizes,\n triggersBounds: diff.any\n }, {\n name: 'control-point-weights',\n type: t.numbers,\n triggersBounds: diff.any\n }, {\n name: 'segment-distances',\n type: t.bidirectionalSizes,\n triggersBounds: diff.any\n }, {\n name: 'segment-weights',\n type: t.numbers,\n triggersBounds: diff.any\n }, {\n name: 'segment-radii',\n type: t.numbers,\n triggersBounds: diff.any\n }, {\n name: 'radius-type',\n type: t.radiusType,\n triggersBounds: diff.any\n }, {\n name: 'taxi-turn',\n type: t.bidirectionalSizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'taxi-turn-min-distance',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'taxi-direction',\n type: t.axisDirection,\n triggersBounds: diff.any\n }, {\n name: 'taxi-radius',\n type: t.number,\n triggersBounds: diff.any\n }, {\n name: 'edge-distances',\n type: t.edgeDistances,\n triggersBounds: diff.any\n }, {\n name: 'arrow-scale',\n type: t.positiveNumber,\n triggersBounds: diff.any\n }, {\n name: 'loop-direction',\n type: t.angle,\n triggersBounds: diff.any\n }, {\n name: 'loop-sweep',\n type: t.angle,\n triggersBounds: diff.any\n }, {\n name: 'source-distance-from-node',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'target-distance-from-node',\n type: t.size,\n triggersBounds: diff.any\n }];\n var ghost = [{\n name: 'ghost',\n type: t.bool,\n triggersBounds: diff.any\n }, {\n name: 'ghost-offset-x',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'ghost-offset-y',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'ghost-opacity',\n type: t.zeroOneNumber\n }];\n var core = [{\n name: 'selection-box-color',\n type: t.color\n }, {\n name: 'selection-box-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'selection-box-border-color',\n type: t.color\n }, {\n name: 'selection-box-border-width',\n type: t.size\n }, {\n name: 'active-bg-color',\n type: t.color\n }, {\n name: 'active-bg-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'active-bg-size',\n type: t.size\n }, {\n name: 'outside-texture-bg-color',\n type: t.color\n }, {\n name: 'outside-texture-bg-opacity',\n type: t.zeroOneNumber\n }];\n\n // pie backgrounds for nodes\n var pie = [];\n styfn$2.pieBackgroundN = 16; // because the pie properties are numbered, give access to a constant N (for renderer use)\n pie.push({\n name: 'pie-size',\n type: t.sizeMaybePercent\n });\n for (var i = 1; i <= styfn$2.pieBackgroundN; i++) {\n pie.push({\n name: 'pie-' + i + '-background-color',\n type: t.color\n });\n pie.push({\n name: 'pie-' + i + '-background-size',\n type: t.percent\n });\n pie.push({\n name: 'pie-' + i + '-background-opacity',\n type: t.zeroOneNumber\n });\n }\n\n // edge arrows\n var edgeArrow = [];\n var arrowPrefixes = styfn$2.arrowPrefixes = ['source', 'mid-source', 'target', 'mid-target'];\n [{\n name: 'arrow-shape',\n type: t.arrowShape,\n triggersBounds: diff.any\n }, {\n name: 'arrow-color',\n type: t.color\n }, {\n name: 'arrow-fill',\n type: t.arrowFill\n }, {\n name: 'arrow-width',\n type: t.arrowWidth\n }].forEach(function (prop) {\n arrowPrefixes.forEach(function (prefix) {\n var name = prefix + '-' + prop.name;\n var type = prop.type,\n triggersBounds = prop.triggersBounds;\n edgeArrow.push({\n name: name,\n type: type,\n triggersBounds: triggersBounds\n });\n });\n }, {});\n var props = styfn$2.properties = [].concat(behavior, transition, visibility, overlay, underlay, ghost, commonLabel, labelDimensions, mainLabel, sourceLabel, targetLabel, nodeBody, nodeBorder, nodeOutline, backgroundImage, pie, compound, edgeLine, edgeArrow, core);\n var propGroups = styfn$2.propertyGroups = {\n // common to all eles\n behavior: behavior,\n transition: transition,\n visibility: visibility,\n overlay: overlay,\n underlay: underlay,\n ghost: ghost,\n // labels\n commonLabel: commonLabel,\n labelDimensions: labelDimensions,\n mainLabel: mainLabel,\n sourceLabel: sourceLabel,\n targetLabel: targetLabel,\n // node props\n nodeBody: nodeBody,\n nodeBorder: nodeBorder,\n nodeOutline: nodeOutline,\n backgroundImage: backgroundImage,\n pie: pie,\n compound: compound,\n // edge props\n edgeLine: edgeLine,\n edgeArrow: edgeArrow,\n core: core\n };\n var propGroupNames = styfn$2.propertyGroupNames = {};\n var propGroupKeys = styfn$2.propertyGroupKeys = Object.keys(propGroups);\n propGroupKeys.forEach(function (key) {\n propGroupNames[key] = propGroups[key].map(function (prop) {\n return prop.name;\n });\n propGroups[key].forEach(function (prop) {\n return prop.groupKey = key;\n });\n });\n\n // define aliases\n var aliases = styfn$2.aliases = [{\n name: 'content',\n pointsTo: 'label'\n }, {\n name: 'control-point-distance',\n pointsTo: 'control-point-distances'\n }, {\n name: 'control-point-weight',\n pointsTo: 'control-point-weights'\n }, {\n name: 'segment-distance',\n pointsTo: 'segment-distances'\n }, {\n name: 'segment-weight',\n pointsTo: 'segment-weights'\n }, {\n name: 'segment-radius',\n pointsTo: 'segment-radii'\n }, {\n name: 'edge-text-rotation',\n pointsTo: 'text-rotation'\n }, {\n name: 'padding-left',\n pointsTo: 'padding'\n }, {\n name: 'padding-right',\n pointsTo: 'padding'\n }, {\n name: 'padding-top',\n pointsTo: 'padding'\n }, {\n name: 'padding-bottom',\n pointsTo: 'padding'\n }];\n\n // list of property names\n styfn$2.propertyNames = props.map(function (p) {\n return p.name;\n });\n\n // allow access of properties by name ( e.g. style.properties.height )\n for (var _i = 0; _i < props.length; _i++) {\n var prop = props[_i];\n props[prop.name] = prop; // allow lookup by name\n }\n\n // map aliases\n for (var _i2 = 0; _i2 < aliases.length; _i2++) {\n var alias = aliases[_i2];\n var pointsToProp = props[alias.pointsTo];\n var aliasProp = {\n name: alias.name,\n alias: true,\n pointsTo: pointsToProp\n };\n\n // add alias prop for parsing\n props.push(aliasProp);\n props[alias.name] = aliasProp; // allow lookup by name\n }\n})();\n\nstyfn$2.getDefaultProperty = function (name) {\n return this.getDefaultProperties()[name];\n};\nstyfn$2.getDefaultProperties = function () {\n var _p = this._private;\n if (_p.defaultProperties != null) {\n return _p.defaultProperties;\n }\n var rawProps = extend({\n // core props\n 'selection-box-color': '#ddd',\n 'selection-box-opacity': 0.65,\n 'selection-box-border-color': '#aaa',\n 'selection-box-border-width': 1,\n 'active-bg-color': 'black',\n 'active-bg-opacity': 0.15,\n 'active-bg-size': 30,\n 'outside-texture-bg-color': '#000',\n 'outside-texture-bg-opacity': 0.125,\n // common node/edge props\n 'events': 'yes',\n 'text-events': 'no',\n 'text-valign': 'top',\n 'text-halign': 'center',\n 'text-justification': 'auto',\n 'line-height': 1,\n 'color': '#000',\n 'text-outline-color': '#000',\n 'text-outline-width': 0,\n 'text-outline-opacity': 1,\n 'text-opacity': 1,\n 'text-decoration': 'none',\n 'text-transform': 'none',\n 'text-wrap': 'none',\n 'text-overflow-wrap': 'whitespace',\n 'text-max-width': 9999,\n 'text-background-color': '#000',\n 'text-background-opacity': 0,\n 'text-background-shape': 'rectangle',\n 'text-background-padding': 0,\n 'text-border-opacity': 0,\n 'text-border-width': 0,\n 'text-border-style': 'solid',\n 'text-border-color': '#000',\n 'font-family': 'Helvetica Neue, Helvetica, sans-serif',\n 'font-style': 'normal',\n 'font-weight': 'normal',\n 'font-size': 16,\n 'min-zoomed-font-size': 0,\n 'text-rotation': 'none',\n 'source-text-rotation': 'none',\n 'target-text-rotation': 'none',\n 'visibility': 'visible',\n 'display': 'element',\n 'opacity': 1,\n 'z-compound-depth': 'auto',\n 'z-index-compare': 'auto',\n 'z-index': 0,\n 'label': '',\n 'text-margin-x': 0,\n 'text-margin-y': 0,\n 'source-label': '',\n 'source-text-offset': 0,\n 'source-text-margin-x': 0,\n 'source-text-margin-y': 0,\n 'target-label': '',\n 'target-text-offset': 0,\n 'target-text-margin-x': 0,\n 'target-text-margin-y': 0,\n 'overlay-opacity': 0,\n 'overlay-color': '#000',\n 'overlay-padding': 10,\n 'overlay-shape': 'round-rectangle',\n 'overlay-corner-radius': 'auto',\n 'underlay-opacity': 0,\n 'underlay-color': '#000',\n 'underlay-padding': 10,\n 'underlay-shape': 'round-rectangle',\n 'underlay-corner-radius': 'auto',\n 'transition-property': 'none',\n 'transition-duration': 0,\n 'transition-delay': 0,\n 'transition-timing-function': 'linear',\n // node props\n 'background-blacken': 0,\n 'background-color': '#999',\n 'background-fill': 'solid',\n 'background-opacity': 1,\n 'background-image': 'none',\n 'background-image-crossorigin': 'anonymous',\n 'background-image-opacity': 1,\n 'background-image-containment': 'inside',\n 'background-image-smoothing': 'yes',\n 'background-position-x': '50%',\n 'background-position-y': '50%',\n 'background-offset-x': 0,\n 'background-offset-y': 0,\n 'background-width-relative-to': 'include-padding',\n 'background-height-relative-to': 'include-padding',\n 'background-repeat': 'no-repeat',\n 'background-fit': 'none',\n 'background-clip': 'node',\n 'background-width': 'auto',\n 'background-height': 'auto',\n 'border-color': '#000',\n 'border-opacity': 1,\n 'border-width': 0,\n 'border-style': 'solid',\n 'border-dash-pattern': [4, 2],\n 'border-dash-offset': 0,\n 'border-cap': 'butt',\n 'border-join': 'miter',\n 'border-position': 'center',\n 'outline-color': '#999',\n 'outline-opacity': 1,\n 'outline-width': 0,\n 'outline-offset': 0,\n 'outline-style': 'solid',\n 'height': 30,\n 'width': 30,\n 'shape': 'ellipse',\n 'shape-polygon-points': '-1, -1, 1, -1, 1, 1, -1, 1',\n 'corner-radius': 'auto',\n 'bounds-expansion': 0,\n // node gradient\n 'background-gradient-direction': 'to-bottom',\n 'background-gradient-stop-colors': '#999',\n 'background-gradient-stop-positions': '0%',\n // ghost props\n 'ghost': 'no',\n 'ghost-offset-y': 0,\n 'ghost-offset-x': 0,\n 'ghost-opacity': 0,\n // compound props\n 'padding': 0,\n 'padding-relative-to': 'width',\n 'position': 'origin',\n 'compound-sizing-wrt-labels': 'include',\n 'min-width': 0,\n 'min-width-bias-left': 0,\n 'min-width-bias-right': 0,\n 'min-height': 0,\n 'min-height-bias-top': 0,\n 'min-height-bias-bottom': 0\n }, {\n // node pie bg\n 'pie-size': '100%'\n }, [{\n name: 'pie-{{i}}-background-color',\n value: 'black'\n }, {\n name: 'pie-{{i}}-background-size',\n value: '0%'\n }, {\n name: 'pie-{{i}}-background-opacity',\n value: 1\n }].reduce(function (css, prop) {\n for (var i = 1; i <= styfn$2.pieBackgroundN; i++) {\n var name = prop.name.replace('{{i}}', i);\n var val = prop.value;\n css[name] = val;\n }\n return css;\n }, {}), {\n // edge props\n 'line-style': 'solid',\n 'line-color': '#999',\n 'line-fill': 'solid',\n 'line-cap': 'butt',\n 'line-opacity': 1,\n 'line-outline-width': 0,\n 'line-outline-color': '#000',\n 'line-gradient-stop-colors': '#999',\n 'line-gradient-stop-positions': '0%',\n 'control-point-step-size': 40,\n 'control-point-weights': 0.5,\n 'segment-weights': 0.5,\n 'segment-distances': 20,\n 'segment-radii': 15,\n 'radius-type': 'arc-radius',\n 'taxi-turn': '50%',\n 'taxi-radius': 15,\n 'taxi-turn-min-distance': 10,\n 'taxi-direction': 'auto',\n 'edge-distances': 'intersection',\n 'curve-style': 'haystack',\n 'haystack-radius': 0,\n 'arrow-scale': 1,\n 'loop-direction': '-45deg',\n 'loop-sweep': '-90deg',\n 'source-distance-from-node': 0,\n 'target-distance-from-node': 0,\n 'source-endpoint': 'outside-to-node',\n 'target-endpoint': 'outside-to-node',\n 'line-dash-pattern': [6, 3],\n 'line-dash-offset': 0\n }, [{\n name: 'arrow-shape',\n value: 'none'\n }, {\n name: 'arrow-color',\n value: '#999'\n }, {\n name: 'arrow-fill',\n value: 'filled'\n }, {\n name: 'arrow-width',\n value: 1\n }].reduce(function (css, prop) {\n styfn$2.arrowPrefixes.forEach(function (prefix) {\n var name = prefix + '-' + prop.name;\n var val = prop.value;\n css[name] = val;\n });\n return css;\n }, {}));\n var parsedProps = {};\n for (var i = 0; i < this.properties.length; i++) {\n var prop = this.properties[i];\n if (prop.pointsTo) {\n continue;\n }\n var name = prop.name;\n var val = rawProps[name];\n var parsedProp = this.parse(name, val);\n parsedProps[name] = parsedProp;\n }\n _p.defaultProperties = parsedProps;\n return _p.defaultProperties;\n};\nstyfn$2.addDefaultStylesheet = function () {\n this.selector(':parent').css({\n 'shape': 'rectangle',\n 'padding': 10,\n 'background-color': '#eee',\n 'border-color': '#ccc',\n 'border-width': 1\n }).selector('edge').css({\n 'width': 3\n }).selector(':loop').css({\n 'curve-style': 'bezier'\n }).selector('edge:compound').css({\n 'curve-style': 'bezier',\n 'source-endpoint': 'outside-to-line',\n 'target-endpoint': 'outside-to-line'\n }).selector(':selected').css({\n 'background-color': '#0169D9',\n 'line-color': '#0169D9',\n 'source-arrow-color': '#0169D9',\n 'target-arrow-color': '#0169D9',\n 'mid-source-arrow-color': '#0169D9',\n 'mid-target-arrow-color': '#0169D9'\n }).selector(':parent:selected').css({\n 'background-color': '#CCE1F9',\n 'border-color': '#aec8e5'\n }).selector(':active').css({\n 'overlay-color': 'black',\n 'overlay-padding': 10,\n 'overlay-opacity': 0.25\n });\n this.defaultLength = this.length;\n};\n\nvar styfn$1 = {};\n\n// a caching layer for property parsing\nstyfn$1.parse = function (name, value, propIsBypass, propIsFlat) {\n var self = this;\n\n // function values can't be cached in all cases, and there isn't much benefit of caching them anyway\n if (fn$6(value)) {\n return self.parseImplWarn(name, value, propIsBypass, propIsFlat);\n }\n var flatKey = propIsFlat === 'mapping' || propIsFlat === true || propIsFlat === false || propIsFlat == null ? 'dontcare' : propIsFlat;\n var bypassKey = propIsBypass ? 't' : 'f';\n var valueKey = '' + value;\n var argHash = hashStrings(name, valueKey, bypassKey, flatKey);\n var propCache = self.propCache = self.propCache || [];\n var ret;\n if (!(ret = propCache[argHash])) {\n ret = propCache[argHash] = self.parseImplWarn(name, value, propIsBypass, propIsFlat);\n }\n\n // - bypasses can't be shared b/c the value can be changed by animations or otherwise overridden\n // - mappings can't be shared b/c mappings are per-element\n if (propIsBypass || propIsFlat === 'mapping') {\n // need a copy since props are mutated later in their lifecycles\n ret = copy(ret);\n if (ret) {\n ret.value = copy(ret.value); // because it could be an array, e.g. colour\n }\n }\n\n return ret;\n};\nstyfn$1.parseImplWarn = function (name, value, propIsBypass, propIsFlat) {\n var prop = this.parseImpl(name, value, propIsBypass, propIsFlat);\n if (!prop && value != null) {\n warn(\"The style property `\".concat(name, \": \").concat(value, \"` is invalid\"));\n }\n if (prop && (prop.name === 'width' || prop.name === 'height') && value === 'label') {\n warn('The style value of `label` is deprecated for `' + prop.name + '`');\n }\n return prop;\n};\n\n// parse a property; return null on invalid; return parsed property otherwise\n// fields :\n// - name : the name of the property\n// - value : the parsed, native-typed value of the property\n// - strValue : a string value that represents the property value in valid css\n// - bypass : true iff the property is a bypass property\nstyfn$1.parseImpl = function (name, value, propIsBypass, propIsFlat) {\n var self = this;\n name = camel2dash(name); // make sure the property name is in dash form (e.g. 'property-name' not 'propertyName')\n\n var property = self.properties[name];\n var passedValue = value;\n var types = self.types;\n if (!property) {\n return null;\n } // return null on property of unknown name\n if (value === undefined) {\n return null;\n } // can't assign undefined\n\n // the property may be an alias\n if (property.alias) {\n property = property.pointsTo;\n name = property.name;\n }\n var valueIsString = string(value);\n if (valueIsString) {\n // trim the value to make parsing easier\n value = value.trim();\n }\n var type = property.type;\n if (!type) {\n return null;\n } // no type, no luck\n\n // check if bypass is null or empty string (i.e. indication to delete bypass property)\n if (propIsBypass && (value === '' || value === null)) {\n return {\n name: name,\n value: value,\n bypass: true,\n deleteBypass: true\n };\n }\n\n // check if value is a function used as a mapper\n if (fn$6(value)) {\n return {\n name: name,\n value: value,\n strValue: 'fn',\n mapped: types.fn,\n bypass: propIsBypass\n };\n }\n\n // check if value is mapped\n var data, mapData;\n if (!valueIsString || propIsFlat || value.length < 7 || value[1] !== 'a') ; else if (value.length >= 7 && value[0] === 'd' && (data = new RegExp(types.data.regex).exec(value))) {\n if (propIsBypass) {\n return false;\n } // mappers not allowed in bypass\n\n var mapped = types.data;\n return {\n name: name,\n value: data,\n strValue: '' + value,\n mapped: mapped,\n field: data[1],\n bypass: propIsBypass\n };\n } else if (value.length >= 10 && value[0] === 'm' && (mapData = new RegExp(types.mapData.regex).exec(value))) {\n if (propIsBypass) {\n return false;\n } // mappers not allowed in bypass\n if (type.multiple) {\n return false;\n } // impossible to map to num\n\n var _mapped = types.mapData;\n\n // we can map only if the type is a colour or a number\n if (!(type.color || type.number)) {\n return false;\n }\n var valueMin = this.parse(name, mapData[4]); // parse to validate\n if (!valueMin || valueMin.mapped) {\n return false;\n } // can't be invalid or mapped\n\n var valueMax = this.parse(name, mapData[5]); // parse to validate\n if (!valueMax || valueMax.mapped) {\n return false;\n } // can't be invalid or mapped\n\n // check if valueMin and valueMax are the same\n if (valueMin.pfValue === valueMax.pfValue || valueMin.strValue === valueMax.strValue) {\n warn('`' + name + ': ' + value + '` is not a valid mapper because the output range is zero; converting to `' + name + ': ' + valueMin.strValue + '`');\n return this.parse(name, valueMin.strValue); // can't make much of a mapper without a range\n } else if (type.color) {\n var c1 = valueMin.value;\n var c2 = valueMax.value;\n var same = c1[0] === c2[0] // red\n && c1[1] === c2[1] // green\n && c1[2] === c2[2] // blue\n && (\n // optional alpha\n c1[3] === c2[3] // same alpha outright\n || (c1[3] == null || c1[3] === 1 // full opacity for colour 1?\n ) && (c2[3] == null || c2[3] === 1) // full opacity for colour 2?\n );\n\n if (same) {\n return false;\n } // can't make a mapper without a range\n }\n\n return {\n name: name,\n value: mapData,\n strValue: '' + value,\n mapped: _mapped,\n field: mapData[1],\n fieldMin: parseFloat(mapData[2]),\n // min & max are numeric\n fieldMax: parseFloat(mapData[3]),\n valueMin: valueMin.value,\n valueMax: valueMax.value,\n bypass: propIsBypass\n };\n }\n if (type.multiple && propIsFlat !== 'multiple') {\n var vals;\n if (valueIsString) {\n vals = value.split(/\\s+/);\n } else if (array(value)) {\n vals = value;\n } else {\n vals = [value];\n }\n if (type.evenMultiple && vals.length % 2 !== 0) {\n return null;\n }\n var valArr = [];\n var unitsArr = [];\n var pfValArr = [];\n var strVal = '';\n var hasEnum = false;\n for (var i = 0; i < vals.length; i++) {\n var p = self.parse(name, vals[i], propIsBypass, 'multiple');\n hasEnum = hasEnum || string(p.value);\n valArr.push(p.value);\n pfValArr.push(p.pfValue != null ? p.pfValue : p.value);\n unitsArr.push(p.units);\n strVal += (i > 0 ? ' ' : '') + p.strValue;\n }\n if (type.validate && !type.validate(valArr, unitsArr)) {\n return null;\n }\n if (type.singleEnum && hasEnum) {\n if (valArr.length === 1 && string(valArr[0])) {\n return {\n name: name,\n value: valArr[0],\n strValue: valArr[0],\n bypass: propIsBypass\n };\n } else {\n return null;\n }\n }\n return {\n name: name,\n value: valArr,\n pfValue: pfValArr,\n strValue: strVal,\n bypass: propIsBypass,\n units: unitsArr\n };\n }\n\n // several types also allow enums\n var checkEnums = function checkEnums() {\n for (var _i = 0; _i < type.enums.length; _i++) {\n var en = type.enums[_i];\n if (en === value) {\n return {\n name: name,\n value: value,\n strValue: '' + value,\n bypass: propIsBypass\n };\n }\n }\n return null;\n };\n\n // check the type and return the appropriate object\n if (type.number) {\n var units;\n var implicitUnits = 'px'; // not set => px\n\n if (type.units) {\n // use specified units if set\n units = type.units;\n }\n if (type.implicitUnits) {\n implicitUnits = type.implicitUnits;\n }\n if (!type.unitless) {\n if (valueIsString) {\n var unitsRegex = 'px|em' + (type.allowPercent ? '|\\\\%' : '');\n if (units) {\n unitsRegex = units;\n } // only allow explicit units if so set\n var match = value.match('^(' + number + ')(' + unitsRegex + ')?' + '$');\n if (match) {\n value = match[1];\n units = match[2] || implicitUnits;\n }\n } else if (!units || type.implicitUnits) {\n units = implicitUnits; // implicitly px if unspecified\n }\n }\n\n value = parseFloat(value);\n\n // if not a number and enums not allowed, then the value is invalid\n if (isNaN(value) && type.enums === undefined) {\n return null;\n }\n\n // check if this number type also accepts special keywords in place of numbers\n // (i.e. `left`, `auto`, etc)\n if (isNaN(value) && type.enums !== undefined) {\n value = passedValue;\n return checkEnums();\n }\n\n // check if value must be an integer\n if (type.integer && !integer(value)) {\n return null;\n }\n\n // check value is within range\n if (type.min !== undefined && (value < type.min || type.strictMin && value === type.min) || type.max !== undefined && (value > type.max || type.strictMax && value === type.max)) {\n return null;\n }\n var ret = {\n name: name,\n value: value,\n strValue: '' + value + (units ? units : ''),\n units: units,\n bypass: propIsBypass\n };\n\n // normalise value in pixels\n if (type.unitless || units !== 'px' && units !== 'em') {\n ret.pfValue = value;\n } else {\n ret.pfValue = units === 'px' || !units ? value : this.getEmSizeInPixels() * value;\n }\n\n // normalise value in ms\n if (units === 'ms' || units === 's') {\n ret.pfValue = units === 'ms' ? value : 1000 * value;\n }\n\n // normalise value in rad\n if (units === 'deg' || units === 'rad') {\n ret.pfValue = units === 'rad' ? value : deg2rad(value);\n }\n\n // normalize value in %\n if (units === '%') {\n ret.pfValue = value / 100;\n }\n return ret;\n } else if (type.propList) {\n var props = [];\n var propsStr = '' + value;\n if (propsStr === 'none') ; else {\n // go over each prop\n\n var propsSplit = propsStr.split(/\\s*,\\s*|\\s+/);\n for (var _i2 = 0; _i2 < propsSplit.length; _i2++) {\n var propName = propsSplit[_i2].trim();\n if (self.properties[propName]) {\n props.push(propName);\n } else {\n warn('`' + propName + '` is not a valid property name');\n }\n }\n if (props.length === 0) {\n return null;\n }\n }\n return {\n name: name,\n value: props,\n strValue: props.length === 0 ? 'none' : props.join(' '),\n bypass: propIsBypass\n };\n } else if (type.color) {\n var tuple = color2tuple(value);\n if (!tuple) {\n return null;\n }\n return {\n name: name,\n value: tuple,\n pfValue: tuple,\n strValue: 'rgb(' + tuple[0] + ',' + tuple[1] + ',' + tuple[2] + ')',\n // n.b. no spaces b/c of multiple support\n bypass: propIsBypass\n };\n } else if (type.regex || type.regexes) {\n // first check enums\n if (type.enums) {\n var enumProp = checkEnums();\n if (enumProp) {\n return enumProp;\n }\n }\n var regexes = type.regexes ? type.regexes : [type.regex];\n for (var _i3 = 0; _i3 < regexes.length; _i3++) {\n var regex = new RegExp(regexes[_i3]); // make a regex from the type string\n var m = regex.exec(value);\n if (m) {\n // regex matches\n return {\n name: name,\n value: type.singleRegexMatchValue ? m[1] : m,\n strValue: '' + value,\n bypass: propIsBypass\n };\n }\n }\n return null; // didn't match any\n } else if (type.string) {\n // just return\n return {\n name: name,\n value: '' + value,\n strValue: '' + value,\n bypass: propIsBypass\n };\n } else if (type.enums) {\n // check enums last because it's a combo type in others\n return checkEnums();\n } else {\n return null; // not a type we can handle\n }\n};\n\nvar Style = function Style(cy) {\n if (!(this instanceof Style)) {\n return new Style(cy);\n }\n if (!core(cy)) {\n error('A style must have a core reference');\n return;\n }\n this._private = {\n cy: cy,\n coreStyle: {}\n };\n this.length = 0;\n this.resetToDefault();\n};\nvar styfn = Style.prototype;\nstyfn.instanceString = function () {\n return 'style';\n};\n\n// remove all contexts\nstyfn.clear = function () {\n var _p = this._private;\n var cy = _p.cy;\n var eles = cy.elements();\n for (var i = 0; i < this.length; i++) {\n this[i] = undefined;\n }\n this.length = 0;\n _p.contextStyles = {};\n _p.propDiffs = {};\n this.cleanElements(eles, true);\n eles.forEach(function (ele) {\n var ele_p = ele[0]._private;\n ele_p.styleDirty = true;\n ele_p.appliedInitStyle = false;\n });\n return this; // chaining\n};\n\nstyfn.resetToDefault = function () {\n this.clear();\n this.addDefaultStylesheet();\n return this;\n};\n\n// builds a style object for the 'core' selector\nstyfn.core = function (propName) {\n return this._private.coreStyle[propName] || this.getDefaultProperty(propName);\n};\n\n// create a new context from the specified selector string and switch to that context\nstyfn.selector = function (selectorStr) {\n // 'core' is a special case and does not need a selector\n var selector = selectorStr === 'core' ? null : new Selector(selectorStr);\n var i = this.length++; // new context means new index\n this[i] = {\n selector: selector,\n properties: [],\n mappedProperties: [],\n index: i\n };\n return this; // chaining\n};\n\n// add one or many css rules to the current context\nstyfn.css = function () {\n var self = this;\n var args = arguments;\n if (args.length === 1) {\n var map = args[0];\n for (var i = 0; i < self.properties.length; i++) {\n var prop = self.properties[i];\n var mapVal = map[prop.name];\n if (mapVal === undefined) {\n mapVal = map[dash2camel(prop.name)];\n }\n if (mapVal !== undefined) {\n this.cssRule(prop.name, mapVal);\n }\n }\n } else if (args.length === 2) {\n this.cssRule(args[0], args[1]);\n }\n\n // do nothing if args are invalid\n\n return this; // chaining\n};\n\nstyfn.style = styfn.css;\n\n// add a single css rule to the current context\nstyfn.cssRule = function (name, value) {\n // name-value pair\n var property = this.parse(name, value);\n\n // add property to current context if valid\n if (property) {\n var i = this.length - 1;\n this[i].properties.push(property);\n this[i].properties[property.name] = property; // allow access by name as well\n\n if (property.name.match(/pie-(\\d+)-background-size/) && property.value) {\n this._private.hasPie = true;\n }\n if (property.mapped) {\n this[i].mappedProperties.push(property);\n }\n\n // add to core style if necessary\n var currentSelectorIsCore = !this[i].selector;\n if (currentSelectorIsCore) {\n this._private.coreStyle[property.name] = property;\n }\n }\n return this; // chaining\n};\n\nstyfn.append = function (style) {\n if (stylesheet(style)) {\n style.appendToStyle(this);\n } else if (array(style)) {\n this.appendFromJson(style);\n } else if (string(style)) {\n this.appendFromString(style);\n } // you probably wouldn't want to append a Style, since you'd duplicate the default parts\n\n return this;\n};\n\n// static function\nStyle.fromJson = function (cy, json) {\n var style = new Style(cy);\n style.fromJson(json);\n return style;\n};\nStyle.fromString = function (cy, string) {\n return new Style(cy).fromString(string);\n};\n[styfn$8, styfn$7, styfn$6, styfn$5, styfn$4, styfn$3, styfn$2, styfn$1].forEach(function (props) {\n extend(styfn, props);\n});\nStyle.types = styfn.types;\nStyle.properties = styfn.properties;\nStyle.propertyGroups = styfn.propertyGroups;\nStyle.propertyGroupNames = styfn.propertyGroupNames;\nStyle.propertyGroupKeys = styfn.propertyGroupKeys;\n\nvar corefn$2 = {\n style: function style(newStyle) {\n if (newStyle) {\n var s = this.setStyle(newStyle);\n s.update();\n }\n return this._private.style;\n },\n setStyle: function setStyle(style) {\n var _p = this._private;\n if (stylesheet(style)) {\n _p.style = style.generateStyle(this);\n } else if (array(style)) {\n _p.style = Style.fromJson(this, style);\n } else if (string(style)) {\n _p.style = Style.fromString(this, style);\n } else {\n _p.style = Style(this);\n }\n return _p.style;\n },\n // e.g. cy.data() changed => recalc ele mappers\n updateStyle: function updateStyle() {\n this.mutableElements().updateStyle(); // just send to all eles\n }\n};\n\nvar defaultSelectionType = 'single';\nvar corefn$1 = {\n autolock: function autolock(bool) {\n if (bool !== undefined) {\n this._private.autolock = bool ? true : false;\n } else {\n return this._private.autolock;\n }\n return this; // chaining\n },\n\n autoungrabify: function autoungrabify(bool) {\n if (bool !== undefined) {\n this._private.autoungrabify = bool ? true : false;\n } else {\n return this._private.autoungrabify;\n }\n return this; // chaining\n },\n\n autounselectify: function autounselectify(bool) {\n if (bool !== undefined) {\n this._private.autounselectify = bool ? true : false;\n } else {\n return this._private.autounselectify;\n }\n return this; // chaining\n },\n\n selectionType: function selectionType(selType) {\n var _p = this._private;\n if (_p.selectionType == null) {\n _p.selectionType = defaultSelectionType;\n }\n if (selType !== undefined) {\n if (selType === 'additive' || selType === 'single') {\n _p.selectionType = selType;\n }\n } else {\n return _p.selectionType;\n }\n return this;\n },\n panningEnabled: function panningEnabled(bool) {\n if (bool !== undefined) {\n this._private.panningEnabled = bool ? true : false;\n } else {\n return this._private.panningEnabled;\n }\n return this; // chaining\n },\n\n userPanningEnabled: function userPanningEnabled(bool) {\n if (bool !== undefined) {\n this._private.userPanningEnabled = bool ? true : false;\n } else {\n return this._private.userPanningEnabled;\n }\n return this; // chaining\n },\n\n zoomingEnabled: function zoomingEnabled(bool) {\n if (bool !== undefined) {\n this._private.zoomingEnabled = bool ? true : false;\n } else {\n return this._private.zoomingEnabled;\n }\n return this; // chaining\n },\n\n userZoomingEnabled: function userZoomingEnabled(bool) {\n if (bool !== undefined) {\n this._private.userZoomingEnabled = bool ? true : false;\n } else {\n return this._private.userZoomingEnabled;\n }\n return this; // chaining\n },\n\n boxSelectionEnabled: function boxSelectionEnabled(bool) {\n if (bool !== undefined) {\n this._private.boxSelectionEnabled = bool ? true : false;\n } else {\n return this._private.boxSelectionEnabled;\n }\n return this; // chaining\n },\n\n pan: function pan() {\n var args = arguments;\n var pan = this._private.pan;\n var dim, val, dims, x, y;\n switch (args.length) {\n case 0:\n // .pan()\n return pan;\n case 1:\n if (string(args[0])) {\n // .pan('x')\n dim = args[0];\n return pan[dim];\n } else if (plainObject(args[0])) {\n // .pan({ x: 0, y: 100 })\n if (!this._private.panningEnabled) {\n return this;\n }\n dims = args[0];\n x = dims.x;\n y = dims.y;\n if (number$1(x)) {\n pan.x = x;\n }\n if (number$1(y)) {\n pan.y = y;\n }\n this.emit('pan viewport');\n }\n break;\n case 2:\n // .pan('x', 100)\n if (!this._private.panningEnabled) {\n return this;\n }\n dim = args[0];\n val = args[1];\n if ((dim === 'x' || dim === 'y') && number$1(val)) {\n pan[dim] = val;\n }\n this.emit('pan viewport');\n break;\n // invalid\n }\n\n this.notify('viewport');\n return this; // chaining\n },\n\n panBy: function panBy(arg0, arg1) {\n var args = arguments;\n var pan = this._private.pan;\n var dim, val, dims, x, y;\n if (!this._private.panningEnabled) {\n return this;\n }\n switch (args.length) {\n case 1:\n if (plainObject(arg0)) {\n // .panBy({ x: 0, y: 100 })\n dims = args[0];\n x = dims.x;\n y = dims.y;\n if (number$1(x)) {\n pan.x += x;\n }\n if (number$1(y)) {\n pan.y += y;\n }\n this.emit('pan viewport');\n }\n break;\n case 2:\n // .panBy('x', 100)\n dim = arg0;\n val = arg1;\n if ((dim === 'x' || dim === 'y') && number$1(val)) {\n pan[dim] += val;\n }\n this.emit('pan viewport');\n break;\n // invalid\n }\n\n this.notify('viewport');\n return this; // chaining\n },\n\n fit: function fit(elements, padding) {\n var viewportState = this.getFitViewport(elements, padding);\n if (viewportState) {\n var _p = this._private;\n _p.zoom = viewportState.zoom;\n _p.pan = viewportState.pan;\n this.emit('pan zoom viewport');\n this.notify('viewport');\n }\n return this; // chaining\n },\n\n getFitViewport: function getFitViewport(elements, padding) {\n if (number$1(elements) && padding === undefined) {\n // elements is optional\n padding = elements;\n elements = undefined;\n }\n if (!this._private.panningEnabled || !this._private.zoomingEnabled) {\n return;\n }\n var bb;\n if (string(elements)) {\n var sel = elements;\n elements = this.$(sel);\n } else if (boundingBox(elements)) {\n // assume bb\n var bbe = elements;\n bb = {\n x1: bbe.x1,\n y1: bbe.y1,\n x2: bbe.x2,\n y2: bbe.y2\n };\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n } else if (!elementOrCollection(elements)) {\n elements = this.mutableElements();\n }\n if (elementOrCollection(elements) && elements.empty()) {\n return;\n } // can't fit to nothing\n\n bb = bb || elements.boundingBox();\n var w = this.width();\n var h = this.height();\n var zoom;\n padding = number$1(padding) ? padding : 0;\n if (!isNaN(w) && !isNaN(h) && w > 0 && h > 0 && !isNaN(bb.w) && !isNaN(bb.h) && bb.w > 0 && bb.h > 0) {\n zoom = Math.min((w - 2 * padding) / bb.w, (h - 2 * padding) / bb.h);\n\n // crop zoom\n zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom;\n zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom;\n var pan = {\n // now pan to middle\n x: (w - zoom * (bb.x1 + bb.x2)) / 2,\n y: (h - zoom * (bb.y1 + bb.y2)) / 2\n };\n return {\n zoom: zoom,\n pan: pan\n };\n }\n return;\n },\n zoomRange: function zoomRange(min, max) {\n var _p = this._private;\n if (max == null) {\n var opts = min;\n min = opts.min;\n max = opts.max;\n }\n if (number$1(min) && number$1(max) && min <= max) {\n _p.minZoom = min;\n _p.maxZoom = max;\n } else if (number$1(min) && max === undefined && min <= _p.maxZoom) {\n _p.minZoom = min;\n } else if (number$1(max) && min === undefined && max >= _p.minZoom) {\n _p.maxZoom = max;\n }\n return this;\n },\n minZoom: function minZoom(zoom) {\n if (zoom === undefined) {\n return this._private.minZoom;\n } else {\n return this.zoomRange({\n min: zoom\n });\n }\n },\n maxZoom: function maxZoom(zoom) {\n if (zoom === undefined) {\n return this._private.maxZoom;\n } else {\n return this.zoomRange({\n max: zoom\n });\n }\n },\n getZoomedViewport: function getZoomedViewport(params) {\n var _p = this._private;\n var currentPan = _p.pan;\n var currentZoom = _p.zoom;\n var pos; // in rendered px\n var zoom;\n var bail = false;\n if (!_p.zoomingEnabled) {\n // zooming disabled\n bail = true;\n }\n if (number$1(params)) {\n // then set the zoom\n zoom = params;\n } else if (plainObject(params)) {\n // then zoom about a point\n zoom = params.level;\n if (params.position != null) {\n pos = modelToRenderedPosition(params.position, currentZoom, currentPan);\n } else if (params.renderedPosition != null) {\n pos = params.renderedPosition;\n }\n if (pos != null && !_p.panningEnabled) {\n // panning disabled\n bail = true;\n }\n }\n\n // crop zoom\n zoom = zoom > _p.maxZoom ? _p.maxZoom : zoom;\n zoom = zoom < _p.minZoom ? _p.minZoom : zoom;\n\n // can't zoom with invalid params\n if (bail || !number$1(zoom) || zoom === currentZoom || pos != null && (!number$1(pos.x) || !number$1(pos.y))) {\n return null;\n }\n if (pos != null) {\n // set zoom about position\n var pan1 = currentPan;\n var zoom1 = currentZoom;\n var zoom2 = zoom;\n var pan2 = {\n x: -zoom2 / zoom1 * (pos.x - pan1.x) + pos.x,\n y: -zoom2 / zoom1 * (pos.y - pan1.y) + pos.y\n };\n return {\n zoomed: true,\n panned: true,\n zoom: zoom2,\n pan: pan2\n };\n } else {\n // just set the zoom\n return {\n zoomed: true,\n panned: false,\n zoom: zoom,\n pan: currentPan\n };\n }\n },\n zoom: function zoom(params) {\n if (params === undefined) {\n // get\n return this._private.zoom;\n } else {\n // set\n var vp = this.getZoomedViewport(params);\n var _p = this._private;\n if (vp == null || !vp.zoomed) {\n return this;\n }\n _p.zoom = vp.zoom;\n if (vp.panned) {\n _p.pan.x = vp.pan.x;\n _p.pan.y = vp.pan.y;\n }\n this.emit('zoom' + (vp.panned ? ' pan' : '') + ' viewport');\n this.notify('viewport');\n return this; // chaining\n }\n },\n\n viewport: function viewport(opts) {\n var _p = this._private;\n var zoomDefd = true;\n var panDefd = true;\n var events = []; // to trigger\n var zoomFailed = false;\n var panFailed = false;\n if (!opts) {\n return this;\n }\n if (!number$1(opts.zoom)) {\n zoomDefd = false;\n }\n if (!plainObject(opts.pan)) {\n panDefd = false;\n }\n if (!zoomDefd && !panDefd) {\n return this;\n }\n if (zoomDefd) {\n var z = opts.zoom;\n if (z < _p.minZoom || z > _p.maxZoom || !_p.zoomingEnabled) {\n zoomFailed = true;\n } else {\n _p.zoom = z;\n events.push('zoom');\n }\n }\n if (panDefd && (!zoomFailed || !opts.cancelOnFailedZoom) && _p.panningEnabled) {\n var p = opts.pan;\n if (number$1(p.x)) {\n _p.pan.x = p.x;\n panFailed = false;\n }\n if (number$1(p.y)) {\n _p.pan.y = p.y;\n panFailed = false;\n }\n if (!panFailed) {\n events.push('pan');\n }\n }\n if (events.length > 0) {\n events.push('viewport');\n this.emit(events.join(' '));\n this.notify('viewport');\n }\n return this; // chaining\n },\n\n center: function center(elements) {\n var pan = this.getCenterPan(elements);\n if (pan) {\n this._private.pan = pan;\n this.emit('pan viewport');\n this.notify('viewport');\n }\n return this; // chaining\n },\n\n getCenterPan: function getCenterPan(elements, zoom) {\n if (!this._private.panningEnabled) {\n return;\n }\n if (string(elements)) {\n var selector = elements;\n elements = this.mutableElements().filter(selector);\n } else if (!elementOrCollection(elements)) {\n elements = this.mutableElements();\n }\n if (elements.length === 0) {\n return;\n } // can't centre pan to nothing\n\n var bb = elements.boundingBox();\n var w = this.width();\n var h = this.height();\n zoom = zoom === undefined ? this._private.zoom : zoom;\n var pan = {\n // middle\n x: (w - zoom * (bb.x1 + bb.x2)) / 2,\n y: (h - zoom * (bb.y1 + bb.y2)) / 2\n };\n return pan;\n },\n reset: function reset() {\n if (!this._private.panningEnabled || !this._private.zoomingEnabled) {\n return this;\n }\n this.viewport({\n pan: {\n x: 0,\n y: 0\n },\n zoom: 1\n });\n return this; // chaining\n },\n\n invalidateSize: function invalidateSize() {\n this._private.sizeCache = null;\n },\n size: function size() {\n var _p = this._private;\n var container = _p.container;\n var cy = this;\n return _p.sizeCache = _p.sizeCache || (container ? function () {\n var style = cy.window().getComputedStyle(container);\n var val = function val(name) {\n return parseFloat(style.getPropertyValue(name));\n };\n return {\n width: container.clientWidth - val('padding-left') - val('padding-right'),\n height: container.clientHeight - val('padding-top') - val('padding-bottom')\n };\n }() : {\n // fallback if no container (not 0 b/c can be used for dividing etc)\n width: 1,\n height: 1\n });\n },\n width: function width() {\n return this.size().width;\n },\n height: function height() {\n return this.size().height;\n },\n extent: function extent() {\n var pan = this._private.pan;\n var zoom = this._private.zoom;\n var rb = this.renderedExtent();\n var b = {\n x1: (rb.x1 - pan.x) / zoom,\n x2: (rb.x2 - pan.x) / zoom,\n y1: (rb.y1 - pan.y) / zoom,\n y2: (rb.y2 - pan.y) / zoom\n };\n b.w = b.x2 - b.x1;\n b.h = b.y2 - b.y1;\n return b;\n },\n renderedExtent: function renderedExtent() {\n var width = this.width();\n var height = this.height();\n return {\n x1: 0,\n y1: 0,\n x2: width,\n y2: height,\n w: width,\n h: height\n };\n },\n multiClickDebounceTime: function multiClickDebounceTime(_int) {\n if (_int) this._private.multiClickDebounceTime = _int;else return this._private.multiClickDebounceTime;\n return this; // chaining\n }\n};\n\n// aliases\ncorefn$1.centre = corefn$1.center;\n\n// backwards compatibility\ncorefn$1.autolockNodes = corefn$1.autolock;\ncorefn$1.autoungrabifyNodes = corefn$1.autoungrabify;\n\nvar fn = {\n data: define.data({\n field: 'data',\n bindingEvent: 'data',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'data',\n settingTriggersEvent: true,\n triggerFnName: 'trigger',\n allowGetting: true,\n updateStyle: true\n }),\n removeData: define.removeData({\n field: 'data',\n event: 'data',\n triggerFnName: 'trigger',\n triggerEvent: true,\n updateStyle: true\n }),\n scratch: define.data({\n field: 'scratch',\n bindingEvent: 'scratch',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'scratch',\n settingTriggersEvent: true,\n triggerFnName: 'trigger',\n allowGetting: true,\n updateStyle: true\n }),\n removeScratch: define.removeData({\n field: 'scratch',\n event: 'scratch',\n triggerFnName: 'trigger',\n triggerEvent: true,\n updateStyle: true\n })\n};\n\n// aliases\nfn.attr = fn.data;\nfn.removeAttr = fn.removeData;\n\nvar Core = function Core(opts) {\n var cy = this;\n opts = extend({}, opts);\n var container = opts.container;\n\n // allow for passing a wrapped jquery object\n // e.g. cytoscape({ container: $('#cy') })\n if (container && !htmlElement(container) && htmlElement(container[0])) {\n container = container[0];\n }\n var reg = container ? container._cyreg : null; // e.g. already registered some info (e.g. readies) via jquery\n reg = reg || {};\n if (reg && reg.cy) {\n reg.cy.destroy();\n reg = {}; // old instance => replace reg completely\n }\n\n var readies = reg.readies = reg.readies || [];\n if (container) {\n container._cyreg = reg;\n } // make sure container assoc'd reg points to this cy\n reg.cy = cy;\n var head = _window !== undefined && container !== undefined && !opts.headless;\n var options = opts;\n options.layout = extend({\n name: head ? 'grid' : 'null'\n }, options.layout);\n options.renderer = extend({\n name: head ? 'canvas' : 'null'\n }, options.renderer);\n var defVal = function defVal(def, val, altVal) {\n if (val !== undefined) {\n return val;\n } else if (altVal !== undefined) {\n return altVal;\n } else {\n return def;\n }\n };\n var _p = this._private = {\n container: container,\n // html dom ele container\n ready: false,\n // whether ready has been triggered\n options: options,\n // cached options\n elements: new Collection(this),\n // elements in the graph\n listeners: [],\n // list of listeners\n aniEles: new Collection(this),\n // elements being animated\n data: options.data || {},\n // data for the core\n scratch: {},\n // scratch object for core\n layout: null,\n renderer: null,\n destroyed: false,\n // whether destroy was called\n notificationsEnabled: true,\n // whether notifications are sent to the renderer\n minZoom: 1e-50,\n maxZoom: 1e50,\n zoomingEnabled: defVal(true, options.zoomingEnabled),\n userZoomingEnabled: defVal(true, options.userZoomingEnabled),\n panningEnabled: defVal(true, options.panningEnabled),\n userPanningEnabled: defVal(true, options.userPanningEnabled),\n boxSelectionEnabled: defVal(true, options.boxSelectionEnabled),\n autolock: defVal(false, options.autolock, options.autolockNodes),\n autoungrabify: defVal(false, options.autoungrabify, options.autoungrabifyNodes),\n autounselectify: defVal(false, options.autounselectify),\n styleEnabled: options.styleEnabled === undefined ? head : options.styleEnabled,\n zoom: number$1(options.zoom) ? options.zoom : 1,\n pan: {\n x: plainObject(options.pan) && number$1(options.pan.x) ? options.pan.x : 0,\n y: plainObject(options.pan) && number$1(options.pan.y) ? options.pan.y : 0\n },\n animation: {\n // object for currently-running animations\n current: [],\n queue: []\n },\n hasCompoundNodes: false,\n multiClickDebounceTime: defVal(250, options.multiClickDebounceTime)\n };\n this.createEmitter();\n\n // set selection type\n this.selectionType(options.selectionType);\n\n // init zoom bounds\n this.zoomRange({\n min: options.minZoom,\n max: options.maxZoom\n });\n var loadExtData = function loadExtData(extData, next) {\n var anyIsPromise = extData.some(promise);\n if (anyIsPromise) {\n return Promise$1.all(extData).then(next); // load all data asynchronously, then exec rest of init\n } else {\n next(extData); // exec synchronously for convenience\n }\n };\n\n // start with the default stylesheet so we have something before loading an external stylesheet\n if (_p.styleEnabled) {\n cy.setStyle([]);\n }\n\n // create the renderer\n var rendererOptions = extend({}, options, options.renderer); // allow rendering hints in top level options\n cy.initRenderer(rendererOptions);\n var setElesAndLayout = function setElesAndLayout(elements, onload, ondone) {\n cy.notifications(false);\n\n // remove old elements\n var oldEles = cy.mutableElements();\n if (oldEles.length > 0) {\n oldEles.remove();\n }\n if (elements != null) {\n if (plainObject(elements) || array(elements)) {\n cy.add(elements);\n }\n }\n cy.one('layoutready', function (e) {\n cy.notifications(true);\n cy.emit(e); // we missed this event by turning notifications off, so pass it on\n\n cy.one('load', onload);\n cy.emitAndNotify('load');\n }).one('layoutstop', function () {\n cy.one('done', ondone);\n cy.emit('done');\n });\n var layoutOpts = extend({}, cy._private.options.layout);\n layoutOpts.eles = cy.elements();\n cy.layout(layoutOpts).run();\n };\n loadExtData([options.style, options.elements], function (thens) {\n var initStyle = thens[0];\n var initEles = thens[1];\n\n // init style\n if (_p.styleEnabled) {\n cy.style().append(initStyle);\n }\n\n // initial load\n setElesAndLayout(initEles, function () {\n // onready\n cy.startAnimationLoop();\n _p.ready = true;\n\n // if a ready callback is specified as an option, the bind it\n if (fn$6(options.ready)) {\n cy.on('ready', options.ready);\n }\n\n // bind all the ready handlers registered before creating this instance\n for (var i = 0; i < readies.length; i++) {\n var fn = readies[i];\n cy.on('ready', fn);\n }\n if (reg) {\n reg.readies = [];\n } // clear b/c we've bound them all and don't want to keep it around in case a new core uses the same div etc\n\n cy.emit('ready');\n }, options.done);\n });\n};\nvar corefn = Core.prototype; // short alias\n\nextend(corefn, {\n instanceString: function instanceString() {\n return 'core';\n },\n isReady: function isReady() {\n return this._private.ready;\n },\n destroyed: function destroyed() {\n return this._private.destroyed;\n },\n ready: function ready(fn) {\n if (this.isReady()) {\n this.emitter().emit('ready', [], fn); // just calls fn as though triggered via ready event\n } else {\n this.on('ready', fn);\n }\n return this;\n },\n destroy: function destroy() {\n var cy = this;\n if (cy.destroyed()) return;\n cy.stopAnimationLoop();\n cy.destroyRenderer();\n this.emit('destroy');\n cy._private.destroyed = true;\n return cy;\n },\n hasElementWithId: function hasElementWithId(id) {\n return this._private.elements.hasElementWithId(id);\n },\n getElementById: function getElementById(id) {\n return this._private.elements.getElementById(id);\n },\n hasCompoundNodes: function hasCompoundNodes() {\n return this._private.hasCompoundNodes;\n },\n headless: function headless() {\n return this._private.renderer.isHeadless();\n },\n styleEnabled: function styleEnabled() {\n return this._private.styleEnabled;\n },\n addToPool: function addToPool(eles) {\n this._private.elements.merge(eles);\n return this; // chaining\n },\n\n removeFromPool: function removeFromPool(eles) {\n this._private.elements.unmerge(eles);\n return this;\n },\n container: function container() {\n return this._private.container || null;\n },\n window: function window() {\n var container = this._private.container;\n if (container == null) return _window;\n var ownerDocument = this._private.container.ownerDocument;\n if (ownerDocument === undefined || ownerDocument == null) {\n return _window;\n }\n return ownerDocument.defaultView || _window;\n },\n mount: function mount(container) {\n if (container == null) {\n return;\n }\n var cy = this;\n var _p = cy._private;\n var options = _p.options;\n if (!htmlElement(container) && htmlElement(container[0])) {\n container = container[0];\n }\n cy.stopAnimationLoop();\n cy.destroyRenderer();\n _p.container = container;\n _p.styleEnabled = true;\n cy.invalidateSize();\n cy.initRenderer(extend({}, options, options.renderer, {\n // allow custom renderer name to be re-used, otherwise use canvas\n name: options.renderer.name === 'null' ? 'canvas' : options.renderer.name\n }));\n cy.startAnimationLoop();\n cy.style(options.style);\n cy.emit('mount');\n return cy;\n },\n unmount: function unmount() {\n var cy = this;\n cy.stopAnimationLoop();\n cy.destroyRenderer();\n cy.initRenderer({\n name: 'null'\n });\n cy.emit('unmount');\n return cy;\n },\n options: function options() {\n return copy(this._private.options);\n },\n json: function json(obj) {\n var cy = this;\n var _p = cy._private;\n var eles = cy.mutableElements();\n var getFreshRef = function getFreshRef(ele) {\n return cy.getElementById(ele.id());\n };\n if (plainObject(obj)) {\n // set\n\n cy.startBatch();\n if (obj.elements) {\n var idInJson = {};\n var updateEles = function updateEles(jsons, gr) {\n var toAdd = [];\n var toMod = [];\n for (var i = 0; i < jsons.length; i++) {\n var json = jsons[i];\n if (!json.data.id) {\n warn('cy.json() cannot handle elements without an ID attribute');\n continue;\n }\n var id = '' + json.data.id; // id must be string\n var ele = cy.getElementById(id);\n idInJson[id] = true;\n if (ele.length !== 0) {\n // existing element should be updated\n toMod.push({\n ele: ele,\n json: json\n });\n } else {\n // otherwise should be added\n if (gr) {\n json.group = gr;\n toAdd.push(json);\n } else {\n toAdd.push(json);\n }\n }\n }\n cy.add(toAdd);\n for (var _i = 0; _i < toMod.length; _i++) {\n var _toMod$_i = toMod[_i],\n _ele = _toMod$_i.ele,\n _json = _toMod$_i.json;\n _ele.json(_json);\n }\n };\n if (array(obj.elements)) {\n // elements: []\n updateEles(obj.elements);\n } else {\n // elements: { nodes: [], edges: [] }\n var grs = ['nodes', 'edges'];\n for (var i = 0; i < grs.length; i++) {\n var gr = grs[i];\n var elements = obj.elements[gr];\n if (array(elements)) {\n updateEles(elements, gr);\n }\n }\n }\n var parentsToRemove = cy.collection();\n eles.filter(function (ele) {\n return !idInJson[ele.id()];\n }).forEach(function (ele) {\n if (ele.isParent()) {\n parentsToRemove.merge(ele);\n } else {\n ele.remove();\n }\n });\n\n // so that children are not removed w/parent\n parentsToRemove.forEach(function (ele) {\n return ele.children().move({\n parent: null\n });\n });\n\n // intermediate parents may be moved by prior line, so make sure we remove by fresh refs\n parentsToRemove.forEach(function (ele) {\n return getFreshRef(ele).remove();\n });\n }\n if (obj.style) {\n cy.style(obj.style);\n }\n if (obj.zoom != null && obj.zoom !== _p.zoom) {\n cy.zoom(obj.zoom);\n }\n if (obj.pan) {\n if (obj.pan.x !== _p.pan.x || obj.pan.y !== _p.pan.y) {\n cy.pan(obj.pan);\n }\n }\n if (obj.data) {\n cy.data(obj.data);\n }\n var fields = ['minZoom', 'maxZoom', 'zoomingEnabled', 'userZoomingEnabled', 'panningEnabled', 'userPanningEnabled', 'boxSelectionEnabled', 'autolock', 'autoungrabify', 'autounselectify', 'multiClickDebounceTime'];\n for (var _i2 = 0; _i2 < fields.length; _i2++) {\n var f = fields[_i2];\n if (obj[f] != null) {\n cy[f](obj[f]);\n }\n }\n cy.endBatch();\n return this; // chaining\n } else {\n // get\n var flat = !!obj;\n var json = {};\n if (flat) {\n json.elements = this.elements().map(function (ele) {\n return ele.json();\n });\n } else {\n json.elements = {};\n eles.forEach(function (ele) {\n var group = ele.group();\n if (!json.elements[group]) {\n json.elements[group] = [];\n }\n json.elements[group].push(ele.json());\n });\n }\n if (this._private.styleEnabled) {\n json.style = cy.style().json();\n }\n json.data = copy(cy.data());\n var options = _p.options;\n json.zoomingEnabled = _p.zoomingEnabled;\n json.userZoomingEnabled = _p.userZoomingEnabled;\n json.zoom = _p.zoom;\n json.minZoom = _p.minZoom;\n json.maxZoom = _p.maxZoom;\n json.panningEnabled = _p.panningEnabled;\n json.userPanningEnabled = _p.userPanningEnabled;\n json.pan = copy(_p.pan);\n json.boxSelectionEnabled = _p.boxSelectionEnabled;\n json.renderer = copy(options.renderer);\n json.hideEdgesOnViewport = options.hideEdgesOnViewport;\n json.textureOnViewport = options.textureOnViewport;\n json.wheelSensitivity = options.wheelSensitivity;\n json.motionBlur = options.motionBlur;\n json.multiClickDebounceTime = options.multiClickDebounceTime;\n return json;\n }\n }\n});\ncorefn.$id = corefn.getElementById;\n[corefn$9, corefn$8, elesfn, corefn$7, corefn$6, corefn$5, corefn$4, corefn$3, corefn$2, corefn$1, fn].forEach(function (props) {\n extend(corefn, props);\n});\n\n/* eslint-disable no-unused-vars */\nvar defaults$7 = {\n fit: true,\n // whether to fit the viewport to the graph\n directed: false,\n // whether the tree is directed downwards (or edges can point in any direction if false)\n padding: 30,\n // padding on fit\n circle: false,\n // put depths in concentric circles if true, put depths top down if false\n grid: false,\n // whether to create an even grid into which the DAG is placed (circle:false only)\n spacingFactor: 1.75,\n // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap)\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n avoidOverlap: true,\n // prevents node overlap, may overflow boundingBox if not enough space\n nodeDimensionsIncludeLabels: false,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n roots: undefined,\n // the roots of the trees\n depthSort: undefined,\n // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') }\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled,\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts\n};\n\nvar deprecatedOptionDefaults = {\n maximal: false,\n // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only); setting acyclic to true sets maximal to true also\n acyclic: false // whether the tree is acyclic and thus a node could be shifted (due to the maximal option) multiple times without causing an infinite loop; setting to true sets maximal to true also; if you are uncertain whether a tree is acyclic, set to false to avoid potential infinite loops\n};\n\n/* eslint-enable */\n\nvar getInfo = function getInfo(ele) {\n return ele.scratch('breadthfirst');\n};\nvar setInfo = function setInfo(ele, obj) {\n return ele.scratch('breadthfirst', obj);\n};\nfunction BreadthFirstLayout(options) {\n this.options = extend({}, defaults$7, deprecatedOptionDefaults, options);\n}\nBreadthFirstLayout.prototype.run = function () {\n var params = this.options;\n var options = params;\n var cy = params.cy;\n var eles = options.eles;\n var nodes = eles.nodes().filter(function (n) {\n return !n.isParent();\n });\n var graph = eles;\n var directed = options.directed;\n var maximal = options.acyclic || options.maximal || options.maximalAdjustments > 0; // maximalAdjustments for compat. w/ old code; also, setting acyclic to true sets maximal to true\n\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var roots;\n if (elementOrCollection(options.roots)) {\n roots = options.roots;\n } else if (array(options.roots)) {\n var rootsArray = [];\n for (var i = 0; i < options.roots.length; i++) {\n var id = options.roots[i];\n var ele = cy.getElementById(id);\n rootsArray.push(ele);\n }\n roots = cy.collection(rootsArray);\n } else if (string(options.roots)) {\n roots = cy.$(options.roots);\n } else {\n if (directed) {\n roots = nodes.roots();\n } else {\n var components = eles.components();\n roots = cy.collection();\n var _loop = function _loop(_i) {\n var comp = components[_i];\n var maxDegree = comp.maxDegree(false);\n var compRoots = comp.filter(function (ele) {\n return ele.degree(false) === maxDegree;\n });\n roots = roots.add(compRoots);\n };\n for (var _i = 0; _i < components.length; _i++) {\n _loop(_i);\n }\n }\n }\n var depths = [];\n var foundByBfs = {};\n var addToDepth = function addToDepth(ele, d) {\n if (depths[d] == null) {\n depths[d] = [];\n }\n var i = depths[d].length;\n depths[d].push(ele);\n setInfo(ele, {\n index: i,\n depth: d\n });\n };\n var changeDepth = function changeDepth(ele, newDepth) {\n var _getInfo = getInfo(ele),\n depth = _getInfo.depth,\n index = _getInfo.index;\n depths[depth][index] = null;\n addToDepth(ele, newDepth);\n };\n\n // find the depths of the nodes\n graph.bfs({\n roots: roots,\n directed: options.directed,\n visit: function visit(node, edge, pNode, i, depth) {\n var ele = node[0];\n var id = ele.id();\n addToDepth(ele, depth);\n foundByBfs[id] = true;\n }\n });\n\n // check for nodes not found by bfs\n var orphanNodes = [];\n for (var _i2 = 0; _i2 < nodes.length; _i2++) {\n var _ele = nodes[_i2];\n if (foundByBfs[_ele.id()]) {\n continue;\n } else {\n orphanNodes.push(_ele);\n }\n }\n\n // assign the nodes a depth and index\n\n var assignDepthsAt = function assignDepthsAt(i) {\n var eles = depths[i];\n for (var j = 0; j < eles.length; j++) {\n var _ele2 = eles[j];\n if (_ele2 == null) {\n eles.splice(j, 1);\n j--;\n continue;\n }\n setInfo(_ele2, {\n depth: i,\n index: j\n });\n }\n };\n var assignDepths = function assignDepths() {\n for (var _i3 = 0; _i3 < depths.length; _i3++) {\n assignDepthsAt(_i3);\n }\n };\n var adjustMaximally = function adjustMaximally(ele, shifted) {\n var eInfo = getInfo(ele);\n var incomers = ele.incomers().filter(function (el) {\n return el.isNode() && eles.has(el);\n });\n var maxDepth = -1;\n var id = ele.id();\n for (var k = 0; k < incomers.length; k++) {\n var incmr = incomers[k];\n var iInfo = getInfo(incmr);\n maxDepth = Math.max(maxDepth, iInfo.depth);\n }\n if (eInfo.depth <= maxDepth) {\n if (!options.acyclic && shifted[id]) {\n return null;\n }\n var newDepth = maxDepth + 1;\n changeDepth(ele, newDepth);\n shifted[id] = newDepth;\n return true;\n }\n return false;\n };\n\n // for the directed case, try to make the edges all go down (i.e. depth i => depth i + 1)\n if (directed && maximal) {\n var Q = [];\n var shifted = {};\n var enqueue = function enqueue(n) {\n return Q.push(n);\n };\n var dequeue = function dequeue() {\n return Q.shift();\n };\n nodes.forEach(function (n) {\n return Q.push(n);\n });\n while (Q.length > 0) {\n var _ele3 = dequeue();\n var didShift = adjustMaximally(_ele3, shifted);\n if (didShift) {\n _ele3.outgoers().filter(function (el) {\n return el.isNode() && eles.has(el);\n }).forEach(enqueue);\n } else if (didShift === null) {\n warn('Detected double maximal shift for node `' + _ele3.id() + '`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.');\n break; // exit on failure\n }\n }\n }\n\n assignDepths(); // clear holes\n\n // find min distance we need to leave between nodes\n var minDistance = 0;\n if (options.avoidOverlap) {\n for (var _i4 = 0; _i4 < nodes.length; _i4++) {\n var n = nodes[_i4];\n var nbb = n.layoutDimensions(options);\n var w = nbb.w;\n var h = nbb.h;\n minDistance = Math.max(minDistance, w, h);\n }\n }\n\n // get the weighted percent for an element based on its connectivity to other levels\n var cachedWeightedPercent = {};\n var getWeightedPercent = function getWeightedPercent(ele) {\n if (cachedWeightedPercent[ele.id()]) {\n return cachedWeightedPercent[ele.id()];\n }\n var eleDepth = getInfo(ele).depth;\n var neighbors = ele.neighborhood();\n var percent = 0;\n var samples = 0;\n for (var _i5 = 0; _i5 < neighbors.length; _i5++) {\n var neighbor = neighbors[_i5];\n if (neighbor.isEdge() || neighbor.isParent() || !nodes.has(neighbor)) {\n continue;\n }\n var bf = getInfo(neighbor);\n if (bf == null) {\n continue;\n }\n var index = bf.index;\n var depth = bf.depth;\n\n // unassigned neighbours shouldn't affect the ordering\n if (index == null || depth == null) {\n continue;\n }\n var nDepth = depths[depth].length;\n if (depth < eleDepth) {\n // only get influenced by elements above\n percent += index / nDepth;\n samples++;\n }\n }\n samples = Math.max(1, samples);\n percent = percent / samples;\n if (samples === 0) {\n // put lone nodes at the start\n percent = 0;\n }\n cachedWeightedPercent[ele.id()] = percent;\n return percent;\n };\n\n // rearrange the indices in each depth level based on connectivity\n\n var sortFn = function sortFn(a, b) {\n var apct = getWeightedPercent(a);\n var bpct = getWeightedPercent(b);\n var diff = apct - bpct;\n if (diff === 0) {\n return ascending(a.id(), b.id()); // make sure sort doesn't have don't-care comparisons\n } else {\n return diff;\n }\n };\n if (options.depthSort !== undefined) {\n sortFn = options.depthSort;\n }\n\n // sort each level to make connected nodes closer\n for (var _i6 = 0; _i6 < depths.length; _i6++) {\n depths[_i6].sort(sortFn);\n assignDepthsAt(_i6);\n }\n\n // assign orphan nodes to a new top-level depth\n var orphanDepth = [];\n for (var _i7 = 0; _i7 < orphanNodes.length; _i7++) {\n orphanDepth.push(orphanNodes[_i7]);\n }\n depths.unshift(orphanDepth);\n assignDepths();\n var biggestDepthSize = 0;\n for (var _i8 = 0; _i8 < depths.length; _i8++) {\n biggestDepthSize = Math.max(depths[_i8].length, biggestDepthSize);\n }\n var center = {\n x: bb.x1 + bb.w / 2,\n y: bb.x1 + bb.h / 2\n };\n var maxDepthSize = depths.reduce(function (max, eles) {\n return Math.max(max, eles.length);\n }, 0);\n var getPosition = function getPosition(ele) {\n var _getInfo2 = getInfo(ele),\n depth = _getInfo2.depth,\n index = _getInfo2.index;\n var depthSize = depths[depth].length;\n var distanceX = Math.max(bb.w / ((options.grid ? maxDepthSize : depthSize) + 1), minDistance);\n var distanceY = Math.max(bb.h / (depths.length + 1), minDistance);\n var radiusStepSize = Math.min(bb.w / 2 / depths.length, bb.h / 2 / depths.length);\n radiusStepSize = Math.max(radiusStepSize, minDistance);\n if (!options.circle) {\n var epos = {\n x: center.x + (index + 1 - (depthSize + 1) / 2) * distanceX,\n y: (depth + 1) * distanceY\n };\n return epos;\n } else {\n var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize / 2 : 0);\n var theta = 2 * Math.PI / depths[depth].length * index;\n if (depth === 0 && depths[0].length === 1) {\n radius = 1;\n }\n return {\n x: center.x + radius * Math.cos(theta),\n y: center.y + radius * Math.sin(theta)\n };\n }\n };\n eles.nodes().layoutPositions(this, options, getPosition);\n return this; // chaining\n};\n\nvar defaults$6 = {\n fit: true,\n // whether to fit the viewport to the graph\n padding: 30,\n // the padding on fit\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n avoidOverlap: true,\n // prevents node overlap, may overflow boundingBox and radius if not enough space\n nodeDimensionsIncludeLabels: false,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n spacingFactor: undefined,\n // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up\n radius: undefined,\n // the radius of the circle\n startAngle: 3 / 2 * Math.PI,\n // where nodes start in radians\n sweep: undefined,\n // how many radians should be between the first and last node (defaults to full circle)\n clockwise: true,\n // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false)\n sort: undefined,\n // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') }\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts \n};\n\nfunction CircleLayout(options) {\n this.options = extend({}, defaults$6, options);\n}\nCircleLayout.prototype.run = function () {\n var params = this.options;\n var options = params;\n var cy = params.cy;\n var eles = options.eles;\n var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise;\n var nodes = eles.nodes().not(':parent');\n if (options.sort) {\n nodes = nodes.sort(options.sort);\n }\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var center = {\n x: bb.x1 + bb.w / 2,\n y: bb.y1 + bb.h / 2\n };\n var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / nodes.length : options.sweep;\n var dTheta = sweep / Math.max(1, nodes.length - 1);\n var r;\n var minDistance = 0;\n for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n var nbb = n.layoutDimensions(options);\n var w = nbb.w;\n var h = nbb.h;\n minDistance = Math.max(minDistance, w, h);\n }\n if (number$1(options.radius)) {\n r = options.radius;\n } else if (nodes.length <= 1) {\n r = 0;\n } else {\n r = Math.min(bb.h, bb.w) / 2 - minDistance;\n }\n\n // calculate the radius\n if (nodes.length > 1 && options.avoidOverlap) {\n // but only if more than one node (can't overlap)\n minDistance *= 1.75; // just to have some nice spacing\n\n var dcos = Math.cos(dTheta) - Math.cos(0);\n var dsin = Math.sin(dTheta) - Math.sin(0);\n var rMin = Math.sqrt(minDistance * minDistance / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping\n r = Math.max(rMin, r);\n }\n var getPos = function getPos(ele, i) {\n var theta = options.startAngle + i * dTheta * (clockwise ? 1 : -1);\n var rx = r * Math.cos(theta);\n var ry = r * Math.sin(theta);\n var pos = {\n x: center.x + rx,\n y: center.y + ry\n };\n return pos;\n };\n eles.nodes().layoutPositions(this, options, getPos);\n return this; // chaining\n};\n\nvar defaults$5 = {\n fit: true,\n // whether to fit the viewport to the graph\n padding: 30,\n // the padding on fit\n startAngle: 3 / 2 * Math.PI,\n // where nodes start in radians\n sweep: undefined,\n // how many radians should be between the first and last node (defaults to full circle)\n clockwise: true,\n // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false)\n equidistant: false,\n // whether levels have an equal radial distance betwen them, may cause bounding box overflow\n minNodeSpacing: 10,\n // min spacing between outside of nodes (used for radius adjustment)\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n avoidOverlap: true,\n // prevents node overlap, may overflow boundingBox if not enough space\n nodeDimensionsIncludeLabels: false,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n height: undefined,\n // height of layout area (overrides container height)\n width: undefined,\n // width of layout area (overrides container width)\n spacingFactor: undefined,\n // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up\n concentric: function concentric(node) {\n // returns numeric value for each node, placing higher nodes in levels towards the centre\n return node.degree();\n },\n levelWidth: function levelWidth(nodes) {\n // the variation of concentric values in each level\n return nodes.maxDegree() / 4;\n },\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts\n};\n\nfunction ConcentricLayout(options) {\n this.options = extend({}, defaults$5, options);\n}\nConcentricLayout.prototype.run = function () {\n var params = this.options;\n var options = params;\n var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise;\n var cy = params.cy;\n var eles = options.eles;\n var nodes = eles.nodes().not(':parent');\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var center = {\n x: bb.x1 + bb.w / 2,\n y: bb.y1 + bb.h / 2\n };\n var nodeValues = []; // { node, value }\n var maxNodeSize = 0;\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var value = void 0;\n\n // calculate the node value\n value = options.concentric(node);\n nodeValues.push({\n value: value,\n node: node\n });\n\n // for style mapping\n node._private.scratch.concentric = value;\n }\n\n // in case we used the `concentric` in style\n nodes.updateStyle();\n\n // calculate max size now based on potentially updated mappers\n for (var _i = 0; _i < nodes.length; _i++) {\n var _node = nodes[_i];\n var nbb = _node.layoutDimensions(options);\n maxNodeSize = Math.max(maxNodeSize, nbb.w, nbb.h);\n }\n\n // sort node values in descreasing order\n nodeValues.sort(function (a, b) {\n return b.value - a.value;\n });\n var levelWidth = options.levelWidth(nodes);\n\n // put the values into levels\n var levels = [[]];\n var currentLevel = levels[0];\n for (var _i2 = 0; _i2 < nodeValues.length; _i2++) {\n var val = nodeValues[_i2];\n if (currentLevel.length > 0) {\n var diff = Math.abs(currentLevel[0].value - val.value);\n if (diff >= levelWidth) {\n currentLevel = [];\n levels.push(currentLevel);\n }\n }\n currentLevel.push(val);\n }\n\n // create positions from levels\n\n var minDist = maxNodeSize + options.minNodeSpacing; // min dist between nodes\n\n if (!options.avoidOverlap) {\n // then strictly constrain to bb\n var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1;\n var maxR = Math.min(bb.w, bb.h) / 2 - minDist;\n var rStep = maxR / (levels.length + firstLvlHasMulti ? 1 : 0);\n minDist = Math.min(minDist, rStep);\n }\n\n // find the metrics for each level\n var r = 0;\n for (var _i3 = 0; _i3 < levels.length; _i3++) {\n var level = levels[_i3];\n var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / level.length : options.sweep;\n var dTheta = level.dTheta = sweep / Math.max(1, level.length - 1);\n\n // calculate the radius\n if (level.length > 1 && options.avoidOverlap) {\n // but only if more than one node (can't overlap)\n var dcos = Math.cos(dTheta) - Math.cos(0);\n var dsin = Math.sin(dTheta) - Math.sin(0);\n var rMin = Math.sqrt(minDist * minDist / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping\n\n r = Math.max(rMin, r);\n }\n level.r = r;\n r += minDist;\n }\n if (options.equidistant) {\n var rDeltaMax = 0;\n var _r = 0;\n for (var _i4 = 0; _i4 < levels.length; _i4++) {\n var _level = levels[_i4];\n var rDelta = _level.r - _r;\n rDeltaMax = Math.max(rDeltaMax, rDelta);\n }\n _r = 0;\n for (var _i5 = 0; _i5 < levels.length; _i5++) {\n var _level2 = levels[_i5];\n if (_i5 === 0) {\n _r = _level2.r;\n }\n _level2.r = _r;\n _r += rDeltaMax;\n }\n }\n\n // calculate the node positions\n var pos = {}; // id => position\n for (var _i6 = 0; _i6 < levels.length; _i6++) {\n var _level3 = levels[_i6];\n var _dTheta = _level3.dTheta;\n var _r2 = _level3.r;\n for (var j = 0; j < _level3.length; j++) {\n var _val = _level3[j];\n var theta = options.startAngle + (clockwise ? 1 : -1) * _dTheta * j;\n var p = {\n x: center.x + _r2 * Math.cos(theta),\n y: center.y + _r2 * Math.sin(theta)\n };\n pos[_val.node.id()] = p;\n }\n }\n\n // position the nodes\n eles.nodes().layoutPositions(this, options, function (ele) {\n var id = ele.id();\n return pos[id];\n });\n return this; // chaining\n};\n\n/*\nThe CoSE layout was written by Gerardo Huck.\nhttps://www.linkedin.com/in/gerardohuck/\n\nBased on the following article:\nhttp://dl.acm.org/citation.cfm?id=1498047\n\nModifications tracked on Github.\n*/\nvar DEBUG;\n\n/**\n * @brief : default layout options\n */\nvar defaults$4 = {\n // Called on `layoutready`\n ready: function ready() {},\n // Called on `layoutstop`\n stop: function stop() {},\n // Whether to animate while running the layout\n // true : Animate continuously as the layout is running\n // false : Just show the end result\n // 'end' : Animate with the end result, from the initial positions to the end positions\n animate: true,\n // Easing of the animation for animate:'end'\n animationEasing: undefined,\n // The duration of the animation for animate:'end'\n animationDuration: undefined,\n // A function that determines whether the node should be animated\n // All nodes animated by default on animate enabled\n // Non-animated nodes are positioned immediately when the layout starts\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // The layout animates only after this many milliseconds for animate:true\n // (prevents flashing on fast runs)\n animationThreshold: 250,\n // Number of iterations between consecutive screen positions update\n refresh: 20,\n // Whether to fit the network view after when done\n fit: true,\n // Padding on fit\n padding: 30,\n // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n boundingBox: undefined,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n nodeDimensionsIncludeLabels: false,\n // Randomize the initial positions of the nodes (true) or use existing positions (false)\n randomize: false,\n // Extra spacing between components in non-compound graphs\n componentSpacing: 40,\n // Node repulsion (non overlapping) multiplier\n nodeRepulsion: function nodeRepulsion(node) {\n return 2048;\n },\n // Node repulsion (overlapping) multiplier\n nodeOverlap: 4,\n // Ideal edge (non nested) length\n idealEdgeLength: function idealEdgeLength(edge) {\n return 32;\n },\n // Divisor to compute edge forces\n edgeElasticity: function edgeElasticity(edge) {\n return 32;\n },\n // Nesting factor (multiplier) to compute ideal edge length for nested edges\n nestingFactor: 1.2,\n // Gravity force (constant)\n gravity: 1,\n // Maximum number of iterations to perform\n numIter: 1000,\n // Initial temperature (maximum node displacement)\n initialTemp: 1000,\n // Cooling factor (how the temperature is reduced between consecutive iterations\n coolingFactor: 0.99,\n // Lower temperature threshold (below this point the layout will end)\n minTemp: 1.0\n};\n\n/**\n * @brief : constructor\n * @arg options : object containing layout options\n */\nfunction CoseLayout(options) {\n this.options = extend({}, defaults$4, options);\n this.options.layout = this;\n\n // Exclude any edge that has a source or target node that is not in the set of passed-in nodes\n var nodes = this.options.eles.nodes();\n var edges = this.options.eles.edges();\n var notEdges = edges.filter(function (e) {\n var sourceId = e.source().data('id');\n var targetId = e.target().data('id');\n var hasSource = nodes.some(function (n) {\n return n.data('id') === sourceId;\n });\n var hasTarget = nodes.some(function (n) {\n return n.data('id') === targetId;\n });\n return !hasSource || !hasTarget;\n });\n this.options.eles = this.options.eles.not(notEdges);\n}\n\n/**\n * @brief : runs the layout\n */\nCoseLayout.prototype.run = function () {\n var options = this.options;\n var cy = options.cy;\n var layout = this;\n layout.stopped = false;\n if (options.animate === true || options.animate === false) {\n layout.emit({\n type: 'layoutstart',\n layout: layout\n });\n }\n\n // Set DEBUG - Global variable\n if (true === options.debug) {\n DEBUG = true;\n } else {\n DEBUG = false;\n }\n\n // Initialize layout info\n var layoutInfo = createLayoutInfo(cy, layout, options);\n\n // Show LayoutInfo contents if debugging\n if (DEBUG) {\n printLayoutInfo(layoutInfo);\n }\n\n // If required, randomize node positions\n if (options.randomize) {\n randomizePositions(layoutInfo);\n }\n var startTime = performanceNow();\n var refresh = function refresh() {\n refreshPositions(layoutInfo, cy, options);\n\n // Fit the graph if necessary\n if (true === options.fit) {\n cy.fit(options.padding);\n }\n };\n var mainLoop = function mainLoop(i) {\n if (layout.stopped || i >= options.numIter) {\n // logDebug(\"Layout manually stopped. Stopping computation in step \" + i);\n return false;\n }\n\n // Do one step in the phisical simulation\n step(layoutInfo, options);\n\n // Update temperature\n layoutInfo.temperature = layoutInfo.temperature * options.coolingFactor;\n // logDebug(\"New temperature: \" + layoutInfo.temperature);\n\n if (layoutInfo.temperature < options.minTemp) {\n // logDebug(\"Temperature drop below minimum threshold. Stopping computation in step \" + i);\n return false;\n }\n return true;\n };\n var done = function done() {\n if (options.animate === true || options.animate === false) {\n refresh();\n\n // Layout has finished\n layout.one('layoutstop', options.stop);\n layout.emit({\n type: 'layoutstop',\n layout: layout\n });\n } else {\n var nodes = options.eles.nodes();\n var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes);\n nodes.layoutPositions(layout, options, getScaledPos);\n }\n };\n var i = 0;\n var loopRet = true;\n if (options.animate === true) {\n var frame = function frame() {\n var f = 0;\n while (loopRet && f < options.refresh) {\n loopRet = mainLoop(i);\n i++;\n f++;\n }\n if (!loopRet) {\n // it's done\n separateComponents(layoutInfo, options);\n done();\n } else {\n var now = performanceNow();\n if (now - startTime >= options.animationThreshold) {\n refresh();\n }\n requestAnimationFrame(frame);\n }\n };\n frame();\n } else {\n while (loopRet) {\n loopRet = mainLoop(i);\n i++;\n }\n separateComponents(layoutInfo, options);\n done();\n }\n return this; // chaining\n};\n\n/**\n * @brief : called on continuous layouts to stop them before they finish\n */\nCoseLayout.prototype.stop = function () {\n this.stopped = true;\n if (this.thread) {\n this.thread.stop();\n }\n this.emit('layoutstop');\n return this; // chaining\n};\n\nCoseLayout.prototype.destroy = function () {\n if (this.thread) {\n this.thread.stop();\n }\n return this; // chaining\n};\n\n/**\n * @brief : Creates an object which is contains all the data\n * used in the layout process\n * @arg cy : cytoscape.js object\n * @return : layoutInfo object initialized\n */\nvar createLayoutInfo = function createLayoutInfo(cy, layout, options) {\n // Shortcut\n var edges = options.eles.edges();\n var nodes = options.eles.nodes();\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var layoutInfo = {\n isCompound: cy.hasCompoundNodes(),\n layoutNodes: [],\n idToIndex: {},\n nodeSize: nodes.size(),\n graphSet: [],\n indexToGraph: [],\n layoutEdges: [],\n edgeSize: edges.size(),\n temperature: options.initialTemp,\n clientWidth: bb.w,\n clientHeight: bb.h,\n boundingBox: bb\n };\n var components = options.eles.components();\n var id2cmptId = {};\n for (var i = 0; i < components.length; i++) {\n var component = components[i];\n for (var j = 0; j < component.length; j++) {\n var node = component[j];\n id2cmptId[node.id()] = i;\n }\n }\n\n // Iterate over all nodes, creating layout nodes\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = nodes[i];\n var nbb = n.layoutDimensions(options);\n var tempNode = {};\n tempNode.isLocked = n.locked();\n tempNode.id = n.data('id');\n tempNode.parentId = n.data('parent');\n tempNode.cmptId = id2cmptId[n.id()];\n tempNode.children = [];\n tempNode.positionX = n.position('x');\n tempNode.positionY = n.position('y');\n tempNode.offsetX = 0;\n tempNode.offsetY = 0;\n tempNode.height = nbb.w;\n tempNode.width = nbb.h;\n tempNode.maxX = tempNode.positionX + tempNode.width / 2;\n tempNode.minX = tempNode.positionX - tempNode.width / 2;\n tempNode.maxY = tempNode.positionY + tempNode.height / 2;\n tempNode.minY = tempNode.positionY - tempNode.height / 2;\n tempNode.padLeft = parseFloat(n.style('padding'));\n tempNode.padRight = parseFloat(n.style('padding'));\n tempNode.padTop = parseFloat(n.style('padding'));\n tempNode.padBottom = parseFloat(n.style('padding'));\n\n // forces\n tempNode.nodeRepulsion = fn$6(options.nodeRepulsion) ? options.nodeRepulsion(n) : options.nodeRepulsion;\n\n // Add new node\n layoutInfo.layoutNodes.push(tempNode);\n // Add entry to id-index map\n layoutInfo.idToIndex[tempNode.id] = i;\n }\n\n // Inline implementation of a queue, used for traversing the graph in BFS order\n var queue = [];\n var start = 0; // Points to the start the queue\n var end = -1; // Points to the end of the queue\n\n var tempGraph = [];\n\n // Second pass to add child information and\n // initialize queue for hierarchical traversal\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n var p_id = n.parentId;\n // Check if node n has a parent node\n if (null != p_id) {\n // Add node Id to parent's list of children\n layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id);\n } else {\n // If a node doesn't have a parent, then it's in the root graph\n queue[++end] = n.id;\n tempGraph.push(n.id);\n }\n }\n\n // Add root graph to graphSet\n layoutInfo.graphSet.push(tempGraph);\n\n // Traverse the graph, level by level,\n while (start <= end) {\n // Get the node to visit and remove it from queue\n var node_id = queue[start++];\n var node_ix = layoutInfo.idToIndex[node_id];\n var node = layoutInfo.layoutNodes[node_ix];\n var children = node.children;\n if (children.length > 0) {\n // Add children nodes as a new graph to graph set\n layoutInfo.graphSet.push(children);\n // Add children to que queue to be visited\n for (var i = 0; i < children.length; i++) {\n queue[++end] = children[i];\n }\n }\n }\n\n // Create indexToGraph map\n for (var i = 0; i < layoutInfo.graphSet.length; i++) {\n var graph = layoutInfo.graphSet[i];\n for (var j = 0; j < graph.length; j++) {\n var index = layoutInfo.idToIndex[graph[j]];\n layoutInfo.indexToGraph[index] = i;\n }\n }\n\n // Iterate over all edges, creating Layout Edges\n for (var i = 0; i < layoutInfo.edgeSize; i++) {\n var e = edges[i];\n var tempEdge = {};\n tempEdge.id = e.data('id');\n tempEdge.sourceId = e.data('source');\n tempEdge.targetId = e.data('target');\n\n // Compute ideal length\n var idealLength = fn$6(options.idealEdgeLength) ? options.idealEdgeLength(e) : options.idealEdgeLength;\n var elasticity = fn$6(options.edgeElasticity) ? options.edgeElasticity(e) : options.edgeElasticity;\n\n // Check if it's an inter graph edge\n var sourceIx = layoutInfo.idToIndex[tempEdge.sourceId];\n var targetIx = layoutInfo.idToIndex[tempEdge.targetId];\n var sourceGraph = layoutInfo.indexToGraph[sourceIx];\n var targetGraph = layoutInfo.indexToGraph[targetIx];\n if (sourceGraph != targetGraph) {\n // Find lowest common graph ancestor\n var lca = findLCA(tempEdge.sourceId, tempEdge.targetId, layoutInfo);\n\n // Compute sum of node depths, relative to lca graph\n var lcaGraph = layoutInfo.graphSet[lca];\n var depth = 0;\n\n // Source depth\n var tempNode = layoutInfo.layoutNodes[sourceIx];\n while (-1 === lcaGraph.indexOf(tempNode.id)) {\n tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]];\n depth++;\n }\n\n // Target depth\n tempNode = layoutInfo.layoutNodes[targetIx];\n while (-1 === lcaGraph.indexOf(tempNode.id)) {\n tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]];\n depth++;\n }\n\n // logDebug('LCA of nodes ' + tempEdge.sourceId + ' and ' + tempEdge.targetId +\n // \". Index: \" + lca + \" Contents: \" + lcaGraph.toString() +\n // \". Depth: \" + depth);\n\n // Update idealLength\n idealLength *= depth * options.nestingFactor;\n }\n tempEdge.idealLength = idealLength;\n tempEdge.elasticity = elasticity;\n layoutInfo.layoutEdges.push(tempEdge);\n }\n\n // Finally, return layoutInfo object\n return layoutInfo;\n};\n\n/**\n * @brief : This function finds the index of the lowest common\n * graph ancestor between 2 nodes in the subtree\n * (from the graph hierarchy induced tree) whose\n * root is graphIx\n *\n * @arg node1: node1's ID\n * @arg node2: node2's ID\n * @arg layoutInfo: layoutInfo object\n *\n */\nvar findLCA = function findLCA(node1, node2, layoutInfo) {\n // Find their common ancester, starting from the root graph\n var res = findLCA_aux(node1, node2, 0, layoutInfo);\n if (2 > res.count) {\n // If aux function couldn't find the common ancester,\n // then it is the root graph\n return 0;\n } else {\n return res.graph;\n }\n};\n\n/**\n * @brief : Auxiliary function used for LCA computation\n *\n * @arg node1 : node1's ID\n * @arg node2 : node2's ID\n * @arg graphIx : subgraph index\n * @arg layoutInfo : layoutInfo object\n *\n * @return : object of the form {count: X, graph: Y}, where:\n * X is the number of ancestors (max: 2) found in\n * graphIx (and it's subgraphs),\n * Y is the graph index of the lowest graph containing\n * all X nodes\n */\nvar findLCA_aux = function findLCA_aux(node1, node2, graphIx, layoutInfo) {\n var graph = layoutInfo.graphSet[graphIx];\n // If both nodes belongs to graphIx\n if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) {\n return {\n count: 2,\n graph: graphIx\n };\n }\n\n // Make recursive calls for all subgraphs\n var c = 0;\n for (var i = 0; i < graph.length; i++) {\n var nodeId = graph[i];\n var nodeIx = layoutInfo.idToIndex[nodeId];\n var children = layoutInfo.layoutNodes[nodeIx].children;\n\n // If the node has no child, skip it\n if (0 === children.length) {\n continue;\n }\n var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children[0]]];\n var result = findLCA_aux(node1, node2, childGraphIx, layoutInfo);\n if (0 === result.count) {\n // Neither node1 nor node2 are present in this subgraph\n continue;\n } else if (1 === result.count) {\n // One of (node1, node2) is present in this subgraph\n c++;\n if (2 === c) {\n // We've already found both nodes, no need to keep searching\n break;\n }\n } else {\n // Both nodes are present in this subgraph\n return result;\n }\n }\n return {\n count: c,\n graph: graphIx\n };\n};\n\n/**\n * @brief: printsLayoutInfo into js console\n * Only used for debbuging\n */\nvar printLayoutInfo; \n\n/**\n * @brief : Randomizes the position of all nodes\n */\nvar randomizePositions = function randomizePositions(layoutInfo, cy) {\n var width = layoutInfo.clientWidth;\n var height = layoutInfo.clientHeight;\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n\n // No need to randomize compound nodes or locked nodes\n if (0 === n.children.length && !n.isLocked) {\n n.positionX = Math.random() * width;\n n.positionY = Math.random() * height;\n }\n }\n};\nvar getScaleInBoundsFn = function getScaleInBoundsFn(layoutInfo, options, nodes) {\n var bb = layoutInfo.boundingBox;\n var coseBB = {\n x1: Infinity,\n x2: -Infinity,\n y1: Infinity,\n y2: -Infinity\n };\n if (options.boundingBox) {\n nodes.forEach(function (node) {\n var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[node.data('id')]];\n coseBB.x1 = Math.min(coseBB.x1, lnode.positionX);\n coseBB.x2 = Math.max(coseBB.x2, lnode.positionX);\n coseBB.y1 = Math.min(coseBB.y1, lnode.positionY);\n coseBB.y2 = Math.max(coseBB.y2, lnode.positionY);\n });\n coseBB.w = coseBB.x2 - coseBB.x1;\n coseBB.h = coseBB.y2 - coseBB.y1;\n }\n return function (ele, i) {\n var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[ele.data('id')]];\n if (options.boundingBox) {\n // then add extra bounding box constraint\n var pctX = (lnode.positionX - coseBB.x1) / coseBB.w;\n var pctY = (lnode.positionY - coseBB.y1) / coseBB.h;\n return {\n x: bb.x1 + pctX * bb.w,\n y: bb.y1 + pctY * bb.h\n };\n } else {\n return {\n x: lnode.positionX,\n y: lnode.positionY\n };\n }\n };\n};\n\n/**\n * @brief : Updates the positions of nodes in the network\n * @arg layoutInfo : LayoutInfo object\n * @arg cy : Cytoscape object\n * @arg options : Layout options\n */\nvar refreshPositions = function refreshPositions(layoutInfo, cy, options) {\n // var s = 'Refreshing positions';\n // logDebug(s);\n\n var layout = options.layout;\n var nodes = options.eles.nodes();\n var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes);\n nodes.positions(getScaledPos);\n\n // Trigger layoutReady only on first call\n if (true !== layoutInfo.ready) {\n // s = 'Triggering layoutready';\n // logDebug(s);\n layoutInfo.ready = true;\n layout.one('layoutready', options.ready);\n layout.emit({\n type: 'layoutready',\n layout: this\n });\n }\n};\n\n/**\n * @brief : Logs a debug message in JS console, if DEBUG is ON\n */\n// var logDebug = function(text) {\n// if (DEBUG) {\n// console.debug(text);\n// }\n// };\n\n/**\n * @brief : Performs one iteration of the physical simulation\n * @arg layoutInfo : LayoutInfo object already initialized\n * @arg cy : Cytoscape object\n * @arg options : Layout options\n */\nvar step = function step(layoutInfo, options, _step) {\n // var s = \"\\n\\n###############################\";\n // s += \"\\nSTEP: \" + step;\n // s += \"\\n###############################\\n\";\n // logDebug(s);\n\n // Calculate node repulsions\n calculateNodeForces(layoutInfo, options);\n // Calculate edge forces\n calculateEdgeForces(layoutInfo);\n // Calculate gravity forces\n calculateGravityForces(layoutInfo, options);\n // Propagate forces from parent to child\n propagateForces(layoutInfo);\n // Update positions based on calculated forces\n updatePositions(layoutInfo);\n};\n\n/**\n * @brief : Computes the node repulsion forces\n */\nvar calculateNodeForces = function calculateNodeForces(layoutInfo, options) {\n // Go through each of the graphs in graphSet\n // Nodes only repel each other if they belong to the same graph\n // var s = 'calculateNodeForces';\n // logDebug(s);\n for (var i = 0; i < layoutInfo.graphSet.length; i++) {\n var graph = layoutInfo.graphSet[i];\n var numNodes = graph.length;\n\n // s = \"Set: \" + graph.toString();\n // logDebug(s);\n\n // Now get all the pairs of nodes\n // Only get each pair once, (A, B) = (B, A)\n for (var j = 0; j < numNodes; j++) {\n var node1 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]];\n for (var k = j + 1; k < numNodes; k++) {\n var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[k]]];\n nodeRepulsion(node1, node2, layoutInfo, options);\n }\n }\n }\n};\nvar randomDistance = function randomDistance(max) {\n return -max + 2 * max * Math.random();\n};\n\n/**\n * @brief : Compute the node repulsion forces between a pair of nodes\n */\nvar nodeRepulsion = function nodeRepulsion(node1, node2, layoutInfo, options) {\n // var s = \"Node repulsion. Node1: \" + node1.id + \" Node2: \" + node2.id;\n\n var cmptId1 = node1.cmptId;\n var cmptId2 = node2.cmptId;\n if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) {\n return;\n }\n\n // Get direction of line connecting both node centers\n var directionX = node2.positionX - node1.positionX;\n var directionY = node2.positionY - node1.positionY;\n var maxRandDist = 1;\n // s += \"\\ndirectionX: \" + directionX + \", directionY: \" + directionY;\n\n // If both centers are the same, apply a random force\n if (0 === directionX && 0 === directionY) {\n directionX = randomDistance(maxRandDist);\n directionY = randomDistance(maxRandDist);\n }\n var overlap = nodesOverlap(node1, node2, directionX, directionY);\n if (overlap > 0) {\n // s += \"\\nNodes DO overlap.\";\n // s += \"\\nOverlap: \" + overlap;\n // If nodes overlap, repulsion force is proportional\n // to the overlap\n var force = options.nodeOverlap * overlap;\n\n // Compute the module and components of the force vector\n var distance = Math.sqrt(directionX * directionX + directionY * directionY);\n // s += \"\\nDistance: \" + distance;\n var forceX = force * directionX / distance;\n var forceY = force * directionY / distance;\n } else {\n // s += \"\\nNodes do NOT overlap.\";\n // If there's no overlap, force is inversely proportional\n // to squared distance\n\n // Get clipping points for both nodes\n var point1 = findClippingPoint(node1, directionX, directionY);\n var point2 = findClippingPoint(node2, -1 * directionX, -1 * directionY);\n\n // Use clipping points to compute distance\n var distanceX = point2.x - point1.x;\n var distanceY = point2.y - point1.y;\n var distanceSqr = distanceX * distanceX + distanceY * distanceY;\n var distance = Math.sqrt(distanceSqr);\n // s += \"\\nDistance: \" + distance;\n\n // Compute the module and components of the force vector\n var force = (node1.nodeRepulsion + node2.nodeRepulsion) / distanceSqr;\n var forceX = force * distanceX / distance;\n var forceY = force * distanceY / distance;\n }\n\n // Apply force\n if (!node1.isLocked) {\n node1.offsetX -= forceX;\n node1.offsetY -= forceY;\n }\n if (!node2.isLocked) {\n node2.offsetX += forceX;\n node2.offsetY += forceY;\n }\n\n // s += \"\\nForceX: \" + forceX + \" ForceY: \" + forceY;\n // logDebug(s);\n\n return;\n};\n\n/**\n * @brief : Determines whether two nodes overlap or not\n * @return : Amount of overlapping (0 => no overlap)\n */\nvar nodesOverlap = function nodesOverlap(node1, node2, dX, dY) {\n if (dX > 0) {\n var overlapX = node1.maxX - node2.minX;\n } else {\n var overlapX = node2.maxX - node1.minX;\n }\n if (dY > 0) {\n var overlapY = node1.maxY - node2.minY;\n } else {\n var overlapY = node2.maxY - node1.minY;\n }\n if (overlapX >= 0 && overlapY >= 0) {\n return Math.sqrt(overlapX * overlapX + overlapY * overlapY);\n } else {\n return 0;\n }\n};\n\n/**\n * @brief : Finds the point in which an edge (direction dX, dY) intersects\n * the rectangular bounding box of it's source/target node\n */\nvar findClippingPoint = function findClippingPoint(node, dX, dY) {\n // Shorcuts\n var X = node.positionX;\n var Y = node.positionY;\n var H = node.height || 1;\n var W = node.width || 1;\n var dirSlope = dY / dX;\n var nodeSlope = H / W;\n\n // var s = 'Computing clipping point of node ' + node.id +\n // \" . Height: \" + H + \", Width: \" + W +\n // \"\\nDirection \" + dX + \", \" + dY;\n //\n // Compute intersection\n var res = {};\n\n // Case: Vertical direction (up)\n if (0 === dX && 0 < dY) {\n res.x = X;\n // s += \"\\nUp direction\";\n res.y = Y + H / 2;\n return res;\n }\n\n // Case: Vertical direction (down)\n if (0 === dX && 0 > dY) {\n res.x = X;\n res.y = Y + H / 2;\n // s += \"\\nDown direction\";\n\n return res;\n }\n\n // Case: Intersects the right border\n if (0 < dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) {\n res.x = X + W / 2;\n res.y = Y + W * dY / 2 / dX;\n // s += \"\\nRightborder\";\n\n return res;\n }\n\n // Case: Intersects the left border\n if (0 > dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) {\n res.x = X - W / 2;\n res.y = Y - W * dY / 2 / dX;\n // s += \"\\nLeftborder\";\n\n return res;\n }\n\n // Case: Intersects the top border\n if (0 < dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) {\n res.x = X + H * dX / 2 / dY;\n res.y = Y + H / 2;\n // s += \"\\nTop border\";\n\n return res;\n }\n\n // Case: Intersects the bottom border\n if (0 > dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) {\n res.x = X - H * dX / 2 / dY;\n res.y = Y - H / 2;\n // s += \"\\nBottom border\";\n\n return res;\n }\n\n // s += \"\\nClipping point found at \" + res.x + \", \" + res.y;\n // logDebug(s);\n return res;\n};\n\n/**\n * @brief : Calculates all edge forces\n */\nvar calculateEdgeForces = function calculateEdgeForces(layoutInfo, options) {\n // Iterate over all edges\n for (var i = 0; i < layoutInfo.edgeSize; i++) {\n // Get edge, source & target nodes\n var edge = layoutInfo.layoutEdges[i];\n var sourceIx = layoutInfo.idToIndex[edge.sourceId];\n var source = layoutInfo.layoutNodes[sourceIx];\n var targetIx = layoutInfo.idToIndex[edge.targetId];\n var target = layoutInfo.layoutNodes[targetIx];\n\n // Get direction of line connecting both node centers\n var directionX = target.positionX - source.positionX;\n var directionY = target.positionY - source.positionY;\n\n // If both centers are the same, do nothing.\n // A random force has already been applied as node repulsion\n if (0 === directionX && 0 === directionY) {\n continue;\n }\n\n // Get clipping points for both nodes\n var point1 = findClippingPoint(source, directionX, directionY);\n var point2 = findClippingPoint(target, -1 * directionX, -1 * directionY);\n var lx = point2.x - point1.x;\n var ly = point2.y - point1.y;\n var l = Math.sqrt(lx * lx + ly * ly);\n var force = Math.pow(edge.idealLength - l, 2) / edge.elasticity;\n if (0 !== l) {\n var forceX = force * lx / l;\n var forceY = force * ly / l;\n } else {\n var forceX = 0;\n var forceY = 0;\n }\n\n // Add this force to target and source nodes\n if (!source.isLocked) {\n source.offsetX += forceX;\n source.offsetY += forceY;\n }\n if (!target.isLocked) {\n target.offsetX -= forceX;\n target.offsetY -= forceY;\n }\n\n // var s = 'Edge force between nodes ' + source.id + ' and ' + target.id;\n // s += \"\\nDistance: \" + l + \" Force: (\" + forceX + \", \" + forceY + \")\";\n // logDebug(s);\n }\n};\n\n/**\n * @brief : Computes gravity forces for all nodes\n */\nvar calculateGravityForces = function calculateGravityForces(layoutInfo, options) {\n if (options.gravity === 0) {\n return;\n }\n var distThreshold = 1;\n\n // var s = 'calculateGravityForces';\n // logDebug(s);\n for (var i = 0; i < layoutInfo.graphSet.length; i++) {\n var graph = layoutInfo.graphSet[i];\n var numNodes = graph.length;\n\n // s = \"Set: \" + graph.toString();\n // logDebug(s);\n\n // Compute graph center\n if (0 === i) {\n var centerX = layoutInfo.clientHeight / 2;\n var centerY = layoutInfo.clientWidth / 2;\n } else {\n // Get Parent node for this graph, and use its position as center\n var temp = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[0]]];\n var parent = layoutInfo.layoutNodes[layoutInfo.idToIndex[temp.parentId]];\n var centerX = parent.positionX;\n var centerY = parent.positionY;\n }\n // s = \"Center found at: \" + centerX + \", \" + centerY;\n // logDebug(s);\n\n // Apply force to all nodes in graph\n for (var j = 0; j < numNodes; j++) {\n var node = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]];\n // s = \"Node: \" + node.id;\n\n if (node.isLocked) {\n continue;\n }\n var dx = centerX - node.positionX;\n var dy = centerY - node.positionY;\n var d = Math.sqrt(dx * dx + dy * dy);\n if (d > distThreshold) {\n var fx = options.gravity * dx / d;\n var fy = options.gravity * dy / d;\n node.offsetX += fx;\n node.offsetY += fy;\n // s += \": Applied force: \" + fx + \", \" + fy;\n }\n // logDebug(s);\n }\n }\n};\n\n/**\n * @brief : This function propagates the existing offsets from\n * parent nodes to its descendents.\n * @arg layoutInfo : layoutInfo Object\n * @arg cy : cytoscape Object\n * @arg options : Layout options\n */\nvar propagateForces = function propagateForces(layoutInfo, options) {\n // Inline implementation of a queue, used for traversing the graph in BFS order\n var queue = [];\n var start = 0; // Points to the start the queue\n var end = -1; // Points to the end of the queue\n\n // logDebug('propagateForces');\n\n // Start by visiting the nodes in the root graph\n queue.push.apply(queue, layoutInfo.graphSet[0]);\n end += layoutInfo.graphSet[0].length;\n\n // Traverse the graph, level by level,\n while (start <= end) {\n // Get the node to visit and remove it from queue\n var nodeId = queue[start++];\n var nodeIndex = layoutInfo.idToIndex[nodeId];\n var node = layoutInfo.layoutNodes[nodeIndex];\n var children = node.children;\n\n // We only need to process the node if it's compound\n if (0 < children.length && !node.isLocked) {\n var offX = node.offsetX;\n var offY = node.offsetY;\n\n // var s = \"Propagating offset from parent node : \" + node.id +\n // \". OffsetX: \" + offX + \". OffsetY: \" + offY;\n // s += \"\\n Children: \" + children.toString();\n // logDebug(s);\n\n for (var i = 0; i < children.length; i++) {\n var childNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[children[i]]];\n // Propagate offset\n childNode.offsetX += offX;\n childNode.offsetY += offY;\n // Add children to queue to be visited\n queue[++end] = children[i];\n }\n\n // Reset parent offsets\n node.offsetX = 0;\n node.offsetY = 0;\n }\n }\n};\n\n/**\n * @brief : Updates the layout model positions, based on\n * the accumulated forces\n */\nvar updatePositions = function updatePositions(layoutInfo, options) {\n // var s = 'Updating positions';\n // logDebug(s);\n\n // Reset boundaries for compound nodes\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n if (0 < n.children.length) {\n // logDebug(\"Resetting boundaries of compound node: \" + n.id);\n n.maxX = undefined;\n n.minX = undefined;\n n.maxY = undefined;\n n.minY = undefined;\n }\n }\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n if (0 < n.children.length || n.isLocked) {\n // No need to set compound or locked node position\n // logDebug(\"Skipping position update of node: \" + n.id);\n continue;\n }\n // s = \"Node: \" + n.id + \" Previous position: (\" +\n // n.positionX + \", \" + n.positionY + \").\";\n\n // Limit displacement in order to improve stability\n var tempForce = limitForce(n.offsetX, n.offsetY, layoutInfo.temperature);\n n.positionX += tempForce.x;\n n.positionY += tempForce.y;\n n.offsetX = 0;\n n.offsetY = 0;\n n.minX = n.positionX - n.width;\n n.maxX = n.positionX + n.width;\n n.minY = n.positionY - n.height;\n n.maxY = n.positionY + n.height;\n // s += \" New Position: (\" + n.positionX + \", \" + n.positionY + \").\";\n // logDebug(s);\n\n // Update ancestry boudaries\n updateAncestryBoundaries(n, layoutInfo);\n }\n\n // Update size, position of compund nodes\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n if (0 < n.children.length && !n.isLocked) {\n n.positionX = (n.maxX + n.minX) / 2;\n n.positionY = (n.maxY + n.minY) / 2;\n n.width = n.maxX - n.minX;\n n.height = n.maxY - n.minY;\n // s = \"Updating position, size of compound node \" + n.id;\n // s += \"\\nPositionX: \" + n.positionX + \", PositionY: \" + n.positionY;\n // s += \"\\nWidth: \" + n.width + \", Height: \" + n.height;\n // logDebug(s);\n }\n }\n};\n\n/**\n * @brief : Limits a force (forceX, forceY) to be not\n * greater (in modulo) than max.\n 8 Preserves force direction.\n */\nvar limitForce = function limitForce(forceX, forceY, max) {\n // var s = \"Limiting force: (\" + forceX + \", \" + forceY + \"). Max: \" + max;\n var force = Math.sqrt(forceX * forceX + forceY * forceY);\n if (force > max) {\n var res = {\n x: max * forceX / force,\n y: max * forceY / force\n };\n } else {\n var res = {\n x: forceX,\n y: forceY\n };\n }\n\n // s += \".\\nResult: (\" + res.x + \", \" + res.y + \")\";\n // logDebug(s);\n\n return res;\n};\n\n/**\n * @brief : Function used for keeping track of compound node\n * sizes, since they should bound all their subnodes.\n */\nvar updateAncestryBoundaries = function updateAncestryBoundaries(node, layoutInfo) {\n // var s = \"Propagating new position/size of node \" + node.id;\n var parentId = node.parentId;\n if (null == parentId) {\n // If there's no parent, we are done\n // s += \". No parent node.\";\n // logDebug(s);\n return;\n }\n\n // Get Parent Node\n var p = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]];\n var flag = false;\n\n // MaxX\n if (null == p.maxX || node.maxX + p.padRight > p.maxX) {\n p.maxX = node.maxX + p.padRight;\n flag = true;\n // s += \"\\nNew maxX for parent node \" + p.id + \": \" + p.maxX;\n }\n\n // MinX\n if (null == p.minX || node.minX - p.padLeft < p.minX) {\n p.minX = node.minX - p.padLeft;\n flag = true;\n // s += \"\\nNew minX for parent node \" + p.id + \": \" + p.minX;\n }\n\n // MaxY\n if (null == p.maxY || node.maxY + p.padBottom > p.maxY) {\n p.maxY = node.maxY + p.padBottom;\n flag = true;\n // s += \"\\nNew maxY for parent node \" + p.id + \": \" + p.maxY;\n }\n\n // MinY\n if (null == p.minY || node.minY - p.padTop < p.minY) {\n p.minY = node.minY - p.padTop;\n flag = true;\n // s += \"\\nNew minY for parent node \" + p.id + \": \" + p.minY;\n }\n\n // If updated boundaries, propagate changes upward\n if (flag) {\n // logDebug(s);\n return updateAncestryBoundaries(p, layoutInfo);\n }\n\n // s += \". No changes in boundaries/position of parent node \" + p.id;\n // logDebug(s);\n return;\n};\nvar separateComponents = function separateComponents(layoutInfo, options) {\n var nodes = layoutInfo.layoutNodes;\n var components = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var cid = node.cmptId;\n var component = components[cid] = components[cid] || [];\n component.push(node);\n }\n var totalA = 0;\n for (var i = 0; i < components.length; i++) {\n var c = components[i];\n if (!c) {\n continue;\n }\n c.x1 = Infinity;\n c.x2 = -Infinity;\n c.y1 = Infinity;\n c.y2 = -Infinity;\n for (var j = 0; j < c.length; j++) {\n var n = c[j];\n c.x1 = Math.min(c.x1, n.positionX - n.width / 2);\n c.x2 = Math.max(c.x2, n.positionX + n.width / 2);\n c.y1 = Math.min(c.y1, n.positionY - n.height / 2);\n c.y2 = Math.max(c.y2, n.positionY + n.height / 2);\n }\n c.w = c.x2 - c.x1;\n c.h = c.y2 - c.y1;\n totalA += c.w * c.h;\n }\n components.sort(function (c1, c2) {\n return c2.w * c2.h - c1.w * c1.h;\n });\n var x = 0;\n var y = 0;\n var usedW = 0;\n var rowH = 0;\n var maxRowW = Math.sqrt(totalA) * layoutInfo.clientWidth / layoutInfo.clientHeight;\n for (var i = 0; i < components.length; i++) {\n var c = components[i];\n if (!c) {\n continue;\n }\n for (var j = 0; j < c.length; j++) {\n var n = c[j];\n if (!n.isLocked) {\n n.positionX += x - c.x1;\n n.positionY += y - c.y1;\n }\n }\n x += c.w + options.componentSpacing;\n usedW += c.w + options.componentSpacing;\n rowH = Math.max(rowH, c.h);\n if (usedW > maxRowW) {\n y += rowH + options.componentSpacing;\n x = 0;\n usedW = 0;\n rowH = 0;\n }\n }\n};\n\nvar defaults$3 = {\n fit: true,\n // whether to fit the viewport to the graph\n padding: 30,\n // padding used on fit\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n avoidOverlap: true,\n // prevents node overlap, may overflow boundingBox if not enough space\n avoidOverlapPadding: 10,\n // extra spacing around nodes when avoidOverlap: true\n nodeDimensionsIncludeLabels: false,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n spacingFactor: undefined,\n // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up\n condense: false,\n // uses all available space on false, uses minimal space on true\n rows: undefined,\n // force num of rows in the grid\n cols: undefined,\n // force num of columns in the grid\n position: function position(node) {},\n // returns { row, col } for element\n sort: undefined,\n // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') }\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts \n};\n\nfunction GridLayout(options) {\n this.options = extend({}, defaults$3, options);\n}\nGridLayout.prototype.run = function () {\n var params = this.options;\n var options = params;\n var cy = params.cy;\n var eles = options.eles;\n var nodes = eles.nodes().not(':parent');\n if (options.sort) {\n nodes = nodes.sort(options.sort);\n }\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n if (bb.h === 0 || bb.w === 0) {\n eles.nodes().layoutPositions(this, options, function (ele) {\n return {\n x: bb.x1,\n y: bb.y1\n };\n });\n } else {\n // width/height * splits^2 = cells where splits is number of times to split width\n var cells = nodes.size();\n var splits = Math.sqrt(cells * bb.h / bb.w);\n var rows = Math.round(splits);\n var cols = Math.round(bb.w / bb.h * splits);\n var small = function small(val) {\n if (val == null) {\n return Math.min(rows, cols);\n } else {\n var min = Math.min(rows, cols);\n if (min == rows) {\n rows = val;\n } else {\n cols = val;\n }\n }\n };\n var large = function large(val) {\n if (val == null) {\n return Math.max(rows, cols);\n } else {\n var max = Math.max(rows, cols);\n if (max == rows) {\n rows = val;\n } else {\n cols = val;\n }\n }\n };\n var oRows = options.rows;\n var oCols = options.cols != null ? options.cols : options.columns;\n\n // if rows or columns were set in options, use those values\n if (oRows != null && oCols != null) {\n rows = oRows;\n cols = oCols;\n } else if (oRows != null && oCols == null) {\n rows = oRows;\n cols = Math.ceil(cells / rows);\n } else if (oRows == null && oCols != null) {\n cols = oCols;\n rows = Math.ceil(cells / cols);\n }\n\n // otherwise use the automatic values and adjust accordingly\n\n // if rounding was up, see if we can reduce rows or columns\n else if (cols * rows > cells) {\n var sm = small();\n var lg = large();\n\n // reducing the small side takes away the most cells, so try it first\n if ((sm - 1) * lg >= cells) {\n small(sm - 1);\n } else if ((lg - 1) * sm >= cells) {\n large(lg - 1);\n }\n } else {\n // if rounding was too low, add rows or columns\n while (cols * rows < cells) {\n var _sm = small();\n var _lg = large();\n\n // try to add to larger side first (adds less in multiplication)\n if ((_lg + 1) * _sm >= cells) {\n large(_lg + 1);\n } else {\n small(_sm + 1);\n }\n }\n }\n var cellWidth = bb.w / cols;\n var cellHeight = bb.h / rows;\n if (options.condense) {\n cellWidth = 0;\n cellHeight = 0;\n }\n if (options.avoidOverlap) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var pos = node._private.position;\n if (pos.x == null || pos.y == null) {\n // for bb\n pos.x = 0;\n pos.y = 0;\n }\n var nbb = node.layoutDimensions(options);\n var p = options.avoidOverlapPadding;\n var w = nbb.w + p;\n var h = nbb.h + p;\n cellWidth = Math.max(cellWidth, w);\n cellHeight = Math.max(cellHeight, h);\n }\n }\n var cellUsed = {}; // e.g. 'c-0-2' => true\n\n var used = function used(row, col) {\n return cellUsed['c-' + row + '-' + col] ? true : false;\n };\n var use = function use(row, col) {\n cellUsed['c-' + row + '-' + col] = true;\n };\n\n // to keep track of current cell position\n var row = 0;\n var col = 0;\n var moveToNextCell = function moveToNextCell() {\n col++;\n if (col >= cols) {\n col = 0;\n row++;\n }\n };\n\n // get a cache of all the manual positions\n var id2manPos = {};\n for (var _i = 0; _i < nodes.length; _i++) {\n var _node = nodes[_i];\n var rcPos = options.position(_node);\n if (rcPos && (rcPos.row !== undefined || rcPos.col !== undefined)) {\n // must have at least row or col def'd\n var _pos = {\n row: rcPos.row,\n col: rcPos.col\n };\n if (_pos.col === undefined) {\n // find unused col\n _pos.col = 0;\n while (used(_pos.row, _pos.col)) {\n _pos.col++;\n }\n } else if (_pos.row === undefined) {\n // find unused row\n _pos.row = 0;\n while (used(_pos.row, _pos.col)) {\n _pos.row++;\n }\n }\n id2manPos[_node.id()] = _pos;\n use(_pos.row, _pos.col);\n }\n }\n var getPos = function getPos(element, i) {\n var x, y;\n if (element.locked() || element.isParent()) {\n return false;\n }\n\n // see if we have a manual position set\n var rcPos = id2manPos[element.id()];\n if (rcPos) {\n x = rcPos.col * cellWidth + cellWidth / 2 + bb.x1;\n y = rcPos.row * cellHeight + cellHeight / 2 + bb.y1;\n } else {\n // otherwise set automatically\n\n while (used(row, col)) {\n moveToNextCell();\n }\n x = col * cellWidth + cellWidth / 2 + bb.x1;\n y = row * cellHeight + cellHeight / 2 + bb.y1;\n use(row, col);\n moveToNextCell();\n }\n return {\n x: x,\n y: y\n };\n };\n nodes.layoutPositions(this, options, getPos);\n }\n return this; // chaining\n};\n\n// default layout options\nvar defaults$2 = {\n ready: function ready() {},\n // on layoutready\n stop: function stop() {} // on layoutstop\n};\n\n// constructor\n// options : object containing layout options\nfunction NullLayout(options) {\n this.options = extend({}, defaults$2, options);\n}\n\n// runs the layout\nNullLayout.prototype.run = function () {\n var options = this.options;\n var eles = options.eles; // elements to consider in the layout\n var layout = this;\n\n // cy is automatically populated for us in the constructor\n // (disable eslint for next line as this serves as example layout code to external developers)\n // eslint-disable-next-line no-unused-vars\n options.cy;\n layout.emit('layoutstart');\n\n // puts all nodes at (0, 0)\n // n.b. most layouts would use layoutPositions(), instead of positions() and manual events\n eles.nodes().positions(function () {\n return {\n x: 0,\n y: 0\n };\n });\n\n // trigger layoutready when each node has had its position set at least once\n layout.one('layoutready', options.ready);\n layout.emit('layoutready');\n\n // trigger layoutstop when the layout stops (e.g. finishes)\n layout.one('layoutstop', options.stop);\n layout.emit('layoutstop');\n return this; // chaining\n};\n\n// called on continuous layouts to stop them before they finish\nNullLayout.prototype.stop = function () {\n return this; // chaining\n};\n\nvar defaults$1 = {\n positions: undefined,\n // map of (node id) => (position obj); or function(node){ return somPos; }\n zoom: undefined,\n // the zoom level to set (prob want fit = false if set)\n pan: undefined,\n // the pan level to set (prob want fit = false if set)\n fit: true,\n // whether to fit to viewport\n padding: 30,\n // padding on fit\n spacingFactor: undefined,\n // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts\n};\n\nfunction PresetLayout(options) {\n this.options = extend({}, defaults$1, options);\n}\nPresetLayout.prototype.run = function () {\n var options = this.options;\n var eles = options.eles;\n var nodes = eles.nodes();\n var posIsFn = fn$6(options.positions);\n function getPosition(node) {\n if (options.positions == null) {\n return copyPosition(node.position());\n }\n if (posIsFn) {\n return options.positions(node);\n }\n var pos = options.positions[node._private.data.id];\n if (pos == null) {\n return null;\n }\n return pos;\n }\n nodes.layoutPositions(this, options, function (node, i) {\n var position = getPosition(node);\n if (node.locked() || position == null) {\n return false;\n }\n return position;\n });\n return this; // chaining\n};\n\nvar defaults = {\n fit: true,\n // whether to fit to viewport\n padding: 30,\n // fit padding\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts \n};\n\nfunction RandomLayout(options) {\n this.options = extend({}, defaults, options);\n}\nRandomLayout.prototype.run = function () {\n var options = this.options;\n var cy = options.cy;\n var eles = options.eles;\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var getPos = function getPos(node, i) {\n return {\n x: bb.x1 + Math.round(Math.random() * bb.w),\n y: bb.y1 + Math.round(Math.random() * bb.h)\n };\n };\n eles.nodes().layoutPositions(this, options, getPos);\n return this; // chaining\n};\n\nvar layout = [{\n name: 'breadthfirst',\n impl: BreadthFirstLayout\n}, {\n name: 'circle',\n impl: CircleLayout\n}, {\n name: 'concentric',\n impl: ConcentricLayout\n}, {\n name: 'cose',\n impl: CoseLayout\n}, {\n name: 'grid',\n impl: GridLayout\n}, {\n name: 'null',\n impl: NullLayout\n}, {\n name: 'preset',\n impl: PresetLayout\n}, {\n name: 'random',\n impl: RandomLayout\n}];\n\nfunction NullRenderer(options) {\n this.options = options;\n this.notifications = 0; // for testing\n}\n\nvar noop = function noop() {};\nvar throwImgErr = function throwImgErr() {\n throw new Error('A headless instance can not render images');\n};\nNullRenderer.prototype = {\n recalculateRenderedStyle: noop,\n notify: function notify() {\n this.notifications++;\n },\n init: noop,\n isHeadless: function isHeadless() {\n return true;\n },\n png: throwImgErr,\n jpg: throwImgErr\n};\n\nvar BRp$f = {};\nBRp$f.arrowShapeWidth = 0.3;\nBRp$f.registerArrowShapes = function () {\n var arrowShapes = this.arrowShapes = {};\n var renderer = this;\n\n // Contract for arrow shapes:\n // 0, 0 is arrow tip\n // (0, 1) is direction towards node\n // (1, 0) is right\n //\n // functional api:\n // collide: check x, y in shape\n // roughCollide: called before collide, no false negatives\n // draw: draw\n // spacing: dist(arrowTip, nodeBoundary)\n // gap: dist(edgeTip, nodeBoundary), edgeTip may != arrowTip\n\n var bbCollide = function bbCollide(x, y, size, angle, translation, edgeWidth, padding) {\n var x1 = translation.x - size / 2 - padding;\n var x2 = translation.x + size / 2 + padding;\n var y1 = translation.y - size / 2 - padding;\n var y2 = translation.y + size / 2 + padding;\n var inside = x1 <= x && x <= x2 && y1 <= y && y <= y2;\n return inside;\n };\n var transform = function transform(x, y, size, angle, translation) {\n var xRotated = x * Math.cos(angle) - y * Math.sin(angle);\n var yRotated = x * Math.sin(angle) + y * Math.cos(angle);\n var xScaled = xRotated * size;\n var yScaled = yRotated * size;\n var xTranslated = xScaled + translation.x;\n var yTranslated = yScaled + translation.y;\n return {\n x: xTranslated,\n y: yTranslated\n };\n };\n var transformPoints = function transformPoints(pts, size, angle, translation) {\n var retPts = [];\n for (var i = 0; i < pts.length; i += 2) {\n var x = pts[i];\n var y = pts[i + 1];\n retPts.push(transform(x, y, size, angle, translation));\n }\n return retPts;\n };\n var pointsToArr = function pointsToArr(pts) {\n var ret = [];\n for (var i = 0; i < pts.length; i++) {\n var p = pts[i];\n ret.push(p.x, p.y);\n }\n return ret;\n };\n var standardGap = function standardGap(edge) {\n return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').pfValue * 2;\n };\n var defineArrowShape = function defineArrowShape(name, defn) {\n if (string(defn)) {\n defn = arrowShapes[defn];\n }\n arrowShapes[name] = extend({\n name: name,\n points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3],\n collide: function collide(x, y, size, angle, translation, padding) {\n var points = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation));\n var inside = pointInsidePolygonPoints(x, y, points);\n return inside;\n },\n roughCollide: bbCollide,\n draw: function draw(context, size, angle, translation) {\n var points = transformPoints(this.points, size, angle, translation);\n renderer.arrowShapeImpl('polygon')(context, points);\n },\n spacing: function spacing(edge) {\n return 0;\n },\n gap: standardGap\n }, defn);\n };\n defineArrowShape('none', {\n collide: falsify,\n roughCollide: falsify,\n draw: noop$1,\n spacing: zeroify,\n gap: zeroify\n });\n defineArrowShape('triangle', {\n points: [-0.15, -0.3, 0, 0, 0.15, -0.3]\n });\n defineArrowShape('arrow', 'triangle');\n defineArrowShape('triangle-backcurve', {\n points: arrowShapes['triangle'].points,\n controlPoint: [0, -0.15],\n roughCollide: bbCollide,\n draw: function draw(context, size, angle, translation, edgeWidth) {\n var ptsTrans = transformPoints(this.points, size, angle, translation);\n var ctrlPt = this.controlPoint;\n var ctrlPtTrans = transform(ctrlPt[0], ctrlPt[1], size, angle, translation);\n renderer.arrowShapeImpl(this.name)(context, ptsTrans, ctrlPtTrans);\n },\n gap: function gap(edge) {\n return standardGap(edge) * 0.8;\n }\n });\n defineArrowShape('triangle-tee', {\n points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0],\n pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4],\n collide: function collide(x, y, size, angle, translation, edgeWidth, padding) {\n var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation));\n var teePts = pointsToArr(transformPoints(this.pointsTee, size + 2 * padding, angle, translation));\n var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts);\n return inside;\n },\n draw: function draw(context, size, angle, translation, edgeWidth) {\n var triPts = transformPoints(this.points, size, angle, translation);\n var teePts = transformPoints(this.pointsTee, size, angle, translation);\n renderer.arrowShapeImpl(this.name)(context, triPts, teePts);\n }\n });\n defineArrowShape('circle-triangle', {\n radius: 0.15,\n pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15],\n collide: function collide(x, y, size, angle, translation, edgeWidth, padding) {\n var t = translation;\n var circleInside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2);\n var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation));\n return pointInsidePolygonPoints(x, y, triPts) || circleInside;\n },\n draw: function draw(context, size, angle, translation, edgeWidth) {\n var triPts = transformPoints(this.pointsTr, size, angle, translation);\n renderer.arrowShapeImpl(this.name)(context, triPts, translation.x, translation.y, this.radius * size);\n },\n spacing: function spacing(edge) {\n return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius;\n }\n });\n defineArrowShape('triangle-cross', {\n points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0],\n baseCrossLinePts: [-0.15, -0.4,\n // first half of the rectangle\n -0.15, -0.4, 0.15, -0.4,\n // second half of the rectangle\n 0.15, -0.4],\n crossLinePts: function crossLinePts(size, edgeWidth) {\n // shift points so that the distance between the cross points matches edge width\n var p = this.baseCrossLinePts.slice();\n var shiftFactor = edgeWidth / size;\n var y0 = 3;\n var y1 = 5;\n p[y0] = p[y0] - shiftFactor;\n p[y1] = p[y1] - shiftFactor;\n return p;\n },\n collide: function collide(x, y, size, angle, translation, edgeWidth, padding) {\n var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation));\n var teePts = pointsToArr(transformPoints(this.crossLinePts(size, edgeWidth), size + 2 * padding, angle, translation));\n var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts);\n return inside;\n },\n draw: function draw(context, size, angle, translation, edgeWidth) {\n var triPts = transformPoints(this.points, size, angle, translation);\n var crossLinePts = transformPoints(this.crossLinePts(size, edgeWidth), size, angle, translation);\n renderer.arrowShapeImpl(this.name)(context, triPts, crossLinePts);\n }\n });\n defineArrowShape('vee', {\n points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15],\n gap: function gap(edge) {\n return standardGap(edge) * 0.525;\n }\n });\n defineArrowShape('circle', {\n radius: 0.15,\n collide: function collide(x, y, size, angle, translation, edgeWidth, padding) {\n var t = translation;\n var inside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2);\n return inside;\n },\n draw: function draw(context, size, angle, translation, edgeWidth) {\n renderer.arrowShapeImpl(this.name)(context, translation.x, translation.y, this.radius * size);\n },\n spacing: function spacing(edge) {\n return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius;\n }\n });\n defineArrowShape('tee', {\n points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0],\n spacing: function spacing(edge) {\n return 1;\n },\n gap: function gap(edge) {\n return 1;\n }\n });\n defineArrowShape('square', {\n points: [-0.15, 0.00, 0.15, 0.00, 0.15, -0.3, -0.15, -0.3]\n });\n defineArrowShape('diamond', {\n points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0],\n gap: function gap(edge) {\n return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value;\n }\n });\n defineArrowShape('chevron', {\n points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15],\n gap: function gap(edge) {\n return 0.95 * edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value;\n }\n });\n};\n\nvar BRp$e = {};\n\n// Project mouse\nBRp$e.projectIntoViewport = function (clientX, clientY) {\n var cy = this.cy;\n var offsets = this.findContainerClientCoords();\n var offsetLeft = offsets[0];\n var offsetTop = offsets[1];\n var scale = offsets[4];\n var pan = cy.pan();\n var zoom = cy.zoom();\n var x = ((clientX - offsetLeft) / scale - pan.x) / zoom;\n var y = ((clientY - offsetTop) / scale - pan.y) / zoom;\n return [x, y];\n};\nBRp$e.findContainerClientCoords = function () {\n if (this.containerBB) {\n return this.containerBB;\n }\n var container = this.container;\n var rect = container.getBoundingClientRect();\n var style = this.cy.window().getComputedStyle(container);\n var styleValue = function styleValue(name) {\n return parseFloat(style.getPropertyValue(name));\n };\n var padding = {\n left: styleValue('padding-left'),\n right: styleValue('padding-right'),\n top: styleValue('padding-top'),\n bottom: styleValue('padding-bottom')\n };\n var border = {\n left: styleValue('border-left-width'),\n right: styleValue('border-right-width'),\n top: styleValue('border-top-width'),\n bottom: styleValue('border-bottom-width')\n };\n var clientWidth = container.clientWidth;\n var clientHeight = container.clientHeight;\n var paddingHor = padding.left + padding.right;\n var paddingVer = padding.top + padding.bottom;\n var borderHor = border.left + border.right;\n var scale = rect.width / (clientWidth + borderHor);\n var unscaledW = clientWidth - paddingHor;\n var unscaledH = clientHeight - paddingVer;\n var left = rect.left + padding.left + border.left;\n var top = rect.top + padding.top + border.top;\n return this.containerBB = [left, top, unscaledW, unscaledH, scale];\n};\nBRp$e.invalidateContainerClientCoordsCache = function () {\n this.containerBB = null;\n};\nBRp$e.findNearestElement = function (x, y, interactiveElementsOnly, isTouch) {\n return this.findNearestElements(x, y, interactiveElementsOnly, isTouch)[0];\n};\nBRp$e.findNearestElements = function (x, y, interactiveElementsOnly, isTouch) {\n var self = this;\n var r = this;\n var eles = r.getCachedZSortedEles();\n var near = []; // 1 node max, 1 edge max\n var zoom = r.cy.zoom();\n var hasCompounds = r.cy.hasCompoundNodes();\n var edgeThreshold = (isTouch ? 24 : 8) / zoom;\n var nodeThreshold = (isTouch ? 8 : 2) / zoom;\n var labelThreshold = (isTouch ? 8 : 2) / zoom;\n var minSqDist = Infinity;\n var nearEdge;\n var nearNode;\n if (interactiveElementsOnly) {\n eles = eles.interactive;\n }\n function addEle(ele, sqDist) {\n if (ele.isNode()) {\n if (nearNode) {\n return; // can't replace node\n } else {\n nearNode = ele;\n near.push(ele);\n }\n }\n if (ele.isEdge() && (sqDist == null || sqDist < minSqDist)) {\n if (nearEdge) {\n // then replace existing edge\n // can replace only if same z-index\n if (nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value && nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value) {\n for (var i = 0; i < near.length; i++) {\n if (near[i].isEdge()) {\n near[i] = ele;\n nearEdge = ele;\n minSqDist = sqDist != null ? sqDist : minSqDist;\n break;\n }\n }\n }\n } else {\n near.push(ele);\n nearEdge = ele;\n minSqDist = sqDist != null ? sqDist : minSqDist;\n }\n }\n }\n function checkNode(node) {\n var width = node.outerWidth() + 2 * nodeThreshold;\n var height = node.outerHeight() + 2 * nodeThreshold;\n var hw = width / 2;\n var hh = height / 2;\n var pos = node.position();\n var cornerRadius = node.pstyle('corner-radius').value === 'auto' ? 'auto' : node.pstyle('corner-radius').pfValue;\n var rs = node._private.rscratch;\n if (pos.x - hw <= x && x <= pos.x + hw // bb check x\n && pos.y - hh <= y && y <= pos.y + hh // bb check y\n ) {\n var shape = r.nodeShapes[self.getNodeShape(node)];\n if (shape.checkPoint(x, y, 0, width, height, pos.x, pos.y, cornerRadius, rs)) {\n addEle(node, 0);\n return true;\n }\n }\n }\n function checkEdge(edge) {\n var _p = edge._private;\n var rs = _p.rscratch;\n var styleWidth = edge.pstyle('width').pfValue;\n var scale = edge.pstyle('arrow-scale').value;\n var width = styleWidth / 2 + edgeThreshold; // more like a distance radius from centre\n var widthSq = width * width;\n var width2 = width * 2;\n var src = _p.source;\n var tgt = _p.target;\n var sqDist;\n if (rs.edgeType === 'segments' || rs.edgeType === 'straight' || rs.edgeType === 'haystack') {\n var pts = rs.allpts;\n for (var i = 0; i + 3 < pts.length; i += 2) {\n if (inLineVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], width2) && widthSq > (sqDist = sqdistToFiniteLine(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3]))) {\n addEle(edge, sqDist);\n return true;\n }\n }\n } else if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') {\n var pts = rs.allpts;\n for (var i = 0; i + 5 < rs.allpts.length; i += 4) {\n if (inBezierVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5], width2) && widthSq > (sqDist = sqdistToQuadraticBezier(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5]))) {\n addEle(edge, sqDist);\n return true;\n }\n }\n }\n\n // if we're close to the edge but didn't hit it, maybe we hit its arrows\n\n var src = src || _p.source;\n var tgt = tgt || _p.target;\n var arSize = self.getArrowWidth(styleWidth, scale);\n var arrows = [{\n name: 'source',\n x: rs.arrowStartX,\n y: rs.arrowStartY,\n angle: rs.srcArrowAngle\n }, {\n name: 'target',\n x: rs.arrowEndX,\n y: rs.arrowEndY,\n angle: rs.tgtArrowAngle\n }, {\n name: 'mid-source',\n x: rs.midX,\n y: rs.midY,\n angle: rs.midsrcArrowAngle\n }, {\n name: 'mid-target',\n x: rs.midX,\n y: rs.midY,\n angle: rs.midtgtArrowAngle\n }];\n for (var i = 0; i < arrows.length; i++) {\n var ar = arrows[i];\n var shape = r.arrowShapes[edge.pstyle(ar.name + '-arrow-shape').value];\n var edgeWidth = edge.pstyle('width').pfValue;\n if (shape.roughCollide(x, y, arSize, ar.angle, {\n x: ar.x,\n y: ar.y\n }, edgeWidth, edgeThreshold) && shape.collide(x, y, arSize, ar.angle, {\n x: ar.x,\n y: ar.y\n }, edgeWidth, edgeThreshold)) {\n addEle(edge);\n return true;\n }\n }\n\n // for compound graphs, hitting edge may actually want a connected node instead (b/c edge may have greater z-index precedence)\n if (hasCompounds && near.length > 0) {\n checkNode(src);\n checkNode(tgt);\n }\n }\n function preprop(obj, name, pre) {\n return getPrefixedProperty(obj, name, pre);\n }\n function checkLabel(ele, prefix) {\n var _p = ele._private;\n var th = labelThreshold;\n var prefixDash;\n if (prefix) {\n prefixDash = prefix + '-';\n } else {\n prefixDash = '';\n }\n ele.boundingBox();\n var bb = _p.labelBounds[prefix || 'main'];\n var text = ele.pstyle(prefixDash + 'label').value;\n var eventsEnabled = ele.pstyle('text-events').strValue === 'yes';\n if (!eventsEnabled || !text) {\n return;\n }\n var lx = preprop(_p.rscratch, 'labelX', prefix);\n var ly = preprop(_p.rscratch, 'labelY', prefix);\n var theta = preprop(_p.rscratch, 'labelAngle', prefix);\n var ox = ele.pstyle(prefixDash + 'text-margin-x').pfValue;\n var oy = ele.pstyle(prefixDash + 'text-margin-y').pfValue;\n var lx1 = bb.x1 - th - ox; // (-ox, -oy) as bb already includes margin\n var lx2 = bb.x2 + th - ox; // and rotation is about (lx, ly)\n var ly1 = bb.y1 - th - oy;\n var ly2 = bb.y2 + th - oy;\n if (theta) {\n var cos = Math.cos(theta);\n var sin = Math.sin(theta);\n var rotate = function rotate(x, y) {\n x = x - lx;\n y = y - ly;\n return {\n x: x * cos - y * sin + lx,\n y: x * sin + y * cos + ly\n };\n };\n var px1y1 = rotate(lx1, ly1);\n var px1y2 = rotate(lx1, ly2);\n var px2y1 = rotate(lx2, ly1);\n var px2y2 = rotate(lx2, ly2);\n var points = [\n // with the margin added after the rotation is applied\n px1y1.x + ox, px1y1.y + oy, px2y1.x + ox, px2y1.y + oy, px2y2.x + ox, px2y2.y + oy, px1y2.x + ox, px1y2.y + oy];\n if (pointInsidePolygonPoints(x, y, points)) {\n addEle(ele);\n return true;\n }\n } else {\n // do a cheaper bb check\n if (inBoundingBox(bb, x, y)) {\n addEle(ele);\n return true;\n }\n }\n }\n for (var i = eles.length - 1; i >= 0; i--) {\n // reverse order for precedence\n var ele = eles[i];\n if (ele.isNode()) {\n checkNode(ele) || checkLabel(ele);\n } else {\n // then edge\n checkEdge(ele) || checkLabel(ele) || checkLabel(ele, 'source') || checkLabel(ele, 'target');\n }\n }\n return near;\n};\n\n// 'Give me everything from this box'\nBRp$e.getAllInBox = function (x1, y1, x2, y2) {\n var eles = this.getCachedZSortedEles().interactive;\n var box = [];\n var x1c = Math.min(x1, x2);\n var x2c = Math.max(x1, x2);\n var y1c = Math.min(y1, y2);\n var y2c = Math.max(y1, y2);\n x1 = x1c;\n x2 = x2c;\n y1 = y1c;\n y2 = y2c;\n var boxBb = makeBoundingBox({\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2\n });\n for (var e = 0; e < eles.length; e++) {\n var ele = eles[e];\n if (ele.isNode()) {\n var node = ele;\n var nodeBb = node.boundingBox({\n includeNodes: true,\n includeEdges: false,\n includeLabels: false\n });\n if (boundingBoxesIntersect(boxBb, nodeBb) && !boundingBoxInBoundingBox(nodeBb, boxBb)) {\n box.push(node);\n }\n } else {\n var edge = ele;\n var _p = edge._private;\n var rs = _p.rscratch;\n if (rs.startX != null && rs.startY != null && !inBoundingBox(boxBb, rs.startX, rs.startY)) {\n continue;\n }\n if (rs.endX != null && rs.endY != null && !inBoundingBox(boxBb, rs.endX, rs.endY)) {\n continue;\n }\n if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound' || rs.edgeType === 'segments' || rs.edgeType === 'haystack') {\n var pts = _p.rstyle.bezierPts || _p.rstyle.linePts || _p.rstyle.haystackPts;\n var allInside = true;\n for (var i = 0; i < pts.length; i++) {\n if (!pointInBoundingBox(boxBb, pts[i])) {\n allInside = false;\n break;\n }\n }\n if (allInside) {\n box.push(edge);\n }\n } else if (rs.edgeType === 'haystack' || rs.edgeType === 'straight') {\n box.push(edge);\n }\n }\n }\n return box;\n};\n\nvar BRp$d = {};\nBRp$d.calculateArrowAngles = function (edge) {\n var rs = edge._private.rscratch;\n var isHaystack = rs.edgeType === 'haystack';\n var isBezier = rs.edgeType === 'bezier';\n var isMultibezier = rs.edgeType === 'multibezier';\n var isSegments = rs.edgeType === 'segments';\n var isCompound = rs.edgeType === 'compound';\n var isSelf = rs.edgeType === 'self';\n\n // Displacement gives direction for arrowhead orientation\n var dispX, dispY;\n var startX, startY, endX, endY, midX, midY;\n if (isHaystack) {\n startX = rs.haystackPts[0];\n startY = rs.haystackPts[1];\n endX = rs.haystackPts[2];\n endY = rs.haystackPts[3];\n } else {\n startX = rs.arrowStartX;\n startY = rs.arrowStartY;\n endX = rs.arrowEndX;\n endY = rs.arrowEndY;\n }\n midX = rs.midX;\n midY = rs.midY;\n\n // source\n //\n\n if (isSegments) {\n dispX = startX - rs.segpts[0];\n dispY = startY - rs.segpts[1];\n } else if (isMultibezier || isCompound || isSelf || isBezier) {\n var pts = rs.allpts;\n var bX = qbezierAt(pts[0], pts[2], pts[4], 0.1);\n var bY = qbezierAt(pts[1], pts[3], pts[5], 0.1);\n dispX = startX - bX;\n dispY = startY - bY;\n } else {\n dispX = startX - midX;\n dispY = startY - midY;\n }\n rs.srcArrowAngle = getAngleFromDisp(dispX, dispY);\n\n // mid target\n //\n\n var midX = rs.midX;\n var midY = rs.midY;\n if (isHaystack) {\n midX = (startX + endX) / 2;\n midY = (startY + endY) / 2;\n }\n dispX = endX - startX;\n dispY = endY - startY;\n if (isSegments) {\n var pts = rs.allpts;\n if (pts.length / 2 % 2 === 0) {\n var i2 = pts.length / 2;\n var i1 = i2 - 2;\n dispX = pts[i2] - pts[i1];\n dispY = pts[i2 + 1] - pts[i1 + 1];\n } else if (rs.isRound) {\n dispX = rs.midVector[1];\n dispY = -rs.midVector[0];\n } else {\n var i2 = pts.length / 2 - 1;\n var i1 = i2 - 2;\n dispX = pts[i2] - pts[i1];\n dispY = pts[i2 + 1] - pts[i1 + 1];\n }\n } else if (isMultibezier || isCompound || isSelf) {\n var pts = rs.allpts;\n var cpts = rs.ctrlpts;\n var bp0x, bp0y;\n var bp1x, bp1y;\n if (cpts.length / 2 % 2 === 0) {\n var p0 = pts.length / 2 - 1; // startpt\n var ic = p0 + 2;\n var p1 = ic + 2;\n bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0);\n bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0);\n bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0001);\n bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0001);\n } else {\n var ic = pts.length / 2 - 1; // ctrpt\n var p0 = ic - 2; // startpt\n var p1 = ic + 2; // endpt\n\n bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.4999);\n bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.4999);\n bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.5);\n bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.5);\n }\n dispX = bp1x - bp0x;\n dispY = bp1y - bp0y;\n }\n rs.midtgtArrowAngle = getAngleFromDisp(dispX, dispY);\n rs.midDispX = dispX;\n rs.midDispY = dispY;\n\n // mid source\n //\n\n dispX *= -1;\n dispY *= -1;\n if (isSegments) {\n var pts = rs.allpts;\n if (pts.length / 2 % 2 === 0) ; else if (!rs.isRound) {\n var i2 = pts.length / 2 - 1;\n var i3 = i2 + 2;\n dispX = -(pts[i3] - pts[i2]);\n dispY = -(pts[i3 + 1] - pts[i2 + 1]);\n }\n }\n rs.midsrcArrowAngle = getAngleFromDisp(dispX, dispY);\n\n // target\n //\n\n if (isSegments) {\n dispX = endX - rs.segpts[rs.segpts.length - 2];\n dispY = endY - rs.segpts[rs.segpts.length - 1];\n } else if (isMultibezier || isCompound || isSelf || isBezier) {\n var pts = rs.allpts;\n var l = pts.length;\n var bX = qbezierAt(pts[l - 6], pts[l - 4], pts[l - 2], 0.9);\n var bY = qbezierAt(pts[l - 5], pts[l - 3], pts[l - 1], 0.9);\n dispX = endX - bX;\n dispY = endY - bY;\n } else {\n dispX = endX - midX;\n dispY = endY - midY;\n }\n rs.tgtArrowAngle = getAngleFromDisp(dispX, dispY);\n};\nBRp$d.getArrowWidth = BRp$d.getArrowHeight = function (edgeWidth, scale) {\n var cache = this.arrowWidthCache = this.arrowWidthCache || {};\n var cachedVal = cache[edgeWidth + ', ' + scale];\n if (cachedVal) {\n return cachedVal;\n }\n cachedVal = Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29) * scale;\n cache[edgeWidth + ', ' + scale] = cachedVal;\n return cachedVal;\n};\n\n/**\n * Explained by Blindman67 at https://stackoverflow.com/a/44856925/11028828\n */\n\n// Declare reused variable to avoid reallocating variables every time the function is called\nvar x,\n y,\n v1 = {},\n v2 = {},\n sinA,\n sinA90,\n radDirection,\n drawDirection,\n angle,\n halfAngle,\n cRadius,\n lenOut,\n radius,\n limit;\nvar startX, startY, stopX, stopY;\nvar lastPoint;\n\n// convert 2 points into vector form, polar form, and normalised\nvar asVec = function asVec(p, pp, v) {\n v.x = pp.x - p.x;\n v.y = pp.y - p.y;\n v.len = Math.sqrt(v.x * v.x + v.y * v.y);\n v.nx = v.x / v.len;\n v.ny = v.y / v.len;\n v.ang = Math.atan2(v.ny, v.nx);\n};\nvar invertVec = function invertVec(originalV, invertedV) {\n invertedV.x = originalV.x * -1;\n invertedV.y = originalV.y * -1;\n invertedV.nx = originalV.nx * -1;\n invertedV.ny = originalV.ny * -1;\n invertedV.ang = originalV.ang > 0 ? -(Math.PI - originalV.ang) : Math.PI + originalV.ang;\n};\nvar calcCornerArc = function calcCornerArc(previousPoint, currentPoint, nextPoint, radiusMax, isArcRadius) {\n //-----------------------------------------\n // Part 1\n previousPoint !== lastPoint ? asVec(currentPoint, previousPoint, v1) : invertVec(v2, v1); // Avoid recalculating vec if it is the invert of the last one calculated\n asVec(currentPoint, nextPoint, v2);\n sinA = v1.nx * v2.ny - v1.ny * v2.nx;\n sinA90 = v1.nx * v2.nx - v1.ny * -v2.ny;\n angle = Math.asin(Math.max(-1, Math.min(1, sinA)));\n if (Math.abs(angle) < 1e-6) {\n x = currentPoint.x;\n y = currentPoint.y;\n cRadius = radius = 0;\n return;\n }\n //-----------------------------------------\n radDirection = 1;\n drawDirection = false;\n if (sinA90 < 0) {\n if (angle < 0) {\n angle = Math.PI + angle;\n } else {\n angle = Math.PI - angle;\n radDirection = -1;\n drawDirection = true;\n }\n } else {\n if (angle > 0) {\n radDirection = -1;\n drawDirection = true;\n }\n }\n if (currentPoint.radius !== undefined) {\n radius = currentPoint.radius;\n } else {\n radius = radiusMax;\n }\n //-----------------------------------------\n // Part 2\n halfAngle = angle / 2;\n //-----------------------------------------\n\n limit = Math.min(v1.len / 2, v2.len / 2);\n if (isArcRadius) {\n //-----------------------------------------\n // Part 3\n lenOut = Math.abs(Math.cos(halfAngle) * radius / Math.sin(halfAngle));\n\n //-----------------------------------------\n // Special part A\n if (lenOut > limit) {\n lenOut = limit;\n cRadius = Math.abs(lenOut * Math.sin(halfAngle) / Math.cos(halfAngle));\n } else {\n cRadius = radius;\n }\n } else {\n lenOut = Math.min(limit, radius);\n cRadius = Math.abs(lenOut * Math.sin(halfAngle) / Math.cos(halfAngle));\n }\n //-----------------------------------------\n\n //-----------------------------------------\n // Part 4\n stopX = currentPoint.x + v2.nx * lenOut;\n stopY = currentPoint.y + v2.ny * lenOut;\n //-----------------------------------------\n // Part 5\n x = stopX - v2.ny * cRadius * radDirection;\n y = stopY + v2.nx * cRadius * radDirection;\n //-----------------------------------------\n // Additional Part : calculate start point E\n startX = currentPoint.x + v1.nx * lenOut;\n startY = currentPoint.y + v1.ny * lenOut;\n\n // Save last point to avoid recalculating vector when not needed\n lastPoint = currentPoint;\n};\n\n/**\n * Draw corner provided by {@link getRoundCorner}\n *\n * @param ctx :CanvasRenderingContext2D\n * @param roundCorner {{cx:number, cy:number, radius:number, endAngle: number, startAngle: number, counterClockwise: boolean}}\n */\nfunction drawPreparedRoundCorner(ctx, roundCorner) {\n if (roundCorner.radius === 0) ctx.lineTo(roundCorner.cx, roundCorner.cy);else ctx.arc(roundCorner.cx, roundCorner.cy, roundCorner.radius, roundCorner.startAngle, roundCorner.endAngle, roundCorner.counterClockwise);\n}\n\n/**\n * Get round corner from a point and its previous and next neighbours in a path\n *\n * @param previousPoint {{x: number, y:number, radius: number?}}\n * @param currentPoint {{x: number, y:number, radius: number?}}\n * @param nextPoint {{x: number, y:number, radius: number?}}\n * @param radiusMax :number\n * @param isArcRadius :boolean\n * @return {{\n * cx:number, cy:number, radius:number,\n * startX:number, startY:number,\n * stopX:number, stopY: number,\n * endAngle: number, startAngle: number, counterClockwise: boolean\n * }}\n */\nfunction getRoundCorner(previousPoint, currentPoint, nextPoint, radiusMax) {\n var isArcRadius = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n if (radiusMax === 0 || currentPoint.radius === 0) return {\n cx: currentPoint.x,\n cy: currentPoint.y,\n radius: 0,\n startX: currentPoint.x,\n startY: currentPoint.y,\n stopX: currentPoint.x,\n stopY: currentPoint.y,\n startAngle: undefined,\n endAngle: undefined,\n counterClockwise: undefined\n };\n calcCornerArc(previousPoint, currentPoint, nextPoint, radiusMax, isArcRadius);\n return {\n cx: x,\n cy: y,\n radius: cRadius,\n startX: startX,\n startY: startY,\n stopX: stopX,\n stopY: stopY,\n startAngle: v1.ang + Math.PI / 2 * radDirection,\n endAngle: v2.ang - Math.PI / 2 * radDirection,\n counterClockwise: drawDirection\n };\n}\n\nvar BRp$c = {};\nBRp$c.findMidptPtsEtc = function (edge, pairInfo) {\n var posPts = pairInfo.posPts,\n intersectionPts = pairInfo.intersectionPts,\n vectorNormInverse = pairInfo.vectorNormInverse;\n var midptPts;\n\n // n.b. assumes all edges in bezier bundle have same endpoints specified\n var srcManEndpt = edge.pstyle('source-endpoint');\n var tgtManEndpt = edge.pstyle('target-endpoint');\n var haveManualEndPts = srcManEndpt.units != null && tgtManEndpt.units != null;\n var recalcVectorNormInverse = function recalcVectorNormInverse(x1, y1, x2, y2) {\n var dy = y2 - y1;\n var dx = x2 - x1;\n var l = Math.sqrt(dx * dx + dy * dy);\n return {\n x: -dy / l,\n y: dx / l\n };\n };\n var edgeDistances = edge.pstyle('edge-distances').value;\n switch (edgeDistances) {\n case 'node-position':\n midptPts = posPts;\n break;\n case 'intersection':\n midptPts = intersectionPts;\n break;\n case 'endpoints':\n {\n if (haveManualEndPts) {\n var _this$manualEndptToPx = this.manualEndptToPx(edge.source()[0], srcManEndpt),\n _this$manualEndptToPx2 = _slicedToArray(_this$manualEndptToPx, 2),\n x1 = _this$manualEndptToPx2[0],\n y1 = _this$manualEndptToPx2[1];\n var _this$manualEndptToPx3 = this.manualEndptToPx(edge.target()[0], tgtManEndpt),\n _this$manualEndptToPx4 = _slicedToArray(_this$manualEndptToPx3, 2),\n x2 = _this$manualEndptToPx4[0],\n y2 = _this$manualEndptToPx4[1];\n var endPts = {\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2\n };\n vectorNormInverse = recalcVectorNormInverse(x1, y1, x2, y2);\n midptPts = endPts;\n } else {\n warn(\"Edge \".concat(edge.id(), \" has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).\"));\n midptPts = intersectionPts; // back to default\n }\n\n break;\n }\n }\n return {\n midptPts: midptPts,\n vectorNormInverse: vectorNormInverse\n };\n};\nBRp$c.findHaystackPoints = function (edges) {\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var _p = edge._private;\n var rs = _p.rscratch;\n if (!rs.haystack) {\n var angle = Math.random() * 2 * Math.PI;\n rs.source = {\n x: Math.cos(angle),\n y: Math.sin(angle)\n };\n angle = Math.random() * 2 * Math.PI;\n rs.target = {\n x: Math.cos(angle),\n y: Math.sin(angle)\n };\n }\n var src = _p.source;\n var tgt = _p.target;\n var srcPos = src.position();\n var tgtPos = tgt.position();\n var srcW = src.width();\n var tgtW = tgt.width();\n var srcH = src.height();\n var tgtH = tgt.height();\n var radius = edge.pstyle('haystack-radius').value;\n var halfRadius = radius / 2; // b/c have to half width/height\n\n rs.haystackPts = rs.allpts = [rs.source.x * srcW * halfRadius + srcPos.x, rs.source.y * srcH * halfRadius + srcPos.y, rs.target.x * tgtW * halfRadius + tgtPos.x, rs.target.y * tgtH * halfRadius + tgtPos.y];\n rs.midX = (rs.allpts[0] + rs.allpts[2]) / 2;\n rs.midY = (rs.allpts[1] + rs.allpts[3]) / 2;\n\n // always override as haystack in case set to different type previously\n rs.edgeType = 'haystack';\n rs.haystack = true;\n this.storeEdgeProjections(edge);\n this.calculateArrowAngles(edge);\n this.recalculateEdgeLabelProjections(edge);\n this.calculateLabelAngles(edge);\n }\n};\nBRp$c.findSegmentsPoints = function (edge, pairInfo) {\n // Segments (multiple straight lines)\n\n var rs = edge._private.rscratch;\n var segmentWs = edge.pstyle('segment-weights');\n var segmentDs = edge.pstyle('segment-distances');\n var segmentRs = edge.pstyle('segment-radii');\n var segmentTs = edge.pstyle('radius-type');\n var segmentsN = Math.min(segmentWs.pfValue.length, segmentDs.pfValue.length);\n var lastRadius = segmentRs.pfValue[segmentRs.pfValue.length - 1];\n var lastRadiusType = segmentTs.pfValue[segmentTs.pfValue.length - 1];\n rs.edgeType = 'segments';\n rs.segpts = [];\n rs.radii = [];\n rs.isArcRadius = [];\n for (var s = 0; s < segmentsN; s++) {\n var w = segmentWs.pfValue[s];\n var d = segmentDs.pfValue[s];\n var w1 = 1 - w;\n var w2 = w;\n var _this$findMidptPtsEtc = this.findMidptPtsEtc(edge, pairInfo),\n midptPts = _this$findMidptPtsEtc.midptPts,\n vectorNormInverse = _this$findMidptPtsEtc.vectorNormInverse;\n var adjustedMidpt = {\n x: midptPts.x1 * w1 + midptPts.x2 * w2,\n y: midptPts.y1 * w1 + midptPts.y2 * w2\n };\n rs.segpts.push(adjustedMidpt.x + vectorNormInverse.x * d, adjustedMidpt.y + vectorNormInverse.y * d);\n rs.radii.push(segmentRs.pfValue[s] !== undefined ? segmentRs.pfValue[s] : lastRadius);\n rs.isArcRadius.push((segmentTs.pfValue[s] !== undefined ? segmentTs.pfValue[s] : lastRadiusType) === 'arc-radius');\n }\n};\nBRp$c.findLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) {\n // Self-edge\n\n var rs = edge._private.rscratch;\n var dirCounts = pairInfo.dirCounts,\n srcPos = pairInfo.srcPos;\n var ctrlptDists = edge.pstyle('control-point-distances');\n var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined;\n var loopDir = edge.pstyle('loop-direction').pfValue;\n var loopSwp = edge.pstyle('loop-sweep').pfValue;\n var stepSize = edge.pstyle('control-point-step-size').pfValue;\n rs.edgeType = 'self';\n var j = i;\n var loopDist = stepSize;\n if (edgeIsUnbundled) {\n j = 0;\n loopDist = ctrlptDist;\n }\n var loopAngle = loopDir - Math.PI / 2;\n var outAngle = loopAngle - loopSwp / 2;\n var inAngle = loopAngle + loopSwp / 2;\n\n // increase by step size for overlapping loops, keyed on direction and sweep values\n var dc = String(loopDir + '_' + loopSwp);\n j = dirCounts[dc] === undefined ? dirCounts[dc] = 0 : ++dirCounts[dc];\n rs.ctrlpts = [srcPos.x + Math.cos(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.x + Math.cos(inAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(inAngle) * 1.4 * loopDist * (j / 3 + 1)];\n};\nBRp$c.findCompoundLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) {\n // Compound edge\n\n var rs = edge._private.rscratch;\n rs.edgeType = 'compound';\n var srcPos = pairInfo.srcPos,\n tgtPos = pairInfo.tgtPos,\n srcW = pairInfo.srcW,\n srcH = pairInfo.srcH,\n tgtW = pairInfo.tgtW,\n tgtH = pairInfo.tgtH;\n var stepSize = edge.pstyle('control-point-step-size').pfValue;\n var ctrlptDists = edge.pstyle('control-point-distances');\n var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined;\n var j = i;\n var loopDist = stepSize;\n if (edgeIsUnbundled) {\n j = 0;\n loopDist = ctrlptDist;\n }\n var loopW = 50;\n var loopaPos = {\n x: srcPos.x - srcW / 2,\n y: srcPos.y - srcH / 2\n };\n var loopbPos = {\n x: tgtPos.x - tgtW / 2,\n y: tgtPos.y - tgtH / 2\n };\n var loopPos = {\n x: Math.min(loopaPos.x, loopbPos.x),\n y: Math.min(loopaPos.y, loopbPos.y)\n };\n\n // avoids cases with impossible beziers\n var minCompoundStretch = 0.5;\n var compoundStretchA = Math.max(minCompoundStretch, Math.log(srcW * 0.01));\n var compoundStretchB = Math.max(minCompoundStretch, Math.log(tgtW * 0.01));\n rs.ctrlpts = [loopPos.x, loopPos.y - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchA, loopPos.x - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchB, loopPos.y];\n};\nBRp$c.findStraightEdgePoints = function (edge) {\n // Straight edge within bundle\n\n edge._private.rscratch.edgeType = 'straight';\n};\nBRp$c.findBezierPoints = function (edge, pairInfo, i, edgeIsUnbundled, edgeIsSwapped) {\n var rs = edge._private.rscratch;\n var stepSize = edge.pstyle('control-point-step-size').pfValue;\n var ctrlptDists = edge.pstyle('control-point-distances');\n var ctrlptWs = edge.pstyle('control-point-weights');\n var bezierN = ctrlptDists && ctrlptWs ? Math.min(ctrlptDists.value.length, ctrlptWs.value.length) : 1;\n var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined;\n var ctrlptWeight = ctrlptWs.value[0];\n\n // (Multi)bezier\n\n var multi = edgeIsUnbundled;\n rs.edgeType = multi ? 'multibezier' : 'bezier';\n rs.ctrlpts = [];\n for (var b = 0; b < bezierN; b++) {\n var normctrlptDist = (0.5 - pairInfo.eles.length / 2 + i) * stepSize * (edgeIsSwapped ? -1 : 1);\n var manctrlptDist = void 0;\n var sign = signum(normctrlptDist);\n if (multi) {\n ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[b] : stepSize; // fall back on step size\n ctrlptWeight = ctrlptWs.value[b];\n }\n if (edgeIsUnbundled) {\n // multi or single unbundled\n manctrlptDist = ctrlptDist;\n } else {\n manctrlptDist = ctrlptDist !== undefined ? sign * ctrlptDist : undefined;\n }\n var distanceFromMidpoint = manctrlptDist !== undefined ? manctrlptDist : normctrlptDist;\n var w1 = 1 - ctrlptWeight;\n var w2 = ctrlptWeight;\n var _this$findMidptPtsEtc2 = this.findMidptPtsEtc(edge, pairInfo),\n midptPts = _this$findMidptPtsEtc2.midptPts,\n vectorNormInverse = _this$findMidptPtsEtc2.vectorNormInverse;\n var adjustedMidpt = {\n x: midptPts.x1 * w1 + midptPts.x2 * w2,\n y: midptPts.y1 * w1 + midptPts.y2 * w2\n };\n rs.ctrlpts.push(adjustedMidpt.x + vectorNormInverse.x * distanceFromMidpoint, adjustedMidpt.y + vectorNormInverse.y * distanceFromMidpoint);\n }\n};\nBRp$c.findTaxiPoints = function (edge, pairInfo) {\n // Taxicab geometry with two turns maximum\n\n var rs = edge._private.rscratch;\n rs.edgeType = 'segments';\n var VERTICAL = 'vertical';\n var HORIZONTAL = 'horizontal';\n var LEFTWARD = 'leftward';\n var RIGHTWARD = 'rightward';\n var DOWNWARD = 'downward';\n var UPWARD = 'upward';\n var AUTO = 'auto';\n var posPts = pairInfo.posPts,\n srcW = pairInfo.srcW,\n srcH = pairInfo.srcH,\n tgtW = pairInfo.tgtW,\n tgtH = pairInfo.tgtH;\n var edgeDistances = edge.pstyle('edge-distances').value;\n var dIncludesNodeBody = edgeDistances !== 'node-position';\n var taxiDir = edge.pstyle('taxi-direction').value;\n var rawTaxiDir = taxiDir; // unprocessed value\n var taxiTurn = edge.pstyle('taxi-turn');\n var turnIsPercent = taxiTurn.units === '%';\n var taxiTurnPfVal = taxiTurn.pfValue;\n var turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side\n var minD = edge.pstyle('taxi-turn-min-distance').pfValue;\n var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0;\n var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0;\n var pdx = posPts.x2 - posPts.x1;\n var pdy = posPts.y2 - posPts.y1;\n\n // take away the effective w/h from the magnitude of the delta value\n var subDWH = function subDWH(dxy, dwh) {\n if (dxy > 0) {\n return Math.max(dxy - dwh, 0);\n } else {\n return Math.min(dxy + dwh, 0);\n }\n };\n var dx = subDWH(pdx, dw);\n var dy = subDWH(pdy, dh);\n var isExplicitDir = false;\n if (rawTaxiDir === AUTO) {\n taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL;\n } else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) {\n taxiDir = VERTICAL;\n isExplicitDir = true;\n } else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) {\n taxiDir = HORIZONTAL;\n isExplicitDir = true;\n }\n var isVert = taxiDir === VERTICAL;\n var l = isVert ? dy : dx;\n var pl = isVert ? pdy : pdx;\n var sgnL = signum(pl);\n var forcedDir = false;\n if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction\n && (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) {\n sgnL *= -1;\n l = sgnL * Math.abs(l);\n forcedDir = true;\n }\n var d;\n if (turnIsPercent) {\n var p = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal;\n d = p * l;\n } else {\n var k = taxiTurnPfVal < 0 ? l : 0;\n d = k + taxiTurnPfVal * sgnL;\n }\n var getIsTooClose = function getIsTooClose(d) {\n return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l);\n };\n var isTooCloseSrc = getIsTooClose(d);\n var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d));\n var isTooClose = isTooCloseSrc || isTooCloseTgt;\n if (isTooClose && !forcedDir) {\n // non-ideal routing\n if (isVert) {\n // vertical fallbacks\n var lShapeInsideSrc = Math.abs(pl) <= srcH / 2;\n var lShapeInsideTgt = Math.abs(pdx) <= tgtW / 2;\n if (lShapeInsideSrc) {\n // horizontal Z-shape (direction not respected)\n var x = (posPts.x1 + posPts.x2) / 2;\n var y1 = posPts.y1,\n y2 = posPts.y2;\n rs.segpts = [x, y1, x, y2];\n } else if (lShapeInsideTgt) {\n // vertical Z-shape (distance not respected)\n var y = (posPts.y1 + posPts.y2) / 2;\n var x1 = posPts.x1,\n x2 = posPts.x2;\n rs.segpts = [x1, y, x2, y];\n } else {\n // L-shape fallback (turn distance not respected, but works well with tree siblings)\n rs.segpts = [posPts.x1, posPts.y2];\n }\n } else {\n // horizontal fallbacks\n var _lShapeInsideSrc = Math.abs(pl) <= srcW / 2;\n var _lShapeInsideTgt = Math.abs(pdy) <= tgtH / 2;\n if (_lShapeInsideSrc) {\n // vertical Z-shape (direction not respected)\n var _y = (posPts.y1 + posPts.y2) / 2;\n var _x = posPts.x1,\n _x2 = posPts.x2;\n rs.segpts = [_x, _y, _x2, _y];\n } else if (_lShapeInsideTgt) {\n // horizontal Z-shape (turn distance not respected)\n var _x3 = (posPts.x1 + posPts.x2) / 2;\n var _y2 = posPts.y1,\n _y3 = posPts.y2;\n rs.segpts = [_x3, _y2, _x3, _y3];\n } else {\n // L-shape (turn distance not respected, but works well for tree siblings)\n rs.segpts = [posPts.x2, posPts.y1];\n }\n }\n } else {\n // ideal routing\n if (isVert) {\n var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0);\n var _x4 = posPts.x1,\n _x5 = posPts.x2;\n rs.segpts = [_x4, _y4, _x5, _y4];\n } else {\n // horizontal\n var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0);\n var _y5 = posPts.y1,\n _y6 = posPts.y2;\n rs.segpts = [_x6, _y5, _x6, _y6];\n }\n }\n if (rs.isRound) {\n var radius = edge.pstyle('taxi-radius').value;\n var isArcRadius = edge.pstyle('radius-type').value[0] === 'arc-radius';\n rs.radii = new Array(rs.segpts.length / 2).fill(radius);\n rs.isArcRadius = new Array(rs.segpts.length / 2).fill(isArcRadius);\n }\n};\nBRp$c.tryToCorrectInvalidPoints = function (edge, pairInfo) {\n var rs = edge._private.rscratch;\n\n // can only correct beziers for now...\n if (rs.edgeType === 'bezier') {\n var srcPos = pairInfo.srcPos,\n tgtPos = pairInfo.tgtPos,\n srcW = pairInfo.srcW,\n srcH = pairInfo.srcH,\n tgtW = pairInfo.tgtW,\n tgtH = pairInfo.tgtH,\n srcShape = pairInfo.srcShape,\n tgtShape = pairInfo.tgtShape,\n srcCornerRadius = pairInfo.srcCornerRadius,\n tgtCornerRadius = pairInfo.tgtCornerRadius,\n srcRs = pairInfo.srcRs,\n tgtRs = pairInfo.tgtRs;\n var badStart = !number$1(rs.startX) || !number$1(rs.startY);\n var badAStart = !number$1(rs.arrowStartX) || !number$1(rs.arrowStartY);\n var badEnd = !number$1(rs.endX) || !number$1(rs.endY);\n var badAEnd = !number$1(rs.arrowEndX) || !number$1(rs.arrowEndY);\n var minCpADistFactor = 3;\n var arrowW = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth;\n var minCpADist = minCpADistFactor * arrowW;\n var startACpDist = dist({\n x: rs.ctrlpts[0],\n y: rs.ctrlpts[1]\n }, {\n x: rs.startX,\n y: rs.startY\n });\n var closeStartACp = startACpDist < minCpADist;\n var endACpDist = dist({\n x: rs.ctrlpts[0],\n y: rs.ctrlpts[1]\n }, {\n x: rs.endX,\n y: rs.endY\n });\n var closeEndACp = endACpDist < minCpADist;\n var overlapping = false;\n if (badStart || badAStart || closeStartACp) {\n overlapping = true;\n\n // project control point along line from src centre to outside the src shape\n // (otherwise intersection will yield nothing)\n var cpD = {\n // delta\n x: rs.ctrlpts[0] - srcPos.x,\n y: rs.ctrlpts[1] - srcPos.y\n };\n var cpL = Math.sqrt(cpD.x * cpD.x + cpD.y * cpD.y); // length of line\n var cpM = {\n // normalised delta\n x: cpD.x / cpL,\n y: cpD.y / cpL\n };\n var radius = Math.max(srcW, srcH);\n var cpProj = {\n // *2 radius guarantees outside shape\n x: rs.ctrlpts[0] + cpM.x * 2 * radius,\n y: rs.ctrlpts[1] + cpM.y * 2 * radius\n };\n var srcCtrlPtIntn = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, cpProj.x, cpProj.y, 0, srcCornerRadius, srcRs);\n if (closeStartACp) {\n rs.ctrlpts[0] = rs.ctrlpts[0] + cpM.x * (minCpADist - startACpDist);\n rs.ctrlpts[1] = rs.ctrlpts[1] + cpM.y * (minCpADist - startACpDist);\n } else {\n rs.ctrlpts[0] = srcCtrlPtIntn[0] + cpM.x * minCpADist;\n rs.ctrlpts[1] = srcCtrlPtIntn[1] + cpM.y * minCpADist;\n }\n }\n if (badEnd || badAEnd || closeEndACp) {\n overlapping = true;\n\n // project control point along line from tgt centre to outside the tgt shape\n // (otherwise intersection will yield nothing)\n var _cpD = {\n // delta\n x: rs.ctrlpts[0] - tgtPos.x,\n y: rs.ctrlpts[1] - tgtPos.y\n };\n var _cpL = Math.sqrt(_cpD.x * _cpD.x + _cpD.y * _cpD.y); // length of line\n var _cpM = {\n // normalised delta\n x: _cpD.x / _cpL,\n y: _cpD.y / _cpL\n };\n var _radius = Math.max(srcW, srcH);\n var _cpProj = {\n // *2 radius guarantees outside shape\n x: rs.ctrlpts[0] + _cpM.x * 2 * _radius,\n y: rs.ctrlpts[1] + _cpM.y * 2 * _radius\n };\n var tgtCtrlPtIntn = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, _cpProj.x, _cpProj.y, 0, tgtCornerRadius, tgtRs);\n if (closeEndACp) {\n rs.ctrlpts[0] = rs.ctrlpts[0] + _cpM.x * (minCpADist - endACpDist);\n rs.ctrlpts[1] = rs.ctrlpts[1] + _cpM.y * (minCpADist - endACpDist);\n } else {\n rs.ctrlpts[0] = tgtCtrlPtIntn[0] + _cpM.x * minCpADist;\n rs.ctrlpts[1] = tgtCtrlPtIntn[1] + _cpM.y * minCpADist;\n }\n }\n if (overlapping) {\n // recalc endpts\n this.findEndpoints(edge);\n }\n }\n};\nBRp$c.storeAllpts = function (edge) {\n var rs = edge._private.rscratch;\n if (rs.edgeType === 'multibezier' || rs.edgeType === 'bezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') {\n rs.allpts = [];\n rs.allpts.push(rs.startX, rs.startY);\n for (var b = 0; b + 1 < rs.ctrlpts.length; b += 2) {\n // ctrl pt itself\n rs.allpts.push(rs.ctrlpts[b], rs.ctrlpts[b + 1]);\n\n // the midpt between ctrlpts as intermediate destination pts\n if (b + 3 < rs.ctrlpts.length) {\n rs.allpts.push((rs.ctrlpts[b] + rs.ctrlpts[b + 2]) / 2, (rs.ctrlpts[b + 1] + rs.ctrlpts[b + 3]) / 2);\n }\n }\n rs.allpts.push(rs.endX, rs.endY);\n var m, mt;\n if (rs.ctrlpts.length / 2 % 2 === 0) {\n m = rs.allpts.length / 2 - 1;\n rs.midX = rs.allpts[m];\n rs.midY = rs.allpts[m + 1];\n } else {\n m = rs.allpts.length / 2 - 3;\n mt = 0.5;\n rs.midX = qbezierAt(rs.allpts[m], rs.allpts[m + 2], rs.allpts[m + 4], mt);\n rs.midY = qbezierAt(rs.allpts[m + 1], rs.allpts[m + 3], rs.allpts[m + 5], mt);\n }\n } else if (rs.edgeType === 'straight') {\n // need to calc these after endpts\n rs.allpts = [rs.startX, rs.startY, rs.endX, rs.endY];\n\n // default midpt for labels etc\n rs.midX = (rs.startX + rs.endX + rs.arrowStartX + rs.arrowEndX) / 4;\n rs.midY = (rs.startY + rs.endY + rs.arrowStartY + rs.arrowEndY) / 4;\n } else if (rs.edgeType === 'segments') {\n rs.allpts = [];\n rs.allpts.push(rs.startX, rs.startY);\n rs.allpts.push.apply(rs.allpts, rs.segpts);\n rs.allpts.push(rs.endX, rs.endY);\n if (rs.isRound) {\n rs.roundCorners = [];\n for (var i = 2; i + 3 < rs.allpts.length; i += 2) {\n var radius = rs.radii[i / 2 - 1];\n var isArcRadius = rs.isArcRadius[i / 2 - 1];\n rs.roundCorners.push(getRoundCorner({\n x: rs.allpts[i - 2],\n y: rs.allpts[i - 1]\n }, {\n x: rs.allpts[i],\n y: rs.allpts[i + 1],\n radius: radius\n }, {\n x: rs.allpts[i + 2],\n y: rs.allpts[i + 3]\n }, radius, isArcRadius));\n }\n }\n if (rs.segpts.length % 4 === 0) {\n var i2 = rs.segpts.length / 2;\n var i1 = i2 - 2;\n rs.midX = (rs.segpts[i1] + rs.segpts[i2]) / 2;\n rs.midY = (rs.segpts[i1 + 1] + rs.segpts[i2 + 1]) / 2;\n } else {\n var _i = rs.segpts.length / 2 - 1;\n if (!rs.isRound) {\n rs.midX = rs.segpts[_i];\n rs.midY = rs.segpts[_i + 1];\n } else {\n var point = {\n x: rs.segpts[_i],\n y: rs.segpts[_i + 1]\n };\n var corner = rs.roundCorners[_i / 2];\n var v = [point.x - corner.cx, point.y - corner.cy];\n var factor = corner.radius / Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));\n v = v.map(function (c) {\n return c * factor;\n });\n rs.midX = corner.cx + v[0];\n rs.midY = corner.cy + v[1];\n rs.midVector = v;\n }\n }\n }\n};\nBRp$c.checkForInvalidEdgeWarning = function (edge) {\n var rs = edge[0]._private.rscratch;\n if (rs.nodesOverlap || number$1(rs.startX) && number$1(rs.startY) && number$1(rs.endX) && number$1(rs.endY)) {\n rs.loggedErr = false;\n } else {\n if (!rs.loggedErr) {\n rs.loggedErr = true;\n warn('Edge `' + edge.id() + '` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap.');\n }\n }\n};\nBRp$c.findEdgeControlPoints = function (edges) {\n var _this = this;\n if (!edges || edges.length === 0) {\n return;\n }\n var r = this;\n var cy = r.cy;\n var hasCompounds = cy.hasCompoundNodes();\n var hashTable = {\n map: new Map$2(),\n get: function get(pairId) {\n var map2 = this.map.get(pairId[0]);\n if (map2 != null) {\n return map2.get(pairId[1]);\n } else {\n return null;\n }\n },\n set: function set(pairId, val) {\n var map2 = this.map.get(pairId[0]);\n if (map2 == null) {\n map2 = new Map$2();\n this.map.set(pairId[0], map2);\n }\n map2.set(pairId[1], val);\n }\n };\n var pairIds = [];\n var haystackEdges = [];\n\n // create a table of edge (src, tgt) => list of edges between them\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var _p = edge._private;\n var curveStyle = edge.pstyle('curve-style').value;\n\n // ignore edges who are not to be displayed\n // they shouldn't take up space\n if (edge.removed() || !edge.takesUpSpace()) {\n continue;\n }\n if (curveStyle === 'haystack') {\n haystackEdges.push(edge);\n continue;\n }\n var edgeIsUnbundled = curveStyle === 'unbundled-bezier' || curveStyle.endsWith('segments') || curveStyle === 'straight' || curveStyle === 'straight-triangle' || curveStyle.endsWith('taxi');\n var edgeIsBezier = curveStyle === 'unbundled-bezier' || curveStyle === 'bezier';\n var src = _p.source;\n var tgt = _p.target;\n var srcIndex = src.poolIndex();\n var tgtIndex = tgt.poolIndex();\n var pairId = [srcIndex, tgtIndex].sort();\n var tableEntry = hashTable.get(pairId);\n if (tableEntry == null) {\n tableEntry = {\n eles: []\n };\n hashTable.set(pairId, tableEntry);\n pairIds.push(pairId);\n }\n tableEntry.eles.push(edge);\n if (edgeIsUnbundled) {\n tableEntry.hasUnbundled = true;\n }\n if (edgeIsBezier) {\n tableEntry.hasBezier = true;\n }\n }\n\n // for each pair (src, tgt), create the ctrl pts\n // Nested for loop is OK; total number of iterations for both loops = edgeCount\n var _loop = function _loop(p) {\n var pairId = pairIds[p];\n var pairInfo = hashTable.get(pairId);\n var swappedpairInfo = void 0;\n if (!pairInfo.hasUnbundled) {\n var pllEdges = pairInfo.eles[0].parallelEdges().filter(function (e) {\n return e.isBundledBezier();\n });\n clearArray(pairInfo.eles);\n pllEdges.forEach(function (edge) {\n return pairInfo.eles.push(edge);\n });\n\n // for each pair id, the edges should be sorted by index\n pairInfo.eles.sort(function (edge1, edge2) {\n return edge1.poolIndex() - edge2.poolIndex();\n });\n }\n var firstEdge = pairInfo.eles[0];\n var src = firstEdge.source();\n var tgt = firstEdge.target();\n\n // make sure src/tgt distinction is consistent w.r.t. pairId\n if (src.poolIndex() > tgt.poolIndex()) {\n var temp = src;\n src = tgt;\n tgt = temp;\n }\n var srcPos = pairInfo.srcPos = src.position();\n var tgtPos = pairInfo.tgtPos = tgt.position();\n var srcW = pairInfo.srcW = src.outerWidth();\n var srcH = pairInfo.srcH = src.outerHeight();\n var tgtW = pairInfo.tgtW = tgt.outerWidth();\n var tgtH = pairInfo.tgtH = tgt.outerHeight();\n var srcShape = pairInfo.srcShape = r.nodeShapes[_this.getNodeShape(src)];\n var tgtShape = pairInfo.tgtShape = r.nodeShapes[_this.getNodeShape(tgt)];\n var srcCornerRadius = pairInfo.srcCornerRadius = src.pstyle('corner-radius').value === 'auto' ? 'auto' : src.pstyle('corner-radius').pfValue;\n var tgtCornerRadius = pairInfo.tgtCornerRadius = tgt.pstyle('corner-radius').value === 'auto' ? 'auto' : tgt.pstyle('corner-radius').pfValue;\n var tgtRs = pairInfo.tgtRs = tgt._private.rscratch;\n var srcRs = pairInfo.srcRs = src._private.rscratch;\n pairInfo.dirCounts = {\n 'north': 0,\n 'west': 0,\n 'south': 0,\n 'east': 0,\n 'northwest': 0,\n 'southwest': 0,\n 'northeast': 0,\n 'southeast': 0\n };\n for (var _i2 = 0; _i2 < pairInfo.eles.length; _i2++) {\n var _edge = pairInfo.eles[_i2];\n var rs = _edge[0]._private.rscratch;\n var _curveStyle = _edge.pstyle('curve-style').value;\n var _edgeIsUnbundled = _curveStyle === 'unbundled-bezier' || _curveStyle.endsWith('segments') || _curveStyle.endsWith('taxi');\n\n // whether the normalised pair order is the reverse of the edge's src-tgt order\n var edgeIsSwapped = !src.same(_edge.source());\n if (!pairInfo.calculatedIntersection && src !== tgt && (pairInfo.hasBezier || pairInfo.hasUnbundled)) {\n pairInfo.calculatedIntersection = true;\n\n // pt outside src shape to calc distance/displacement from src to tgt\n var srcOutside = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, tgtPos.x, tgtPos.y, 0, srcCornerRadius, srcRs);\n var srcIntn = pairInfo.srcIntn = srcOutside;\n\n // pt outside tgt shape to calc distance/displacement from src to tgt\n var tgtOutside = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, srcPos.x, srcPos.y, 0, tgtCornerRadius, tgtRs);\n var tgtIntn = pairInfo.tgtIntn = tgtOutside;\n var intersectionPts = pairInfo.intersectionPts = {\n x1: srcOutside[0],\n x2: tgtOutside[0],\n y1: srcOutside[1],\n y2: tgtOutside[1]\n };\n var posPts = pairInfo.posPts = {\n x1: srcPos.x,\n x2: tgtPos.x,\n y1: srcPos.y,\n y2: tgtPos.y\n };\n var dy = tgtOutside[1] - srcOutside[1];\n var dx = tgtOutside[0] - srcOutside[0];\n var l = Math.sqrt(dx * dx + dy * dy);\n var vector = pairInfo.vector = {\n x: dx,\n y: dy\n };\n var vectorNorm = pairInfo.vectorNorm = {\n x: vector.x / l,\n y: vector.y / l\n };\n var vectorNormInverse = {\n x: -vectorNorm.y,\n y: vectorNorm.x\n };\n\n // if node shapes overlap, then no ctrl pts to draw\n pairInfo.nodesOverlap = !number$1(l) || tgtShape.checkPoint(srcOutside[0], srcOutside[1], 0, tgtW, tgtH, tgtPos.x, tgtPos.y, tgtCornerRadius, tgtRs) || srcShape.checkPoint(tgtOutside[0], tgtOutside[1], 0, srcW, srcH, srcPos.x, srcPos.y, srcCornerRadius, srcRs);\n pairInfo.vectorNormInverse = vectorNormInverse;\n swappedpairInfo = {\n nodesOverlap: pairInfo.nodesOverlap,\n dirCounts: pairInfo.dirCounts,\n calculatedIntersection: true,\n hasBezier: pairInfo.hasBezier,\n hasUnbundled: pairInfo.hasUnbundled,\n eles: pairInfo.eles,\n srcPos: tgtPos,\n tgtPos: srcPos,\n srcW: tgtW,\n srcH: tgtH,\n tgtW: srcW,\n tgtH: srcH,\n srcIntn: tgtIntn,\n tgtIntn: srcIntn,\n srcShape: tgtShape,\n tgtShape: srcShape,\n posPts: {\n x1: posPts.x2,\n y1: posPts.y2,\n x2: posPts.x1,\n y2: posPts.y1\n },\n intersectionPts: {\n x1: intersectionPts.x2,\n y1: intersectionPts.y2,\n x2: intersectionPts.x1,\n y2: intersectionPts.y1\n },\n vector: {\n x: -vector.x,\n y: -vector.y\n },\n vectorNorm: {\n x: -vectorNorm.x,\n y: -vectorNorm.y\n },\n vectorNormInverse: {\n x: -vectorNormInverse.x,\n y: -vectorNormInverse.y\n }\n };\n }\n var passedPairInfo = edgeIsSwapped ? swappedpairInfo : pairInfo;\n rs.nodesOverlap = passedPairInfo.nodesOverlap;\n rs.srcIntn = passedPairInfo.srcIntn;\n rs.tgtIntn = passedPairInfo.tgtIntn;\n rs.isRound = _curveStyle.startsWith('round');\n if (hasCompounds && (src.isParent() || src.isChild() || tgt.isParent() || tgt.isChild()) && (src.parents().anySame(tgt) || tgt.parents().anySame(src) || src.same(tgt) && src.isParent())) {\n _this.findCompoundLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled);\n } else if (src === tgt) {\n _this.findLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled);\n } else if (_curveStyle.endsWith('segments')) {\n _this.findSegmentsPoints(_edge, passedPairInfo);\n } else if (_curveStyle.endsWith('taxi')) {\n _this.findTaxiPoints(_edge, passedPairInfo);\n } else if (_curveStyle === 'straight' || !_edgeIsUnbundled && pairInfo.eles.length % 2 === 1 && _i2 === Math.floor(pairInfo.eles.length / 2)) {\n _this.findStraightEdgePoints(_edge);\n } else {\n _this.findBezierPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled, edgeIsSwapped);\n }\n _this.findEndpoints(_edge);\n _this.tryToCorrectInvalidPoints(_edge, passedPairInfo);\n _this.checkForInvalidEdgeWarning(_edge);\n _this.storeAllpts(_edge);\n _this.storeEdgeProjections(_edge);\n _this.calculateArrowAngles(_edge);\n _this.recalculateEdgeLabelProjections(_edge);\n _this.calculateLabelAngles(_edge);\n } // for pair edges\n };\n for (var p = 0; p < pairIds.length; p++) {\n _loop(p);\n } // for pair ids\n\n // haystacks avoid the expense of pairInfo stuff (intersections etc.)\n this.findHaystackPoints(haystackEdges);\n};\nfunction getPts(pts) {\n var retPts = [];\n if (pts == null) {\n return;\n }\n for (var i = 0; i < pts.length; i += 2) {\n var x = pts[i];\n var y = pts[i + 1];\n retPts.push({\n x: x,\n y: y\n });\n }\n return retPts;\n}\nBRp$c.getSegmentPoints = function (edge) {\n var rs = edge[0]._private.rscratch;\n var type = rs.edgeType;\n if (type === 'segments') {\n this.recalculateRenderedStyle(edge);\n return getPts(rs.segpts);\n }\n};\nBRp$c.getControlPoints = function (edge) {\n var rs = edge[0]._private.rscratch;\n var type = rs.edgeType;\n if (type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound') {\n this.recalculateRenderedStyle(edge);\n return getPts(rs.ctrlpts);\n }\n};\nBRp$c.getEdgeMidpoint = function (edge) {\n var rs = edge[0]._private.rscratch;\n this.recalculateRenderedStyle(edge);\n return {\n x: rs.midX,\n y: rs.midY\n };\n};\n\nvar BRp$b = {};\nBRp$b.manualEndptToPx = function (node, prop) {\n var r = this;\n var npos = node.position();\n var w = node.outerWidth();\n var h = node.outerHeight();\n var rs = node._private.rscratch;\n if (prop.value.length === 2) {\n var p = [prop.pfValue[0], prop.pfValue[1]];\n if (prop.units[0] === '%') {\n p[0] = p[0] * w;\n }\n if (prop.units[1] === '%') {\n p[1] = p[1] * h;\n }\n p[0] += npos.x;\n p[1] += npos.y;\n return p;\n } else {\n var angle = prop.pfValue[0];\n angle = -Math.PI / 2 + angle; // start at 12 o'clock\n\n var l = 2 * Math.max(w, h);\n var _p = [npos.x + Math.cos(angle) * l, npos.y + Math.sin(angle) * l];\n return r.nodeShapes[this.getNodeShape(node)].intersectLine(npos.x, npos.y, w, h, _p[0], _p[1], 0, node.pstyle('corner-radius').value === 'auto' ? 'auto' : node.pstyle('corner-radius').pfValue, rs);\n }\n};\nBRp$b.findEndpoints = function (edge) {\n var r = this;\n var intersect;\n var source = edge.source()[0];\n var target = edge.target()[0];\n var srcPos = source.position();\n var tgtPos = target.position();\n var tgtArShape = edge.pstyle('target-arrow-shape').value;\n var srcArShape = edge.pstyle('source-arrow-shape').value;\n var tgtDist = edge.pstyle('target-distance-from-node').pfValue;\n var srcDist = edge.pstyle('source-distance-from-node').pfValue;\n var srcRs = source._private.rscratch;\n var tgtRs = target._private.rscratch;\n var curveStyle = edge.pstyle('curve-style').value;\n var rs = edge._private.rscratch;\n var et = rs.edgeType;\n var taxi = curveStyle === 'taxi';\n var self = et === 'self' || et === 'compound';\n var bezier = et === 'bezier' || et === 'multibezier' || self;\n var multi = et !== 'bezier';\n var lines = et === 'straight' || et === 'segments';\n var segments = et === 'segments';\n var hasEndpts = bezier || multi || lines;\n var overrideEndpts = self || taxi;\n var srcManEndpt = edge.pstyle('source-endpoint');\n var srcManEndptVal = overrideEndpts ? 'outside-to-node' : srcManEndpt.value;\n var srcCornerRadius = source.pstyle('corner-radius').value === 'auto' ? 'auto' : source.pstyle('corner-radius').pfValue;\n var tgtManEndpt = edge.pstyle('target-endpoint');\n var tgtManEndptVal = overrideEndpts ? 'outside-to-node' : tgtManEndpt.value;\n var tgtCornerRadius = target.pstyle('corner-radius').value === 'auto' ? 'auto' : target.pstyle('corner-radius').pfValue;\n rs.srcManEndpt = srcManEndpt;\n rs.tgtManEndpt = tgtManEndpt;\n var p1; // last known point of edge on target side\n var p2; // last known point of edge on source side\n\n var p1_i; // point to intersect with target shape\n var p2_i; // point to intersect with source shape\n\n if (bezier) {\n var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]];\n var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart;\n p1 = cpEnd;\n p2 = cpStart;\n } else if (lines) {\n var srcArrowFromPt = !segments ? [tgtPos.x, tgtPos.y] : rs.segpts.slice(0, 2);\n var tgtArrowFromPt = !segments ? [srcPos.x, srcPos.y] : rs.segpts.slice(rs.segpts.length - 2);\n p1 = tgtArrowFromPt;\n p2 = srcArrowFromPt;\n }\n if (tgtManEndptVal === 'inside-to-node') {\n intersect = [tgtPos.x, tgtPos.y];\n } else if (tgtManEndpt.units) {\n intersect = this.manualEndptToPx(target, tgtManEndpt);\n } else if (tgtManEndptVal === 'outside-to-line') {\n intersect = rs.tgtIntn; // use cached value from ctrlpt calc\n } else {\n if (tgtManEndptVal === 'outside-to-node' || tgtManEndptVal === 'outside-to-node-or-label') {\n p1_i = p1;\n } else if (tgtManEndptVal === 'outside-to-line' || tgtManEndptVal === 'outside-to-line-or-label') {\n p1_i = [srcPos.x, srcPos.y];\n }\n intersect = r.nodeShapes[this.getNodeShape(target)].intersectLine(tgtPos.x, tgtPos.y, target.outerWidth(), target.outerHeight(), p1_i[0], p1_i[1], 0, tgtCornerRadius, tgtRs);\n if (tgtManEndptVal === 'outside-to-node-or-label' || tgtManEndptVal === 'outside-to-line-or-label') {\n var trs = target._private.rscratch;\n var lw = trs.labelWidth;\n var lh = trs.labelHeight;\n var lx = trs.labelX;\n var ly = trs.labelY;\n var lw2 = lw / 2;\n var lh2 = lh / 2;\n var va = target.pstyle('text-valign').value;\n if (va === 'top') {\n ly -= lh2;\n } else if (va === 'bottom') {\n ly += lh2;\n }\n var ha = target.pstyle('text-halign').value;\n if (ha === 'left') {\n lx -= lw2;\n } else if (ha === 'right') {\n lx += lw2;\n }\n var labelIntersect = polygonIntersectLine(p1_i[0], p1_i[1], [lx - lw2, ly - lh2, lx + lw2, ly - lh2, lx + lw2, ly + lh2, lx - lw2, ly + lh2], tgtPos.x, tgtPos.y);\n if (labelIntersect.length > 0) {\n var refPt = srcPos;\n var intSqdist = sqdist(refPt, array2point(intersect));\n var labIntSqdist = sqdist(refPt, array2point(labelIntersect));\n var minSqDist = intSqdist;\n if (labIntSqdist < intSqdist) {\n intersect = labelIntersect;\n minSqDist = labIntSqdist;\n }\n if (labelIntersect.length > 2) {\n var labInt2SqDist = sqdist(refPt, {\n x: labelIntersect[2],\n y: labelIntersect[3]\n });\n if (labInt2SqDist < minSqDist) {\n intersect = [labelIntersect[2], labelIntersect[3]];\n }\n }\n }\n }\n }\n var arrowEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].spacing(edge) + tgtDist);\n var edgeEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].gap(edge) + tgtDist);\n rs.endX = edgeEnd[0];\n rs.endY = edgeEnd[1];\n rs.arrowEndX = arrowEnd[0];\n rs.arrowEndY = arrowEnd[1];\n if (srcManEndptVal === 'inside-to-node') {\n intersect = [srcPos.x, srcPos.y];\n } else if (srcManEndpt.units) {\n intersect = this.manualEndptToPx(source, srcManEndpt);\n } else if (srcManEndptVal === 'outside-to-line') {\n intersect = rs.srcIntn; // use cached value from ctrlpt calc\n } else {\n if (srcManEndptVal === 'outside-to-node' || srcManEndptVal === 'outside-to-node-or-label') {\n p2_i = p2;\n } else if (srcManEndptVal === 'outside-to-line' || srcManEndptVal === 'outside-to-line-or-label') {\n p2_i = [tgtPos.x, tgtPos.y];\n }\n intersect = r.nodeShapes[this.getNodeShape(source)].intersectLine(srcPos.x, srcPos.y, source.outerWidth(), source.outerHeight(), p2_i[0], p2_i[1], 0, srcCornerRadius, srcRs);\n if (srcManEndptVal === 'outside-to-node-or-label' || srcManEndptVal === 'outside-to-line-or-label') {\n var srs = source._private.rscratch;\n var _lw = srs.labelWidth;\n var _lh = srs.labelHeight;\n var _lx = srs.labelX;\n var _ly = srs.labelY;\n var _lw2 = _lw / 2;\n var _lh2 = _lh / 2;\n var _va = source.pstyle('text-valign').value;\n if (_va === 'top') {\n _ly -= _lh2;\n } else if (_va === 'bottom') {\n _ly += _lh2;\n }\n var _ha = source.pstyle('text-halign').value;\n if (_ha === 'left') {\n _lx -= _lw2;\n } else if (_ha === 'right') {\n _lx += _lw2;\n }\n var _labelIntersect = polygonIntersectLine(p2_i[0], p2_i[1], [_lx - _lw2, _ly - _lh2, _lx + _lw2, _ly - _lh2, _lx + _lw2, _ly + _lh2, _lx - _lw2, _ly + _lh2], srcPos.x, srcPos.y);\n if (_labelIntersect.length > 0) {\n var _refPt = tgtPos;\n var _intSqdist = sqdist(_refPt, array2point(intersect));\n var _labIntSqdist = sqdist(_refPt, array2point(_labelIntersect));\n var _minSqDist = _intSqdist;\n if (_labIntSqdist < _intSqdist) {\n intersect = [_labelIntersect[0], _labelIntersect[1]];\n _minSqDist = _labIntSqdist;\n }\n if (_labelIntersect.length > 2) {\n var _labInt2SqDist = sqdist(_refPt, {\n x: _labelIntersect[2],\n y: _labelIntersect[3]\n });\n if (_labInt2SqDist < _minSqDist) {\n intersect = [_labelIntersect[2], _labelIntersect[3]];\n }\n }\n }\n }\n }\n var arrowStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].spacing(edge) + srcDist);\n var edgeStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].gap(edge) + srcDist);\n rs.startX = edgeStart[0];\n rs.startY = edgeStart[1];\n rs.arrowStartX = arrowStart[0];\n rs.arrowStartY = arrowStart[1];\n if (hasEndpts) {\n if (!number$1(rs.startX) || !number$1(rs.startY) || !number$1(rs.endX) || !number$1(rs.endY)) {\n rs.badLine = true;\n } else {\n rs.badLine = false;\n }\n }\n};\nBRp$b.getSourceEndpoint = function (edge) {\n var rs = edge[0]._private.rscratch;\n this.recalculateRenderedStyle(edge);\n switch (rs.edgeType) {\n case 'haystack':\n return {\n x: rs.haystackPts[0],\n y: rs.haystackPts[1]\n };\n default:\n return {\n x: rs.arrowStartX,\n y: rs.arrowStartY\n };\n }\n};\nBRp$b.getTargetEndpoint = function (edge) {\n var rs = edge[0]._private.rscratch;\n this.recalculateRenderedStyle(edge);\n switch (rs.edgeType) {\n case 'haystack':\n return {\n x: rs.haystackPts[2],\n y: rs.haystackPts[3]\n };\n default:\n return {\n x: rs.arrowEndX,\n y: rs.arrowEndY\n };\n }\n};\n\nvar BRp$a = {};\nfunction pushBezierPts(r, edge, pts) {\n var qbezierAt$1 = function qbezierAt$1(p1, p2, p3, t) {\n return qbezierAt(p1, p2, p3, t);\n };\n var _p = edge._private;\n var bpts = _p.rstyle.bezierPts;\n for (var i = 0; i < r.bezierProjPcts.length; i++) {\n var p = r.bezierProjPcts[i];\n bpts.push({\n x: qbezierAt$1(pts[0], pts[2], pts[4], p),\n y: qbezierAt$1(pts[1], pts[3], pts[5], p)\n });\n }\n}\nBRp$a.storeEdgeProjections = function (edge) {\n var _p = edge._private;\n var rs = _p.rscratch;\n var et = rs.edgeType;\n\n // clear the cached points state\n _p.rstyle.bezierPts = null;\n _p.rstyle.linePts = null;\n _p.rstyle.haystackPts = null;\n if (et === 'multibezier' || et === 'bezier' || et === 'self' || et === 'compound') {\n _p.rstyle.bezierPts = [];\n for (var i = 0; i + 5 < rs.allpts.length; i += 4) {\n pushBezierPts(this, edge, rs.allpts.slice(i, i + 6));\n }\n } else if (et === 'segments') {\n var lpts = _p.rstyle.linePts = [];\n for (var i = 0; i + 1 < rs.allpts.length; i += 2) {\n lpts.push({\n x: rs.allpts[i],\n y: rs.allpts[i + 1]\n });\n }\n } else if (et === 'haystack') {\n var hpts = rs.haystackPts;\n _p.rstyle.haystackPts = [{\n x: hpts[0],\n y: hpts[1]\n }, {\n x: hpts[2],\n y: hpts[3]\n }];\n }\n _p.rstyle.arrowWidth = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth;\n};\nBRp$a.recalculateEdgeProjections = function (edges) {\n this.findEdgeControlPoints(edges);\n};\n\nvar BRp$9 = {};\nBRp$9.recalculateNodeLabelProjection = function (node) {\n var content = node.pstyle('label').strValue;\n if (emptyString(content)) {\n return;\n }\n var textX, textY;\n var _p = node._private;\n var nodeWidth = node.width();\n var nodeHeight = node.height();\n var padding = node.padding();\n var nodePos = node.position();\n var textHalign = node.pstyle('text-halign').strValue;\n var textValign = node.pstyle('text-valign').strValue;\n var rs = _p.rscratch;\n var rstyle = _p.rstyle;\n switch (textHalign) {\n case 'left':\n textX = nodePos.x - nodeWidth / 2 - padding;\n break;\n case 'right':\n textX = nodePos.x + nodeWidth / 2 + padding;\n break;\n default:\n // e.g. center\n textX = nodePos.x;\n }\n switch (textValign) {\n case 'top':\n textY = nodePos.y - nodeHeight / 2 - padding;\n break;\n case 'bottom':\n textY = nodePos.y + nodeHeight / 2 + padding;\n break;\n default:\n // e.g. middle\n textY = nodePos.y;\n }\n rs.labelX = textX;\n rs.labelY = textY;\n rstyle.labelX = textX;\n rstyle.labelY = textY;\n this.calculateLabelAngles(node);\n this.applyLabelDimensions(node);\n};\nvar lineAngleFromDelta = function lineAngleFromDelta(dx, dy) {\n var angle = Math.atan(dy / dx);\n if (dx === 0 && angle < 0) {\n angle = angle * -1;\n }\n return angle;\n};\nvar lineAngle = function lineAngle(p0, p1) {\n var dx = p1.x - p0.x;\n var dy = p1.y - p0.y;\n return lineAngleFromDelta(dx, dy);\n};\nvar bezierAngle = function bezierAngle(p0, p1, p2, t) {\n var t0 = bound(0, t - 0.001, 1);\n var t1 = bound(0, t + 0.001, 1);\n var lp0 = qbezierPtAt(p0, p1, p2, t0);\n var lp1 = qbezierPtAt(p0, p1, p2, t1);\n return lineAngle(lp0, lp1);\n};\nBRp$9.recalculateEdgeLabelProjections = function (edge) {\n var p;\n var _p = edge._private;\n var rs = _p.rscratch;\n var r = this;\n var content = {\n mid: edge.pstyle('label').strValue,\n source: edge.pstyle('source-label').strValue,\n target: edge.pstyle('target-label').strValue\n };\n if (content.mid || content.source || content.target) ; else {\n return; // no labels => no calcs\n }\n\n // add center point to style so bounding box calculations can use it\n //\n p = {\n x: rs.midX,\n y: rs.midY\n };\n var setRs = function setRs(propName, prefix, value) {\n setPrefixedProperty(_p.rscratch, propName, prefix, value);\n setPrefixedProperty(_p.rstyle, propName, prefix, value);\n };\n setRs('labelX', null, p.x);\n setRs('labelY', null, p.y);\n var midAngle = lineAngleFromDelta(rs.midDispX, rs.midDispY);\n setRs('labelAutoAngle', null, midAngle);\n var createControlPointInfo = function createControlPointInfo() {\n if (createControlPointInfo.cache) {\n return createControlPointInfo.cache;\n } // use cache so only 1x per edge\n\n var ctrlpts = [];\n\n // store each ctrlpt info init\n for (var i = 0; i + 5 < rs.allpts.length; i += 4) {\n var p0 = {\n x: rs.allpts[i],\n y: rs.allpts[i + 1]\n };\n var p1 = {\n x: rs.allpts[i + 2],\n y: rs.allpts[i + 3]\n }; // ctrlpt\n var p2 = {\n x: rs.allpts[i + 4],\n y: rs.allpts[i + 5]\n };\n ctrlpts.push({\n p0: p0,\n p1: p1,\n p2: p2,\n startDist: 0,\n length: 0,\n segments: []\n });\n }\n var bpts = _p.rstyle.bezierPts;\n var nProjs = r.bezierProjPcts.length;\n function addSegment(cp, p0, p1, t0, t1) {\n var length = dist(p0, p1);\n var prevSegment = cp.segments[cp.segments.length - 1];\n var segment = {\n p0: p0,\n p1: p1,\n t0: t0,\n t1: t1,\n startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0,\n length: length\n };\n cp.segments.push(segment);\n cp.length += length;\n }\n\n // update each ctrlpt with segment info\n for (var _i = 0; _i < ctrlpts.length; _i++) {\n var cp = ctrlpts[_i];\n var prevCp = ctrlpts[_i - 1];\n if (prevCp) {\n cp.startDist = prevCp.startDist + prevCp.length;\n }\n addSegment(cp, cp.p0, bpts[_i * nProjs], 0, r.bezierProjPcts[0]); // first\n\n for (var j = 0; j < nProjs - 1; j++) {\n addSegment(cp, bpts[_i * nProjs + j], bpts[_i * nProjs + j + 1], r.bezierProjPcts[j], r.bezierProjPcts[j + 1]);\n }\n addSegment(cp, bpts[_i * nProjs + nProjs - 1], cp.p2, r.bezierProjPcts[nProjs - 1], 1); // last\n }\n\n return createControlPointInfo.cache = ctrlpts;\n };\n var calculateEndProjection = function calculateEndProjection(prefix) {\n var angle;\n var isSrc = prefix === 'source';\n if (!content[prefix]) {\n return;\n }\n var offset = edge.pstyle(prefix + '-text-offset').pfValue;\n switch (rs.edgeType) {\n case 'self':\n case 'compound':\n case 'bezier':\n case 'multibezier':\n {\n var cps = createControlPointInfo();\n var selected;\n var startDist = 0;\n var totalDist = 0;\n\n // find the segment we're on\n for (var i = 0; i < cps.length; i++) {\n var _cp = cps[isSrc ? i : cps.length - 1 - i];\n for (var j = 0; j < _cp.segments.length; j++) {\n var _seg = _cp.segments[isSrc ? j : _cp.segments.length - 1 - j];\n var lastSeg = i === cps.length - 1 && j === _cp.segments.length - 1;\n startDist = totalDist;\n totalDist += _seg.length;\n if (totalDist >= offset || lastSeg) {\n selected = {\n cp: _cp,\n segment: _seg\n };\n break;\n }\n }\n if (selected) {\n break;\n }\n }\n var cp = selected.cp;\n var seg = selected.segment;\n var tSegment = (offset - startDist) / seg.length;\n var segDt = seg.t1 - seg.t0;\n var t = isSrc ? seg.t0 + segDt * tSegment : seg.t1 - segDt * tSegment;\n t = bound(0, t, 1);\n p = qbezierPtAt(cp.p0, cp.p1, cp.p2, t);\n angle = bezierAngle(cp.p0, cp.p1, cp.p2, t);\n break;\n }\n case 'straight':\n case 'segments':\n case 'haystack':\n {\n var d = 0,\n di,\n d0;\n var p0, p1;\n var l = rs.allpts.length;\n for (var _i2 = 0; _i2 + 3 < l; _i2 += 2) {\n if (isSrc) {\n p0 = {\n x: rs.allpts[_i2],\n y: rs.allpts[_i2 + 1]\n };\n p1 = {\n x: rs.allpts[_i2 + 2],\n y: rs.allpts[_i2 + 3]\n };\n } else {\n p0 = {\n x: rs.allpts[l - 2 - _i2],\n y: rs.allpts[l - 1 - _i2]\n };\n p1 = {\n x: rs.allpts[l - 4 - _i2],\n y: rs.allpts[l - 3 - _i2]\n };\n }\n di = dist(p0, p1);\n d0 = d;\n d += di;\n if (d >= offset) {\n break;\n }\n }\n var pD = offset - d0;\n var _t = pD / di;\n _t = bound(0, _t, 1);\n p = lineAt(p0, p1, _t);\n angle = lineAngle(p0, p1);\n break;\n }\n }\n setRs('labelX', prefix, p.x);\n setRs('labelY', prefix, p.y);\n setRs('labelAutoAngle', prefix, angle);\n };\n calculateEndProjection('source');\n calculateEndProjection('target');\n this.applyLabelDimensions(edge);\n};\nBRp$9.applyLabelDimensions = function (ele) {\n this.applyPrefixedLabelDimensions(ele);\n if (ele.isEdge()) {\n this.applyPrefixedLabelDimensions(ele, 'source');\n this.applyPrefixedLabelDimensions(ele, 'target');\n }\n};\nBRp$9.applyPrefixedLabelDimensions = function (ele, prefix) {\n var _p = ele._private;\n var text = this.getLabelText(ele, prefix);\n var labelDims = this.calculateLabelDimensions(ele, text);\n var lineHeight = ele.pstyle('line-height').pfValue;\n var textWrap = ele.pstyle('text-wrap').strValue;\n var lines = getPrefixedProperty(_p.rscratch, 'labelWrapCachedLines', prefix) || [];\n var numLines = textWrap !== 'wrap' ? 1 : Math.max(lines.length, 1);\n var normPerLineHeight = labelDims.height / numLines;\n var labelLineHeight = normPerLineHeight * lineHeight;\n var width = labelDims.width;\n var height = labelDims.height + (numLines - 1) * (lineHeight - 1) * normPerLineHeight;\n setPrefixedProperty(_p.rstyle, 'labelWidth', prefix, width);\n setPrefixedProperty(_p.rscratch, 'labelWidth', prefix, width);\n setPrefixedProperty(_p.rstyle, 'labelHeight', prefix, height);\n setPrefixedProperty(_p.rscratch, 'labelHeight', prefix, height);\n setPrefixedProperty(_p.rscratch, 'labelLineHeight', prefix, labelLineHeight);\n};\nBRp$9.getLabelText = function (ele, prefix) {\n var _p = ele._private;\n var pfd = prefix ? prefix + '-' : '';\n var text = ele.pstyle(pfd + 'label').strValue;\n var textTransform = ele.pstyle('text-transform').value;\n var rscratch = function rscratch(propName, value) {\n if (value) {\n setPrefixedProperty(_p.rscratch, propName, prefix, value);\n return value;\n } else {\n return getPrefixedProperty(_p.rscratch, propName, prefix);\n }\n };\n\n // for empty text, skip all processing\n if (!text) {\n return '';\n }\n if (textTransform == 'none') ; else if (textTransform == 'uppercase') {\n text = text.toUpperCase();\n } else if (textTransform == 'lowercase') {\n text = text.toLowerCase();\n }\n var wrapStyle = ele.pstyle('text-wrap').value;\n if (wrapStyle === 'wrap') {\n var labelKey = rscratch('labelKey');\n\n // save recalc if the label is the same as before\n if (labelKey != null && rscratch('labelWrapKey') === labelKey) {\n return rscratch('labelWrapCachedText');\n }\n var zwsp = \"\\u200B\";\n var lines = text.split('\\n');\n var maxW = ele.pstyle('text-max-width').pfValue;\n var overflow = ele.pstyle('text-overflow-wrap').value;\n var overflowAny = overflow === 'anywhere';\n var wrappedLines = [];\n var separatorRegex = /[\\s\\u200b]+|$/g; // Include end of string to add last word\n\n for (var l = 0; l < lines.length; l++) {\n var line = lines[l];\n var lineDims = this.calculateLabelDimensions(ele, line);\n var lineW = lineDims.width;\n if (overflowAny) {\n var processedLine = line.split('').join(zwsp);\n line = processedLine;\n }\n if (lineW > maxW) {\n // line is too long\n var separatorMatches = line.matchAll(separatorRegex);\n var subline = '';\n var previousIndex = 0;\n // Add fake match\n var _iterator = _createForOfIteratorHelper(separatorMatches),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var separatorMatch = _step.value;\n var wordSeparator = separatorMatch[0];\n var word = line.substring(previousIndex, separatorMatch.index);\n previousIndex = separatorMatch.index + wordSeparator.length;\n var testLine = subline.length === 0 ? word : subline + word + wordSeparator;\n var testDims = this.calculateLabelDimensions(ele, testLine);\n var testW = testDims.width;\n if (testW <= maxW) {\n // word fits on current line\n subline += word + wordSeparator;\n } else {\n // word starts new line\n if (subline) {\n wrappedLines.push(subline);\n }\n subline = word + wordSeparator;\n }\n }\n\n // if there's remaining text, put it in a wrapped line\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n if (!subline.match(/^[\\s\\u200b]+$/)) {\n wrappedLines.push(subline);\n }\n } else {\n // line is already short enough\n wrappedLines.push(line);\n }\n } // for\n\n rscratch('labelWrapCachedLines', wrappedLines);\n text = rscratch('labelWrapCachedText', wrappedLines.join('\\n'));\n rscratch('labelWrapKey', labelKey);\n } else if (wrapStyle === 'ellipsis') {\n var _maxW = ele.pstyle('text-max-width').pfValue;\n var ellipsized = '';\n var ellipsis = \"\\u2026\";\n var incLastCh = false;\n if (this.calculateLabelDimensions(ele, text).width < _maxW) {\n // the label already fits\n return text;\n }\n for (var i = 0; i < text.length; i++) {\n var widthWithNextCh = this.calculateLabelDimensions(ele, ellipsized + text[i] + ellipsis).width;\n if (widthWithNextCh > _maxW) {\n break;\n }\n ellipsized += text[i];\n if (i === text.length - 1) {\n incLastCh = true;\n }\n }\n if (!incLastCh) {\n ellipsized += ellipsis;\n }\n return ellipsized;\n } // if ellipsize\n\n return text;\n};\nBRp$9.getLabelJustification = function (ele) {\n var justification = ele.pstyle('text-justification').strValue;\n var textHalign = ele.pstyle('text-halign').strValue;\n if (justification === 'auto') {\n if (ele.isNode()) {\n switch (textHalign) {\n case 'left':\n return 'right';\n case 'right':\n return 'left';\n default:\n return 'center';\n }\n } else {\n return 'center';\n }\n } else {\n return justification;\n }\n};\nBRp$9.calculateLabelDimensions = function (ele, text) {\n var r = this;\n var containerWindow = r.cy.window();\n var document = containerWindow.document;\n var cacheKey = hashString(text, ele._private.labelDimsKey);\n var cache = r.labelDimCache || (r.labelDimCache = []);\n var existingVal = cache[cacheKey];\n if (existingVal != null) {\n return existingVal;\n }\n var padding = 0; // add padding around text dims, as the measurement isn't that accurate\n var fStyle = ele.pstyle('font-style').strValue;\n var size = ele.pstyle('font-size').pfValue;\n var family = ele.pstyle('font-family').strValue;\n var weight = ele.pstyle('font-weight').strValue;\n var canvas = this.labelCalcCanvas;\n var c2d = this.labelCalcCanvasContext;\n if (!canvas) {\n canvas = this.labelCalcCanvas = document.createElement('canvas');\n c2d = this.labelCalcCanvasContext = canvas.getContext('2d');\n var ds = canvas.style;\n ds.position = 'absolute';\n ds.left = '-9999px';\n ds.top = '-9999px';\n ds.zIndex = '-1';\n ds.visibility = 'hidden';\n ds.pointerEvents = 'none';\n }\n c2d.font = \"\".concat(fStyle, \" \").concat(weight, \" \").concat(size, \"px \").concat(family);\n var width = 0;\n var height = 0;\n var lines = text.split('\\n');\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n var metrics = c2d.measureText(line);\n var w = Math.ceil(metrics.width);\n var h = size;\n width = Math.max(w, width);\n height += h;\n }\n width += padding;\n height += padding;\n return cache[cacheKey] = {\n width: width,\n height: height\n };\n};\nBRp$9.calculateLabelAngle = function (ele, prefix) {\n var _p = ele._private;\n var rs = _p.rscratch;\n var isEdge = ele.isEdge();\n var prefixDash = prefix ? prefix + '-' : '';\n var rot = ele.pstyle(prefixDash + 'text-rotation');\n var rotStr = rot.strValue;\n if (rotStr === 'none') {\n return 0;\n } else if (isEdge && rotStr === 'autorotate') {\n return rs.labelAutoAngle;\n } else if (rotStr === 'autorotate') {\n return 0;\n } else {\n return rot.pfValue;\n }\n};\nBRp$9.calculateLabelAngles = function (ele) {\n var r = this;\n var isEdge = ele.isEdge();\n var _p = ele._private;\n var rs = _p.rscratch;\n rs.labelAngle = r.calculateLabelAngle(ele);\n if (isEdge) {\n rs.sourceLabelAngle = r.calculateLabelAngle(ele, 'source');\n rs.targetLabelAngle = r.calculateLabelAngle(ele, 'target');\n }\n};\n\nvar BRp$8 = {};\nvar TOO_SMALL_CUT_RECT = 28;\nvar warnedCutRect = false;\nBRp$8.getNodeShape = function (node) {\n var r = this;\n var shape = node.pstyle('shape').value;\n if (shape === 'cutrectangle' && (node.width() < TOO_SMALL_CUT_RECT || node.height() < TOO_SMALL_CUT_RECT)) {\n if (!warnedCutRect) {\n warn('The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead');\n warnedCutRect = true;\n }\n return 'rectangle';\n }\n if (node.isParent()) {\n if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'round-rectangle' || shape === 'cutrectangle' || shape === 'cut-rectangle' || shape === 'barrel') {\n return shape;\n } else {\n return 'rectangle';\n }\n }\n if (shape === 'polygon') {\n var points = node.pstyle('shape-polygon-points').value;\n return r.nodeShapes.makePolygon(points).name;\n }\n return shape;\n};\n\nvar BRp$7 = {};\nBRp$7.registerCalculationListeners = function () {\n var cy = this.cy;\n var elesToUpdate = cy.collection();\n var r = this;\n var enqueue = function enqueue(eles) {\n var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n elesToUpdate.merge(eles);\n if (dirtyStyleCaches) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _p = ele._private;\n var rstyle = _p.rstyle;\n rstyle.clean = false;\n rstyle.cleanConnected = false;\n }\n }\n };\n r.binder(cy).on('bounds.* dirty.*', function onDirtyBounds(e) {\n var ele = e.target;\n enqueue(ele);\n }).on('style.* background.*', function onDirtyStyle(e) {\n var ele = e.target;\n enqueue(ele, false);\n });\n var updateEleCalcs = function updateEleCalcs(willDraw) {\n if (willDraw) {\n var fns = r.onUpdateEleCalcsFns;\n\n // because we need to have up-to-date style (e.g. stylesheet mappers)\n // before calculating rendered style (and pstyle might not be called yet)\n elesToUpdate.cleanStyle();\n for (var i = 0; i < elesToUpdate.length; i++) {\n var ele = elesToUpdate[i];\n var rstyle = ele._private.rstyle;\n if (ele.isNode() && !rstyle.cleanConnected) {\n enqueue(ele.connectedEdges());\n rstyle.cleanConnected = true;\n }\n }\n if (fns) {\n for (var _i = 0; _i < fns.length; _i++) {\n var fn = fns[_i];\n fn(willDraw, elesToUpdate);\n }\n }\n r.recalculateRenderedStyle(elesToUpdate);\n elesToUpdate = cy.collection();\n }\n };\n r.flushRenderedStyleQueue = function () {\n updateEleCalcs(true);\n };\n r.beforeRender(updateEleCalcs, r.beforeRenderPriorities.eleCalcs);\n};\nBRp$7.onUpdateEleCalcs = function (fn) {\n var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || [];\n fns.push(fn);\n};\nBRp$7.recalculateRenderedStyle = function (eles, useCache) {\n var isCleanConnected = function isCleanConnected(ele) {\n return ele._private.rstyle.cleanConnected;\n };\n var edges = [];\n var nodes = [];\n\n // the renderer can't be used for calcs when destroyed, e.g. ele.boundingBox()\n if (this.destroyed) {\n return;\n }\n\n // use cache by default for perf\n if (useCache === undefined) {\n useCache = true;\n }\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _p = ele._private;\n var rstyle = _p.rstyle;\n\n // an edge may be implicitly dirty b/c of one of its connected nodes\n // (and a request for recalc may come in between frames)\n if (ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target()))) {\n rstyle.clean = false;\n }\n\n // only update if dirty and in graph\n if (useCache && rstyle.clean || ele.removed()) {\n continue;\n }\n\n // only update if not display: none\n if (ele.pstyle('display').value === 'none') {\n continue;\n }\n if (_p.group === 'nodes') {\n nodes.push(ele);\n } else {\n // edges\n edges.push(ele);\n }\n rstyle.clean = true;\n }\n\n // update node data from projections\n for (var _i2 = 0; _i2 < nodes.length; _i2++) {\n var _ele = nodes[_i2];\n var _p2 = _ele._private;\n var _rstyle = _p2.rstyle;\n var pos = _ele.position();\n this.recalculateNodeLabelProjection(_ele);\n _rstyle.nodeX = pos.x;\n _rstyle.nodeY = pos.y;\n _rstyle.nodeW = _ele.pstyle('width').pfValue;\n _rstyle.nodeH = _ele.pstyle('height').pfValue;\n }\n this.recalculateEdgeProjections(edges);\n\n // update edge data from projections\n for (var _i3 = 0; _i3 < edges.length; _i3++) {\n var _ele2 = edges[_i3];\n var _p3 = _ele2._private;\n var _rstyle2 = _p3.rstyle;\n var rs = _p3.rscratch;\n\n // update rstyle positions\n _rstyle2.srcX = rs.arrowStartX;\n _rstyle2.srcY = rs.arrowStartY;\n _rstyle2.tgtX = rs.arrowEndX;\n _rstyle2.tgtY = rs.arrowEndY;\n _rstyle2.midX = rs.midX;\n _rstyle2.midY = rs.midY;\n _rstyle2.labelAngle = rs.labelAngle;\n _rstyle2.sourceLabelAngle = rs.sourceLabelAngle;\n _rstyle2.targetLabelAngle = rs.targetLabelAngle;\n }\n};\n\nvar BRp$6 = {};\nBRp$6.updateCachedGrabbedEles = function () {\n var eles = this.cachedZSortedEles;\n if (!eles) {\n // just let this be recalculated on the next z sort tick\n return;\n }\n eles.drag = [];\n eles.nondrag = [];\n var grabTargets = [];\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var rs = ele._private.rscratch;\n if (ele.grabbed() && !ele.isParent()) {\n grabTargets.push(ele);\n } else if (rs.inDragLayer) {\n eles.drag.push(ele);\n } else {\n eles.nondrag.push(ele);\n }\n }\n\n // put the grab target nodes last so it's on top of its neighbourhood\n for (var i = 0; i < grabTargets.length; i++) {\n var ele = grabTargets[i];\n eles.drag.push(ele);\n }\n};\nBRp$6.invalidateCachedZSortedEles = function () {\n this.cachedZSortedEles = null;\n};\nBRp$6.getCachedZSortedEles = function (forceRecalc) {\n if (forceRecalc || !this.cachedZSortedEles) {\n var eles = this.cy.mutableElements().toArray();\n eles.sort(zIndexSort);\n eles.interactive = eles.filter(function (ele) {\n return ele.interactive();\n });\n this.cachedZSortedEles = eles;\n this.updateCachedGrabbedEles();\n } else {\n eles = this.cachedZSortedEles;\n }\n return eles;\n};\n\nvar BRp$5 = {};\n[BRp$e, BRp$d, BRp$c, BRp$b, BRp$a, BRp$9, BRp$8, BRp$7, BRp$6].forEach(function (props) {\n extend(BRp$5, props);\n});\n\nvar BRp$4 = {};\nBRp$4.getCachedImage = function (url, crossOrigin, onLoad) {\n var r = this;\n var imageCache = r.imageCache = r.imageCache || {};\n var cache = imageCache[url];\n if (cache) {\n if (!cache.image.complete) {\n cache.image.addEventListener('load', onLoad);\n }\n return cache.image;\n } else {\n cache = imageCache[url] = imageCache[url] || {};\n var image = cache.image = new Image(); // eslint-disable-line no-undef\n\n image.addEventListener('load', onLoad);\n image.addEventListener('error', function () {\n image.error = true;\n });\n\n // #1582 safari doesn't load data uris with crossOrigin properly\n // https://bugs.webkit.org/show_bug.cgi?id=123978\n var dataUriPrefix = 'data:';\n var isDataUri = url.substring(0, dataUriPrefix.length).toLowerCase() === dataUriPrefix;\n if (!isDataUri) {\n // if crossorigin is 'null'(stringified), then manually set it to null \n crossOrigin = crossOrigin === 'null' ? null : crossOrigin;\n image.crossOrigin = crossOrigin; // prevent tainted canvas\n }\n\n image.src = url;\n return image;\n }\n};\n\nvar BRp$3 = {};\n\n/* global document, ResizeObserver, MutationObserver */\n\nBRp$3.registerBinding = function (target, event, handler, useCapture) {\n // eslint-disable-line no-unused-vars\n var args = Array.prototype.slice.apply(arguments, [1]); // copy\n var b = this.binder(target);\n return b.on.apply(b, args);\n};\nBRp$3.binder = function (tgt) {\n var r = this;\n var containerWindow = r.cy.window();\n var tgtIsDom = tgt === containerWindow || tgt === containerWindow.document || tgt === containerWindow.document.body || domElement(tgt);\n if (r.supportsPassiveEvents == null) {\n // from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n supportsPassive = true;\n return true;\n }\n });\n containerWindow.addEventListener('test', null, opts);\n } catch (err) {\n // not supported\n }\n r.supportsPassiveEvents = supportsPassive;\n }\n var on = function on(event, handler, useCapture) {\n var args = Array.prototype.slice.call(arguments);\n if (tgtIsDom && r.supportsPassiveEvents) {\n // replace useCapture w/ opts obj\n args[2] = {\n capture: useCapture != null ? useCapture : false,\n passive: false,\n once: false\n };\n }\n r.bindings.push({\n target: tgt,\n args: args\n });\n (tgt.addEventListener || tgt.on).apply(tgt, args);\n return this;\n };\n return {\n on: on,\n addEventListener: on,\n addListener: on,\n bind: on\n };\n};\nBRp$3.nodeIsDraggable = function (node) {\n return node && node.isNode() && !node.locked() && node.grabbable();\n};\nBRp$3.nodeIsGrabbable = function (node) {\n return this.nodeIsDraggable(node) && node.interactive();\n};\nBRp$3.load = function () {\n var r = this;\n var containerWindow = r.cy.window();\n var isSelected = function isSelected(ele) {\n return ele.selected();\n };\n var triggerEvents = function triggerEvents(target, names, e, position) {\n if (target == null) {\n target = r.cy;\n }\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n target.emit({\n originalEvent: e,\n type: name,\n position: position\n });\n }\n };\n var isMultSelKeyDown = function isMultSelKeyDown(e) {\n return e.shiftKey || e.metaKey || e.ctrlKey; // maybe e.altKey\n };\n\n var allowPanningPassthrough = function allowPanningPassthrough(down, downs) {\n var allowPassthrough = true;\n if (r.cy.hasCompoundNodes() && down && down.pannable()) {\n // a grabbable compound node below the ele => no passthrough panning\n for (var i = 0; downs && i < downs.length; i++) {\n var down = downs[i];\n\n //if any parent node in event hierarchy isn't pannable, reject passthrough\n if (down.isNode() && down.isParent() && !down.pannable()) {\n allowPassthrough = false;\n break;\n }\n }\n } else {\n allowPassthrough = true;\n }\n return allowPassthrough;\n };\n var setGrabbed = function setGrabbed(ele) {\n ele[0]._private.grabbed = true;\n };\n var setFreed = function setFreed(ele) {\n ele[0]._private.grabbed = false;\n };\n var setInDragLayer = function setInDragLayer(ele) {\n ele[0]._private.rscratch.inDragLayer = true;\n };\n var setOutDragLayer = function setOutDragLayer(ele) {\n ele[0]._private.rscratch.inDragLayer = false;\n };\n var setGrabTarget = function setGrabTarget(ele) {\n ele[0]._private.rscratch.isGrabTarget = true;\n };\n var removeGrabTarget = function removeGrabTarget(ele) {\n ele[0]._private.rscratch.isGrabTarget = false;\n };\n var addToDragList = function addToDragList(ele, opts) {\n var list = opts.addToList;\n var listHasEle = list.has(ele);\n if (!listHasEle && ele.grabbable() && !ele.locked()) {\n list.merge(ele);\n setGrabbed(ele);\n }\n };\n\n // helper function to determine which child nodes and inner edges\n // of a compound node to be dragged as well as the grabbed and selected nodes\n var addDescendantsToDrag = function addDescendantsToDrag(node, opts) {\n if (!node.cy().hasCompoundNodes()) {\n return;\n }\n if (opts.inDragLayer == null && opts.addToList == null) {\n return;\n } // nothing to do\n\n var innerNodes = node.descendants();\n if (opts.inDragLayer) {\n innerNodes.forEach(setInDragLayer);\n innerNodes.connectedEdges().forEach(setInDragLayer);\n }\n if (opts.addToList) {\n addToDragList(innerNodes, opts);\n }\n };\n\n // adds the given nodes and its neighbourhood to the drag layer\n var addNodesToDrag = function addNodesToDrag(nodes, opts) {\n opts = opts || {};\n var hasCompoundNodes = nodes.cy().hasCompoundNodes();\n if (opts.inDragLayer) {\n nodes.forEach(setInDragLayer);\n nodes.neighborhood().stdFilter(function (ele) {\n return !hasCompoundNodes || ele.isEdge();\n }).forEach(setInDragLayer);\n }\n if (opts.addToList) {\n nodes.forEach(function (ele) {\n addToDragList(ele, opts);\n });\n }\n addDescendantsToDrag(nodes, opts); // always add to drag\n\n // also add nodes and edges related to the topmost ancestor\n updateAncestorsInDragLayer(nodes, {\n inDragLayer: opts.inDragLayer\n });\n r.updateCachedGrabbedEles();\n };\n var addNodeToDrag = addNodesToDrag;\n var freeDraggedElements = function freeDraggedElements(grabbedEles) {\n if (!grabbedEles) {\n return;\n }\n\n // just go over all elements rather than doing a bunch of (possibly expensive) traversals\n r.getCachedZSortedEles().forEach(function (ele) {\n setFreed(ele);\n setOutDragLayer(ele);\n removeGrabTarget(ele);\n });\n r.updateCachedGrabbedEles();\n };\n\n // helper function to determine which ancestor nodes and edges should go\n // to the drag layer (or should be removed from drag layer).\n var updateAncestorsInDragLayer = function updateAncestorsInDragLayer(node, opts) {\n if (opts.inDragLayer == null && opts.addToList == null) {\n return;\n } // nothing to do\n\n if (!node.cy().hasCompoundNodes()) {\n return;\n }\n\n // find top-level parent\n var parent = node.ancestors().orphans();\n\n // no parent node: no nodes to add to the drag layer\n if (parent.same(node)) {\n return;\n }\n var nodes = parent.descendants().spawnSelf().merge(parent).unmerge(node).unmerge(node.descendants());\n var edges = nodes.connectedEdges();\n if (opts.inDragLayer) {\n edges.forEach(setInDragLayer);\n nodes.forEach(setInDragLayer);\n }\n if (opts.addToList) {\n nodes.forEach(function (ele) {\n addToDragList(ele, opts);\n });\n }\n };\n var blurActiveDomElement = function blurActiveDomElement() {\n if (document.activeElement != null && document.activeElement.blur != null) {\n document.activeElement.blur();\n }\n };\n var haveMutationsApi = typeof MutationObserver !== 'undefined';\n var haveResizeObserverApi = typeof ResizeObserver !== 'undefined';\n\n // watch for when the cy container is removed from the dom\n if (haveMutationsApi) {\n r.removeObserver = new MutationObserver(function (mutns) {\n // eslint-disable-line no-undef\n for (var i = 0; i < mutns.length; i++) {\n var mutn = mutns[i];\n var rNodes = mutn.removedNodes;\n if (rNodes) {\n for (var j = 0; j < rNodes.length; j++) {\n var rNode = rNodes[j];\n if (rNode === r.container) {\n r.destroy();\n break;\n }\n }\n }\n }\n });\n if (r.container.parentNode) {\n r.removeObserver.observe(r.container.parentNode, {\n childList: true\n });\n }\n } else {\n r.registerBinding(r.container, 'DOMNodeRemoved', function (e) {\n // eslint-disable-line no-unused-vars\n r.destroy();\n });\n }\n var onResize = debounce_1(function () {\n r.cy.resize();\n }, 100);\n if (haveMutationsApi) {\n r.styleObserver = new MutationObserver(onResize); // eslint-disable-line no-undef\n\n r.styleObserver.observe(r.container, {\n attributes: true\n });\n }\n\n // auto resize\n r.registerBinding(containerWindow, 'resize', onResize); // eslint-disable-line no-undef\n\n if (haveResizeObserverApi) {\n r.resizeObserver = new ResizeObserver(onResize); // eslint-disable-line no-undef\n\n r.resizeObserver.observe(r.container);\n }\n var forEachUp = function forEachUp(domEle, fn) {\n while (domEle != null) {\n fn(domEle);\n domEle = domEle.parentNode;\n }\n };\n var invalidateCoords = function invalidateCoords() {\n r.invalidateContainerClientCoordsCache();\n };\n forEachUp(r.container, function (domEle) {\n r.registerBinding(domEle, 'transitionend', invalidateCoords);\n r.registerBinding(domEle, 'animationend', invalidateCoords);\n r.registerBinding(domEle, 'scroll', invalidateCoords);\n });\n\n // stop right click menu from appearing on cy\n r.registerBinding(r.container, 'contextmenu', function (e) {\n e.preventDefault();\n });\n var inBoxSelection = function inBoxSelection() {\n return r.selection[4] !== 0;\n };\n var eventInContainer = function eventInContainer(e) {\n // save cycles if mouse events aren't to be captured\n var containerPageCoords = r.findContainerClientCoords();\n var x = containerPageCoords[0];\n var y = containerPageCoords[1];\n var width = containerPageCoords[2];\n var height = containerPageCoords[3];\n var positions = e.touches ? e.touches : [e];\n var atLeastOnePosInside = false;\n for (var i = 0; i < positions.length; i++) {\n var p = positions[i];\n if (x <= p.clientX && p.clientX <= x + width && y <= p.clientY && p.clientY <= y + height) {\n atLeastOnePosInside = true;\n break;\n }\n }\n if (!atLeastOnePosInside) {\n return false;\n }\n var container = r.container;\n var target = e.target;\n var tParent = target.parentNode;\n var containerIsTarget = false;\n while (tParent) {\n if (tParent === container) {\n containerIsTarget = true;\n break;\n }\n tParent = tParent.parentNode;\n }\n if (!containerIsTarget) {\n return false;\n } // if target is outisde cy container, then this event is not for us\n\n return true;\n };\n\n // Primary key\n r.registerBinding(r.container, 'mousedown', function mousedownHandler(e) {\n if (!eventInContainer(e)) {\n return;\n }\n\n // during left mouse button gestures, ignore other buttons\n if (r.hoverData.which === 1 && e.which !== 1) {\n return;\n }\n e.preventDefault();\n blurActiveDomElement();\n r.hoverData.capture = true;\n r.hoverData.which = e.which;\n var cy = r.cy;\n var gpos = [e.clientX, e.clientY];\n var pos = r.projectIntoViewport(gpos[0], gpos[1]);\n var select = r.selection;\n var nears = r.findNearestElements(pos[0], pos[1], true, false);\n var near = nears[0];\n var draggedElements = r.dragData.possibleDragElements;\n r.hoverData.mdownPos = pos;\n r.hoverData.mdownGPos = gpos;\n var checkForTaphold = function checkForTaphold() {\n r.hoverData.tapholdCancelled = false;\n clearTimeout(r.hoverData.tapholdTimeout);\n r.hoverData.tapholdTimeout = setTimeout(function () {\n if (r.hoverData.tapholdCancelled) {\n return;\n } else {\n var ele = r.hoverData.down;\n if (ele) {\n ele.emit({\n originalEvent: e,\n type: 'taphold',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n } else {\n cy.emit({\n originalEvent: e,\n type: 'taphold',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }\n }\n }, r.tapholdDuration);\n };\n\n // Right click button\n if (e.which == 3) {\n r.hoverData.cxtStarted = true;\n var cxtEvt = {\n originalEvent: e,\n type: 'cxttapstart',\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n if (near) {\n near.activate();\n near.emit(cxtEvt);\n r.hoverData.down = near;\n } else {\n cy.emit(cxtEvt);\n }\n r.hoverData.downTime = new Date().getTime();\n r.hoverData.cxtDragged = false;\n\n // Primary button\n } else if (e.which == 1) {\n if (near) {\n near.activate();\n }\n\n // Element dragging\n {\n // If something is under the cursor and it is draggable, prepare to grab it\n if (near != null) {\n if (r.nodeIsGrabbable(near)) {\n var makeEvent = function makeEvent(type) {\n return {\n originalEvent: e,\n type: type,\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n };\n var triggerGrab = function triggerGrab(ele) {\n ele.emit(makeEvent('grab'));\n };\n setGrabTarget(near);\n if (!near.selected()) {\n draggedElements = r.dragData.possibleDragElements = cy.collection();\n addNodeToDrag(near, {\n addToList: draggedElements\n });\n near.emit(makeEvent('grabon')).emit(makeEvent('grab'));\n } else {\n draggedElements = r.dragData.possibleDragElements = cy.collection();\n var selectedNodes = cy.$(function (ele) {\n return ele.isNode() && ele.selected() && r.nodeIsGrabbable(ele);\n });\n addNodesToDrag(selectedNodes, {\n addToList: draggedElements\n });\n near.emit(makeEvent('grabon'));\n selectedNodes.forEach(triggerGrab);\n }\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n }\n }\n r.hoverData.down = near;\n r.hoverData.downs = nears;\n r.hoverData.downTime = new Date().getTime();\n }\n triggerEvents(near, ['mousedown', 'tapstart', 'vmousedown'], e, {\n x: pos[0],\n y: pos[1]\n });\n if (near == null) {\n select[4] = 1;\n r.data.bgActivePosistion = {\n x: pos[0],\n y: pos[1]\n };\n r.redrawHint('select', true);\n r.redraw();\n } else if (near.pannable()) {\n select[4] = 1; // for future pan\n }\n\n checkForTaphold();\n }\n\n // Initialize selection box coordinates\n select[0] = select[2] = pos[0];\n select[1] = select[3] = pos[1];\n }, false);\n r.registerBinding(containerWindow, 'mousemove', function mousemoveHandler(e) {\n // eslint-disable-line no-undef\n var capture = r.hoverData.capture;\n if (!capture && !eventInContainer(e)) {\n return;\n }\n var preventDefault = false;\n var cy = r.cy;\n var zoom = cy.zoom();\n var gpos = [e.clientX, e.clientY];\n var pos = r.projectIntoViewport(gpos[0], gpos[1]);\n var mdownPos = r.hoverData.mdownPos;\n var mdownGPos = r.hoverData.mdownGPos;\n var select = r.selection;\n var near = null;\n if (!r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting) {\n near = r.findNearestElement(pos[0], pos[1], true, false);\n }\n var last = r.hoverData.last;\n var down = r.hoverData.down;\n var disp = [pos[0] - select[2], pos[1] - select[3]];\n var draggedElements = r.dragData.possibleDragElements;\n var isOverThresholdDrag;\n if (mdownGPos) {\n var dx = gpos[0] - mdownGPos[0];\n var dx2 = dx * dx;\n var dy = gpos[1] - mdownGPos[1];\n var dy2 = dy * dy;\n var dist2 = dx2 + dy2;\n r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist2 >= r.desktopTapThreshold2;\n }\n var multSelKeyDown = isMultSelKeyDown(e);\n if (isOverThresholdDrag) {\n r.hoverData.tapholdCancelled = true;\n }\n var updateDragDelta = function updateDragDelta() {\n var dragDelta = r.hoverData.dragDelta = r.hoverData.dragDelta || [];\n if (dragDelta.length === 0) {\n dragDelta.push(disp[0]);\n dragDelta.push(disp[1]);\n } else {\n dragDelta[0] += disp[0];\n dragDelta[1] += disp[1];\n }\n };\n preventDefault = true;\n triggerEvents(near, ['mousemove', 'vmousemove', 'tapdrag'], e, {\n x: pos[0],\n y: pos[1]\n });\n var goIntoBoxMode = function goIntoBoxMode() {\n r.data.bgActivePosistion = undefined;\n if (!r.hoverData.selecting) {\n cy.emit({\n originalEvent: e,\n type: 'boxstart',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }\n select[4] = 1;\n r.hoverData.selecting = true;\n r.redrawHint('select', true);\n r.redraw();\n };\n\n // trigger context drag if rmouse down\n if (r.hoverData.which === 3) {\n // but only if over threshold\n if (isOverThresholdDrag) {\n var cxtEvt = {\n originalEvent: e,\n type: 'cxtdrag',\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n if (down) {\n down.emit(cxtEvt);\n } else {\n cy.emit(cxtEvt);\n }\n r.hoverData.cxtDragged = true;\n if (!r.hoverData.cxtOver || near !== r.hoverData.cxtOver) {\n if (r.hoverData.cxtOver) {\n r.hoverData.cxtOver.emit({\n originalEvent: e,\n type: 'cxtdragout',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }\n r.hoverData.cxtOver = near;\n if (near) {\n near.emit({\n originalEvent: e,\n type: 'cxtdragover',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }\n }\n }\n\n // Check if we are drag panning the entire graph\n } else if (r.hoverData.dragging) {\n preventDefault = true;\n if (cy.panningEnabled() && cy.userPanningEnabled()) {\n var deltaP;\n if (r.hoverData.justStartedPan) {\n var mdPos = r.hoverData.mdownPos;\n deltaP = {\n x: (pos[0] - mdPos[0]) * zoom,\n y: (pos[1] - mdPos[1]) * zoom\n };\n r.hoverData.justStartedPan = false;\n } else {\n deltaP = {\n x: disp[0] * zoom,\n y: disp[1] * zoom\n };\n }\n cy.panBy(deltaP);\n cy.emit('dragpan');\n r.hoverData.dragged = true;\n }\n\n // Needs reproject due to pan changing viewport\n pos = r.projectIntoViewport(e.clientX, e.clientY);\n\n // Checks primary button down & out of time & mouse not moved much\n } else if (select[4] == 1 && (down == null || down.pannable())) {\n if (isOverThresholdDrag) {\n if (!r.hoverData.dragging && cy.boxSelectionEnabled() && (multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled())) {\n goIntoBoxMode();\n } else if (!r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled()) {\n var allowPassthrough = allowPanningPassthrough(down, r.hoverData.downs);\n if (allowPassthrough) {\n r.hoverData.dragging = true;\n r.hoverData.justStartedPan = true;\n select[4] = 0;\n r.data.bgActivePosistion = array2point(mdownPos);\n r.redrawHint('select', true);\n r.redraw();\n }\n }\n if (down && down.pannable() && down.active()) {\n down.unactivate();\n }\n }\n } else {\n if (down && down.pannable() && down.active()) {\n down.unactivate();\n }\n if ((!down || !down.grabbed()) && near != last) {\n if (last) {\n triggerEvents(last, ['mouseout', 'tapdragout'], e, {\n x: pos[0],\n y: pos[1]\n });\n }\n if (near) {\n triggerEvents(near, ['mouseover', 'tapdragover'], e, {\n x: pos[0],\n y: pos[1]\n });\n }\n r.hoverData.last = near;\n }\n if (down) {\n if (isOverThresholdDrag) {\n // then we can take action\n\n if (cy.boxSelectionEnabled() && multSelKeyDown) {\n // then selection overrides\n if (down && down.grabbed()) {\n freeDraggedElements(draggedElements);\n down.emit('freeon');\n draggedElements.emit('free');\n if (r.dragData.didDrag) {\n down.emit('dragfreeon');\n draggedElements.emit('dragfree');\n }\n }\n goIntoBoxMode();\n } else if (down && down.grabbed() && r.nodeIsDraggable(down)) {\n // drag node\n var justStartedDrag = !r.dragData.didDrag;\n if (justStartedDrag) {\n r.redrawHint('eles', true);\n }\n r.dragData.didDrag = true; // indicate that we actually did drag the node\n\n // now, add the elements to the drag layer if not done already\n if (!r.hoverData.draggingEles) {\n addNodesToDrag(draggedElements, {\n inDragLayer: true\n });\n }\n var totalShift = {\n x: 0,\n y: 0\n };\n if (number$1(disp[0]) && number$1(disp[1])) {\n totalShift.x += disp[0];\n totalShift.y += disp[1];\n if (justStartedDrag) {\n var dragDelta = r.hoverData.dragDelta;\n if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) {\n totalShift.x += dragDelta[0];\n totalShift.y += dragDelta[1];\n }\n }\n }\n r.hoverData.draggingEles = true;\n draggedElements.silentShift(totalShift).emit('position drag');\n r.redrawHint('drag', true);\n r.redraw();\n }\n } else {\n // otherwise save drag delta for when we actually start dragging so the relative grab pos is constant\n updateDragDelta();\n }\n }\n\n // prevent the dragging from triggering text selection on the page\n preventDefault = true;\n }\n select[2] = pos[0];\n select[3] = pos[1];\n if (preventDefault) {\n if (e.stopPropagation) e.stopPropagation();\n if (e.preventDefault) e.preventDefault();\n return false;\n }\n }, false);\n var clickTimeout, didDoubleClick, prevClickTimeStamp;\n r.registerBinding(containerWindow, 'mouseup', function mouseupHandler(e) {\n // eslint-disable-line no-undef\n // during left mouse button gestures, ignore other buttons\n if (r.hoverData.which === 1 && e.which !== 1 && r.hoverData.capture) {\n return;\n }\n var capture = r.hoverData.capture;\n if (!capture) {\n return;\n }\n r.hoverData.capture = false;\n var cy = r.cy;\n var pos = r.projectIntoViewport(e.clientX, e.clientY);\n var select = r.selection;\n var near = r.findNearestElement(pos[0], pos[1], true, false);\n var draggedElements = r.dragData.possibleDragElements;\n var down = r.hoverData.down;\n var multSelKeyDown = isMultSelKeyDown(e);\n if (r.data.bgActivePosistion) {\n r.redrawHint('select', true);\n r.redraw();\n }\n r.hoverData.tapholdCancelled = true;\n r.data.bgActivePosistion = undefined; // not active bg now\n\n if (down) {\n down.unactivate();\n }\n if (r.hoverData.which === 3) {\n var cxtEvt = {\n originalEvent: e,\n type: 'cxttapend',\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n if (down) {\n down.emit(cxtEvt);\n } else {\n cy.emit(cxtEvt);\n }\n if (!r.hoverData.cxtDragged) {\n var cxtTap = {\n originalEvent: e,\n type: 'cxttap',\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n if (down) {\n down.emit(cxtTap);\n } else {\n cy.emit(cxtTap);\n }\n }\n r.hoverData.cxtDragged = false;\n r.hoverData.which = null;\n } else if (r.hoverData.which === 1) {\n triggerEvents(near, ['mouseup', 'tapend', 'vmouseup'], e, {\n x: pos[0],\n y: pos[1]\n });\n if (!r.dragData.didDrag &&\n // didn't move a node around\n !r.hoverData.dragged &&\n // didn't pan\n !r.hoverData.selecting &&\n // not box selection\n !r.hoverData.isOverThresholdDrag // didn't move too much\n ) {\n triggerEvents(down, [\"click\", \"tap\", \"vclick\"], e, {\n x: pos[0],\n y: pos[1]\n });\n didDoubleClick = false;\n if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) {\n clickTimeout && clearTimeout(clickTimeout);\n didDoubleClick = true;\n prevClickTimeStamp = null;\n triggerEvents(down, [\"dblclick\", \"dbltap\", \"vdblclick\"], e, {\n x: pos[0],\n y: pos[1]\n });\n } else {\n clickTimeout = setTimeout(function () {\n if (didDoubleClick) return;\n triggerEvents(down, [\"oneclick\", \"onetap\", \"voneclick\"], e, {\n x: pos[0],\n y: pos[1]\n });\n }, cy.multiClickDebounceTime());\n prevClickTimeStamp = e.timeStamp;\n }\n }\n\n // Deselect all elements if nothing is currently under the mouse cursor and we aren't dragging something\n if (down == null // not mousedown on node\n && !r.dragData.didDrag // didn't move the node around\n && !r.hoverData.selecting // not box selection\n && !r.hoverData.dragged // didn't pan\n && !isMultSelKeyDown(e)) {\n cy.$(isSelected).unselect(['tapunselect']);\n if (draggedElements.length > 0) {\n r.redrawHint('eles', true);\n }\n r.dragData.possibleDragElements = draggedElements = cy.collection();\n }\n\n // Single selection\n if (near == down && !r.dragData.didDrag && !r.hoverData.selecting) {\n if (near != null && near._private.selectable) {\n if (r.hoverData.dragging) ; else if (cy.selectionType() === 'additive' || multSelKeyDown) {\n if (near.selected()) {\n near.unselect(['tapunselect']);\n } else {\n near.select(['tapselect']);\n }\n } else {\n if (!multSelKeyDown) {\n cy.$(isSelected).unmerge(near).unselect(['tapunselect']);\n near.select(['tapselect']);\n }\n }\n r.redrawHint('eles', true);\n }\n }\n if (r.hoverData.selecting) {\n var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3]));\n r.redrawHint('select', true);\n if (box.length > 0) {\n r.redrawHint('eles', true);\n }\n cy.emit({\n type: 'boxend',\n originalEvent: e,\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n var eleWouldBeSelected = function eleWouldBeSelected(ele) {\n return ele.selectable() && !ele.selected();\n };\n if (cy.selectionType() === 'additive') {\n box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect');\n } else {\n if (!multSelKeyDown) {\n cy.$(isSelected).unmerge(box).unselect();\n }\n box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect');\n }\n\n // always need redraw in case eles unselectable\n r.redraw();\n }\n\n // Cancel drag pan\n if (r.hoverData.dragging) {\n r.hoverData.dragging = false;\n r.redrawHint('select', true);\n r.redrawHint('eles', true);\n r.redraw();\n }\n if (!select[4]) {\n r.redrawHint('drag', true);\n r.redrawHint('eles', true);\n var downWasGrabbed = down && down.grabbed();\n freeDraggedElements(draggedElements);\n if (downWasGrabbed) {\n down.emit('freeon');\n draggedElements.emit('free');\n if (r.dragData.didDrag) {\n down.emit('dragfreeon');\n draggedElements.emit('dragfree');\n }\n }\n }\n } // else not right mouse\n\n select[4] = 0;\n r.hoverData.down = null;\n r.hoverData.cxtStarted = false;\n r.hoverData.draggingEles = false;\n r.hoverData.selecting = false;\n r.hoverData.isOverThresholdDrag = false;\n r.dragData.didDrag = false;\n r.hoverData.dragged = false;\n r.hoverData.dragDelta = [];\n r.hoverData.mdownPos = null;\n r.hoverData.mdownGPos = null;\n r.hoverData.which = null;\n }, false);\n var wheelHandler = function wheelHandler(e) {\n if (r.scrollingPage) {\n return;\n } // while scrolling, ignore wheel-to-zoom\n\n var cy = r.cy;\n var zoom = cy.zoom();\n var pan = cy.pan();\n var pos = r.projectIntoViewport(e.clientX, e.clientY);\n var rpos = [pos[0] * zoom + pan.x, pos[1] * zoom + pan.y];\n if (r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection()) {\n // if pan dragging or cxt dragging, wheel movements make no zoom\n e.preventDefault();\n return;\n }\n if (cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled()) {\n e.preventDefault();\n r.data.wheelZooming = true;\n clearTimeout(r.data.wheelTimeout);\n r.data.wheelTimeout = setTimeout(function () {\n r.data.wheelZooming = false;\n r.redrawHint('eles', true);\n r.redraw();\n }, 150);\n var diff;\n if (e.deltaY != null) {\n diff = e.deltaY / -250;\n } else if (e.wheelDeltaY != null) {\n diff = e.wheelDeltaY / 1000;\n } else {\n diff = e.wheelDelta / 1000;\n }\n diff = diff * r.wheelSensitivity;\n var needsWheelFix = e.deltaMode === 1;\n if (needsWheelFix) {\n // fixes slow wheel events on ff/linux and ff/windows\n diff *= 33;\n }\n var newZoom = cy.zoom() * Math.pow(10, diff);\n if (e.type === 'gesturechange') {\n newZoom = r.gestureStartZoom * e.scale;\n }\n cy.zoom({\n level: newZoom,\n renderedPosition: {\n x: rpos[0],\n y: rpos[1]\n }\n });\n cy.emit(e.type === 'gesturechange' ? 'pinchzoom' : 'scrollzoom');\n }\n };\n\n // Functions to help with whether mouse wheel should trigger zooming\n // --\n r.registerBinding(r.container, 'wheel', wheelHandler, true);\n\n // disable nonstandard wheel events\n // r.registerBinding(r.container, 'mousewheel', wheelHandler, true);\n // r.registerBinding(r.container, 'DOMMouseScroll', wheelHandler, true);\n // r.registerBinding(r.container, 'MozMousePixelScroll', wheelHandler, true); // older firefox\n\n r.registerBinding(containerWindow, 'scroll', function scrollHandler(e) {\n // eslint-disable-line no-unused-vars\n r.scrollingPage = true;\n clearTimeout(r.scrollingPageTimeout);\n r.scrollingPageTimeout = setTimeout(function () {\n r.scrollingPage = false;\n }, 250);\n }, true);\n\n // desktop safari pinch to zoom start\n r.registerBinding(r.container, 'gesturestart', function gestureStartHandler(e) {\n r.gestureStartZoom = r.cy.zoom();\n if (!r.hasTouchStarted) {\n // don't affect touch devices like iphone\n e.preventDefault();\n }\n }, true);\n r.registerBinding(r.container, 'gesturechange', function (e) {\n if (!r.hasTouchStarted) {\n // don't affect touch devices like iphone\n wheelHandler(e);\n }\n }, true);\n\n // Functions to help with handling mouseout/mouseover on the Cytoscape container\n // Handle mouseout on Cytoscape container\n r.registerBinding(r.container, 'mouseout', function mouseOutHandler(e) {\n var pos = r.projectIntoViewport(e.clientX, e.clientY);\n r.cy.emit({\n originalEvent: e,\n type: 'mouseout',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }, false);\n r.registerBinding(r.container, 'mouseover', function mouseOverHandler(e) {\n var pos = r.projectIntoViewport(e.clientX, e.clientY);\n r.cy.emit({\n originalEvent: e,\n type: 'mouseover',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }, false);\n var f1x1, f1y1, f2x1, f2y1; // starting points for pinch-to-zoom\n var distance1, distance1Sq; // initial distance between finger 1 and finger 2 for pinch-to-zoom\n var center1, modelCenter1; // center point on start pinch to zoom\n var offsetLeft, offsetTop;\n var containerWidth, containerHeight;\n var twoFingersStartInside;\n var distance = function distance(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n };\n var distanceSq = function distanceSq(x1, y1, x2, y2) {\n return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);\n };\n var touchstartHandler;\n r.registerBinding(r.container, 'touchstart', touchstartHandler = function touchstartHandler(e) {\n r.hasTouchStarted = true;\n if (!eventInContainer(e)) {\n return;\n }\n blurActiveDomElement();\n r.touchData.capture = true;\n r.data.bgActivePosistion = undefined;\n var cy = r.cy;\n var now = r.touchData.now;\n var earlier = r.touchData.earlier;\n if (e.touches[0]) {\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n if (e.touches[1]) {\n var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY);\n now[2] = pos[0];\n now[3] = pos[1];\n }\n if (e.touches[2]) {\n var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY);\n now[4] = pos[0];\n now[5] = pos[1];\n }\n\n // record starting points for pinch-to-zoom\n if (e.touches[1]) {\n r.touchData.singleTouchMoved = true;\n freeDraggedElements(r.dragData.touchDragEles);\n var offsets = r.findContainerClientCoords();\n offsetLeft = offsets[0];\n offsetTop = offsets[1];\n containerWidth = offsets[2];\n containerHeight = offsets[3];\n f1x1 = e.touches[0].clientX - offsetLeft;\n f1y1 = e.touches[0].clientY - offsetTop;\n f2x1 = e.touches[1].clientX - offsetLeft;\n f2y1 = e.touches[1].clientY - offsetTop;\n twoFingersStartInside = 0 <= f1x1 && f1x1 <= containerWidth && 0 <= f2x1 && f2x1 <= containerWidth && 0 <= f1y1 && f1y1 <= containerHeight && 0 <= f2y1 && f2y1 <= containerHeight;\n var pan = cy.pan();\n var zoom = cy.zoom();\n distance1 = distance(f1x1, f1y1, f2x1, f2y1);\n distance1Sq = distanceSq(f1x1, f1y1, f2x1, f2y1);\n center1 = [(f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2];\n modelCenter1 = [(center1[0] - pan.x) / zoom, (center1[1] - pan.y) / zoom];\n\n // consider context tap\n var cxtDistThreshold = 200;\n var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold;\n if (distance1Sq < cxtDistThresholdSq && !e.touches[2]) {\n var near1 = r.findNearestElement(now[0], now[1], true, true);\n var near2 = r.findNearestElement(now[2], now[3], true, true);\n if (near1 && near1.isNode()) {\n near1.activate().emit({\n originalEvent: e,\n type: 'cxttapstart',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n r.touchData.start = near1;\n } else if (near2 && near2.isNode()) {\n near2.activate().emit({\n originalEvent: e,\n type: 'cxttapstart',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n r.touchData.start = near2;\n } else {\n cy.emit({\n originalEvent: e,\n type: 'cxttapstart',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n if (r.touchData.start) {\n r.touchData.start._private.grabbed = false;\n }\n r.touchData.cxt = true;\n r.touchData.cxtDragged = false;\n r.data.bgActivePosistion = undefined;\n r.redraw();\n return;\n }\n }\n if (e.touches[2]) {\n // ignore\n\n // safari on ios pans the page otherwise (normally you should be able to preventdefault on touchmove...)\n if (cy.boxSelectionEnabled()) {\n e.preventDefault();\n }\n } else if (e.touches[1]) ; else if (e.touches[0]) {\n var nears = r.findNearestElements(now[0], now[1], true, true);\n var near = nears[0];\n if (near != null) {\n near.activate();\n r.touchData.start = near;\n r.touchData.starts = nears;\n if (r.nodeIsGrabbable(near)) {\n var draggedEles = r.dragData.touchDragEles = cy.collection();\n var selectedNodes = null;\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n if (near.selected()) {\n // reset drag elements, since near will be added again\n\n selectedNodes = cy.$(function (ele) {\n return ele.selected() && r.nodeIsGrabbable(ele);\n });\n addNodesToDrag(selectedNodes, {\n addToList: draggedEles\n });\n } else {\n addNodeToDrag(near, {\n addToList: draggedEles\n });\n }\n setGrabTarget(near);\n var makeEvent = function makeEvent(type) {\n return {\n originalEvent: e,\n type: type,\n position: {\n x: now[0],\n y: now[1]\n }\n };\n };\n near.emit(makeEvent('grabon'));\n if (selectedNodes) {\n selectedNodes.forEach(function (n) {\n n.emit(makeEvent('grab'));\n });\n } else {\n near.emit(makeEvent('grab'));\n }\n }\n }\n triggerEvents(near, ['touchstart', 'tapstart', 'vmousedown'], e, {\n x: now[0],\n y: now[1]\n });\n if (near == null) {\n r.data.bgActivePosistion = {\n x: pos[0],\n y: pos[1]\n };\n r.redrawHint('select', true);\n r.redraw();\n }\n\n // Tap, taphold\n // -----\n\n r.touchData.singleTouchMoved = false;\n r.touchData.singleTouchStartTime = +new Date();\n clearTimeout(r.touchData.tapholdTimeout);\n r.touchData.tapholdTimeout = setTimeout(function () {\n if (r.touchData.singleTouchMoved === false && !r.pinching // if pinching, then taphold unselect shouldn't take effect\n && !r.touchData.selecting // box selection shouldn't allow taphold through\n ) {\n triggerEvents(r.touchData.start, ['taphold'], e, {\n x: now[0],\n y: now[1]\n });\n }\n }, r.tapholdDuration);\n }\n if (e.touches.length >= 1) {\n var sPos = r.touchData.startPosition = [null, null, null, null, null, null];\n for (var i = 0; i < now.length; i++) {\n sPos[i] = earlier[i] = now[i];\n }\n var touch0 = e.touches[0];\n r.touchData.startGPosition = [touch0.clientX, touch0.clientY];\n }\n }, false);\n var touchmoveHandler;\n r.registerBinding(containerWindow, 'touchmove', touchmoveHandler = function touchmoveHandler(e) {\n // eslint-disable-line no-undef\n var capture = r.touchData.capture;\n if (!capture && !eventInContainer(e)) {\n return;\n }\n var select = r.selection;\n var cy = r.cy;\n var now = r.touchData.now;\n var earlier = r.touchData.earlier;\n var zoom = cy.zoom();\n if (e.touches[0]) {\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n if (e.touches[1]) {\n var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY);\n now[2] = pos[0];\n now[3] = pos[1];\n }\n if (e.touches[2]) {\n var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY);\n now[4] = pos[0];\n now[5] = pos[1];\n }\n var startGPos = r.touchData.startGPosition;\n var isOverThresholdDrag;\n if (capture && e.touches[0] && startGPos) {\n var disp = [];\n for (var j = 0; j < now.length; j++) {\n disp[j] = now[j] - earlier[j];\n }\n var dx = e.touches[0].clientX - startGPos[0];\n var dx2 = dx * dx;\n var dy = e.touches[0].clientY - startGPos[1];\n var dy2 = dy * dy;\n var dist2 = dx2 + dy2;\n isOverThresholdDrag = dist2 >= r.touchTapThreshold2;\n }\n\n // context swipe cancelling\n if (capture && r.touchData.cxt) {\n e.preventDefault();\n var f1x2 = e.touches[0].clientX - offsetLeft,\n f1y2 = e.touches[0].clientY - offsetTop;\n var f2x2 = e.touches[1].clientX - offsetLeft,\n f2y2 = e.touches[1].clientY - offsetTop;\n // var distance2 = distance( f1x2, f1y2, f2x2, f2y2 );\n var distance2Sq = distanceSq(f1x2, f1y2, f2x2, f2y2);\n var factorSq = distance2Sq / distance1Sq;\n var distThreshold = 150;\n var distThresholdSq = distThreshold * distThreshold;\n var factorThreshold = 1.5;\n var factorThresholdSq = factorThreshold * factorThreshold;\n\n // cancel ctx gestures if the distance b/t the fingers increases\n if (factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq) {\n r.touchData.cxt = false;\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n var cxtEvt = {\n originalEvent: e,\n type: 'cxttapend',\n position: {\n x: now[0],\n y: now[1]\n }\n };\n if (r.touchData.start) {\n r.touchData.start.unactivate().emit(cxtEvt);\n r.touchData.start = null;\n } else {\n cy.emit(cxtEvt);\n }\n }\n }\n\n // context swipe\n if (capture && r.touchData.cxt) {\n var cxtEvt = {\n originalEvent: e,\n type: 'cxtdrag',\n position: {\n x: now[0],\n y: now[1]\n }\n };\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n if (r.touchData.start) {\n r.touchData.start.emit(cxtEvt);\n } else {\n cy.emit(cxtEvt);\n }\n if (r.touchData.start) {\n r.touchData.start._private.grabbed = false;\n }\n r.touchData.cxtDragged = true;\n var near = r.findNearestElement(now[0], now[1], true, true);\n if (!r.touchData.cxtOver || near !== r.touchData.cxtOver) {\n if (r.touchData.cxtOver) {\n r.touchData.cxtOver.emit({\n originalEvent: e,\n type: 'cxtdragout',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n r.touchData.cxtOver = near;\n if (near) {\n near.emit({\n originalEvent: e,\n type: 'cxtdragover',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n }\n\n // box selection\n } else if (capture && e.touches[2] && cy.boxSelectionEnabled()) {\n e.preventDefault();\n r.data.bgActivePosistion = undefined;\n this.lastThreeTouch = +new Date();\n if (!r.touchData.selecting) {\n cy.emit({\n originalEvent: e,\n type: 'boxstart',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n r.touchData.selecting = true;\n r.touchData.didSelect = true;\n select[4] = 1;\n if (!select || select.length === 0 || select[0] === undefined) {\n select[0] = (now[0] + now[2] + now[4]) / 3;\n select[1] = (now[1] + now[3] + now[5]) / 3;\n select[2] = (now[0] + now[2] + now[4]) / 3 + 1;\n select[3] = (now[1] + now[3] + now[5]) / 3 + 1;\n } else {\n select[2] = (now[0] + now[2] + now[4]) / 3;\n select[3] = (now[1] + now[3] + now[5]) / 3;\n }\n r.redrawHint('select', true);\n r.redraw();\n\n // pinch to zoom\n } else if (capture && e.touches[1] && !r.touchData.didSelect // don't allow box selection to degrade to pinch-to-zoom\n && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled()) {\n // two fingers => pinch to zoom\n e.preventDefault();\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n var draggedEles = r.dragData.touchDragEles;\n if (draggedEles) {\n r.redrawHint('drag', true);\n for (var i = 0; i < draggedEles.length; i++) {\n var de_p = draggedEles[i]._private;\n de_p.grabbed = false;\n de_p.rscratch.inDragLayer = false;\n }\n }\n var _start = r.touchData.start;\n\n // (x2, y2) for fingers 1 and 2\n var f1x2 = e.touches[0].clientX - offsetLeft,\n f1y2 = e.touches[0].clientY - offsetTop;\n var f2x2 = e.touches[1].clientX - offsetLeft,\n f2y2 = e.touches[1].clientY - offsetTop;\n var distance2 = distance(f1x2, f1y2, f2x2, f2y2);\n // var distance2Sq = distanceSq( f1x2, f1y2, f2x2, f2y2 );\n // var factor = Math.sqrt( distance2Sq ) / Math.sqrt( distance1Sq );\n var factor = distance2 / distance1;\n if (twoFingersStartInside) {\n // delta finger1\n var df1x = f1x2 - f1x1;\n var df1y = f1y2 - f1y1;\n\n // delta finger 2\n var df2x = f2x2 - f2x1;\n var df2y = f2y2 - f2y1;\n\n // translation is the normalised vector of the two fingers movement\n // i.e. so pinching cancels out and moving together pans\n var tx = (df1x + df2x) / 2;\n var ty = (df1y + df2y) / 2;\n\n // now calculate the zoom\n var zoom1 = cy.zoom();\n var zoom2 = zoom1 * factor;\n var pan1 = cy.pan();\n\n // the model center point converted to the current rendered pos\n var ctrx = modelCenter1[0] * zoom1 + pan1.x;\n var ctry = modelCenter1[1] * zoom1 + pan1.y;\n var pan2 = {\n x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx,\n y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry\n };\n\n // remove dragged eles\n if (_start && _start.active()) {\n var draggedEles = r.dragData.touchDragEles;\n freeDraggedElements(draggedEles);\n r.redrawHint('drag', true);\n r.redrawHint('eles', true);\n _start.unactivate().emit('freeon');\n draggedEles.emit('free');\n if (r.dragData.didDrag) {\n _start.emit('dragfreeon');\n draggedEles.emit('dragfree');\n }\n }\n cy.viewport({\n zoom: zoom2,\n pan: pan2,\n cancelOnFailedZoom: true\n });\n cy.emit('pinchzoom');\n distance1 = distance2;\n f1x1 = f1x2;\n f1y1 = f1y2;\n f2x1 = f2x2;\n f2y1 = f2y2;\n r.pinching = true;\n }\n\n // Re-project\n if (e.touches[0]) {\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n if (e.touches[1]) {\n var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY);\n now[2] = pos[0];\n now[3] = pos[1];\n }\n if (e.touches[2]) {\n var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY);\n now[4] = pos[0];\n now[5] = pos[1];\n }\n } else if (e.touches[0] && !r.touchData.didSelect // don't allow box selection to degrade to single finger events like panning\n ) {\n var start = r.touchData.start;\n var last = r.touchData.last;\n var near;\n if (!r.hoverData.draggingEles && !r.swipePanning) {\n near = r.findNearestElement(now[0], now[1], true, true);\n }\n if (capture && start != null) {\n e.preventDefault();\n }\n\n // dragging nodes\n if (capture && start != null && r.nodeIsDraggable(start)) {\n if (isOverThresholdDrag) {\n // then dragging can happen\n var draggedEles = r.dragData.touchDragEles;\n var justStartedDrag = !r.dragData.didDrag;\n if (justStartedDrag) {\n addNodesToDrag(draggedEles, {\n inDragLayer: true\n });\n }\n r.dragData.didDrag = true;\n var totalShift = {\n x: 0,\n y: 0\n };\n if (number$1(disp[0]) && number$1(disp[1])) {\n totalShift.x += disp[0];\n totalShift.y += disp[1];\n if (justStartedDrag) {\n r.redrawHint('eles', true);\n var dragDelta = r.touchData.dragDelta;\n if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) {\n totalShift.x += dragDelta[0];\n totalShift.y += dragDelta[1];\n }\n }\n }\n r.hoverData.draggingEles = true;\n draggedEles.silentShift(totalShift).emit('position drag');\n r.redrawHint('drag', true);\n if (r.touchData.startPosition[0] == earlier[0] && r.touchData.startPosition[1] == earlier[1]) {\n r.redrawHint('eles', true);\n }\n r.redraw();\n } else {\n // otherwise keep track of drag delta for later\n var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || [];\n if (dragDelta.length === 0) {\n dragDelta.push(disp[0]);\n dragDelta.push(disp[1]);\n } else {\n dragDelta[0] += disp[0];\n dragDelta[1] += disp[1];\n }\n }\n }\n\n // touchmove\n {\n triggerEvents(start || near, ['touchmove', 'tapdrag', 'vmousemove'], e, {\n x: now[0],\n y: now[1]\n });\n if ((!start || !start.grabbed()) && near != last) {\n if (last) {\n last.emit({\n originalEvent: e,\n type: 'tapdragout',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n if (near) {\n near.emit({\n originalEvent: e,\n type: 'tapdragover',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n }\n r.touchData.last = near;\n }\n\n // check to cancel taphold\n if (capture) {\n for (var i = 0; i < now.length; i++) {\n if (now[i] && r.touchData.startPosition[i] && isOverThresholdDrag) {\n r.touchData.singleTouchMoved = true;\n }\n }\n }\n\n // panning\n if (capture && (start == null || start.pannable()) && cy.panningEnabled() && cy.userPanningEnabled()) {\n var allowPassthrough = allowPanningPassthrough(start, r.touchData.starts);\n if (allowPassthrough) {\n e.preventDefault();\n if (!r.data.bgActivePosistion) {\n r.data.bgActivePosistion = array2point(r.touchData.startPosition);\n }\n if (r.swipePanning) {\n cy.panBy({\n x: disp[0] * zoom,\n y: disp[1] * zoom\n });\n cy.emit('dragpan');\n } else if (isOverThresholdDrag) {\n r.swipePanning = true;\n cy.panBy({\n x: dx * zoom,\n y: dy * zoom\n });\n cy.emit('dragpan');\n if (start) {\n start.unactivate();\n r.redrawHint('select', true);\n r.touchData.start = null;\n }\n }\n }\n\n // Re-project\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n }\n for (var j = 0; j < now.length; j++) {\n earlier[j] = now[j];\n }\n\n // the active bg indicator should be removed when making a swipe that is neither for dragging nodes or panning\n if (capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null) {\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n r.redraw();\n }\n }, false);\n var touchcancelHandler;\n r.registerBinding(containerWindow, 'touchcancel', touchcancelHandler = function touchcancelHandler(e) {\n // eslint-disable-line no-unused-vars\n var start = r.touchData.start;\n r.touchData.capture = false;\n if (start) {\n start.unactivate();\n }\n });\n var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp;\n r.registerBinding(containerWindow, 'touchend', touchendHandler = function touchendHandler(e) {\n // eslint-disable-line no-unused-vars\n var start = r.touchData.start;\n var capture = r.touchData.capture;\n if (capture) {\n if (e.touches.length === 0) {\n r.touchData.capture = false;\n }\n e.preventDefault();\n } else {\n return;\n }\n var select = r.selection;\n r.swipePanning = false;\n r.hoverData.draggingEles = false;\n var cy = r.cy;\n var zoom = cy.zoom();\n var now = r.touchData.now;\n var earlier = r.touchData.earlier;\n if (e.touches[0]) {\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n if (e.touches[1]) {\n var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY);\n now[2] = pos[0];\n now[3] = pos[1];\n }\n if (e.touches[2]) {\n var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY);\n now[4] = pos[0];\n now[5] = pos[1];\n }\n if (start) {\n start.unactivate();\n }\n var ctxTapend;\n if (r.touchData.cxt) {\n ctxTapend = {\n originalEvent: e,\n type: 'cxttapend',\n position: {\n x: now[0],\n y: now[1]\n }\n };\n if (start) {\n start.emit(ctxTapend);\n } else {\n cy.emit(ctxTapend);\n }\n if (!r.touchData.cxtDragged) {\n var ctxTap = {\n originalEvent: e,\n type: 'cxttap',\n position: {\n x: now[0],\n y: now[1]\n }\n };\n if (start) {\n start.emit(ctxTap);\n } else {\n cy.emit(ctxTap);\n }\n }\n if (r.touchData.start) {\n r.touchData.start._private.grabbed = false;\n }\n r.touchData.cxt = false;\n r.touchData.start = null;\n r.redraw();\n return;\n }\n\n // no more box selection if we don't have three fingers\n if (!e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting) {\n r.touchData.selecting = false;\n var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3]));\n select[0] = undefined;\n select[1] = undefined;\n select[2] = undefined;\n select[3] = undefined;\n select[4] = 0;\n r.redrawHint('select', true);\n cy.emit({\n type: 'boxend',\n originalEvent: e,\n position: {\n x: now[0],\n y: now[1]\n }\n });\n var eleWouldBeSelected = function eleWouldBeSelected(ele) {\n return ele.selectable() && !ele.selected();\n };\n box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect');\n if (box.nonempty()) {\n r.redrawHint('eles', true);\n }\n r.redraw();\n }\n if (start != null) {\n start.unactivate();\n }\n if (e.touches[2]) {\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n } else if (e.touches[1]) ; else if (e.touches[0]) ; else if (!e.touches[0]) {\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n var draggedEles = r.dragData.touchDragEles;\n if (start != null) {\n var startWasGrabbed = start._private.grabbed;\n freeDraggedElements(draggedEles);\n r.redrawHint('drag', true);\n r.redrawHint('eles', true);\n if (startWasGrabbed) {\n start.emit('freeon');\n draggedEles.emit('free');\n if (r.dragData.didDrag) {\n start.emit('dragfreeon');\n draggedEles.emit('dragfree');\n }\n }\n triggerEvents(start, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, {\n x: now[0],\n y: now[1]\n });\n start.unactivate();\n r.touchData.start = null;\n } else {\n var near = r.findNearestElement(now[0], now[1], true, true);\n triggerEvents(near, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, {\n x: now[0],\n y: now[1]\n });\n }\n var dx = r.touchData.startPosition[0] - now[0];\n var dx2 = dx * dx;\n var dy = r.touchData.startPosition[1] - now[1];\n var dy2 = dy * dy;\n var dist2 = dx2 + dy2;\n var rdist2 = dist2 * zoom * zoom;\n\n // Tap event, roughly same as mouse click event for touch\n if (!r.touchData.singleTouchMoved) {\n if (!start) {\n cy.$(':selected').unselect(['tapunselect']);\n }\n triggerEvents(start, ['tap', 'vclick'], e, {\n x: now[0],\n y: now[1]\n });\n didDoubleTouch = false;\n if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) {\n touchTimeout && clearTimeout(touchTimeout);\n didDoubleTouch = true;\n prevTouchTimeStamp = null;\n triggerEvents(start, ['dbltap', 'vdblclick'], e, {\n x: now[0],\n y: now[1]\n });\n } else {\n touchTimeout = setTimeout(function () {\n if (didDoubleTouch) return;\n triggerEvents(start, ['onetap', 'voneclick'], e, {\n x: now[0],\n y: now[1]\n });\n }, cy.multiClickDebounceTime());\n prevTouchTimeStamp = e.timeStamp;\n }\n }\n\n // Prepare to select the currently touched node, only if it hasn't been dragged past a certain distance\n if (start != null && !r.dragData.didDrag // didn't drag nodes around\n && start._private.selectable && rdist2 < r.touchTapThreshold2 && !r.pinching // pinch to zoom should not affect selection\n ) {\n if (cy.selectionType() === 'single') {\n cy.$(isSelected).unmerge(start).unselect(['tapunselect']);\n start.select(['tapselect']);\n } else {\n if (start.selected()) {\n start.unselect(['tapunselect']);\n } else {\n start.select(['tapselect']);\n }\n }\n r.redrawHint('eles', true);\n }\n r.touchData.singleTouchMoved = true;\n }\n for (var j = 0; j < now.length; j++) {\n earlier[j] = now[j];\n }\n r.dragData.didDrag = false; // reset for next touchstart\n\n if (e.touches.length === 0) {\n r.touchData.dragDelta = [];\n r.touchData.startPosition = [null, null, null, null, null, null];\n r.touchData.startGPosition = null;\n r.touchData.didSelect = false;\n }\n if (e.touches.length < 2) {\n if (e.touches.length === 1) {\n // the old start global pos'n may not be the same finger that remains\n r.touchData.startGPosition = [e.touches[0].clientX, e.touches[0].clientY];\n }\n r.pinching = false;\n r.redrawHint('eles', true);\n r.redraw();\n }\n\n //r.redraw();\n }, false);\n\n // fallback compatibility layer for ms pointer events\n if (typeof TouchEvent === 'undefined') {\n var pointers = [];\n var makeTouch = function makeTouch(e) {\n return {\n clientX: e.clientX,\n clientY: e.clientY,\n force: 1,\n identifier: e.pointerId,\n pageX: e.pageX,\n pageY: e.pageY,\n radiusX: e.width / 2,\n radiusY: e.height / 2,\n screenX: e.screenX,\n screenY: e.screenY,\n target: e.target\n };\n };\n var makePointer = function makePointer(e) {\n return {\n event: e,\n touch: makeTouch(e)\n };\n };\n var addPointer = function addPointer(e) {\n pointers.push(makePointer(e));\n };\n var removePointer = function removePointer(e) {\n for (var i = 0; i < pointers.length; i++) {\n var p = pointers[i];\n if (p.event.pointerId === e.pointerId) {\n pointers.splice(i, 1);\n return;\n }\n }\n };\n var updatePointer = function updatePointer(e) {\n var p = pointers.filter(function (p) {\n return p.event.pointerId === e.pointerId;\n })[0];\n p.event = e;\n p.touch = makeTouch(e);\n };\n var addTouchesToEvent = function addTouchesToEvent(e) {\n e.touches = pointers.map(function (p) {\n return p.touch;\n });\n };\n var pointerIsMouse = function pointerIsMouse(e) {\n return e.pointerType === 'mouse' || e.pointerType === 4;\n };\n r.registerBinding(r.container, 'pointerdown', function (e) {\n if (pointerIsMouse(e)) {\n return;\n } // mouse already handled\n\n e.preventDefault();\n addPointer(e);\n addTouchesToEvent(e);\n touchstartHandler(e);\n });\n r.registerBinding(r.container, 'pointerup', function (e) {\n if (pointerIsMouse(e)) {\n return;\n } // mouse already handled\n\n removePointer(e);\n addTouchesToEvent(e);\n touchendHandler(e);\n });\n r.registerBinding(r.container, 'pointercancel', function (e) {\n if (pointerIsMouse(e)) {\n return;\n } // mouse already handled\n\n removePointer(e);\n addTouchesToEvent(e);\n touchcancelHandler(e);\n });\n r.registerBinding(r.container, 'pointermove', function (e) {\n if (pointerIsMouse(e)) {\n return;\n } // mouse already handled\n\n e.preventDefault();\n updatePointer(e);\n addTouchesToEvent(e);\n touchmoveHandler(e);\n });\n }\n};\n\nvar BRp$2 = {};\nBRp$2.generatePolygon = function (name, points) {\n return this.nodeShapes[name] = {\n renderer: this,\n name: name,\n points: points,\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl('polygon', context, centerX, centerY, width, height, this.points);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n return polygonIntersectLine(x, y, this.points, nodeX, nodeY, width / 2, height / 2, padding);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n return pointInsidePolygon(x, y, this.points, centerX, centerY, width, height, [0, -1], padding);\n }\n };\n};\nBRp$2.generateEllipse = function () {\n return this.nodeShapes['ellipse'] = {\n renderer: this,\n name: 'ellipse',\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n return intersectLineEllipse(x, y, nodeX, nodeY, width / 2 + padding, height / 2 + padding);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n return checkInEllipse(x, y, width, height, centerX, centerY, padding);\n }\n };\n};\nBRp$2.generateRoundPolygon = function (name, points) {\n return this.nodeShapes[name] = {\n renderer: this,\n name: name,\n points: points,\n getOrCreateCorners: function getOrCreateCorners(centerX, centerY, width, height, cornerRadius, rs, field) {\n if (rs[field] !== undefined && rs[field + '-cx'] === centerX && rs[field + '-cy'] === centerY) {\n return rs[field];\n }\n rs[field] = new Array(points.length / 2);\n rs[field + '-cx'] = centerX;\n rs[field + '-cy'] = centerY;\n var halfW = width / 2;\n var halfH = height / 2;\n cornerRadius = cornerRadius === 'auto' ? getRoundPolygonRadius(width, height) : cornerRadius;\n var p = new Array(points.length / 2);\n for (var _i = 0; _i < points.length / 2; _i++) {\n p[_i] = {\n x: centerX + halfW * points[_i * 2],\n y: centerY + halfH * points[_i * 2 + 1]\n };\n }\n var i,\n p1,\n p2,\n p3,\n len = p.length;\n p1 = p[len - 1];\n // for each point\n for (i = 0; i < len; i++) {\n p2 = p[i % len];\n p3 = p[(i + 1) % len];\n rs[field][i] = getRoundCorner(p1, p2, p3, cornerRadius);\n p1 = p2;\n p2 = p3;\n }\n return rs[field];\n },\n draw: function draw(context, centerX, centerY, width, height, cornerRadius, rs) {\n this.renderer.nodeShapeImpl('round-polygon', context, centerX, centerY, width, height, this.points, this.getOrCreateCorners(centerX, centerY, width, height, cornerRadius, rs, 'drawCorners'));\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius, rs) {\n return roundPolygonIntersectLine(x, y, this.points, nodeX, nodeY, width, height, padding, this.getOrCreateCorners(nodeX, nodeY, width, height, cornerRadius, rs, 'corners'));\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius, rs) {\n return pointInsideRoundPolygon(x, y, this.points, centerX, centerY, width, height, this.getOrCreateCorners(centerX, centerY, width, height, cornerRadius, rs, 'corners'));\n }\n };\n};\nBRp$2.generateRoundRectangle = function () {\n return this.nodeShapes['round-rectangle'] = this.nodeShapes['roundrectangle'] = {\n renderer: this,\n name: 'round-rectangle',\n points: generateUnitNgonPointsFitToSquare(4, 0),\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height, this.points, cornerRadius);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding, cornerRadius);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(width, height) : cornerRadius;\n cornerRadius = Math.min(halfWidth, halfHeight, cornerRadius);\n var diam = cornerRadius * 2;\n\n // Check hBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) {\n return true;\n }\n\n // Check vBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) {\n return true;\n }\n\n // Check top left quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX - halfWidth + cornerRadius, centerY - halfHeight + cornerRadius, padding)) {\n return true;\n }\n\n // Check top right quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX + halfWidth - cornerRadius, centerY - halfHeight + cornerRadius, padding)) {\n return true;\n }\n\n // Check bottom right quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX + halfWidth - cornerRadius, centerY + halfHeight - cornerRadius, padding)) {\n return true;\n }\n\n // Check bottom left quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX - halfWidth + cornerRadius, centerY + halfHeight - cornerRadius, padding)) {\n return true;\n }\n return false;\n }\n };\n};\nBRp$2.generateCutRectangle = function () {\n return this.nodeShapes['cut-rectangle'] = this.nodeShapes['cutrectangle'] = {\n renderer: this,\n name: 'cut-rectangle',\n cornerLength: getCutRectangleCornerLength(),\n points: generateUnitNgonPointsFitToSquare(4, 0),\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height, null, cornerRadius);\n },\n generateCutTrianglePts: function generateCutTrianglePts(width, height, centerX, centerY, cornerRadius) {\n var cl = cornerRadius === 'auto' ? this.cornerLength : cornerRadius;\n var hh = height / 2;\n var hw = width / 2;\n var xBegin = centerX - hw;\n var xEnd = centerX + hw;\n var yBegin = centerY - hh;\n var yEnd = centerY + hh;\n\n // points are in clockwise order, inner (imaginary) triangle pt on [4, 5]\n return {\n topLeft: [xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl],\n topRight: [xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl],\n bottomRight: [xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl],\n bottomLeft: [xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl]\n };\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n var cPts = this.generateCutTrianglePts(width + 2 * padding, height + 2 * padding, nodeX, nodeY, cornerRadius);\n var pts = [].concat.apply([], [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4)]);\n return polygonIntersectLine(x, y, pts, nodeX, nodeY);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n var cl = cornerRadius === 'auto' ? this.cornerLength : cornerRadius;\n // Check hBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * cl, [0, -1], padding)) {\n return true;\n }\n\n // Check vBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * cl, height, [0, -1], padding)) {\n return true;\n }\n var cutTrianglePts = this.generateCutTrianglePts(width, height, centerX, centerY);\n return pointInsidePolygonPoints(x, y, cutTrianglePts.topLeft) || pointInsidePolygonPoints(x, y, cutTrianglePts.topRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomLeft);\n }\n };\n};\nBRp$2.generateBarrel = function () {\n return this.nodeShapes['barrel'] = {\n renderer: this,\n name: 'barrel',\n points: generateUnitNgonPointsFitToSquare(4, 0),\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n // use two fixed t values for the bezier curve approximation\n\n var t0 = 0.15;\n var t1 = 0.5;\n var t2 = 0.85;\n var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY);\n var approximateBarrelCurvePts = function approximateBarrelCurvePts(pts) {\n // approximate curve pts based on the two t values\n var m0 = qbezierPtAt({\n x: pts[0],\n y: pts[1]\n }, {\n x: pts[2],\n y: pts[3]\n }, {\n x: pts[4],\n y: pts[5]\n }, t0);\n var m1 = qbezierPtAt({\n x: pts[0],\n y: pts[1]\n }, {\n x: pts[2],\n y: pts[3]\n }, {\n x: pts[4],\n y: pts[5]\n }, t1);\n var m2 = qbezierPtAt({\n x: pts[0],\n y: pts[1]\n }, {\n x: pts[2],\n y: pts[3]\n }, {\n x: pts[4],\n y: pts[5]\n }, t2);\n return [pts[0], pts[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts[4], pts[5]];\n };\n var pts = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft));\n return polygonIntersectLine(x, y, pts, nodeX, nodeY);\n },\n generateBarrelBezierPts: function generateBarrelBezierPts(width, height, centerX, centerY) {\n var hh = height / 2;\n var hw = width / 2;\n var xBegin = centerX - hw;\n var xEnd = centerX + hw;\n var yBegin = centerY - hh;\n var yEnd = centerY + hh;\n var curveConstants = getBarrelCurveConstants(width, height);\n var hOffset = curveConstants.heightOffset;\n var wOffset = curveConstants.widthOffset;\n var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width;\n\n // points are in clockwise order, inner (imaginary) control pt on [4, 5]\n var pts = {\n topLeft: [xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin],\n topRight: [xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset],\n bottomRight: [xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd],\n bottomLeft: [xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset]\n };\n pts.topLeft.isTop = true;\n pts.topRight.isTop = true;\n pts.bottomLeft.isBottom = true;\n pts.bottomRight.isBottom = true;\n return pts;\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n var curveConstants = getBarrelCurveConstants(width, height);\n var hOffset = curveConstants.heightOffset;\n var wOffset = curveConstants.widthOffset;\n\n // Check hBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * hOffset, [0, -1], padding)) {\n return true;\n }\n\n // Check vBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * wOffset, height, [0, -1], padding)) {\n return true;\n }\n var barrelCurvePts = this.generateBarrelBezierPts(width, height, centerX, centerY);\n var getCurveT = function getCurveT(x, y, curvePts) {\n var x0 = curvePts[4];\n var x1 = curvePts[2];\n var x2 = curvePts[0];\n var y0 = curvePts[5];\n // var y1 = curvePts[ 3 ];\n var y2 = curvePts[1];\n var xMin = Math.min(x0, x2);\n var xMax = Math.max(x0, x2);\n var yMin = Math.min(y0, y2);\n var yMax = Math.max(y0, y2);\n if (xMin <= x && x <= xMax && yMin <= y && y <= yMax) {\n var coeff = bezierPtsToQuadCoeff(x0, x1, x2);\n var roots = solveQuadratic(coeff[0], coeff[1], coeff[2], x);\n var validRoots = roots.filter(function (r) {\n return 0 <= r && r <= 1;\n });\n if (validRoots.length > 0) {\n return validRoots[0];\n }\n }\n return null;\n };\n var curveRegions = Object.keys(barrelCurvePts);\n for (var i = 0; i < curveRegions.length; i++) {\n var corner = curveRegions[i];\n var cornerPts = barrelCurvePts[corner];\n var t = getCurveT(x, y, cornerPts);\n if (t == null) {\n continue;\n }\n var y0 = cornerPts[5];\n var y1 = cornerPts[3];\n var y2 = cornerPts[1];\n var bezY = qbezierAt(y0, y1, y2, t);\n if (cornerPts.isTop && bezY <= y) {\n return true;\n }\n if (cornerPts.isBottom && y <= bezY) {\n return true;\n }\n }\n return false;\n }\n };\n};\nBRp$2.generateBottomRoundrectangle = function () {\n return this.nodeShapes['bottom-round-rectangle'] = this.nodeShapes['bottomroundrectangle'] = {\n renderer: this,\n name: 'bottom-round-rectangle',\n points: generateUnitNgonPointsFitToSquare(4, 0),\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height, this.points, cornerRadius);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n var topStartX = nodeX - (width / 2 + padding);\n var topStartY = nodeY - (height / 2 + padding);\n var topEndY = topStartY;\n var topEndX = nodeX + (width / 2 + padding);\n var topIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false);\n if (topIntersections.length > 0) {\n return topIntersections;\n }\n return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding, cornerRadius);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(width, height) : cornerRadius;\n var diam = 2 * cornerRadius;\n\n // Check hBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) {\n return true;\n }\n\n // Check vBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) {\n return true;\n }\n\n // check non-rounded top side\n var outerWidth = width / 2 + 2 * padding;\n var outerHeight = height / 2 + 2 * padding;\n var points = [centerX - outerWidth, centerY - outerHeight, centerX - outerWidth, centerY, centerX + outerWidth, centerY, centerX + outerWidth, centerY - outerHeight];\n if (pointInsidePolygonPoints(x, y, points)) {\n return true;\n }\n\n // Check bottom right quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) {\n return true;\n }\n\n // Check bottom left quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) {\n return true;\n }\n return false;\n }\n };\n};\nBRp$2.registerNodeShapes = function () {\n var nodeShapes = this.nodeShapes = {};\n var renderer = this;\n this.generateEllipse();\n this.generatePolygon('triangle', generateUnitNgonPointsFitToSquare(3, 0));\n this.generateRoundPolygon('round-triangle', generateUnitNgonPointsFitToSquare(3, 0));\n this.generatePolygon('rectangle', generateUnitNgonPointsFitToSquare(4, 0));\n nodeShapes['square'] = nodeShapes['rectangle'];\n this.generateRoundRectangle();\n this.generateCutRectangle();\n this.generateBarrel();\n this.generateBottomRoundrectangle();\n {\n var diamondPoints = [0, 1, 1, 0, 0, -1, -1, 0];\n this.generatePolygon('diamond', diamondPoints);\n this.generateRoundPolygon('round-diamond', diamondPoints);\n }\n this.generatePolygon('pentagon', generateUnitNgonPointsFitToSquare(5, 0));\n this.generateRoundPolygon('round-pentagon', generateUnitNgonPointsFitToSquare(5, 0));\n this.generatePolygon('hexagon', generateUnitNgonPointsFitToSquare(6, 0));\n this.generateRoundPolygon('round-hexagon', generateUnitNgonPointsFitToSquare(6, 0));\n this.generatePolygon('heptagon', generateUnitNgonPointsFitToSquare(7, 0));\n this.generateRoundPolygon('round-heptagon', generateUnitNgonPointsFitToSquare(7, 0));\n this.generatePolygon('octagon', generateUnitNgonPointsFitToSquare(8, 0));\n this.generateRoundPolygon('round-octagon', generateUnitNgonPointsFitToSquare(8, 0));\n var star5Points = new Array(20);\n {\n var outerPoints = generateUnitNgonPoints(5, 0);\n var innerPoints = generateUnitNgonPoints(5, Math.PI / 5);\n\n // Outer radius is 1; inner radius of star is smaller\n var innerRadius = 0.5 * (3 - Math.sqrt(5));\n innerRadius *= 1.57;\n for (var i = 0; i < innerPoints.length / 2; i++) {\n innerPoints[i * 2] *= innerRadius;\n innerPoints[i * 2 + 1] *= innerRadius;\n }\n for (var i = 0; i < 20 / 4; i++) {\n star5Points[i * 4] = outerPoints[i * 2];\n star5Points[i * 4 + 1] = outerPoints[i * 2 + 1];\n star5Points[i * 4 + 2] = innerPoints[i * 2];\n star5Points[i * 4 + 3] = innerPoints[i * 2 + 1];\n }\n }\n star5Points = fitPolygonToSquare(star5Points);\n this.generatePolygon('star', star5Points);\n this.generatePolygon('vee', [-1, -1, 0, -0.333, 1, -1, 0, 1]);\n this.generatePolygon('rhomboid', [-1, -1, 0.333, -1, 1, 1, -0.333, 1]);\n this.generatePolygon('right-rhomboid', [-0.333, -1, 1, -1, 0.333, 1, -1, 1]);\n this.nodeShapes['concavehexagon'] = this.generatePolygon('concave-hexagon', [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]);\n {\n var tagPoints = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1];\n this.generatePolygon('tag', tagPoints);\n this.generateRoundPolygon('round-tag', tagPoints);\n }\n nodeShapes.makePolygon = function (points) {\n // use caching on user-specified polygons so they are as fast as native shapes\n\n var key = points.join('$');\n var name = 'polygon-' + key;\n var shape;\n if (shape = this[name]) {\n // got cached shape\n return shape;\n }\n\n // create and cache new shape\n return renderer.generatePolygon(name, points);\n };\n};\n\nvar BRp$1 = {};\nBRp$1.timeToRender = function () {\n return this.redrawTotalTime / this.redrawCount;\n};\nBRp$1.redraw = function (options) {\n options = options || staticEmptyObject();\n var r = this;\n if (r.averageRedrawTime === undefined) {\n r.averageRedrawTime = 0;\n }\n if (r.lastRedrawTime === undefined) {\n r.lastRedrawTime = 0;\n }\n if (r.lastDrawTime === undefined) {\n r.lastDrawTime = 0;\n }\n r.requestedFrame = true;\n r.renderOptions = options;\n};\nBRp$1.beforeRender = function (fn, priority) {\n // the renderer can't add tick callbacks when destroyed\n if (this.destroyed) {\n return;\n }\n if (priority == null) {\n error('Priority is not optional for beforeRender');\n }\n var cbs = this.beforeRenderCallbacks;\n cbs.push({\n fn: fn,\n priority: priority\n });\n\n // higher priority callbacks executed first\n cbs.sort(function (a, b) {\n return b.priority - a.priority;\n });\n};\nvar beforeRenderCallbacks = function beforeRenderCallbacks(r, willDraw, startTime) {\n var cbs = r.beforeRenderCallbacks;\n for (var i = 0; i < cbs.length; i++) {\n cbs[i].fn(willDraw, startTime);\n }\n};\nBRp$1.startRenderLoop = function () {\n var r = this;\n var cy = r.cy;\n if (r.renderLoopStarted) {\n return;\n } else {\n r.renderLoopStarted = true;\n }\n var renderFn = function renderFn(requestTime) {\n if (r.destroyed) {\n return;\n }\n if (cy.batching()) ; else if (r.requestedFrame && !r.skipFrame) {\n beforeRenderCallbacks(r, true, requestTime);\n var startTime = performanceNow();\n r.render(r.renderOptions);\n var endTime = r.lastDrawTime = performanceNow();\n if (r.averageRedrawTime === undefined) {\n r.averageRedrawTime = endTime - startTime;\n }\n if (r.redrawCount === undefined) {\n r.redrawCount = 0;\n }\n r.redrawCount++;\n if (r.redrawTotalTime === undefined) {\n r.redrawTotalTime = 0;\n }\n var duration = endTime - startTime;\n r.redrawTotalTime += duration;\n r.lastRedrawTime = duration;\n\n // use a weighted average with a bias from the previous average so we don't spike so easily\n r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2;\n r.requestedFrame = false;\n } else {\n beforeRenderCallbacks(r, false, requestTime);\n }\n r.skipFrame = false;\n requestAnimationFrame(renderFn);\n };\n requestAnimationFrame(renderFn);\n};\n\nvar BaseRenderer = function BaseRenderer(options) {\n this.init(options);\n};\nvar BR = BaseRenderer;\nvar BRp = BR.prototype;\nBRp.clientFunctions = ['redrawHint', 'render', 'renderTo', 'matchCanvasSize', 'nodeShapeImpl', 'arrowShapeImpl'];\nBRp.init = function (options) {\n var r = this;\n r.options = options;\n r.cy = options.cy;\n var ctr = r.container = options.cy.container();\n var containerWindow = r.cy.window();\n\n // prepend a stylesheet in the head such that\n if (containerWindow) {\n var document = containerWindow.document;\n var head = document.head;\n var stylesheetId = '__________cytoscape_stylesheet';\n var className = '__________cytoscape_container';\n var stylesheetAlreadyExists = document.getElementById(stylesheetId) != null;\n if (ctr.className.indexOf(className) < 0) {\n ctr.className = (ctr.className || '') + ' ' + className;\n }\n if (!stylesheetAlreadyExists) {\n var stylesheet = document.createElement('style');\n stylesheet.id = stylesheetId;\n stylesheet.textContent = '.' + className + ' { position: relative; }';\n head.insertBefore(stylesheet, head.children[0]); // first so lowest priority\n }\n\n var computedStyle = containerWindow.getComputedStyle(ctr);\n var position = computedStyle.getPropertyValue('position');\n if (position === 'static') {\n warn('A Cytoscape container has style position:static and so can not use UI extensions properly');\n }\n }\n r.selection = [undefined, undefined, undefined, undefined, 0]; // Coordinates for selection box, plus enabled flag\n\n r.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95];\n\n //--Pointer-related data\n r.hoverData = {\n down: null,\n last: null,\n downTime: null,\n triggerMode: null,\n dragging: false,\n initialPan: [null, null],\n capture: false\n };\n r.dragData = {\n possibleDragElements: []\n };\n r.touchData = {\n start: null,\n capture: false,\n // These 3 fields related to tap, taphold events\n startPosition: [null, null, null, null, null, null],\n singleTouchStartTime: null,\n singleTouchMoved: true,\n now: [null, null, null, null, null, null],\n earlier: [null, null, null, null, null, null]\n };\n r.redraws = 0;\n r.showFps = options.showFps;\n r.debug = options.debug;\n r.hideEdgesOnViewport = options.hideEdgesOnViewport;\n r.textureOnViewport = options.textureOnViewport;\n r.wheelSensitivity = options.wheelSensitivity;\n r.motionBlurEnabled = options.motionBlur; // on by default\n r.forcedPixelRatio = number$1(options.pixelRatio) ? options.pixelRatio : null;\n r.motionBlur = options.motionBlur; // for initial kick off\n r.motionBlurOpacity = options.motionBlurOpacity;\n r.motionBlurTransparency = 1 - r.motionBlurOpacity;\n r.motionBlurPxRatio = 1;\n r.mbPxRBlurry = 1; //0.8;\n r.minMbLowQualFrames = 4;\n r.fullQualityMb = false;\n r.clearedForMotionBlur = [];\n r.desktopTapThreshold = options.desktopTapThreshold;\n r.desktopTapThreshold2 = options.desktopTapThreshold * options.desktopTapThreshold;\n r.touchTapThreshold = options.touchTapThreshold;\n r.touchTapThreshold2 = options.touchTapThreshold * options.touchTapThreshold;\n r.tapholdDuration = 500;\n r.bindings = [];\n r.beforeRenderCallbacks = [];\n r.beforeRenderPriorities = {\n // higher priority execs before lower one\n animations: 400,\n eleCalcs: 300,\n eleTxrDeq: 200,\n lyrTxrDeq: 150,\n lyrTxrSkip: 100\n };\n r.registerNodeShapes();\n r.registerArrowShapes();\n r.registerCalculationListeners();\n};\nBRp.notify = function (eventName, eles) {\n var r = this;\n var cy = r.cy;\n\n // the renderer can't be notified after it's destroyed\n if (this.destroyed) {\n return;\n }\n if (eventName === 'init') {\n r.load();\n return;\n }\n if (eventName === 'destroy') {\n r.destroy();\n return;\n }\n if (eventName === 'add' || eventName === 'remove' || eventName === 'move' && cy.hasCompoundNodes() || eventName === 'load' || eventName === 'zorder' || eventName === 'mount') {\n r.invalidateCachedZSortedEles();\n }\n if (eventName === 'viewport') {\n r.redrawHint('select', true);\n }\n if (eventName === 'load' || eventName === 'resize' || eventName === 'mount') {\n r.invalidateContainerClientCoordsCache();\n r.matchCanvasSize(r.container);\n }\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n this.startRenderLoop();\n this.redraw();\n};\nBRp.destroy = function () {\n var r = this;\n r.destroyed = true;\n r.cy.stopAnimationLoop();\n for (var i = 0; i < r.bindings.length; i++) {\n var binding = r.bindings[i];\n var b = binding;\n var tgt = b.target;\n (tgt.off || tgt.removeEventListener).apply(tgt, b.args);\n }\n r.bindings = [];\n r.beforeRenderCallbacks = [];\n r.onUpdateEleCalcsFns = [];\n if (r.removeObserver) {\n r.removeObserver.disconnect();\n }\n if (r.styleObserver) {\n r.styleObserver.disconnect();\n }\n if (r.resizeObserver) {\n r.resizeObserver.disconnect();\n }\n if (r.labelCalcDiv) {\n try {\n document.body.removeChild(r.labelCalcDiv); // eslint-disable-line no-undef\n } catch (e) {\n // ie10 issue #1014\n }\n }\n};\nBRp.isHeadless = function () {\n return false;\n};\n[BRp$f, BRp$5, BRp$4, BRp$3, BRp$2, BRp$1].forEach(function (props) {\n extend(BRp, props);\n});\n\nvar fullFpsTime = 1000 / 60; // assume 60 frames per second\n\nvar defs = {\n setupDequeueing: function setupDequeueing(opts) {\n return function setupDequeueingImpl() {\n var self = this;\n var r = this.renderer;\n if (self.dequeueingSetup) {\n return;\n } else {\n self.dequeueingSetup = true;\n }\n var queueRedraw = debounce_1(function () {\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n r.redraw();\n }, opts.deqRedrawThreshold);\n var dequeue = function dequeue(willDraw, frameStartTime) {\n var startTime = performanceNow();\n var avgRenderTime = r.averageRedrawTime;\n var renderTime = r.lastRedrawTime;\n var deqd = [];\n var extent = r.cy.extent();\n var pixelRatio = r.getPixelRatio();\n\n // if we aren't in a tick that causes a draw, then the rendered style\n // queue won't automatically be flushed before dequeueing starts\n if (!willDraw) {\n r.flushRenderedStyleQueue();\n }\n while (true) {\n // eslint-disable-line no-constant-condition\n var now = performanceNow();\n var duration = now - startTime;\n var frameDuration = now - frameStartTime;\n if (renderTime < fullFpsTime) {\n // if we're rendering faster than the ideal fps, then do dequeueing\n // during all of the remaining frame time\n\n var timeAvailable = fullFpsTime - (willDraw ? avgRenderTime : 0);\n if (frameDuration >= opts.deqFastCost * timeAvailable) {\n break;\n }\n } else {\n if (willDraw) {\n if (duration >= opts.deqCost * renderTime || duration >= opts.deqAvgCost * avgRenderTime) {\n break;\n }\n } else if (frameDuration >= opts.deqNoDrawCost * fullFpsTime) {\n break;\n }\n }\n var thisDeqd = opts.deq(self, pixelRatio, extent);\n if (thisDeqd.length > 0) {\n for (var i = 0; i < thisDeqd.length; i++) {\n deqd.push(thisDeqd[i]);\n }\n } else {\n break;\n }\n }\n\n // callbacks on dequeue\n if (deqd.length > 0) {\n opts.onDeqd(self, deqd);\n if (!willDraw && opts.shouldRedraw(self, deqd, pixelRatio, extent)) {\n queueRedraw();\n }\n }\n };\n var priority = opts.priority || noop$1;\n r.beforeRender(dequeue, priority(self));\n };\n }\n};\n\n// Allows lookups for (ele, lvl) => cache.\n// Uses keys so elements may share the same cache.\nvar ElementTextureCacheLookup = /*#__PURE__*/function () {\n function ElementTextureCacheLookup(getKey) {\n var doesEleInvalidateKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : falsify;\n _classCallCheck(this, ElementTextureCacheLookup);\n this.idsByKey = new Map$2();\n this.keyForId = new Map$2();\n this.cachesByLvl = new Map$2();\n this.lvls = [];\n this.getKey = getKey;\n this.doesEleInvalidateKey = doesEleInvalidateKey;\n }\n _createClass(ElementTextureCacheLookup, [{\n key: \"getIdsFor\",\n value: function getIdsFor(key) {\n if (key == null) {\n error(\"Can not get id list for null key\");\n }\n var idsByKey = this.idsByKey;\n var ids = this.idsByKey.get(key);\n if (!ids) {\n ids = new Set$1();\n idsByKey.set(key, ids);\n }\n return ids;\n }\n }, {\n key: \"addIdForKey\",\n value: function addIdForKey(key, id) {\n if (key != null) {\n this.getIdsFor(key).add(id);\n }\n }\n }, {\n key: \"deleteIdForKey\",\n value: function deleteIdForKey(key, id) {\n if (key != null) {\n this.getIdsFor(key)[\"delete\"](id);\n }\n }\n }, {\n key: \"getNumberOfIdsForKey\",\n value: function getNumberOfIdsForKey(key) {\n if (key == null) {\n return 0;\n } else {\n return this.getIdsFor(key).size;\n }\n }\n }, {\n key: \"updateKeyMappingFor\",\n value: function updateKeyMappingFor(ele) {\n var id = ele.id();\n var prevKey = this.keyForId.get(id);\n var currKey = this.getKey(ele);\n this.deleteIdForKey(prevKey, id);\n this.addIdForKey(currKey, id);\n this.keyForId.set(id, currKey);\n }\n }, {\n key: \"deleteKeyMappingFor\",\n value: function deleteKeyMappingFor(ele) {\n var id = ele.id();\n var prevKey = this.keyForId.get(id);\n this.deleteIdForKey(prevKey, id);\n this.keyForId[\"delete\"](id);\n }\n }, {\n key: \"keyHasChangedFor\",\n value: function keyHasChangedFor(ele) {\n var id = ele.id();\n var prevKey = this.keyForId.get(id);\n var newKey = this.getKey(ele);\n return prevKey !== newKey;\n }\n }, {\n key: \"isInvalid\",\n value: function isInvalid(ele) {\n return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele);\n }\n }, {\n key: \"getCachesAt\",\n value: function getCachesAt(lvl) {\n var cachesByLvl = this.cachesByLvl,\n lvls = this.lvls;\n var caches = cachesByLvl.get(lvl);\n if (!caches) {\n caches = new Map$2();\n cachesByLvl.set(lvl, caches);\n lvls.push(lvl);\n }\n return caches;\n }\n }, {\n key: \"getCache\",\n value: function getCache(key, lvl) {\n return this.getCachesAt(lvl).get(key);\n }\n }, {\n key: \"get\",\n value: function get(ele, lvl) {\n var key = this.getKey(ele);\n var cache = this.getCache(key, lvl);\n\n // getting for an element may need to add to the id list b/c eles can share keys\n if (cache != null) {\n this.updateKeyMappingFor(ele);\n }\n return cache;\n }\n }, {\n key: \"getForCachedKey\",\n value: function getForCachedKey(ele, lvl) {\n var key = this.keyForId.get(ele.id()); // n.b. use cached key, not newly computed key\n var cache = this.getCache(key, lvl);\n return cache;\n }\n }, {\n key: \"hasCache\",\n value: function hasCache(key, lvl) {\n return this.getCachesAt(lvl).has(key);\n }\n }, {\n key: \"has\",\n value: function has(ele, lvl) {\n var key = this.getKey(ele);\n return this.hasCache(key, lvl);\n }\n }, {\n key: \"setCache\",\n value: function setCache(key, lvl, cache) {\n cache.key = key;\n this.getCachesAt(lvl).set(key, cache);\n }\n }, {\n key: \"set\",\n value: function set(ele, lvl, cache) {\n var key = this.getKey(ele);\n this.setCache(key, lvl, cache);\n this.updateKeyMappingFor(ele);\n }\n }, {\n key: \"deleteCache\",\n value: function deleteCache(key, lvl) {\n this.getCachesAt(lvl)[\"delete\"](key);\n }\n }, {\n key: \"delete\",\n value: function _delete(ele, lvl) {\n var key = this.getKey(ele);\n this.deleteCache(key, lvl);\n }\n }, {\n key: \"invalidateKey\",\n value: function invalidateKey(key) {\n var _this = this;\n this.lvls.forEach(function (lvl) {\n return _this.deleteCache(key, lvl);\n });\n }\n\n // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key)\n }, {\n key: \"invalidate\",\n value: function invalidate(ele) {\n var id = ele.id();\n var key = this.keyForId.get(id); // n.b. use stored key rather than current (potential key)\n\n this.deleteKeyMappingFor(ele);\n var entireKeyInvalidated = this.doesEleInvalidateKey(ele);\n if (entireKeyInvalidated) {\n // clear mapping for current key\n this.invalidateKey(key);\n }\n return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0;\n }\n }]);\n return ElementTextureCacheLookup;\n}();\n\nvar minTxrH = 25; // the size of the texture cache for small height eles (special case)\nvar txrStepH = 50; // the min size of the regular cache, and the size it increases with each step up\nvar minLvl$1 = -4; // when scaling smaller than that we don't need to re-render\nvar maxLvl$1 = 3; // when larger than this scale just render directly (caching is not helpful)\nvar maxZoom$1 = 7.99; // beyond this zoom level, layered textures are not used\nvar eleTxrSpacing = 8; // spacing between elements on textures to avoid blitting overlaps\nvar defTxrWidth = 1024; // default/minimum texture width\nvar maxTxrW = 1024; // the maximum width of a texture\nvar maxTxrH = 1024; // the maximum height of a texture\nvar minUtility = 0.2; // if usage of texture is less than this, it is retired\nvar maxFullness = 0.8; // fullness of texture after which queue removal is checked\nvar maxFullnessChecks = 10; // dequeued after this many checks\nvar deqCost$1 = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame\nvar deqAvgCost$1 = 0.1; // % of add'l rendering cost compared to average overall redraw time\nvar deqNoDrawCost$1 = 0.9; // % of avg frame time that can be used for dequeueing when not drawing\nvar deqFastCost$1 = 0.9; // % of frame time to be used when >60fps\nvar deqRedrawThreshold$1 = 100; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile\nvar maxDeqSize$1 = 1; // number of eles to dequeue and render at higher texture in each batch\n\nvar getTxrReasons = {\n dequeue: 'dequeue',\n downscale: 'downscale',\n highQuality: 'highQuality'\n};\nvar initDefaults = defaults$g({\n getKey: null,\n doesEleInvalidateKey: falsify,\n drawElement: null,\n getBoundingBox: null,\n getRotationPoint: null,\n getRotationOffset: null,\n isVisible: trueify,\n allowEdgeTxrCaching: true,\n allowParentTxrCaching: true\n});\nvar ElementTextureCache = function ElementTextureCache(renderer, initOptions) {\n var self = this;\n self.renderer = renderer;\n self.onDequeues = [];\n var opts = initDefaults(initOptions);\n extend(self, opts);\n self.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey);\n self.setupDequeueing();\n};\nvar ETCp = ElementTextureCache.prototype;\nETCp.reasons = getTxrReasons;\n\n// the list of textures in which new subtextures for elements can be placed\nETCp.getTextureQueue = function (txrH) {\n var self = this;\n self.eleImgCaches = self.eleImgCaches || {};\n return self.eleImgCaches[txrH] = self.eleImgCaches[txrH] || [];\n};\n\n// the list of usused textures which can be recycled (in use in texture queue)\nETCp.getRetiredTextureQueue = function (txrH) {\n var self = this;\n var rtxtrQs = self.eleImgCaches.retired = self.eleImgCaches.retired || {};\n var rtxtrQ = rtxtrQs[txrH] = rtxtrQs[txrH] || [];\n return rtxtrQ;\n};\n\n// queue of element draw requests at different scale levels\nETCp.getElementQueue = function () {\n var self = this;\n var q = self.eleCacheQueue = self.eleCacheQueue || new heap(function (a, b) {\n return b.reqs - a.reqs;\n });\n return q;\n};\n\n// queue of element draw requests at different scale levels (element id lookup)\nETCp.getElementKeyToQueue = function () {\n var self = this;\n var k2q = self.eleKeyToCacheQueue = self.eleKeyToCacheQueue || {};\n return k2q;\n};\nETCp.getElement = function (ele, bb, pxRatio, lvl, reason) {\n var self = this;\n var r = this.renderer;\n var zoom = r.cy.zoom();\n var lookup = this.lookup;\n if (!bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed()) {\n return null;\n }\n if (!self.allowEdgeTxrCaching && ele.isEdge() || !self.allowParentTxrCaching && ele.isParent()) {\n return null;\n }\n if (lvl == null) {\n lvl = Math.ceil(log2(zoom * pxRatio));\n }\n if (lvl < minLvl$1) {\n lvl = minLvl$1;\n } else if (zoom >= maxZoom$1 || lvl > maxLvl$1) {\n return null;\n }\n var scale = Math.pow(2, lvl);\n var eleScaledH = bb.h * scale;\n var eleScaledW = bb.w * scale;\n var scaledLabelShown = r.eleTextBiggerThanMin(ele, scale);\n if (!this.isVisible(ele, scaledLabelShown)) {\n return null;\n }\n var eleCache = lookup.get(ele, lvl);\n\n // if this get was on an unused/invalidated cache, then restore the texture usage metric\n if (eleCache && eleCache.invalidated) {\n eleCache.invalidated = false;\n eleCache.texture.invalidatedWidth -= eleCache.width;\n }\n if (eleCache) {\n return eleCache;\n }\n var txrH; // which texture height this ele belongs to\n\n if (eleScaledH <= minTxrH) {\n txrH = minTxrH;\n } else if (eleScaledH <= txrStepH) {\n txrH = txrStepH;\n } else {\n txrH = Math.ceil(eleScaledH / txrStepH) * txrStepH;\n }\n if (eleScaledH > maxTxrH || eleScaledW > maxTxrW) {\n return null; // caching large elements is not efficient\n }\n\n var txrQ = self.getTextureQueue(txrH);\n\n // first try the second last one in case it has space at the end\n var txr = txrQ[txrQ.length - 2];\n var addNewTxr = function addNewTxr() {\n return self.recycleTexture(txrH, eleScaledW) || self.addTexture(txrH, eleScaledW);\n };\n\n // try the last one if there is no second last one\n if (!txr) {\n txr = txrQ[txrQ.length - 1];\n }\n\n // if the last one doesn't exist, we need a first one\n if (!txr) {\n txr = addNewTxr();\n }\n\n // if there's no room in the current texture, we need a new one\n if (txr.width - txr.usedWidth < eleScaledW) {\n txr = addNewTxr();\n }\n var scalableFrom = function scalableFrom(otherCache) {\n return otherCache && otherCache.scaledLabelShown === scaledLabelShown;\n };\n var deqing = reason && reason === getTxrReasons.dequeue;\n var highQualityReq = reason && reason === getTxrReasons.highQuality;\n var downscaleReq = reason && reason === getTxrReasons.downscale;\n var higherCache; // the nearest cache with a higher level\n for (var l = lvl + 1; l <= maxLvl$1; l++) {\n var c = lookup.get(ele, l);\n if (c) {\n higherCache = c;\n break;\n }\n }\n var oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null;\n var downscale = function downscale() {\n txr.context.drawImage(oneUpCache.texture.canvas, oneUpCache.x, 0, oneUpCache.width, oneUpCache.height, txr.usedWidth, 0, eleScaledW, eleScaledH);\n };\n\n // reset ele area in texture\n txr.context.setTransform(1, 0, 0, 1, 0, 0);\n txr.context.clearRect(txr.usedWidth, 0, eleScaledW, txrH);\n if (scalableFrom(oneUpCache)) {\n // then we can relatively cheaply rescale the existing image w/o rerendering\n downscale();\n } else if (scalableFrom(higherCache)) {\n // then use the higher cache for now and queue the next level down\n // to cheaply scale towards the smaller level\n\n if (highQualityReq) {\n for (var _l = higherCache.level; _l > lvl; _l--) {\n oneUpCache = self.getElement(ele, bb, pxRatio, _l, getTxrReasons.downscale);\n }\n downscale();\n } else {\n self.queueElement(ele, higherCache.level - 1);\n return higherCache;\n }\n } else {\n var lowerCache; // the nearest cache with a lower level\n if (!deqing && !highQualityReq && !downscaleReq) {\n for (var _l2 = lvl - 1; _l2 >= minLvl$1; _l2--) {\n var _c = lookup.get(ele, _l2);\n if (_c) {\n lowerCache = _c;\n break;\n }\n }\n }\n if (scalableFrom(lowerCache)) {\n // then use the lower quality cache for now and queue the better one for later\n\n self.queueElement(ele, lvl);\n return lowerCache;\n }\n txr.context.translate(txr.usedWidth, 0);\n txr.context.scale(scale, scale);\n this.drawElement(txr.context, ele, bb, scaledLabelShown, false);\n txr.context.scale(1 / scale, 1 / scale);\n txr.context.translate(-txr.usedWidth, 0);\n }\n eleCache = {\n x: txr.usedWidth,\n texture: txr,\n level: lvl,\n scale: scale,\n width: eleScaledW,\n height: eleScaledH,\n scaledLabelShown: scaledLabelShown\n };\n txr.usedWidth += Math.ceil(eleScaledW + eleTxrSpacing);\n txr.eleCaches.push(eleCache);\n lookup.set(ele, lvl, eleCache);\n self.checkTextureFullness(txr);\n return eleCache;\n};\nETCp.invalidateElements = function (eles) {\n for (var i = 0; i < eles.length; i++) {\n this.invalidateElement(eles[i]);\n }\n};\nETCp.invalidateElement = function (ele) {\n var self = this;\n var lookup = self.lookup;\n var caches = [];\n var invalid = lookup.isInvalid(ele);\n if (!invalid) {\n return; // override the invalidation request if the element key has not changed\n }\n\n for (var lvl = minLvl$1; lvl <= maxLvl$1; lvl++) {\n var cache = lookup.getForCachedKey(ele, lvl);\n if (cache) {\n caches.push(cache);\n }\n }\n var noOtherElesUseCache = lookup.invalidate(ele);\n if (noOtherElesUseCache) {\n for (var i = 0; i < caches.length; i++) {\n var _cache = caches[i];\n var txr = _cache.texture;\n\n // remove space from the texture it belongs to\n txr.invalidatedWidth += _cache.width;\n\n // mark the cache as invalidated\n _cache.invalidated = true;\n\n // retire the texture if its utility is low\n self.checkTextureUtility(txr);\n }\n }\n\n // remove from queue since the old req was for the old state\n self.removeFromQueue(ele);\n};\nETCp.checkTextureUtility = function (txr) {\n // invalidate all entries in the cache if the cache size is small\n if (txr.invalidatedWidth >= minUtility * txr.width) {\n this.retireTexture(txr);\n }\n};\nETCp.checkTextureFullness = function (txr) {\n // if texture has been mostly filled and passed over several times, remove\n // it from the queue so we don't need to waste time looking at it to put new things\n\n var self = this;\n var txrQ = self.getTextureQueue(txr.height);\n if (txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks) {\n removeFromArray(txrQ, txr);\n } else {\n txr.fullnessChecks++;\n }\n};\nETCp.retireTexture = function (txr) {\n var self = this;\n var txrH = txr.height;\n var txrQ = self.getTextureQueue(txrH);\n var lookup = this.lookup;\n\n // retire the texture from the active / searchable queue:\n\n removeFromArray(txrQ, txr);\n txr.retired = true;\n\n // remove the refs from the eles to the caches:\n\n var eleCaches = txr.eleCaches;\n for (var i = 0; i < eleCaches.length; i++) {\n var eleCache = eleCaches[i];\n lookup.deleteCache(eleCache.key, eleCache.level);\n }\n clearArray(eleCaches);\n\n // add the texture to a retired queue so it can be recycled in future:\n\n var rtxtrQ = self.getRetiredTextureQueue(txrH);\n rtxtrQ.push(txr);\n};\nETCp.addTexture = function (txrH, minW) {\n var self = this;\n var txrQ = self.getTextureQueue(txrH);\n var txr = {};\n txrQ.push(txr);\n txr.eleCaches = [];\n txr.height = txrH;\n txr.width = Math.max(defTxrWidth, minW);\n txr.usedWidth = 0;\n txr.invalidatedWidth = 0;\n txr.fullnessChecks = 0;\n txr.canvas = self.renderer.makeOffscreenCanvas(txr.width, txr.height);\n txr.context = txr.canvas.getContext('2d');\n return txr;\n};\nETCp.recycleTexture = function (txrH, minW) {\n var self = this;\n var txrQ = self.getTextureQueue(txrH);\n var rtxtrQ = self.getRetiredTextureQueue(txrH);\n for (var i = 0; i < rtxtrQ.length; i++) {\n var txr = rtxtrQ[i];\n if (txr.width >= minW) {\n txr.retired = false;\n txr.usedWidth = 0;\n txr.invalidatedWidth = 0;\n txr.fullnessChecks = 0;\n clearArray(txr.eleCaches);\n txr.context.setTransform(1, 0, 0, 1, 0, 0);\n txr.context.clearRect(0, 0, txr.width, txr.height);\n removeFromArray(rtxtrQ, txr);\n txrQ.push(txr);\n return txr;\n }\n }\n};\nETCp.queueElement = function (ele, lvl) {\n var self = this;\n var q = self.getElementQueue();\n var k2q = self.getElementKeyToQueue();\n var key = this.getKey(ele);\n var existingReq = k2q[key];\n if (existingReq) {\n // use the max lvl b/c in between lvls are cheap to make\n existingReq.level = Math.max(existingReq.level, lvl);\n existingReq.eles.merge(ele);\n existingReq.reqs++;\n q.updateItem(existingReq);\n } else {\n var req = {\n eles: ele.spawn().merge(ele),\n level: lvl,\n reqs: 1,\n key: key\n };\n q.push(req);\n k2q[key] = req;\n }\n};\nETCp.dequeue = function (pxRatio /*, extent*/) {\n var self = this;\n var q = self.getElementQueue();\n var k2q = self.getElementKeyToQueue();\n var dequeued = [];\n var lookup = self.lookup;\n for (var i = 0; i < maxDeqSize$1; i++) {\n if (q.size() > 0) {\n var req = q.pop();\n var key = req.key;\n var ele = req.eles[0]; // all eles have the same key\n var cacheExists = lookup.hasCache(ele, req.level);\n\n // clear out the key to req lookup\n k2q[key] = null;\n\n // dequeueing isn't necessary with an existing cache\n if (cacheExists) {\n continue;\n }\n dequeued.push(req);\n var bb = self.getBoundingBox(ele);\n self.getElement(ele, bb, pxRatio, req.level, getTxrReasons.dequeue);\n } else {\n break;\n }\n }\n return dequeued;\n};\nETCp.removeFromQueue = function (ele) {\n var self = this;\n var q = self.getElementQueue();\n var k2q = self.getElementKeyToQueue();\n var key = this.getKey(ele);\n var req = k2q[key];\n if (req != null) {\n if (req.eles.length === 1) {\n // remove if last ele in the req\n // bring to front of queue\n req.reqs = MAX_INT$1;\n q.updateItem(req);\n q.pop(); // remove from queue\n\n k2q[key] = null; // remove from lookup map\n } else {\n // otherwise just remove ele from req\n req.eles.unmerge(ele);\n }\n }\n};\nETCp.onDequeue = function (fn) {\n this.onDequeues.push(fn);\n};\nETCp.offDequeue = function (fn) {\n removeFromArray(this.onDequeues, fn);\n};\nETCp.setupDequeueing = defs.setupDequeueing({\n deqRedrawThreshold: deqRedrawThreshold$1,\n deqCost: deqCost$1,\n deqAvgCost: deqAvgCost$1,\n deqNoDrawCost: deqNoDrawCost$1,\n deqFastCost: deqFastCost$1,\n deq: function deq(self, pxRatio, extent) {\n return self.dequeue(pxRatio, extent);\n },\n onDeqd: function onDeqd(self, deqd) {\n for (var i = 0; i < self.onDequeues.length; i++) {\n var fn = self.onDequeues[i];\n fn(deqd);\n }\n },\n shouldRedraw: function shouldRedraw(self, deqd, pxRatio, extent) {\n for (var i = 0; i < deqd.length; i++) {\n var eles = deqd[i].eles;\n for (var j = 0; j < eles.length; j++) {\n var bb = eles[j].boundingBox();\n if (boundingBoxesIntersect(bb, extent)) {\n return true;\n }\n }\n }\n return false;\n },\n priority: function priority(self) {\n return self.renderer.beforeRenderPriorities.eleTxrDeq;\n }\n});\n\nvar defNumLayers = 1; // default number of layers to use\nvar minLvl = -4; // when scaling smaller than that we don't need to re-render\nvar maxLvl = 2; // when larger than this scale just render directly (caching is not helpful)\nvar maxZoom = 3.99; // beyond this zoom level, layered textures are not used\nvar deqRedrawThreshold = 50; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile\nvar refineEleDebounceTime = 50; // time to debounce sharper ele texture updates\nvar deqCost = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame\nvar deqAvgCost = 0.1; // % of add'l rendering cost compared to average overall redraw time\nvar deqNoDrawCost = 0.9; // % of avg frame time that can be used for dequeueing when not drawing\nvar deqFastCost = 0.9; // % of frame time to be used when >60fps\nvar maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch\nvar invalidThreshold = 250; // time threshold for disabling b/c of invalidations\nvar maxLayerArea = 4000 * 4000; // layers can't be bigger than this\nvar useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm)\n\n// var log = function(){ console.log.apply( console, arguments ); };\n\nvar LayeredTextureCache = function LayeredTextureCache(renderer) {\n var self = this;\n var r = self.renderer = renderer;\n var cy = r.cy;\n self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ]\n\n self.firstGet = true;\n self.lastInvalidationTime = performanceNow() - 2 * invalidThreshold;\n self.skipping = false;\n self.eleTxrDeqs = cy.collection();\n self.scheduleElementRefinement = debounce_1(function () {\n self.refineElementTextures(self.eleTxrDeqs);\n self.eleTxrDeqs.unmerge(self.eleTxrDeqs);\n }, refineEleDebounceTime);\n r.beforeRender(function (willDraw, now) {\n if (now - self.lastInvalidationTime <= invalidThreshold) {\n self.skipping = true;\n } else {\n self.skipping = false;\n }\n }, r.beforeRenderPriorities.lyrTxrSkip);\n var qSort = function qSort(a, b) {\n return b.reqs - a.reqs;\n };\n self.layersQueue = new heap(qSort);\n self.setupDequeueing();\n};\nvar LTCp = LayeredTextureCache.prototype;\nvar layerIdPool = 0;\nvar MAX_INT = Math.pow(2, 53) - 1;\nLTCp.makeLayer = function (bb, lvl) {\n var scale = Math.pow(2, lvl);\n var w = Math.ceil(bb.w * scale);\n var h = Math.ceil(bb.h * scale);\n var canvas = this.renderer.makeOffscreenCanvas(w, h);\n var layer = {\n id: layerIdPool = ++layerIdPool % MAX_INT,\n bb: bb,\n level: lvl,\n width: w,\n height: h,\n canvas: canvas,\n context: canvas.getContext('2d'),\n eles: [],\n elesQueue: [],\n reqs: 0\n };\n\n // log('make layer %s with w %s and h %s and lvl %s', layer.id, layer.width, layer.height, layer.level);\n\n var cxt = layer.context;\n var dx = -layer.bb.x1;\n var dy = -layer.bb.y1;\n\n // do the transform on creation to save cycles (it's the same for all eles)\n cxt.scale(scale, scale);\n cxt.translate(dx, dy);\n return layer;\n};\nLTCp.getLayers = function (eles, pxRatio, lvl) {\n var self = this;\n var r = self.renderer;\n var cy = r.cy;\n var zoom = cy.zoom();\n var firstGet = self.firstGet;\n self.firstGet = false;\n\n // log('--\\nget layers with %s eles', eles.length);\n //log eles.map(function(ele){ return ele.id() }) );\n\n if (lvl == null) {\n lvl = Math.ceil(log2(zoom * pxRatio));\n if (lvl < minLvl) {\n lvl = minLvl;\n } else if (zoom >= maxZoom || lvl > maxLvl) {\n return null;\n }\n }\n self.validateLayersElesOrdering(lvl, eles);\n var layersByLvl = self.layersByLevel;\n var scale = Math.pow(2, lvl);\n var layers = layersByLvl[lvl] = layersByLvl[lvl] || [];\n var bb;\n var lvlComplete = self.levelIsComplete(lvl, eles);\n var tmpLayers;\n var checkTempLevels = function checkTempLevels() {\n var canUseAsTmpLvl = function canUseAsTmpLvl(l) {\n self.validateLayersElesOrdering(l, eles);\n if (self.levelIsComplete(l, eles)) {\n tmpLayers = layersByLvl[l];\n return true;\n }\n };\n var checkLvls = function checkLvls(dir) {\n if (tmpLayers) {\n return;\n }\n for (var l = lvl + dir; minLvl <= l && l <= maxLvl; l += dir) {\n if (canUseAsTmpLvl(l)) {\n break;\n }\n }\n };\n checkLvls(+1);\n checkLvls(-1);\n\n // remove the invalid layers; they will be replaced as needed later in this function\n for (var i = layers.length - 1; i >= 0; i--) {\n var layer = layers[i];\n if (layer.invalid) {\n removeFromArray(layers, layer);\n }\n }\n };\n if (!lvlComplete) {\n // if the current level is incomplete, then use the closest, best quality layerset temporarily\n // and later queue the current layerset so we can get the proper quality level soon\n\n checkTempLevels();\n } else {\n // log('level complete, using existing layers\\n--');\n return layers;\n }\n var getBb = function getBb() {\n if (!bb) {\n bb = makeBoundingBox();\n for (var i = 0; i < eles.length; i++) {\n updateBoundingBox(bb, eles[i].boundingBox());\n }\n }\n return bb;\n };\n var makeLayer = function makeLayer(opts) {\n opts = opts || {};\n var after = opts.after;\n getBb();\n var area = bb.w * scale * (bb.h * scale);\n if (area > maxLayerArea) {\n return null;\n }\n var layer = self.makeLayer(bb, lvl);\n if (after != null) {\n var index = layers.indexOf(after) + 1;\n layers.splice(index, 0, layer);\n } else if (opts.insert === undefined || opts.insert) {\n // no after specified => first layer made so put at start\n layers.unshift(layer);\n }\n\n // if( tmpLayers ){\n //self.queueLayer( layer );\n // }\n\n return layer;\n };\n if (self.skipping && !firstGet) {\n // log('skip layers');\n return null;\n }\n\n // log('do layers');\n\n var layer = null;\n var maxElesPerLayer = eles.length / defNumLayers;\n var allowLazyQueueing = !firstGet;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var rs = ele._private.rscratch;\n var caches = rs.imgLayerCaches = rs.imgLayerCaches || {};\n\n // log('look at ele', ele.id());\n\n var existingLayer = caches[lvl];\n if (existingLayer) {\n // reuse layer for later eles\n // log('reuse layer for', ele.id());\n layer = existingLayer;\n continue;\n }\n if (!layer || layer.eles.length >= maxElesPerLayer || !boundingBoxInBoundingBox(layer.bb, ele.boundingBox())) {\n // log('make new layer for ele %s', ele.id());\n\n layer = makeLayer({\n insert: true,\n after: layer\n });\n\n // if now layer can be built then we can't use layers at this level\n if (!layer) {\n return null;\n }\n\n // log('new layer with id %s', layer.id);\n }\n\n if (tmpLayers || allowLazyQueueing) {\n // log('queue ele %s in layer %s', ele.id(), layer.id);\n self.queueLayer(layer, ele);\n } else {\n // log('draw ele %s in layer %s', ele.id(), layer.id);\n self.drawEleInLayer(layer, ele, lvl, pxRatio);\n }\n layer.eles.push(ele);\n caches[lvl] = layer;\n }\n\n // log('--');\n\n if (tmpLayers) {\n // then we only queued the current layerset and can't draw it yet\n return tmpLayers;\n }\n if (allowLazyQueueing) {\n // log('lazy queue level', lvl);\n return null;\n }\n return layers;\n};\n\n// a layer may want to use an ele cache of a higher level to avoid blurriness\n// so the layer level might not equal the ele level\nLTCp.getEleLevelForLayerLevel = function (lvl, pxRatio) {\n return lvl;\n};\nLTCp.drawEleInLayer = function (layer, ele, lvl, pxRatio) {\n var self = this;\n var r = this.renderer;\n var context = layer.context;\n var bb = ele.boundingBox();\n if (bb.w === 0 || bb.h === 0 || !ele.visible()) {\n return;\n }\n lvl = self.getEleLevelForLayerLevel(lvl, pxRatio);\n {\n r.setImgSmoothing(context, false);\n }\n {\n r.drawCachedElement(context, ele, null, null, lvl, useHighQualityEleTxrReqs);\n }\n {\n r.setImgSmoothing(context, true);\n }\n};\nLTCp.levelIsComplete = function (lvl, eles) {\n var self = this;\n var layers = self.layersByLevel[lvl];\n if (!layers || layers.length === 0) {\n return false;\n }\n var numElesInLayers = 0;\n for (var i = 0; i < layers.length; i++) {\n var layer = layers[i];\n\n // if there are any eles needed to be drawn yet, the level is not complete\n if (layer.reqs > 0) {\n return false;\n }\n\n // if the layer is invalid, the level is not complete\n if (layer.invalid) {\n return false;\n }\n numElesInLayers += layer.eles.length;\n }\n\n // we should have exactly the number of eles passed in to be complete\n if (numElesInLayers !== eles.length) {\n return false;\n }\n return true;\n};\nLTCp.validateLayersElesOrdering = function (lvl, eles) {\n var layers = this.layersByLevel[lvl];\n if (!layers) {\n return;\n }\n\n // if in a layer the eles are not in the same order, then the layer is invalid\n // (i.e. there is an ele in between the eles in the layer)\n\n for (var i = 0; i < layers.length; i++) {\n var layer = layers[i];\n var offset = -1;\n\n // find the offset\n for (var j = 0; j < eles.length; j++) {\n if (layer.eles[0] === eles[j]) {\n offset = j;\n break;\n }\n }\n if (offset < 0) {\n // then the layer has nonexistent elements and is invalid\n this.invalidateLayer(layer);\n continue;\n }\n\n // the eles in the layer must be in the same continuous order, else the layer is invalid\n\n var o = offset;\n for (var j = 0; j < layer.eles.length; j++) {\n if (layer.eles[j] !== eles[o + j]) {\n // log('invalidate based on ordering', layer.id);\n\n this.invalidateLayer(layer);\n break;\n }\n }\n }\n};\nLTCp.updateElementsInLayers = function (eles, update) {\n var self = this;\n var isEles = element(eles[0]);\n\n // collect udpated elements (cascaded from the layers) and update each\n // layer itself along the way\n for (var i = 0; i < eles.length; i++) {\n var req = isEles ? null : eles[i];\n var ele = isEles ? eles[i] : eles[i].ele;\n var rs = ele._private.rscratch;\n var caches = rs.imgLayerCaches = rs.imgLayerCaches || {};\n for (var l = minLvl; l <= maxLvl; l++) {\n var layer = caches[l];\n if (!layer) {\n continue;\n }\n\n // if update is a request from the ele cache, then it affects only\n // the matching level\n if (req && self.getEleLevelForLayerLevel(layer.level) !== req.level) {\n continue;\n }\n update(layer, ele, req);\n }\n }\n};\nLTCp.haveLayers = function () {\n var self = this;\n var haveLayers = false;\n for (var l = minLvl; l <= maxLvl; l++) {\n var layers = self.layersByLevel[l];\n if (layers && layers.length > 0) {\n haveLayers = true;\n break;\n }\n }\n return haveLayers;\n};\nLTCp.invalidateElements = function (eles) {\n var self = this;\n if (eles.length === 0) {\n return;\n }\n self.lastInvalidationTime = performanceNow();\n\n // log('update invalidate layer time from eles');\n\n if (eles.length === 0 || !self.haveLayers()) {\n return;\n }\n self.updateElementsInLayers(eles, function invalAssocLayers(layer, ele, req) {\n self.invalidateLayer(layer);\n });\n};\nLTCp.invalidateLayer = function (layer) {\n // log('update invalidate layer time');\n\n this.lastInvalidationTime = performanceNow();\n if (layer.invalid) {\n return;\n } // save cycles\n\n var lvl = layer.level;\n var eles = layer.eles;\n var layers = this.layersByLevel[lvl];\n\n // log('invalidate layer', layer.id );\n\n removeFromArray(layers, layer);\n // layer.eles = [];\n\n layer.elesQueue = [];\n layer.invalid = true;\n if (layer.replacement) {\n layer.replacement.invalid = true;\n }\n for (var i = 0; i < eles.length; i++) {\n var caches = eles[i]._private.rscratch.imgLayerCaches;\n if (caches) {\n caches[lvl] = null;\n }\n }\n};\nLTCp.refineElementTextures = function (eles) {\n var self = this;\n\n // log('refine', eles.length);\n\n self.updateElementsInLayers(eles, function refineEachEle(layer, ele, req) {\n var rLyr = layer.replacement;\n if (!rLyr) {\n rLyr = layer.replacement = self.makeLayer(layer.bb, layer.level);\n rLyr.replaces = layer;\n rLyr.eles = layer.eles;\n\n // log('make replacement layer %s for %s with level %s', rLyr.id, layer.id, rLyr.level);\n }\n\n if (!rLyr.reqs) {\n for (var i = 0; i < rLyr.eles.length; i++) {\n self.queueLayer(rLyr, rLyr.eles[i]);\n }\n\n // log('queue replacement layer refinement', rLyr.id);\n }\n });\n};\n\nLTCp.enqueueElementRefinement = function (ele) {\n this.eleTxrDeqs.merge(ele);\n this.scheduleElementRefinement();\n};\nLTCp.queueLayer = function (layer, ele) {\n var self = this;\n var q = self.layersQueue;\n var elesQ = layer.elesQueue;\n var hasId = elesQ.hasId = elesQ.hasId || {};\n\n // if a layer is going to be replaced, queuing is a waste of time\n if (layer.replacement) {\n return;\n }\n if (ele) {\n if (hasId[ele.id()]) {\n return;\n }\n elesQ.push(ele);\n hasId[ele.id()] = true;\n }\n if (layer.reqs) {\n layer.reqs++;\n q.updateItem(layer);\n } else {\n layer.reqs = 1;\n q.push(layer);\n }\n};\nLTCp.dequeue = function (pxRatio) {\n var self = this;\n var q = self.layersQueue;\n var deqd = [];\n var eleDeqs = 0;\n while (eleDeqs < maxDeqSize) {\n if (q.size() === 0) {\n break;\n }\n var layer = q.peek();\n\n // if a layer has been or will be replaced, then don't waste time with it\n if (layer.replacement) {\n // log('layer %s in queue skipped b/c it already has a replacement', layer.id);\n q.pop();\n continue;\n }\n\n // if this is a replacement layer that has been superceded, then forget it\n if (layer.replaces && layer !== layer.replaces.replacement) {\n // log('layer is no longer the most uptodate replacement; dequeued', layer.id)\n q.pop();\n continue;\n }\n if (layer.invalid) {\n // log('replacement layer %s is invalid; dequeued', layer.id);\n q.pop();\n continue;\n }\n var ele = layer.elesQueue.shift();\n if (ele) {\n // log('dequeue layer %s', layer.id);\n\n self.drawEleInLayer(layer, ele, layer.level, pxRatio);\n eleDeqs++;\n }\n if (deqd.length === 0) {\n // we need only one entry in deqd to queue redrawing etc\n deqd.push(true);\n }\n\n // if the layer has all its eles done, then remove from the queue\n if (layer.elesQueue.length === 0) {\n q.pop();\n layer.reqs = 0;\n\n // log('dequeue of layer %s complete', layer.id);\n\n // when a replacement layer is dequeued, it replaces the old layer in the level\n if (layer.replaces) {\n self.applyLayerReplacement(layer);\n }\n self.requestRedraw();\n }\n }\n return deqd;\n};\nLTCp.applyLayerReplacement = function (layer) {\n var self = this;\n var layersInLevel = self.layersByLevel[layer.level];\n var replaced = layer.replaces;\n var index = layersInLevel.indexOf(replaced);\n\n // if the replaced layer is not in the active list for the level, then replacing\n // refs would be a mistake (i.e. overwriting the true active layer)\n if (index < 0 || replaced.invalid) {\n // log('replacement layer would have no effect', layer.id);\n return;\n }\n layersInLevel[index] = layer; // replace level ref\n\n // replace refs in eles\n for (var i = 0; i < layer.eles.length; i++) {\n var _p = layer.eles[i]._private;\n var cache = _p.imgLayerCaches = _p.imgLayerCaches || {};\n if (cache) {\n cache[layer.level] = layer;\n }\n }\n\n // log('apply replacement layer %s over %s', layer.id, replaced.id);\n\n self.requestRedraw();\n};\nLTCp.requestRedraw = debounce_1(function () {\n var r = this.renderer;\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n r.redraw();\n}, 100);\nLTCp.setupDequeueing = defs.setupDequeueing({\n deqRedrawThreshold: deqRedrawThreshold,\n deqCost: deqCost,\n deqAvgCost: deqAvgCost,\n deqNoDrawCost: deqNoDrawCost,\n deqFastCost: deqFastCost,\n deq: function deq(self, pxRatio) {\n return self.dequeue(pxRatio);\n },\n onDeqd: noop$1,\n shouldRedraw: trueify,\n priority: function priority(self) {\n return self.renderer.beforeRenderPriorities.lyrTxrDeq;\n }\n});\n\nvar CRp$a = {};\nvar impl;\nfunction polygon(context, points) {\n for (var i = 0; i < points.length; i++) {\n var pt = points[i];\n context.lineTo(pt.x, pt.y);\n }\n}\nfunction triangleBackcurve(context, points, controlPoint) {\n var firstPt;\n for (var i = 0; i < points.length; i++) {\n var pt = points[i];\n if (i === 0) {\n firstPt = pt;\n }\n context.lineTo(pt.x, pt.y);\n }\n context.quadraticCurveTo(controlPoint.x, controlPoint.y, firstPt.x, firstPt.y);\n}\nfunction triangleTee(context, trianglePoints, teePoints) {\n if (context.beginPath) {\n context.beginPath();\n }\n var triPts = trianglePoints;\n for (var i = 0; i < triPts.length; i++) {\n var pt = triPts[i];\n context.lineTo(pt.x, pt.y);\n }\n var teePts = teePoints;\n var firstTeePt = teePoints[0];\n context.moveTo(firstTeePt.x, firstTeePt.y);\n for (var i = 1; i < teePts.length; i++) {\n var pt = teePts[i];\n context.lineTo(pt.x, pt.y);\n }\n if (context.closePath) {\n context.closePath();\n }\n}\nfunction circleTriangle(context, trianglePoints, rx, ry, r) {\n if (context.beginPath) {\n context.beginPath();\n }\n context.arc(rx, ry, r, 0, Math.PI * 2, false);\n var triPts = trianglePoints;\n var firstTrPt = triPts[0];\n context.moveTo(firstTrPt.x, firstTrPt.y);\n for (var i = 0; i < triPts.length; i++) {\n var pt = triPts[i];\n context.lineTo(pt.x, pt.y);\n }\n if (context.closePath) {\n context.closePath();\n }\n}\nfunction circle(context, rx, ry, r) {\n context.arc(rx, ry, r, 0, Math.PI * 2, false);\n}\nCRp$a.arrowShapeImpl = function (name) {\n return (impl || (impl = {\n 'polygon': polygon,\n 'triangle-backcurve': triangleBackcurve,\n 'triangle-tee': triangleTee,\n 'circle-triangle': circleTriangle,\n 'triangle-cross': triangleTee,\n 'circle': circle\n }))[name];\n};\n\nvar CRp$9 = {};\nCRp$9.drawElement = function (context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity) {\n var r = this;\n if (ele.isNode()) {\n r.drawNode(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity);\n } else {\n r.drawEdge(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity);\n }\n};\nCRp$9.drawElementOverlay = function (context, ele) {\n var r = this;\n if (ele.isNode()) {\n r.drawNodeOverlay(context, ele);\n } else {\n r.drawEdgeOverlay(context, ele);\n }\n};\nCRp$9.drawElementUnderlay = function (context, ele) {\n var r = this;\n if (ele.isNode()) {\n r.drawNodeUnderlay(context, ele);\n } else {\n r.drawEdgeUnderlay(context, ele);\n }\n};\nCRp$9.drawCachedElementPortion = function (context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity) {\n var r = this;\n var bb = eleTxrCache.getBoundingBox(ele);\n if (bb.w === 0 || bb.h === 0) {\n return;\n } // ignore zero size case\n\n var eleCache = eleTxrCache.getElement(ele, bb, pxRatio, lvl, reason);\n if (eleCache != null) {\n var opacity = getOpacity(r, ele);\n if (opacity === 0) {\n return;\n }\n var theta = getRotation(r, ele);\n var x1 = bb.x1,\n y1 = bb.y1,\n w = bb.w,\n h = bb.h;\n var x, y, sx, sy, smooth;\n if (theta !== 0) {\n var rotPt = eleTxrCache.getRotationPoint(ele);\n sx = rotPt.x;\n sy = rotPt.y;\n context.translate(sx, sy);\n context.rotate(theta);\n smooth = r.getImgSmoothing(context);\n if (!smooth) {\n r.setImgSmoothing(context, true);\n }\n var off = eleTxrCache.getRotationOffset(ele);\n x = off.x;\n y = off.y;\n } else {\n x = x1;\n y = y1;\n }\n var oldGlobalAlpha;\n if (opacity !== 1) {\n oldGlobalAlpha = context.globalAlpha;\n context.globalAlpha = oldGlobalAlpha * opacity;\n }\n context.drawImage(eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x, y, w, h);\n if (opacity !== 1) {\n context.globalAlpha = oldGlobalAlpha;\n }\n if (theta !== 0) {\n context.rotate(-theta);\n context.translate(-sx, -sy);\n if (!smooth) {\n r.setImgSmoothing(context, false);\n }\n }\n } else {\n eleTxrCache.drawElement(context, ele); // direct draw fallback\n }\n};\n\nvar getZeroRotation = function getZeroRotation() {\n return 0;\n};\nvar getLabelRotation = function getLabelRotation(r, ele) {\n return r.getTextAngle(ele, null);\n};\nvar getSourceLabelRotation = function getSourceLabelRotation(r, ele) {\n return r.getTextAngle(ele, 'source');\n};\nvar getTargetLabelRotation = function getTargetLabelRotation(r, ele) {\n return r.getTextAngle(ele, 'target');\n};\nvar getOpacity = function getOpacity(r, ele) {\n return ele.effectiveOpacity();\n};\nvar getTextOpacity = function getTextOpacity(e, ele) {\n return ele.pstyle('text-opacity').pfValue * ele.effectiveOpacity();\n};\nCRp$9.drawCachedElement = function (context, ele, pxRatio, extent, lvl, requestHighQuality) {\n var r = this;\n var _r$data = r.data,\n eleTxrCache = _r$data.eleTxrCache,\n lblTxrCache = _r$data.lblTxrCache,\n slbTxrCache = _r$data.slbTxrCache,\n tlbTxrCache = _r$data.tlbTxrCache;\n var bb = ele.boundingBox();\n var reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null;\n if (bb.w === 0 || bb.h === 0 || !ele.visible()) {\n return;\n }\n if (!extent || boundingBoxesIntersect(bb, extent)) {\n var isEdge = ele.isEdge();\n var badLine = ele.element()._private.rscratch.badLine;\n r.drawElementUnderlay(context, ele);\n r.drawCachedElementPortion(context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity);\n if (!isEdge || !badLine) {\n r.drawCachedElementPortion(context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity);\n }\n if (isEdge && !badLine) {\n r.drawCachedElementPortion(context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity);\n r.drawCachedElementPortion(context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity);\n }\n r.drawElementOverlay(context, ele);\n }\n};\nCRp$9.drawElements = function (context, eles) {\n var r = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n r.drawElement(context, ele);\n }\n};\nCRp$9.drawCachedElements = function (context, eles, pxRatio, extent) {\n var r = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n r.drawCachedElement(context, ele, pxRatio, extent);\n }\n};\nCRp$9.drawCachedNodes = function (context, eles, pxRatio, extent) {\n var r = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (!ele.isNode()) {\n continue;\n }\n r.drawCachedElement(context, ele, pxRatio, extent);\n }\n};\nCRp$9.drawLayeredElements = function (context, eles, pxRatio, extent) {\n var r = this;\n var layers = r.data.lyrTxrCache.getLayers(eles, pxRatio);\n if (layers) {\n for (var i = 0; i < layers.length; i++) {\n var layer = layers[i];\n var bb = layer.bb;\n if (bb.w === 0 || bb.h === 0) {\n continue;\n }\n context.drawImage(layer.canvas, bb.x1, bb.y1, bb.w, bb.h);\n }\n } else {\n // fall back on plain caching if no layers\n r.drawCachedElements(context, eles, pxRatio, extent);\n }\n};\n\nvar CRp$8 = {};\nCRp$8.drawEdge = function (context, edge, shiftToOriginWithBb) {\n var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var r = this;\n var rs = edge._private.rscratch;\n if (shouldDrawOpacity && !edge.visible()) {\n return;\n }\n\n // if bezier ctrl pts can not be calculated, then die\n if (rs.badLine || rs.allpts == null || isNaN(rs.allpts[0])) {\n // isNaN in case edge is impossible and browser bugs (e.g. safari)\n return;\n }\n var bb;\n if (shiftToOriginWithBb) {\n bb = shiftToOriginWithBb;\n context.translate(-bb.x1, -bb.y1);\n }\n var opacity = shouldDrawOpacity ? edge.pstyle('opacity').value : 1;\n var lineOpacity = shouldDrawOpacity ? edge.pstyle('line-opacity').value : 1;\n var curveStyle = edge.pstyle('curve-style').value;\n var lineStyle = edge.pstyle('line-style').value;\n var edgeWidth = edge.pstyle('width').pfValue;\n var lineCap = edge.pstyle('line-cap').value;\n var lineOutlineWidth = edge.pstyle('line-outline-width').value;\n var lineOutlineColor = edge.pstyle('line-outline-color').value;\n var effectiveLineOpacity = opacity * lineOpacity;\n // separate arrow opacity would require arrow-opacity property\n var effectiveArrowOpacity = opacity * lineOpacity;\n var drawLine = function drawLine() {\n var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity;\n if (curveStyle === 'straight-triangle') {\n r.eleStrokeStyle(context, edge, strokeOpacity);\n r.drawEdgeTrianglePath(edge, context, rs.allpts);\n } else {\n context.lineWidth = edgeWidth;\n context.lineCap = lineCap;\n r.eleStrokeStyle(context, edge, strokeOpacity);\n r.drawEdgePath(edge, context, rs.allpts, lineStyle);\n context.lineCap = 'butt'; // reset for other drawing functions\n }\n };\n\n var drawLineOutline = function drawLineOutline() {\n var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity;\n context.lineWidth = edgeWidth + lineOutlineWidth;\n context.lineCap = lineCap;\n if (lineOutlineWidth > 0) {\n r.colorStrokeStyle(context, lineOutlineColor[0], lineOutlineColor[1], lineOutlineColor[2], strokeOpacity);\n } else {\n // do not draw any lineOutline\n context.lineCap = 'butt'; // reset for other drawing functions\n return;\n }\n if (curveStyle === 'straight-triangle') {\n r.drawEdgeTrianglePath(edge, context, rs.allpts);\n } else {\n r.drawEdgePath(edge, context, rs.allpts, lineStyle);\n context.lineCap = 'butt'; // reset for other drawing functions\n }\n };\n\n var drawOverlay = function drawOverlay() {\n if (!shouldDrawOverlay) {\n return;\n }\n r.drawEdgeOverlay(context, edge);\n };\n var drawUnderlay = function drawUnderlay() {\n if (!shouldDrawOverlay) {\n return;\n }\n r.drawEdgeUnderlay(context, edge);\n };\n var drawArrows = function drawArrows() {\n var arrowOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveArrowOpacity;\n r.drawArrowheads(context, edge, arrowOpacity);\n };\n var drawText = function drawText() {\n r.drawElementText(context, edge, null, drawLabel);\n };\n context.lineJoin = 'round';\n var ghost = edge.pstyle('ghost').value === 'yes';\n if (ghost) {\n var gx = edge.pstyle('ghost-offset-x').pfValue;\n var gy = edge.pstyle('ghost-offset-y').pfValue;\n var ghostOpacity = edge.pstyle('ghost-opacity').value;\n var effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity;\n context.translate(gx, gy);\n drawLine(effectiveGhostOpacity);\n drawArrows(effectiveGhostOpacity);\n context.translate(-gx, -gy);\n } else {\n drawLineOutline();\n }\n drawUnderlay();\n drawLine();\n drawArrows();\n drawOverlay();\n drawText();\n if (shiftToOriginWithBb) {\n context.translate(bb.x1, bb.y1);\n }\n};\nvar drawEdgeOverlayUnderlay = function drawEdgeOverlayUnderlay(overlayOrUnderlay) {\n if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) {\n throw new Error('Invalid state');\n }\n return function (context, edge) {\n if (!edge.visible()) {\n return;\n }\n var opacity = edge.pstyle(\"\".concat(overlayOrUnderlay, \"-opacity\")).value;\n if (opacity === 0) {\n return;\n }\n var r = this;\n var usePaths = r.usePaths();\n var rs = edge._private.rscratch;\n var padding = edge.pstyle(\"\".concat(overlayOrUnderlay, \"-padding\")).pfValue;\n var width = 2 * padding;\n var color = edge.pstyle(\"\".concat(overlayOrUnderlay, \"-color\")).value;\n context.lineWidth = width;\n if (rs.edgeType === 'self' && !usePaths) {\n context.lineCap = 'butt';\n } else {\n context.lineCap = 'round';\n }\n r.colorStrokeStyle(context, color[0], color[1], color[2], opacity);\n r.drawEdgePath(edge, context, rs.allpts, 'solid');\n };\n};\nCRp$8.drawEdgeOverlay = drawEdgeOverlayUnderlay('overlay');\nCRp$8.drawEdgeUnderlay = drawEdgeOverlayUnderlay('underlay');\nCRp$8.drawEdgePath = function (edge, context, pts, type) {\n var rs = edge._private.rscratch;\n var canvasCxt = context;\n var path;\n var pathCacheHit = false;\n var usePaths = this.usePaths();\n var lineDashPattern = edge.pstyle('line-dash-pattern').pfValue;\n var lineDashOffset = edge.pstyle('line-dash-offset').pfValue;\n if (usePaths) {\n var pathCacheKey = pts.join('$');\n var keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey;\n if (keyMatches) {\n path = context = rs.pathCache;\n pathCacheHit = true;\n } else {\n path = context = new Path2D();\n rs.pathCacheKey = pathCacheKey;\n rs.pathCache = path;\n }\n }\n if (canvasCxt.setLineDash) {\n // for very outofdate browsers\n switch (type) {\n case 'dotted':\n canvasCxt.setLineDash([1, 1]);\n break;\n case 'dashed':\n canvasCxt.setLineDash(lineDashPattern);\n canvasCxt.lineDashOffset = lineDashOffset;\n break;\n case 'solid':\n canvasCxt.setLineDash([]);\n break;\n }\n }\n if (!pathCacheHit && !rs.badLine) {\n if (context.beginPath) {\n context.beginPath();\n }\n context.moveTo(pts[0], pts[1]);\n switch (rs.edgeType) {\n case 'bezier':\n case 'self':\n case 'compound':\n case 'multibezier':\n for (var i = 2; i + 3 < pts.length; i += 4) {\n context.quadraticCurveTo(pts[i], pts[i + 1], pts[i + 2], pts[i + 3]);\n }\n break;\n case 'straight':\n case 'haystack':\n for (var _i = 2; _i + 1 < pts.length; _i += 2) {\n context.lineTo(pts[_i], pts[_i + 1]);\n }\n break;\n case 'segments':\n if (rs.isRound) {\n var _iterator = _createForOfIteratorHelper(rs.roundCorners),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var corner = _step.value;\n drawPreparedRoundCorner(context, corner);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n context.lineTo(pts[pts.length - 2], pts[pts.length - 1]);\n } else {\n for (var _i2 = 2; _i2 + 1 < pts.length; _i2 += 2) {\n context.lineTo(pts[_i2], pts[_i2 + 1]);\n }\n }\n break;\n }\n }\n context = canvasCxt;\n if (usePaths) {\n context.stroke(path);\n } else {\n context.stroke();\n }\n\n // reset any line dashes\n if (context.setLineDash) {\n // for very outofdate browsers\n context.setLineDash([]);\n }\n};\nCRp$8.drawEdgeTrianglePath = function (edge, context, pts) {\n // use line stroke style for triangle fill style\n context.fillStyle = context.strokeStyle;\n var edgeWidth = edge.pstyle('width').pfValue;\n for (var i = 0; i + 1 < pts.length; i += 2) {\n var vector = [pts[i + 2] - pts[i], pts[i + 3] - pts[i + 1]];\n var length = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]);\n var normal = [vector[1] / length, -vector[0] / length];\n var triangleHead = [normal[0] * edgeWidth / 2, normal[1] * edgeWidth / 2];\n context.beginPath();\n context.moveTo(pts[i] - triangleHead[0], pts[i + 1] - triangleHead[1]);\n context.lineTo(pts[i] + triangleHead[0], pts[i + 1] + triangleHead[1]);\n context.lineTo(pts[i + 2], pts[i + 3]);\n context.closePath();\n context.fill();\n }\n};\nCRp$8.drawArrowheads = function (context, edge, opacity) {\n var rs = edge._private.rscratch;\n var isHaystack = rs.edgeType === 'haystack';\n if (!isHaystack) {\n this.drawArrowhead(context, edge, 'source', rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity);\n }\n this.drawArrowhead(context, edge, 'mid-target', rs.midX, rs.midY, rs.midtgtArrowAngle, opacity);\n this.drawArrowhead(context, edge, 'mid-source', rs.midX, rs.midY, rs.midsrcArrowAngle, opacity);\n if (!isHaystack) {\n this.drawArrowhead(context, edge, 'target', rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity);\n }\n};\nCRp$8.drawArrowhead = function (context, edge, prefix, x, y, angle, opacity) {\n if (isNaN(x) || x == null || isNaN(y) || y == null || isNaN(angle) || angle == null) {\n return;\n }\n var self = this;\n var arrowShape = edge.pstyle(prefix + '-arrow-shape').value;\n if (arrowShape === 'none') {\n return;\n }\n var arrowClearFill = edge.pstyle(prefix + '-arrow-fill').value === 'hollow' ? 'both' : 'filled';\n var arrowFill = edge.pstyle(prefix + '-arrow-fill').value;\n var edgeWidth = edge.pstyle('width').pfValue;\n var pArrowWidth = edge.pstyle(prefix + '-arrow-width');\n var arrowWidth = pArrowWidth.value === 'match-line' ? edgeWidth : pArrowWidth.pfValue;\n if (pArrowWidth.units === '%') arrowWidth *= edgeWidth;\n var edgeOpacity = edge.pstyle('opacity').value;\n if (opacity === undefined) {\n opacity = edgeOpacity;\n }\n var gco = context.globalCompositeOperation;\n if (opacity !== 1 || arrowFill === 'hollow') {\n // then extra clear is needed\n context.globalCompositeOperation = 'destination-out';\n self.colorFillStyle(context, 255, 255, 255, 1);\n self.colorStrokeStyle(context, 255, 255, 255, 1);\n self.drawArrowShape(edge, context, arrowClearFill, edgeWidth, arrowShape, arrowWidth, x, y, angle);\n context.globalCompositeOperation = gco;\n } // otherwise, the opaque arrow clears it for free :)\n\n var color = edge.pstyle(prefix + '-arrow-color').value;\n self.colorFillStyle(context, color[0], color[1], color[2], opacity);\n self.colorStrokeStyle(context, color[0], color[1], color[2], opacity);\n self.drawArrowShape(edge, context, arrowFill, edgeWidth, arrowShape, arrowWidth, x, y, angle);\n};\nCRp$8.drawArrowShape = function (edge, context, fill, edgeWidth, shape, shapeWidth, x, y, angle) {\n var r = this;\n var usePaths = this.usePaths() && shape !== 'triangle-cross';\n var pathCacheHit = false;\n var path;\n var canvasContext = context;\n var translation = {\n x: x,\n y: y\n };\n var scale = edge.pstyle('arrow-scale').value;\n var size = this.getArrowWidth(edgeWidth, scale);\n var shapeImpl = r.arrowShapes[shape];\n if (usePaths) {\n var cache = r.arrowPathCache = r.arrowPathCache || [];\n var key = hashString(shape);\n var cachedPath = cache[key];\n if (cachedPath != null) {\n path = context = cachedPath;\n pathCacheHit = true;\n } else {\n path = context = new Path2D();\n cache[key] = path;\n }\n }\n if (!pathCacheHit) {\n if (context.beginPath) {\n context.beginPath();\n }\n if (usePaths) {\n // store in the path cache with values easily manipulated later\n shapeImpl.draw(context, 1, 0, {\n x: 0,\n y: 0\n }, 1);\n } else {\n shapeImpl.draw(context, size, angle, translation, edgeWidth);\n }\n if (context.closePath) {\n context.closePath();\n }\n }\n context = canvasContext;\n if (usePaths) {\n // set transform to arrow position/orientation\n context.translate(x, y);\n context.rotate(angle);\n context.scale(size, size);\n }\n if (fill === 'filled' || fill === 'both') {\n if (usePaths) {\n context.fill(path);\n } else {\n context.fill();\n }\n }\n if (fill === 'hollow' || fill === 'both') {\n context.lineWidth = shapeWidth / (usePaths ? size : 1);\n context.lineJoin = 'miter';\n if (usePaths) {\n context.stroke(path);\n } else {\n context.stroke();\n }\n }\n if (usePaths) {\n // reset transform by applying inverse\n context.scale(1 / size, 1 / size);\n context.rotate(-angle);\n context.translate(-x, -y);\n }\n};\n\nvar CRp$7 = {};\nCRp$7.safeDrawImage = function (context, img, ix, iy, iw, ih, x, y, w, h) {\n // detect problematic cases for old browsers with bad images (cheaper than try-catch)\n if (iw <= 0 || ih <= 0 || w <= 0 || h <= 0) {\n return;\n }\n try {\n context.drawImage(img, ix, iy, iw, ih, x, y, w, h);\n } catch (e) {\n warn(e);\n }\n};\nCRp$7.drawInscribedImage = function (context, img, node, index, nodeOpacity) {\n var r = this;\n var pos = node.position();\n var nodeX = pos.x;\n var nodeY = pos.y;\n var styleObj = node.cy().style();\n var getIndexedStyle = styleObj.getIndexedStyle.bind(styleObj);\n var fit = getIndexedStyle(node, 'background-fit', 'value', index);\n var repeat = getIndexedStyle(node, 'background-repeat', 'value', index);\n var nodeW = node.width();\n var nodeH = node.height();\n var paddingX2 = node.padding() * 2;\n var nodeTW = nodeW + (getIndexedStyle(node, 'background-width-relative-to', 'value', index) === 'inner' ? 0 : paddingX2);\n var nodeTH = nodeH + (getIndexedStyle(node, 'background-height-relative-to', 'value', index) === 'inner' ? 0 : paddingX2);\n var rs = node._private.rscratch;\n var clip = getIndexedStyle(node, 'background-clip', 'value', index);\n var shouldClip = clip === 'node';\n var imgOpacity = getIndexedStyle(node, 'background-image-opacity', 'value', index) * nodeOpacity;\n var smooth = getIndexedStyle(node, 'background-image-smoothing', 'value', index);\n var cornerRadius = node.pstyle('corner-radius').value;\n if (cornerRadius !== 'auto') cornerRadius = node.pstyle('corner-radius').pfValue;\n var imgW = img.width || img.cachedW;\n var imgH = img.height || img.cachedH;\n\n // workaround for broken browsers like ie\n if (null == imgW || null == imgH) {\n document.body.appendChild(img); // eslint-disable-line no-undef\n\n imgW = img.cachedW = img.width || img.offsetWidth;\n imgH = img.cachedH = img.height || img.offsetHeight;\n document.body.removeChild(img); // eslint-disable-line no-undef\n }\n\n var w = imgW;\n var h = imgH;\n if (getIndexedStyle(node, 'background-width', 'value', index) !== 'auto') {\n if (getIndexedStyle(node, 'background-width', 'units', index) === '%') {\n w = getIndexedStyle(node, 'background-width', 'pfValue', index) * nodeTW;\n } else {\n w = getIndexedStyle(node, 'background-width', 'pfValue', index);\n }\n }\n if (getIndexedStyle(node, 'background-height', 'value', index) !== 'auto') {\n if (getIndexedStyle(node, 'background-height', 'units', index) === '%') {\n h = getIndexedStyle(node, 'background-height', 'pfValue', index) * nodeTH;\n } else {\n h = getIndexedStyle(node, 'background-height', 'pfValue', index);\n }\n }\n if (w === 0 || h === 0) {\n return; // no point in drawing empty image (and chrome is broken in this case)\n }\n\n if (fit === 'contain') {\n var scale = Math.min(nodeTW / w, nodeTH / h);\n w *= scale;\n h *= scale;\n } else if (fit === 'cover') {\n var scale = Math.max(nodeTW / w, nodeTH / h);\n w *= scale;\n h *= scale;\n }\n var x = nodeX - nodeTW / 2; // left\n var posXUnits = getIndexedStyle(node, 'background-position-x', 'units', index);\n var posXPfVal = getIndexedStyle(node, 'background-position-x', 'pfValue', index);\n if (posXUnits === '%') {\n x += (nodeTW - w) * posXPfVal;\n } else {\n x += posXPfVal;\n }\n var offXUnits = getIndexedStyle(node, 'background-offset-x', 'units', index);\n var offXPfVal = getIndexedStyle(node, 'background-offset-x', 'pfValue', index);\n if (offXUnits === '%') {\n x += (nodeTW - w) * offXPfVal;\n } else {\n x += offXPfVal;\n }\n var y = nodeY - nodeTH / 2; // top\n var posYUnits = getIndexedStyle(node, 'background-position-y', 'units', index);\n var posYPfVal = getIndexedStyle(node, 'background-position-y', 'pfValue', index);\n if (posYUnits === '%') {\n y += (nodeTH - h) * posYPfVal;\n } else {\n y += posYPfVal;\n }\n var offYUnits = getIndexedStyle(node, 'background-offset-y', 'units', index);\n var offYPfVal = getIndexedStyle(node, 'background-offset-y', 'pfValue', index);\n if (offYUnits === '%') {\n y += (nodeTH - h) * offYPfVal;\n } else {\n y += offYPfVal;\n }\n if (rs.pathCache) {\n x -= nodeX;\n y -= nodeY;\n nodeX = 0;\n nodeY = 0;\n }\n var gAlpha = context.globalAlpha;\n context.globalAlpha = imgOpacity;\n var smoothingEnabled = r.getImgSmoothing(context);\n var isSmoothingSwitched = false;\n if (smooth === 'no' && smoothingEnabled) {\n r.setImgSmoothing(context, false);\n isSmoothingSwitched = true;\n } else if (smooth === 'yes' && !smoothingEnabled) {\n r.setImgSmoothing(context, true);\n isSmoothingSwitched = true;\n }\n if (repeat === 'no-repeat') {\n if (shouldClip) {\n context.save();\n if (rs.pathCache) {\n context.clip(rs.pathCache);\n } else {\n r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH, cornerRadius, rs);\n context.clip();\n }\n }\n r.safeDrawImage(context, img, 0, 0, imgW, imgH, x, y, w, h);\n if (shouldClip) {\n context.restore();\n }\n } else {\n var pattern = context.createPattern(img, repeat);\n context.fillStyle = pattern;\n r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH, cornerRadius, rs);\n context.translate(x, y);\n context.fill();\n context.translate(-x, -y);\n }\n context.globalAlpha = gAlpha;\n if (isSmoothingSwitched) {\n r.setImgSmoothing(context, smoothingEnabled);\n }\n};\n\nvar CRp$6 = {};\nCRp$6.eleTextBiggerThanMin = function (ele, scale) {\n if (!scale) {\n var zoom = ele.cy().zoom();\n var pxRatio = this.getPixelRatio();\n var lvl = Math.ceil(log2(zoom * pxRatio)); // the effective texture level\n\n scale = Math.pow(2, lvl);\n }\n var computedSize = ele.pstyle('font-size').pfValue * scale;\n var minSize = ele.pstyle('min-zoomed-font-size').pfValue;\n if (computedSize < minSize) {\n return false;\n }\n return true;\n};\nCRp$6.drawElementText = function (context, ele, shiftToOriginWithBb, force, prefix) {\n var useEleOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var r = this;\n if (force == null) {\n if (useEleOpacity && !r.eleTextBiggerThanMin(ele)) {\n return;\n }\n } else if (force === false) {\n return;\n }\n if (ele.isNode()) {\n var label = ele.pstyle('label');\n if (!label || !label.value) {\n return;\n }\n var justification = r.getLabelJustification(ele);\n context.textAlign = justification;\n context.textBaseline = 'bottom';\n } else {\n var badLine = ele.element()._private.rscratch.badLine;\n var _label = ele.pstyle('label');\n var srcLabel = ele.pstyle('source-label');\n var tgtLabel = ele.pstyle('target-label');\n if (badLine || (!_label || !_label.value) && (!srcLabel || !srcLabel.value) && (!tgtLabel || !tgtLabel.value)) {\n return;\n }\n context.textAlign = 'center';\n context.textBaseline = 'bottom';\n }\n var applyRotation = !shiftToOriginWithBb;\n var bb;\n if (shiftToOriginWithBb) {\n bb = shiftToOriginWithBb;\n context.translate(-bb.x1, -bb.y1);\n }\n if (prefix == null) {\n r.drawText(context, ele, null, applyRotation, useEleOpacity);\n if (ele.isEdge()) {\n r.drawText(context, ele, 'source', applyRotation, useEleOpacity);\n r.drawText(context, ele, 'target', applyRotation, useEleOpacity);\n }\n } else {\n r.drawText(context, ele, prefix, applyRotation, useEleOpacity);\n }\n if (shiftToOriginWithBb) {\n context.translate(bb.x1, bb.y1);\n }\n};\nCRp$6.getFontCache = function (context) {\n var cache;\n this.fontCaches = this.fontCaches || [];\n for (var i = 0; i < this.fontCaches.length; i++) {\n cache = this.fontCaches[i];\n if (cache.context === context) {\n return cache;\n }\n }\n cache = {\n context: context\n };\n this.fontCaches.push(cache);\n return cache;\n};\n\n// set up canvas context with font\n// returns transformed text string\nCRp$6.setupTextStyle = function (context, ele) {\n var useEleOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n // Font style\n var labelStyle = ele.pstyle('font-style').strValue;\n var labelSize = ele.pstyle('font-size').pfValue + 'px';\n var labelFamily = ele.pstyle('font-family').strValue;\n var labelWeight = ele.pstyle('font-weight').strValue;\n var opacity = useEleOpacity ? ele.effectiveOpacity() * ele.pstyle('text-opacity').value : 1;\n var outlineOpacity = ele.pstyle('text-outline-opacity').value * opacity;\n var color = ele.pstyle('color').value;\n var outlineColor = ele.pstyle('text-outline-color').value;\n context.font = labelStyle + ' ' + labelWeight + ' ' + labelSize + ' ' + labelFamily;\n context.lineJoin = 'round'; // so text outlines aren't jagged\n\n this.colorFillStyle(context, color[0], color[1], color[2], opacity);\n this.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], outlineOpacity);\n};\n\n// TODO ensure re-used\nfunction roundRect(ctx, x, y, width, height) {\n var radius = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 5;\n var stroke = arguments.length > 6 ? arguments[6] : undefined;\n ctx.beginPath();\n ctx.moveTo(x + radius, y);\n ctx.lineTo(x + width - radius, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + radius);\n ctx.lineTo(x + width, y + height - radius);\n ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n ctx.lineTo(x + radius, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - radius);\n ctx.lineTo(x, y + radius);\n ctx.quadraticCurveTo(x, y, x + radius, y);\n ctx.closePath();\n if (stroke) ctx.stroke();else ctx.fill();\n}\nCRp$6.getTextAngle = function (ele, prefix) {\n var theta;\n var _p = ele._private;\n var rscratch = _p.rscratch;\n var pdash = prefix ? prefix + '-' : '';\n var rotation = ele.pstyle(pdash + 'text-rotation');\n var textAngle = getPrefixedProperty(rscratch, 'labelAngle', prefix);\n if (rotation.strValue === 'autorotate') {\n theta = ele.isEdge() ? textAngle : 0;\n } else if (rotation.strValue === 'none') {\n theta = 0;\n } else {\n theta = rotation.pfValue;\n }\n return theta;\n};\nCRp$6.drawText = function (context, ele, prefix) {\n var applyRotation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var useEleOpacity = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var _p = ele._private;\n var rscratch = _p.rscratch;\n var parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1;\n if (useEleOpacity && (parentOpacity === 0 || ele.pstyle('text-opacity').value === 0)) {\n return;\n }\n\n // use 'main' as an alias for the main label (i.e. null prefix)\n if (prefix === 'main') {\n prefix = null;\n }\n var textX = getPrefixedProperty(rscratch, 'labelX', prefix);\n var textY = getPrefixedProperty(rscratch, 'labelY', prefix);\n var orgTextX, orgTextY; // used for rotation\n var text = this.getLabelText(ele, prefix);\n if (text != null && text !== '' && !isNaN(textX) && !isNaN(textY)) {\n this.setupTextStyle(context, ele, useEleOpacity);\n var pdash = prefix ? prefix + '-' : '';\n var textW = getPrefixedProperty(rscratch, 'labelWidth', prefix);\n var textH = getPrefixedProperty(rscratch, 'labelHeight', prefix);\n var marginX = ele.pstyle(pdash + 'text-margin-x').pfValue;\n var marginY = ele.pstyle(pdash + 'text-margin-y').pfValue;\n var isEdge = ele.isEdge();\n var halign = ele.pstyle('text-halign').value;\n var valign = ele.pstyle('text-valign').value;\n if (isEdge) {\n halign = 'center';\n valign = 'center';\n }\n textX += marginX;\n textY += marginY;\n var theta;\n if (!applyRotation) {\n theta = 0;\n } else {\n theta = this.getTextAngle(ele, prefix);\n }\n if (theta !== 0) {\n orgTextX = textX;\n orgTextY = textY;\n context.translate(orgTextX, orgTextY);\n context.rotate(theta);\n textX = 0;\n textY = 0;\n }\n switch (valign) {\n case 'top':\n break;\n case 'center':\n textY += textH / 2;\n break;\n case 'bottom':\n textY += textH;\n break;\n }\n var backgroundOpacity = ele.pstyle('text-background-opacity').value;\n var borderOpacity = ele.pstyle('text-border-opacity').value;\n var textBorderWidth = ele.pstyle('text-border-width').pfValue;\n var backgroundPadding = ele.pstyle('text-background-padding').pfValue;\n var styleShape = ele.pstyle('text-background-shape').strValue;\n var rounded = styleShape.indexOf('round') === 0;\n var roundRadius = 2;\n if (backgroundOpacity > 0 || textBorderWidth > 0 && borderOpacity > 0) {\n var bgX = textX - backgroundPadding;\n switch (halign) {\n case 'left':\n bgX -= textW;\n break;\n case 'center':\n bgX -= textW / 2;\n break;\n }\n var bgY = textY - textH - backgroundPadding;\n var bgW = textW + 2 * backgroundPadding;\n var bgH = textH + 2 * backgroundPadding;\n if (backgroundOpacity > 0) {\n var textFill = context.fillStyle;\n var textBackgroundColor = ele.pstyle('text-background-color').value;\n context.fillStyle = 'rgba(' + textBackgroundColor[0] + ',' + textBackgroundColor[1] + ',' + textBackgroundColor[2] + ',' + backgroundOpacity * parentOpacity + ')';\n if (rounded) {\n roundRect(context, bgX, bgY, bgW, bgH, roundRadius);\n } else {\n context.fillRect(bgX, bgY, bgW, bgH);\n }\n context.fillStyle = textFill;\n }\n if (textBorderWidth > 0 && borderOpacity > 0) {\n var textStroke = context.strokeStyle;\n var textLineWidth = context.lineWidth;\n var textBorderColor = ele.pstyle('text-border-color').value;\n var textBorderStyle = ele.pstyle('text-border-style').value;\n context.strokeStyle = 'rgba(' + textBorderColor[0] + ',' + textBorderColor[1] + ',' + textBorderColor[2] + ',' + borderOpacity * parentOpacity + ')';\n context.lineWidth = textBorderWidth;\n if (context.setLineDash) {\n // for very outofdate browsers\n switch (textBorderStyle) {\n case 'dotted':\n context.setLineDash([1, 1]);\n break;\n case 'dashed':\n context.setLineDash([4, 2]);\n break;\n case 'double':\n context.lineWidth = textBorderWidth / 4; // 50% reserved for white between the two borders\n context.setLineDash([]);\n break;\n case 'solid':\n context.setLineDash([]);\n break;\n }\n }\n if (rounded) {\n roundRect(context, bgX, bgY, bgW, bgH, roundRadius, 'stroke');\n } else {\n context.strokeRect(bgX, bgY, bgW, bgH);\n }\n if (textBorderStyle === 'double') {\n var whiteWidth = textBorderWidth / 2;\n if (rounded) {\n roundRect(context, bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2, roundRadius, 'stroke');\n } else {\n context.strokeRect(bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2);\n }\n }\n if (context.setLineDash) {\n // for very outofdate browsers\n context.setLineDash([]);\n }\n context.lineWidth = textLineWidth;\n context.strokeStyle = textStroke;\n }\n }\n var lineWidth = 2 * ele.pstyle('text-outline-width').pfValue; // *2 b/c the stroke is drawn centred on the middle\n\n if (lineWidth > 0) {\n context.lineWidth = lineWidth;\n }\n if (ele.pstyle('text-wrap').value === 'wrap') {\n var lines = getPrefixedProperty(rscratch, 'labelWrapCachedLines', prefix);\n var lineHeight = getPrefixedProperty(rscratch, 'labelLineHeight', prefix);\n var halfTextW = textW / 2;\n var justification = this.getLabelJustification(ele);\n if (justification === 'auto') ; else if (halign === 'left') {\n // auto justification : right\n if (justification === 'left') {\n textX += -textW;\n } else if (justification === 'center') {\n textX += -halfTextW;\n } // else same as auto\n } else if (halign === 'center') {\n // auto justfication : center\n if (justification === 'left') {\n textX += -halfTextW;\n } else if (justification === 'right') {\n textX += halfTextW;\n } // else same as auto\n } else if (halign === 'right') {\n // auto justification : left\n if (justification === 'center') {\n textX += halfTextW;\n } else if (justification === 'right') {\n textX += textW;\n } // else same as auto\n }\n\n switch (valign) {\n case 'top':\n textY -= (lines.length - 1) * lineHeight;\n break;\n case 'center':\n case 'bottom':\n textY -= (lines.length - 1) * lineHeight;\n break;\n }\n for (var l = 0; l < lines.length; l++) {\n if (lineWidth > 0) {\n context.strokeText(lines[l], textX, textY);\n }\n context.fillText(lines[l], textX, textY);\n textY += lineHeight;\n }\n } else {\n if (lineWidth > 0) {\n context.strokeText(text, textX, textY);\n }\n context.fillText(text, textX, textY);\n }\n if (theta !== 0) {\n context.rotate(-theta);\n context.translate(-orgTextX, -orgTextY);\n }\n }\n};\n\n/* global Path2D */\nvar CRp$5 = {};\nCRp$5.drawNode = function (context, node, shiftToOriginWithBb) {\n var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var r = this;\n var nodeWidth, nodeHeight;\n var _p = node._private;\n var rs = _p.rscratch;\n var pos = node.position();\n if (!number$1(pos.x) || !number$1(pos.y)) {\n return; // can't draw node with undefined position\n }\n\n if (shouldDrawOpacity && !node.visible()) {\n return;\n }\n var eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1;\n var usePaths = r.usePaths();\n var path;\n var pathCacheHit = false;\n var padding = node.padding();\n nodeWidth = node.width() + 2 * padding;\n nodeHeight = node.height() + 2 * padding;\n\n //\n // setup shift\n\n var bb;\n if (shiftToOriginWithBb) {\n bb = shiftToOriginWithBb;\n context.translate(-bb.x1, -bb.y1);\n }\n\n //\n // load bg image\n\n var bgImgProp = node.pstyle('background-image');\n var urls = bgImgProp.value;\n var urlDefined = new Array(urls.length);\n var image = new Array(urls.length);\n var numImages = 0;\n for (var i = 0; i < urls.length; i++) {\n var url = urls[i];\n var defd = urlDefined[i] = url != null && url !== 'none';\n if (defd) {\n var bgImgCrossOrigin = node.cy().style().getIndexedStyle(node, 'background-image-crossorigin', 'value', i);\n numImages++;\n\n // get image, and if not loaded then ask to redraw when later loaded\n image[i] = r.getCachedImage(url, bgImgCrossOrigin, function () {\n _p.backgroundTimestamp = Date.now();\n node.emitAndNotify('background');\n });\n }\n }\n\n //\n // setup styles\n\n var darkness = node.pstyle('background-blacken').value;\n var borderWidth = node.pstyle('border-width').pfValue;\n var bgOpacity = node.pstyle('background-opacity').value * eleOpacity;\n var borderColor = node.pstyle('border-color').value;\n var borderStyle = node.pstyle('border-style').value;\n var borderJoin = node.pstyle('border-join').value;\n var borderCap = node.pstyle('border-cap').value;\n var borderPosition = node.pstyle('border-position').value;\n var borderPattern = node.pstyle('border-dash-pattern').pfValue;\n var borderOffset = node.pstyle('border-dash-offset').pfValue;\n var borderOpacity = node.pstyle('border-opacity').value * eleOpacity;\n var outlineWidth = node.pstyle('outline-width').pfValue;\n var outlineColor = node.pstyle('outline-color').value;\n var outlineStyle = node.pstyle('outline-style').value;\n var outlineOpacity = node.pstyle('outline-opacity').value * eleOpacity;\n var outlineOffset = node.pstyle('outline-offset').value;\n var cornerRadius = node.pstyle('corner-radius').value;\n if (cornerRadius !== 'auto') cornerRadius = node.pstyle('corner-radius').pfValue;\n var setupShapeColor = function setupShapeColor() {\n var bgOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : bgOpacity;\n r.eleFillStyle(context, node, bgOpy);\n };\n var setupBorderColor = function setupBorderColor() {\n var bdrOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : borderOpacity;\n r.colorStrokeStyle(context, borderColor[0], borderColor[1], borderColor[2], bdrOpy);\n };\n var setupOutlineColor = function setupOutlineColor() {\n var otlnOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : outlineOpacity;\n r.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], otlnOpy);\n };\n\n //\n // setup shape\n\n var getPath = function getPath(width, height, shape, points) {\n var pathCache = r.nodePathCache = r.nodePathCache || [];\n var key = hashStrings(shape === 'polygon' ? shape + ',' + points.join(',') : shape, '' + height, '' + width, '' + cornerRadius);\n var cachedPath = pathCache[key];\n var path;\n var cacheHit = false;\n if (cachedPath != null) {\n path = cachedPath;\n cacheHit = true;\n rs.pathCache = path;\n } else {\n path = new Path2D();\n pathCache[key] = rs.pathCache = path;\n }\n return {\n path: path,\n cacheHit: cacheHit\n };\n };\n var styleShape = node.pstyle('shape').strValue;\n var shapePts = node.pstyle('shape-polygon-points').pfValue;\n if (usePaths) {\n context.translate(pos.x, pos.y);\n var shapePath = getPath(nodeWidth, nodeHeight, styleShape, shapePts);\n path = shapePath.path;\n pathCacheHit = shapePath.cacheHit;\n }\n var drawShape = function drawShape() {\n if (!pathCacheHit) {\n var npos = pos;\n if (usePaths) {\n npos = {\n x: 0,\n y: 0\n };\n }\n r.nodeShapes[r.getNodeShape(node)].draw(path || context, npos.x, npos.y, nodeWidth, nodeHeight, cornerRadius, rs);\n }\n if (usePaths) {\n context.fill(path);\n } else {\n context.fill();\n }\n };\n var drawImages = function drawImages() {\n var nodeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity;\n var inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var prevBging = _p.backgrounding;\n var totalCompleted = 0;\n for (var _i = 0; _i < image.length; _i++) {\n var bgContainment = node.cy().style().getIndexedStyle(node, 'background-image-containment', 'value', _i);\n if (inside && bgContainment === 'over' || !inside && bgContainment === 'inside') {\n totalCompleted++;\n continue;\n }\n if (urlDefined[_i] && image[_i].complete && !image[_i].error) {\n totalCompleted++;\n r.drawInscribedImage(context, image[_i], node, _i, nodeOpacity);\n }\n }\n _p.backgrounding = !(totalCompleted === numImages);\n if (prevBging !== _p.backgrounding) {\n // update style b/c :backgrounding state changed\n node.updateStyle(false);\n }\n };\n var drawPie = function drawPie() {\n var redrawShape = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var pieOpacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : eleOpacity;\n if (r.hasPie(node)) {\n r.drawPie(context, node, pieOpacity);\n\n // redraw/restore path if steps after pie need it\n if (redrawShape) {\n if (!usePaths) {\n r.nodeShapes[r.getNodeShape(node)].draw(context, pos.x, pos.y, nodeWidth, nodeHeight, cornerRadius, rs);\n }\n }\n }\n };\n var darken = function darken() {\n var darkenOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity;\n var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity;\n var c = darkness > 0 ? 0 : 255;\n if (darkness !== 0) {\n r.colorFillStyle(context, c, c, c, opacity);\n if (usePaths) {\n context.fill(path);\n } else {\n context.fill();\n }\n }\n };\n var drawBorder = function drawBorder() {\n if (borderWidth > 0) {\n context.lineWidth = borderWidth;\n context.lineCap = borderCap;\n context.lineJoin = borderJoin;\n if (context.setLineDash) {\n // for very outofdate browsers\n switch (borderStyle) {\n case 'dotted':\n context.setLineDash([1, 1]);\n break;\n case 'dashed':\n context.setLineDash(borderPattern);\n context.lineDashOffset = borderOffset;\n break;\n case 'solid':\n case 'double':\n context.setLineDash([]);\n break;\n }\n }\n if (borderPosition !== 'center') {\n context.save();\n context.lineWidth *= 2;\n if (borderPosition === 'inside') {\n usePaths ? context.clip(path) : context.clip();\n } else {\n var region = new Path2D();\n region.rect(-nodeWidth / 2 - borderWidth, -nodeHeight / 2 - borderWidth, nodeWidth + 2 * borderWidth, nodeHeight + 2 * borderWidth);\n region.addPath(path);\n context.clip(region, 'evenodd');\n }\n usePaths ? context.stroke(path) : context.stroke();\n context.restore();\n } else {\n usePaths ? context.stroke(path) : context.stroke();\n }\n if (borderStyle === 'double') {\n context.lineWidth = borderWidth / 3;\n var gco = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-out';\n if (usePaths) {\n context.stroke(path);\n } else {\n context.stroke();\n }\n context.globalCompositeOperation = gco;\n }\n\n // reset in case we changed the border style\n if (context.setLineDash) {\n // for very outofdate browsers\n context.setLineDash([]);\n }\n }\n };\n var drawOutline = function drawOutline() {\n if (outlineWidth > 0) {\n context.lineWidth = outlineWidth;\n context.lineCap = 'butt';\n if (context.setLineDash) {\n // for very outofdate browsers\n switch (outlineStyle) {\n case 'dotted':\n context.setLineDash([1, 1]);\n break;\n case 'dashed':\n context.setLineDash([4, 2]);\n break;\n case 'solid':\n case 'double':\n context.setLineDash([]);\n break;\n }\n }\n var npos = pos;\n if (usePaths) {\n npos = {\n x: 0,\n y: 0\n };\n }\n var shape = r.getNodeShape(node);\n var bWidth = borderWidth;\n if (borderPosition === 'inside') bWidth = 0;\n if (borderPosition === 'outside') bWidth *= 2;\n var scaleX = (nodeWidth + bWidth + (outlineWidth + outlineOffset)) / nodeWidth;\n var scaleY = (nodeHeight + bWidth + (outlineWidth + outlineOffset)) / nodeHeight;\n var sWidth = nodeWidth * scaleX;\n var sHeight = nodeHeight * scaleY;\n var points = r.nodeShapes[shape].points;\n var _path;\n if (usePaths) {\n var outlinePath = getPath(sWidth, sHeight, shape, points);\n _path = outlinePath.path;\n }\n\n // draw the outline path, either by using expanded points or by scaling \n // the dimensions, depending on shape\n if (shape === \"ellipse\") {\n r.drawEllipsePath(_path || context, npos.x, npos.y, sWidth, sHeight);\n } else if (['round-diamond', 'round-heptagon', 'round-hexagon', 'round-octagon', 'round-pentagon', 'round-polygon', 'round-triangle', 'round-tag'].includes(shape)) {\n var sMult = 0;\n var offsetX = 0;\n var offsetY = 0;\n if (shape === 'round-diamond') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.4;\n } else if (shape === 'round-heptagon') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.075;\n offsetY = -(bWidth / 2 + outlineOffset + outlineWidth) / 35;\n } else if (shape === 'round-hexagon') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.12;\n } else if (shape === 'round-pentagon') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.13;\n offsetY = -(bWidth / 2 + outlineOffset + outlineWidth) / 15;\n } else if (shape === 'round-tag') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.12;\n offsetX = (bWidth / 2 + outlineWidth + outlineOffset) * .07;\n } else if (shape === 'round-triangle') {\n sMult = (bWidth + outlineOffset + outlineWidth) * (Math.PI / 2);\n offsetY = -(bWidth + outlineOffset / 2 + outlineWidth) / Math.PI;\n }\n if (sMult !== 0) {\n scaleX = (nodeWidth + sMult) / nodeWidth;\n sWidth = nodeWidth * scaleX;\n if (!['round-hexagon', 'round-tag'].includes(shape)) {\n scaleY = (nodeHeight + sMult) / nodeHeight;\n sHeight = nodeHeight * scaleY;\n }\n }\n cornerRadius = cornerRadius === 'auto' ? getRoundPolygonRadius(sWidth, sHeight) : cornerRadius;\n var halfW = sWidth / 2;\n var halfH = sHeight / 2;\n var radius = cornerRadius + (bWidth + outlineWidth + outlineOffset) / 2;\n var p = new Array(points.length / 2);\n var corners = new Array(points.length / 2);\n for (var _i3 = 0; _i3 < points.length / 2; _i3++) {\n p[_i3] = {\n x: npos.x + offsetX + halfW * points[_i3 * 2],\n y: npos.y + offsetY + halfH * points[_i3 * 2 + 1]\n };\n }\n var _i2,\n p1,\n p2,\n p3,\n len = p.length;\n p1 = p[len - 1];\n // for each point\n for (_i2 = 0; _i2 < len; _i2++) {\n p2 = p[_i2 % len];\n p3 = p[(_i2 + 1) % len];\n corners[_i2] = getRoundCorner(p1, p2, p3, radius);\n p1 = p2;\n p2 = p3;\n }\n r.drawRoundPolygonPath(_path || context, npos.x + offsetX, npos.y + offsetY, nodeWidth * scaleX, nodeHeight * scaleY, points, corners);\n } else if (['roundrectangle', 'round-rectangle'].includes(shape)) {\n cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(sWidth, sHeight) : cornerRadius;\n r.drawRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight, cornerRadius + (bWidth + outlineWidth + outlineOffset) / 2);\n } else if (['cutrectangle', 'cut-rectangle'].includes(shape)) {\n cornerRadius = cornerRadius === 'auto' ? getCutRectangleCornerLength() : cornerRadius;\n r.drawCutRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight, null, cornerRadius + (bWidth + outlineWidth + outlineOffset) / 4);\n } else if (['bottomroundrectangle', 'bottom-round-rectangle'].includes(shape)) {\n cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(sWidth, sHeight) : cornerRadius;\n r.drawBottomRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight, cornerRadius + (bWidth + outlineWidth + outlineOffset) / 2);\n } else if (shape === \"barrel\") {\n r.drawBarrelPath(_path || context, npos.x, npos.y, sWidth, sHeight);\n } else if (shape.startsWith(\"polygon\") || ['rhomboid', 'right-rhomboid', 'round-tag', 'tag', 'vee'].includes(shape)) {\n var pad = (bWidth + outlineWidth + outlineOffset) / nodeWidth;\n points = joinLines(expandPolygon(points, pad));\n r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points);\n } else {\n var _pad = (bWidth + outlineWidth + outlineOffset) / nodeWidth;\n points = joinLines(expandPolygon(points, -_pad));\n r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points);\n }\n if (usePaths) {\n context.stroke(_path);\n } else {\n context.stroke();\n }\n if (outlineStyle === 'double') {\n context.lineWidth = bWidth / 3;\n var gco = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-out';\n if (usePaths) {\n context.stroke(_path);\n } else {\n context.stroke();\n }\n context.globalCompositeOperation = gco;\n }\n\n // reset in case we changed the border style\n if (context.setLineDash) {\n // for very outofdate browsers\n context.setLineDash([]);\n }\n }\n };\n var drawOverlay = function drawOverlay() {\n if (shouldDrawOverlay) {\n r.drawNodeOverlay(context, node, pos, nodeWidth, nodeHeight);\n }\n };\n var drawUnderlay = function drawUnderlay() {\n if (shouldDrawOverlay) {\n r.drawNodeUnderlay(context, node, pos, nodeWidth, nodeHeight);\n }\n };\n var drawText = function drawText() {\n r.drawElementText(context, node, null, drawLabel);\n };\n var ghost = node.pstyle('ghost').value === 'yes';\n if (ghost) {\n var gx = node.pstyle('ghost-offset-x').pfValue;\n var gy = node.pstyle('ghost-offset-y').pfValue;\n var ghostOpacity = node.pstyle('ghost-opacity').value;\n var effGhostOpacity = ghostOpacity * eleOpacity;\n context.translate(gx, gy);\n setupOutlineColor();\n drawOutline();\n setupShapeColor(ghostOpacity * bgOpacity);\n drawShape();\n drawImages(effGhostOpacity, true);\n setupBorderColor(ghostOpacity * borderOpacity);\n drawBorder();\n drawPie(darkness !== 0 || borderWidth !== 0);\n drawImages(effGhostOpacity, false);\n darken(effGhostOpacity);\n context.translate(-gx, -gy);\n }\n if (usePaths) {\n context.translate(-pos.x, -pos.y);\n }\n drawUnderlay();\n if (usePaths) {\n context.translate(pos.x, pos.y);\n }\n setupOutlineColor();\n drawOutline();\n setupShapeColor();\n drawShape();\n drawImages(eleOpacity, true);\n setupBorderColor();\n drawBorder();\n drawPie(darkness !== 0 || borderWidth !== 0);\n drawImages(eleOpacity, false);\n darken();\n if (usePaths) {\n context.translate(-pos.x, -pos.y);\n }\n drawText();\n drawOverlay();\n\n //\n // clean up shift\n\n if (shiftToOriginWithBb) {\n context.translate(bb.x1, bb.y1);\n }\n};\nvar drawNodeOverlayUnderlay = function drawNodeOverlayUnderlay(overlayOrUnderlay) {\n if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) {\n throw new Error('Invalid state');\n }\n return function (context, node, pos, nodeWidth, nodeHeight) {\n var r = this;\n if (!node.visible()) {\n return;\n }\n var padding = node.pstyle(\"\".concat(overlayOrUnderlay, \"-padding\")).pfValue;\n var opacity = node.pstyle(\"\".concat(overlayOrUnderlay, \"-opacity\")).value;\n var color = node.pstyle(\"\".concat(overlayOrUnderlay, \"-color\")).value;\n var shape = node.pstyle(\"\".concat(overlayOrUnderlay, \"-shape\")).value;\n var radius = node.pstyle(\"\".concat(overlayOrUnderlay, \"-corner-radius\")).value;\n if (opacity > 0) {\n pos = pos || node.position();\n if (nodeWidth == null || nodeHeight == null) {\n var _padding = node.padding();\n nodeWidth = node.width() + 2 * _padding;\n nodeHeight = node.height() + 2 * _padding;\n }\n r.colorFillStyle(context, color[0], color[1], color[2], opacity);\n r.nodeShapes[shape].draw(context, pos.x, pos.y, nodeWidth + padding * 2, nodeHeight + padding * 2, radius);\n context.fill();\n }\n };\n};\nCRp$5.drawNodeOverlay = drawNodeOverlayUnderlay('overlay');\nCRp$5.drawNodeUnderlay = drawNodeOverlayUnderlay('underlay');\n\n// does the node have at least one pie piece?\nCRp$5.hasPie = function (node) {\n node = node[0]; // ensure ele ref\n\n return node._private.hasPie;\n};\nCRp$5.drawPie = function (context, node, nodeOpacity, pos) {\n node = node[0]; // ensure ele ref\n pos = pos || node.position();\n var cyStyle = node.cy().style();\n var pieSize = node.pstyle('pie-size');\n var x = pos.x;\n var y = pos.y;\n var nodeW = node.width();\n var nodeH = node.height();\n var radius = Math.min(nodeW, nodeH) / 2; // must fit in node\n var lastPercent = 0; // what % to continue drawing pie slices from on [0, 1]\n var usePaths = this.usePaths();\n if (usePaths) {\n x = 0;\n y = 0;\n }\n if (pieSize.units === '%') {\n radius = radius * pieSize.pfValue;\n } else if (pieSize.pfValue !== undefined) {\n radius = pieSize.pfValue / 2;\n }\n for (var i = 1; i <= cyStyle.pieBackgroundN; i++) {\n // 1..N\n var size = node.pstyle('pie-' + i + '-background-size').value;\n var color = node.pstyle('pie-' + i + '-background-color').value;\n var opacity = node.pstyle('pie-' + i + '-background-opacity').value * nodeOpacity;\n var percent = size / 100; // map integer range [0, 100] to [0, 1]\n\n // percent can't push beyond 1\n if (percent + lastPercent > 1) {\n percent = 1 - lastPercent;\n }\n var angleStart = 1.5 * Math.PI + 2 * Math.PI * lastPercent; // start at 12 o'clock and go clockwise\n var angleDelta = 2 * Math.PI * percent;\n var angleEnd = angleStart + angleDelta;\n\n // ignore if\n // - zero size\n // - we're already beyond the full circle\n // - adding the current slice would go beyond the full circle\n if (size === 0 || lastPercent >= 1 || lastPercent + percent > 1) {\n continue;\n }\n context.beginPath();\n context.moveTo(x, y);\n context.arc(x, y, radius, angleStart, angleEnd);\n context.closePath();\n this.colorFillStyle(context, color[0], color[1], color[2], opacity);\n context.fill();\n lastPercent += percent;\n }\n};\n\nvar CRp$4 = {};\nvar motionBlurDelay = 100;\n\n// var isFirefox = typeof InstallTrigger !== 'undefined';\n\nCRp$4.getPixelRatio = function () {\n var context = this.data.contexts[0];\n if (this.forcedPixelRatio != null) {\n return this.forcedPixelRatio;\n }\n var containerWindow = this.cy.window();\n var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n return (containerWindow.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef\n};\n\nCRp$4.paintCache = function (context) {\n var caches = this.paintCaches = this.paintCaches || [];\n var needToCreateCache = true;\n var cache;\n for (var i = 0; i < caches.length; i++) {\n cache = caches[i];\n if (cache.context === context) {\n needToCreateCache = false;\n break;\n }\n }\n if (needToCreateCache) {\n cache = {\n context: context\n };\n caches.push(cache);\n }\n return cache;\n};\nCRp$4.createGradientStyleFor = function (context, shapeStyleName, ele, fill, opacity) {\n var gradientStyle;\n var usePaths = this.usePaths();\n var colors = ele.pstyle(shapeStyleName + '-gradient-stop-colors').value,\n positions = ele.pstyle(shapeStyleName + '-gradient-stop-positions').pfValue;\n if (fill === 'radial-gradient') {\n if (ele.isEdge()) {\n var start = ele.sourceEndpoint(),\n end = ele.targetEndpoint(),\n mid = ele.midpoint();\n var d1 = dist(start, mid);\n var d2 = dist(end, mid);\n gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2));\n } else {\n var pos = usePaths ? {\n x: 0,\n y: 0\n } : ele.position(),\n width = ele.paddedWidth(),\n height = ele.paddedHeight();\n gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height));\n }\n } else {\n if (ele.isEdge()) {\n var _start = ele.sourceEndpoint(),\n _end = ele.targetEndpoint();\n gradientStyle = context.createLinearGradient(_start.x, _start.y, _end.x, _end.y);\n } else {\n var _pos = usePaths ? {\n x: 0,\n y: 0\n } : ele.position(),\n _width = ele.paddedWidth(),\n _height = ele.paddedHeight(),\n halfWidth = _width / 2,\n halfHeight = _height / 2;\n var direction = ele.pstyle('background-gradient-direction').value;\n switch (direction) {\n case 'to-bottom':\n gradientStyle = context.createLinearGradient(_pos.x, _pos.y - halfHeight, _pos.x, _pos.y + halfHeight);\n break;\n case 'to-top':\n gradientStyle = context.createLinearGradient(_pos.x, _pos.y + halfHeight, _pos.x, _pos.y - halfHeight);\n break;\n case 'to-left':\n gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y, _pos.x - halfWidth, _pos.y);\n break;\n case 'to-right':\n gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y, _pos.x + halfWidth, _pos.y);\n break;\n case 'to-bottom-right':\n case 'to-right-bottom':\n gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y - halfHeight, _pos.x + halfWidth, _pos.y + halfHeight);\n break;\n case 'to-top-right':\n case 'to-right-top':\n gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y + halfHeight, _pos.x + halfWidth, _pos.y - halfHeight);\n break;\n case 'to-bottom-left':\n case 'to-left-bottom':\n gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y - halfHeight, _pos.x - halfWidth, _pos.y + halfHeight);\n break;\n case 'to-top-left':\n case 'to-left-top':\n gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y + halfHeight, _pos.x - halfWidth, _pos.y - halfHeight);\n break;\n }\n }\n }\n if (!gradientStyle) return null; // invalid gradient style\n\n var hasPositions = positions.length === colors.length;\n var length = colors.length;\n for (var i = 0; i < length; i++) {\n gradientStyle.addColorStop(hasPositions ? positions[i] : i / (length - 1), 'rgba(' + colors[i][0] + ',' + colors[i][1] + ',' + colors[i][2] + ',' + opacity + ')');\n }\n return gradientStyle;\n};\nCRp$4.gradientFillStyle = function (context, ele, fill, opacity) {\n var gradientStyle = this.createGradientStyleFor(context, 'background', ele, fill, opacity);\n if (!gradientStyle) return null; // error\n context.fillStyle = gradientStyle;\n};\nCRp$4.colorFillStyle = function (context, r, g, b, a) {\n context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n // turn off for now, seems context does its own caching\n\n // var cache = this.paintCache(context);\n\n // var fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n\n // if( cache.fillStyle !== fillStyle ){\n // context.fillStyle = cache.fillStyle = fillStyle;\n // }\n};\n\nCRp$4.eleFillStyle = function (context, ele, opacity) {\n var backgroundFill = ele.pstyle('background-fill').value;\n if (backgroundFill === 'linear-gradient' || backgroundFill === 'radial-gradient') {\n this.gradientFillStyle(context, ele, backgroundFill, opacity);\n } else {\n var backgroundColor = ele.pstyle('background-color').value;\n this.colorFillStyle(context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity);\n }\n};\nCRp$4.gradientStrokeStyle = function (context, ele, fill, opacity) {\n var gradientStyle = this.createGradientStyleFor(context, 'line', ele, fill, opacity);\n if (!gradientStyle) return null; // error\n context.strokeStyle = gradientStyle;\n};\nCRp$4.colorStrokeStyle = function (context, r, g, b, a) {\n context.strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n // turn off for now, seems context does its own caching\n\n // var cache = this.paintCache(context);\n\n // var strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n\n // if( cache.strokeStyle !== strokeStyle ){\n // context.strokeStyle = cache.strokeStyle = strokeStyle;\n // }\n};\n\nCRp$4.eleStrokeStyle = function (context, ele, opacity) {\n var lineFill = ele.pstyle('line-fill').value;\n if (lineFill === 'linear-gradient' || lineFill === 'radial-gradient') {\n this.gradientStrokeStyle(context, ele, lineFill, opacity);\n } else {\n var lineColor = ele.pstyle('line-color').value;\n this.colorStrokeStyle(context, lineColor[0], lineColor[1], lineColor[2], opacity);\n }\n};\n\n// Resize canvas\nCRp$4.matchCanvasSize = function (container) {\n var r = this;\n var data = r.data;\n var bb = r.findContainerClientCoords();\n var width = bb[2];\n var height = bb[3];\n var pixelRatio = r.getPixelRatio();\n var mbPxRatio = r.motionBlurPxRatio;\n if (container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE] || container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]) {\n pixelRatio = mbPxRatio;\n }\n var canvasWidth = width * pixelRatio;\n var canvasHeight = height * pixelRatio;\n var canvas;\n if (canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight) {\n return; // save cycles if same\n }\n\n r.fontCaches = null; // resizing resets the style\n\n var canvasContainer = data.canvasContainer;\n canvasContainer.style.width = width + 'px';\n canvasContainer.style.height = height + 'px';\n for (var i = 0; i < r.CANVAS_LAYERS; i++) {\n canvas = data.canvases[i];\n canvas.width = canvasWidth;\n canvas.height = canvasHeight;\n canvas.style.width = width + 'px';\n canvas.style.height = height + 'px';\n }\n for (var i = 0; i < r.BUFFER_COUNT; i++) {\n canvas = data.bufferCanvases[i];\n canvas.width = canvasWidth;\n canvas.height = canvasHeight;\n canvas.style.width = width + 'px';\n canvas.style.height = height + 'px';\n }\n r.textureMult = 1;\n if (pixelRatio <= 1) {\n canvas = data.bufferCanvases[r.TEXTURE_BUFFER];\n r.textureMult = 2;\n canvas.width = canvasWidth * r.textureMult;\n canvas.height = canvasHeight * r.textureMult;\n }\n r.canvasWidth = canvasWidth;\n r.canvasHeight = canvasHeight;\n};\nCRp$4.renderTo = function (cxt, zoom, pan, pxRatio) {\n this.render({\n forcedContext: cxt,\n forcedZoom: zoom,\n forcedPan: pan,\n drawAllLayers: true,\n forcedPxRatio: pxRatio\n });\n};\nCRp$4.render = function (options) {\n options = options || staticEmptyObject();\n var forcedContext = options.forcedContext;\n var drawAllLayers = options.drawAllLayers;\n var drawOnlyNodeLayer = options.drawOnlyNodeLayer;\n var forcedZoom = options.forcedZoom;\n var forcedPan = options.forcedPan;\n var r = this;\n var pixelRatio = options.forcedPxRatio === undefined ? this.getPixelRatio() : options.forcedPxRatio;\n var cy = r.cy;\n var data = r.data;\n var needDraw = data.canvasNeedsRedraw;\n var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming);\n var motionBlur = options.motionBlur !== undefined ? options.motionBlur : r.motionBlur;\n var mbPxRatio = r.motionBlurPxRatio;\n var hasCompoundNodes = cy.hasCompoundNodes();\n var inNodeDragGesture = r.hoverData.draggingEles;\n var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false;\n motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection;\n var motionBlurFadeEffect = motionBlur;\n if (!forcedContext) {\n if (r.prevPxRatio !== pixelRatio) {\n r.invalidateContainerClientCoordsCache();\n r.matchCanvasSize(r.container);\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n }\n r.prevPxRatio = pixelRatio;\n }\n if (!forcedContext && r.motionBlurTimeout) {\n clearTimeout(r.motionBlurTimeout);\n }\n if (motionBlur) {\n if (r.mbFrames == null) {\n r.mbFrames = 0;\n }\n r.mbFrames++;\n if (r.mbFrames < 3) {\n // need several frames before even high quality motionblur\n motionBlurFadeEffect = false;\n }\n\n // go to lower quality blurry frames when several m/b frames have been rendered (avoids flashing)\n if (r.mbFrames > r.minMbLowQualFrames) {\n //r.fullQualityMb = false;\n r.motionBlurPxRatio = r.mbPxRBlurry;\n }\n }\n if (r.clearingMotionBlur) {\n r.motionBlurPxRatio = 1;\n }\n\n // b/c drawToContext() may be async w.r.t. redraw(), keep track of last texture frame\n // because a rogue async texture frame would clear needDraw\n if (r.textureDrawLastFrame && !textureDraw) {\n needDraw[r.NODE] = true;\n needDraw[r.SELECT_BOX] = true;\n }\n var style = cy.style();\n var zoom = cy.zoom();\n var effectiveZoom = forcedZoom !== undefined ? forcedZoom : zoom;\n var pan = cy.pan();\n var effectivePan = {\n x: pan.x,\n y: pan.y\n };\n var vp = {\n zoom: zoom,\n pan: {\n x: pan.x,\n y: pan.y\n }\n };\n var prevVp = r.prevViewport;\n var viewportIsDiff = prevVp === undefined || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y;\n\n // we want the low quality motionblur only when the viewport is being manipulated etc (where it's not noticed)\n if (!viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes)) {\n r.motionBlurPxRatio = 1;\n }\n if (forcedPan) {\n effectivePan = forcedPan;\n }\n\n // apply pixel ratio\n\n effectiveZoom *= pixelRatio;\n effectivePan.x *= pixelRatio;\n effectivePan.y *= pixelRatio;\n var eles = r.getCachedZSortedEles();\n function mbclear(context, x, y, w, h) {\n var gco = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-out';\n r.colorFillStyle(context, 255, 255, 255, r.motionBlurTransparency);\n context.fillRect(x, y, w, h);\n context.globalCompositeOperation = gco;\n }\n function setContextTransform(context, clear) {\n var ePan, eZoom, w, h;\n if (!r.clearingMotionBlur && (context === data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] || context === data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])) {\n ePan = {\n x: pan.x * mbPxRatio,\n y: pan.y * mbPxRatio\n };\n eZoom = zoom * mbPxRatio;\n w = r.canvasWidth * mbPxRatio;\n h = r.canvasHeight * mbPxRatio;\n } else {\n ePan = effectivePan;\n eZoom = effectiveZoom;\n w = r.canvasWidth;\n h = r.canvasHeight;\n }\n context.setTransform(1, 0, 0, 1, 0, 0);\n if (clear === 'motionBlur') {\n mbclear(context, 0, 0, w, h);\n } else if (!forcedContext && (clear === undefined || clear)) {\n context.clearRect(0, 0, w, h);\n }\n if (!drawAllLayers) {\n context.translate(ePan.x, ePan.y);\n context.scale(eZoom, eZoom);\n }\n if (forcedPan) {\n context.translate(forcedPan.x, forcedPan.y);\n }\n if (forcedZoom) {\n context.scale(forcedZoom, forcedZoom);\n }\n }\n if (!textureDraw) {\n r.textureDrawLastFrame = false;\n }\n if (textureDraw) {\n r.textureDrawLastFrame = true;\n if (!r.textureCache) {\n r.textureCache = {};\n r.textureCache.bb = cy.mutableElements().boundingBox();\n r.textureCache.texture = r.data.bufferCanvases[r.TEXTURE_BUFFER];\n var cxt = r.data.bufferContexts[r.TEXTURE_BUFFER];\n cxt.setTransform(1, 0, 0, 1, 0, 0);\n cxt.clearRect(0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult);\n r.render({\n forcedContext: cxt,\n drawOnlyNodeLayer: true,\n forcedPxRatio: pixelRatio * r.textureMult\n });\n var vp = r.textureCache.viewport = {\n zoom: cy.zoom(),\n pan: cy.pan(),\n width: r.canvasWidth,\n height: r.canvasHeight\n };\n vp.mpan = {\n x: (0 - vp.pan.x) / vp.zoom,\n y: (0 - vp.pan.y) / vp.zoom\n };\n }\n needDraw[r.DRAG] = false;\n needDraw[r.NODE] = false;\n var context = data.contexts[r.NODE];\n var texture = r.textureCache.texture;\n var vp = r.textureCache.viewport;\n context.setTransform(1, 0, 0, 1, 0, 0);\n if (motionBlur) {\n mbclear(context, 0, 0, vp.width, vp.height);\n } else {\n context.clearRect(0, 0, vp.width, vp.height);\n }\n var outsideBgColor = style.core('outside-texture-bg-color').value;\n var outsideBgOpacity = style.core('outside-texture-bg-opacity').value;\n r.colorFillStyle(context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity);\n context.fillRect(0, 0, vp.width, vp.height);\n var zoom = cy.zoom();\n setContextTransform(context, false);\n context.clearRect(vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio);\n context.drawImage(texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio);\n } else if (r.textureOnViewport && !forcedContext) {\n // clear the cache since we don't need it\n r.textureCache = null;\n }\n var extent = cy.extent();\n var vpManip = r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated();\n var hideEdges = r.hideEdgesOnViewport && vpManip;\n var needMbClear = [];\n needMbClear[r.NODE] = !needDraw[r.NODE] && motionBlur && !r.clearedForMotionBlur[r.NODE] || r.clearingMotionBlur;\n if (needMbClear[r.NODE]) {\n r.clearedForMotionBlur[r.NODE] = true;\n }\n needMbClear[r.DRAG] = !needDraw[r.DRAG] && motionBlur && !r.clearedForMotionBlur[r.DRAG] || r.clearingMotionBlur;\n if (needMbClear[r.DRAG]) {\n r.clearedForMotionBlur[r.DRAG] = true;\n }\n if (needDraw[r.NODE] || drawAllLayers || drawOnlyNodeLayer || needMbClear[r.NODE]) {\n var useBuffer = motionBlur && !needMbClear[r.NODE] && mbPxRatio !== 1;\n var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] : data.contexts[r.NODE]);\n var clear = motionBlur && !useBuffer ? 'motionBlur' : undefined;\n setContextTransform(context, clear);\n if (hideEdges) {\n r.drawCachedNodes(context, eles.nondrag, pixelRatio, extent);\n } else {\n r.drawLayeredElements(context, eles.nondrag, pixelRatio, extent);\n }\n if (r.debug) {\n r.drawDebugPoints(context, eles.nondrag);\n }\n if (!drawAllLayers && !motionBlur) {\n needDraw[r.NODE] = false;\n }\n }\n if (!drawOnlyNodeLayer && (needDraw[r.DRAG] || drawAllLayers || needMbClear[r.DRAG])) {\n var useBuffer = motionBlur && !needMbClear[r.DRAG] && mbPxRatio !== 1;\n var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG] : data.contexts[r.DRAG]);\n setContextTransform(context, motionBlur && !useBuffer ? 'motionBlur' : undefined);\n if (hideEdges) {\n r.drawCachedNodes(context, eles.drag, pixelRatio, extent);\n } else {\n r.drawCachedElements(context, eles.drag, pixelRatio, extent);\n }\n if (r.debug) {\n r.drawDebugPoints(context, eles.drag);\n }\n if (!drawAllLayers && !motionBlur) {\n needDraw[r.DRAG] = false;\n }\n }\n if (r.showFps || !drawOnlyNodeLayer && needDraw[r.SELECT_BOX] && !drawAllLayers) {\n var context = forcedContext || data.contexts[r.SELECT_BOX];\n setContextTransform(context);\n if (r.selection[4] == 1 && (r.hoverData.selecting || r.touchData.selecting)) {\n var zoom = r.cy.zoom();\n var borderWidth = style.core('selection-box-border-width').value / zoom;\n context.lineWidth = borderWidth;\n context.fillStyle = 'rgba(' + style.core('selection-box-color').value[0] + ',' + style.core('selection-box-color').value[1] + ',' + style.core('selection-box-color').value[2] + ',' + style.core('selection-box-opacity').value + ')';\n context.fillRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]);\n if (borderWidth > 0) {\n context.strokeStyle = 'rgba(' + style.core('selection-box-border-color').value[0] + ',' + style.core('selection-box-border-color').value[1] + ',' + style.core('selection-box-border-color').value[2] + ',' + style.core('selection-box-opacity').value + ')';\n context.strokeRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]);\n }\n }\n if (data.bgActivePosistion && !r.hoverData.selecting) {\n var zoom = r.cy.zoom();\n var pos = data.bgActivePosistion;\n context.fillStyle = 'rgba(' + style.core('active-bg-color').value[0] + ',' + style.core('active-bg-color').value[1] + ',' + style.core('active-bg-color').value[2] + ',' + style.core('active-bg-opacity').value + ')';\n context.beginPath();\n context.arc(pos.x, pos.y, style.core('active-bg-size').pfValue / zoom, 0, 2 * Math.PI);\n context.fill();\n }\n var timeToRender = r.lastRedrawTime;\n if (r.showFps && timeToRender) {\n timeToRender = Math.round(timeToRender);\n var fps = Math.round(1000 / timeToRender);\n context.setTransform(1, 0, 0, 1, 0, 0);\n context.fillStyle = 'rgba(255, 0, 0, 0.75)';\n context.strokeStyle = 'rgba(255, 0, 0, 0.75)';\n context.lineWidth = 1;\n context.fillText('1 frame = ' + timeToRender + ' ms = ' + fps + ' fps', 0, 20);\n var maxFps = 60;\n context.strokeRect(0, 30, 250, 20);\n context.fillRect(0, 30, 250 * Math.min(fps / maxFps, 1), 20);\n }\n if (!drawAllLayers) {\n needDraw[r.SELECT_BOX] = false;\n }\n }\n\n // motionblur: blit rendered blurry frames\n if (motionBlur && mbPxRatio !== 1) {\n var cxtNode = data.contexts[r.NODE];\n var txtNode = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE];\n var cxtDrag = data.contexts[r.DRAG];\n var txtDrag = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG];\n var drawMotionBlur = function drawMotionBlur(cxt, txt, needClear) {\n cxt.setTransform(1, 0, 0, 1, 0, 0);\n if (needClear || !motionBlurFadeEffect) {\n cxt.clearRect(0, 0, r.canvasWidth, r.canvasHeight);\n } else {\n mbclear(cxt, 0, 0, r.canvasWidth, r.canvasHeight);\n }\n var pxr = mbPxRatio;\n cxt.drawImage(txt,\n // img\n 0, 0,\n // sx, sy\n r.canvasWidth * pxr, r.canvasHeight * pxr,\n // sw, sh\n 0, 0,\n // x, y\n r.canvasWidth, r.canvasHeight // w, h\n );\n };\n\n if (needDraw[r.NODE] || needMbClear[r.NODE]) {\n drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]);\n needDraw[r.NODE] = false;\n }\n if (needDraw[r.DRAG] || needMbClear[r.DRAG]) {\n drawMotionBlur(cxtDrag, txtDrag, needMbClear[r.DRAG]);\n needDraw[r.DRAG] = false;\n }\n }\n r.prevViewport = vp;\n if (r.clearingMotionBlur) {\n r.clearingMotionBlur = false;\n r.motionBlurCleared = true;\n r.motionBlur = true;\n }\n if (motionBlur) {\n r.motionBlurTimeout = setTimeout(function () {\n r.motionBlurTimeout = null;\n r.clearedForMotionBlur[r.NODE] = false;\n r.clearedForMotionBlur[r.DRAG] = false;\n r.motionBlur = false;\n r.clearingMotionBlur = !textureDraw;\n r.mbFrames = 0;\n needDraw[r.NODE] = true;\n needDraw[r.DRAG] = true;\n r.redraw();\n }, motionBlurDelay);\n }\n if (!forcedContext) {\n cy.emit('render');\n }\n};\n\nvar CRp$3 = {};\n\n// @O Polygon drawing\nCRp$3.drawPolygonPath = function (context, x, y, width, height, points) {\n var halfW = width / 2;\n var halfH = height / 2;\n if (context.beginPath) {\n context.beginPath();\n }\n context.moveTo(x + halfW * points[0], y + halfH * points[1]);\n for (var i = 1; i < points.length / 2; i++) {\n context.lineTo(x + halfW * points[i * 2], y + halfH * points[i * 2 + 1]);\n }\n context.closePath();\n};\nCRp$3.drawRoundPolygonPath = function (context, x, y, width, height, points, corners) {\n corners.forEach(function (corner) {\n return drawPreparedRoundCorner(context, corner);\n });\n context.closePath();\n};\n\n// Round rectangle drawing\nCRp$3.drawRoundRectanglePath = function (context, x, y, width, height, radius) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n var cornerRadius = radius === 'auto' ? getRoundRectangleRadius(width, height) : Math.min(radius, halfHeight, halfWidth);\n if (context.beginPath) {\n context.beginPath();\n }\n\n // Start at top middle\n context.moveTo(x, y - halfHeight);\n // Arc from middle top to right side\n context.arcTo(x + halfWidth, y - halfHeight, x + halfWidth, y, cornerRadius);\n // Arc from right side to bottom\n context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius);\n // Arc from bottom to left side\n context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius);\n // Arc from left side to topBorder\n context.arcTo(x - halfWidth, y - halfHeight, x, y - halfHeight, cornerRadius);\n // Join line\n context.lineTo(x, y - halfHeight);\n context.closePath();\n};\nCRp$3.drawBottomRoundRectanglePath = function (context, x, y, width, height, radius) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n var cornerRadius = radius === 'auto' ? getRoundRectangleRadius(width, height) : radius;\n if (context.beginPath) {\n context.beginPath();\n }\n\n // Start at top middle\n context.moveTo(x, y - halfHeight);\n context.lineTo(x + halfWidth, y - halfHeight);\n context.lineTo(x + halfWidth, y);\n context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius);\n context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius);\n context.lineTo(x - halfWidth, y - halfHeight);\n context.lineTo(x, y - halfHeight);\n context.closePath();\n};\nCRp$3.drawCutRectanglePath = function (context, x, y, width, height, points, corners) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n var cornerLength = corners === 'auto' ? getCutRectangleCornerLength() : corners;\n if (context.beginPath) {\n context.beginPath();\n }\n context.moveTo(x - halfWidth + cornerLength, y - halfHeight);\n context.lineTo(x + halfWidth - cornerLength, y - halfHeight);\n context.lineTo(x + halfWidth, y - halfHeight + cornerLength);\n context.lineTo(x + halfWidth, y + halfHeight - cornerLength);\n context.lineTo(x + halfWidth - cornerLength, y + halfHeight);\n context.lineTo(x - halfWidth + cornerLength, y + halfHeight);\n context.lineTo(x - halfWidth, y + halfHeight - cornerLength);\n context.lineTo(x - halfWidth, y - halfHeight + cornerLength);\n context.closePath();\n};\nCRp$3.drawBarrelPath = function (context, x, y, width, height) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n var xBegin = x - halfWidth;\n var xEnd = x + halfWidth;\n var yBegin = y - halfHeight;\n var yEnd = y + halfHeight;\n var barrelCurveConstants = getBarrelCurveConstants(width, height);\n var wOffset = barrelCurveConstants.widthOffset;\n var hOffset = barrelCurveConstants.heightOffset;\n var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset;\n if (context.beginPath) {\n context.beginPath();\n }\n context.moveTo(xBegin, yBegin + hOffset);\n context.lineTo(xBegin, yEnd - hOffset);\n context.quadraticCurveTo(xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd);\n context.lineTo(xEnd - wOffset, yEnd);\n context.quadraticCurveTo(xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset);\n context.lineTo(xEnd, yBegin + hOffset);\n context.quadraticCurveTo(xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin);\n context.lineTo(xBegin + wOffset, yBegin);\n context.quadraticCurveTo(xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset);\n context.closePath();\n};\nvar sin0 = Math.sin(0);\nvar cos0 = Math.cos(0);\nvar sin = {};\nvar cos = {};\nvar ellipseStepSize = Math.PI / 40;\nfor (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) {\n sin[i] = Math.sin(i);\n cos[i] = Math.cos(i);\n}\nCRp$3.drawEllipsePath = function (context, centerX, centerY, width, height) {\n if (context.beginPath) {\n context.beginPath();\n }\n if (context.ellipse) {\n context.ellipse(centerX, centerY, width / 2, height / 2, 0, 0, 2 * Math.PI);\n } else {\n var xPos, yPos;\n var rw = width / 2;\n var rh = height / 2;\n for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) {\n xPos = centerX - rw * sin[i] * sin0 + rw * cos[i] * cos0;\n yPos = centerY + rh * cos[i] * sin0 + rh * sin[i] * cos0;\n if (i === 0) {\n context.moveTo(xPos, yPos);\n } else {\n context.lineTo(xPos, yPos);\n }\n }\n }\n context.closePath();\n};\n\n/* global atob, ArrayBuffer, Uint8Array, Blob */\nvar CRp$2 = {};\nCRp$2.createBuffer = function (w, h) {\n var buffer = document.createElement('canvas'); // eslint-disable-line no-undef\n buffer.width = w;\n buffer.height = h;\n return [buffer, buffer.getContext('2d')];\n};\nCRp$2.bufferCanvasImage = function (options) {\n var cy = this.cy;\n var eles = cy.mutableElements();\n var bb = eles.boundingBox();\n var ctrRect = this.findContainerClientCoords();\n var width = options.full ? Math.ceil(bb.w) : ctrRect[2];\n var height = options.full ? Math.ceil(bb.h) : ctrRect[3];\n var specdMaxDims = number$1(options.maxWidth) || number$1(options.maxHeight);\n var pxRatio = this.getPixelRatio();\n var scale = 1;\n if (options.scale !== undefined) {\n width *= options.scale;\n height *= options.scale;\n scale = options.scale;\n } else if (specdMaxDims) {\n var maxScaleW = Infinity;\n var maxScaleH = Infinity;\n if (number$1(options.maxWidth)) {\n maxScaleW = scale * options.maxWidth / width;\n }\n if (number$1(options.maxHeight)) {\n maxScaleH = scale * options.maxHeight / height;\n }\n scale = Math.min(maxScaleW, maxScaleH);\n width *= scale;\n height *= scale;\n }\n if (!specdMaxDims) {\n width *= pxRatio;\n height *= pxRatio;\n scale *= pxRatio;\n }\n var buffCanvas = document.createElement('canvas'); // eslint-disable-line no-undef\n\n buffCanvas.width = width;\n buffCanvas.height = height;\n buffCanvas.style.width = width + 'px';\n buffCanvas.style.height = height + 'px';\n var buffCxt = buffCanvas.getContext('2d');\n\n // Rasterize the layers, but only if container has nonzero size\n if (width > 0 && height > 0) {\n buffCxt.clearRect(0, 0, width, height);\n buffCxt.globalCompositeOperation = 'source-over';\n var zsortedEles = this.getCachedZSortedEles();\n if (options.full) {\n // draw the full bounds of the graph\n buffCxt.translate(-bb.x1 * scale, -bb.y1 * scale);\n buffCxt.scale(scale, scale);\n this.drawElements(buffCxt, zsortedEles);\n buffCxt.scale(1 / scale, 1 / scale);\n buffCxt.translate(bb.x1 * scale, bb.y1 * scale);\n } else {\n // draw the current view\n var pan = cy.pan();\n var translation = {\n x: pan.x * scale,\n y: pan.y * scale\n };\n scale *= cy.zoom();\n buffCxt.translate(translation.x, translation.y);\n buffCxt.scale(scale, scale);\n this.drawElements(buffCxt, zsortedEles);\n buffCxt.scale(1 / scale, 1 / scale);\n buffCxt.translate(-translation.x, -translation.y);\n }\n\n // need to fill bg at end like this in order to fill cleared transparent pixels in jpgs\n if (options.bg) {\n buffCxt.globalCompositeOperation = 'destination-over';\n buffCxt.fillStyle = options.bg;\n buffCxt.rect(0, 0, width, height);\n buffCxt.fill();\n }\n }\n return buffCanvas;\n};\nfunction b64ToBlob(b64, mimeType) {\n var bytes = atob(b64);\n var buff = new ArrayBuffer(bytes.length);\n var buffUint8 = new Uint8Array(buff);\n for (var i = 0; i < bytes.length; i++) {\n buffUint8[i] = bytes.charCodeAt(i);\n }\n return new Blob([buff], {\n type: mimeType\n });\n}\nfunction b64UriToB64(b64uri) {\n var i = b64uri.indexOf(',');\n return b64uri.substr(i + 1);\n}\nfunction output(options, canvas, mimeType) {\n var getB64Uri = function getB64Uri() {\n return canvas.toDataURL(mimeType, options.quality);\n };\n switch (options.output) {\n case 'blob-promise':\n return new Promise$1(function (resolve, reject) {\n try {\n canvas.toBlob(function (blob) {\n if (blob != null) {\n resolve(blob);\n } else {\n reject(new Error('`canvas.toBlob()` sent a null value in its callback'));\n }\n }, mimeType, options.quality);\n } catch (err) {\n reject(err);\n }\n });\n case 'blob':\n return b64ToBlob(b64UriToB64(getB64Uri()), mimeType);\n case 'base64':\n return b64UriToB64(getB64Uri());\n case 'base64uri':\n default:\n return getB64Uri();\n }\n}\nCRp$2.png = function (options) {\n return output(options, this.bufferCanvasImage(options), 'image/png');\n};\nCRp$2.jpg = function (options) {\n return output(options, this.bufferCanvasImage(options), 'image/jpeg');\n};\n\nvar CRp$1 = {};\nCRp$1.nodeShapeImpl = function (name, context, centerX, centerY, width, height, points, corners) {\n switch (name) {\n case 'ellipse':\n return this.drawEllipsePath(context, centerX, centerY, width, height);\n case 'polygon':\n return this.drawPolygonPath(context, centerX, centerY, width, height, points);\n case 'round-polygon':\n return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points, corners);\n case 'roundrectangle':\n case 'round-rectangle':\n return this.drawRoundRectanglePath(context, centerX, centerY, width, height, corners);\n case 'cutrectangle':\n case 'cut-rectangle':\n return this.drawCutRectanglePath(context, centerX, centerY, width, height, points, corners);\n case 'bottomroundrectangle':\n case 'bottom-round-rectangle':\n return this.drawBottomRoundRectanglePath(context, centerX, centerY, width, height, corners);\n case 'barrel':\n return this.drawBarrelPath(context, centerX, centerY, width, height);\n }\n};\n\nvar CR = CanvasRenderer;\nvar CRp = CanvasRenderer.prototype;\nCRp.CANVAS_LAYERS = 3;\n//\nCRp.SELECT_BOX = 0;\nCRp.DRAG = 1;\nCRp.NODE = 2;\nCRp.BUFFER_COUNT = 3;\n//\nCRp.TEXTURE_BUFFER = 0;\nCRp.MOTIONBLUR_BUFFER_NODE = 1;\nCRp.MOTIONBLUR_BUFFER_DRAG = 2;\nfunction CanvasRenderer(options) {\n var r = this;\n var containerWindow = r.cy.window();\n var document = containerWindow.document;\n r.data = {\n canvases: new Array(CRp.CANVAS_LAYERS),\n contexts: new Array(CRp.CANVAS_LAYERS),\n canvasNeedsRedraw: new Array(CRp.CANVAS_LAYERS),\n bufferCanvases: new Array(CRp.BUFFER_COUNT),\n bufferContexts: new Array(CRp.CANVAS_LAYERS)\n };\n var tapHlOffAttr = '-webkit-tap-highlight-color';\n var tapHlOffStyle = 'rgba(0,0,0,0)';\n r.data.canvasContainer = document.createElement('div'); // eslint-disable-line no-undef\n var containerStyle = r.data.canvasContainer.style;\n r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle;\n containerStyle.position = 'relative';\n containerStyle.zIndex = '0';\n containerStyle.overflow = 'hidden';\n var container = options.cy.container();\n container.appendChild(r.data.canvasContainer);\n container.style[tapHlOffAttr] = tapHlOffStyle;\n var styleMap = {\n '-webkit-user-select': 'none',\n '-moz-user-select': '-moz-none',\n 'user-select': 'none',\n '-webkit-tap-highlight-color': 'rgba(0,0,0,0)',\n 'outline-style': 'none'\n };\n if (ms()) {\n styleMap['-ms-touch-action'] = 'none';\n styleMap['touch-action'] = 'none';\n }\n for (var i = 0; i < CRp.CANVAS_LAYERS; i++) {\n var canvas = r.data.canvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef\n r.data.contexts[i] = canvas.getContext('2d');\n Object.keys(styleMap).forEach(function (k) {\n canvas.style[k] = styleMap[k];\n });\n canvas.style.position = 'absolute';\n canvas.setAttribute('data-id', 'layer' + i);\n canvas.style.zIndex = String(CRp.CANVAS_LAYERS - i);\n r.data.canvasContainer.appendChild(canvas);\n r.data.canvasNeedsRedraw[i] = false;\n }\n r.data.topCanvas = r.data.canvases[0];\n r.data.canvases[CRp.NODE].setAttribute('data-id', 'layer' + CRp.NODE + '-node');\n r.data.canvases[CRp.SELECT_BOX].setAttribute('data-id', 'layer' + CRp.SELECT_BOX + '-selectbox');\n r.data.canvases[CRp.DRAG].setAttribute('data-id', 'layer' + CRp.DRAG + '-drag');\n for (var i = 0; i < CRp.BUFFER_COUNT; i++) {\n r.data.bufferCanvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef\n r.data.bufferContexts[i] = r.data.bufferCanvases[i].getContext('2d');\n r.data.bufferCanvases[i].style.position = 'absolute';\n r.data.bufferCanvases[i].setAttribute('data-id', 'buffer' + i);\n r.data.bufferCanvases[i].style.zIndex = String(-i - 1);\n r.data.bufferCanvases[i].style.visibility = 'hidden';\n //r.data.canvasContainer.appendChild(r.data.bufferCanvases[i]);\n }\n\n r.pathsEnabled = true;\n var emptyBb = makeBoundingBox();\n var getBoxCenter = function getBoxCenter(bb) {\n return {\n x: (bb.x1 + bb.x2) / 2,\n y: (bb.y1 + bb.y2) / 2\n };\n };\n var getCenterOffset = function getCenterOffset(bb) {\n return {\n x: -bb.w / 2,\n y: -bb.h / 2\n };\n };\n var backgroundTimestampHasChanged = function backgroundTimestampHasChanged(ele) {\n var _p = ele[0]._private;\n var same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp;\n return !same;\n };\n var getStyleKey = function getStyleKey(ele) {\n return ele[0]._private.nodeKey;\n };\n var getLabelKey = function getLabelKey(ele) {\n return ele[0]._private.labelStyleKey;\n };\n var getSourceLabelKey = function getSourceLabelKey(ele) {\n return ele[0]._private.sourceLabelStyleKey;\n };\n var getTargetLabelKey = function getTargetLabelKey(ele) {\n return ele[0]._private.targetLabelStyleKey;\n };\n var drawElement = function drawElement(context, ele, bb, scaledLabelShown, useEleOpacity) {\n return r.drawElement(context, ele, bb, false, false, useEleOpacity);\n };\n var drawLabel = function drawLabel(context, ele, bb, scaledLabelShown, useEleOpacity) {\n return r.drawElementText(context, ele, bb, scaledLabelShown, 'main', useEleOpacity);\n };\n var drawSourceLabel = function drawSourceLabel(context, ele, bb, scaledLabelShown, useEleOpacity) {\n return r.drawElementText(context, ele, bb, scaledLabelShown, 'source', useEleOpacity);\n };\n var drawTargetLabel = function drawTargetLabel(context, ele, bb, scaledLabelShown, useEleOpacity) {\n return r.drawElementText(context, ele, bb, scaledLabelShown, 'target', useEleOpacity);\n };\n var getElementBox = function getElementBox(ele) {\n ele.boundingBox();\n return ele[0]._private.bodyBounds;\n };\n var getLabelBox = function getLabelBox(ele) {\n ele.boundingBox();\n return ele[0]._private.labelBounds.main || emptyBb;\n };\n var getSourceLabelBox = function getSourceLabelBox(ele) {\n ele.boundingBox();\n return ele[0]._private.labelBounds.source || emptyBb;\n };\n var getTargetLabelBox = function getTargetLabelBox(ele) {\n ele.boundingBox();\n return ele[0]._private.labelBounds.target || emptyBb;\n };\n var isLabelVisibleAtScale = function isLabelVisibleAtScale(ele, scaledLabelShown) {\n return scaledLabelShown;\n };\n var getElementRotationPoint = function getElementRotationPoint(ele) {\n return getBoxCenter(getElementBox(ele));\n };\n var addTextMargin = function addTextMargin(prefix, pt, ele) {\n var pre = prefix ? prefix + '-' : '';\n return {\n x: pt.x + ele.pstyle(pre + 'text-margin-x').pfValue,\n y: pt.y + ele.pstyle(pre + 'text-margin-y').pfValue\n };\n };\n var getRsPt = function getRsPt(ele, x, y) {\n var rs = ele[0]._private.rscratch;\n return {\n x: rs[x],\n y: rs[y]\n };\n };\n var getLabelRotationPoint = function getLabelRotationPoint(ele) {\n return addTextMargin('', getRsPt(ele, 'labelX', 'labelY'), ele);\n };\n var getSourceLabelRotationPoint = function getSourceLabelRotationPoint(ele) {\n return addTextMargin('source', getRsPt(ele, 'sourceLabelX', 'sourceLabelY'), ele);\n };\n var getTargetLabelRotationPoint = function getTargetLabelRotationPoint(ele) {\n return addTextMargin('target', getRsPt(ele, 'targetLabelX', 'targetLabelY'), ele);\n };\n var getElementRotationOffset = function getElementRotationOffset(ele) {\n return getCenterOffset(getElementBox(ele));\n };\n var getSourceLabelRotationOffset = function getSourceLabelRotationOffset(ele) {\n return getCenterOffset(getSourceLabelBox(ele));\n };\n var getTargetLabelRotationOffset = function getTargetLabelRotationOffset(ele) {\n return getCenterOffset(getTargetLabelBox(ele));\n };\n var getLabelRotationOffset = function getLabelRotationOffset(ele) {\n var bb = getLabelBox(ele);\n var p = getCenterOffset(getLabelBox(ele));\n if (ele.isNode()) {\n switch (ele.pstyle('text-halign').value) {\n case 'left':\n p.x = -bb.w;\n break;\n case 'right':\n p.x = 0;\n break;\n }\n switch (ele.pstyle('text-valign').value) {\n case 'top':\n p.y = -bb.h;\n break;\n case 'bottom':\n p.y = 0;\n break;\n }\n }\n return p;\n };\n var eleTxrCache = r.data.eleTxrCache = new ElementTextureCache(r, {\n getKey: getStyleKey,\n doesEleInvalidateKey: backgroundTimestampHasChanged,\n drawElement: drawElement,\n getBoundingBox: getElementBox,\n getRotationPoint: getElementRotationPoint,\n getRotationOffset: getElementRotationOffset,\n allowEdgeTxrCaching: false,\n allowParentTxrCaching: false\n });\n var lblTxrCache = r.data.lblTxrCache = new ElementTextureCache(r, {\n getKey: getLabelKey,\n drawElement: drawLabel,\n getBoundingBox: getLabelBox,\n getRotationPoint: getLabelRotationPoint,\n getRotationOffset: getLabelRotationOffset,\n isVisible: isLabelVisibleAtScale\n });\n var slbTxrCache = r.data.slbTxrCache = new ElementTextureCache(r, {\n getKey: getSourceLabelKey,\n drawElement: drawSourceLabel,\n getBoundingBox: getSourceLabelBox,\n getRotationPoint: getSourceLabelRotationPoint,\n getRotationOffset: getSourceLabelRotationOffset,\n isVisible: isLabelVisibleAtScale\n });\n var tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache(r, {\n getKey: getTargetLabelKey,\n drawElement: drawTargetLabel,\n getBoundingBox: getTargetLabelBox,\n getRotationPoint: getTargetLabelRotationPoint,\n getRotationOffset: getTargetLabelRotationOffset,\n isVisible: isLabelVisibleAtScale\n });\n var lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache(r);\n r.onUpdateEleCalcs(function invalidateTextureCaches(willDraw, eles) {\n // each cache should check for sub-key diff to see that the update affects that cache particularly\n eleTxrCache.invalidateElements(eles);\n lblTxrCache.invalidateElements(eles);\n slbTxrCache.invalidateElements(eles);\n tlbTxrCache.invalidateElements(eles);\n\n // any change invalidates the layers\n lyrTxrCache.invalidateElements(eles);\n\n // update the old bg timestamp so diffs can be done in the ele txr caches\n for (var _i = 0; _i < eles.length; _i++) {\n var _p = eles[_i]._private;\n _p.oldBackgroundTimestamp = _p.backgroundTimestamp;\n }\n });\n var refineInLayers = function refineInLayers(reqs) {\n for (var i = 0; i < reqs.length; i++) {\n lyrTxrCache.enqueueElementRefinement(reqs[i].ele);\n }\n };\n eleTxrCache.onDequeue(refineInLayers);\n lblTxrCache.onDequeue(refineInLayers);\n slbTxrCache.onDequeue(refineInLayers);\n tlbTxrCache.onDequeue(refineInLayers);\n}\nCRp.redrawHint = function (group, bool) {\n var r = this;\n switch (group) {\n case 'eles':\n r.data.canvasNeedsRedraw[CRp.NODE] = bool;\n break;\n case 'drag':\n r.data.canvasNeedsRedraw[CRp.DRAG] = bool;\n break;\n case 'select':\n r.data.canvasNeedsRedraw[CRp.SELECT_BOX] = bool;\n break;\n }\n};\n\n// whether to use Path2D caching for drawing\nvar pathsImpld = typeof Path2D !== 'undefined';\nCRp.path2dEnabled = function (on) {\n if (on === undefined) {\n return this.pathsEnabled;\n }\n this.pathsEnabled = on ? true : false;\n};\nCRp.usePaths = function () {\n return pathsImpld && this.pathsEnabled;\n};\nCRp.setImgSmoothing = function (context, bool) {\n if (context.imageSmoothingEnabled != null) {\n context.imageSmoothingEnabled = bool;\n } else {\n context.webkitImageSmoothingEnabled = bool;\n context.mozImageSmoothingEnabled = bool;\n context.msImageSmoothingEnabled = bool;\n }\n};\nCRp.getImgSmoothing = function (context) {\n if (context.imageSmoothingEnabled != null) {\n return context.imageSmoothingEnabled;\n } else {\n return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled;\n }\n};\nCRp.makeOffscreenCanvas = function (width, height) {\n var canvas;\n if ((typeof OffscreenCanvas === \"undefined\" ? \"undefined\" : _typeof(OffscreenCanvas)) !== (\"undefined\" )) {\n canvas = new OffscreenCanvas(width, height);\n } else {\n var containerWindow = this.cy.window();\n var document = containerWindow.document;\n canvas = document.createElement('canvas'); // eslint-disable-line no-undef\n canvas.width = width;\n canvas.height = height;\n }\n return canvas;\n};\n[CRp$a, CRp$9, CRp$8, CRp$7, CRp$6, CRp$5, CRp$4, CRp$3, CRp$2, CRp$1].forEach(function (props) {\n extend(CRp, props);\n});\n\nvar renderer = [{\n name: 'null',\n impl: NullRenderer\n}, {\n name: 'base',\n impl: BR\n}, {\n name: 'canvas',\n impl: CR\n}];\n\nvar incExts = [{\n type: 'layout',\n extensions: layout\n}, {\n type: 'renderer',\n extensions: renderer\n}];\n\n// registered extensions to cytoscape, indexed by name\nvar extensions = {};\n\n// registered modules for extensions, indexed by name\nvar modules = {};\nfunction setExtension(type, name, registrant) {\n var ext = registrant;\n var overrideErr = function overrideErr(field) {\n warn('Can not register `' + name + '` for `' + type + '` since `' + field + '` already exists in the prototype and can not be overridden');\n };\n if (type === 'core') {\n if (Core.prototype[name]) {\n return overrideErr(name);\n } else {\n Core.prototype[name] = registrant;\n }\n } else if (type === 'collection') {\n if (Collection.prototype[name]) {\n return overrideErr(name);\n } else {\n Collection.prototype[name] = registrant;\n }\n } else if (type === 'layout') {\n // fill in missing layout functions in the prototype\n\n var Layout = function Layout(options) {\n this.options = options;\n registrant.call(this, options);\n\n // make sure layout has _private for use w/ std apis like .on()\n if (!plainObject(this._private)) {\n this._private = {};\n }\n this._private.cy = options.cy;\n this._private.listeners = [];\n this.createEmitter();\n };\n var layoutProto = Layout.prototype = Object.create(registrant.prototype);\n var optLayoutFns = [];\n for (var i = 0; i < optLayoutFns.length; i++) {\n var fnName = optLayoutFns[i];\n layoutProto[fnName] = layoutProto[fnName] || function () {\n return this;\n };\n }\n\n // either .start() or .run() is defined, so autogen the other\n if (layoutProto.start && !layoutProto.run) {\n layoutProto.run = function () {\n this.start();\n return this;\n };\n } else if (!layoutProto.start && layoutProto.run) {\n layoutProto.start = function () {\n this.run();\n return this;\n };\n }\n var regStop = registrant.prototype.stop;\n layoutProto.stop = function () {\n var opts = this.options;\n if (opts && opts.animate) {\n var anis = this.animations;\n if (anis) {\n for (var _i = 0; _i < anis.length; _i++) {\n anis[_i].stop();\n }\n }\n }\n if (regStop) {\n regStop.call(this);\n } else {\n this.emit('layoutstop');\n }\n return this;\n };\n if (!layoutProto.destroy) {\n layoutProto.destroy = function () {\n return this;\n };\n }\n layoutProto.cy = function () {\n return this._private.cy;\n };\n var getCy = function getCy(layout) {\n return layout._private.cy;\n };\n var emitterOpts = {\n addEventFields: function addEventFields(layout, evt) {\n evt.layout = layout;\n evt.cy = getCy(layout);\n evt.target = layout;\n },\n bubble: function bubble() {\n return true;\n },\n parent: function parent(layout) {\n return getCy(layout);\n }\n };\n extend(layoutProto, {\n createEmitter: function createEmitter() {\n this._private.emitter = new Emitter(emitterOpts, this);\n return this;\n },\n emitter: function emitter() {\n return this._private.emitter;\n },\n on: function on(evt, cb) {\n this.emitter().on(evt, cb);\n return this;\n },\n one: function one(evt, cb) {\n this.emitter().one(evt, cb);\n return this;\n },\n once: function once(evt, cb) {\n this.emitter().one(evt, cb);\n return this;\n },\n removeListener: function removeListener(evt, cb) {\n this.emitter().removeListener(evt, cb);\n return this;\n },\n removeAllListeners: function removeAllListeners() {\n this.emitter().removeAllListeners();\n return this;\n },\n emit: function emit(evt, params) {\n this.emitter().emit(evt, params);\n return this;\n }\n });\n define.eventAliasesOn(layoutProto);\n ext = Layout; // replace with our wrapped layout\n } else if (type === 'renderer' && name !== 'null' && name !== 'base') {\n // user registered renderers inherit from base\n\n var BaseRenderer = getExtension('renderer', 'base');\n var bProto = BaseRenderer.prototype;\n var RegistrantRenderer = registrant;\n var rProto = registrant.prototype;\n var Renderer = function Renderer() {\n BaseRenderer.apply(this, arguments);\n RegistrantRenderer.apply(this, arguments);\n };\n var proto = Renderer.prototype;\n for (var pName in bProto) {\n var pVal = bProto[pName];\n var existsInR = rProto[pName] != null;\n if (existsInR) {\n return overrideErr(pName);\n }\n proto[pName] = pVal; // take impl from base\n }\n\n for (var _pName in rProto) {\n proto[_pName] = rProto[_pName]; // take impl from registrant\n }\n\n bProto.clientFunctions.forEach(function (name) {\n proto[name] = proto[name] || function () {\n error('Renderer does not implement `renderer.' + name + '()` on its prototype');\n };\n });\n ext = Renderer;\n } else if (type === '__proto__' || type === 'constructor' || type === 'prototype') {\n // to avoid potential prototype pollution\n return error(type + ' is an illegal type to be registered, possibly lead to prototype pollutions');\n }\n return setMap({\n map: extensions,\n keys: [type, name],\n value: ext\n });\n}\nfunction getExtension(type, name) {\n return getMap({\n map: extensions,\n keys: [type, name]\n });\n}\nfunction setModule(type, name, moduleType, moduleName, registrant) {\n return setMap({\n map: modules,\n keys: [type, name, moduleType, moduleName],\n value: registrant\n });\n}\nfunction getModule(type, name, moduleType, moduleName) {\n return getMap({\n map: modules,\n keys: [type, name, moduleType, moduleName]\n });\n}\nvar extension = function extension() {\n // e.g. extension('renderer', 'svg')\n if (arguments.length === 2) {\n return getExtension.apply(null, arguments);\n }\n\n // e.g. extension('renderer', 'svg', { ... })\n else if (arguments.length === 3) {\n return setExtension.apply(null, arguments);\n }\n\n // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse')\n else if (arguments.length === 4) {\n return getModule.apply(null, arguments);\n }\n\n // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse', { ... })\n else if (arguments.length === 5) {\n return setModule.apply(null, arguments);\n } else {\n error('Invalid extension access syntax');\n }\n};\n\n// allows a core instance to access extensions internally\nCore.prototype.extension = extension;\n\n// included extensions\nincExts.forEach(function (group) {\n group.extensions.forEach(function (ext) {\n setExtension(group.type, ext.name, ext.impl);\n });\n});\n\n// a dummy stylesheet object that doesn't need a reference to the core\n// (useful for init)\nvar Stylesheet = function Stylesheet() {\n if (!(this instanceof Stylesheet)) {\n return new Stylesheet();\n }\n this.length = 0;\n};\nvar sheetfn = Stylesheet.prototype;\nsheetfn.instanceString = function () {\n return 'stylesheet';\n};\n\n// just store the selector to be parsed later\nsheetfn.selector = function (selector) {\n var i = this.length++;\n this[i] = {\n selector: selector,\n properties: []\n };\n return this; // chaining\n};\n\n// just store the property to be parsed later\nsheetfn.css = function (name, value) {\n var i = this.length - 1;\n if (string(name)) {\n this[i].properties.push({\n name: name,\n value: value\n });\n } else if (plainObject(name)) {\n var map = name;\n var propNames = Object.keys(map);\n for (var j = 0; j < propNames.length; j++) {\n var key = propNames[j];\n var mapVal = map[key];\n if (mapVal == null) {\n continue;\n }\n var prop = Style.properties[key] || Style.properties[dash2camel(key)];\n if (prop == null) {\n continue;\n }\n var _name = prop.name;\n var _value = mapVal;\n this[i].properties.push({\n name: _name,\n value: _value\n });\n }\n }\n return this; // chaining\n};\n\nsheetfn.style = sheetfn.css;\n\n// generate a real style object from the dummy stylesheet\nsheetfn.generateStyle = function (cy) {\n var style = new Style(cy);\n return this.appendToStyle(style);\n};\n\n// append a dummy stylesheet object on a real style object\nsheetfn.appendToStyle = function (style) {\n for (var i = 0; i < this.length; i++) {\n var context = this[i];\n var selector = context.selector;\n var props = context.properties;\n style.selector(selector); // apply selector\n\n for (var j = 0; j < props.length; j++) {\n var prop = props[j];\n style.css(prop.name, prop.value); // apply property\n }\n }\n\n return style;\n};\n\nvar version = \"3.30.2\";\n\nvar cytoscape = function cytoscape(options) {\n // if no options specified, use default\n if (options === undefined) {\n options = {};\n }\n\n // create instance\n if (plainObject(options)) {\n return new Core(options);\n }\n\n // allow for registration of extensions\n else if (string(options)) {\n return extension.apply(extension, arguments);\n }\n};\n\n// e.g. cytoscape.use( require('cytoscape-foo'), bar )\ncytoscape.use = function (ext) {\n var args = Array.prototype.slice.call(arguments, 1); // args to pass to ext\n\n args.unshift(cytoscape); // cytoscape is first arg to ext\n\n ext.apply(null, args);\n return this;\n};\ncytoscape.warnings = function (bool) {\n return warnings(bool);\n};\n\n// replaced by build system\ncytoscape.version = version;\n\n// expose public apis (mostly for extensions)\ncytoscape.stylesheet = cytoscape.Stylesheet = Stylesheet;\n\nexport { cytoscape as default };\n", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"layoutBase\"] = factory();\n\telse\n\t\troot[\"layoutBase\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 26);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction LayoutConstants() {}\n\n/**\r\n * Layout Quality: 0:draft, 1:default, 2:proof\r\n */\nLayoutConstants.QUALITY = 1;\n\n/**\r\n * Default parameters\r\n */\nLayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false;\nLayoutConstants.DEFAULT_INCREMENTAL = false;\nLayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true;\nLayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false;\nLayoutConstants.DEFAULT_ANIMATION_PERIOD = 50;\nLayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false;\n\n// -----------------------------------------------------------------------------\n// Section: General other constants\n// -----------------------------------------------------------------------------\n/*\r\n * Margins of a graph to be applied on bouding rectangle of its contents. We\r\n * assume margins on all four sides to be uniform.\r\n */\nLayoutConstants.DEFAULT_GRAPH_MARGIN = 15;\n\n/*\r\n * Whether to consider labels in node dimensions or not\r\n */\nLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false;\n\n/*\r\n * Default dimension of a non-compound node.\r\n */\nLayoutConstants.SIMPLE_NODE_SIZE = 40;\n\n/*\r\n * Default dimension of a non-compound node.\r\n */\nLayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2;\n\n/*\r\n * Empty compound node size. When a compound node is empty, its both\r\n * dimensions should be of this value.\r\n */\nLayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40;\n\n/*\r\n * Minimum length that an edge should take during layout\r\n */\nLayoutConstants.MIN_EDGE_LENGTH = 1;\n\n/*\r\n * World boundaries that layout operates on\r\n */\nLayoutConstants.WORLD_BOUNDARY = 1000000;\n\n/*\r\n * World boundaries that random positioning can be performed with\r\n */\nLayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000;\n\n/*\r\n * Coordinates of the world center\r\n */\nLayoutConstants.WORLD_CENTER_X = 1200;\nLayoutConstants.WORLD_CENTER_Y = 900;\n\nmodule.exports = LayoutConstants;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar IGeometry = __webpack_require__(8);\nvar IMath = __webpack_require__(9);\n\nfunction LEdge(source, target, vEdge) {\n LGraphObject.call(this, vEdge);\n\n this.isOverlapingSourceAndTarget = false;\n this.vGraphObject = vEdge;\n this.bendpoints = [];\n this.source = source;\n this.target = target;\n}\n\nLEdge.prototype = Object.create(LGraphObject.prototype);\n\nfor (var prop in LGraphObject) {\n LEdge[prop] = LGraphObject[prop];\n}\n\nLEdge.prototype.getSource = function () {\n return this.source;\n};\n\nLEdge.prototype.getTarget = function () {\n return this.target;\n};\n\nLEdge.prototype.isInterGraph = function () {\n return this.isInterGraph;\n};\n\nLEdge.prototype.getLength = function () {\n return this.length;\n};\n\nLEdge.prototype.isOverlapingSourceAndTarget = function () {\n return this.isOverlapingSourceAndTarget;\n};\n\nLEdge.prototype.getBendpoints = function () {\n return this.bendpoints;\n};\n\nLEdge.prototype.getLca = function () {\n return this.lca;\n};\n\nLEdge.prototype.getSourceInLca = function () {\n return this.sourceInLca;\n};\n\nLEdge.prototype.getTargetInLca = function () {\n return this.targetInLca;\n};\n\nLEdge.prototype.getOtherEnd = function (node) {\n if (this.source === node) {\n return this.target;\n } else if (this.target === node) {\n return this.source;\n } else {\n throw \"Node is not incident with this edge\";\n }\n};\n\nLEdge.prototype.getOtherEndInGraph = function (node, graph) {\n var otherEnd = this.getOtherEnd(node);\n var root = graph.getGraphManager().getRoot();\n\n while (true) {\n if (otherEnd.getOwner() == graph) {\n return otherEnd;\n }\n\n if (otherEnd.getOwner() == root) {\n break;\n }\n\n otherEnd = otherEnd.getOwner().getParent();\n }\n\n return null;\n};\n\nLEdge.prototype.updateLength = function () {\n var clipPointCoordinates = new Array(4);\n\n this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates);\n\n if (!this.isOverlapingSourceAndTarget) {\n this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2];\n this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3];\n\n if (Math.abs(this.lengthX) < 1.0) {\n this.lengthX = IMath.sign(this.lengthX);\n }\n\n if (Math.abs(this.lengthY) < 1.0) {\n this.lengthY = IMath.sign(this.lengthY);\n }\n\n this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);\n }\n};\n\nLEdge.prototype.updateLengthSimple = function () {\n this.lengthX = this.target.getCenterX() - this.source.getCenterX();\n this.lengthY = this.target.getCenterY() - this.source.getCenterY();\n\n if (Math.abs(this.lengthX) < 1.0) {\n this.lengthX = IMath.sign(this.lengthX);\n }\n\n if (Math.abs(this.lengthY) < 1.0) {\n this.lengthY = IMath.sign(this.lengthY);\n }\n\n this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);\n};\n\nmodule.exports = LEdge;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction LGraphObject(vGraphObject) {\n this.vGraphObject = vGraphObject;\n}\n\nmodule.exports = LGraphObject;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar Integer = __webpack_require__(10);\nvar RectangleD = __webpack_require__(13);\nvar LayoutConstants = __webpack_require__(0);\nvar RandomSeed = __webpack_require__(16);\nvar PointD = __webpack_require__(4);\n\nfunction LNode(gm, loc, size, vNode) {\n //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode)\n if (size == null && vNode == null) {\n vNode = loc;\n }\n\n LGraphObject.call(this, vNode);\n\n //Alternative constructor 2 : LNode(Layout layout, Object vNode)\n if (gm.graphManager != null) gm = gm.graphManager;\n\n this.estimatedSize = Integer.MIN_VALUE;\n this.inclusionTreeDepth = Integer.MAX_VALUE;\n this.vGraphObject = vNode;\n this.edges = [];\n this.graphManager = gm;\n\n if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD();\n}\n\nLNode.prototype = Object.create(LGraphObject.prototype);\nfor (var prop in LGraphObject) {\n LNode[prop] = LGraphObject[prop];\n}\n\nLNode.prototype.getEdges = function () {\n return this.edges;\n};\n\nLNode.prototype.getChild = function () {\n return this.child;\n};\n\nLNode.prototype.getOwner = function () {\n // if (this.owner != null) {\n // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) {\n // throw \"assert failed\";\n // }\n // }\n\n return this.owner;\n};\n\nLNode.prototype.getWidth = function () {\n return this.rect.width;\n};\n\nLNode.prototype.setWidth = function (width) {\n this.rect.width = width;\n};\n\nLNode.prototype.getHeight = function () {\n return this.rect.height;\n};\n\nLNode.prototype.setHeight = function (height) {\n this.rect.height = height;\n};\n\nLNode.prototype.getCenterX = function () {\n return this.rect.x + this.rect.width / 2;\n};\n\nLNode.prototype.getCenterY = function () {\n return this.rect.y + this.rect.height / 2;\n};\n\nLNode.prototype.getCenter = function () {\n return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);\n};\n\nLNode.prototype.getLocation = function () {\n return new PointD(this.rect.x, this.rect.y);\n};\n\nLNode.prototype.getRect = function () {\n return this.rect;\n};\n\nLNode.prototype.getDiagonal = function () {\n return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);\n};\n\n/**\n * This method returns half the diagonal length of this node.\n */\nLNode.prototype.getHalfTheDiagonal = function () {\n return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;\n};\n\nLNode.prototype.setRect = function (upperLeft, dimension) {\n this.rect.x = upperLeft.x;\n this.rect.y = upperLeft.y;\n this.rect.width = dimension.width;\n this.rect.height = dimension.height;\n};\n\nLNode.prototype.setCenter = function (cx, cy) {\n this.rect.x = cx - this.rect.width / 2;\n this.rect.y = cy - this.rect.height / 2;\n};\n\nLNode.prototype.setLocation = function (x, y) {\n this.rect.x = x;\n this.rect.y = y;\n};\n\nLNode.prototype.moveBy = function (dx, dy) {\n this.rect.x += dx;\n this.rect.y += dy;\n};\n\nLNode.prototype.getEdgeListToNode = function (to) {\n var edgeList = [];\n var edge;\n var self = this;\n\n self.edges.forEach(function (edge) {\n\n if (edge.target == to) {\n if (edge.source != self) throw \"Incorrect edge source!\";\n\n edgeList.push(edge);\n }\n });\n\n return edgeList;\n};\n\nLNode.prototype.getEdgesBetween = function (other) {\n var edgeList = [];\n var edge;\n\n var self = this;\n self.edges.forEach(function (edge) {\n\n if (!(edge.source == self || edge.target == self)) throw \"Incorrect edge source and/or target\";\n\n if (edge.target == other || edge.source == other) {\n edgeList.push(edge);\n }\n });\n\n return edgeList;\n};\n\nLNode.prototype.getNeighborsList = function () {\n var neighbors = new Set();\n\n var self = this;\n self.edges.forEach(function (edge) {\n\n if (edge.source == self) {\n neighbors.add(edge.target);\n } else {\n if (edge.target != self) {\n throw \"Incorrect incidency!\";\n }\n\n neighbors.add(edge.source);\n }\n });\n\n return neighbors;\n};\n\nLNode.prototype.withChildren = function () {\n var withNeighborsList = new Set();\n var childNode;\n var children;\n\n withNeighborsList.add(this);\n\n if (this.child != null) {\n var nodes = this.child.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n childNode = nodes[i];\n children = childNode.withChildren();\n children.forEach(function (node) {\n withNeighborsList.add(node);\n });\n }\n }\n\n return withNeighborsList;\n};\n\nLNode.prototype.getNoOfChildren = function () {\n var noOfChildren = 0;\n var childNode;\n\n if (this.child == null) {\n noOfChildren = 1;\n } else {\n var nodes = this.child.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n childNode = nodes[i];\n\n noOfChildren += childNode.getNoOfChildren();\n }\n }\n\n if (noOfChildren == 0) {\n noOfChildren = 1;\n }\n return noOfChildren;\n};\n\nLNode.prototype.getEstimatedSize = function () {\n if (this.estimatedSize == Integer.MIN_VALUE) {\n throw \"assert failed\";\n }\n return this.estimatedSize;\n};\n\nLNode.prototype.calcEstimatedSize = function () {\n if (this.child == null) {\n return this.estimatedSize = (this.rect.width + this.rect.height) / 2;\n } else {\n this.estimatedSize = this.child.calcEstimatedSize();\n this.rect.width = this.estimatedSize;\n this.rect.height = this.estimatedSize;\n\n return this.estimatedSize;\n }\n};\n\nLNode.prototype.scatter = function () {\n var randomCenterX;\n var randomCenterY;\n\n var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY;\n var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY;\n randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX;\n\n var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY;\n var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY;\n randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY;\n\n this.rect.x = randomCenterX;\n this.rect.y = randomCenterY;\n};\n\nLNode.prototype.updateBounds = function () {\n if (this.getChild() == null) {\n throw \"assert failed\";\n }\n if (this.getChild().getNodes().length != 0) {\n // wrap the children nodes by re-arranging the boundaries\n var childGraph = this.getChild();\n childGraph.updateBounds(true);\n\n this.rect.x = childGraph.getLeft();\n this.rect.y = childGraph.getTop();\n\n this.setWidth(childGraph.getRight() - childGraph.getLeft());\n this.setHeight(childGraph.getBottom() - childGraph.getTop());\n\n // Update compound bounds considering its label properties \n if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {\n\n var width = childGraph.getRight() - childGraph.getLeft();\n var height = childGraph.getBottom() - childGraph.getTop();\n\n if (this.labelWidth > width) {\n this.rect.x -= (this.labelWidth - width) / 2;\n this.setWidth(this.labelWidth);\n }\n\n if (this.labelHeight > height) {\n if (this.labelPos == \"center\") {\n this.rect.y -= (this.labelHeight - height) / 2;\n } else if (this.labelPos == \"top\") {\n this.rect.y -= this.labelHeight - height;\n }\n this.setHeight(this.labelHeight);\n }\n }\n }\n};\n\nLNode.prototype.getInclusionTreeDepth = function () {\n if (this.inclusionTreeDepth == Integer.MAX_VALUE) {\n throw \"assert failed\";\n }\n return this.inclusionTreeDepth;\n};\n\nLNode.prototype.transform = function (trans) {\n var left = this.rect.x;\n\n if (left > LayoutConstants.WORLD_BOUNDARY) {\n left = LayoutConstants.WORLD_BOUNDARY;\n } else if (left < -LayoutConstants.WORLD_BOUNDARY) {\n left = -LayoutConstants.WORLD_BOUNDARY;\n }\n\n var top = this.rect.y;\n\n if (top > LayoutConstants.WORLD_BOUNDARY) {\n top = LayoutConstants.WORLD_BOUNDARY;\n } else if (top < -LayoutConstants.WORLD_BOUNDARY) {\n top = -LayoutConstants.WORLD_BOUNDARY;\n }\n\n var leftTop = new PointD(left, top);\n var vLeftTop = trans.inverseTransformPoint(leftTop);\n\n this.setLocation(vLeftTop.x, vLeftTop.y);\n};\n\nLNode.prototype.getLeft = function () {\n return this.rect.x;\n};\n\nLNode.prototype.getRight = function () {\n return this.rect.x + this.rect.width;\n};\n\nLNode.prototype.getTop = function () {\n return this.rect.y;\n};\n\nLNode.prototype.getBottom = function () {\n return this.rect.y + this.rect.height;\n};\n\nLNode.prototype.getParent = function () {\n if (this.owner == null) {\n return null;\n }\n\n return this.owner.getParent();\n};\n\nmodule.exports = LNode;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction PointD(x, y) {\n if (x == null && y == null) {\n this.x = 0;\n this.y = 0;\n } else {\n this.x = x;\n this.y = y;\n }\n}\n\nPointD.prototype.getX = function () {\n return this.x;\n};\n\nPointD.prototype.getY = function () {\n return this.y;\n};\n\nPointD.prototype.setX = function (x) {\n this.x = x;\n};\n\nPointD.prototype.setY = function (y) {\n this.y = y;\n};\n\nPointD.prototype.getDifference = function (pt) {\n return new DimensionD(this.x - pt.x, this.y - pt.y);\n};\n\nPointD.prototype.getCopy = function () {\n return new PointD(this.x, this.y);\n};\n\nPointD.prototype.translate = function (dim) {\n this.x += dim.width;\n this.y += dim.height;\n return this;\n};\n\nmodule.exports = PointD;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar Integer = __webpack_require__(10);\nvar LayoutConstants = __webpack_require__(0);\nvar LGraphManager = __webpack_require__(6);\nvar LNode = __webpack_require__(3);\nvar LEdge = __webpack_require__(1);\nvar RectangleD = __webpack_require__(13);\nvar Point = __webpack_require__(12);\nvar LinkedList = __webpack_require__(11);\n\nfunction LGraph(parent, obj2, vGraph) {\n LGraphObject.call(this, vGraph);\n this.estimatedSize = Integer.MIN_VALUE;\n this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN;\n this.edges = [];\n this.nodes = [];\n this.isConnected = false;\n this.parent = parent;\n\n if (obj2 != null && obj2 instanceof LGraphManager) {\n this.graphManager = obj2;\n } else if (obj2 != null && obj2 instanceof Layout) {\n this.graphManager = obj2.graphManager;\n }\n}\n\nLGraph.prototype = Object.create(LGraphObject.prototype);\nfor (var prop in LGraphObject) {\n LGraph[prop] = LGraphObject[prop];\n}\n\nLGraph.prototype.getNodes = function () {\n return this.nodes;\n};\n\nLGraph.prototype.getEdges = function () {\n return this.edges;\n};\n\nLGraph.prototype.getGraphManager = function () {\n return this.graphManager;\n};\n\nLGraph.prototype.getParent = function () {\n return this.parent;\n};\n\nLGraph.prototype.getLeft = function () {\n return this.left;\n};\n\nLGraph.prototype.getRight = function () {\n return this.right;\n};\n\nLGraph.prototype.getTop = function () {\n return this.top;\n};\n\nLGraph.prototype.getBottom = function () {\n return this.bottom;\n};\n\nLGraph.prototype.isConnected = function () {\n return this.isConnected;\n};\n\nLGraph.prototype.add = function (obj1, sourceNode, targetNode) {\n if (sourceNode == null && targetNode == null) {\n var newNode = obj1;\n if (this.graphManager == null) {\n throw \"Graph has no graph mgr!\";\n }\n if (this.getNodes().indexOf(newNode) > -1) {\n throw \"Node already in graph!\";\n }\n newNode.owner = this;\n this.getNodes().push(newNode);\n\n return newNode;\n } else {\n var newEdge = obj1;\n if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) {\n throw \"Source or target not in graph!\";\n }\n\n if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) {\n throw \"Both owners must be this graph!\";\n }\n\n if (sourceNode.owner != targetNode.owner) {\n return null;\n }\n\n // set source and target\n newEdge.source = sourceNode;\n newEdge.target = targetNode;\n\n // set as intra-graph edge\n newEdge.isInterGraph = false;\n\n // add to graph edge list\n this.getEdges().push(newEdge);\n\n // add to incidency lists\n sourceNode.edges.push(newEdge);\n\n if (targetNode != sourceNode) {\n targetNode.edges.push(newEdge);\n }\n\n return newEdge;\n }\n};\n\nLGraph.prototype.remove = function (obj) {\n var node = obj;\n if (obj instanceof LNode) {\n if (node == null) {\n throw \"Node is null!\";\n }\n if (!(node.owner != null && node.owner == this)) {\n throw \"Owner graph is invalid!\";\n }\n if (this.graphManager == null) {\n throw \"Owner graph manager is invalid!\";\n }\n // remove incident edges first (make a copy to do it safely)\n var edgesToBeRemoved = node.edges.slice();\n var edge;\n var s = edgesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n edge = edgesToBeRemoved[i];\n\n if (edge.isInterGraph) {\n this.graphManager.remove(edge);\n } else {\n edge.source.owner.remove(edge);\n }\n }\n\n // now the node itself\n var index = this.nodes.indexOf(node);\n if (index == -1) {\n throw \"Node not in owner node list!\";\n }\n\n this.nodes.splice(index, 1);\n } else if (obj instanceof LEdge) {\n var edge = obj;\n if (edge == null) {\n throw \"Edge is null!\";\n }\n if (!(edge.source != null && edge.target != null)) {\n throw \"Source and/or target is null!\";\n }\n if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) {\n throw \"Source and/or target owner is invalid!\";\n }\n\n var sourceIndex = edge.source.edges.indexOf(edge);\n var targetIndex = edge.target.edges.indexOf(edge);\n if (!(sourceIndex > -1 && targetIndex > -1)) {\n throw \"Source and/or target doesn't know this edge!\";\n }\n\n edge.source.edges.splice(sourceIndex, 1);\n\n if (edge.target != edge.source) {\n edge.target.edges.splice(targetIndex, 1);\n }\n\n var index = edge.source.owner.getEdges().indexOf(edge);\n if (index == -1) {\n throw \"Not in owner's edge list!\";\n }\n\n edge.source.owner.getEdges().splice(index, 1);\n }\n};\n\nLGraph.prototype.updateLeftTop = function () {\n var top = Integer.MAX_VALUE;\n var left = Integer.MAX_VALUE;\n var nodeTop;\n var nodeLeft;\n var margin;\n\n var nodes = this.getNodes();\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n nodeTop = lNode.getTop();\n nodeLeft = lNode.getLeft();\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n }\n\n // Do we have any nodes in this graph?\n if (top == Integer.MAX_VALUE) {\n return null;\n }\n\n if (nodes[0].getParent().paddingLeft != undefined) {\n margin = nodes[0].getParent().paddingLeft;\n } else {\n margin = this.margin;\n }\n\n this.left = left - margin;\n this.top = top - margin;\n\n // Apply the margins and return the result\n return new Point(this.left, this.top);\n};\n\nLGraph.prototype.updateBounds = function (recursive) {\n // calculate bounds\n var left = Integer.MAX_VALUE;\n var right = -Integer.MAX_VALUE;\n var top = Integer.MAX_VALUE;\n var bottom = -Integer.MAX_VALUE;\n var nodeLeft;\n var nodeRight;\n var nodeTop;\n var nodeBottom;\n var margin;\n\n var nodes = this.nodes;\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n\n if (recursive && lNode.child != null) {\n lNode.updateBounds();\n }\n nodeLeft = lNode.getLeft();\n nodeRight = lNode.getRight();\n nodeTop = lNode.getTop();\n nodeBottom = lNode.getBottom();\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingRect = new RectangleD(left, top, right - left, bottom - top);\n if (left == Integer.MAX_VALUE) {\n this.left = this.parent.getLeft();\n this.right = this.parent.getRight();\n this.top = this.parent.getTop();\n this.bottom = this.parent.getBottom();\n }\n\n if (nodes[0].getParent().paddingLeft != undefined) {\n margin = nodes[0].getParent().paddingLeft;\n } else {\n margin = this.margin;\n }\n\n this.left = boundingRect.x - margin;\n this.right = boundingRect.x + boundingRect.width + margin;\n this.top = boundingRect.y - margin;\n this.bottom = boundingRect.y + boundingRect.height + margin;\n};\n\nLGraph.calculateBounds = function (nodes) {\n var left = Integer.MAX_VALUE;\n var right = -Integer.MAX_VALUE;\n var top = Integer.MAX_VALUE;\n var bottom = -Integer.MAX_VALUE;\n var nodeLeft;\n var nodeRight;\n var nodeTop;\n var nodeBottom;\n\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n nodeLeft = lNode.getLeft();\n nodeRight = lNode.getRight();\n nodeTop = lNode.getTop();\n nodeBottom = lNode.getBottom();\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingRect = new RectangleD(left, top, right - left, bottom - top);\n\n return boundingRect;\n};\n\nLGraph.prototype.getInclusionTreeDepth = function () {\n if (this == this.graphManager.getRoot()) {\n return 1;\n } else {\n return this.parent.getInclusionTreeDepth();\n }\n};\n\nLGraph.prototype.getEstimatedSize = function () {\n if (this.estimatedSize == Integer.MIN_VALUE) {\n throw \"assert failed\";\n }\n return this.estimatedSize;\n};\n\nLGraph.prototype.calcEstimatedSize = function () {\n var size = 0;\n var nodes = this.nodes;\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n size += lNode.calcEstimatedSize();\n }\n\n if (size == 0) {\n this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE;\n } else {\n this.estimatedSize = size / Math.sqrt(this.nodes.length);\n }\n\n return this.estimatedSize;\n};\n\nLGraph.prototype.updateConnected = function () {\n var self = this;\n if (this.nodes.length == 0) {\n this.isConnected = true;\n return;\n }\n\n var queue = new LinkedList();\n var visited = new Set();\n var currentNode = this.nodes[0];\n var neighborEdges;\n var currentNeighbor;\n var childrenOfNode = currentNode.withChildren();\n childrenOfNode.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n });\n\n while (queue.length !== 0) {\n currentNode = queue.shift();\n\n // Traverse all neighbors of this node\n neighborEdges = currentNode.getEdges();\n var size = neighborEdges.length;\n for (var i = 0; i < size; i++) {\n var neighborEdge = neighborEdges[i];\n currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this);\n\n // Add unvisited neighbors to the list to visit\n if (currentNeighbor != null && !visited.has(currentNeighbor)) {\n var childrenOfNeighbor = currentNeighbor.withChildren();\n\n childrenOfNeighbor.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n });\n }\n }\n }\n\n this.isConnected = false;\n\n if (visited.size >= this.nodes.length) {\n var noOfVisitedInThisGraph = 0;\n\n visited.forEach(function (visitedNode) {\n if (visitedNode.owner == self) {\n noOfVisitedInThisGraph++;\n }\n });\n\n if (noOfVisitedInThisGraph == this.nodes.length) {\n this.isConnected = true;\n }\n }\n};\n\nmodule.exports = LGraph;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraph;\nvar LEdge = __webpack_require__(1);\n\nfunction LGraphManager(layout) {\n LGraph = __webpack_require__(5); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now.\n this.layout = layout;\n\n this.graphs = [];\n this.edges = [];\n}\n\nLGraphManager.prototype.addRoot = function () {\n var ngraph = this.layout.newGraph();\n var nnode = this.layout.newNode(null);\n var root = this.add(ngraph, nnode);\n this.setRootGraph(root);\n return this.rootGraph;\n};\n\nLGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) {\n //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge\n if (newEdge == null && sourceNode == null && targetNode == null) {\n if (newGraph == null) {\n throw \"Graph is null!\";\n }\n if (parentNode == null) {\n throw \"Parent node is null!\";\n }\n if (this.graphs.indexOf(newGraph) > -1) {\n throw \"Graph already in this graph mgr!\";\n }\n\n this.graphs.push(newGraph);\n\n if (newGraph.parent != null) {\n throw \"Already has a parent!\";\n }\n if (parentNode.child != null) {\n throw \"Already has a child!\";\n }\n\n newGraph.parent = parentNode;\n parentNode.child = newGraph;\n\n return newGraph;\n } else {\n //change the order of the parameters\n targetNode = newEdge;\n sourceNode = parentNode;\n newEdge = newGraph;\n var sourceGraph = sourceNode.getOwner();\n var targetGraph = targetNode.getOwner();\n\n if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) {\n throw \"Source not in this graph mgr!\";\n }\n if (!(targetGraph != null && targetGraph.getGraphManager() == this)) {\n throw \"Target not in this graph mgr!\";\n }\n\n if (sourceGraph == targetGraph) {\n newEdge.isInterGraph = false;\n return sourceGraph.add(newEdge, sourceNode, targetNode);\n } else {\n newEdge.isInterGraph = true;\n\n // set source and target\n newEdge.source = sourceNode;\n newEdge.target = targetNode;\n\n // add edge to inter-graph edge list\n if (this.edges.indexOf(newEdge) > -1) {\n throw \"Edge already in inter-graph edge list!\";\n }\n\n this.edges.push(newEdge);\n\n // add edge to source and target incidency lists\n if (!(newEdge.source != null && newEdge.target != null)) {\n throw \"Edge source and/or target is null!\";\n }\n\n if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) {\n throw \"Edge already in source and/or target incidency list!\";\n }\n\n newEdge.source.edges.push(newEdge);\n newEdge.target.edges.push(newEdge);\n\n return newEdge;\n }\n }\n};\n\nLGraphManager.prototype.remove = function (lObj) {\n if (lObj instanceof LGraph) {\n var graph = lObj;\n if (graph.getGraphManager() != this) {\n throw \"Graph not in this graph mgr\";\n }\n if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) {\n throw \"Invalid parent node!\";\n }\n\n // first the edges (make a copy to do it safely)\n var edgesToBeRemoved = [];\n\n edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges());\n\n var edge;\n var s = edgesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n edge = edgesToBeRemoved[i];\n graph.remove(edge);\n }\n\n // then the nodes (make a copy to do it safely)\n var nodesToBeRemoved = [];\n\n nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes());\n\n var node;\n s = nodesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n node = nodesToBeRemoved[i];\n graph.remove(node);\n }\n\n // check if graph is the root\n if (graph == this.rootGraph) {\n this.setRootGraph(null);\n }\n\n // now remove the graph itself\n var index = this.graphs.indexOf(graph);\n this.graphs.splice(index, 1);\n\n // also reset the parent of the graph\n graph.parent = null;\n } else if (lObj instanceof LEdge) {\n edge = lObj;\n if (edge == null) {\n throw \"Edge is null!\";\n }\n if (!edge.isInterGraph) {\n throw \"Not an inter-graph edge!\";\n }\n if (!(edge.source != null && edge.target != null)) {\n throw \"Source and/or target is null!\";\n }\n\n // remove edge from source and target nodes' incidency lists\n\n if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) {\n throw \"Source and/or target doesn't know this edge!\";\n }\n\n var index = edge.source.edges.indexOf(edge);\n edge.source.edges.splice(index, 1);\n index = edge.target.edges.indexOf(edge);\n edge.target.edges.splice(index, 1);\n\n // remove edge from owner graph manager's inter-graph edge list\n\n if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) {\n throw \"Edge owner graph or owner graph manager is null!\";\n }\n if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) {\n throw \"Not in owner graph manager's edge list!\";\n }\n\n var index = edge.source.owner.getGraphManager().edges.indexOf(edge);\n edge.source.owner.getGraphManager().edges.splice(index, 1);\n }\n};\n\nLGraphManager.prototype.updateBounds = function () {\n this.rootGraph.updateBounds(true);\n};\n\nLGraphManager.prototype.getGraphs = function () {\n return this.graphs;\n};\n\nLGraphManager.prototype.getAllNodes = function () {\n if (this.allNodes == null) {\n var nodeList = [];\n var graphs = this.getGraphs();\n var s = graphs.length;\n for (var i = 0; i < s; i++) {\n nodeList = nodeList.concat(graphs[i].getNodes());\n }\n this.allNodes = nodeList;\n }\n return this.allNodes;\n};\n\nLGraphManager.prototype.resetAllNodes = function () {\n this.allNodes = null;\n};\n\nLGraphManager.prototype.resetAllEdges = function () {\n this.allEdges = null;\n};\n\nLGraphManager.prototype.resetAllNodesToApplyGravitation = function () {\n this.allNodesToApplyGravitation = null;\n};\n\nLGraphManager.prototype.getAllEdges = function () {\n if (this.allEdges == null) {\n var edgeList = [];\n var graphs = this.getGraphs();\n var s = graphs.length;\n for (var i = 0; i < graphs.length; i++) {\n edgeList = edgeList.concat(graphs[i].getEdges());\n }\n\n edgeList = edgeList.concat(this.edges);\n\n this.allEdges = edgeList;\n }\n return this.allEdges;\n};\n\nLGraphManager.prototype.getAllNodesToApplyGravitation = function () {\n return this.allNodesToApplyGravitation;\n};\n\nLGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) {\n if (this.allNodesToApplyGravitation != null) {\n throw \"assert failed\";\n }\n\n this.allNodesToApplyGravitation = nodeList;\n};\n\nLGraphManager.prototype.getRoot = function () {\n return this.rootGraph;\n};\n\nLGraphManager.prototype.setRootGraph = function (graph) {\n if (graph.getGraphManager() != this) {\n throw \"Root not in this graph mgr!\";\n }\n\n this.rootGraph = graph;\n // root graph must have a root node associated with it for convenience\n if (graph.parent == null) {\n graph.parent = this.layout.newNode(\"Root node\");\n }\n};\n\nLGraphManager.prototype.getLayout = function () {\n return this.layout;\n};\n\nLGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) {\n if (!(firstNode != null && secondNode != null)) {\n throw \"assert failed\";\n }\n\n if (firstNode == secondNode) {\n return true;\n }\n // Is second node an ancestor of the first one?\n var ownerGraph = firstNode.getOwner();\n var parentNode;\n\n do {\n parentNode = ownerGraph.getParent();\n\n if (parentNode == null) {\n break;\n }\n\n if (parentNode == secondNode) {\n return true;\n }\n\n ownerGraph = parentNode.getOwner();\n if (ownerGraph == null) {\n break;\n }\n } while (true);\n // Is first node an ancestor of the second one?\n ownerGraph = secondNode.getOwner();\n\n do {\n parentNode = ownerGraph.getParent();\n\n if (parentNode == null) {\n break;\n }\n\n if (parentNode == firstNode) {\n return true;\n }\n\n ownerGraph = parentNode.getOwner();\n if (ownerGraph == null) {\n break;\n }\n } while (true);\n\n return false;\n};\n\nLGraphManager.prototype.calcLowestCommonAncestors = function () {\n var edge;\n var sourceNode;\n var targetNode;\n var sourceAncestorGraph;\n var targetAncestorGraph;\n\n var edges = this.getAllEdges();\n var s = edges.length;\n for (var i = 0; i < s; i++) {\n edge = edges[i];\n\n sourceNode = edge.source;\n targetNode = edge.target;\n edge.lca = null;\n edge.sourceInLca = sourceNode;\n edge.targetInLca = targetNode;\n\n if (sourceNode == targetNode) {\n edge.lca = sourceNode.getOwner();\n continue;\n }\n\n sourceAncestorGraph = sourceNode.getOwner();\n\n while (edge.lca == null) {\n edge.targetInLca = targetNode;\n targetAncestorGraph = targetNode.getOwner();\n\n while (edge.lca == null) {\n if (targetAncestorGraph == sourceAncestorGraph) {\n edge.lca = targetAncestorGraph;\n break;\n }\n\n if (targetAncestorGraph == this.rootGraph) {\n break;\n }\n\n if (edge.lca != null) {\n throw \"assert failed\";\n }\n edge.targetInLca = targetAncestorGraph.getParent();\n targetAncestorGraph = edge.targetInLca.getOwner();\n }\n\n if (sourceAncestorGraph == this.rootGraph) {\n break;\n }\n\n if (edge.lca == null) {\n edge.sourceInLca = sourceAncestorGraph.getParent();\n sourceAncestorGraph = edge.sourceInLca.getOwner();\n }\n }\n\n if (edge.lca == null) {\n throw \"assert failed\";\n }\n }\n};\n\nLGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) {\n if (firstNode == secondNode) {\n return firstNode.getOwner();\n }\n var firstOwnerGraph = firstNode.getOwner();\n\n do {\n if (firstOwnerGraph == null) {\n break;\n }\n var secondOwnerGraph = secondNode.getOwner();\n\n do {\n if (secondOwnerGraph == null) {\n break;\n }\n\n if (secondOwnerGraph == firstOwnerGraph) {\n return secondOwnerGraph;\n }\n secondOwnerGraph = secondOwnerGraph.getParent().getOwner();\n } while (true);\n\n firstOwnerGraph = firstOwnerGraph.getParent().getOwner();\n } while (true);\n\n return firstOwnerGraph;\n};\n\nLGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) {\n if (graph == null && depth == null) {\n graph = this.rootGraph;\n depth = 1;\n }\n var node;\n\n var nodes = graph.getNodes();\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n node = nodes[i];\n node.inclusionTreeDepth = depth;\n\n if (node.child != null) {\n this.calcInclusionTreeDepths(node.child, depth + 1);\n }\n }\n};\n\nLGraphManager.prototype.includesInvalidEdge = function () {\n var edge;\n\n var s = this.edges.length;\n for (var i = 0; i < s; i++) {\n edge = this.edges[i];\n\n if (this.isOneAncestorOfOther(edge.source, edge.target)) {\n return true;\n }\n }\n return false;\n};\n\nmodule.exports = LGraphManager;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LayoutConstants = __webpack_require__(0);\n\nfunction FDLayoutConstants() {}\n\n//FDLayoutConstants inherits static props in LayoutConstants\nfor (var prop in LayoutConstants) {\n FDLayoutConstants[prop] = LayoutConstants[prop];\n}\n\nFDLayoutConstants.MAX_ITERATIONS = 2500;\n\nFDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;\nFDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45;\nFDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0;\nFDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4;\nFDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0;\nFDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8;\nFDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5;\nFDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true;\nFDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true;\nFDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3;\nFDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33;\nFDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000;\nFDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000;\nFDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0;\nFDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3;\nFDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;\nFDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100;\nFDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1;\nFDLayoutConstants.MIN_EDGE_LENGTH = 1;\nFDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10;\n\nmodule.exports = FDLayoutConstants;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * This class maintains a list of static geometry related utility methods.\n *\n *\n * Copyright: i-Vis Research Group, Bilkent University, 2007 - present\n */\n\nvar Point = __webpack_require__(12);\n\nfunction IGeometry() {}\n\n/**\n * This method calculates *half* the amount in x and y directions of the two\n * input rectangles needed to separate them keeping their respective\n * positioning, and returns the result in the input array. An input\n * separation buffer added to the amount in both directions. We assume that\n * the two rectangles do intersect.\n */\nIGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) {\n if (!rectA.intersects(rectB)) {\n throw \"assert failed\";\n }\n\n var directions = new Array(2);\n\n this.decideDirectionsForOverlappingNodes(rectA, rectB, directions);\n\n overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x);\n overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y);\n\n // update the overlapping amounts for the following cases:\n if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) {\n /* Case x.1:\n *\n * rectA\n * \t| |\n * \t| _________ |\n * \t| | | |\n * \t|________|_______|______|\n * \t\t\t | |\n * | |\n * rectB\n */\n overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight());\n } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) {\n /* Case x.2:\n *\n * rectB\n * \t| |\n * \t| _________ |\n * \t| | | |\n * \t|________|_______|______|\n * \t\t\t | |\n * | |\n * rectA\n */\n overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight());\n }\n if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) {\n /* Case y.1:\n * ________ rectA\n * |\n * |\n * ______|____ rectB\n * | |\n * | |\n * ______|____|\n * |\n * |\n * |________\n *\n */\n overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom());\n } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) {\n /* Case y.2:\n * ________ rectB\n * |\n * |\n * ______|____ rectA\n * | |\n * | |\n * ______|____|\n * |\n * |\n * |________\n *\n */\n overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom());\n }\n\n // find slope of the line passes two centers\n var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX()));\n // if centers are overlapped\n if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) {\n // assume the slope is 1 (45 degree)\n slope = 1.0;\n }\n\n var moveByY = slope * overlapAmount[0];\n var moveByX = overlapAmount[1] / slope;\n if (overlapAmount[0] < moveByX) {\n moveByX = overlapAmount[0];\n } else {\n moveByY = overlapAmount[1];\n }\n // return half the amount so that if each rectangle is moved by these\n // amounts in opposite directions, overlap will be resolved\n overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer);\n overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer);\n};\n\n/**\n * This method decides the separation direction of overlapping nodes\n *\n * if directions[0] = -1, then rectA goes left\n * if directions[0] = 1, then rectA goes right\n * if directions[1] = -1, then rectA goes up\n * if directions[1] = 1, then rectA goes down\n */\nIGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) {\n if (rectA.getCenterX() < rectB.getCenterX()) {\n directions[0] = -1;\n } else {\n directions[0] = 1;\n }\n\n if (rectA.getCenterY() < rectB.getCenterY()) {\n directions[1] = -1;\n } else {\n directions[1] = 1;\n }\n};\n\n/**\n * This method calculates the intersection (clipping) points of the two\n * input rectangles with line segment defined by the centers of these two\n * rectangles. The clipping points are saved in the input double array and\n * whether or not the two rectangles overlap is returned.\n */\nIGeometry.getIntersection2 = function (rectA, rectB, result) {\n //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB\n var p1x = rectA.getCenterX();\n var p1y = rectA.getCenterY();\n var p2x = rectB.getCenterX();\n var p2y = rectB.getCenterY();\n\n //if two rectangles intersect, then clipping points are centers\n if (rectA.intersects(rectB)) {\n result[0] = p1x;\n result[1] = p1y;\n result[2] = p2x;\n result[3] = p2y;\n return true;\n }\n //variables for rectA\n var topLeftAx = rectA.getX();\n var topLeftAy = rectA.getY();\n var topRightAx = rectA.getRight();\n var bottomLeftAx = rectA.getX();\n var bottomLeftAy = rectA.getBottom();\n var bottomRightAx = rectA.getRight();\n var halfWidthA = rectA.getWidthHalf();\n var halfHeightA = rectA.getHeightHalf();\n //variables for rectB\n var topLeftBx = rectB.getX();\n var topLeftBy = rectB.getY();\n var topRightBx = rectB.getRight();\n var bottomLeftBx = rectB.getX();\n var bottomLeftBy = rectB.getBottom();\n var bottomRightBx = rectB.getRight();\n var halfWidthB = rectB.getWidthHalf();\n var halfHeightB = rectB.getHeightHalf();\n\n //flag whether clipping points are found\n var clipPointAFound = false;\n var clipPointBFound = false;\n\n // line is vertical\n if (p1x === p2x) {\n if (p1y > p2y) {\n result[0] = p1x;\n result[1] = topLeftAy;\n result[2] = p2x;\n result[3] = bottomLeftBy;\n return false;\n } else if (p1y < p2y) {\n result[0] = p1x;\n result[1] = bottomLeftAy;\n result[2] = p2x;\n result[3] = topLeftBy;\n return false;\n } else {\n //not line, return null;\n }\n }\n // line is horizontal\n else if (p1y === p2y) {\n if (p1x > p2x) {\n result[0] = topLeftAx;\n result[1] = p1y;\n result[2] = topRightBx;\n result[3] = p2y;\n return false;\n } else if (p1x < p2x) {\n result[0] = topRightAx;\n result[1] = p1y;\n result[2] = topLeftBx;\n result[3] = p2y;\n return false;\n } else {\n //not valid line, return null;\n }\n } else {\n //slopes of rectA's and rectB's diagonals\n var slopeA = rectA.height / rectA.width;\n var slopeB = rectB.height / rectB.width;\n\n //slope of line between center of rectA and center of rectB\n var slopePrime = (p2y - p1y) / (p2x - p1x);\n var cardinalDirectionA = void 0;\n var cardinalDirectionB = void 0;\n var tempPointAx = void 0;\n var tempPointAy = void 0;\n var tempPointBx = void 0;\n var tempPointBy = void 0;\n\n //determine whether clipping point is the corner of nodeA\n if (-slopeA === slopePrime) {\n if (p1x > p2x) {\n result[0] = bottomLeftAx;\n result[1] = bottomLeftAy;\n clipPointAFound = true;\n } else {\n result[0] = topRightAx;\n result[1] = topLeftAy;\n clipPointAFound = true;\n }\n } else if (slopeA === slopePrime) {\n if (p1x > p2x) {\n result[0] = topLeftAx;\n result[1] = topLeftAy;\n clipPointAFound = true;\n } else {\n result[0] = bottomRightAx;\n result[1] = bottomLeftAy;\n clipPointAFound = true;\n }\n }\n\n //determine whether clipping point is the corner of nodeB\n if (-slopeB === slopePrime) {\n if (p2x > p1x) {\n result[2] = bottomLeftBx;\n result[3] = bottomLeftBy;\n clipPointBFound = true;\n } else {\n result[2] = topRightBx;\n result[3] = topLeftBy;\n clipPointBFound = true;\n }\n } else if (slopeB === slopePrime) {\n if (p2x > p1x) {\n result[2] = topLeftBx;\n result[3] = topLeftBy;\n clipPointBFound = true;\n } else {\n result[2] = bottomRightBx;\n result[3] = bottomLeftBy;\n clipPointBFound = true;\n }\n }\n\n //if both clipping points are corners\n if (clipPointAFound && clipPointBFound) {\n return false;\n }\n\n //determine Cardinal Direction of rectangles\n if (p1x > p2x) {\n if (p1y > p2y) {\n cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4);\n cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2);\n } else {\n cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3);\n cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1);\n }\n } else {\n if (p1y > p2y) {\n cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1);\n cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3);\n } else {\n cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2);\n cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4);\n }\n }\n //calculate clipping Point if it is not found before\n if (!clipPointAFound) {\n switch (cardinalDirectionA) {\n case 1:\n tempPointAy = topLeftAy;\n tempPointAx = p1x + -halfHeightA / slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 2:\n tempPointAx = bottomRightAx;\n tempPointAy = p1y + halfWidthA * slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 3:\n tempPointAy = bottomLeftAy;\n tempPointAx = p1x + halfHeightA / slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 4:\n tempPointAx = bottomLeftAx;\n tempPointAy = p1y + -halfWidthA * slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n }\n }\n if (!clipPointBFound) {\n switch (cardinalDirectionB) {\n case 1:\n tempPointBy = topLeftBy;\n tempPointBx = p2x + -halfHeightB / slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 2:\n tempPointBx = bottomRightBx;\n tempPointBy = p2y + halfWidthB * slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 3:\n tempPointBy = bottomLeftBy;\n tempPointBx = p2x + halfHeightB / slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 4:\n tempPointBx = bottomLeftBx;\n tempPointBy = p2y + -halfWidthB * slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n }\n }\n }\n return false;\n};\n\n/**\n * This method returns in which cardinal direction does input point stays\n * 1: North\n * 2: East\n * 3: South\n * 4: West\n */\nIGeometry.getCardinalDirection = function (slope, slopePrime, line) {\n if (slope > slopePrime) {\n return line;\n } else {\n return 1 + line % 4;\n }\n};\n\n/**\n * This method calculates the intersection of the two lines defined by\n * point pairs (s1,s2) and (f1,f2).\n */\nIGeometry.getIntersection = function (s1, s2, f1, f2) {\n if (f2 == null) {\n return this.getIntersection2(s1, s2, f1);\n }\n\n var x1 = s1.x;\n var y1 = s1.y;\n var x2 = s2.x;\n var y2 = s2.y;\n var x3 = f1.x;\n var y3 = f1.y;\n var x4 = f2.x;\n var y4 = f2.y;\n var x = void 0,\n y = void 0; // intersection point\n var a1 = void 0,\n a2 = void 0,\n b1 = void 0,\n b2 = void 0,\n c1 = void 0,\n c2 = void 0; // coefficients of line eqns.\n var denom = void 0;\n\n a1 = y2 - y1;\n b1 = x1 - x2;\n c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 }\n\n a2 = y4 - y3;\n b2 = x3 - x4;\n c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 }\n\n denom = a1 * b2 - a2 * b1;\n\n if (denom === 0) {\n return null;\n }\n\n x = (b1 * c2 - b2 * c1) / denom;\n y = (a2 * c1 - a1 * c2) / denom;\n\n return new Point(x, y);\n};\n\n/**\n * This method finds and returns the angle of the vector from the + x-axis\n * in clockwise direction (compatible w/ Java coordinate system!).\n */\nIGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) {\n var C_angle = void 0;\n\n if (Cx !== Nx) {\n C_angle = Math.atan((Ny - Cy) / (Nx - Cx));\n\n if (Nx < Cx) {\n C_angle += Math.PI;\n } else if (Ny < Cy) {\n C_angle += this.TWO_PI;\n }\n } else if (Ny < Cy) {\n C_angle = this.ONE_AND_HALF_PI; // 270 degrees\n } else {\n C_angle = this.HALF_PI; // 90 degrees\n }\n\n return C_angle;\n};\n\n/**\n * This method checks whether the given two line segments (one with point\n * p1 and p2, the other with point p3 and p4) intersect at a point other\n * than these points.\n */\nIGeometry.doIntersect = function (p1, p2, p3, p4) {\n var a = p1.x;\n var b = p1.y;\n var c = p2.x;\n var d = p2.y;\n var p = p3.x;\n var q = p3.y;\n var r = p4.x;\n var s = p4.y;\n var det = (c - a) * (s - q) - (r - p) * (d - b);\n\n if (det === 0) {\n return false;\n } else {\n var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det;\n var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det;\n return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1;\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: Class Constants\n// -----------------------------------------------------------------------------\n/**\n * Some useful pre-calculated constants\n */\nIGeometry.HALF_PI = 0.5 * Math.PI;\nIGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI;\nIGeometry.TWO_PI = 2.0 * Math.PI;\nIGeometry.THREE_PI = 3.0 * Math.PI;\n\nmodule.exports = IGeometry;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction IMath() {}\n\n/**\n * This method returns the sign of the input value.\n */\nIMath.sign = function (value) {\n if (value > 0) {\n return 1;\n } else if (value < 0) {\n return -1;\n } else {\n return 0;\n }\n};\n\nIMath.floor = function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n};\n\nIMath.ceil = function (value) {\n return value < 0 ? Math.floor(value) : Math.ceil(value);\n};\n\nmodule.exports = IMath;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction Integer() {}\n\nInteger.MAX_VALUE = 2147483647;\nInteger.MIN_VALUE = -2147483648;\n\nmodule.exports = Integer;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar nodeFrom = function nodeFrom(value) {\n return { value: value, next: null, prev: null };\n};\n\nvar add = function add(prev, node, next, list) {\n if (prev !== null) {\n prev.next = node;\n } else {\n list.head = node;\n }\n\n if (next !== null) {\n next.prev = node;\n } else {\n list.tail = node;\n }\n\n node.prev = prev;\n node.next = next;\n\n list.length++;\n\n return node;\n};\n\nvar _remove = function _remove(node, list) {\n var prev = node.prev,\n next = node.next;\n\n\n if (prev !== null) {\n prev.next = next;\n } else {\n list.head = next;\n }\n\n if (next !== null) {\n next.prev = prev;\n } else {\n list.tail = prev;\n }\n\n node.prev = node.next = null;\n\n list.length--;\n\n return node;\n};\n\nvar LinkedList = function () {\n function LinkedList(vals) {\n var _this = this;\n\n _classCallCheck(this, LinkedList);\n\n this.length = 0;\n this.head = null;\n this.tail = null;\n\n if (vals != null) {\n vals.forEach(function (v) {\n return _this.push(v);\n });\n }\n }\n\n _createClass(LinkedList, [{\n key: \"size\",\n value: function size() {\n return this.length;\n }\n }, {\n key: \"insertBefore\",\n value: function insertBefore(val, otherNode) {\n return add(otherNode.prev, nodeFrom(val), otherNode, this);\n }\n }, {\n key: \"insertAfter\",\n value: function insertAfter(val, otherNode) {\n return add(otherNode, nodeFrom(val), otherNode.next, this);\n }\n }, {\n key: \"insertNodeBefore\",\n value: function insertNodeBefore(newNode, otherNode) {\n return add(otherNode.prev, newNode, otherNode, this);\n }\n }, {\n key: \"insertNodeAfter\",\n value: function insertNodeAfter(newNode, otherNode) {\n return add(otherNode, newNode, otherNode.next, this);\n }\n }, {\n key: \"push\",\n value: function push(val) {\n return add(this.tail, nodeFrom(val), null, this);\n }\n }, {\n key: \"unshift\",\n value: function unshift(val) {\n return add(null, nodeFrom(val), this.head, this);\n }\n }, {\n key: \"remove\",\n value: function remove(node) {\n return _remove(node, this);\n }\n }, {\n key: \"pop\",\n value: function pop() {\n return _remove(this.tail, this).value;\n }\n }, {\n key: \"popNode\",\n value: function popNode() {\n return _remove(this.tail, this);\n }\n }, {\n key: \"shift\",\n value: function shift() {\n return _remove(this.head, this).value;\n }\n }, {\n key: \"shiftNode\",\n value: function shiftNode() {\n return _remove(this.head, this);\n }\n }, {\n key: \"get_object_at\",\n value: function get_object_at(index) {\n if (index <= this.length()) {\n var i = 1;\n var current = this.head;\n while (i < index) {\n current = current.next;\n i++;\n }\n return current.value;\n }\n }\n }, {\n key: \"set_object_at\",\n value: function set_object_at(index, value) {\n if (index <= this.length()) {\n var i = 1;\n var current = this.head;\n while (i < index) {\n current = current.next;\n i++;\n }\n current.value = value;\n }\n }\n }]);\n\n return LinkedList;\n}();\n\nmodule.exports = LinkedList;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*\r\n *This class is the javascript implementation of the Point.java class in jdk\r\n */\nfunction Point(x, y, p) {\n this.x = null;\n this.y = null;\n if (x == null && y == null && p == null) {\n this.x = 0;\n this.y = 0;\n } else if (typeof x == 'number' && typeof y == 'number' && p == null) {\n this.x = x;\n this.y = y;\n } else if (x.constructor.name == 'Point' && y == null && p == null) {\n p = x;\n this.x = p.x;\n this.y = p.y;\n }\n}\n\nPoint.prototype.getX = function () {\n return this.x;\n};\n\nPoint.prototype.getY = function () {\n return this.y;\n};\n\nPoint.prototype.getLocation = function () {\n return new Point(this.x, this.y);\n};\n\nPoint.prototype.setLocation = function (x, y, p) {\n if (x.constructor.name == 'Point' && y == null && p == null) {\n p = x;\n this.setLocation(p.x, p.y);\n } else if (typeof x == 'number' && typeof y == 'number' && p == null) {\n //if both parameters are integer just move (x,y) location\n if (parseInt(x) == x && parseInt(y) == y) {\n this.move(x, y);\n } else {\n this.x = Math.floor(x + 0.5);\n this.y = Math.floor(y + 0.5);\n }\n }\n};\n\nPoint.prototype.move = function (x, y) {\n this.x = x;\n this.y = y;\n};\n\nPoint.prototype.translate = function (dx, dy) {\n this.x += dx;\n this.y += dy;\n};\n\nPoint.prototype.equals = function (obj) {\n if (obj.constructor.name == \"Point\") {\n var pt = obj;\n return this.x == pt.x && this.y == pt.y;\n }\n return this == obj;\n};\n\nPoint.prototype.toString = function () {\n return new Point().constructor.name + \"[x=\" + this.x + \",y=\" + this.y + \"]\";\n};\n\nmodule.exports = Point;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction RectangleD(x, y, width, height) {\n this.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n\n if (x != null && y != null && width != null && height != null) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n}\n\nRectangleD.prototype.getX = function () {\n return this.x;\n};\n\nRectangleD.prototype.setX = function (x) {\n this.x = x;\n};\n\nRectangleD.prototype.getY = function () {\n return this.y;\n};\n\nRectangleD.prototype.setY = function (y) {\n this.y = y;\n};\n\nRectangleD.prototype.getWidth = function () {\n return this.width;\n};\n\nRectangleD.prototype.setWidth = function (width) {\n this.width = width;\n};\n\nRectangleD.prototype.getHeight = function () {\n return this.height;\n};\n\nRectangleD.prototype.setHeight = function (height) {\n this.height = height;\n};\n\nRectangleD.prototype.getRight = function () {\n return this.x + this.width;\n};\n\nRectangleD.prototype.getBottom = function () {\n return this.y + this.height;\n};\n\nRectangleD.prototype.intersects = function (a) {\n if (this.getRight() < a.x) {\n return false;\n }\n\n if (this.getBottom() < a.y) {\n return false;\n }\n\n if (a.getRight() < this.x) {\n return false;\n }\n\n if (a.getBottom() < this.y) {\n return false;\n }\n\n return true;\n};\n\nRectangleD.prototype.getCenterX = function () {\n return this.x + this.width / 2;\n};\n\nRectangleD.prototype.getMinX = function () {\n return this.getX();\n};\n\nRectangleD.prototype.getMaxX = function () {\n return this.getX() + this.width;\n};\n\nRectangleD.prototype.getCenterY = function () {\n return this.y + this.height / 2;\n};\n\nRectangleD.prototype.getMinY = function () {\n return this.getY();\n};\n\nRectangleD.prototype.getMaxY = function () {\n return this.getY() + this.height;\n};\n\nRectangleD.prototype.getWidthHalf = function () {\n return this.width / 2;\n};\n\nRectangleD.prototype.getHeightHalf = function () {\n return this.height / 2;\n};\n\nmodule.exports = RectangleD;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction UniqueIDGeneretor() {}\n\nUniqueIDGeneretor.lastID = 0;\n\nUniqueIDGeneretor.createID = function (obj) {\n if (UniqueIDGeneretor.isPrimitive(obj)) {\n return obj;\n }\n if (obj.uniqueID != null) {\n return obj.uniqueID;\n }\n obj.uniqueID = UniqueIDGeneretor.getString();\n UniqueIDGeneretor.lastID++;\n return obj.uniqueID;\n};\n\nUniqueIDGeneretor.getString = function (id) {\n if (id == null) id = UniqueIDGeneretor.lastID;\n return \"Object#\" + id + \"\";\n};\n\nUniqueIDGeneretor.isPrimitive = function (arg) {\n var type = typeof arg === \"undefined\" ? \"undefined\" : _typeof(arg);\n return arg == null || type != \"object\" && type != \"function\";\n};\n\nmodule.exports = UniqueIDGeneretor;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar LayoutConstants = __webpack_require__(0);\nvar LGraphManager = __webpack_require__(6);\nvar LNode = __webpack_require__(3);\nvar LEdge = __webpack_require__(1);\nvar LGraph = __webpack_require__(5);\nvar PointD = __webpack_require__(4);\nvar Transform = __webpack_require__(17);\nvar Emitter = __webpack_require__(27);\n\nfunction Layout(isRemoteUse) {\n Emitter.call(this);\n\n //Layout Quality: 0:draft, 1:default, 2:proof\n this.layoutQuality = LayoutConstants.QUALITY;\n //Whether layout should create bendpoints as needed or not\n this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n //Whether layout should be incremental or not\n this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;\n //Whether we animate from before to after layout node positions\n this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;\n //Whether we animate the layout process or not\n this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;\n //Number iterations that should be done between two successive animations\n this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;\n /**\r\n * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When\r\n * they are, both spring and repulsion forces between two leaf nodes can be\r\n * calculated without the expensive clipping point calculations, resulting\r\n * in major speed-up.\r\n */\n this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;\n /**\r\n * This is used for creation of bendpoints by using dummy nodes and edges.\r\n * Maps an LEdge to its dummy bendpoint path.\r\n */\n this.edgeToDummyNodes = new Map();\n this.graphManager = new LGraphManager(this);\n this.isLayoutFinished = false;\n this.isSubLayout = false;\n this.isRemoteUse = false;\n\n if (isRemoteUse != null) {\n this.isRemoteUse = isRemoteUse;\n }\n}\n\nLayout.RANDOM_SEED = 1;\n\nLayout.prototype = Object.create(Emitter.prototype);\n\nLayout.prototype.getGraphManager = function () {\n return this.graphManager;\n};\n\nLayout.prototype.getAllNodes = function () {\n return this.graphManager.getAllNodes();\n};\n\nLayout.prototype.getAllEdges = function () {\n return this.graphManager.getAllEdges();\n};\n\nLayout.prototype.getAllNodesToApplyGravitation = function () {\n return this.graphManager.getAllNodesToApplyGravitation();\n};\n\nLayout.prototype.newGraphManager = function () {\n var gm = new LGraphManager(this);\n this.graphManager = gm;\n return gm;\n};\n\nLayout.prototype.newGraph = function (vGraph) {\n return new LGraph(null, this.graphManager, vGraph);\n};\n\nLayout.prototype.newNode = function (vNode) {\n return new LNode(this.graphManager, vNode);\n};\n\nLayout.prototype.newEdge = function (vEdge) {\n return new LEdge(null, null, vEdge);\n};\n\nLayout.prototype.checkLayoutSuccess = function () {\n return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();\n};\n\nLayout.prototype.runLayout = function () {\n this.isLayoutFinished = false;\n\n if (this.tilingPreLayout) {\n this.tilingPreLayout();\n }\n\n this.initParameters();\n var isLayoutSuccessfull;\n\n if (this.checkLayoutSuccess()) {\n isLayoutSuccessfull = false;\n } else {\n isLayoutSuccessfull = this.layout();\n }\n\n if (LayoutConstants.ANIMATE === 'during') {\n // If this is a 'during' layout animation. Layout is not finished yet. \n // We need to perform these in index.js when layout is really finished.\n return false;\n }\n\n if (isLayoutSuccessfull) {\n if (!this.isSubLayout) {\n this.doPostLayout();\n }\n }\n\n if (this.tilingPostLayout) {\n this.tilingPostLayout();\n }\n\n this.isLayoutFinished = true;\n\n return isLayoutSuccessfull;\n};\n\n/**\r\n * This method performs the operations required after layout.\r\n */\nLayout.prototype.doPostLayout = function () {\n //assert !isSubLayout : \"Should not be called on sub-layout!\";\n // Propagate geometric changes to v-level objects\n if (!this.incremental) {\n this.transform();\n }\n this.update();\n};\n\n/**\r\n * This method updates the geometry of the target graph according to\r\n * calculated layout.\r\n */\nLayout.prototype.update2 = function () {\n // update bend points\n if (this.createBendsAsNeeded) {\n this.createBendpointsFromDummyNodes();\n\n // reset all edges, since the topology has changed\n this.graphManager.resetAllEdges();\n }\n\n // perform edge, node and root updates if layout is not called\n // remotely\n if (!this.isRemoteUse) {\n // update all edges\n var edge;\n var allEdges = this.graphManager.getAllEdges();\n for (var i = 0; i < allEdges.length; i++) {\n edge = allEdges[i];\n // this.update(edge);\n }\n\n // recursively update nodes\n var node;\n var nodes = this.graphManager.getRoot().getNodes();\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n // this.update(node);\n }\n\n // update root graph\n this.update(this.graphManager.getRoot());\n }\n};\n\nLayout.prototype.update = function (obj) {\n if (obj == null) {\n this.update2();\n } else if (obj instanceof LNode) {\n var node = obj;\n if (node.getChild() != null) {\n // since node is compound, recursively update child nodes\n var nodes = node.getChild().getNodes();\n for (var i = 0; i < nodes.length; i++) {\n update(nodes[i]);\n }\n }\n\n // if the l-level node is associated with a v-level graph object,\n // then it is assumed that the v-level node implements the\n // interface Updatable.\n if (node.vGraphObject != null) {\n // cast to Updatable without any type check\n var vNode = node.vGraphObject;\n\n // call the update method of the interface\n vNode.update(node);\n }\n } else if (obj instanceof LEdge) {\n var edge = obj;\n // if the l-level edge is associated with a v-level graph object,\n // then it is assumed that the v-level edge implements the\n // interface Updatable.\n\n if (edge.vGraphObject != null) {\n // cast to Updatable without any type check\n var vEdge = edge.vGraphObject;\n\n // call the update method of the interface\n vEdge.update(edge);\n }\n } else if (obj instanceof LGraph) {\n var graph = obj;\n // if the l-level graph is associated with a v-level graph object,\n // then it is assumed that the v-level object implements the\n // interface Updatable.\n\n if (graph.vGraphObject != null) {\n // cast to Updatable without any type check\n var vGraph = graph.vGraphObject;\n\n // call the update method of the interface\n vGraph.update(graph);\n }\n }\n};\n\n/**\r\n * This method is used to set all layout parameters to default values\r\n * determined at compile time.\r\n */\nLayout.prototype.initParameters = function () {\n if (!this.isSubLayout) {\n this.layoutQuality = LayoutConstants.QUALITY;\n this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;\n this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;\n this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;\n this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;\n this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;\n }\n\n if (this.animationDuringLayout) {\n this.animationOnLayout = false;\n }\n};\n\nLayout.prototype.transform = function (newLeftTop) {\n if (newLeftTop == undefined) {\n this.transform(new PointD(0, 0));\n } else {\n // create a transformation object (from Eclipse to layout). When an\n // inverse transform is applied, we get upper-left coordinate of the\n // drawing or the root graph at given input coordinate (some margins\n // already included in calculation of left-top).\n\n var trans = new Transform();\n var leftTop = this.graphManager.getRoot().updateLeftTop();\n\n if (leftTop != null) {\n trans.setWorldOrgX(newLeftTop.x);\n trans.setWorldOrgY(newLeftTop.y);\n\n trans.setDeviceOrgX(leftTop.x);\n trans.setDeviceOrgY(leftTop.y);\n\n var nodes = this.getAllNodes();\n var node;\n\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n node.transform(trans);\n }\n }\n }\n};\n\nLayout.prototype.positionNodesRandomly = function (graph) {\n\n if (graph == undefined) {\n //assert !this.incremental;\n this.positionNodesRandomly(this.getGraphManager().getRoot());\n this.getGraphManager().getRoot().updateBounds(true);\n } else {\n var lNode;\n var childGraph;\n\n var nodes = graph.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n lNode = nodes[i];\n childGraph = lNode.getChild();\n\n if (childGraph == null) {\n lNode.scatter();\n } else if (childGraph.getNodes().length == 0) {\n lNode.scatter();\n } else {\n this.positionNodesRandomly(childGraph);\n lNode.updateBounds();\n }\n }\n }\n};\n\n/**\r\n * This method returns a list of trees where each tree is represented as a\r\n * list of l-nodes. The method returns a list of size 0 when:\r\n * - The graph is not flat or\r\n * - One of the component(s) of the graph is not a tree.\r\n */\nLayout.prototype.getFlatForest = function () {\n var flatForest = [];\n var isForest = true;\n\n // Quick reference for all nodes in the graph manager associated with\n // this layout. The list should not be changed.\n var allNodes = this.graphManager.getRoot().getNodes();\n\n // First be sure that the graph is flat\n var isFlat = true;\n\n for (var i = 0; i < allNodes.length; i++) {\n if (allNodes[i].getChild() != null) {\n isFlat = false;\n }\n }\n\n // Return empty forest if the graph is not flat.\n if (!isFlat) {\n return flatForest;\n }\n\n // Run BFS for each component of the graph.\n\n var visited = new Set();\n var toBeVisited = [];\n var parents = new Map();\n var unProcessedNodes = [];\n\n unProcessedNodes = unProcessedNodes.concat(allNodes);\n\n // Each iteration of this loop finds a component of the graph and\n // decides whether it is a tree or not. If it is a tree, adds it to the\n // forest and continued with the next component.\n\n while (unProcessedNodes.length > 0 && isForest) {\n toBeVisited.push(unProcessedNodes[0]);\n\n // Start the BFS. Each iteration of this loop visits a node in a\n // BFS manner.\n while (toBeVisited.length > 0 && isForest) {\n //pool operation\n var currentNode = toBeVisited[0];\n toBeVisited.splice(0, 1);\n visited.add(currentNode);\n\n // Traverse all neighbors of this node\n var neighborEdges = currentNode.getEdges();\n\n for (var i = 0; i < neighborEdges.length; i++) {\n var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode);\n\n // If BFS is not growing from this neighbor.\n if (parents.get(currentNode) != currentNeighbor) {\n // We haven't previously visited this neighbor.\n if (!visited.has(currentNeighbor)) {\n toBeVisited.push(currentNeighbor);\n parents.set(currentNeighbor, currentNode);\n }\n // Since we have previously visited this neighbor and\n // this neighbor is not parent of currentNode, given\n // graph contains a component that is not tree, hence\n // it is not a forest.\n else {\n isForest = false;\n break;\n }\n }\n }\n }\n\n // The graph contains a component that is not a tree. Empty\n // previously found trees. The method will end.\n if (!isForest) {\n flatForest = [];\n }\n // Save currently visited nodes as a tree in our forest. Reset\n // visited and parents lists. Continue with the next component of\n // the graph, if any.\n else {\n var temp = [].concat(_toConsumableArray(visited));\n flatForest.push(temp);\n //flatForest = flatForest.concat(temp);\n //unProcessedNodes.removeAll(visited);\n for (var i = 0; i < temp.length; i++) {\n var value = temp[i];\n var index = unProcessedNodes.indexOf(value);\n if (index > -1) {\n unProcessedNodes.splice(index, 1);\n }\n }\n visited = new Set();\n parents = new Map();\n }\n }\n\n return flatForest;\n};\n\n/**\r\n * This method creates dummy nodes (an l-level node with minimal dimensions)\r\n * for the given edge (one per bendpoint). The existing l-level structure\r\n * is updated accordingly.\r\n */\nLayout.prototype.createDummyNodesForBendpoints = function (edge) {\n var dummyNodes = [];\n var prev = edge.source;\n\n var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target);\n\n for (var i = 0; i < edge.bendpoints.length; i++) {\n // create new dummy node\n var dummyNode = this.newNode(null);\n dummyNode.setRect(new Point(0, 0), new Dimension(1, 1));\n\n graph.add(dummyNode);\n\n // create new dummy edge between prev and dummy node\n var dummyEdge = this.newEdge(null);\n this.graphManager.add(dummyEdge, prev, dummyNode);\n\n dummyNodes.add(dummyNode);\n prev = dummyNode;\n }\n\n var dummyEdge = this.newEdge(null);\n this.graphManager.add(dummyEdge, prev, edge.target);\n\n this.edgeToDummyNodes.set(edge, dummyNodes);\n\n // remove real edge from graph manager if it is inter-graph\n if (edge.isInterGraph()) {\n this.graphManager.remove(edge);\n }\n // else, remove the edge from the current graph\n else {\n graph.remove(edge);\n }\n\n return dummyNodes;\n};\n\n/**\r\n * This method creates bendpoints for edges from the dummy nodes\r\n * at l-level.\r\n */\nLayout.prototype.createBendpointsFromDummyNodes = function () {\n var edges = [];\n edges = edges.concat(this.graphManager.getAllEdges());\n edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges);\n\n for (var k = 0; k < edges.length; k++) {\n var lEdge = edges[k];\n\n if (lEdge.bendpoints.length > 0) {\n var path = this.edgeToDummyNodes.get(lEdge);\n\n for (var i = 0; i < path.length; i++) {\n var dummyNode = path[i];\n var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY());\n\n // update bendpoint's location according to dummy node\n var ebp = lEdge.bendpoints.get(i);\n ebp.x = p.x;\n ebp.y = p.y;\n\n // remove the dummy node, dummy edges incident with this\n // dummy node is also removed (within the remove method)\n dummyNode.getOwner().remove(dummyNode);\n }\n\n // add the real edge to graph\n this.graphManager.add(lEdge, lEdge.source, lEdge.target);\n }\n }\n};\n\nLayout.transform = function (sliderValue, defaultValue, minDiv, maxMul) {\n if (minDiv != undefined && maxMul != undefined) {\n var value = defaultValue;\n\n if (sliderValue <= 50) {\n var minValue = defaultValue / minDiv;\n value -= (defaultValue - minValue) / 50 * (50 - sliderValue);\n } else {\n var maxValue = defaultValue * maxMul;\n value += (maxValue - defaultValue) / 50 * (sliderValue - 50);\n }\n\n return value;\n } else {\n var a, b;\n\n if (sliderValue <= 50) {\n a = 9.0 * defaultValue / 500.0;\n b = defaultValue / 10.0;\n } else {\n a = 9.0 * defaultValue / 50.0;\n b = -8 * defaultValue;\n }\n\n return a * sliderValue + b;\n }\n};\n\n/**\r\n * This method finds and returns the center of the given nodes, assuming\r\n * that the given nodes form a tree in themselves.\r\n */\nLayout.findCenterOfTree = function (nodes) {\n var list = [];\n list = list.concat(nodes);\n\n var removedNodes = [];\n var remainingDegrees = new Map();\n var foundCenter = false;\n var centerNode = null;\n\n if (list.length == 1 || list.length == 2) {\n foundCenter = true;\n centerNode = list[0];\n }\n\n for (var i = 0; i < list.length; i++) {\n var node = list[i];\n var degree = node.getNeighborsList().size;\n remainingDegrees.set(node, node.getNeighborsList().size);\n\n if (degree == 1) {\n removedNodes.push(node);\n }\n }\n\n var tempList = [];\n tempList = tempList.concat(removedNodes);\n\n while (!foundCenter) {\n var tempList2 = [];\n tempList2 = tempList2.concat(tempList);\n tempList = [];\n\n for (var i = 0; i < list.length; i++) {\n var node = list[i];\n\n var index = list.indexOf(node);\n if (index >= 0) {\n list.splice(index, 1);\n }\n\n var neighbours = node.getNeighborsList();\n\n neighbours.forEach(function (neighbour) {\n if (removedNodes.indexOf(neighbour) < 0) {\n var otherDegree = remainingDegrees.get(neighbour);\n var newDegree = otherDegree - 1;\n\n if (newDegree == 1) {\n tempList.push(neighbour);\n }\n\n remainingDegrees.set(neighbour, newDegree);\n }\n });\n }\n\n removedNodes = removedNodes.concat(tempList);\n\n if (list.length == 1 || list.length == 2) {\n foundCenter = true;\n centerNode = list[0];\n }\n }\n\n return centerNode;\n};\n\n/**\r\n * During the coarsening process, this layout may be referenced by two graph managers\r\n * this setter function grants access to change the currently being used graph manager\r\n */\nLayout.prototype.setGraphManager = function (gm) {\n this.graphManager = gm;\n};\n\nmodule.exports = Layout;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction RandomSeed() {}\n// adapted from: https://stackoverflow.com/a/19303725\nRandomSeed.seed = 1;\nRandomSeed.x = 0;\n\nRandomSeed.nextDouble = function () {\n RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000;\n return RandomSeed.x - Math.floor(RandomSeed.x);\n};\n\nmodule.exports = RandomSeed;\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PointD = __webpack_require__(4);\n\nfunction Transform(x, y) {\n this.lworldOrgX = 0.0;\n this.lworldOrgY = 0.0;\n this.ldeviceOrgX = 0.0;\n this.ldeviceOrgY = 0.0;\n this.lworldExtX = 1.0;\n this.lworldExtY = 1.0;\n this.ldeviceExtX = 1.0;\n this.ldeviceExtY = 1.0;\n}\n\nTransform.prototype.getWorldOrgX = function () {\n return this.lworldOrgX;\n};\n\nTransform.prototype.setWorldOrgX = function (wox) {\n this.lworldOrgX = wox;\n};\n\nTransform.prototype.getWorldOrgY = function () {\n return this.lworldOrgY;\n};\n\nTransform.prototype.setWorldOrgY = function (woy) {\n this.lworldOrgY = woy;\n};\n\nTransform.prototype.getWorldExtX = function () {\n return this.lworldExtX;\n};\n\nTransform.prototype.setWorldExtX = function (wex) {\n this.lworldExtX = wex;\n};\n\nTransform.prototype.getWorldExtY = function () {\n return this.lworldExtY;\n};\n\nTransform.prototype.setWorldExtY = function (wey) {\n this.lworldExtY = wey;\n};\n\n/* Device related */\n\nTransform.prototype.getDeviceOrgX = function () {\n return this.ldeviceOrgX;\n};\n\nTransform.prototype.setDeviceOrgX = function (dox) {\n this.ldeviceOrgX = dox;\n};\n\nTransform.prototype.getDeviceOrgY = function () {\n return this.ldeviceOrgY;\n};\n\nTransform.prototype.setDeviceOrgY = function (doy) {\n this.ldeviceOrgY = doy;\n};\n\nTransform.prototype.getDeviceExtX = function () {\n return this.ldeviceExtX;\n};\n\nTransform.prototype.setDeviceExtX = function (dex) {\n this.ldeviceExtX = dex;\n};\n\nTransform.prototype.getDeviceExtY = function () {\n return this.ldeviceExtY;\n};\n\nTransform.prototype.setDeviceExtY = function (dey) {\n this.ldeviceExtY = dey;\n};\n\nTransform.prototype.transformX = function (x) {\n var xDevice = 0.0;\n var worldExtX = this.lworldExtX;\n if (worldExtX != 0.0) {\n xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX;\n }\n\n return xDevice;\n};\n\nTransform.prototype.transformY = function (y) {\n var yDevice = 0.0;\n var worldExtY = this.lworldExtY;\n if (worldExtY != 0.0) {\n yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY;\n }\n\n return yDevice;\n};\n\nTransform.prototype.inverseTransformX = function (x) {\n var xWorld = 0.0;\n var deviceExtX = this.ldeviceExtX;\n if (deviceExtX != 0.0) {\n xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX;\n }\n\n return xWorld;\n};\n\nTransform.prototype.inverseTransformY = function (y) {\n var yWorld = 0.0;\n var deviceExtY = this.ldeviceExtY;\n if (deviceExtY != 0.0) {\n yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY;\n }\n return yWorld;\n};\n\nTransform.prototype.inverseTransformPoint = function (inPoint) {\n var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y));\n return outPoint;\n};\n\nmodule.exports = Transform;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar Layout = __webpack_require__(15);\nvar FDLayoutConstants = __webpack_require__(7);\nvar LayoutConstants = __webpack_require__(0);\nvar IGeometry = __webpack_require__(8);\nvar IMath = __webpack_require__(9);\n\nfunction FDLayout() {\n Layout.call(this);\n\n this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;\n this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\n this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;\n this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;\n this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;\n this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;\n this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;\n this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;\n this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;\n this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n this.totalDisplacement = 0.0;\n this.oldTotalDisplacement = 0.0;\n this.maxIterations = FDLayoutConstants.MAX_ITERATIONS;\n}\n\nFDLayout.prototype = Object.create(Layout.prototype);\n\nfor (var prop in Layout) {\n FDLayout[prop] = Layout[prop];\n}\n\nFDLayout.prototype.initParameters = function () {\n Layout.prototype.initParameters.call(this, arguments);\n\n this.totalIterations = 0;\n this.notAnimatedIterations = 0;\n\n this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION;\n\n this.grid = [];\n};\n\nFDLayout.prototype.calcIdealEdgeLengths = function () {\n var edge;\n var lcaDepth;\n var source;\n var target;\n var sizeOfSourceInLca;\n var sizeOfTargetInLca;\n\n var allEdges = this.getGraphManager().getAllEdges();\n for (var i = 0; i < allEdges.length; i++) {\n edge = allEdges[i];\n\n edge.idealLength = this.idealEdgeLength;\n\n if (edge.isInterGraph) {\n source = edge.getSource();\n target = edge.getTarget();\n\n sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize();\n sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize();\n\n if (this.useSmartIdealEdgeLengthCalculation) {\n edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE;\n }\n\n lcaDepth = edge.getLca().getInclusionTreeDepth();\n\n edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth);\n }\n }\n};\n\nFDLayout.prototype.initSpringEmbedder = function () {\n\n var s = this.getAllNodes().length;\n if (this.incremental) {\n if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {\n this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));\n }\n this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL;\n } else {\n if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {\n this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));\n } else {\n this.coolingFactor = 1.0;\n }\n this.initialCoolingFactor = this.coolingFactor;\n this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT;\n }\n\n this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations);\n\n this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length;\n\n this.repulsionRange = this.calcRepulsionRange();\n};\n\nFDLayout.prototype.calcSpringForces = function () {\n var lEdges = this.getAllEdges();\n var edge;\n\n for (var i = 0; i < lEdges.length; i++) {\n edge = lEdges[i];\n\n this.calcSpringForce(edge, edge.idealLength);\n }\n};\n\nFDLayout.prototype.calcRepulsionForces = function () {\n var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var i, j;\n var nodeA, nodeB;\n var lNodes = this.getAllNodes();\n var processedNodeSet;\n\n if (this.useFRGridVariant) {\n if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) {\n this.updateGrid();\n }\n\n processedNodeSet = new Set();\n\n // calculate repulsion forces between each nodes and its surrounding\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate);\n processedNodeSet.add(nodeA);\n }\n } else {\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n\n for (j = i + 1; j < lNodes.length; j++) {\n nodeB = lNodes[j];\n\n // If both nodes are not members of the same graph, skip.\n if (nodeA.getOwner() != nodeB.getOwner()) {\n continue;\n }\n\n this.calcRepulsionForce(nodeA, nodeB);\n }\n }\n }\n};\n\nFDLayout.prototype.calcGravitationalForces = function () {\n var node;\n var lNodes = this.getAllNodesToApplyGravitation();\n\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n this.calcGravitationalForce(node);\n }\n};\n\nFDLayout.prototype.moveNodes = function () {\n var lNodes = this.getAllNodes();\n var node;\n\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n node.move();\n }\n};\n\nFDLayout.prototype.calcSpringForce = function (edge, idealLength) {\n var sourceNode = edge.getSource();\n var targetNode = edge.getTarget();\n\n var length;\n var springForce;\n var springForceX;\n var springForceY;\n\n // Update edge length\n if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) {\n edge.updateLengthSimple();\n } else {\n edge.updateLength();\n\n if (edge.isOverlapingSourceAndTarget) {\n return;\n }\n }\n\n length = edge.getLength();\n\n if (length == 0) return;\n\n // Calculate spring forces\n springForce = this.springConstant * (length - idealLength);\n\n // Project force onto x and y axes\n springForceX = springForce * (edge.lengthX / length);\n springForceY = springForce * (edge.lengthY / length);\n\n // Apply forces on the end nodes\n sourceNode.springForceX += springForceX;\n sourceNode.springForceY += springForceY;\n targetNode.springForceX -= springForceX;\n targetNode.springForceY -= springForceY;\n};\n\nFDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) {\n var rectA = nodeA.getRect();\n var rectB = nodeB.getRect();\n var overlapAmount = new Array(2);\n var clipPoints = new Array(4);\n var distanceX;\n var distanceY;\n var distanceSquared;\n var distance;\n var repulsionForce;\n var repulsionForceX;\n var repulsionForceY;\n\n if (rectA.intersects(rectB)) // two nodes overlap\n {\n // calculate separation amount in x and y directions\n IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0);\n\n repulsionForceX = 2 * overlapAmount[0];\n repulsionForceY = 2 * overlapAmount[1];\n\n var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren);\n\n // Apply forces on the two nodes\n nodeA.repulsionForceX -= childrenConstant * repulsionForceX;\n nodeA.repulsionForceY -= childrenConstant * repulsionForceY;\n nodeB.repulsionForceX += childrenConstant * repulsionForceX;\n nodeB.repulsionForceY += childrenConstant * repulsionForceY;\n } else // no overlap\n {\n // calculate distance\n\n if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers\n {\n distanceX = rectB.getCenterX() - rectA.getCenterX();\n distanceY = rectB.getCenterY() - rectA.getCenterY();\n } else // use clipping points\n {\n IGeometry.getIntersection(rectA, rectB, clipPoints);\n\n distanceX = clipPoints[2] - clipPoints[0];\n distanceY = clipPoints[3] - clipPoints[1];\n }\n\n // No repulsion range. FR grid variant should take care of this.\n if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) {\n distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST;\n }\n\n if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) {\n distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST;\n }\n\n distanceSquared = distanceX * distanceX + distanceY * distanceY;\n distance = Math.sqrt(distanceSquared);\n\n repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared;\n\n // Project force onto x and y axes\n repulsionForceX = repulsionForce * distanceX / distance;\n repulsionForceY = repulsionForce * distanceY / distance;\n\n // Apply forces on the two nodes \n nodeA.repulsionForceX -= repulsionForceX;\n nodeA.repulsionForceY -= repulsionForceY;\n nodeB.repulsionForceX += repulsionForceX;\n nodeB.repulsionForceY += repulsionForceY;\n }\n};\n\nFDLayout.prototype.calcGravitationalForce = function (node) {\n var ownerGraph;\n var ownerCenterX;\n var ownerCenterY;\n var distanceX;\n var distanceY;\n var absDistanceX;\n var absDistanceY;\n var estimatedSize;\n ownerGraph = node.getOwner();\n\n ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2;\n ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2;\n distanceX = node.getCenterX() - ownerCenterX;\n distanceY = node.getCenterY() - ownerCenterY;\n absDistanceX = Math.abs(distanceX) + node.getWidth() / 2;\n absDistanceY = Math.abs(distanceY) + node.getHeight() / 2;\n\n if (node.getOwner() == this.graphManager.getRoot()) // in the root graph\n {\n estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor;\n\n if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {\n node.gravitationForceX = -this.gravityConstant * distanceX;\n node.gravitationForceY = -this.gravityConstant * distanceY;\n }\n } else // inside a compound\n {\n estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor;\n\n if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {\n node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant;\n node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant;\n }\n }\n};\n\nFDLayout.prototype.isConverged = function () {\n var converged;\n var oscilating = false;\n\n if (this.totalIterations > this.maxIterations / 3) {\n oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2;\n }\n\n converged = this.totalDisplacement < this.totalDisplacementThreshold;\n\n this.oldTotalDisplacement = this.totalDisplacement;\n\n return converged || oscilating;\n};\n\nFDLayout.prototype.animate = function () {\n if (this.animationDuringLayout && !this.isSubLayout) {\n if (this.notAnimatedIterations == this.animationPeriod) {\n this.update();\n this.notAnimatedIterations = 0;\n } else {\n this.notAnimatedIterations++;\n }\n }\n};\n\n//This method calculates the number of children (weight) for all nodes\nFDLayout.prototype.calcNoOfChildrenForAllNodes = function () {\n var node;\n var allNodes = this.graphManager.getAllNodes();\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n node.noOfChildren = node.getNoOfChildren();\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: FR-Grid Variant Repulsion Force Calculation\n// -----------------------------------------------------------------------------\n\nFDLayout.prototype.calcGrid = function (graph) {\n\n var sizeX = 0;\n var sizeY = 0;\n\n sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange));\n sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange));\n\n var grid = new Array(sizeX);\n\n for (var i = 0; i < sizeX; i++) {\n grid[i] = new Array(sizeY);\n }\n\n for (var i = 0; i < sizeX; i++) {\n for (var j = 0; j < sizeY; j++) {\n grid[i][j] = new Array();\n }\n }\n\n return grid;\n};\n\nFDLayout.prototype.addNodeToGrid = function (v, left, top) {\n\n var startX = 0;\n var finishX = 0;\n var startY = 0;\n var finishY = 0;\n\n startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange));\n finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange));\n startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange));\n finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange));\n\n for (var i = startX; i <= finishX; i++) {\n for (var j = startY; j <= finishY; j++) {\n this.grid[i][j].push(v);\n v.setGridCoordinates(startX, finishX, startY, finishY);\n }\n }\n};\n\nFDLayout.prototype.updateGrid = function () {\n var i;\n var nodeA;\n var lNodes = this.getAllNodes();\n\n this.grid = this.calcGrid(this.graphManager.getRoot());\n\n // put all nodes to proper grid cells\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());\n }\n};\n\nFDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) {\n\n if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) {\n var surrounding = new Set();\n nodeA.surrounding = new Array();\n var nodeB;\n var grid = this.grid;\n\n for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) {\n for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) {\n if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) {\n for (var k = 0; k < grid[i][j].length; k++) {\n nodeB = grid[i][j][k];\n\n // If both nodes are not members of the same graph, \n // or both nodes are the same, skip.\n if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) {\n continue;\n }\n\n // check if the repulsion force between\n // nodeA and nodeB has already been calculated\n if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) {\n var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2);\n var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2);\n\n // if the distance between nodeA and nodeB \n // is less then calculation range\n if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) {\n //then add nodeB to surrounding of nodeA\n surrounding.add(nodeB);\n }\n }\n }\n }\n }\n }\n\n nodeA.surrounding = [].concat(_toConsumableArray(surrounding));\n }\n for (i = 0; i < nodeA.surrounding.length; i++) {\n this.calcRepulsionForce(nodeA, nodeA.surrounding[i]);\n }\n};\n\nFDLayout.prototype.calcRepulsionRange = function () {\n return 0.0;\n};\n\nmodule.exports = FDLayout;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LEdge = __webpack_require__(1);\nvar FDLayoutConstants = __webpack_require__(7);\n\nfunction FDLayoutEdge(source, target, vEdge) {\n LEdge.call(this, source, target, vEdge);\n this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\n}\n\nFDLayoutEdge.prototype = Object.create(LEdge.prototype);\n\nfor (var prop in LEdge) {\n FDLayoutEdge[prop] = LEdge[prop];\n}\n\nmodule.exports = FDLayoutEdge;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LNode = __webpack_require__(3);\n\nfunction FDLayoutNode(gm, loc, size, vNode) {\n // alternative constructor is handled inside LNode\n LNode.call(this, gm, loc, size, vNode);\n //Spring, repulsion and gravitational forces acting on this node\n this.springForceX = 0;\n this.springForceY = 0;\n this.repulsionForceX = 0;\n this.repulsionForceY = 0;\n this.gravitationForceX = 0;\n this.gravitationForceY = 0;\n //Amount by which this node is to be moved in this iteration\n this.displacementX = 0;\n this.displacementY = 0;\n\n //Start and finish grid coordinates that this node is fallen into\n this.startX = 0;\n this.finishX = 0;\n this.startY = 0;\n this.finishY = 0;\n\n //Geometric neighbors of this node\n this.surrounding = [];\n}\n\nFDLayoutNode.prototype = Object.create(LNode.prototype);\n\nfor (var prop in LNode) {\n FDLayoutNode[prop] = LNode[prop];\n}\n\nFDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) {\n this.startX = _startX;\n this.finishX = _finishX;\n this.startY = _startY;\n this.finishY = _finishY;\n};\n\nmodule.exports = FDLayoutNode;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction DimensionD(width, height) {\n this.width = 0;\n this.height = 0;\n if (width !== null && height !== null) {\n this.height = height;\n this.width = width;\n }\n}\n\nDimensionD.prototype.getWidth = function () {\n return this.width;\n};\n\nDimensionD.prototype.setWidth = function (width) {\n this.width = width;\n};\n\nDimensionD.prototype.getHeight = function () {\n return this.height;\n};\n\nDimensionD.prototype.setHeight = function (height) {\n this.height = height;\n};\n\nmodule.exports = DimensionD;\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar UniqueIDGeneretor = __webpack_require__(14);\n\nfunction HashMap() {\n this.map = {};\n this.keys = [];\n}\n\nHashMap.prototype.put = function (key, value) {\n var theId = UniqueIDGeneretor.createID(key);\n if (!this.contains(theId)) {\n this.map[theId] = value;\n this.keys.push(key);\n }\n};\n\nHashMap.prototype.contains = function (key) {\n var theId = UniqueIDGeneretor.createID(key);\n return this.map[key] != null;\n};\n\nHashMap.prototype.get = function (key) {\n var theId = UniqueIDGeneretor.createID(key);\n return this.map[theId];\n};\n\nHashMap.prototype.keySet = function () {\n return this.keys;\n};\n\nmodule.exports = HashMap;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar UniqueIDGeneretor = __webpack_require__(14);\n\nfunction HashSet() {\n this.set = {};\n}\n;\n\nHashSet.prototype.add = function (obj) {\n var theId = UniqueIDGeneretor.createID(obj);\n if (!this.contains(theId)) this.set[theId] = obj;\n};\n\nHashSet.prototype.remove = function (obj) {\n delete this.set[UniqueIDGeneretor.createID(obj)];\n};\n\nHashSet.prototype.clear = function () {\n this.set = {};\n};\n\nHashSet.prototype.contains = function (obj) {\n return this.set[UniqueIDGeneretor.createID(obj)] == obj;\n};\n\nHashSet.prototype.isEmpty = function () {\n return this.size() === 0;\n};\n\nHashSet.prototype.size = function () {\n return Object.keys(this.set).length;\n};\n\n//concats this.set to the given list\nHashSet.prototype.addAllTo = function (list) {\n var keys = Object.keys(this.set);\n var length = keys.length;\n for (var i = 0; i < length; i++) {\n list.push(this.set[keys[i]]);\n }\n};\n\nHashSet.prototype.size = function () {\n return Object.keys(this.set).length;\n};\n\nHashSet.prototype.addAll = function (list) {\n var s = list.length;\n for (var i = 0; i < s; i++) {\n var v = list[i];\n this.add(v);\n }\n};\n\nmodule.exports = HashSet;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * A classic Quicksort algorithm with Hoare's partition\n * - Works also on LinkedList objects\n *\n * Copyright: i-Vis Research Group, Bilkent University, 2007 - present\n */\n\nvar LinkedList = __webpack_require__(11);\n\nvar Quicksort = function () {\n function Quicksort(A, compareFunction) {\n _classCallCheck(this, Quicksort);\n\n if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction;\n\n var length = void 0;\n if (A instanceof LinkedList) length = A.size();else length = A.length;\n\n this._quicksort(A, 0, length - 1);\n }\n\n _createClass(Quicksort, [{\n key: '_quicksort',\n value: function _quicksort(A, p, r) {\n if (p < r) {\n var q = this._partition(A, p, r);\n this._quicksort(A, p, q);\n this._quicksort(A, q + 1, r);\n }\n }\n }, {\n key: '_partition',\n value: function _partition(A, p, r) {\n var x = this._get(A, p);\n var i = p;\n var j = r;\n while (true) {\n while (this.compareFunction(x, this._get(A, j))) {\n j--;\n }while (this.compareFunction(this._get(A, i), x)) {\n i++;\n }if (i < j) {\n this._swap(A, i, j);\n i++;\n j--;\n } else return j;\n }\n }\n }, {\n key: '_get',\n value: function _get(object, index) {\n if (object instanceof LinkedList) return object.get_object_at(index);else return object[index];\n }\n }, {\n key: '_set',\n value: function _set(object, index, value) {\n if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value;\n }\n }, {\n key: '_swap',\n value: function _swap(A, i, j) {\n var temp = this._get(A, i);\n this._set(A, i, this._get(A, j));\n this._set(A, j, temp);\n }\n }, {\n key: '_defaultCompareFunction',\n value: function _defaultCompareFunction(a, b) {\n return b > a;\n }\n }]);\n\n return Quicksort;\n}();\n\nmodule.exports = Quicksort;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string\n * sequences by S.B.Needleman and C.D.Wunsch (1970).\n *\n * Aside from the inputs, you can assign the scores for,\n * - Match: The two characters at the current index are same.\n * - Mismatch: The two characters at the current index are different.\n * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string.\n */\n\nvar NeedlemanWunsch = function () {\n function NeedlemanWunsch(sequence1, sequence2) {\n var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1;\n var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;\n\n _classCallCheck(this, NeedlemanWunsch);\n\n this.sequence1 = sequence1;\n this.sequence2 = sequence2;\n this.match_score = match_score;\n this.mismatch_penalty = mismatch_penalty;\n this.gap_penalty = gap_penalty;\n\n // Just the remove redundancy\n this.iMax = sequence1.length + 1;\n this.jMax = sequence2.length + 1;\n\n // Grid matrix of scores\n this.grid = new Array(this.iMax);\n for (var i = 0; i < this.iMax; i++) {\n this.grid[i] = new Array(this.jMax);\n\n for (var j = 0; j < this.jMax; j++) {\n this.grid[i][j] = 0;\n }\n }\n\n // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions)\n this.tracebackGrid = new Array(this.iMax);\n for (var _i = 0; _i < this.iMax; _i++) {\n this.tracebackGrid[_i] = new Array(this.jMax);\n\n for (var _j = 0; _j < this.jMax; _j++) {\n this.tracebackGrid[_i][_j] = [null, null, null];\n }\n }\n\n // The aligned sequences (return multiple possibilities)\n this.alignments = [];\n\n // Final alignment score\n this.score = -1;\n\n // Calculate scores and tracebacks\n this.computeGrids();\n }\n\n _createClass(NeedlemanWunsch, [{\n key: \"getScore\",\n value: function getScore() {\n return this.score;\n }\n }, {\n key: \"getAlignments\",\n value: function getAlignments() {\n return this.alignments;\n }\n\n // Main dynamic programming procedure\n\n }, {\n key: \"computeGrids\",\n value: function computeGrids() {\n // Fill in the first row\n for (var j = 1; j < this.jMax; j++) {\n this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty;\n this.tracebackGrid[0][j] = [false, false, true];\n }\n\n // Fill in the first column\n for (var i = 1; i < this.iMax; i++) {\n this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty;\n this.tracebackGrid[i][0] = [false, true, false];\n }\n\n // Fill the rest of the grid\n for (var _i2 = 1; _i2 < this.iMax; _i2++) {\n for (var _j2 = 1; _j2 < this.jMax; _j2++) {\n // Find the max score(s) among [`Diag`, `Up`, `Left`]\n var diag = void 0;\n if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty;\n\n var up = this.grid[_i2 - 1][_j2] + this.gap_penalty;\n var left = this.grid[_i2][_j2 - 1] + this.gap_penalty;\n\n // If there exists multiple max values, capture them for multiple paths\n var maxOf = [diag, up, left];\n var indices = this.arrayAllMaxIndexes(maxOf);\n\n // Update Grids\n this.grid[_i2][_j2] = maxOf[indices[0]];\n this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)];\n }\n }\n\n // Update alignment score\n this.score = this.grid[this.iMax - 1][this.jMax - 1];\n }\n\n // Gets all possible valid sequence combinations\n\n }, {\n key: \"alignmentTraceback\",\n value: function alignmentTraceback() {\n var inProcessAlignments = [];\n\n inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length],\n seq1: \"\",\n seq2: \"\"\n });\n\n while (inProcessAlignments[0]) {\n var current = inProcessAlignments[0];\n var directions = this.tracebackGrid[current.pos[0]][current.pos[1]];\n\n if (directions[0]) {\n inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1],\n seq1: this.sequence1[current.pos[0] - 1] + current.seq1,\n seq2: this.sequence2[current.pos[1] - 1] + current.seq2\n });\n }\n if (directions[1]) {\n inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]],\n seq1: this.sequence1[current.pos[0] - 1] + current.seq1,\n seq2: '-' + current.seq2\n });\n }\n if (directions[2]) {\n inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1],\n seq1: '-' + current.seq1,\n seq2: this.sequence2[current.pos[1] - 1] + current.seq2\n });\n }\n\n if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1,\n sequence2: current.seq2\n });\n\n inProcessAlignments.shift();\n }\n\n return this.alignments;\n }\n\n // Helper Functions\n\n }, {\n key: \"getAllIndexes\",\n value: function getAllIndexes(arr, val) {\n var indexes = [],\n i = -1;\n while ((i = arr.indexOf(val, i + 1)) !== -1) {\n indexes.push(i);\n }\n return indexes;\n }\n }, {\n key: \"arrayAllMaxIndexes\",\n value: function arrayAllMaxIndexes(array) {\n return this.getAllIndexes(array, Math.max.apply(null, array));\n }\n }]);\n\n return NeedlemanWunsch;\n}();\n\nmodule.exports = NeedlemanWunsch;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar layoutBase = function layoutBase() {\n return;\n};\n\nlayoutBase.FDLayout = __webpack_require__(18);\nlayoutBase.FDLayoutConstants = __webpack_require__(7);\nlayoutBase.FDLayoutEdge = __webpack_require__(19);\nlayoutBase.FDLayoutNode = __webpack_require__(20);\nlayoutBase.DimensionD = __webpack_require__(21);\nlayoutBase.HashMap = __webpack_require__(22);\nlayoutBase.HashSet = __webpack_require__(23);\nlayoutBase.IGeometry = __webpack_require__(8);\nlayoutBase.IMath = __webpack_require__(9);\nlayoutBase.Integer = __webpack_require__(10);\nlayoutBase.Point = __webpack_require__(12);\nlayoutBase.PointD = __webpack_require__(4);\nlayoutBase.RandomSeed = __webpack_require__(16);\nlayoutBase.RectangleD = __webpack_require__(13);\nlayoutBase.Transform = __webpack_require__(17);\nlayoutBase.UniqueIDGeneretor = __webpack_require__(14);\nlayoutBase.Quicksort = __webpack_require__(24);\nlayoutBase.LinkedList = __webpack_require__(11);\nlayoutBase.LGraphObject = __webpack_require__(2);\nlayoutBase.LGraph = __webpack_require__(5);\nlayoutBase.LEdge = __webpack_require__(1);\nlayoutBase.LGraphManager = __webpack_require__(6);\nlayoutBase.LNode = __webpack_require__(3);\nlayoutBase.Layout = __webpack_require__(15);\nlayoutBase.LayoutConstants = __webpack_require__(0);\nlayoutBase.NeedlemanWunsch = __webpack_require__(25);\n\nmodule.exports = layoutBase;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction Emitter() {\n this.listeners = [];\n}\n\nvar p = Emitter.prototype;\n\np.addListener = function (event, callback) {\n this.listeners.push({\n event: event,\n callback: callback\n });\n};\n\np.removeListener = function (event, callback) {\n for (var i = this.listeners.length; i >= 0; i--) {\n var l = this.listeners[i];\n\n if (l.event === event && l.callback === callback) {\n this.listeners.splice(i, 1);\n }\n }\n};\n\np.emit = function (event, data) {\n for (var i = 0; i < this.listeners.length; i++) {\n var l = this.listeners[i];\n\n if (event === l.event) {\n l.callback(data);\n }\n }\n};\n\nmodule.exports = Emitter;\n\n/***/ })\n/******/ ]);\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"layout-base\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"layout-base\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"coseBase\"] = factory(require(\"layout-base\"));\n\telse\n\t\troot[\"coseBase\"] = factory(root[\"layoutBase\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar FDLayoutConstants = __webpack_require__(0).FDLayoutConstants;\n\nfunction CoSEConstants() {}\n\n//CoSEConstants inherits static props in FDLayoutConstants\nfor (var prop in FDLayoutConstants) {\n CoSEConstants[prop] = FDLayoutConstants[prop];\n}\n\nCoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false;\nCoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\nCoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60;\nCoSEConstants.TILE = true;\nCoSEConstants.TILING_PADDING_VERTICAL = 10;\nCoSEConstants.TILING_PADDING_HORIZONTAL = 10;\nCoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; // make this true when cose is used incrementally as a part of other non-incremental layout\n\nmodule.exports = CoSEConstants;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar FDLayoutEdge = __webpack_require__(0).FDLayoutEdge;\n\nfunction CoSEEdge(source, target, vEdge) {\n FDLayoutEdge.call(this, source, target, vEdge);\n}\n\nCoSEEdge.prototype = Object.create(FDLayoutEdge.prototype);\nfor (var prop in FDLayoutEdge) {\n CoSEEdge[prop] = FDLayoutEdge[prop];\n}\n\nmodule.exports = CoSEEdge;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraph = __webpack_require__(0).LGraph;\n\nfunction CoSEGraph(parent, graphMgr, vGraph) {\n LGraph.call(this, parent, graphMgr, vGraph);\n}\n\nCoSEGraph.prototype = Object.create(LGraph.prototype);\nfor (var prop in LGraph) {\n CoSEGraph[prop] = LGraph[prop];\n}\n\nmodule.exports = CoSEGraph;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphManager = __webpack_require__(0).LGraphManager;\n\nfunction CoSEGraphManager(layout) {\n LGraphManager.call(this, layout);\n}\n\nCoSEGraphManager.prototype = Object.create(LGraphManager.prototype);\nfor (var prop in LGraphManager) {\n CoSEGraphManager[prop] = LGraphManager[prop];\n}\n\nmodule.exports = CoSEGraphManager;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar FDLayoutNode = __webpack_require__(0).FDLayoutNode;\nvar IMath = __webpack_require__(0).IMath;\n\nfunction CoSENode(gm, loc, size, vNode) {\n FDLayoutNode.call(this, gm, loc, size, vNode);\n}\n\nCoSENode.prototype = Object.create(FDLayoutNode.prototype);\nfor (var prop in FDLayoutNode) {\n CoSENode[prop] = FDLayoutNode[prop];\n}\n\nCoSENode.prototype.move = function () {\n var layout = this.graphManager.getLayout();\n this.displacementX = layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren;\n this.displacementY = layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren;\n\n if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) {\n this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX);\n }\n\n if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) {\n this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY);\n }\n\n // a simple node, just move it\n if (this.child == null) {\n this.moveBy(this.displacementX, this.displacementY);\n }\n // an empty compound node, again just move it\n else if (this.child.getNodes().length == 0) {\n this.moveBy(this.displacementX, this.displacementY);\n }\n // non-empty compound node, propogate movement to children as well\n else {\n this.propogateDisplacementToChildren(this.displacementX, this.displacementY);\n }\n\n layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY);\n\n this.springForceX = 0;\n this.springForceY = 0;\n this.repulsionForceX = 0;\n this.repulsionForceY = 0;\n this.gravitationForceX = 0;\n this.gravitationForceY = 0;\n this.displacementX = 0;\n this.displacementY = 0;\n};\n\nCoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) {\n var nodes = this.getChild().getNodes();\n var node;\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n if (node.getChild() == null) {\n node.moveBy(dX, dY);\n node.displacementX += dX;\n node.displacementY += dY;\n } else {\n node.propogateDisplacementToChildren(dX, dY);\n }\n }\n};\n\nCoSENode.prototype.setPred1 = function (pred1) {\n this.pred1 = pred1;\n};\n\nCoSENode.prototype.getPred1 = function () {\n return pred1;\n};\n\nCoSENode.prototype.getPred2 = function () {\n return pred2;\n};\n\nCoSENode.prototype.setNext = function (next) {\n this.next = next;\n};\n\nCoSENode.prototype.getNext = function () {\n return next;\n};\n\nCoSENode.prototype.setProcessed = function (processed) {\n this.processed = processed;\n};\n\nCoSENode.prototype.isProcessed = function () {\n return processed;\n};\n\nmodule.exports = CoSENode;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar FDLayout = __webpack_require__(0).FDLayout;\nvar CoSEGraphManager = __webpack_require__(4);\nvar CoSEGraph = __webpack_require__(3);\nvar CoSENode = __webpack_require__(5);\nvar CoSEEdge = __webpack_require__(2);\nvar CoSEConstants = __webpack_require__(1);\nvar FDLayoutConstants = __webpack_require__(0).FDLayoutConstants;\nvar LayoutConstants = __webpack_require__(0).LayoutConstants;\nvar Point = __webpack_require__(0).Point;\nvar PointD = __webpack_require__(0).PointD;\nvar Layout = __webpack_require__(0).Layout;\nvar Integer = __webpack_require__(0).Integer;\nvar IGeometry = __webpack_require__(0).IGeometry;\nvar LGraph = __webpack_require__(0).LGraph;\nvar Transform = __webpack_require__(0).Transform;\n\nfunction CoSELayout() {\n FDLayout.call(this);\n\n this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled\n}\n\nCoSELayout.prototype = Object.create(FDLayout.prototype);\n\nfor (var prop in FDLayout) {\n CoSELayout[prop] = FDLayout[prop];\n}\n\nCoSELayout.prototype.newGraphManager = function () {\n var gm = new CoSEGraphManager(this);\n this.graphManager = gm;\n return gm;\n};\n\nCoSELayout.prototype.newGraph = function (vGraph) {\n return new CoSEGraph(null, this.graphManager, vGraph);\n};\n\nCoSELayout.prototype.newNode = function (vNode) {\n return new CoSENode(this.graphManager, vNode);\n};\n\nCoSELayout.prototype.newEdge = function (vEdge) {\n return new CoSEEdge(null, null, vEdge);\n};\n\nCoSELayout.prototype.initParameters = function () {\n FDLayout.prototype.initParameters.call(this, arguments);\n if (!this.isSubLayout) {\n if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) {\n this.idealEdgeLength = 10;\n } else {\n this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH;\n }\n\n this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;\n this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;\n this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;\n this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;\n this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;\n this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;\n this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;\n\n // variables for tree reduction support\n this.prunedNodesAll = [];\n this.growTreeIterations = 0;\n this.afterGrowthIterations = 0;\n this.isTreeGrowing = false;\n this.isGrowthFinished = false;\n\n // variables for cooling\n this.coolingCycle = 0;\n this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD;\n this.finalTemperature = FDLayoutConstants.CONVERGENCE_CHECK_PERIOD / this.maxIterations;\n this.coolingAdjuster = 1;\n }\n};\n\nCoSELayout.prototype.layout = function () {\n var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n if (createBendsAsNeeded) {\n this.createBendpoints();\n this.graphManager.resetAllEdges();\n }\n\n this.level = 0;\n return this.classicLayout();\n};\n\nCoSELayout.prototype.classicLayout = function () {\n this.nodesWithGravity = this.calculateNodesToApplyGravitationTo();\n this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity);\n this.calcNoOfChildrenForAllNodes();\n this.graphManager.calcLowestCommonAncestors();\n this.graphManager.calcInclusionTreeDepths();\n this.graphManager.getRoot().calcEstimatedSize();\n this.calcIdealEdgeLengths();\n\n if (!this.incremental) {\n var forest = this.getFlatForest();\n\n // The graph associated with this layout is flat and a forest\n if (forest.length > 0) {\n this.positionNodesRadially(forest);\n }\n // The graph associated with this layout is not flat or a forest\n else {\n // Reduce the trees when incremental mode is not enabled and graph is not a forest \n this.reduceTrees();\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n\n this.positionNodesRandomly();\n }\n } else {\n if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) {\n // Reduce the trees in incremental mode if only this constant is set to true \n this.reduceTrees();\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n }\n }\n\n this.initSpringEmbedder();\n this.runSpringEmbedder();\n\n return true;\n};\n\nCoSELayout.prototype.tick = function () {\n this.totalIterations++;\n\n if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) {\n if (this.prunedNodesAll.length > 0) {\n this.isTreeGrowing = true;\n } else {\n return true;\n }\n }\n\n if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {\n if (this.isConverged()) {\n if (this.prunedNodesAll.length > 0) {\n this.isTreeGrowing = true;\n } else {\n return true;\n }\n }\n\n this.coolingCycle++;\n\n if (this.layoutQuality == 0) {\n // quality - \"draft\"\n this.coolingAdjuster = this.coolingCycle;\n } else if (this.layoutQuality == 1) {\n // quality - \"default\"\n this.coolingAdjuster = this.coolingCycle / 3;\n }\n\n // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3\n this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature);\n this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));\n }\n // Operations while tree is growing again \n if (this.isTreeGrowing) {\n if (this.growTreeIterations % 10 == 0) {\n if (this.prunedNodesAll.length > 0) {\n this.graphManager.updateBounds();\n this.updateGrid();\n this.growTree(this.prunedNodesAll);\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n\n this.graphManager.updateBounds();\n this.updateGrid();\n this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n } else {\n this.isTreeGrowing = false;\n this.isGrowthFinished = true;\n }\n }\n this.growTreeIterations++;\n }\n // Operations after growth is finished\n if (this.isGrowthFinished) {\n if (this.isConverged()) {\n return true;\n }\n if (this.afterGrowthIterations % 10 == 0) {\n this.graphManager.updateBounds();\n this.updateGrid();\n }\n this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100);\n this.afterGrowthIterations++;\n }\n\n var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished;\n var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;\n\n this.totalDisplacement = 0;\n this.graphManager.updateBounds();\n this.calcSpringForces();\n this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate);\n this.calcGravitationalForces();\n this.moveNodes();\n this.animate();\n\n return false; // Layout is not ended yet return false\n};\n\nCoSELayout.prototype.getPositionsData = function () {\n var allNodes = this.graphManager.getAllNodes();\n var pData = {};\n for (var i = 0; i < allNodes.length; i++) {\n var rect = allNodes[i].rect;\n var id = allNodes[i].id;\n pData[id] = {\n id: id,\n x: rect.getCenterX(),\n y: rect.getCenterY(),\n w: rect.width,\n h: rect.height\n };\n }\n\n return pData;\n};\n\nCoSELayout.prototype.runSpringEmbedder = function () {\n this.initialAnimationPeriod = 25;\n this.animationPeriod = this.initialAnimationPeriod;\n var layoutEnded = false;\n\n // If aminate option is 'during' signal that layout is supposed to start iterating\n if (FDLayoutConstants.ANIMATE === 'during') {\n this.emit('layoutstarted');\n } else {\n // If aminate option is 'during' tick() function will be called on index.js\n while (!layoutEnded) {\n layoutEnded = this.tick();\n }\n\n this.graphManager.updateBounds();\n }\n};\n\nCoSELayout.prototype.calculateNodesToApplyGravitationTo = function () {\n var nodeList = [];\n var graph;\n\n var graphs = this.graphManager.getGraphs();\n var size = graphs.length;\n var i;\n for (i = 0; i < size; i++) {\n graph = graphs[i];\n\n graph.updateConnected();\n\n if (!graph.isConnected) {\n nodeList = nodeList.concat(graph.getNodes());\n }\n }\n\n return nodeList;\n};\n\nCoSELayout.prototype.createBendpoints = function () {\n var edges = [];\n edges = edges.concat(this.graphManager.getAllEdges());\n var visited = new Set();\n var i;\n for (i = 0; i < edges.length; i++) {\n var edge = edges[i];\n\n if (!visited.has(edge)) {\n var source = edge.getSource();\n var target = edge.getTarget();\n\n if (source == target) {\n edge.getBendpoints().push(new PointD());\n edge.getBendpoints().push(new PointD());\n this.createDummyNodesForBendpoints(edge);\n visited.add(edge);\n } else {\n var edgeList = [];\n\n edgeList = edgeList.concat(source.getEdgeListToNode(target));\n edgeList = edgeList.concat(target.getEdgeListToNode(source));\n\n if (!visited.has(edgeList[0])) {\n if (edgeList.length > 1) {\n var k;\n for (k = 0; k < edgeList.length; k++) {\n var multiEdge = edgeList[k];\n multiEdge.getBendpoints().push(new PointD());\n this.createDummyNodesForBendpoints(multiEdge);\n }\n }\n edgeList.forEach(function (edge) {\n visited.add(edge);\n });\n }\n }\n }\n\n if (visited.size == edges.length) {\n break;\n }\n }\n};\n\nCoSELayout.prototype.positionNodesRadially = function (forest) {\n // We tile the trees to a grid row by row; first tree starts at (0,0)\n var currentStartingPoint = new Point(0, 0);\n var numberOfColumns = Math.ceil(Math.sqrt(forest.length));\n var height = 0;\n var currentY = 0;\n var currentX = 0;\n var point = new PointD(0, 0);\n\n for (var i = 0; i < forest.length; i++) {\n if (i % numberOfColumns == 0) {\n // Start of a new row, make the x coordinate 0, increment the\n // y coordinate with the max height of the previous row\n currentX = 0;\n currentY = height;\n\n if (i != 0) {\n currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION;\n }\n\n height = 0;\n }\n\n var tree = forest[i];\n\n // Find the center of the tree\n var centerNode = Layout.findCenterOfTree(tree);\n\n // Set the staring point of the next tree\n currentStartingPoint.x = currentX;\n currentStartingPoint.y = currentY;\n\n // Do a radial layout starting with the center\n point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint);\n\n if (point.y > height) {\n height = Math.floor(point.y);\n }\n\n currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION);\n }\n\n this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2));\n};\n\nCoSELayout.radialLayout = function (tree, centerNode, startingPoint) {\n var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION);\n CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep);\n var bounds = LGraph.calculateBounds(tree);\n\n var transform = new Transform();\n transform.setDeviceOrgX(bounds.getMinX());\n transform.setDeviceOrgY(bounds.getMinY());\n transform.setWorldOrgX(startingPoint.x);\n transform.setWorldOrgY(startingPoint.y);\n\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n node.transform(transform);\n }\n\n var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY());\n\n return transform.inverseTransformPoint(bottomRight);\n};\n\nCoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) {\n // First, position this node by finding its angle.\n var halfInterval = (endAngle - startAngle + 1) / 2;\n\n if (halfInterval < 0) {\n halfInterval += 180;\n }\n\n var nodeAngle = (halfInterval + startAngle) % 360;\n var teta = nodeAngle * IGeometry.TWO_PI / 360;\n\n // Make polar to java cordinate conversion.\n var cos_teta = Math.cos(teta);\n var x_ = distance * Math.cos(teta);\n var y_ = distance * Math.sin(teta);\n\n node.setCenter(x_, y_);\n\n // Traverse all neighbors of this node and recursively call this\n // function.\n var neighborEdges = [];\n neighborEdges = neighborEdges.concat(node.getEdges());\n var childCount = neighborEdges.length;\n\n if (parentOfNode != null) {\n childCount--;\n }\n\n var branchCount = 0;\n\n var incEdgesCount = neighborEdges.length;\n var startIndex;\n\n var edges = node.getEdgesBetween(parentOfNode);\n\n // If there are multiple edges, prune them until there remains only one\n // edge.\n while (edges.length > 1) {\n //neighborEdges.remove(edges.remove(0));\n var temp = edges[0];\n edges.splice(0, 1);\n var index = neighborEdges.indexOf(temp);\n if (index >= 0) {\n neighborEdges.splice(index, 1);\n }\n incEdgesCount--;\n childCount--;\n }\n\n if (parentOfNode != null) {\n //assert edges.length == 1;\n startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount;\n } else {\n startIndex = 0;\n }\n\n var stepAngle = Math.abs(endAngle - startAngle) / childCount;\n\n for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) {\n var currentNeighbor = neighborEdges[i].getOtherEnd(node);\n\n // Don't back traverse to root node in current tree.\n if (currentNeighbor == parentOfNode) {\n continue;\n }\n\n var childStartAngle = (startAngle + branchCount * stepAngle) % 360;\n var childEndAngle = (childStartAngle + stepAngle) % 360;\n\n CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation);\n\n branchCount++;\n }\n};\n\nCoSELayout.maxDiagonalInTree = function (tree) {\n var maxDiagonal = Integer.MIN_VALUE;\n\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n var diagonal = node.getDiagonal();\n\n if (diagonal > maxDiagonal) {\n maxDiagonal = diagonal;\n }\n }\n\n return maxDiagonal;\n};\n\nCoSELayout.prototype.calcRepulsionRange = function () {\n // formula is 2 x (level + 1) x idealEdgeLength\n return 2 * (this.level + 1) * this.idealEdgeLength;\n};\n\n// Tiling methods\n\n// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's\nCoSELayout.prototype.groupZeroDegreeMembers = function () {\n var self = this;\n // array of [parent_id x oneDegreeNode_id]\n var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members\n this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled\n this.idToDummyNode = {}; // A map of id to dummy node \n\n var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled\n var allNodes = this.graphManager.getAllNodes();\n\n // Fill zero degree list\n for (var i = 0; i < allNodes.length; i++) {\n var node = allNodes[i];\n var parent = node.getParent();\n // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list\n if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) {\n zeroDegree.push(node);\n }\n }\n\n // Create a map of parent node and its zero degree members\n for (var i = 0; i < zeroDegree.length; i++) {\n var node = zeroDegree[i]; // Zero degree node itself\n var p_id = node.getParent().id; // Parent id\n\n if (typeof tempMemberGroups[p_id] === \"undefined\") tempMemberGroups[p_id] = [];\n\n tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups\n }\n\n // If there are at least two nodes at a level, create a dummy compound for them\n Object.keys(tempMemberGroups).forEach(function (p_id) {\n if (tempMemberGroups[p_id].length > 1) {\n var dummyCompoundId = \"DummyCompound_\" + p_id; // The id of dummy compound which will be created soon\n self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups\n\n var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound\n\n // Create a dummy compound with calculated id\n var dummyCompound = new CoSENode(self.graphManager);\n dummyCompound.id = dummyCompoundId;\n dummyCompound.paddingLeft = parent.paddingLeft || 0;\n dummyCompound.paddingRight = parent.paddingRight || 0;\n dummyCompound.paddingBottom = parent.paddingBottom || 0;\n dummyCompound.paddingTop = parent.paddingTop || 0;\n\n self.idToDummyNode[dummyCompoundId] = dummyCompound;\n\n var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound);\n var parentGraph = parent.getChild();\n\n // Add dummy compound to parent the graph\n parentGraph.add(dummyCompound);\n\n // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent\n for (var i = 0; i < tempMemberGroups[p_id].length; i++) {\n var node = tempMemberGroups[p_id][i];\n\n parentGraph.remove(node);\n dummyParentGraph.add(node);\n }\n }\n });\n};\n\nCoSELayout.prototype.clearCompounds = function () {\n var childGraphMap = {};\n var idToNode = {};\n\n // Get compound ordering by finding the inner one first\n this.performDFSOnCompounds();\n\n for (var i = 0; i < this.compoundOrder.length; i++) {\n\n idToNode[this.compoundOrder[i].id] = this.compoundOrder[i];\n childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes());\n\n // Remove children of compounds\n this.graphManager.remove(this.compoundOrder[i].getChild());\n this.compoundOrder[i].child = null;\n }\n\n this.graphManager.resetAllNodes();\n\n // Tile the removed children\n this.tileCompoundMembers(childGraphMap, idToNode);\n};\n\nCoSELayout.prototype.clearZeroDegreeMembers = function () {\n var self = this;\n var tiledZeroDegreePack = this.tiledZeroDegreePack = [];\n\n Object.keys(this.memberGroups).forEach(function (id) {\n var compoundNode = self.idToDummyNode[id]; // Get the dummy compound\n\n tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight);\n\n // Set the width and height of the dummy compound as calculated\n compoundNode.rect.width = tiledZeroDegreePack[id].width;\n compoundNode.rect.height = tiledZeroDegreePack[id].height;\n });\n};\n\nCoSELayout.prototype.repopulateCompounds = function () {\n for (var i = this.compoundOrder.length - 1; i >= 0; i--) {\n var lCompoundNode = this.compoundOrder[i];\n var id = lCompoundNode.id;\n var horizontalMargin = lCompoundNode.paddingLeft;\n var verticalMargin = lCompoundNode.paddingTop;\n\n this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin);\n }\n};\n\nCoSELayout.prototype.repopulateZeroDegreeMembers = function () {\n var self = this;\n var tiledPack = this.tiledZeroDegreePack;\n\n Object.keys(tiledPack).forEach(function (id) {\n var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id\n var horizontalMargin = compoundNode.paddingLeft;\n var verticalMargin = compoundNode.paddingTop;\n\n // Adjust the positions of nodes wrt its compound\n self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin);\n });\n};\n\nCoSELayout.prototype.getToBeTiled = function (node) {\n var id = node.id;\n //firstly check the previous results\n if (this.toBeTiled[id] != null) {\n return this.toBeTiled[id];\n }\n\n //only compound nodes are to be tiled\n var childGraph = node.getChild();\n if (childGraph == null) {\n this.toBeTiled[id] = false;\n return false;\n }\n\n var children = childGraph.getNodes(); // Get the children nodes\n\n //a compound node is not to be tiled if all of its compound children are not to be tiled\n for (var i = 0; i < children.length; i++) {\n var theChild = children[i];\n\n if (this.getNodeDegree(theChild) > 0) {\n this.toBeTiled[id] = false;\n return false;\n }\n\n //pass the children not having the compound structure\n if (theChild.getChild() == null) {\n this.toBeTiled[theChild.id] = false;\n continue;\n }\n\n if (!this.getToBeTiled(theChild)) {\n this.toBeTiled[id] = false;\n return false;\n }\n }\n this.toBeTiled[id] = true;\n return true;\n};\n\n// Get degree of a node depending of its edges and independent of its children\nCoSELayout.prototype.getNodeDegree = function (node) {\n var id = node.id;\n var edges = node.getEdges();\n var degree = 0;\n\n // For the edges connected\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n if (edge.getSource().id !== edge.getTarget().id) {\n degree = degree + 1;\n }\n }\n return degree;\n};\n\n// Get degree of a node with its children\nCoSELayout.prototype.getNodeDegreeWithChildren = function (node) {\n var degree = this.getNodeDegree(node);\n if (node.getChild() == null) {\n return degree;\n }\n var children = node.getChild().getNodes();\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n degree += this.getNodeDegreeWithChildren(child);\n }\n return degree;\n};\n\nCoSELayout.prototype.performDFSOnCompounds = function () {\n this.compoundOrder = [];\n this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());\n};\n\nCoSELayout.prototype.fillCompexOrderByDFS = function (children) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.getChild() != null) {\n this.fillCompexOrderByDFS(child.getChild().getNodes());\n }\n if (this.getToBeTiled(child)) {\n this.compoundOrder.push(child);\n }\n }\n};\n\n/**\n* This method places each zero degree member wrt given (x,y) coordinates (top left).\n*/\nCoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin) {\n x += compoundHorizontalMargin;\n y += compoundVerticalMargin;\n\n var left = x;\n\n for (var i = 0; i < organization.rows.length; i++) {\n var row = organization.rows[i];\n x = left;\n var maxHeight = 0;\n\n for (var j = 0; j < row.length; j++) {\n var lnode = row[j];\n\n lnode.rect.x = x; // + lnode.rect.width / 2;\n lnode.rect.y = y; // + lnode.rect.height / 2;\n\n x += lnode.rect.width + organization.horizontalPadding;\n\n if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height;\n }\n\n y += maxHeight + organization.verticalPadding;\n }\n};\n\nCoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) {\n var self = this;\n this.tiledMemberPack = [];\n\n Object.keys(childGraphMap).forEach(function (id) {\n // Get the compound node\n var compoundNode = idToNode[id];\n\n self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight);\n\n compoundNode.rect.width = self.tiledMemberPack[id].width;\n compoundNode.rect.height = self.tiledMemberPack[id].height;\n });\n};\n\nCoSELayout.prototype.tileNodes = function (nodes, minWidth) {\n var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;\n var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;\n var organization = {\n rows: [],\n rowWidth: [],\n rowHeight: [],\n width: 0,\n height: minWidth, // assume minHeight equals to minWidth\n verticalPadding: verticalPadding,\n horizontalPadding: horizontalPadding\n };\n\n // Sort the nodes in ascending order of their areas\n nodes.sort(function (n1, n2) {\n if (n1.rect.width * n1.rect.height > n2.rect.width * n2.rect.height) return -1;\n if (n1.rect.width * n1.rect.height < n2.rect.width * n2.rect.height) return 1;\n return 0;\n });\n\n // Create the organization -> tile members\n for (var i = 0; i < nodes.length; i++) {\n var lNode = nodes[i];\n\n if (organization.rows.length == 0) {\n this.insertNodeToRow(organization, lNode, 0, minWidth);\n } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) {\n this.insertNodeToRow(organization, lNode, this.getShortestRowIndex(organization), minWidth);\n } else {\n this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth);\n }\n\n this.shiftToLastRow(organization);\n }\n\n return organization;\n};\n\nCoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) {\n var minCompoundSize = minWidth;\n\n // Add new row if needed\n if (rowIndex == organization.rows.length) {\n var secondDimension = [];\n\n organization.rows.push(secondDimension);\n organization.rowWidth.push(minCompoundSize);\n organization.rowHeight.push(0);\n }\n\n // Update row width\n var w = organization.rowWidth[rowIndex] + node.rect.width;\n\n if (organization.rows[rowIndex].length > 0) {\n w += organization.horizontalPadding;\n }\n\n organization.rowWidth[rowIndex] = w;\n // Update compound width\n if (organization.width < w) {\n organization.width = w;\n }\n\n // Update height\n var h = node.rect.height;\n if (rowIndex > 0) h += organization.verticalPadding;\n\n var extraHeight = 0;\n if (h > organization.rowHeight[rowIndex]) {\n extraHeight = organization.rowHeight[rowIndex];\n organization.rowHeight[rowIndex] = h;\n extraHeight = organization.rowHeight[rowIndex] - extraHeight;\n }\n\n organization.height += extraHeight;\n\n // Insert node\n organization.rows[rowIndex].push(node);\n};\n\n//Scans the rows of an organization and returns the one with the min width\nCoSELayout.prototype.getShortestRowIndex = function (organization) {\n var r = -1;\n var min = Number.MAX_VALUE;\n\n for (var i = 0; i < organization.rows.length; i++) {\n if (organization.rowWidth[i] < min) {\n r = i;\n min = organization.rowWidth[i];\n }\n }\n return r;\n};\n\n//Scans the rows of an organization and returns the one with the max width\nCoSELayout.prototype.getLongestRowIndex = function (organization) {\n var r = -1;\n var max = Number.MIN_VALUE;\n\n for (var i = 0; i < organization.rows.length; i++) {\n\n if (organization.rowWidth[i] > max) {\n r = i;\n max = organization.rowWidth[i];\n }\n }\n\n return r;\n};\n\n/**\n* This method checks whether adding extra width to the organization violates\n* the aspect ratio(1) or not.\n*/\nCoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) {\n\n var sri = this.getShortestRowIndex(organization);\n\n if (sri < 0) {\n return true;\n }\n\n var min = organization.rowWidth[sri];\n\n if (min + organization.horizontalPadding + extraWidth <= organization.width) return true;\n\n var hDiff = 0;\n\n // Adding to an existing row\n if (organization.rowHeight[sri] < extraHeight) {\n if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri];\n }\n\n var add_to_row_ratio;\n if (organization.width - min >= extraWidth + organization.horizontalPadding) {\n add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding);\n } else {\n add_to_row_ratio = (organization.height + hDiff) / organization.width;\n }\n\n // Adding a new row for this node\n hDiff = extraHeight + organization.verticalPadding;\n var add_new_row_ratio;\n if (organization.width < extraWidth) {\n add_new_row_ratio = (organization.height + hDiff) / extraWidth;\n } else {\n add_new_row_ratio = (organization.height + hDiff) / organization.width;\n }\n\n if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio;\n\n if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio;\n\n return add_to_row_ratio < add_new_row_ratio;\n};\n\n//If moving the last node from the longest row and adding it to the last\n//row makes the bounding box smaller, do it.\nCoSELayout.prototype.shiftToLastRow = function (organization) {\n var longest = this.getLongestRowIndex(organization);\n var last = organization.rowWidth.length - 1;\n var row = organization.rows[longest];\n var node = row[row.length - 1];\n\n var diff = node.width + organization.horizontalPadding;\n\n // Check if there is enough space on the last row\n if (organization.width - organization.rowWidth[last] > diff && longest != last) {\n // Remove the last element of the longest row\n row.splice(-1, 1);\n\n // Push it to the last row\n organization.rows[last].push(node);\n\n organization.rowWidth[longest] = organization.rowWidth[longest] - diff;\n organization.rowWidth[last] = organization.rowWidth[last] + diff;\n organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)];\n\n // Update heights of the organization\n var maxHeight = Number.MIN_VALUE;\n for (var i = 0; i < row.length; i++) {\n if (row[i].height > maxHeight) maxHeight = row[i].height;\n }\n if (longest > 0) maxHeight += organization.verticalPadding;\n\n var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last];\n\n organization.rowHeight[longest] = maxHeight;\n if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding;\n\n var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last];\n organization.height += finalTotal - prevTotal;\n\n this.shiftToLastRow(organization);\n }\n};\n\nCoSELayout.prototype.tilingPreLayout = function () {\n if (CoSEConstants.TILE) {\n // Find zero degree nodes and create a compound for each level\n this.groupZeroDegreeMembers();\n // Tile and clear children of each compound\n this.clearCompounds();\n // Separately tile and clear zero degree nodes for each level\n this.clearZeroDegreeMembers();\n }\n};\n\nCoSELayout.prototype.tilingPostLayout = function () {\n if (CoSEConstants.TILE) {\n this.repopulateZeroDegreeMembers();\n this.repopulateCompounds();\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: Tree Reduction methods\n// -----------------------------------------------------------------------------\n// Reduce trees \nCoSELayout.prototype.reduceTrees = function () {\n var prunedNodesAll = [];\n var containsLeaf = true;\n var node;\n\n while (containsLeaf) {\n var allNodes = this.graphManager.getAllNodes();\n var prunedNodesInStepTemp = [];\n containsLeaf = false;\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) {\n prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]);\n containsLeaf = true;\n }\n }\n if (containsLeaf == true) {\n var prunedNodesInStep = [];\n for (var j = 0; j < prunedNodesInStepTemp.length; j++) {\n if (prunedNodesInStepTemp[j][0].getEdges().length == 1) {\n prunedNodesInStep.push(prunedNodesInStepTemp[j]);\n prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]);\n }\n }\n prunedNodesAll.push(prunedNodesInStep);\n this.graphManager.resetAllNodes();\n this.graphManager.resetAllEdges();\n }\n }\n this.prunedNodesAll = prunedNodesAll;\n};\n\n// Grow tree one step \nCoSELayout.prototype.growTree = function (prunedNodesAll) {\n var lengthOfPrunedNodesInStep = prunedNodesAll.length;\n var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1];\n\n var nodeData;\n for (var i = 0; i < prunedNodesInStep.length; i++) {\n nodeData = prunedNodesInStep[i];\n\n this.findPlaceforPrunedNode(nodeData);\n\n nodeData[2].add(nodeData[0]);\n nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target);\n }\n\n prunedNodesAll.splice(prunedNodesAll.length - 1, 1);\n this.graphManager.resetAllNodes();\n this.graphManager.resetAllEdges();\n};\n\n// Find an appropriate position to replace pruned node, this method can be improved\nCoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) {\n\n var gridForPrunedNode;\n var nodeToConnect;\n var prunedNode = nodeData[0];\n if (prunedNode == nodeData[1].source) {\n nodeToConnect = nodeData[1].target;\n } else {\n nodeToConnect = nodeData[1].source;\n }\n var startGridX = nodeToConnect.startX;\n var finishGridX = nodeToConnect.finishX;\n var startGridY = nodeToConnect.startY;\n var finishGridY = nodeToConnect.finishY;\n\n var upNodeCount = 0;\n var downNodeCount = 0;\n var rightNodeCount = 0;\n var leftNodeCount = 0;\n var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount];\n\n if (startGridY > 0) {\n for (var i = startGridX; i <= finishGridX; i++) {\n controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1;\n }\n }\n if (finishGridX < this.grid.length - 1) {\n for (var i = startGridY; i <= finishGridY; i++) {\n controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1;\n }\n }\n if (finishGridY < this.grid[0].length - 1) {\n for (var i = startGridX; i <= finishGridX; i++) {\n controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1;\n }\n }\n if (startGridX > 0) {\n for (var i = startGridY; i <= finishGridY; i++) {\n controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1;\n }\n }\n var min = Integer.MAX_VALUE;\n var minCount;\n var minIndex;\n for (var j = 0; j < controlRegions.length; j++) {\n if (controlRegions[j] < min) {\n min = controlRegions[j];\n minCount = 1;\n minIndex = j;\n } else if (controlRegions[j] == min) {\n minCount++;\n }\n }\n\n if (minCount == 3 && min == 0) {\n if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) {\n gridForPrunedNode = 1;\n } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 0;\n } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 3;\n } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 2;\n }\n } else if (minCount == 2 && min == 0) {\n var random = Math.floor(Math.random() * 2);\n if (controlRegions[0] == 0 && controlRegions[1] == 0) {\n ;\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 1;\n }\n } else if (controlRegions[0] == 0 && controlRegions[2] == 0) {\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 2;\n }\n } else if (controlRegions[0] == 0 && controlRegions[3] == 0) {\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 3;\n }\n } else if (controlRegions[1] == 0 && controlRegions[2] == 0) {\n if (random == 0) {\n gridForPrunedNode = 1;\n } else {\n gridForPrunedNode = 2;\n }\n } else if (controlRegions[1] == 0 && controlRegions[3] == 0) {\n if (random == 0) {\n gridForPrunedNode = 1;\n } else {\n gridForPrunedNode = 3;\n }\n } else {\n if (random == 0) {\n gridForPrunedNode = 2;\n } else {\n gridForPrunedNode = 3;\n }\n }\n } else if (minCount == 4 && min == 0) {\n var random = Math.floor(Math.random() * 4);\n gridForPrunedNode = random;\n } else {\n gridForPrunedNode = minIndex;\n }\n\n if (gridForPrunedNode == 0) {\n prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2);\n } else if (gridForPrunedNode == 1) {\n prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY());\n } else if (gridForPrunedNode == 2) {\n prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2);\n } else {\n prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY());\n }\n};\n\nmodule.exports = CoSELayout;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar coseBase = {};\n\ncoseBase.layoutBase = __webpack_require__(0);\ncoseBase.CoSEConstants = __webpack_require__(1);\ncoseBase.CoSEEdge = __webpack_require__(2);\ncoseBase.CoSEGraph = __webpack_require__(3);\ncoseBase.CoSEGraphManager = __webpack_require__(4);\ncoseBase.CoSELayout = __webpack_require__(6);\ncoseBase.CoSENode = __webpack_require__(5);\n\nmodule.exports = coseBase;\n\n/***/ })\n/******/ ]);\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"cose-base\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"cose-base\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cytoscapeCoseBilkent\"] = factory(require(\"cose-base\"));\n\telse\n\t\troot[\"cytoscapeCoseBilkent\"] = factory(root[\"coseBase\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LayoutConstants = __webpack_require__(0).layoutBase.LayoutConstants;\nvar FDLayoutConstants = __webpack_require__(0).layoutBase.FDLayoutConstants;\nvar CoSEConstants = __webpack_require__(0).CoSEConstants;\nvar CoSELayout = __webpack_require__(0).CoSELayout;\nvar CoSENode = __webpack_require__(0).CoSENode;\nvar PointD = __webpack_require__(0).layoutBase.PointD;\nvar DimensionD = __webpack_require__(0).layoutBase.DimensionD;\n\nvar defaults = {\n // Called on `layoutready`\n ready: function ready() {},\n // Called on `layoutstop`\n stop: function stop() {},\n // 'draft', 'default' or 'proof\" \n // - 'draft' fast cooling rate \n // - 'default' moderate cooling rate \n // - \"proof\" slow cooling rate\n quality: 'default',\n // include labels in node dimensions\n nodeDimensionsIncludeLabels: false,\n // number of ticks per frame; higher is faster but more jerky\n refresh: 30,\n // Whether to fit the network view after when done\n fit: true,\n // Padding on fit\n padding: 10,\n // Whether to enable incremental mode\n randomize: true,\n // Node repulsion (non overlapping) multiplier\n nodeRepulsion: 4500,\n // Ideal edge (non nested) length\n idealEdgeLength: 50,\n // Divisor to compute edge forces\n edgeElasticity: 0.45,\n // Nesting factor (multiplier) to compute ideal edge length for nested edges\n nestingFactor: 0.1,\n // Gravity force (constant)\n gravity: 0.25,\n // Maximum number of iterations to perform\n numIter: 2500,\n // For enabling tiling\n tile: true,\n // Type of layout animation. The option set is {'during', 'end', false}\n animate: 'end',\n // Duration for animate:end\n animationDuration: 500,\n // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)\n tilingPaddingVertical: 10,\n // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)\n tilingPaddingHorizontal: 10,\n // Gravity range (constant) for compounds\n gravityRangeCompound: 1.5,\n // Gravity force (constant) for compounds\n gravityCompound: 1.0,\n // Gravity range (constant)\n gravityRange: 3.8,\n // Initial cooling factor for incremental layout\n initialEnergyOnIncremental: 0.5\n};\n\nfunction extend(defaults, options) {\n var obj = {};\n\n for (var i in defaults) {\n obj[i] = defaults[i];\n }\n\n for (var i in options) {\n obj[i] = options[i];\n }\n\n return obj;\n};\n\nfunction _CoSELayout(_options) {\n this.options = extend(defaults, _options);\n getUserOptions(this.options);\n}\n\nvar getUserOptions = function getUserOptions(options) {\n if (options.nodeRepulsion != null) CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion;\n if (options.idealEdgeLength != null) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;\n if (options.edgeElasticity != null) CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity;\n if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor;\n if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity;\n if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter;\n if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange;\n if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound;\n if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound;\n if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental;\n\n if (options.quality == 'draft') LayoutConstants.QUALITY = 0;else if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 1;\n\n CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels;\n CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize;\n CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate;\n CoSEConstants.TILE = options.tile;\n CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical;\n CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal;\n};\n\n_CoSELayout.prototype.run = function () {\n var ready;\n var frameId;\n var options = this.options;\n var idToLNode = this.idToLNode = {};\n var layout = this.layout = new CoSELayout();\n var self = this;\n\n self.stopped = false;\n\n this.cy = this.options.cy;\n\n this.cy.trigger({ type: 'layoutstart', layout: this });\n\n var gm = layout.newGraphManager();\n this.gm = gm;\n\n var nodes = this.options.eles.nodes();\n var edges = this.options.eles.edges();\n\n this.root = gm.addRoot();\n this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout);\n\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var sourceNode = this.idToLNode[edge.data(\"source\")];\n var targetNode = this.idToLNode[edge.data(\"target\")];\n if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) {\n var e1 = gm.add(layout.newEdge(), sourceNode, targetNode);\n e1.id = edge.id();\n }\n }\n\n var getPositions = function getPositions(ele, i) {\n if (typeof ele === \"number\") {\n ele = i;\n }\n var theId = ele.data('id');\n var lNode = self.idToLNode[theId];\n\n return {\n x: lNode.getRect().getCenterX(),\n y: lNode.getRect().getCenterY()\n };\n };\n\n /*\n * Reposition nodes in iterations animatedly\n */\n var iterateAnimated = function iterateAnimated() {\n // Thigs to perform after nodes are repositioned on screen\n var afterReposition = function afterReposition() {\n if (options.fit) {\n options.cy.fit(options.eles, options.padding);\n }\n\n if (!ready) {\n ready = true;\n self.cy.one('layoutready', options.ready);\n self.cy.trigger({ type: 'layoutready', layout: self });\n }\n };\n\n var ticksPerFrame = self.options.refresh;\n var isDone;\n\n for (var i = 0; i < ticksPerFrame && !isDone; i++) {\n isDone = self.stopped || self.layout.tick();\n }\n\n // If layout is done\n if (isDone) {\n // If the layout is not a sublayout and it is successful perform post layout.\n if (layout.checkLayoutSuccess() && !layout.isSubLayout) {\n layout.doPostLayout();\n }\n\n // If layout has a tilingPostLayout function property call it.\n if (layout.tilingPostLayout) {\n layout.tilingPostLayout();\n }\n\n layout.isLayoutFinished = true;\n\n self.options.eles.nodes().positions(getPositions);\n\n afterReposition();\n\n // trigger layoutstop when the layout stops (e.g. finishes)\n self.cy.one('layoutstop', self.options.stop);\n self.cy.trigger({ type: 'layoutstop', layout: self });\n\n if (frameId) {\n cancelAnimationFrame(frameId);\n }\n\n ready = false;\n return;\n }\n\n var animationData = self.layout.getPositionsData(); // Get positions of layout nodes note that all nodes may not be layout nodes because of tiling\n\n // Position nodes, for the nodes whose id does not included in data (because they are removed from their parents and included in dummy compounds)\n // use position of their ancestors or dummy ancestors\n options.eles.nodes().positions(function (ele, i) {\n if (typeof ele === \"number\") {\n ele = i;\n }\n // If ele is a compound node, then its position will be defined by its children\n if (!ele.isParent()) {\n var theId = ele.id();\n var pNode = animationData[theId];\n var temp = ele;\n // If pNode is undefined search until finding position data of its first ancestor (It may be dummy as well)\n while (pNode == null) {\n pNode = animationData[temp.data('parent')] || animationData['DummyCompound_' + temp.data('parent')];\n animationData[theId] = pNode;\n temp = temp.parent()[0];\n if (temp == undefined) {\n break;\n }\n }\n if (pNode != null) {\n return {\n x: pNode.x,\n y: pNode.y\n };\n } else {\n return {\n x: ele.position('x'),\n y: ele.position('y')\n };\n }\n }\n });\n\n afterReposition();\n\n frameId = requestAnimationFrame(iterateAnimated);\n };\n\n /*\n * Listen 'layoutstarted' event and start animated iteration if animate option is 'during'\n */\n layout.addListener('layoutstarted', function () {\n if (self.options.animate === 'during') {\n frameId = requestAnimationFrame(iterateAnimated);\n }\n });\n\n layout.runLayout(); // Run cose layout\n\n /*\n * If animate option is not 'during' ('end' or false) perform these here (If it is 'during' similar things are already performed)\n */\n if (this.options.animate !== \"during\") {\n self.options.eles.nodes().not(\":parent\").layoutPositions(self, self.options, getPositions); // Use layout positions to reposition the nodes it considers the options parameter\n ready = false;\n }\n\n return this; // chaining\n};\n\n//Get the top most ones of a list of nodes\n_CoSELayout.prototype.getTopMostNodes = function (nodes) {\n var nodesMap = {};\n for (var i = 0; i < nodes.length; i++) {\n nodesMap[nodes[i].id()] = true;\n }\n var roots = nodes.filter(function (ele, i) {\n if (typeof ele === \"number\") {\n ele = i;\n }\n var parent = ele.parent()[0];\n while (parent != null) {\n if (nodesMap[parent.id()]) {\n return false;\n }\n parent = parent.parent()[0];\n }\n return true;\n });\n\n return roots;\n};\n\n_CoSELayout.prototype.processChildrenList = function (parent, children, layout) {\n var size = children.length;\n for (var i = 0; i < size; i++) {\n var theChild = children[i];\n var children_of_children = theChild.children();\n var theNode;\n\n var dimensions = theChild.layoutDimensions({\n nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels\n });\n\n if (theChild.outerWidth() != null && theChild.outerHeight() != null) {\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));\n } else {\n theNode = parent.add(new CoSENode(this.graphManager));\n }\n // Attach id to the layout node\n theNode.id = theChild.data(\"id\");\n // Attach the paddings of cy node to layout node\n theNode.paddingLeft = parseInt(theChild.css('padding'));\n theNode.paddingTop = parseInt(theChild.css('padding'));\n theNode.paddingRight = parseInt(theChild.css('padding'));\n theNode.paddingBottom = parseInt(theChild.css('padding'));\n\n //Attach the label properties to compound if labels will be included in node dimensions \n if (this.options.nodeDimensionsIncludeLabels) {\n if (theChild.isParent()) {\n var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w;\n var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h;\n var labelPos = theChild.css(\"text-halign\");\n theNode.labelWidth = labelWidth;\n theNode.labelHeight = labelHeight;\n theNode.labelPos = labelPos;\n }\n }\n\n // Map the layout node\n this.idToLNode[theChild.data(\"id\")] = theNode;\n\n if (isNaN(theNode.rect.x)) {\n theNode.rect.x = 0;\n }\n\n if (isNaN(theNode.rect.y)) {\n theNode.rect.y = 0;\n }\n\n if (children_of_children != null && children_of_children.length > 0) {\n var theNewGraph;\n theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode);\n this.processChildrenList(theNewGraph, children_of_children, layout);\n }\n }\n};\n\n/**\n * @brief : called on continuous layouts to stop them before they finish\n */\n_CoSELayout.prototype.stop = function () {\n this.stopped = true;\n\n return this; // chaining\n};\n\nvar register = function register(cytoscape) {\n // var Layout = getLayout( cytoscape );\n\n cytoscape('layout', 'cose-bilkent', _CoSELayout);\n};\n\n// auto reg for globals\nif (typeof cytoscape !== 'undefined') {\n register(cytoscape);\n}\n\nmodule.exports = register;\n\n/***/ })\n/******/ ]);\n});", "import { createText } from '../../rendering-util/createText.js';\nimport type { FilledMindMapNode, MindmapDB } from './mindmapTypes.js';\nimport type { Point, D3Element } from '../../types.js';\nimport { parseFontSize } from '../../utils.js';\nimport type { MermaidConfig } from '../../config.type.js';\n\nconst MAX_SECTIONS = 12;\n\ntype ShapeFunction = (\n db: MindmapDB,\n elem: D3Element,\n node: FilledMindMapNode,\n section?: number\n) => void;\n\nconst defaultBkg: ShapeFunction = function (db, elem, node, section) {\n const rd = 5;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr(\n 'd',\n `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${\n node.width - 2 * rd\n } q5,0 5,5 v${node.height - rd} H0 Z`\n );\n\n elem\n .append('line')\n .attr('class', 'node-line-' + section)\n .attr('x1', 0)\n .attr('y1', node.height)\n .attr('x2', node.width)\n .attr('y2', node.height);\n};\n\nconst rectBkg: ShapeFunction = function (db, elem, node) {\n elem\n .append('rect')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr('height', node.height)\n .attr('width', node.width);\n};\n\nconst cloudBkg: ShapeFunction = function (db, elem, node) {\n const w = node.width;\n const h = node.height;\n const r1 = 0.15 * w;\n const r2 = 0.25 * w;\n const r3 = 0.35 * w;\n const r4 = 0.2 * w;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr(\n 'd',\n `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1}\n a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1}\n a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2}\n\n a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35}\n a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65}\n\n a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15}\n a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0}\n a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15}\n\n a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35}\n a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65}\n\n H0 V0 Z`\n );\n};\n\nconst bangBkg: ShapeFunction = function (db, elem, node) {\n const w = node.width;\n const h = node.height;\n const r = 0.15 * w;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr(\n 'd',\n `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1}\n a${r},${r} 1 0,0 ${w * 0.25},${0}\n a${r},${r} 1 0,0 ${w * 0.25},${0}\n a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1}\n\n a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33}\n a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34}\n a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33}\n\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15}\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15}\n\n a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33}\n a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34}\n a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33}\n\n H0 V0 Z`\n );\n};\n\nconst circleBkg: ShapeFunction = function (db, elem, node) {\n elem\n .append('circle')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr('r', node.width / 2);\n};\n\nfunction insertPolygonShape(\n parent: D3Element,\n w: number,\n h: number,\n points: Point[],\n node: FilledMindMapNode\n) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('transform', 'translate(' + (node.width - w) / 2 + ', ' + h + ')');\n}\n\nconst hexagonBkg: ShapeFunction = function (\n _db: MindmapDB,\n elem: D3Element,\n node: FilledMindMapNode\n) {\n const h = node.height;\n const f = 4;\n const m = h / f;\n const w = node.width - node.padding + 2 * m;\n const points: Point[] = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n insertPolygonShape(elem, w, h, points, node);\n};\n\nconst roundedRectBkg: ShapeFunction = function (db, elem, node) {\n elem\n .append('rect')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr('height', node.height)\n .attr('rx', node.padding)\n .attr('ry', node.padding)\n .attr('width', node.width);\n};\n\n/**\n * @param db - The database\n * @param elem - The D3 dom element in which the node is to be added\n * @param node - The node to be added\n * @param fullSection - ?\n * @param conf - The configuration object\n * @returns The height nodes dom element\n */\nexport const drawNode = async function (\n db: MindmapDB,\n elem: D3Element,\n node: FilledMindMapNode,\n fullSection: number,\n conf: MermaidConfig\n): Promise {\n const htmlLabels = conf.htmlLabels;\n const section = fullSection % (MAX_SECTIONS - 1);\n const nodeElem = elem.append('g');\n node.section = section;\n let sectionClass = 'section-' + section;\n if (section < 0) {\n sectionClass += ' section-root';\n }\n nodeElem.attr('class', (node.class ? node.class + ' ' : '') + 'mindmap-node ' + sectionClass);\n const bkgElem = nodeElem.append('g');\n\n // Create the wrapped text element\n const textElem = nodeElem.append('g');\n const description = node.descr.replace(/()/g, '\\n');\n await createText(\n textElem,\n description,\n {\n useHtmlLabels: htmlLabels,\n width: node.width,\n classes: 'mindmap-node-label',\n },\n conf\n );\n\n if (!htmlLabels) {\n textElem\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle');\n }\n const bbox = textElem.node().getBBox();\n const [fontSize] = parseFontSize(conf.fontSize);\n node.height = bbox.height + fontSize! * 1.1 * 0.5 + node.padding;\n node.width = bbox.width + 2 * node.padding;\n if (node.icon) {\n if (node.type === db.nodeType.CIRCLE) {\n node.height += 50;\n node.width += 50;\n const icon = nodeElem\n .append('foreignObject')\n .attr('height', '50px')\n .attr('width', node.width)\n .attr('style', 'text-align: center;');\n icon\n .append('div')\n .attr('class', 'icon-container')\n .append('i')\n .attr('class', 'node-icon-' + section + ' ' + node.icon);\n textElem.attr(\n 'transform',\n 'translate(' + node.width / 2 + ', ' + (node.height / 2 - 1.5 * node.padding) + ')'\n );\n } else {\n node.width += 50;\n const orgHeight = node.height;\n node.height = Math.max(orgHeight, 60);\n const heightDiff = Math.abs(node.height - orgHeight);\n const icon = nodeElem\n .append('foreignObject')\n .attr('width', '60px')\n .attr('height', node.height)\n .attr('style', 'text-align: center;margin-top:' + heightDiff / 2 + 'px;');\n\n icon\n .append('div')\n .attr('class', 'icon-container')\n .append('i')\n .attr('class', 'node-icon-' + section + ' ' + node.icon);\n textElem.attr(\n 'transform',\n 'translate(' + (25 + node.width / 2) + ', ' + (heightDiff / 2 + node.padding / 2) + ')'\n );\n }\n } else {\n if (!htmlLabels) {\n const dx = node.width / 2;\n const dy = node.padding / 2;\n textElem.attr('transform', 'translate(' + dx + ', ' + dy + ')');\n // textElem.attr('transform', 'translate(' + node.width / 2 + ', ' + node.padding / 2 + ')');\n } else {\n const dx = (node.width - bbox.width) / 2;\n const dy = (node.height - bbox.height) / 2;\n textElem.attr('transform', 'translate(' + dx + ', ' + dy + ')');\n }\n }\n\n switch (node.type) {\n case db.nodeType.DEFAULT:\n defaultBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.ROUNDED_RECT:\n roundedRectBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.RECT:\n rectBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.CIRCLE:\n bkgElem.attr('transform', 'translate(' + node.width / 2 + ', ' + +node.height / 2 + ')');\n circleBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.CLOUD:\n cloudBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.BANG:\n bangBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.HEXAGON:\n hexagonBkg(db, bkgElem, node, section);\n break;\n }\n\n db.setElementForId(node.id, nodeElem);\n return node.height;\n};\n\nexport const positionNode = function (db: MindmapDB, node: FilledMindMapNode) {\n const nodeElem = db.getElementById(node.id);\n\n const x = node.x || 0;\n const y = node.y || 0;\n // Position the node to its coordinate\n nodeElem.attr('transform', 'translate(' + x + ',' + y + ')');\n};\n", "import cytoscape from 'cytoscape';\n// @ts-expect-error No types available\nimport coseBilkent from 'cytoscape-cose-bilkent';\nimport { select } from 'd3';\nimport type { MermaidConfig } from '../../config.type.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DrawDefinition } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport type { D3Element } from '../../types.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport type { FilledMindMapNode, MindmapDB, MindmapNode } from './mindmapTypes.js';\nimport { drawNode, positionNode } from './svgDraw.js';\nimport defaultConfig from '../../defaultConfig.js';\n\n// Inject the layout algorithm into cytoscape\ncytoscape.use(coseBilkent);\n\nasync function drawNodes(\n db: MindmapDB,\n svg: D3Element,\n mindmap: FilledMindMapNode,\n section: number,\n conf: MermaidConfig\n) {\n await drawNode(db, svg, mindmap, section, conf);\n if (mindmap.children) {\n await Promise.all(\n mindmap.children.map((child, index) =>\n drawNodes(db, svg, child, section < 0 ? index : section, conf)\n )\n );\n }\n}\n\ndeclare module 'cytoscape' {\n interface EdgeSingular {\n _private: {\n bodyBounds: unknown;\n rscratch: {\n startX: number;\n startY: number;\n midX: number;\n midY: number;\n endX: number;\n endY: number;\n };\n };\n }\n}\n\nfunction drawEdges(edgesEl: D3Element, cy: cytoscape.Core) {\n cy.edges().map((edge, id) => {\n const data = edge.data();\n if (edge[0]._private.bodyBounds) {\n const bounds = edge[0]._private.rscratch;\n log.trace('Edge: ', id, data);\n edgesEl\n .insert('path')\n .attr(\n 'd',\n `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} `\n )\n .attr('class', 'edge section-edge-' + data.section + ' edge-depth-' + data.depth);\n }\n });\n}\n\nfunction addNodes(mindmap: MindmapNode, cy: cytoscape.Core, conf: MermaidConfig, level: number) {\n cy.add({\n group: 'nodes',\n data: {\n id: mindmap.id.toString(),\n labelText: mindmap.descr,\n height: mindmap.height,\n width: mindmap.width,\n level: level,\n nodeId: mindmap.id,\n padding: mindmap.padding,\n type: mindmap.type,\n },\n position: {\n x: mindmap.x!,\n y: mindmap.y!,\n },\n });\n if (mindmap.children) {\n mindmap.children.forEach((child) => {\n addNodes(child, cy, conf, level + 1);\n cy.add({\n group: 'edges',\n data: {\n id: `${mindmap.id}_${child.id}`,\n source: mindmap.id,\n target: child.id,\n depth: level,\n section: child.section,\n },\n });\n });\n }\n}\n\nfunction layoutMindmap(node: MindmapNode, conf: MermaidConfig): Promise {\n return new Promise((resolve) => {\n // Add temporary render element\n const renderEl = select('body').append('div').attr('id', 'cy').attr('style', 'display:none');\n const cy = cytoscape({\n container: document.getElementById('cy'), // container to render in\n style: [\n {\n selector: 'edge',\n style: {\n 'curve-style': 'bezier',\n },\n },\n ],\n });\n // Remove element after layout\n renderEl.remove();\n addNodes(node, cy, conf, 0);\n\n // Make cytoscape care about the dimensions of the nodes\n cy.nodes().forEach(function (n) {\n n.layoutDimensions = () => {\n const data = n.data();\n return { w: data.width, h: data.height };\n };\n });\n\n cy.layout({\n name: 'cose-bilkent',\n // @ts-ignore Types for cose-bilkent are not correct?\n quality: 'proof',\n styleEnabled: false,\n animate: false,\n }).run();\n cy.ready((e) => {\n log.info('Ready', e);\n resolve(cy);\n });\n });\n}\n\nfunction positionNodes(db: MindmapDB, cy: cytoscape.Core) {\n cy.nodes().map((node, id) => {\n const data = node.data();\n data.x = node.position().x;\n data.y = node.position().y;\n positionNode(db, data);\n const el = db.getElementById(data.nodeId);\n log.info('Id:', id, 'Position: (', node.position().x, ', ', node.position().y, ')', data);\n el.attr(\n 'transform',\n `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})`\n );\n el.attr('attr', `apa-${id})`);\n });\n}\n\nexport const draw: DrawDefinition = async (text, id, _version, diagObj) => {\n log.debug('Rendering mindmap diagram\\n' + text);\n\n const db = diagObj.db as MindmapDB;\n const mm = db.getMindmap();\n if (!mm) {\n return;\n }\n\n const conf = getConfig();\n conf.htmlLabels = false;\n\n const svg = selectSvgElement(id);\n\n // Draw the graph and start with drawing the nodes without proper position\n // this gives us the size of the nodes and we can set the positions later\n\n const edgesElem = svg.append('g');\n edgesElem.attr('class', 'mindmap-edges');\n const nodesElem = svg.append('g');\n nodesElem.attr('class', 'mindmap-nodes');\n await drawNodes(db, nodesElem, mm as FilledMindMapNode, -1, conf);\n\n // Next step is to layout the mindmap, giving each node a position\n\n const cy = await layoutMindmap(mm, conf);\n\n // After this we can draw, first the edges and the then nodes with the correct position\n drawEdges(edgesElem, cy);\n positionNodes(db, cy);\n\n // Setup the view box and size of the svg element\n setupGraphViewbox(\n undefined,\n svg,\n conf.mindmap?.padding ?? defaultConfig.mindmap.padding,\n conf.mindmap?.useMaxWidth ?? defaultConfig.mindmap.useMaxWidth\n );\n};\n\nexport default {\n draw,\n};\n", "// @ts-expect-error Incorrect khroma types\nimport { darken, lighten, isDark } from 'khroma';\nimport type { DiagramStylesProvider } from '../../diagram-api/types.js';\n\nconst genSections: DiagramStylesProvider = (options) => {\n let sections = '';\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n options['lineColor' + i] = options['lineColor' + i] || options['cScaleInv' + i];\n if (isDark(options['lineColor' + i])) {\n options['lineColor' + i] = lighten(options['lineColor' + i], 20);\n } else {\n options['lineColor' + i] = darken(options['lineColor' + i], 20);\n }\n }\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n const sw = '' + (17 - 3 * i);\n sections += `\n .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${\n i - 1\n } polygon, .section-${i - 1} path {\n fill: ${options['cScale' + i]};\n }\n .section-${i - 1} text {\n fill: ${options['cScaleLabel' + i]};\n }\n .node-icon-${i - 1} {\n font-size: 40px;\n color: ${options['cScaleLabel' + i]};\n }\n .section-edge-${i - 1}{\n stroke: ${options['cScale' + i]};\n }\n .edge-depth-${i - 1}{\n stroke-width: ${sw};\n }\n .section-${i - 1} line {\n stroke: ${options['cScaleInv' + i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `;\n }\n return sections;\n};\n\n// TODO: These options seem incorrect.\nconst getStyles: DiagramStylesProvider = (options) =>\n `\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`;\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport parser from './parser/mindmap.jison';\nimport db from './mindmapDb.js';\nimport renderer from './mindmapRenderer.js';\nimport styles from './styles.js';\nimport type { DiagramDefinition } from '../../diagram-api/types.js';\n\nexport const diagram: DiagramDefinition = {\n db,\n renderer,\n parser,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,13],$V2=[1,12],$V3=[1,15],$V4=[1,16],$V5=[1,20],$V6=[1,19],$V7=[6,7,8],$V8=[1,26],$V9=[1,24],$Va=[1,25],$Vb=[6,7,11],$Vc=[1,31],$Vd=[6,7,11,24],$Ve=[1,6,13,16,17,20,23],$Vf=[1,35],$Vg=[1,36],$Vh=[1,6,7,11,13,16,17,20,23],$Vi=[1,38];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mindMap\":4,\"spaceLines\":5,\"SPACELINE\":6,\"NL\":7,\"KANBAN\":8,\"document\":9,\"stop\":10,\"EOF\":11,\"statement\":12,\"SPACELIST\":13,\"node\":14,\"shapeData\":15,\"ICON\":16,\"CLASS\":17,\"nodeWithId\":18,\"nodeWithoutId\":19,\"NODE_DSTART\":20,\"NODE_DESCR\":21,\"NODE_DEND\":22,\"NODE_ID\":23,\"SHAPE_DATA\":24,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",6:\"SPACELINE\",7:\"NL\",8:\"KANBAN\",11:\"EOF\",13:\"SPACELIST\",16:\"ICON\",17:\"CLASS\",20:\"NODE_DSTART\",21:\"NODE_DESCR\",22:\"NODE_DEND\",23:\"NODE_ID\",24:\"SHAPE_DATA\"},\nproductions_: [0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 6: case 7:\n return yy; \nbreak;\ncase 8:\nyy.getLogger().trace('Stop NL ');\nbreak;\ncase 9:\nyy.getLogger().trace('Stop EOF ');\nbreak;\ncase 11:\nyy.getLogger().trace('Stop NL2 ');\nbreak;\ncase 12:\nyy.getLogger().trace('Stop EOF2 ');\nbreak;\ncase 15:\n yy.getLogger().info('Node: ',$$[$0-1].id);yy.addNode($$[$0-2].length, $$[$0-1].id, $$[$0-1].descr, $$[$0-1].type, $$[$0]); \nbreak;\ncase 16:\n yy.getLogger().info('Node: ',$$[$0].id);yy.addNode($$[$0-1].length, $$[$0].id, $$[$0].descr, $$[$0].type); \nbreak;\ncase 17:\n yy.getLogger().trace('Icon: ',$$[$0]);yy.decorateNode({icon: $$[$0]}); \nbreak;\ncase 18: case 23:\n yy.decorateNode({class: $$[$0]}); \nbreak;\ncase 19:\n yy.getLogger().trace('SPACELIST');\nbreak;\ncase 20:\n yy.getLogger().trace('Node: ',$$[$0-1].id);yy.addNode(0, $$[$0-1].id, $$[$0-1].descr, $$[$0-1].type, $$[$0]); \nbreak;\ncase 21:\n yy.getLogger().trace('Node: ',$$[$0].id);yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); \nbreak;\ncase 22:\n yy.decorateNode({icon: $$[$0]}); \nbreak;\ncase 27:\n yy.getLogger().trace(\"node found ..\", $$[$0-2]); this.$ = { id: $$[$0-1], descr: $$[$0-1], type: yy.getType($$[$0-2], $$[$0]) }; \nbreak;\ncase 28:\n this.$ = { id: $$[$0], descr: $$[$0], type: 0 }; \nbreak;\ncase 29:\n yy.getLogger().trace(\"node found ..\", $$[$0-3]); this.$ = { id: $$[$0-3], descr: $$[$0-1], type: yy.getType($$[$0-2], $$[$0]) }; \nbreak;\ncase 30:\n this.$ = $$[$0-1] + $$[$0]; \nbreak;\ncase 31:\n this.$ = $$[$0]; \nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:[1,5],8:$V0},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:$V0},{6:$V1,7:[1,10],9:9,12:11,13:$V2,14:14,16:$V3,17:$V4,18:17,19:18,20:$V5,23:$V6},o($V7,[2,3]),{1:[2,2]},o($V7,[2,4]),o($V7,[2,5]),{1:[2,6],6:$V1,12:21,13:$V2,14:14,16:$V3,17:$V4,18:17,19:18,20:$V5,23:$V6},{6:$V1,9:22,12:11,13:$V2,14:14,16:$V3,17:$V4,18:17,19:18,20:$V5,23:$V6},{6:$V8,7:$V9,10:23,11:$Va},o($Vb,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:$V5,23:$V6}),o($Vb,[2,19]),o($Vb,[2,21],{15:30,24:$Vc}),o($Vb,[2,22]),o($Vb,[2,23]),o($Vd,[2,25]),o($Vd,[2,26]),o($Vd,[2,28],{20:[1,32]}),{21:[1,33]},{6:$V8,7:$V9,10:34,11:$Va},{1:[2,7],6:$V1,12:21,13:$V2,14:14,16:$V3,17:$V4,18:17,19:18,20:$V5,23:$V6},o($Ve,[2,14],{7:$Vf,11:$Vg}),o($Vh,[2,8]),o($Vh,[2,9]),o($Vh,[2,10]),o($Vb,[2,16],{15:37,24:$Vc}),o($Vb,[2,17]),o($Vb,[2,18]),o($Vb,[2,20],{24:$Vi}),o($Vd,[2,31]),{21:[1,39]},{22:[1,40]},o($Ve,[2,13],{7:$Vf,11:$Vg}),o($Vh,[2,11]),o($Vh,[2,12]),o($Vb,[2,15],{24:$Vi}),o($Vd,[2,30]),{22:[1,41]},o($Vd,[2,27]),o($Vd,[2,29])],\ndefaultActions: {2:[2,1],6:[2,2]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\n\t// Pre-lexer code can go here\n\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:\n // console.log('=> shapeData', yy_.yytext);\n this.pushState(\"shapeData\"); yy_.yytext=\"\"; return 24 \nbreak;\ncase 1:\n // console.log('=> shapeDataStr', yy_.yytext);\n this.pushState(\"shapeDataStr\");\n return 24;\n \nbreak;\ncase 2:\n // console.log('shapeData <==', yy_.yytext);\n this.popState(); return 24\nbreak;\ncase 3:\n // console.log('shapeData', yy_.yytext);\n const re = /\\n\\s*/g;\n yy_.yytext = yy_.yytext.replace(re,\"
    \");\n return 24\nbreak;\ncase 4:\n // console.log('shapeData', yy_.yytext);\n return 24;\n \nbreak;\ncase 5:\n // console.log('<== root', yy_.yytext)\n this.popState();\n \nbreak;\ncase 6:yy.getLogger().trace('Found comment',yy_.yytext); return 6;\nbreak;\ncase 7:return 8;\nbreak;\ncase 8: this.begin('CLASS'); \nbreak;\ncase 9: this.popState();return 17; \nbreak;\ncase 10: this.popState();\nbreak;\ncase 11: yy.getLogger().trace('Begin icon');this.begin('ICON'); \nbreak;\ncase 12:yy.getLogger().trace('SPACELINE');return 6 /* skip all whitespace */ ;\nbreak;\ncase 13:return 7;\nbreak;\ncase 14: return 16; \nbreak;\ncase 15:yy.getLogger().trace('end icon');this.popState();\nbreak;\ncase 16: yy.getLogger().trace('Exploding node'); this.begin('NODE');return 20; \nbreak;\ncase 17: yy.getLogger().trace('Cloud'); this.begin('NODE');return 20; \nbreak;\ncase 18: yy.getLogger().trace('Explosion Bang'); this.begin('NODE');return 20; \nbreak;\ncase 19: yy.getLogger().trace('Cloud Bang'); this.begin('NODE');return 20; \nbreak;\ncase 20: this.begin('NODE');return 20; \nbreak;\ncase 21: this.begin('NODE');return 20; \nbreak;\ncase 22: this.begin('NODE');return 20; \nbreak;\ncase 23: this.begin('NODE');return 20; \nbreak;\ncase 24:return 13 /* skip all whitespace */ ;\nbreak;\ncase 25:return 23;\nbreak;\ncase 26:return 11;\nbreak;\ncase 27: this.begin(\"NSTR2\");\nbreak;\ncase 28: return \"NODE_DESCR\";\nbreak;\ncase 29: this.popState();\nbreak;\ncase 30: yy.getLogger().trace('Starting NSTR');this.begin(\"NSTR\");\nbreak;\ncase 31: yy.getLogger().trace('description:', yy_.yytext); return \"NODE_DESCR\";\nbreak;\ncase 32:this.popState();\nbreak;\ncase 33:this.popState();yy.getLogger().trace('node end ))');return \"NODE_DEND\";\nbreak;\ncase 34:this.popState();yy.getLogger().trace('node end )');return \"NODE_DEND\";\nbreak;\ncase 35:this.popState();yy.getLogger().trace('node end ...',yy_.yytext);return \"NODE_DEND\";\nbreak;\ncase 36:this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";\nbreak;\ncase 37:this.popState();yy.getLogger().trace('node end (-');return \"NODE_DEND\";\nbreak;\ncase 38:this.popState();yy.getLogger().trace('node end (-');return \"NODE_DEND\";\nbreak;\ncase 39:this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";\nbreak;\ncase 40:this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";\nbreak;\ncase 41: yy.getLogger().trace('Long description:', yy_.yytext); return 21;\nbreak;\ncase 42: yy.getLogger().trace('Long description:', yy_.yytext); return 21;\nbreak;\n}\n},\nrules: [/^(?:@\\{)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\\\"]+)/i,/^(?:[^}^\"]+)/i,/^(?:\\})/i,/^(?:\\s*%%.*)/i,/^(?:kanban\\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\\n)/i,/^(?:::icon\\()/i,/^(?:[\\s]+[\\n])/i,/^(?:[\\n]+)/i,/^(?:[^\\)]+)/i,/^(?:\\))/i,/^(?:-\\))/i,/^(?:\\(-)/i,/^(?:\\)\\))/i,/^(?:\\))/i,/^(?:\\(\\()/i,/^(?:\\{\\{)/i,/^(?:\\()/i,/^(?:\\[)/i,/^(?:[\\s]+)/i,/^(?:[^\\(\\[\\n\\)\\{\\}@]+)/i,/^(?:$)/i,/^(?:[\"][`])/i,/^(?:[^`\"]+)/i,/^(?:[`][\"])/i,/^(?:[\"])/i,/^(?:[^\"]+)/i,/^(?:[\"])/i,/^(?:[\\)]\\))/i,/^(?:[\\)])/i,/^(?:[\\]])/i,/^(?:\\}\\})/i,/^(?:\\(-)/i,/^(?:-\\))/i,/^(?:\\(\\()/i,/^(?:\\()/i,/^(?:[^\\)\\]\\(\\}]+)/i,/^(?:.+(?!\\(\\())/i],\nconditions: {\"shapeDataEndBracket\":{\"rules\":[],\"inclusive\":false},\"shapeDataStr\":{\"rules\":[2,3],\"inclusive\":false},\"shapeData\":{\"rules\":[1,4,5],\"inclusive\":false},\"CLASS\":{\"rules\":[9,10],\"inclusive\":false},\"ICON\":{\"rules\":[14,15],\"inclusive\":false},\"NSTR2\":{\"rules\":[28,29],\"inclusive\":false},\"NSTR\":{\"rules\":[31,32],\"inclusive\":false},\"NODE\":{\"rules\":[27,30,33,34,35,36,37,38,39,40,41,42],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { D3Element } from '../../types.js';\nimport { sanitizeText } from '../../diagrams/common/common.js';\nimport { log } from '../../logger.js';\nimport type { Edge, KanbanNode } from '../../rendering-util/types.js';\nimport defaultConfig from '../../defaultConfig.js';\nimport type { NodeMetaData } from '../../types.js';\nimport * as yaml from 'js-yaml';\n\nlet nodes: KanbanNode[] = [];\nlet sections: KanbanNode[] = [];\nlet cnt = 0;\nlet elements: Record = {};\n\nconst clear = () => {\n nodes = [];\n sections = [];\n cnt = 0;\n elements = {};\n};\n/*\n * if your level is the section level return null - then you do not belong to a level\n * otherwise return the current section\n */\nconst getSection = (level: number) => {\n if (nodes.length === 0) {\n // console.log('No nodes');\n return null;\n }\n const sectionLevel = nodes[0].level;\n let lastSection = null;\n for (let i = nodes.length - 1; i >= 0; i--) {\n if (nodes[i].level === sectionLevel && !lastSection) {\n lastSection = nodes[i];\n // console.log('lastSection found', lastSection);\n }\n // console.log('HERE', nodes[i].id, level, nodes[i].level, sectionLevel);\n if (nodes[i].level < sectionLevel) {\n throw new Error('Items without section detected, found section (\"' + nodes[i].label + '\")');\n }\n }\n if (level === lastSection?.level) {\n return null;\n }\n\n // No found\n return lastSection;\n};\n\nconst getSections = function () {\n return sections;\n};\n\nconst getData = function () {\n const edges = [] as Edge[];\n const _nodes: KanbanNode[] = [];\n\n const sections = getSections();\n const conf = getConfig();\n\n for (const section of sections) {\n const node = {\n id: section.id,\n label: sanitizeText(section.label ?? '', conf),\n isGroup: true,\n ticket: section.ticket,\n shape: 'kanbanSection',\n level: section.level,\n look: conf.look,\n } satisfies KanbanNode;\n _nodes.push(node);\n const children = nodes.filter((n) => n.parentId === section.id);\n\n for (const item of children) {\n const childNode = {\n id: item.id,\n parentId: section.id,\n label: sanitizeText(item.label ?? '', conf),\n isGroup: false,\n ticket: item?.ticket,\n priority: item?.priority,\n assigned: item?.assigned,\n icon: item?.icon,\n shape: 'kanbanItem',\n level: item.level,\n rx: 5,\n ry: 5,\n cssStyles: ['text-align: left'],\n } satisfies KanbanNode;\n _nodes.push(childNode);\n }\n }\n\n return { nodes: _nodes, edges, other: {}, config: getConfig() };\n};\n\nconst addNode = (level: number, id: string, descr: string, type: number, shapeData: string) => {\n const conf = getConfig();\n let padding: number = conf.mindmap?.padding ?? defaultConfig.mindmap.padding;\n switch (type) {\n case nodeType.ROUNDED_RECT:\n case nodeType.RECT:\n case nodeType.HEXAGON:\n padding *= 2;\n }\n\n const node: KanbanNode = {\n id: sanitizeText(id, conf) || 'kbn' + cnt++,\n level,\n label: sanitizeText(descr, conf),\n width: conf.mindmap?.maxNodeWidth ?? defaultConfig.mindmap.maxNodeWidth,\n padding,\n isGroup: false,\n } satisfies KanbanNode;\n\n if (shapeData !== undefined) {\n let yamlData;\n // detect if shapeData contains a newline character\n // console.log('shapeData', shapeData);\n if (!shapeData.includes('\\n')) {\n // console.log('yamlData shapeData has no new lines', shapeData);\n yamlData = '{\\n' + shapeData + '\\n}';\n } else {\n // console.log('yamlData shapeData has new lines', shapeData);\n yamlData = shapeData + '\\n';\n }\n const doc = yaml.load(yamlData, { schema: yaml.JSON_SCHEMA }) as NodeMetaData;\n // console.log('yamlData', doc);\n if (doc.shape && (doc.shape !== doc.shape.toLowerCase() || doc.shape.includes('_'))) {\n throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);\n }\n\n // if shape is defined in the yaml data, use it if it is a valid shape kanbanItem\n if (doc?.shape && doc.shape === 'kanbanItem') {\n node.shape = doc?.shape;\n }\n if (doc?.label) {\n node.label = doc?.label;\n }\n if (doc?.icon) {\n node.icon = doc?.icon;\n }\n if (doc?.assigned) {\n node.assigned = doc?.assigned;\n }\n if (doc?.ticket) {\n node.ticket = doc?.ticket;\n }\n\n if (doc?.priority) {\n node.priority = doc?.priority;\n }\n }\n\n const section = getSection(level);\n if (section) {\n // @ts-ignore false positive for section.id\n node.parentId = section.id || 'kbn' + cnt++;\n } else {\n sections.push(node);\n }\n nodes.push(node);\n};\n\nconst nodeType = {\n DEFAULT: 0,\n NO_BORDER: 0,\n ROUNDED_RECT: 1,\n RECT: 2,\n CIRCLE: 3,\n CLOUD: 4,\n BANG: 5,\n HEXAGON: 6,\n};\n\nconst getType = (startStr: string, endStr: string): number => {\n log.debug('In get type', startStr, endStr);\n switch (startStr) {\n case '[':\n return nodeType.RECT;\n case '(':\n return endStr === ')' ? nodeType.ROUNDED_RECT : nodeType.CLOUD;\n case '((':\n return nodeType.CIRCLE;\n case ')':\n return nodeType.CLOUD;\n case '))':\n return nodeType.BANG;\n case '{{':\n return nodeType.HEXAGON;\n default:\n return nodeType.DEFAULT;\n }\n};\n\nconst setElementForId = (id: number, element: D3Element) => {\n elements[id] = element;\n};\n\nconst decorateNode = (decoration?: { class?: string; icon?: string }) => {\n if (!decoration) {\n return;\n }\n const config = getConfig();\n const node = nodes[nodes.length - 1];\n if (decoration.icon) {\n node.icon = sanitizeText(decoration.icon, config);\n }\n if (decoration.class) {\n node.cssClasses = sanitizeText(decoration.class, config);\n }\n};\n\nconst type2Str = (type: number) => {\n switch (type) {\n case nodeType.DEFAULT:\n return 'no-border';\n case nodeType.RECT:\n return 'rect';\n case nodeType.ROUNDED_RECT:\n return 'rounded-rect';\n case nodeType.CIRCLE:\n return 'circle';\n case nodeType.CLOUD:\n return 'cloud';\n case nodeType.BANG:\n return 'bang';\n case nodeType.HEXAGON:\n return 'hexgon'; // cspell: disable-line\n default:\n return 'no-border';\n }\n};\n\n// Expose logger to grammar\nconst getLogger = () => log;\nconst getElementById = (id: number) => elements[id];\n\nconst db = {\n clear,\n addNode,\n getSections,\n getData,\n nodeType,\n getType,\n setElementForId,\n decorateNode,\n type2Str,\n getLogger,\n getElementById,\n} as const;\n\nexport default db;\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DrawDefinition } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport type { KanbanDB } from './kanbanTypes.js';\nimport defaultConfig from '../../defaultConfig.js';\nimport { insertCluster } from '../../rendering-util/rendering-elements/clusters.js';\nimport { insertNode, positionNode } from '../../rendering-util/rendering-elements/nodes.js';\nimport type { ClusterNode } from '../../rendering-util/types.js';\n\nexport const draw: DrawDefinition = async (text, id, _version, diagObj) => {\n log.debug('Rendering kanban diagram\\n' + text);\n\n const db = diagObj.db as KanbanDB;\n const data4Layout = db.getData();\n\n const conf = getConfig();\n conf.htmlLabels = false;\n\n const svg = selectSvgElement(id);\n\n // Draw the graph and start with drawing the nodes without proper position\n // this gives us the size of the nodes and we can set the positions later\n\n const sectionsElem = svg.append('g');\n sectionsElem.attr('class', 'sections');\n const nodesElem = svg.append('g');\n nodesElem.attr('class', 'items');\n const sections = data4Layout.nodes.filter(\n // TODO: TypeScript 5.5 will infer this predicate automatically\n (node): node is typeof node & ClusterNode => node.isGroup\n );\n let cnt = 0;\n // TODO set padding\n const padding = 10;\n\n const sectionObjects = [];\n let maxLabelHeight = 25;\n for (const section of sections) {\n const WIDTH = conf?.kanban?.sectionWidth || 200;\n // const top = (-WIDTH * 3) / 2 + 25;\n // let y = top;\n cnt = cnt + 1;\n section.x = WIDTH * cnt + ((cnt - 1) * padding) / 2;\n section.width = WIDTH;\n section.y = 0;\n section.height = WIDTH * 3;\n section.rx = 5;\n section.ry = 5;\n\n // Todo, use theme variable THEME_COLOR_LIMIT instead of 10\n section.cssClasses = section.cssClasses + ' section-' + cnt;\n const sectionObj = await insertCluster(sectionsElem, section);\n maxLabelHeight = Math.max(maxLabelHeight, sectionObj?.labelBBox?.height);\n sectionObjects.push(sectionObj);\n }\n let i = 0;\n for (const section of sections) {\n const sectionObj = sectionObjects[i];\n i = i + 1;\n const WIDTH = conf?.kanban?.sectionWidth || 200;\n const top = (-WIDTH * 3) / 2 + maxLabelHeight;\n let y = top;\n const sectionItems = data4Layout.nodes.filter((node) => node.parentId === section.id);\n for (const item of sectionItems) {\n if (item.isGroup) {\n // Kanban diagrams should not have groups within groups\n // this should never happen\n throw new Error('Groups within groups are not allowed in Kanban diagrams');\n }\n item.x = section.x;\n item.width = WIDTH - 1.5 * padding;\n const nodeEl = await insertNode(nodesElem, item, { config: conf });\n const bbox = nodeEl.node()!.getBBox();\n item.y = y + bbox.height / 2;\n await positionNode(item);\n y = item.y + bbox.height / 2 + padding / 2;\n }\n const rect = sectionObj.cluster.select('rect');\n const height = Math.max(y - top + 3 * padding, 50) + (maxLabelHeight - 25);\n rect.attr('height', height);\n }\n\n // Setup the view box and size of the svg element\n setupGraphViewbox(\n undefined,\n svg,\n conf.mindmap?.padding ?? defaultConfig.kanban.padding,\n conf.mindmap?.useMaxWidth ?? defaultConfig.kanban.useMaxWidth\n );\n};\n\nexport default {\n draw,\n};\n", "// @ts-expect-error Incorrect khroma types\nimport { darken, lighten, isDark } from 'khroma';\nimport type { DiagramStylesProvider } from '../../diagram-api/types.js';\n\nconst genSections: DiagramStylesProvider = (options) => {\n let sections = '';\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n options['lineColor' + i] = options['lineColor' + i] || options['cScaleInv' + i];\n if (isDark(options['lineColor' + i])) {\n options['lineColor' + i] = lighten(options['lineColor' + i], 20);\n } else {\n options['lineColor' + i] = darken(options['lineColor' + i], 20);\n }\n }\n\n const adjuster = (color: string, level: number) =>\n options.darkMode ? darken(color, level) : lighten(color, level);\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n const sw = '' + (17 - 3 * i);\n sections += `\n .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${\n i - 1\n } polygon, .section-${i - 1} path {\n fill: ${adjuster(options['cScale' + i], 10)};\n stroke: ${adjuster(options['cScale' + i], 10)};\n\n }\n .section-${i - 1} text {\n fill: ${options['cScaleLabel' + i]};\n }\n .node-icon-${i - 1} {\n font-size: 40px;\n color: ${options['cScaleLabel' + i]};\n }\n .section-edge-${i - 1}{\n stroke: ${options['cScale' + i]};\n }\n .edge-depth-${i - 1}{\n stroke-width: ${sw};\n }\n .section-${i - 1} line {\n stroke: ${options['cScaleInv' + i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.background};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${options.background};\n stroke: ${options.nodeBorder};\n text-decoration: underline;\n }\n `;\n }\n return sections;\n};\n\n// TODO: These options seem incorrect.\nconst getStyles: DiagramStylesProvider = (options) =>\n `\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${options.textColor};\n fill: ${options.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`;\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport parser from './parser/kanban.jison';\nimport db from './kanbanDb.js';\nimport renderer from './kanbanRenderer.js';\nimport styles from './styles.js';\nimport type { DiagramDefinition } from '../../diagram-api/types.js';\n\nexport const diagram: DiagramDefinition = {\n db,\n renderer,\n parser,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,9],$V1=[1,10],$V2=[1,5,10,12];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SANKEY\":4,\"NEWLINE\":5,\"csv\":6,\"opt_eof\":7,\"record\":8,\"csv_tail\":9,\"EOF\":10,\"field[source]\":11,\"COMMA\":12,\"field[target]\":13,\"field[value]\":14,\"field\":15,\"escaped\":16,\"non_escaped\":17,\"DQUOTE\":18,\"ESCAPED_TEXT\":19,\"NON_ESCAPED_TEXT\":20,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SANKEY\",5:\"NEWLINE\",10:\"EOF\",11:\"field[source]\",12:\"COMMA\",13:\"field[target]\",14:\"field[value]\",18:\"DQUOTE\",19:\"ESCAPED_TEXT\",20:\"NON_ESCAPED_TEXT\"},\nproductions_: [0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 7:\n\n const source = yy.findOrCreateNode($$[$0-4].trim().replaceAll('\"\"', '\"'));\n const target = yy.findOrCreateNode($$[$0-2].trim().replaceAll('\"\"', '\"'));\n const value = parseFloat($$[$0].trim());\n yy.addLink(source,target,value);\n \nbreak;\ncase 8: case 9: case 11:\n this.$=$$[$0]; \nbreak;\ncase 10:\n this.$=$$[$0-1]; \nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:$V0,20:$V1},{1:[2,6],7:11,10:[1,12]},o($V1,[2,4],{9:13,5:[1,14]}),{12:[1,15]},o($V2,[2,8]),o($V2,[2,9]),{19:[1,16]},o($V2,[2,11]),{1:[2,1]},{1:[2,5]},o($V1,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:$V0,20:$V1},{15:18,16:7,17:8,18:$V0,20:$V1},{18:[1,19]},o($V1,[2,3]),{12:[1,20]},o($V2,[2,10]),{15:21,16:7,17:8,18:$V0,20:$V1},o([1,5,10],[2,7])],\ndefaultActions: {11:[2,1],12:[2,5]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.pushState('csv'); return 4; \nbreak;\ncase 1: return 10 \nbreak;\ncase 2: return 5 \nbreak;\ncase 3: return 12 \nbreak;\ncase 4: this.pushState('escaped_text'); return 18; \nbreak;\ncase 5: return 20 \nbreak;\ncase 6:this.popState('escaped_text'); return 18; \nbreak;\ncase 7: return 19; \nbreak;\n}\n},\nrules: [/^(?:sankey-beta\\b)/i,/^(?:$)/i,/^(?:((\\u000D\\u000A)|(\\u000A)))/i,/^(?:(\\u002C))/i,/^(?:(\\u0022))/i,/^(?:([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])*)/i,/^(?:(\\u0022)(?!(\\u0022)))/i,/^(?:(([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])|(\\u002C)|(\\u000D)|(\\u000A)|(\\u0022)(\\u0022))*)/i],\nconditions: {\"csv\":{\"rules\":[1,2,3,4,5,6,7],\"inclusive\":false},\"escaped_text\":{\"rules\":[6,7],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport common from '../common/common.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n setDiagramTitle,\n getDiagramTitle,\n clear as commonClear,\n} from '../common/commonDb.js';\n\n// Sankey diagram represented by nodes and links between those nodes\nlet links: SankeyLink[] = [];\n// Array of nodes guarantees their order\nlet nodes: SankeyNode[] = [];\n// We also have to track nodes uniqueness (by ID)\nlet nodesMap = new Map();\n\nconst clear = (): void => {\n links = [];\n nodes = [];\n nodesMap = new Map();\n commonClear();\n};\n\nclass SankeyLink {\n constructor(\n public source: SankeyNode,\n public target: SankeyNode,\n public value = 0\n ) {}\n}\n\n/**\n * @param source - Node where the link starts\n * @param target - Node where the link ends\n * @param value - Describes the amount to be passed\n */\nconst addLink = (source: SankeyNode, target: SankeyNode, value: number): void => {\n links.push(new SankeyLink(source, target, value));\n};\n\nclass SankeyNode {\n constructor(public ID: string) {}\n}\n\nconst findOrCreateNode = (ID: string): SankeyNode => {\n ID = common.sanitizeText(ID, getConfig());\n\n let node = nodesMap.get(ID);\n if (node === undefined) {\n node = new SankeyNode(ID);\n nodesMap.set(ID, node);\n nodes.push(node);\n }\n return node;\n};\n\nconst getNodes = () => nodes;\nconst getLinks = () => links;\n\nconst getGraph = () => ({\n nodes: nodes.map((node) => ({ id: node.ID })),\n links: links.map((link) => ({\n source: link.source.ID,\n target: link.target.ID,\n value: link.value,\n })),\n});\n\nexport default {\n nodesMap,\n getConfig: () => getConfig().sankey,\n getNodes,\n getLinks,\n getGraph,\n addLink,\n findOrCreateNode,\n getAccTitle,\n setAccTitle,\n getAccDescription,\n setAccDescription,\n getDiagramTitle,\n setDiagramTitle,\n clear,\n};\n", "export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n", "export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n", "export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n", "export {default as bisect, bisectRight, bisectLeft, bisectCenter} from \"./bisect.js\";\nexport {default as ascending} from \"./ascending.js\";\nexport {default as bisector} from \"./bisector.js\";\nexport {default as count} from \"./count.js\";\nexport {default as cross} from \"./cross.js\";\nexport {default as cumsum} from \"./cumsum.js\";\nexport {default as descending} from \"./descending.js\";\nexport {default as deviation} from \"./deviation.js\";\nexport {default as extent} from \"./extent.js\";\nexport {Adder, fsum, fcumsum} from \"./fsum.js\";\nexport {default as group, groups, index, indexes, rollup, rollups} from \"./group.js\";\nexport {default as groupSort} from \"./groupSort.js\";\nexport {default as bin, default as histogram} from \"./bin.js\"; // Deprecated; use bin.\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis.js\";\nexport {default as thresholdScott} from \"./threshold/scott.js\";\nexport {default as thresholdSturges} from \"./threshold/sturges.js\";\nexport {default as max} from \"./max.js\";\nexport {default as maxIndex} from \"./maxIndex.js\";\nexport {default as mean} from \"./mean.js\";\nexport {default as median} from \"./median.js\";\nexport {default as merge} from \"./merge.js\";\nexport {default as min} from \"./min.js\";\nexport {default as minIndex} from \"./minIndex.js\";\nexport {default as nice} from \"./nice.js\";\nexport {default as pairs} from \"./pairs.js\";\nexport {default as permute} from \"./permute.js\";\nexport {default as quantile, quantileSorted} from \"./quantile.js\";\nexport {default as quickselect} from \"./quickselect.js\";\nexport {default as range} from \"./range.js\";\nexport {default as least} from \"./least.js\";\nexport {default as leastIndex} from \"./leastIndex.js\";\nexport {default as greatest} from \"./greatest.js\";\nexport {default as greatestIndex} from \"./greatestIndex.js\";\nexport {default as scan} from \"./scan.js\"; // Deprecated; use leastIndex.\nexport {default as shuffle, shuffler} from \"./shuffle.js\";\nexport {default as sum} from \"./sum.js\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks.js\";\nexport {default as transpose} from \"./transpose.js\";\nexport {default as variance} from \"./variance.js\";\nexport {default as zip} from \"./zip.js\";\nexport {default as every} from \"./every.js\";\nexport {default as some} from \"./some.js\";\nexport {default as filter} from \"./filter.js\";\nexport {default as map} from \"./map.js\";\nexport {default as reduce} from \"./reduce.js\";\nexport {default as reverse} from \"./reverse.js\";\nexport {default as sort} from \"./sort.js\";\nexport {default as difference} from \"./difference.js\";\nexport {default as disjoint} from \"./disjoint.js\";\nexport {default as intersection} from \"./intersection.js\";\nexport {default as subset} from \"./subset.js\";\nexport {default as superset} from \"./superset.js\";\nexport {default as union} from \"./union.js\";\nexport {InternMap, InternSet} from \"internmap\";\n", "import {min} from \"d3-array\";\n\nfunction targetDepth(d) {\n return d.target.depth;\n}\n\nexport function left(node) {\n return node.depth;\n}\n\nexport function right(node, n) {\n return n - 1 - node.height;\n}\n\nexport function justify(node, n) {\n return node.sourceLinks.length ? node.depth : n - 1;\n}\n\nexport function center(node) {\n return node.targetLinks.length ? node.depth\n : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1\n : 0;\n}\n", "export default function constant(x) {\n return function() {\n return x;\n };\n}\n", "import {max, min, sum} from \"d3-array\";\nimport {justify} from \"./align.js\";\nimport constant from \"./constant.js\";\n\nfunction ascendingSourceBreadth(a, b) {\n return ascendingBreadth(a.source, b.source) || a.index - b.index;\n}\n\nfunction ascendingTargetBreadth(a, b) {\n return ascendingBreadth(a.target, b.target) || a.index - b.index;\n}\n\nfunction ascendingBreadth(a, b) {\n return a.y0 - b.y0;\n}\n\nfunction value(d) {\n return d.value;\n}\n\nfunction defaultId(d) {\n return d.index;\n}\n\nfunction defaultNodes(graph) {\n return graph.nodes;\n}\n\nfunction defaultLinks(graph) {\n return graph.links;\n}\n\nfunction find(nodeById, id) {\n const node = nodeById.get(id);\n if (!node) throw new Error(\"missing: \" + id);\n return node;\n}\n\nfunction computeLinkBreadths({nodes}) {\n for (const node of nodes) {\n let y0 = node.y0;\n let y1 = y0;\n for (const link of node.sourceLinks) {\n link.y0 = y0 + link.width / 2;\n y0 += link.width;\n }\n for (const link of node.targetLinks) {\n link.y1 = y1 + link.width / 2;\n y1 += link.width;\n }\n }\n}\n\nexport default function Sankey() {\n let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent\n let dx = 24; // nodeWidth\n let dy = 8, py; // nodePadding\n let id = defaultId;\n let align = justify;\n let sort;\n let linkSort;\n let nodes = defaultNodes;\n let links = defaultLinks;\n let iterations = 6;\n\n function sankey() {\n const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)};\n computeNodeLinks(graph);\n computeNodeValues(graph);\n computeNodeDepths(graph);\n computeNodeHeights(graph);\n computeNodeBreadths(graph);\n computeLinkBreadths(graph);\n return graph;\n }\n\n sankey.update = function(graph) {\n computeLinkBreadths(graph);\n return graph;\n };\n\n sankey.nodeId = function(_) {\n return arguments.length ? (id = typeof _ === \"function\" ? _ : constant(_), sankey) : id;\n };\n\n sankey.nodeAlign = function(_) {\n return arguments.length ? (align = typeof _ === \"function\" ? _ : constant(_), sankey) : align;\n };\n\n sankey.nodeSort = function(_) {\n return arguments.length ? (sort = _, sankey) : sort;\n };\n\n sankey.nodeWidth = function(_) {\n return arguments.length ? (dx = +_, sankey) : dx;\n };\n\n sankey.nodePadding = function(_) {\n return arguments.length ? (dy = py = +_, sankey) : dy;\n };\n\n sankey.nodes = function(_) {\n return arguments.length ? (nodes = typeof _ === \"function\" ? _ : constant(_), sankey) : nodes;\n };\n\n sankey.links = function(_) {\n return arguments.length ? (links = typeof _ === \"function\" ? _ : constant(_), sankey) : links;\n };\n\n sankey.linkSort = function(_) {\n return arguments.length ? (linkSort = _, sankey) : linkSort;\n };\n\n sankey.size = function(_) {\n return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];\n };\n\n sankey.extent = function(_) {\n return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];\n };\n\n sankey.iterations = function(_) {\n return arguments.length ? (iterations = +_, sankey) : iterations;\n };\n\n function computeNodeLinks({nodes, links}) {\n for (const [i, node] of nodes.entries()) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n }\n const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d]));\n for (const [i, link] of links.entries()) {\n link.index = i;\n let {source, target} = link;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n }\n if (linkSort != null) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(linkSort);\n targetLinks.sort(linkSort);\n }\n }\n }\n\n function computeNodeValues({nodes}) {\n for (const node of nodes) {\n node.value = node.fixedValue === undefined\n ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value))\n : node.fixedValue;\n }\n }\n\n function computeNodeDepths({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.depth = x;\n for (const {target} of node.sourceLinks) {\n next.add(target);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeHeights({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.height = x;\n for (const {source} of node.targetLinks) {\n next.add(source);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeLayers({nodes}) {\n const x = max(nodes, d => d.depth) + 1;\n const kx = (x1 - x0 - dx) / (x - 1);\n const columns = new Array(x);\n for (const node of nodes) {\n const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x))));\n node.layer = i;\n node.x0 = x0 + i * kx;\n node.x1 = node.x0 + dx;\n if (columns[i]) columns[i].push(node);\n else columns[i] = [node];\n }\n if (sort) for (const column of columns) {\n column.sort(sort);\n }\n return columns;\n }\n\n function initializeNodeBreadths(columns) {\n const ky = min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum(c, value));\n for (const nodes of columns) {\n let y = y0;\n for (const node of nodes) {\n node.y0 = y;\n node.y1 = y + node.value * ky;\n y = node.y1 + py;\n for (const link of node.sourceLinks) {\n link.width = link.value * ky;\n }\n }\n y = (y1 - y + py) / (nodes.length + 1);\n for (let i = 0; i < nodes.length; ++i) {\n const node = nodes[i];\n node.y0 += y * (i + 1);\n node.y1 += y * (i + 1);\n }\n reorderLinks(nodes);\n }\n }\n\n function computeNodeBreadths(graph) {\n const columns = computeNodeLayers(graph);\n py = Math.min(dy, (y1 - y0) / (max(columns, c => c.length) - 1));\n initializeNodeBreadths(columns);\n for (let i = 0; i < iterations; ++i) {\n const alpha = Math.pow(0.99, i);\n const beta = Math.max(1 - alpha, (i + 1) / iterations);\n relaxRightToLeft(columns, alpha, beta);\n relaxLeftToRight(columns, alpha, beta);\n }\n }\n\n // Reposition each node based on its incoming (target) links.\n function relaxLeftToRight(columns, alpha, beta) {\n for (let i = 1, n = columns.length; i < n; ++i) {\n const column = columns[i];\n for (const target of column) {\n let y = 0;\n let w = 0;\n for (const {source, value} of target.targetLinks) {\n let v = value * (target.layer - source.layer);\n y += targetTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - target.y0) * alpha;\n target.y0 += dy;\n target.y1 += dy;\n reorderNodeLinks(target);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n // Reposition each node based on its outgoing (source) links.\n function relaxRightToLeft(columns, alpha, beta) {\n for (let n = columns.length, i = n - 2; i >= 0; --i) {\n const column = columns[i];\n for (const source of column) {\n let y = 0;\n let w = 0;\n for (const {target, value} of source.sourceLinks) {\n let v = value * (target.layer - source.layer);\n y += sourceTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - source.y0) * alpha;\n source.y0 += dy;\n source.y1 += dy;\n reorderNodeLinks(source);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n function resolveCollisions(nodes, alpha) {\n const i = nodes.length >> 1;\n const subject = nodes[i];\n resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha);\n resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha);\n resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha);\n resolveCollisionsTopToBottom(nodes, y0, 0, alpha);\n }\n\n // Push any overlapping nodes down.\n function resolveCollisionsTopToBottom(nodes, y, i, alpha) {\n for (; i < nodes.length; ++i) {\n const node = nodes[i];\n const dy = (y - node.y0) * alpha;\n if (dy > 1e-6) node.y0 += dy, node.y1 += dy;\n y = node.y1 + py;\n }\n }\n\n // Push any overlapping nodes up.\n function resolveCollisionsBottomToTop(nodes, y, i, alpha) {\n for (; i >= 0; --i) {\n const node = nodes[i];\n const dy = (node.y1 - y) * alpha;\n if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy;\n y = node.y0 - py;\n }\n }\n\n function reorderNodeLinks({sourceLinks, targetLinks}) {\n if (linkSort === undefined) {\n for (const {source: {sourceLinks}} of targetLinks) {\n sourceLinks.sort(ascendingTargetBreadth);\n }\n for (const {target: {targetLinks}} of sourceLinks) {\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n function reorderLinks(nodes) {\n if (linkSort === undefined) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(ascendingTargetBreadth);\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n // Returns the target.y0 that would produce an ideal link from source to target.\n function targetTop(source, target) {\n let y = source.y0 - (source.sourceLinks.length - 1) * py / 2;\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y += width + py;\n }\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y -= width;\n }\n return y;\n }\n\n // Returns the source.y0 that would produce an ideal link from source to target.\n function sourceTop(source, target) {\n let y = target.y0 - (target.targetLinks.length - 1) * py / 2;\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y += width + py;\n }\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y -= width;\n }\n return y;\n }\n\n return sankey;\n}\n", "var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We\u2019re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n", "export {default as path} from \"./path.js\";\n", "export default function(x) {\n return function constant() {\n return x;\n };\n}\n", "export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n", "export var slice = Array.prototype.slice;\n", "import {path} from \"d3-path\";\nimport {slice} from \"../array.js\";\nimport constant from \"../constant.js\";\nimport {x as pointX, y as pointY} from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nfunction link(curve) {\n var source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null;\n\n function link() {\n var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n if (!context) context = buffer = path();\n curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), link) : context;\n };\n\n return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n var p0 = pointRadial(x0, y0),\n p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n p2 = pointRadial(x1, y0),\n p3 = pointRadial(x1, y1);\n context.moveTo(p0[0], p0[1]);\n context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n return link(curveHorizontal);\n}\n\nexport function linkVertical() {\n return link(curveVertical);\n}\n\nexport function linkRadial() {\n var l = link(curveRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n", "export {default as arc} from \"./arc.js\";\nexport {default as area} from \"./area.js\";\nexport {default as line} from \"./line.js\";\nexport {default as pie} from \"./pie.js\";\nexport {default as areaRadial, default as radialArea} from \"./areaRadial.js\"; // Note: radialArea is deprecated!\nexport {default as lineRadial, default as radialLine} from \"./lineRadial.js\"; // Note: radialLine is deprecated!\nexport {default as pointRadial} from \"./pointRadial.js\";\nexport {linkHorizontal, linkVertical, linkRadial} from \"./link/index.js\";\n\nexport {default as symbol, symbols} from \"./symbol.js\";\nexport {default as symbolCircle} from \"./symbol/circle.js\";\nexport {default as symbolCross} from \"./symbol/cross.js\";\nexport {default as symbolDiamond} from \"./symbol/diamond.js\";\nexport {default as symbolSquare} from \"./symbol/square.js\";\nexport {default as symbolStar} from \"./symbol/star.js\";\nexport {default as symbolTriangle} from \"./symbol/triangle.js\";\nexport {default as symbolWye} from \"./symbol/wye.js\";\n\nexport {default as curveBasisClosed} from \"./curve/basisClosed.js\";\nexport {default as curveBasisOpen} from \"./curve/basisOpen.js\";\nexport {default as curveBasis} from \"./curve/basis.js\";\nexport {default as curveBundle} from \"./curve/bundle.js\";\nexport {default as curveCardinalClosed} from \"./curve/cardinalClosed.js\";\nexport {default as curveCardinalOpen} from \"./curve/cardinalOpen.js\";\nexport {default as curveCardinal} from \"./curve/cardinal.js\";\nexport {default as curveCatmullRomClosed} from \"./curve/catmullRomClosed.js\";\nexport {default as curveCatmullRomOpen} from \"./curve/catmullRomOpen.js\";\nexport {default as curveCatmullRom} from \"./curve/catmullRom.js\";\nexport {default as curveLinearClosed} from \"./curve/linearClosed.js\";\nexport {default as curveLinear} from \"./curve/linear.js\";\nexport {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from \"./curve/monotone.js\";\nexport {default as curveNatural} from \"./curve/natural.js\";\nexport {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from \"./curve/step.js\";\n\nexport {default as stack} from \"./stack.js\";\nexport {default as stackOffsetExpand} from \"./offset/expand.js\";\nexport {default as stackOffsetDiverging} from \"./offset/diverging.js\";\nexport {default as stackOffsetNone} from \"./offset/none.js\";\nexport {default as stackOffsetSilhouette} from \"./offset/silhouette.js\";\nexport {default as stackOffsetWiggle} from \"./offset/wiggle.js\";\nexport {default as stackOrderAppearance} from \"./order/appearance.js\";\nexport {default as stackOrderAscending} from \"./order/ascending.js\";\nexport {default as stackOrderDescending} from \"./order/descending.js\";\nexport {default as stackOrderInsideOut} from \"./order/insideOut.js\";\nexport {default as stackOrderNone} from \"./order/none.js\";\nexport {default as stackOrderReverse} from \"./order/reverse.js\";\n", "import {linkHorizontal} from \"d3-shape\";\n\nfunction horizontalSource(d) {\n return [d.source.x1, d.y0];\n}\n\nfunction horizontalTarget(d) {\n return [d.target.x0, d.y1];\n}\n\nexport default function() {\n return linkHorizontal()\n .source(horizontalSource)\n .target(horizontalTarget);\n}\n", "export {default as sankey} from \"./sankey.js\";\nexport {center as sankeyCenter, left as sankeyLeft, right as sankeyRight, justify as sankeyJustify} from \"./align.js\";\nexport {default as sankeyLinkHorizontal} from \"./sankeyLinkHorizontal.js\";\n", "export class Uid {\n private static count = 0;\n id: string;\n href: string;\n\n public static next(name: string): Uid {\n return new Uid(name + ++Uid.count);\n }\n\n constructor(id: string) {\n this.id = id;\n this.href = `#${id}`;\n }\n\n toString(): string {\n return 'url(' + this.href + ')';\n }\n}\n", "import type { Diagram } from '../../Diagram.js';\nimport { getConfig, defaultConfig } from '../../diagram-api/diagramAPI.js';\nimport {\n select as d3select,\n scaleOrdinal as d3scaleOrdinal,\n schemeTableau10 as d3schemeTableau10,\n} from 'd3';\nimport type { SankeyNode as d3SankeyNode } from 'd3-sankey';\nimport {\n sankey as d3Sankey,\n sankeyLinkHorizontal as d3SankeyLinkHorizontal,\n sankeyLeft as d3SankeyLeft,\n sankeyRight as d3SankeyRight,\n sankeyCenter as d3SankeyCenter,\n sankeyJustify as d3SankeyJustify,\n} from 'd3-sankey';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport { Uid } from '../../rendering-util/uid.js';\nimport type { SankeyNodeAlignment } from '../../config.type.js';\n\n// Map config options to alignment functions\nconst alignmentsMap: Record<\n SankeyNodeAlignment,\n (node: d3SankeyNode, n: number) => number\n> = {\n left: d3SankeyLeft,\n right: d3SankeyRight,\n center: d3SankeyCenter,\n justify: d3SankeyJustify,\n};\n\n/**\n * Draws Sankey diagram.\n *\n * @param text - The text of the diagram\n * @param id - The id of the diagram which will be used as a DOM element id\u00A8\n * @param _version - Mermaid version from package.json\n * @param diagObj - A standard diagram containing the db and the text and type etc of the diagram\n */\nexport const draw = function (text: string, id: string, _version: string, diagObj: Diagram): void {\n // Get Sankey config\n const { securityLevel, sankey: conf } = getConfig();\n const defaultSankeyConfig = defaultConfig.sankey!;\n\n // TODO:\n // This code repeats for every diagram\n // Figure out what is happening there, probably it should be separated\n // The main thing is svg object that is a d3 wrapper for svg operations\n //\n let sandboxElement: any;\n if (securityLevel === 'sandbox') {\n sandboxElement = d3select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? d3select(sandboxElement.nodes()[0].contentDocument.body)\n : d3select('body');\n // @ts-ignore TODO root.select is not callable\n const svg = securityLevel === 'sandbox' ? root.select(`[id=\"${id}\"]`) : d3select(`[id=\"${id}\"]`);\n\n // Establish svg dimensions and get width and height\n //\n const width = conf?.width ?? defaultSankeyConfig.width!;\n const height = conf?.height ?? defaultSankeyConfig.width!;\n const useMaxWidth = conf?.useMaxWidth ?? defaultSankeyConfig.useMaxWidth!;\n const nodeAlignment = conf?.nodeAlignment ?? defaultSankeyConfig.nodeAlignment!;\n const prefix = conf?.prefix ?? defaultSankeyConfig.prefix!;\n const suffix = conf?.suffix ?? defaultSankeyConfig.suffix!;\n const showValues = conf?.showValues ?? defaultSankeyConfig.showValues!;\n\n // Prepare data for construction based on diagObj.db\n // This must be a mutable object with `nodes` and `links` properties:\n //\n // {\n // \"nodes\": [ { \"id\": \"Alice\" }, { \"id\": \"Bob\" }, { \"id\": \"Carol\" } ],\n // \"links\": [ { \"source\": \"Alice\", \"target\": \"Bob\", \"value\": 23 }, { \"source\": \"Bob\", \"target\": \"Carol\", \"value\": 43 } ]\n // }\n //\n // @ts-ignore TODO: db should be coerced to sankey DB type\n const graph = diagObj.db.getGraph();\n\n // Get alignment function\n const nodeAlign = alignmentsMap[nodeAlignment];\n\n // Construct and configure a Sankey generator\n // That will be a function that calculates nodes and links dimensions\n //\n const nodeWidth = 10;\n const sankey = d3Sankey()\n .nodeId((d: any) => d.id) // we use 'id' property to identify node\n .nodeWidth(nodeWidth)\n .nodePadding(10 + (showValues ? 15 : 0))\n .nodeAlign(nodeAlign)\n .extent([\n [0, 0],\n [width, height],\n ]);\n\n // Compute the Sankey layout: calculate nodes and links positions\n // Our `graph` object will be mutated by this and enriched with other properties\n //\n sankey(graph);\n\n // Get color scheme for the graph\n const colorScheme = d3scaleOrdinal(d3schemeTableau10);\n\n // Create rectangles for nodes\n svg\n .append('g')\n .attr('class', 'nodes')\n .selectAll('.node')\n .data(graph.nodes)\n .join('g')\n .attr('class', 'node')\n .attr('id', (d: any) => (d.uid = Uid.next('node-')).id)\n .attr('transform', function (d: any) {\n return 'translate(' + d.x0 + ',' + d.y0 + ')';\n })\n .attr('x', (d: any) => d.x0)\n .attr('y', (d: any) => d.y0)\n .append('rect')\n .attr('height', (d: any) => {\n return d.y1 - d.y0;\n })\n .attr('width', (d: any) => d.x1 - d.x0)\n .attr('fill', (d: any) => colorScheme(d.id));\n\n const getText = ({ id, value }: { id: string; value: number }) => {\n if (!showValues) {\n return id;\n }\n return `${id}\\n${prefix}${Math.round(value * 100) / 100}${suffix}`;\n };\n\n // Create labels for nodes\n svg\n .append('g')\n .attr('class', 'node-labels')\n .attr('font-family', 'sans-serif')\n .attr('font-size', 14)\n .selectAll('text')\n .data(graph.nodes)\n .join('text')\n .attr('x', (d: any) => (d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6))\n .attr('y', (d: any) => (d.y1 + d.y0) / 2)\n .attr('dy', `${showValues ? '0' : '0.35'}em`)\n .attr('text-anchor', (d: any) => (d.x0 < width / 2 ? 'start' : 'end'))\n .text(getText);\n\n // Creates the paths that represent the links.\n const link = svg\n .append('g')\n .attr('class', 'links')\n .attr('fill', 'none')\n .attr('stroke-opacity', 0.5)\n .selectAll('.link')\n .data(graph.links)\n .join('g')\n .attr('class', 'link')\n .style('mix-blend-mode', 'multiply');\n\n const linkColor = conf?.linkColor ?? 'gradient';\n\n if (linkColor === 'gradient') {\n const gradient = link\n .append('linearGradient')\n .attr('id', (d: any) => (d.uid = Uid.next('linearGradient-')).id)\n .attr('gradientUnits', 'userSpaceOnUse')\n .attr('x1', (d: any) => d.source.x1)\n .attr('x2', (d: any) => d.target.x0);\n\n gradient\n .append('stop')\n .attr('offset', '0%')\n .attr('stop-color', (d: any) => colorScheme(d.source.id));\n\n gradient\n .append('stop')\n .attr('offset', '100%')\n .attr('stop-color', (d: any) => colorScheme(d.target.id));\n }\n\n let coloring: any;\n switch (linkColor) {\n case 'gradient':\n coloring = (d: any) => d.uid;\n break;\n case 'source':\n coloring = (d: any) => colorScheme(d.source.id);\n break;\n case 'target':\n coloring = (d: any) => colorScheme(d.target.id);\n break;\n default:\n coloring = linkColor;\n }\n\n link\n .append('path')\n .attr('d', d3SankeyLinkHorizontal())\n .attr('stroke', coloring)\n .attr('stroke-width', (d: any) => Math.max(1, d.width));\n\n setupGraphViewbox(undefined, svg, 0, useMaxWidth);\n};\n\nexport default {\n draw,\n};\n", "export const prepareTextForParsing = (text: string): string => {\n const textToParse = text\n .replaceAll(/^[^\\S\\n\\r]+|[^\\S\\n\\r]+$/g, '') // remove all trailing spaces for each row\n .replaceAll(/([\\n\\r])+/g, '\\n') // remove empty lines duplicated\n .trim();\n\n return textToParse;\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: jison doesn't export types\nimport parser from './parser/sankey.jison';\nimport db from './sankeyDB.js';\nimport renderer from './sankeyRenderer.js';\nimport { prepareTextForParsing } from './sankeyUtils.js';\n\nconst originalParse = parser.parse.bind(parser);\nparser.parse = (text: string) => originalParse(prepareTextForParsing(text));\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n};\n", "import { getConfig as commonGetConfig } from '../../config.js';\nimport type { PacketDiagramConfig } from '../../config.type.js';\nimport DEFAULT_CONFIG from '../../defaultConfig.js';\nimport { cleanAndMerge } from '../../utils.js';\nimport {\n clear as commonClear,\n getAccDescription,\n getAccTitle,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n} from '../common/commonDb.js';\nimport type { PacketDB, PacketData, PacketWord } from './types.js';\n\nconst defaultPacketData: PacketData = {\n packet: [],\n};\n\nlet data: PacketData = structuredClone(defaultPacketData);\n\nconst DEFAULT_PACKET_CONFIG: Required = DEFAULT_CONFIG.packet;\n\nconst getConfig = (): Required => {\n const config = cleanAndMerge({\n ...DEFAULT_PACKET_CONFIG,\n ...commonGetConfig().packet,\n });\n if (config.showBits) {\n config.paddingY += 10;\n }\n return config;\n};\n\nconst getPacket = (): PacketWord[] => data.packet;\n\nconst pushWord = (word: PacketWord) => {\n if (word.length > 0) {\n data.packet.push(word);\n }\n};\n\nconst clear = () => {\n commonClear();\n data = structuredClone(defaultPacketData);\n};\n\nexport const db: PacketDB = {\n pushWord,\n getPacket,\n getConfig,\n clear,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n};\n", "import type { Packet } from '@mermaid-js/parser';\nimport { parse } from '@mermaid-js/parser';\nimport type { ParserDefinition } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { populateCommonDb } from '../common/populateCommonDb.js';\nimport { db } from './db.js';\nimport type { PacketBlock, PacketWord } from './types.js';\n\nconst maxPacketSize = 10_000;\n\nconst populate = (ast: Packet) => {\n populateCommonDb(ast, db);\n let lastByte = -1;\n let word: PacketWord = [];\n let row = 1;\n const { bitsPerRow } = db.getConfig();\n for (let { start, end, label } of ast.blocks) {\n if (end && end < start) {\n throw new Error(`Packet block ${start} - ${end} is invalid. End must be greater than start.`);\n }\n if (start !== lastByte + 1) {\n throw new Error(\n `Packet block ${start} - ${end ?? start} is not contiguous. It should start from ${\n lastByte + 1\n }.`\n );\n }\n lastByte = end ?? start;\n log.debug(`Packet block ${start} - ${lastByte} with label ${label}`);\n\n while (word.length <= bitsPerRow + 1 && db.getPacket().length < maxPacketSize) {\n const [block, nextBlock] = getNextFittingBlock({ start, end, label }, row, bitsPerRow);\n word.push(block);\n if (block.end + 1 === row * bitsPerRow) {\n db.pushWord(word);\n word = [];\n row++;\n }\n if (!nextBlock) {\n break;\n }\n ({ start, end, label } = nextBlock);\n }\n }\n db.pushWord(word);\n};\n\nconst getNextFittingBlock = (\n block: PacketBlock,\n row: number,\n bitsPerRow: number\n): [Required, PacketBlock | undefined] => {\n if (block.end === undefined) {\n block.end = block.start;\n }\n\n if (block.start > block.end) {\n throw new Error(`Block start ${block.start} is greater than block end ${block.end}.`);\n }\n\n if (block.end + 1 <= row * bitsPerRow) {\n return [block as Required, undefined];\n }\n\n return [\n {\n start: block.start,\n end: row * bitsPerRow - 1,\n label: block.label,\n },\n {\n start: row * bitsPerRow,\n end: block.end,\n label: block.label,\n },\n ];\n};\n\nexport const parser: ParserDefinition = {\n parse: async (input: string): Promise => {\n const ast: Packet = await parse('packet', input);\n log.debug(ast);\n populate(ast);\n },\n};\n", "import type { Diagram } from '../../Diagram.js';\nimport type { PacketDiagramConfig } from '../../config.type.js';\nimport type { DiagramRenderer, DrawDefinition, SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type { PacketDB, PacketWord } from './types.js';\n\nconst draw: DrawDefinition = (_text, id, _version, diagram: Diagram) => {\n const db = diagram.db as PacketDB;\n const config = db.getConfig();\n const { rowHeight, paddingY, bitWidth, bitsPerRow } = config;\n const words = db.getPacket();\n const title = db.getDiagramTitle();\n const totalRowHeight = rowHeight + paddingY;\n const svgHeight = totalRowHeight * (words.length + 1) - (title ? 0 : rowHeight);\n const svgWidth = bitWidth * bitsPerRow + 2;\n const svg: SVG = selectSvgElement(id);\n\n svg.attr('viewbox', `0 0 ${svgWidth} ${svgHeight}`);\n configureSvgSize(svg, svgHeight, svgWidth, config.useMaxWidth);\n\n for (const [word, packet] of words.entries()) {\n drawWord(svg, packet, word, config);\n }\n\n svg\n .append('text')\n .text(title)\n .attr('x', svgWidth / 2)\n .attr('y', svgHeight - totalRowHeight / 2)\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .attr('class', 'packetTitle');\n};\n\nconst drawWord = (\n svg: SVG,\n word: PacketWord,\n rowNumber: number,\n { rowHeight, paddingX, paddingY, bitWidth, bitsPerRow, showBits }: Required\n) => {\n const group: SVGGroup = svg.append('g');\n const wordY = rowNumber * (rowHeight + paddingY) + paddingY;\n for (const block of word) {\n const blockX = (block.start % bitsPerRow) * bitWidth + 1;\n const width = (block.end - block.start + 1) * bitWidth - paddingX;\n // Block rectangle\n group\n .append('rect')\n .attr('x', blockX)\n .attr('y', wordY)\n .attr('width', width)\n .attr('height', rowHeight)\n .attr('class', 'packetBlock');\n\n // Block label\n group\n .append('text')\n .attr('x', blockX + width / 2)\n .attr('y', wordY + rowHeight / 2)\n .attr('class', 'packetLabel')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .text(block.label);\n\n if (!showBits) {\n continue;\n }\n // Start byte count\n const isSingleBlock = block.end === block.start;\n const bitNumberY = wordY - 2;\n group\n .append('text')\n .attr('x', blockX + (isSingleBlock ? width / 2 : 0))\n .attr('y', bitNumberY)\n .attr('class', 'packetByte start')\n .attr('dominant-baseline', 'auto')\n .attr('text-anchor', isSingleBlock ? 'middle' : 'start')\n .text(block.start);\n\n // Draw end byte count if it is not the same as start byte count\n if (!isSingleBlock) {\n group\n .append('text')\n .attr('x', blockX + width)\n .attr('y', bitNumberY)\n .attr('class', 'packetByte end')\n .attr('dominant-baseline', 'auto')\n .attr('text-anchor', 'end')\n .text(block.end);\n }\n }\n};\nexport const renderer: DiagramRenderer = { draw };\n", "import type { DiagramStylesProvider } from '../../diagram-api/types.js';\nimport { cleanAndMerge } from '../../utils.js';\nimport type { PacketStyleOptions } from './types.js';\n\nconst defaultPacketStyleOptions: PacketStyleOptions = {\n byteFontSize: '10px',\n startByteColor: 'black',\n endByteColor: 'black',\n labelColor: 'black',\n labelFontSize: '12px',\n titleColor: 'black',\n titleFontSize: '14px',\n blockStrokeColor: 'black',\n blockStrokeWidth: '1',\n blockFillColor: '#efefef',\n};\n\nexport const styles: DiagramStylesProvider = ({ packet }: { packet?: PacketStyleOptions } = {}) => {\n const options = cleanAndMerge(defaultPacketStyleOptions, packet);\n\n return `\n\t.packetByte {\n\t\tfont-size: ${options.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${options.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${options.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${options.labelColor};\n\t\tfont-size: ${options.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${options.titleColor};\n\t\tfont-size: ${options.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${options.blockStrokeColor};\n\t\tstroke-width: ${options.blockStrokeWidth};\n\t\tfill: ${options.blockFillColor};\n\t}\n\t`;\n};\n\nexport default styles;\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { db } from './db.js';\nimport { parser } from './parser.js';\nimport { renderer } from './renderer.js';\nimport { styles } from './styles.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,7],$V1=[1,13],$V2=[1,14],$V3=[1,15],$V4=[1,19],$V5=[1,16],$V6=[1,17],$V7=[1,18],$V8=[8,30],$V9=[8,21,28,29,30,31,32,40,44,47],$Va=[1,23],$Vb=[1,24],$Vc=[8,15,16,21,28,29,30,31,32,40,44,47],$Vd=[8,15,16,21,27,28,29,30,31,32,40,44,47],$Ve=[1,49];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"spaceLines\":3,\"SPACELINE\":4,\"NL\":5,\"separator\":6,\"SPACE\":7,\"EOF\":8,\"start\":9,\"BLOCK_DIAGRAM_KEY\":10,\"document\":11,\"stop\":12,\"statement\":13,\"link\":14,\"LINK\":15,\"START_LINK\":16,\"LINK_LABEL\":17,\"STR\":18,\"nodeStatement\":19,\"columnsStatement\":20,\"SPACE_BLOCK\":21,\"blockStatement\":22,\"classDefStatement\":23,\"cssClassStatement\":24,\"styleStatement\":25,\"node\":26,\"SIZE\":27,\"COLUMNS\":28,\"id-block\":29,\"end\":30,\"block\":31,\"NODE_ID\":32,\"nodeShapeNLabel\":33,\"dirList\":34,\"DIR\":35,\"NODE_DSTART\":36,\"NODE_DEND\":37,\"BLOCK_ARROW_START\":38,\"BLOCK_ARROW_END\":39,\"classDef\":40,\"CLASSDEF_ID\":41,\"CLASSDEF_STYLEOPTS\":42,\"DEFAULT\":43,\"class\":44,\"CLASSENTITY_IDS\":45,\"STYLECLASS\":46,\"style\":47,\"STYLE_ENTITY_IDS\":48,\"STYLE_DEFINITION_DATA\":49,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACELINE\",5:\"NL\",7:\"SPACE\",8:\"EOF\",10:\"BLOCK_DIAGRAM_KEY\",15:\"LINK\",16:\"START_LINK\",17:\"LINK_LABEL\",18:\"STR\",21:\"SPACE_BLOCK\",27:\"SIZE\",28:\"COLUMNS\",29:\"id-block\",30:\"end\",31:\"block\",32:\"NODE_ID\",35:\"DIR\",36:\"NODE_DSTART\",37:\"NODE_DEND\",38:\"BLOCK_ARROW_START\",39:\"BLOCK_ARROW_END\",40:\"classDef\",41:\"CLASSDEF_ID\",42:\"CLASSDEF_STYLEOPTS\",43:\"DEFAULT\",44:\"class\",45:\"CLASSENTITY_IDS\",46:\"STYLECLASS\",47:\"style\",48:\"STYLE_ENTITY_IDS\",49:\"STYLE_DEFINITION_DATA\"},\nproductions_: [0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\nyy.getLogger().debug('Rule: separator (NL) ');\nbreak;\ncase 5:\nyy.getLogger().debug('Rule: separator (Space) ');\nbreak;\ncase 6:\nyy.getLogger().debug('Rule: separator (EOF) ');\nbreak;\ncase 7:\n yy.getLogger().debug(\"Rule: hierarchy: \", $$[$0-1]); yy.setHierarchy($$[$0-1]); \nbreak;\ncase 8:\nyy.getLogger().debug('Stop NL ');\nbreak;\ncase 9:\nyy.getLogger().debug('Stop EOF ');\nbreak;\ncase 10:\nyy.getLogger().debug('Stop NL2 ');\nbreak;\ncase 11:\nyy.getLogger().debug('Stop EOF2 ');\nbreak;\ncase 12:\n yy.getLogger().debug(\"Rule: statement: \", $$[$0]); typeof $$[$0].length === 'number'?this.$ = $$[$0]:this.$ = [$$[$0]]; \nbreak;\ncase 13:\n yy.getLogger().debug(\"Rule: statement #2: \", $$[$0-1]); this.$ = [$$[$0-1]].concat($$[$0]); \nbreak;\ncase 14:\n yy.getLogger().debug(\"Rule: link: \", $$[$0], yytext); this.$={edgeTypeStr: $$[$0], label:''}; \nbreak;\ncase 15:\n yy.getLogger().debug(\"Rule: LABEL link: \", $$[$0-3], $$[$0-1], $$[$0]); this.$={edgeTypeStr: $$[$0], label:$$[$0-1]}; \nbreak;\ncase 18:\n const num=parseInt($$[$0]); const spaceId = yy.generateId(); this.$ = { id: spaceId, type:'space', label:'', width: num, children: [] }\nbreak;\ncase 23:\n\n yy.getLogger().debug('Rule: (nodeStatement link node) ', $$[$0-2], $$[$0-1], $$[$0], ' typestr: ',$$[$0-1].edgeTypeStr);\n const edgeData = yy.edgeStrToEdgeData($$[$0-1].edgeTypeStr)\n this.$ = [\n {id: $$[$0-2].id, label: $$[$0-2].label, type:$$[$0-2].type, directions: $$[$0-2].directions},\n {id: $$[$0-2].id + '-' + $$[$0].id, start: $$[$0-2].id, end: $$[$0].id, label: $$[$0-1].label, type: 'edge', directions: $$[$0].directions, arrowTypeEnd: edgeData, arrowTypeStart: 'arrow_open' },\n {id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions}\n ];\n \nbreak;\ncase 24:\n yy.getLogger().debug('Rule: nodeStatement (abc88 node size) ', $$[$0-1], $$[$0]); this.$ = {id: $$[$0-1].id, label: $$[$0-1].label, type: yy.typeStr2Type($$[$0-1].typeStr), directions: $$[$0-1].directions, widthInColumns: parseInt($$[$0],10)}; \nbreak;\ncase 25:\n yy.getLogger().debug('Rule: nodeStatement (node) ', $$[$0]); this.$ = {id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions, widthInColumns:1}; \nbreak;\ncase 26:\n yy.getLogger().debug('APA123', this? this:'na'); yy.getLogger().debug(\"COLUMNS: \", $$[$0]); this.$ = {type: 'column-setting', columns: $$[$0] === 'auto'?-1:parseInt($$[$0]) } \nbreak;\ncase 27:\n yy.getLogger().debug('Rule: id-block statement : ', $$[$0-2], $$[$0-1]); const id2 = yy.generateId(); this.$ = { ...$$[$0-2], type:'composite', children: $$[$0-1] }; \nbreak;\ncase 28:\n yy.getLogger().debug('Rule: blockStatement : ', $$[$0-2], $$[$0-1], $$[$0]); const id = yy.generateId(); this.$ = { id, type:'composite', label:'', children: $$[$0-1] }; \nbreak;\ncase 29:\n yy.getLogger().debug(\"Rule: node (NODE_ID separator): \", $$[$0]); this.$ = { id: $$[$0] }; \nbreak;\ncase 30:\n\n yy.getLogger().debug(\"Rule: node (NODE_ID nodeShapeNLabel separator): \", $$[$0-1], $$[$0]);\n this.$ = { id: $$[$0-1], label: $$[$0].label, typeStr: $$[$0].typeStr, directions: $$[$0].directions };\n \nbreak;\ncase 31:\n yy.getLogger().debug(\"Rule: dirList: \", $$[$0]); this.$ = [$$[$0]]; \nbreak;\ncase 32:\n yy.getLogger().debug(\"Rule: dirList: \", $$[$0-1], $$[$0]); this.$ = [$$[$0-1]].concat($$[$0]); \nbreak;\ncase 33:\n yy.getLogger().debug(\"Rule: nodeShapeNLabel: \", $$[$0-2], $$[$0-1], $$[$0]); this.$ = { typeStr: $$[$0-2] + $$[$0], label: $$[$0-1] }; \nbreak;\ncase 34:\n yy.getLogger().debug(\"Rule: BLOCK_ARROW nodeShapeNLabel: \", $$[$0-3], $$[$0-2], \" #3:\",$$[$0-1], $$[$0]); this.$ = { typeStr: $$[$0-3] + $$[$0], label: $$[$0-2], directions: $$[$0-1]}; \nbreak;\ncase 35: case 36:\n\n this.$ = { type: 'classDef', id: $$[$0-1].trim(), css: $$[$0].trim() };\n \nbreak;\ncase 37:\n\n //log.debug('apply class: id(s): ',$$[$0-1], ' style class: ', $$[$0]);\n this.$={ type: 'applyClass', id: $$[$0-1].trim(), styleClass: $$[$0].trim() };\n \nbreak;\ncase 38:\n\n this.$={ type: 'applyStyles', id: $$[$0-1].trim(), stylesStr: $$[$0].trim() };\n \nbreak;\n}\n},\ntable: [{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:$V0,22:8,23:9,24:10,25:11,26:12,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7},{8:[1,20]},o($V8,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:$V0,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7}),o($V9,[2,16],{14:22,15:$Va,16:$Vb}),o($V9,[2,17]),o($V9,[2,18]),o($V9,[2,19]),o($V9,[2,20]),o($V9,[2,21]),o($V9,[2,22]),o($Vc,[2,25],{27:[1,25]}),o($V9,[2,26]),{19:26,26:12,32:$V4},{11:27,13:4,19:5,20:6,21:$V0,22:8,23:9,24:10,25:11,26:12,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},o($Vd,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},o($V8,[2,13]),{26:35,32:$V4},{32:[2,14]},{17:[1,36]},o($Vc,[2,24]),{11:37,13:4,14:22,15:$Va,16:$Vb,19:5,20:6,21:$V0,22:8,23:9,24:10,25:11,26:12,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},o($Vd,[2,30]),{18:[1,43]},{18:[1,44]},o($Vc,[2,23]),{18:[1,45]},{30:[1,46]},o($V9,[2,28]),o($V9,[2,35]),o($V9,[2,36]),o($V9,[2,37]),o($V9,[2,38]),{37:[1,47]},{34:48,35:$Ve},{15:[1,50]},o($V9,[2,27]),o($Vd,[2,33]),{39:[1,51]},{34:52,35:$Ve,39:[2,31]},{32:[2,15]},o($Vd,[2,34]),{39:[2,32]}],\ndefaultActions: {20:[2,7],23:[2,14],50:[2,15],52:[2,32]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: return 10; \nbreak;\ncase 1: yy.getLogger().debug('Found space-block'); return 31;\nbreak;\ncase 2: yy.getLogger().debug('Found nl-block'); return 31;\nbreak;\ncase 3: yy.getLogger().debug('Found space-block'); return 29;\nbreak;\ncase 4: yy.getLogger().debug('.', yy_.yytext); /* skip all whitespace */ \nbreak;\ncase 5:yy.getLogger().debug('_', yy_.yytext); /* skip all whitespace */ \nbreak;\ncase 6: return 5 \nbreak;\ncase 7: yy_.yytext=-1; return 28; \nbreak;\ncase 8: yy_.yytext = yy_.yytext.replace(/columns\\s+/,''); yy.getLogger().debug('COLUMNS (LEX)', yy_.yytext); return 28; \nbreak;\ncase 9: this.pushState(\"md_string\");\nbreak;\ncase 10: return \"MD_STR\";\nbreak;\ncase 11: this.popState();\nbreak;\ncase 12:this.pushState(\"string\");\nbreak;\ncase 13: yy.getLogger().debug('LEX: POPPING STR:', yy_.yytext);this.popState();\nbreak;\ncase 14: yy.getLogger().debug('LEX: STR end:', yy_.yytext); return \"STR\";\nbreak;\ncase 15: yy_.yytext = yy_.yytext.replace(/space\\:/,'');yy.getLogger().debug('SPACE NUM (LEX)', yy_.yytext); return 21; \nbreak;\ncase 16: yy_.yytext = '1'; yy.getLogger().debug('COLUMNS (LEX)', yy_.yytext); return 21; \nbreak;\ncase 17:return 43;\nbreak;\ncase 18:return 'LINKSTYLE';\nbreak;\ncase 19:return 'INTERPOLATE';\nbreak;\ncase 20: this.pushState('CLASSDEF'); return 40; \nbreak;\ncase 21: this.popState(); this.pushState('CLASSDEFID'); return 'DEFAULT_CLASSDEF_ID' \nbreak;\ncase 22: this.popState(); this.pushState('CLASSDEFID'); return 41 \nbreak;\ncase 23: this.popState(); return 42 \nbreak;\ncase 24: this.pushState('CLASS'); return 44; \nbreak;\ncase 25: this.popState(); this.pushState('CLASS_STYLE'); return 45 \nbreak;\ncase 26: this.popState(); return 46 \nbreak;\ncase 27: this.pushState('STYLE_STMNT'); return 47; \nbreak;\ncase 28: this.popState(); this.pushState('STYLE_DEFINITION'); return 48 \nbreak;\ncase 29: this.popState(); return 49 \nbreak;\ncase 30: this.pushState(\"acc_title\");return 'acc_title'; \nbreak;\ncase 31: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 32: this.pushState(\"acc_descr\");return 'acc_descr'; \nbreak;\ncase 33: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 34: this.pushState(\"acc_descr_multiline\");\nbreak;\ncase 35: this.popState(); \nbreak;\ncase 36:return \"acc_descr_multiline_value\";\nbreak;\ncase 37:return 30;\nbreak;\ncase 38: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 39: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 40: this.popState();yy.getLogger().debug('Lex: ))'); return \"NODE_DEND\"; \nbreak;\ncase 41: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 42: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 43: this.popState();yy.getLogger().debug('Lex: (-'); return \"NODE_DEND\"; \nbreak;\ncase 44: this.popState();yy.getLogger().debug('Lex: -)'); return \"NODE_DEND\"; \nbreak;\ncase 45: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 46: this.popState();yy.getLogger().debug('Lex: ]]'); return \"NODE_DEND\"; \nbreak;\ncase 47: this.popState();yy.getLogger().debug('Lex: ('); return \"NODE_DEND\"; \nbreak;\ncase 48: this.popState();yy.getLogger().debug('Lex: ])'); return \"NODE_DEND\"; \nbreak;\ncase 49: this.popState();yy.getLogger().debug('Lex: /]'); return \"NODE_DEND\"; \nbreak;\ncase 50: this.popState();yy.getLogger().debug('Lex: /]'); return \"NODE_DEND\"; \nbreak;\ncase 51: this.popState();yy.getLogger().debug('Lex: )]'); return \"NODE_DEND\"; \nbreak;\ncase 52: this.popState();yy.getLogger().debug('Lex: )'); return \"NODE_DEND\"; \nbreak;\ncase 53: this.popState();yy.getLogger().debug('Lex: ]>'); return \"NODE_DEND\"; \nbreak;\ncase 54: this.popState();yy.getLogger().debug('Lex: ]'); return \"NODE_DEND\"; \nbreak;\ncase 55: yy.getLogger().debug('Lexa: -)'); this.pushState('NODE');return 36; \nbreak;\ncase 56: yy.getLogger().debug('Lexa: (-'); this.pushState('NODE');return 36; \nbreak;\ncase 57: yy.getLogger().debug('Lexa: ))'); this.pushState('NODE');return 36; \nbreak;\ncase 58: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 59: yy.getLogger().debug('Lex: ((('); this.pushState('NODE');return 36; \nbreak;\ncase 60: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 61: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 62: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 63: yy.getLogger().debug('Lexc: >'); this.pushState('NODE');return 36; \nbreak;\ncase 64: yy.getLogger().debug('Lexa: (['); this.pushState('NODE');return 36; \nbreak;\ncase 65: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 66: this.pushState('NODE');return 36; \nbreak;\ncase 67: this.pushState('NODE');return 36; \nbreak;\ncase 68: this.pushState('NODE');return 36; \nbreak;\ncase 69: this.pushState('NODE');return 36; \nbreak;\ncase 70: this.pushState('NODE');return 36; \nbreak;\ncase 71: this.pushState('NODE');return 36; \nbreak;\ncase 72: this.pushState('NODE');return 36; \nbreak;\ncase 73: yy.getLogger().debug('Lexa: ['); this.pushState('NODE');return 36; \nbreak;\ncase 74: this.pushState('BLOCK_ARROW');yy.getLogger().debug('LEX ARR START');return 38; \nbreak;\ncase 75: yy.getLogger().debug('Lex: NODE_ID', yy_.yytext);return 32; \nbreak;\ncase 76: yy.getLogger().debug('Lex: EOF', yy_.yytext);return 8; \nbreak;\ncase 77: this.pushState(\"md_string\");\nbreak;\ncase 78: this.pushState(\"md_string\");\nbreak;\ncase 79: return \"NODE_DESCR\";\nbreak;\ncase 80: this.popState();\nbreak;\ncase 81: yy.getLogger().debug('Lex: Starting string');this.pushState(\"string\");\nbreak;\ncase 82: yy.getLogger().debug('LEX ARR: Starting string');this.pushState(\"string\");\nbreak;\ncase 83: yy.getLogger().debug('LEX: NODE_DESCR:', yy_.yytext); return \"NODE_DESCR\";\nbreak;\ncase 84:yy.getLogger().debug('LEX POPPING');this.popState();\nbreak;\ncase 85: yy.getLogger().debug('Lex: =>BAE'); this.pushState('ARROW_DIR'); \nbreak;\ncase 86: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (right): dir:',yy_.yytext);return \"DIR\"; \nbreak;\ncase 87: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (left):',yy_.yytext);return \"DIR\"; \nbreak;\ncase 88: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (x):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 89: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (y):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 90: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (up):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 91: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (down):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 92: yy_.yytext=']>';yy.getLogger().debug('Lex (ARROW_DIR end):',yy_.yytext);this.popState();this.popState();return \"BLOCK_ARROW_END\"; \nbreak;\ncase 93: yy.getLogger().debug('Lex: LINK', '#'+yy_.yytext+'#'); return 15; \nbreak;\ncase 94: yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 95: yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 96: yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 97: yy.getLogger().debug('Lex: START_LINK', yy_.yytext);this.pushState(\"LLABEL\");return 16; \nbreak;\ncase 98: yy.getLogger().debug('Lex: START_LINK', yy_.yytext);this.pushState(\"LLABEL\");return 16; \nbreak;\ncase 99: yy.getLogger().debug('Lex: START_LINK', yy_.yytext);this.pushState(\"LLABEL\");return 16; \nbreak;\ncase 100: this.pushState(\"md_string\");\nbreak;\ncase 101: yy.getLogger().debug('Lex: Starting string');this.pushState(\"string\"); return \"LINK_LABEL\";\nbreak;\ncase 102: this.popState(); yy.getLogger().debug('Lex: LINK', '#'+yy_.yytext+'#'); return 15; \nbreak;\ncase 103: this.popState(); yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 104: this.popState(); yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 105: yy.getLogger().debug('Lex: COLON', yy_.yytext); yy_.yytext=yy_.yytext.slice(1);return 27; \nbreak;\n}\n},\nrules: [/^(?:block-beta\\b)/,/^(?:block\\s+)/,/^(?:block\\n+)/,/^(?:block:)/,/^(?:[\\s]+)/,/^(?:[\\n]+)/,/^(?:((\\u000D\\u000A)|(\\u000A)))/,/^(?:columns\\s+auto\\b)/,/^(?:columns\\s+[\\d]+)/,/^(?:[\"][`])/,/^(?:[^`\"]+)/,/^(?:[`][\"])/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:space[:]\\d+)/,/^(?:space\\b)/,/^(?:default\\b)/,/^(?:linkStyle\\b)/,/^(?:interpolate\\b)/,/^(?:classDef\\s+)/,/^(?:DEFAULT\\s+)/,/^(?:\\w+\\s+)/,/^(?:[^\\n]*)/,/^(?:class\\s+)/,/^(?:(\\w+)+((,\\s*\\w+)*))/,/^(?:[^\\n]*)/,/^(?:style\\s+)/,/^(?:(\\w+)+((,\\s*\\w+)*))/,/^(?:[^\\n]*)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:end\\b\\s*)/,/^(?:\\(\\(\\()/,/^(?:\\)\\)\\))/,/^(?:[\\)]\\))/,/^(?:\\}\\})/,/^(?:\\})/,/^(?:\\(-)/,/^(?:-\\))/,/^(?:\\(\\()/,/^(?:\\]\\])/,/^(?:\\()/,/^(?:\\]\\))/,/^(?:\\\\\\])/,/^(?:\\/\\])/,/^(?:\\)\\])/,/^(?:[\\)])/,/^(?:\\]>)/,/^(?:[\\]])/,/^(?:-\\))/,/^(?:\\(-)/,/^(?:\\)\\))/,/^(?:\\))/,/^(?:\\(\\(\\()/,/^(?:\\(\\()/,/^(?:\\{\\{)/,/^(?:\\{)/,/^(?:>)/,/^(?:\\(\\[)/,/^(?:\\()/,/^(?:\\[\\[)/,/^(?:\\[\\|)/,/^(?:\\[\\()/,/^(?:\\)\\)\\))/,/^(?:\\[\\\\)/,/^(?:\\[\\/)/,/^(?:\\[\\\\)/,/^(?:\\[)/,/^(?:<\\[)/,/^(?:[^\\(\\[\\n\\-\\)\\{\\}\\s\\<\\>:]+)/,/^(?:$)/,/^(?:[\"][`])/,/^(?:[\"][`])/,/^(?:[^`\"]+)/,/^(?:[`][\"])/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]+)/,/^(?:[\"])/,/^(?:\\]>\\s*\\()/,/^(?:,?\\s*right\\s*)/,/^(?:,?\\s*left\\s*)/,/^(?:,?\\s*x\\s*)/,/^(?:,?\\s*y\\s*)/,/^(?:,?\\s*up\\s*)/,/^(?:,?\\s*down\\s*)/,/^(?:\\)\\s*)/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?:\\s*~~[\\~]+\\s*)/,/^(?:\\s*[xo<]?--\\s*)/,/^(?:\\s*[xo<]?==\\s*)/,/^(?:\\s*[xo<]?-\\.\\s*)/,/^(?:[\"][`])/,/^(?:[\"])/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?::\\d+)/],\nconditions: {\"STYLE_DEFINITION\":{\"rules\":[29],\"inclusive\":false},\"STYLE_STMNT\":{\"rules\":[28],\"inclusive\":false},\"CLASSDEFID\":{\"rules\":[23],\"inclusive\":false},\"CLASSDEF\":{\"rules\":[21,22],\"inclusive\":false},\"CLASS_STYLE\":{\"rules\":[26],\"inclusive\":false},\"CLASS\":{\"rules\":[25],\"inclusive\":false},\"LLABEL\":{\"rules\":[100,101,102,103,104],\"inclusive\":false},\"ARROW_DIR\":{\"rules\":[86,87,88,89,90,91,92],\"inclusive\":false},\"BLOCK_ARROW\":{\"rules\":[77,82,85],\"inclusive\":false},\"NODE\":{\"rules\":[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],\"inclusive\":false},\"md_string\":{\"rules\":[10,11,79,80],\"inclusive\":false},\"space\":{\"rules\":[],\"inclusive\":false},\"string\":{\"rules\":[13,14,83,84],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[35,36],\"inclusive\":false},\"acc_descr\":{\"rules\":[33],\"inclusive\":false},\"acc_title\":{\"rules\":[31],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import clone from 'lodash-es/clone.js';\nimport * as configApi from '../../config.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DiagramDB } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport common from '../common/common.js';\nimport { clear as commonClear } from '../common/commonDb.js';\nimport type { Block, ClassDef } from './blockTypes.js';\n\n// Initialize the node database for simple lookups\nlet blockDatabase = new Map();\nlet edgeList: Block[] = [];\nlet edgeCount = new Map();\n\nconst COLOR_KEYWORD = 'color';\nconst FILL_KEYWORD = 'fill';\nconst BG_FILL = 'bgFill';\nconst STYLECLASS_SEP = ',';\nconst config = getConfig();\n\nlet classes = new Map();\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, config);\n\n/**\n * Called when the parser comes across a (style) class definition\n * @example classDef my-style fill:#f96;\n *\n * @param id - the id of this (style) class\n * @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)\n */\nexport const addStyleClass = function (id: string, styleAttributes = '') {\n // create a new style class object with this id\n let foundClass = classes.get(id);\n if (!foundClass) {\n foundClass = { id: id, styles: [], textStyles: [] };\n classes.set(id, foundClass); // This is a classDef\n }\n if (styleAttributes !== undefined && styleAttributes !== null) {\n styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {\n // remove any trailing ;\n const fixedAttrib = attrib.replace(/([^;]*);/, '$1').trim();\n\n // replace some style keywords\n if (RegExp(COLOR_KEYWORD).exec(attrib)) {\n const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);\n const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);\n foundClass.textStyles.push(newStyle2);\n }\n foundClass.styles.push(fixedAttrib);\n });\n }\n};\n\n/**\n * Called when the parser comes across a style definition\n * @example style my-block-id fill:#f96;\n *\n * @param id - the id of the block to style\n * @param styles - the string with 1 or more style attributes (each separated by a comma)\n */\nexport const addStyle2Node = function (id: string, styles = '') {\n const foundBlock = blockDatabase.get(id)!;\n if (styles !== undefined && styles !== null) {\n foundBlock.styles = styles.split(STYLECLASS_SEP);\n }\n};\n\n/**\n * Add a CSS/style class to the block with the given id.\n * If the block isn't already in the list of known blocks, add it.\n * Might be called by parser when a CSS/style class should be applied to a block\n *\n * @param itemIds - The id or a list of ids of the item(s) to apply the css class to\n * @param cssClassName - CSS class name\n */\nexport const setCssClass = function (itemIds: string, cssClassName: string) {\n itemIds.split(',').forEach(function (id: string) {\n let foundBlock = blockDatabase.get(id);\n if (foundBlock === undefined) {\n const trimmedId = id.trim();\n foundBlock = { id: trimmedId, type: 'na', children: [] } as Block;\n blockDatabase.set(trimmedId, foundBlock);\n }\n if (!foundBlock.classes) {\n foundBlock.classes = [];\n }\n foundBlock.classes.push(cssClassName);\n });\n};\n\nconst populateBlockDatabase = (_blockList: Block[], parent: Block): void => {\n const blockList = _blockList.flat();\n const children = [];\n for (const block of blockList) {\n if (block.label) {\n block.label = sanitizeText(block.label);\n }\n if (block.type === 'classDef') {\n addStyleClass(block.id, block.css);\n continue;\n }\n if (block.type === 'applyClass') {\n setCssClass(block.id, block?.styleClass ?? '');\n continue;\n }\n if (block.type === 'applyStyles') {\n if (block?.stylesStr) {\n addStyle2Node(block.id, block?.stylesStr);\n }\n continue;\n }\n if (block.type === 'column-setting') {\n parent.columns = block.columns ?? -1;\n } else if (block.type === 'edge') {\n const count = (edgeCount.get(block.id) ?? 0) + 1;\n edgeCount.set(block.id, count);\n block.id = count + '-' + block.id;\n edgeList.push(block);\n } else {\n if (!block.label) {\n if (block.type === 'composite') {\n block.label = '';\n // log.debug('abc89 composite', block);\n } else {\n block.label = block.id;\n }\n }\n const existingBlock = blockDatabase.get(block.id);\n\n if (existingBlock === undefined) {\n blockDatabase.set(block.id, block);\n } else {\n // Add newer relevant data to aggregated node\n if (block.type !== 'na') {\n existingBlock.type = block.type;\n }\n if (block.label !== block.id) {\n existingBlock.label = block.label;\n }\n }\n\n if (block.children) {\n populateBlockDatabase(block.children, block);\n }\n if (block.type === 'space') {\n // log.debug('abc95 space', block);\n const w = block.width ?? 1;\n for (let j = 0; j < w; j++) {\n const newBlock = clone(block);\n newBlock.id = newBlock.id + '-' + j;\n blockDatabase.set(newBlock.id, newBlock);\n children.push(newBlock);\n }\n } else if (existingBlock === undefined) {\n children.push(block);\n }\n }\n }\n parent.children = children;\n};\n\nlet blocks: Block[] = [];\nlet rootBlock = { id: 'root', type: 'composite', children: [], columns: -1 } as Block;\n\nconst clear = (): void => {\n log.debug('Clear called');\n commonClear();\n rootBlock = { id: 'root', type: 'composite', children: [], columns: -1 } as Block;\n blockDatabase = new Map([['root', rootBlock]]);\n blocks = [];\n classes = new Map();\n\n edgeList = [];\n edgeCount = new Map();\n};\n\nexport function typeStr2Type(typeStr: string) {\n log.debug('typeStr2Type', typeStr);\n switch (typeStr) {\n case '[]':\n return 'square';\n case '()':\n log.debug('we have a round');\n return 'round';\n case '(())':\n return 'circle';\n case '>]':\n return 'rect_left_inv_arrow';\n case '{}':\n return 'diamond';\n case '{{}}':\n return 'hexagon';\n case '([])':\n return 'stadium';\n case '[[]]':\n return 'subroutine';\n case '[()]':\n return 'cylinder';\n case '((()))':\n return 'doublecircle';\n case '[//]':\n return 'lean_right';\n case '[\\\\\\\\]':\n return 'lean_left';\n case '[/\\\\]':\n return 'trapezoid';\n case '[\\\\/]':\n return 'inv_trapezoid';\n case '<[]>':\n return 'block_arrow';\n default:\n return 'na';\n }\n}\n\nexport function edgeTypeStr2Type(typeStr: string): string {\n log.debug('typeStr2Type', typeStr);\n switch (typeStr) {\n case '==':\n return 'thick';\n default:\n return 'normal';\n }\n}\n\nexport function edgeStrToEdgeData(typeStr: string): string {\n switch (typeStr.trim()) {\n case '--x':\n return 'arrow_cross';\n case '--o':\n return 'arrow_circle';\n default:\n return 'arrow_point';\n }\n}\n\nlet cnt = 0;\nexport const generateId = () => {\n cnt++;\n return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt;\n};\n\nconst setHierarchy = (block: Block[]): void => {\n rootBlock.children = block;\n populateBlockDatabase(block, rootBlock);\n blocks = rootBlock.children;\n};\n\nconst getColumns = (blockId: string): number => {\n const block = blockDatabase.get(blockId);\n if (!block) {\n return -1;\n }\n if (block.columns) {\n return block.columns;\n }\n if (!block.children) {\n return -1;\n }\n return block.children.length;\n};\n\n/**\n * Returns all the blocks as a flat array\n * @returns\n */\nconst getBlocksFlat = () => {\n return [...blockDatabase.values()];\n};\n/**\n * Returns the hierarchy of blocks\n * @returns\n */\nconst getBlocks = () => {\n return blocks || [];\n};\n\nconst getEdges = () => {\n return edgeList;\n};\nconst getBlock = (id: string) => {\n return blockDatabase.get(id);\n};\n\nconst setBlock = (block: Block) => {\n blockDatabase.set(block.id, block);\n};\n\nconst getLogger = () => console;\n\n/**\n * Return all of the style classes\n */\nexport const getClasses = function () {\n return classes;\n};\n\nconst db = {\n getConfig: () => configApi.getConfig().block,\n typeStr2Type: typeStr2Type,\n edgeTypeStr2Type: edgeTypeStr2Type,\n edgeStrToEdgeData,\n getLogger,\n getBlocksFlat,\n getBlocks,\n getEdges,\n setHierarchy,\n getBlock,\n setBlock,\n getColumns,\n getClasses,\n clear,\n generateId,\n} as const;\n\nexport type BlockDB = typeof db & DiagramDB;\nexport default db;\n", "import * as khroma from 'khroma';\n\n/** Returns the styles given options */\nexport interface BlockChartStyleOptions {\n arrowheadColor: string;\n border2: string;\n clusterBkg: string;\n clusterBorder: string;\n edgeLabelBackground: string;\n fontFamily: string;\n lineColor: string;\n mainBkg: string;\n nodeBorder: string;\n nodeTextColor: string;\n tertiaryColor: string;\n textColor: string;\n titleColor: string;\n}\n\nconst fade = (color: string, opacity: number) => {\n // @ts-ignore TODO: incorrect types from khroma\n const channel = khroma.channel;\n\n const r = channel(color, 'r');\n const g = channel(color, 'g');\n const b = channel(color, 'b');\n\n // @ts-ignore incorrect types from khroma\n return khroma.rgba(r, g, b, opacity);\n};\n\nconst getStyles = (options: BlockChartStyleOptions) =>\n `.label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor || options.textColor};\n }\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span,p {\n color: ${options.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${options.nodeTextColor || options.textColor};\n color: ${options.nodeTextColor || options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${fade(options.edgeLabelBackground, 0.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${fade(options.mainBkg, 0.5)};\n fill: ${fade(options.clusterBkg, 0.5)};\n stroke: ${fade(options.clusterBorder, 0.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span,p {\n color: ${options.titleColor};\n }\n /* .cluster div {\n color: ${options.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n`;\n\nexport default getStyles;\n", "/** Setup arrow head and define the marker. The result is appended to the svg. */\n\nimport { log } from '../logger.js';\n\n// Only add the number of markers that the diagram needs\nconst insertMarkers = (elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n};\n\nconst extension = (elem, type, id) => {\n log.trace('Making markers for ', id);\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionStart')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionEnd')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n};\n\nconst composition = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionStart')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionEnd')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst aggregation = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationStart')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationEnd')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst dependency = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyStart')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 6)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyEnd')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\nconst lollipop = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopStart')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopEnd')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n};\nconst point = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 6)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 4.5)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 5 L 10 10 L 10 0 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst circle = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 11)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', -1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst cross = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossEnd')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', 12)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossStart')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', -1)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n};\nconst barb = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-barbEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 14)\n .attr('markerUnits', 'strokeWidth')\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n// TODO rename the class diagram markers to something shape descriptive and semantic free\nconst markers = {\n extension,\n composition,\n aggregation,\n dependency,\n lollipop,\n point,\n circle,\n cross,\n barb,\n};\nexport default insertMarkers;\n", "import type { BlockDB } from './blockDB.js';\nimport type { Block } from './blockTypes.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\n// TODO: This means the number we provide in diagram's config will never be used. Should fix.\nconst padding = getConfig()?.block?.padding ?? 8;\n\ninterface BlockPosition {\n px: number;\n py: number;\n}\n\nexport function calculateBlockPosition(columns: number, position: number): BlockPosition {\n // log.debug('calculateBlockPosition abc89', columns, position);\n // Ensure that columns is a positive integer\n if (columns === 0 || !Number.isInteger(columns)) {\n throw new Error('Columns must be an integer !== 0.');\n }\n\n // Ensure that position is a non-negative integer\n if (position < 0 || !Number.isInteger(position)) {\n throw new Error('Position must be a non-negative integer.' + position);\n }\n\n if (columns < 0) {\n // Auto columns is set\n return { px: position, py: 0 };\n }\n if (columns === 1) {\n // Auto columns is set\n return { px: 0, py: position };\n }\n // Calculate posX and posY\n const px = position % columns;\n const py = Math.floor(position / columns);\n // log.debug('calculateBlockPosition abc89', columns, position, '=> (', px, py, ')');\n return { px, py };\n}\n\nconst getMaxChildSize = (block: Block) => {\n let maxWidth = 0;\n let maxHeight = 0;\n // find max width of children\n // log.debug('getMaxChildSize abc95 (start) parent:', block.id);\n for (const child of block.children) {\n const { width, height, x, y } = child.size ?? { width: 0, height: 0, x: 0, y: 0 };\n log.debug(\n 'getMaxChildSize abc95 child:',\n child.id,\n 'width:',\n width,\n 'height:',\n height,\n 'x:',\n x,\n 'y:',\n y,\n child.type\n );\n if (child.type === 'space') {\n continue;\n }\n if (width > maxWidth) {\n maxWidth = width / (block.widthInColumns ?? 1);\n }\n if (height > maxHeight) {\n maxHeight = height;\n }\n }\n return { width: maxWidth, height: maxHeight };\n};\n\nfunction setBlockSizes(block: Block, db: BlockDB, siblingWidth = 0, siblingHeight = 0) {\n log.debug(\n 'setBlockSizes abc95 (start)',\n block.id,\n block?.size?.x,\n 'block width =',\n block?.size,\n 'sieblingWidth',\n siblingWidth\n );\n if (!block?.size?.width) {\n block.size = {\n width: siblingWidth,\n height: siblingHeight,\n x: 0,\n y: 0,\n };\n }\n let maxWidth = 0;\n let maxHeight = 0;\n\n if (block.children?.length > 0) {\n for (const child of block.children) {\n setBlockSizes(child, db);\n }\n // find max width of children\n const childSize = getMaxChildSize(block);\n maxWidth = childSize.width;\n maxHeight = childSize.height;\n log.debug('setBlockSizes abc95 maxWidth of', block.id, ':s children is ', maxWidth, maxHeight);\n\n // set width of block to max width of children\n for (const child of block.children) {\n if (child.size) {\n log.debug(\n `abc95 Setting size of children of ${block.id} id=${child.id} ${maxWidth} ${maxHeight} ${JSON.stringify(child.size)}`\n );\n child.size.width =\n maxWidth * (child.widthInColumns ?? 1) + padding * ((child.widthInColumns ?? 1) - 1);\n child.size.height = maxHeight;\n child.size.x = 0;\n child.size.y = 0;\n\n log.debug(\n `abc95 updating size of ${block.id} children child:${child.id} maxWidth:${maxWidth} maxHeight:${maxHeight}`\n );\n }\n }\n for (const child of block.children) {\n setBlockSizes(child, db, maxWidth, maxHeight);\n }\n\n const columns = block.columns ?? -1;\n let numItems = 0;\n for (const child of block.children) {\n numItems += child.widthInColumns ?? 1;\n }\n\n // The width and height in number blocks\n let xSize = block.children.length;\n if (columns > 0 && columns < numItems) {\n xSize = columns;\n }\n\n const ySize = Math.ceil(numItems / xSize);\n\n let width = xSize * (maxWidth + padding) + padding;\n let height = ySize * (maxHeight + padding) + padding;\n // If maxWidth\n if (width < siblingWidth) {\n log.debug(\n `Detected to small siebling: abc95 ${block.id} sieblingWidth ${siblingWidth} sieblingHeight ${siblingHeight} width ${width}`\n );\n width = siblingWidth;\n height = siblingHeight;\n const childWidth = (siblingWidth - xSize * padding - padding) / xSize;\n const childHeight = (siblingHeight - ySize * padding - padding) / ySize;\n // cspell:ignore indata\n log.debug('Size indata abc88', block.id, 'childWidth', childWidth, 'maxWidth', maxWidth);\n log.debug('Size indata abc88', block.id, 'childHeight', childHeight, 'maxHeight', maxHeight);\n log.debug('Size indata abc88 xSize', xSize, 'padding', padding);\n\n // set width of block to max width of children\n for (const child of block.children) {\n if (child.size) {\n child.size.width = childWidth;\n child.size.height = childHeight;\n child.size.x = 0;\n child.size.y = 0;\n }\n }\n }\n\n log.debug(\n `abc95 (finale calc) ${block.id} xSize ${xSize} ySize ${ySize} columns ${columns}${\n block.children.length\n } width=${Math.max(width, block.size?.width || 0)}`\n );\n if (width < (block?.size?.width || 0)) {\n width = block?.size?.width || 0;\n\n // Grow children to fit\n const num = columns > 0 ? Math.min(block.children.length, columns) : block.children.length;\n if (num > 0) {\n const childWidth = (width - num * padding - padding) / num;\n log.debug('abc95 (growing to fit) width', block.id, width, block.size?.width, childWidth);\n for (const child of block.children) {\n if (child.size) {\n child.size.width = childWidth;\n }\n }\n }\n }\n block.size = {\n width,\n height,\n x: 0,\n y: 0,\n };\n }\n\n log.debug(\n 'setBlockSizes abc94 (done)',\n block.id,\n block?.size?.x,\n block?.size?.width,\n block?.size?.y,\n block?.size?.height\n );\n}\n\nfunction layoutBlocks(block: Block, db: BlockDB) {\n log.debug(\n `abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`\n );\n const columns = block.columns ?? -1;\n log.debug('layoutBlocks columns abc95', block.id, '=>', columns, block);\n if (\n block.children && // find max width of children\n block.children.length > 0\n ) {\n const width = block?.children[0]?.size?.width ?? 0;\n const widthOfChildren = block.children.length * width + (block.children.length - 1) * padding;\n\n log.debug('widthOfChildren 88', widthOfChildren, 'posX');\n\n // let first = true;\n let columnPos = 0;\n log.debug('abc91 block?.size?.x', block.id, block?.size?.x);\n let startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;\n let rowPos = 0;\n for (const child of block.children) {\n const parent = block;\n\n if (!child.size) {\n continue;\n }\n const { width, height } = child.size;\n const { px, py } = calculateBlockPosition(columns, columnPos);\n if (py != rowPos) {\n rowPos = py;\n startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;\n log.debug('New row in layout for block', block.id, ' and child ', child.id, rowPos);\n }\n log.debug(\n `abc89 layout blocks (child) id: ${child.id} Pos: ${columnPos} (px, py) ${px},${py} (${parent?.size?.x},${parent?.size?.y}) parent: ${parent.id} width: ${width}${padding}`\n );\n if (parent.size) {\n const halfWidth = width / 2;\n child.size.x = startingPosX + padding + halfWidth;\n\n // cspell:ignore pyid\n log.debug(\n `abc91 layout blocks (calc) px, pyid:${\n child.id\n } startingPos=X${startingPosX} new startingPosX${\n child.size.x\n } ${halfWidth} padding=${padding} width=${width} halfWidth=${halfWidth} => x:${\n child.size.x\n } y:${child.size.y} ${child.widthInColumns} (width * (child?.w || 1)) / 2 ${\n (width * (child?.widthInColumns ?? 1)) / 2\n }`\n );\n\n startingPosX = child.size.x + halfWidth;\n\n child.size.y =\n parent.size.y - parent.size.height / 2 + py * (height + padding) + height / 2 + padding;\n\n log.debug(\n `abc88 layout blocks (calc) px, pyid:${\n child.id\n }startingPosX${startingPosX}${padding}${halfWidth}=>x:${child.size.x}y:${child.size.y}${\n child.widthInColumns\n }(width * (child?.w || 1)) / 2${(width * (child?.widthInColumns ?? 1)) / 2}`\n );\n }\n if (child.children) {\n layoutBlocks(child, db);\n }\n columnPos += child?.widthInColumns ?? 1;\n log.debug('abc88 columnsPos', child, columnPos);\n }\n }\n log.debug(\n `layout blocks (<==layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`\n );\n}\n\nfunction findBounds(\n block: Block,\n { minX, minY, maxX, maxY } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }\n) {\n if (block.size && block.id !== 'root') {\n const { x, y, width, height } = block.size;\n if (x - width / 2 < minX) {\n minX = x - width / 2;\n }\n if (y - height / 2 < minY) {\n minY = y - height / 2;\n }\n if (x + width / 2 > maxX) {\n maxX = x + width / 2;\n }\n if (y + height / 2 > maxY) {\n maxY = y + height / 2;\n }\n }\n if (block.children) {\n for (const child of block.children) {\n ({ minX, minY, maxX, maxY } = findBounds(child, { minX, minY, maxX, maxY }));\n }\n }\n return { minX, minY, maxX, maxY };\n}\n\nexport function layout(db: BlockDB) {\n const root = db.getBlock('root');\n if (!root) {\n return;\n }\n\n setBlockSizes(root, db, 0, 0);\n layoutBlocks(root, db);\n // Position blocks relative to parents\n // positionBlock(root, root, db);\n log.debug('getBlocks', JSON.stringify(root, null, 2));\n\n const { minX, minY, maxX, maxY } = findBounds(root);\n\n const height = maxY - minY;\n const width = maxX - minX;\n return { x: minX, y: minY, width, height };\n}\n", "import { select } from 'd3';\nimport { log } from '../logger.js';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { decodeEntities } from '../utils.js';\nimport { replaceIconSubstring } from '../rendering-util/createText.js';\n\n/**\n * @param dom\n * @param styleFn\n */\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\n/**\n * @param {any} node\n * @returns {SVGForeignObjectElement} Node\n */\nfunction addHtmlLabel(node) {\n const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n const div = fo.append('xhtml:div');\n\n const label = node.label;\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n const span = div.append('span');\n span.html(label);\n applyStyle(span, node.labelStyle);\n span.attr('class', labelClass);\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block');\n // Fix for firefox\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n}\n/**\n * @param _vertexText\n * @param style\n * @param isTitle\n * @param isNode\n * @deprecated svg-util/createText instead\n */\nconst createLabel = (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || '';\n if (typeof vertexText === 'object') {\n vertexText = vertexText[0];\n }\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
    ');\n log.debug('vertexText' + vertexText);\n const node = {\n isNode,\n label: replaceIconSubstring(decodeEntities(vertexText)),\n labelStyle: style.replace('fill:', 'color:'),\n };\n let vertexNode = addHtmlLabel(node);\n // vertexNode.parentNode.removeChild(vertexNode);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n let rows = [];\n if (typeof vertexText === 'string') {\n rows = vertexText.split(/\\\\n|\\n|/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n\n for (const row of rows) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n if (isTitle) {\n tspan.setAttribute('class', 'title-row');\n } else {\n tspan.setAttribute('class', 'row');\n }\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\n\nexport default createLabel;\n", "import type { SVG } from '../diagram-api/types.js';\nimport { log } from '../logger.js';\nimport type { EdgeData } from '../types.js';\n/**\n * Adds SVG markers to a path element based on the arrow types specified in the edge.\n *\n * @param svgPath - The SVG path element to add markers to.\n * @param edge - The edge data object containing the arrow types.\n * @param url - The URL of the SVG marker definitions.\n * @param id - The ID prefix for the SVG marker definitions.\n * @param diagramType - The type of diagram being rendered.\n */\nexport const addEdgeMarkers = (\n svgPath: SVG,\n edge: Pick,\n url: string,\n id: string,\n diagramType: string\n) => {\n if (edge.arrowTypeStart) {\n addEdgeMarker(svgPath, 'start', edge.arrowTypeStart, url, id, diagramType);\n }\n if (edge.arrowTypeEnd) {\n addEdgeMarker(svgPath, 'end', edge.arrowTypeEnd, url, id, diagramType);\n }\n};\n\nconst arrowTypesMap = {\n arrow_cross: 'cross',\n arrow_point: 'point',\n arrow_barb: 'barb',\n arrow_circle: 'circle',\n aggregation: 'aggregation',\n extension: 'extension',\n composition: 'composition',\n dependency: 'dependency',\n lollipop: 'lollipop',\n} as const;\n\nconst addEdgeMarker = (\n svgPath: SVG,\n position: 'start' | 'end',\n arrowType: string,\n url: string,\n id: string,\n diagramType: string\n) => {\n const endMarkerType = arrowTypesMap[arrowType as keyof typeof arrowTypesMap];\n\n if (!endMarkerType) {\n log.warn(`Unknown arrow type: ${arrowType}`);\n return; // unknown arrow type, ignore\n }\n\n const suffix = position === 'start' ? 'Start' : 'End';\n svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);\n};\n", "import { log } from '../logger.js';\nimport createLabel from './createLabel.js';\nimport { createText } from '../rendering-util/createText.js';\nimport { line, curveBasis, select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport utils from '../utils.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { getLineFunctionsWithOffset } from '../utils/lineWithOffset.js';\nimport { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js';\nimport { addEdgeMarkers } from './edgeMarker.js';\n\nlet edgeLabels = {};\nlet terminalLabels = {};\n\nexport const clear = () => {\n edgeLabels = {};\n terminalLabels = {};\n};\n\nexport const insertEdgeLabel = (elem, edge) => {\n const config = getConfig();\n const useHtmlLabels = evaluate(config.flowchart.htmlLabels);\n // Create the actual text element\n const labelElement =\n edge.labelType === 'markdown'\n ? createText(\n elem,\n edge.label,\n {\n style: edge.labelStyle,\n useHtmlLabels,\n addSvgBackground: true,\n },\n config\n )\n : createLabel(edge.label, edge.labelStyle);\n\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const edgeLabel = elem.insert('g').attr('class', 'edgeLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = edgeLabel.insert('g').attr('class', 'label');\n label.node().appendChild(labelElement);\n\n // Center the label\n let bbox = labelElement.getBBox();\n if (useHtmlLabels) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n\n // Make element accessible by id for positioning\n edgeLabels[edge.id] = edgeLabel;\n\n // Update the abstract data of the edge with the new information about its width and height\n edge.width = bbox.width;\n edge.height = bbox.height;\n\n let fo;\n if (edge.startLabelLeft) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelLeft, edge.labelStyle);\n const startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, edge.startLabelLeft);\n }\n if (edge.startLabelRight) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelRight, edge.labelStyle);\n const startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n fo = startEdgeLabelRight.node().appendChild(startLabelElement);\n inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startRight = startEdgeLabelRight;\n setTerminalWidth(fo, edge.startLabelRight);\n }\n if (edge.endLabelLeft) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelLeft, edge.labelStyle);\n const endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, edge.endLabelLeft);\n }\n if (edge.endLabelRight) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelRight, edge.labelStyle);\n const endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelRight.node().appendChild(endLabelElement);\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endRight = endEdgeLabelRight;\n setTerminalWidth(fo, edge.endLabelRight);\n }\n return labelElement;\n};\n\n/**\n * @param {any} fo\n * @param {any} value\n */\nfunction setTerminalWidth(fo, value) {\n if (getConfig().flowchart.htmlLabels && fo) {\n fo.style.width = value.length * 9 + 'px';\n fo.style.height = '12px';\n }\n}\n\nexport const positionEdgeLabel = (edge, paths) => {\n log.debug('Moving label abc88 ', edge.id, edge.label, edgeLabels[edge.id], paths);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n const siteConfig = getConfig();\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n if (edge.label) {\n const el = edgeLabels[edge.id];\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // // debugger;\n const pos = utils.calcLabelPosition(path);\n log.debug(\n 'Moving label ' + edge.label + ' from (',\n x,\n ',',\n y,\n ') to (',\n pos.x,\n ',',\n pos.y,\n ') abc88'\n );\n if (paths.updatedPath) {\n x = pos.x;\n y = pos.y;\n }\n }\n el.attr('transform', `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);\n }\n\n //let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n if (edge.startLabelLeft) {\n const el = terminalLabels[edge.id].startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.startLabelRight) {\n const el = terminalLabels[edge.id].startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(\n edge.arrowTypeStart ? 10 : 0,\n 'start_right',\n path\n );\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels[edge.id].endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelRight) {\n const el = terminalLabels[edge.id].endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_right', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n};\n\nconst outsideNode = (node, point) => {\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point.x - x);\n const dy = Math.abs(point.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n if (dx >= w || dy >= h) {\n return true;\n }\n return false;\n};\n\nexport const intersection = (node, outsidePoint, insidePoint) => {\n log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n\n const dx = Math.abs(x - insidePoint.x);\n // const dy = Math.abs(y - insidePoint.y);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n // Intersection is top or bottom of rect.\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = (R * q) / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q,\n };\n\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n\n log.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); // cspell: disable-line\n\n return res;\n } else {\n // Intersection onn sides of rect\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n // r = outsidePoint.x - w - x;\n r = x - w - outsidePoint.x;\n }\n let q = (Q * r) / R;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n // let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n\n return { x: _x, y: _y };\n }\n};\n/**\n * This function will page a path and node where the last point(s) in the path is inside the node\n * and return an update path ending by the border of the node.\n *\n * @param {Array} _points\n * @param {any} boundaryNode\n * @returns {Array} Points\n */\nconst cutPathAtIntersect = (_points, boundaryNode) => {\n log.debug('abc88 cutPathAtIntersect', _points, boundaryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point) => {\n // check if point is inside the boundary rect\n if (!outsideNode(boundaryNode, point) && !isInside) {\n // First point inside the rect found\n // Calc the intersection coord between the point anf the last point outside the rect\n const inter = intersection(boundaryNode, lastPointOutside, point);\n\n // // Check case where the intersection is the same as the last point\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n });\n // // if (!pointPresent) {\n if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n }\n\n isInside = true;\n } else {\n // Outside\n lastPointOutside = point;\n // points.push(point);\n if (!isInside) {\n points.push(point);\n }\n }\n });\n return points;\n};\n\nexport const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph, id) {\n let points = edge.points;\n log.debug('abc88 InsertEdge: edge=', edge, 'e=', e);\n let pointsHasChanged = false;\n const tail = graph.node(e.v);\n var head = graph.node(e.w);\n\n if (head?.intersect && tail?.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n points.push(head.intersect(points[points.length - 1]));\n }\n\n if (edge.toCluster) {\n log.debug('to cluster abc88', clusterDb[edge.toCluster]);\n points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);\n\n pointsHasChanged = true;\n }\n\n if (edge.fromCluster) {\n log.debug('from cluster abc88', clusterDb[edge.fromCluster]);\n points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();\n\n pointsHasChanged = true;\n }\n\n // The data for our line\n const lineData = points.filter((p) => !Number.isNaN(p.y));\n\n // This is the accessor function we talked about above\n let curve = curveBasis;\n // Currently only flowcharts get the curve from the settings, perhaps this should\n // be expanded to a common setting? Restricting it for now in order not to cause side-effects that\n // have not been thought through\n if (edge.curve && (diagramType === 'graph' || diagramType === 'flowchart')) {\n curve = edge.curve;\n }\n\n const { x, y } = getLineFunctionsWithOffset(edge);\n const lineFunction = line().x(x).y(y).curve(curve);\n\n // Construct stroke classes based on properties\n let strokeClasses;\n switch (edge.thickness) {\n case 'normal':\n strokeClasses = 'edge-thickness-normal';\n break;\n case 'thick':\n strokeClasses = 'edge-thickness-thick';\n break;\n case 'invisible':\n strokeClasses = 'edge-thickness-thick';\n break;\n default:\n strokeClasses = '';\n }\n switch (edge.pattern) {\n case 'solid':\n strokeClasses += ' edge-pattern-solid';\n break;\n case 'dotted':\n strokeClasses += ' edge-pattern-dotted';\n break;\n case 'dashed':\n strokeClasses += ' edge-pattern-dashed';\n break;\n }\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', edge.id)\n .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))\n .attr('style', edge.style);\n\n // DEBUG code, adds a red circle at each edge coordinate\n // edge.points.forEach((point) => {\n // elem\n // .append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n\n let url = '';\n // // TODO: Can we load this config only from the rendered graph type?\n if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n addEdgeMarkers(svgPath, edge, url, id, diagramType);\n\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n};\n", "import type { Direction } from '../../src/diagrams/block/blockTypes.js';\n\nconst expandAndDeduplicateDirections = (directions: Direction[]) => {\n const uniqueDirections = new Set();\n\n for (const direction of directions) {\n switch (direction) {\n case 'x':\n uniqueDirections.add('right');\n uniqueDirections.add('left');\n break;\n case 'y':\n uniqueDirections.add('up');\n uniqueDirections.add('down');\n break;\n default:\n uniqueDirections.add(direction);\n break;\n }\n }\n\n return uniqueDirections;\n};\nexport const getArrowPoints = (\n duplicatedDirections: Direction[],\n bbox: { width: number; height: number },\n node: any\n) => {\n // Expand and deduplicate the provided directions.\n // for instance: x, right => right, left\n const directions = expandAndDeduplicateDirections(duplicatedDirections);\n\n // Factor to divide height for some calculations.\n const f = 2;\n\n // Calculated height of the bounding box, accounting for node padding.\n const height = bbox.height + 2 * node.padding;\n // Midpoint calculation based on height.\n const midpoint = height / f;\n // Calculated width of the bounding box, accounting for additional width and node padding.\n const width = bbox.width + 2 * midpoint + node.padding;\n // Padding to use, half of the node padding.\n const padding = node.padding / 2;\n\n if (\n directions.has('right') &&\n directions.has('left') &&\n directions.has('up') &&\n directions.has('down')\n ) {\n // SQUARE\n return [\n // Bottom\n { x: 0, y: 0 },\n { x: midpoint, y: 0 },\n { x: width / 2, y: 2 * padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: 0 },\n\n // Right\n { x: width, y: -height / 3 },\n { x: width + 2 * padding, y: -height / 2 },\n { x: width, y: (-2 * height) / 3 },\n { x: width, y: -height },\n\n // Top\n { x: width - midpoint, y: -height },\n { x: width / 2, y: -height - 2 * padding },\n { x: midpoint, y: -height },\n\n // Left\n { x: 0, y: -height },\n { x: 0, y: (-2 * height) / 3 },\n { x: -2 * padding, y: -height / 2 },\n { x: 0, y: -height / 3 },\n ];\n }\n if (directions.has('right') && directions.has('left') && directions.has('up')) {\n // RECTANGLE_VERTICAL (Top Open)\n return [\n { x: midpoint, y: 0 },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 },\n ];\n }\n if (directions.has('right') && directions.has('left') && directions.has('down')) {\n // RECTANGLE_VERTICAL (Bottom Open)\n return [\n { x: 0, y: 0 },\n { x: midpoint, y: -height },\n { x: width - midpoint, y: -height },\n { x: width, y: 0 },\n ];\n }\n if (directions.has('right') && directions.has('up') && directions.has('down')) {\n // RECTANGLE_HORIZONTAL (Right Open)\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: width, y: -height + midpoint },\n { x: 0, y: -height },\n ];\n }\n if (directions.has('left') && directions.has('up') && directions.has('down')) {\n // RECTANGLE_HORIZONTAL (Left Open)\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: 0, y: -height + midpoint },\n { x: width, y: -height },\n ];\n }\n if (directions.has('right') && directions.has('left')) {\n // HORIZONTAL_LINE\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding },\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 },\n ];\n }\n if (directions.has('up') && directions.has('down')) {\n // VERTICAL_LINE\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding },\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: 0, y: -height + padding },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n { x: width, y: -padding },\n ];\n }\n if (directions.has('right') && directions.has('up')) {\n // ANGLE_RT\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: 0, y: -height },\n ];\n }\n if (directions.has('right') && directions.has('down')) {\n // ANGLE_RB\n return [\n { x: 0, y: 0 },\n { x: width, y: 0 },\n { x: 0, y: -height },\n ];\n }\n if (directions.has('left') && directions.has('up')) {\n // ANGLE_LT\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: width, y: -height },\n ];\n }\n if (directions.has('left') && directions.has('down')) {\n // ANGLE_LB\n return [\n { x: width, y: 0 },\n { x: 0, y: 0 },\n { x: width, y: -height },\n ];\n }\n if (directions.has('right')) {\n // ARROW_RIGHT\n return [\n { x: midpoint, y: -padding },\n { x: midpoint, y: -padding },\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding },\n // top left corner of arrow\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n ];\n }\n if (directions.has('left')) {\n // ARROW_LEFT\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding },\n // Two points, the right corners\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 },\n ];\n }\n if (directions.has('up')) {\n // ARROW_TOP\n return [\n // Bottom center\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: 0, y: -height + padding },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n ];\n }\n if (directions.has('down')) {\n // ARROW_BOTTOM\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding },\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n { x: width, y: -padding },\n ];\n }\n\n // POINT\n return [{ x: 0, y: 0 }];\n};\n", "/**\n * @param node\n * @param point\n */\nfunction intersectNode(node, point) {\n // console.info('Intersect Node');\n return node.intersect(point);\n}\n\nexport default intersectNode;\n", "/**\n * @param node\n * @param rx\n * @param ry\n * @param point\n */\nfunction intersectEllipse(node, rx, ry, point) {\n // Formulae from: https://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n var cx = node.x;\n var cy = node.y;\n\n var px = cx - point.x;\n var py = cy - point.y;\n\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n var dx = Math.abs((rx * ry * px) / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs((rx * ry * py) / det);\n if (point.y < cy) {\n dy = -dy;\n }\n\n return { x: cx + dx, y: cy + dy };\n}\n\nexport default intersectEllipse;\n", "import intersectEllipse from './intersect-ellipse.js';\n\n/**\n * @param node\n * @param rx\n * @param point\n */\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}\n\nexport default intersectCircle;\n", "/**\n * Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.\n *\n * @param p1\n * @param p2\n * @param q1\n * @param q2\n */\nfunction intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n\n // Compute r3 and r4.\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n\n // Compute r1 and r2\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return /*COLLINEAR*/;\n }\n\n offset = Math.abs(denom / 2);\n\n // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n return { x: x, y: y };\n}\n\n/**\n * @param r1\n * @param r2\n */\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n\nexport default intersectLine;\n", "/* eslint \"no-console\": off */\n\nimport intersectLine from './intersect-line.js';\n\nexport default intersectPolygon;\n\n/**\n * Returns the point ({x, y}) at which the point argument intersects with the node argument assuming\n * that it has the shape specified by polygon.\n *\n * @param node\n * @param polyPoints\n * @param point\n */\nfunction intersectPolygon(node, polyPoints, point) {\n var x1 = node.x;\n var y1 = node.y;\n\n var intersections = [];\n\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === 'function') {\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect = intersectLine(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n var pdx = p.x - point.x;\n var pdy = p.y - point.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n var qdx = q.x - point.x;\n var qdy = q.y - point.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n", "const intersectRect = (node, point) => {\n var x = node.x;\n var y = node.y;\n\n // Rectangle intersection algorithm from:\n // https://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n};\n\nexport default intersectRect;\n", "/*\n * Borrowed with love from dagre-d3. Many thanks to cpettitt!\n */\n\nimport node from './intersect-node.js';\nimport circle from './intersect-circle.js';\nimport ellipse from './intersect-ellipse.js';\nimport polygon from './intersect-polygon.js';\nimport rect from './intersect-rect.js';\n\nexport default {\n node,\n circle,\n ellipse,\n polygon,\n rect,\n};\n", "import createLabel from '../createLabel.js';\nimport { createText } from '../../rendering-util/createText.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { select } from 'd3';\nimport { evaluate, sanitizeText } from '../../diagrams/common/common.js';\nimport { decodeEntities } from '../../utils.js';\n\nexport const labelHelper = async (parent, node, _classes, isNode) => {\n const config = getConfig();\n let classes;\n const useHtmlLabels = node.useHtmlLabels || evaluate(config.flowchart.htmlLabels);\n if (!_classes) {\n classes = 'node default';\n } else {\n classes = _classes;\n }\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle);\n\n // Replace labelText with default value if undefined\n let labelText;\n if (node.labelText === undefined) {\n labelText = '';\n } else {\n labelText = typeof node.labelText === 'string' ? node.labelText : node.labelText[0];\n }\n\n const textNode = label.node();\n let text;\n if (node.labelType === 'markdown') {\n // text = textNode;\n text = createText(\n label,\n sanitizeText(decodeEntities(labelText), config),\n {\n useHtmlLabels,\n width: node.width || config.flowchart.wrappingWidth,\n classes: 'markdown-node-label',\n },\n config\n );\n } else {\n text = textNode.appendChild(\n createLabel(sanitizeText(decodeEntities(labelText), config), node.labelStyle, false, isNode)\n );\n }\n // Get the size of the label\n let bbox = text.getBBox();\n const halfPadding = node.padding / 2;\n\n if (evaluate(config.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n\n // if there are images, need to wait for them to load before getting the bounding box\n const images = div.getElementsByTagName('img');\n if (images) {\n const noImgText = labelText.replace(/]*>/g, '').trim() === '';\n\n await Promise.all(\n [...images].map(\n (img) =>\n new Promise((res) => {\n /**\n *\n */\n function setupImage() {\n img.style.display = 'flex';\n img.style.flexDirection = 'column';\n\n if (noImgText) {\n // default size if no text\n const bodyFontSize = config.fontSize\n ? config.fontSize\n : window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const width = parseInt(bodyFontSize, 10) * enlargingFactor + 'px';\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = '100%';\n }\n res(img);\n }\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener('error', setupImage);\n img.addEventListener('load', setupImage);\n })\n )\n );\n }\n\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Center the label\n if (useHtmlLabels) {\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n } else {\n label.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n }\n if (node.centerLabel) {\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n }\n label.insert('rect', ':first-child');\n\n return { shapeSvg, bbox, halfPadding, label };\n};\n\nexport const updateNodeBounds = (node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n};\n\n/**\n * @param parent\n * @param w\n * @param h\n * @param points\n */\nexport function insertPolygonShape(parent, w, h, points) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n", "import { updateNodeBounds, labelHelper } from './util.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport intersect from '../intersect/index.js';\n\nconst note = async (parent, node) => {\n const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart.htmlLabels;\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n 'node ' + node.classes,\n true\n );\n\n log.info('Classes = ', node.classes);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nexport default note;\n", "import { select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { log } from '../logger.js';\nimport { getArrowPoints } from './blockArrowHelper.js';\nimport createLabel from './createLabel.js';\nimport intersect from './intersect/index.js';\nimport note from './shapes/note.js';\nimport { insertPolygonShape, labelHelper, updateNodeBounds } from './shapes/util.js';\n\nconst formatClass = (str) => {\n if (str) {\n return ' ' + str;\n }\n return '';\n};\nconst getClassesFromNode = (node, otherClasses) => {\n return `${otherClasses ? otherClasses : 'node default'}${formatClass(node.classes)} ${formatClass(\n node.class\n )}`;\n};\n\nconst question = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n\n log.info('Question main (Circle)');\n\n const questionElem = insertPolygonShape(shapeSvg, s, s, points);\n questionElem.attr('style', node.style);\n updateNodeBounds(node, questionElem);\n\n node.intersect = function (point) {\n log.warn('Intersect called');\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst choice = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n const s = 28;\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 },\n ];\n\n const choice = shapeSvg.insert('polygon', ':first-child').attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n );\n // center the circle around its coordinate\n choice.attr('class', 'state-start').attr('r', 7).attr('width', 28).attr('height', 28);\n node.width = 28;\n node.height = 28;\n\n node.intersect = function (point) {\n return intersect.circle(node, 14, point);\n };\n\n return shapeSvg;\n};\n\nconst hexagon = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const hex = insertPolygonShape(shapeSvg, w, h, points);\n hex.attr('style', node.style);\n updateNodeBounds(node, hex);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst block_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, undefined, true);\n\n const f = 2;\n const h = bbox.height + 2 * node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n\n const points = getArrowPoints(node.directions, bbox, node);\n\n const blockArrow = insertPolygonShape(shapeSvg, w, h, points);\n blockArrow.attr('style', node.style);\n updateNodeBounds(node, blockArrow);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_left_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n\n node.width = w + h;\n node.height = h;\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_right = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_left = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (2 * h) / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - (2 * h) / 6, y: -h },\n { x: -h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w + (2 * h) / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst inv_trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: (-2 * h) / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_right_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst cylinder = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry + node.padding;\n\n const shape =\n 'M 0,' +\n ry +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n -w +\n ' 0 l 0,' +\n h +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 l 0,' +\n -h;\n\n const el = shapeSvg\n .attr('label-offset-y', ry)\n .insert('path', ':first-child')\n .attr('style', node.style)\n .attr('d', shape)\n .attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - node.x;\n\n if (\n rx != 0 &&\n (Math.abs(x) < node.width / 2 ||\n (Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry))\n ) {\n // ellipsis equation: x*x / a*a + y*y / b*b = 1\n // solve for y to get adjusted value for pos.y\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y != 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - node.y > 0) {\n y = -y;\n }\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n};\n\nconst rect = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n 'node ' + node.classes + ' ' + node.class,\n true\n );\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // console.log('Rect node:', node, 'bbox:', bbox, 'halfPadding:', halfPadding, 'node.padding:', node.padding);\n // const totalWidth = bbox.width + node.padding * 2;\n // const totalHeight = bbox.height + node.padding * 2;\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect\n .attr('class', 'basic label-container')\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst composite = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n 'node ' + node.classes,\n true\n );\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // const totalWidth = bbox.width + node.padding * 2;\n // const totalHeight = bbox.height + node.padding * 2;\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect\n .attr('class', 'basic cluster composite label-container')\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst labelRect = async (parent, node) => {\n const { shapeSvg } = await labelHelper(parent, node, 'label', true);\n\n log.trace('Classes = ', node.class);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Hide the rect we are only after the label\n const totalWidth = 0;\n const totalHeight = 0;\n rect.attr('width', totalWidth).attr('height', totalHeight);\n shapeSvg.attr('class', 'label edgeLabel');\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * @param rect\n * @param borders\n * @param totalWidth\n * @param totalHeight\n */\nfunction applyNodePropertyBorders(rect, borders, totalWidth, totalHeight) {\n const strokeDashArray = [];\n const addBorder = (length) => {\n strokeDashArray.push(length, 0);\n };\n const skipBorder = (length) => {\n strokeDashArray.push(0, length);\n };\n if (borders.includes('t')) {\n log.debug('add top border');\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes('r')) {\n log.debug('add right border');\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n if (borders.includes('b')) {\n log.debug('add bottom border');\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes('l')) {\n log.debug('add left border');\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n rect.attr('stroke-dasharray', strokeDashArray.join(' '));\n}\n\nconst rectWithTitle = (parent, node) => {\n // const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes);\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n // const innerRect = shapeSvg.insert('rect');\n const innerLine = shapeSvg.insert('line');\n\n const label = shapeSvg.insert('g').attr('class', 'label');\n\n const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;\n // const text2 = typeof text2prim === 'object' ? text2prim[0] : text2prim;\n\n let title = '';\n if (typeof text2 === 'object') {\n title = text2[0];\n } else {\n title = text2;\n }\n log.info('Label text abc79', title, text2, typeof text2 === 'object');\n\n const text = label.node().appendChild(createLabel(title, node.labelStyle, true, true));\n let bbox = { width: 0, height: 0 };\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n log.info('Text 2', text2);\n const textRows = text2.slice(1, text2.length);\n let titleBox = text.getBBox();\n const descr = label\n .node()\n .appendChild(\n createLabel(textRows.join ? textRows.join('
    ') : textRows, node.labelStyle, true, true)\n );\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n // bbox = label.getBBox();\n // log.info(descr);\n const halfPadding = node.padding / 2;\n select(descr).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n ', ' +\n (titleBox.height + halfPadding + 5) +\n ')'\n );\n select(text).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n ', ' +\n 0 +\n ')'\n );\n // Get the size of the label\n\n // Bounding box for title and text\n bbox = label.node().getBBox();\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n );\n\n rect\n .attr('class', 'outer title-state')\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n innerLine\n .attr('class', 'divider')\n .attr('x1', -bbox.width / 2 - halfPadding)\n .attr('x2', bbox.width / 2 + halfPadding)\n .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst stadium = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n\n // add the rect\n const rect = shapeSvg\n .insert('rect', ':first-child')\n .attr('style', node.style)\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst circle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n log.info('Circle main');\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, bbox.width / 2 + halfPadding, point);\n return intersect.circle(node, bbox.width / 2 + halfPadding, point);\n };\n\n return shapeSvg;\n};\n\nconst doublecircle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n const gap = 5;\n const circleGroup = shapeSvg.insert('g', ':first-child');\n const outerCircle = circleGroup.insert('circle');\n const innerCircle = circleGroup.insert('circle');\n\n circleGroup.attr('class', node.class);\n\n // center the circle around its coordinate\n outerCircle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding + gap)\n .attr('width', bbox.width + node.padding + gap * 2)\n .attr('height', bbox.height + node.padding + gap * 2);\n\n innerCircle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n log.info('DoubleCircle main');\n\n updateNodeBounds(node, outerCircle);\n\n node.intersect = function (point) {\n log.info('DoubleCircle intersect', node, bbox.width / 2 + halfPadding + gap, point);\n return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point);\n };\n\n return shapeSvg;\n};\n\nconst subroutine = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst start = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst forkJoin = (parent, node, dir) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let width = 70;\n let height = 10;\n\n if (dir === 'LR') {\n width = 10;\n height = 70;\n }\n\n const shape = shapeSvg\n .append('rect')\n .attr('x', (-1 * width) / 2)\n .attr('y', (-1 * height) / 2)\n .attr('width', width)\n .attr('height', height)\n .attr('class', 'fork-join');\n\n updateNodeBounds(node, shape);\n node.height = node.height + node.padding / 2;\n node.width = node.width + node.padding / 2;\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst end = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const innerCircle = shapeSvg.insert('circle', ':first-child');\n const circle = shapeSvg.insert('circle', ':first-child');\n\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst class_box = (parent, node) => {\n const halfPadding = node.padding / 2;\n const rowPadding = 4;\n const lineHeight = 8;\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n const topLine = shapeSvg.insert('line');\n const bottomLine = shapeSvg.insert('line');\n let maxWidth = 0;\n let maxHeight = rowPadding;\n\n const labelContainer = shapeSvg.insert('g').attr('class', 'label');\n let verticalPos = 0;\n const hasInterface = node.classData.annotations?.[0];\n\n // 1. Create the labels\n const interfaceLabelText = node.classData.annotations[0]\n ? '\u00AB' + node.classData.annotations[0] + '\u00BB'\n : '';\n const interfaceLabel = labelContainer\n .node()\n .appendChild(createLabel(interfaceLabelText, node.labelStyle, true, true));\n let interfaceBBox = interfaceLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = interfaceLabel.children[0];\n const dv = select(interfaceLabel);\n interfaceBBox = div.getBoundingClientRect();\n dv.attr('width', interfaceBBox.width);\n dv.attr('height', interfaceBBox.height);\n }\n if (node.classData.annotations[0]) {\n maxHeight += interfaceBBox.height + rowPadding;\n maxWidth += interfaceBBox.width;\n }\n\n let classTitleString = node.classData.label;\n\n if (node.classData.type !== undefined && node.classData.type !== '') {\n if (getConfig().flowchart.htmlLabels) {\n classTitleString += '<' + node.classData.type + '>';\n } else {\n classTitleString += '<' + node.classData.type + '>';\n }\n }\n const classTitleLabel = labelContainer\n .node()\n .appendChild(createLabel(classTitleString, node.labelStyle, true, true));\n select(classTitleLabel).attr('class', 'classTitle');\n let classTitleBBox = classTitleLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = classTitleLabel.children[0];\n const dv = select(classTitleLabel);\n classTitleBBox = div.getBoundingClientRect();\n dv.attr('width', classTitleBBox.width);\n dv.attr('height', classTitleBBox.height);\n }\n maxHeight += classTitleBBox.height + rowPadding;\n if (classTitleBBox.width > maxWidth) {\n maxWidth = classTitleBBox.width;\n }\n const classAttributes = [];\n node.classData.members.forEach((member) => {\n const parsedInfo = member.getDisplayDetails();\n let parsedText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n parsedText = parsedText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(\n createLabel(\n parsedText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classAttributes.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n const classMethods = [];\n node.classData.methods.forEach((member) => {\n const parsedInfo = member.getDisplayDetails();\n let displayText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n displayText = displayText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(\n createLabel(\n displayText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n\n classMethods.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n // 2. Position the labels\n\n // position the interface label\n if (hasInterface) {\n let diffX = (maxWidth - interfaceBBox.width) / 2;\n select(interfaceLabel).attr(\n 'transform',\n 'translate( ' + ((-1 * maxWidth) / 2 + diffX) + ', ' + (-1 * maxHeight) / 2 + ')'\n );\n verticalPos = interfaceBBox.height + rowPadding;\n }\n // Position the class title label\n let diffX = (maxWidth - classTitleBBox.width) / 2;\n select(classTitleLabel).attr(\n 'transform',\n 'translate( ' +\n ((-1 * maxWidth) / 2 + diffX) +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos) +\n ')'\n );\n verticalPos += classTitleBBox.height + rowPadding;\n\n topLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classAttributes.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' +\n -maxWidth / 2 +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos + lineHeight / 2) +\n ')'\n );\n //get the height of the bounding box of each member if exists\n const memberBBox = lbl?.getBBox();\n verticalPos += (memberBBox?.height ?? 0) + rowPadding;\n });\n\n verticalPos += lineHeight;\n bottomLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classMethods.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' + -maxWidth / 2 + ', ' + ((-1 * maxHeight) / 2 + verticalPos) + ')'\n );\n const memberBBox = lbl?.getBBox();\n verticalPos += (memberBBox?.height ?? 0) + rowPadding;\n });\n\n rect\n .attr('style', node.style)\n .attr('class', 'outer title-state')\n .attr('x', -maxWidth / 2 - halfPadding)\n .attr('y', -(maxHeight / 2) - halfPadding)\n .attr('width', maxWidth + node.padding)\n .attr('height', maxHeight + node.padding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = {\n rhombus: question,\n composite,\n question,\n rect,\n labelRect,\n rectWithTitle,\n choice,\n circle,\n doublecircle,\n stadium,\n hexagon,\n block_arrow,\n rect_left_inv_arrow,\n lean_right,\n lean_left,\n trapezoid,\n inv_trapezoid,\n rect_right_inv_arrow,\n cylinder,\n start,\n end,\n note,\n subroutine,\n fork: forkJoin,\n join: forkJoin,\n class_box,\n};\n\nlet nodeElems = {};\n\nexport const insertNode = async (elem, node, renderOptions) => {\n let newEl;\n let el;\n\n // Add link when appropriate\n if (node.link) {\n let target;\n if (getConfig().securityLevel === 'sandbox') {\n target = '_top';\n } else if (node.linkTarget) {\n target = node.linkTarget || '_blank';\n }\n newEl = elem.insert('svg:a').attr('xlink:href', node.link).attr('target', target);\n el = await shapes[node.shape](newEl, node, renderOptions);\n } else {\n el = await shapes[node.shape](elem, node, renderOptions);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr('title', node.tooltip);\n }\n if (node.class) {\n el.attr('class', 'node default ' + node.class);\n }\n\n nodeElems[node.id] = newEl;\n\n if (node.haveCallback) {\n nodeElems[node.id].attr('class', nodeElems[node.id].attr('class') + ' clickable');\n }\n return newEl;\n};\nexport const setNodeElem = (elem, node) => {\n nodeElems[node.id] = elem;\n};\nexport const clear = () => {\n nodeElems = {};\n};\n\nexport const positionNode = (node) => {\n const el = nodeElems[node.id];\n log.trace(\n 'Transforming node',\n node.diff,\n node,\n 'translate(' + (node.x - node.width / 2 - 5) + ', ' + node.width / 2 + ')'\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n 'transform',\n 'translate(' +\n (node.x + diff - node.width / 2) +\n ', ' +\n (node.y - node.height / 2 - padding) +\n ')'\n );\n } else {\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n }\n return diff;\n};\n", "import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { getConfig } from '../../config.js';\nimport { insertEdge, insertEdgeLabel, positionEdgeLabel } from '../../dagre-wrapper/edges.js';\nimport { insertNode, positionNode } from '../../dagre-wrapper/nodes.js';\nimport { getStylesFromArray } from '../../utils.js';\nimport type { BlockDB } from './blockDB.js';\nimport type { Block } from './blockTypes.js';\n\nfunction getNodeFromBlock(block: Block, db: BlockDB, positioned = false) {\n const vertex = block;\n\n let classStr = 'default';\n if ((vertex?.classes?.length || 0) > 0) {\n classStr = (vertex?.classes ?? []).join(' ');\n }\n classStr = classStr + ' flowchart-label';\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n let radius = 0;\n let shape = '';\n let padding;\n // Set the shape based parameters\n switch (vertex.type) {\n case 'round':\n radius = 5;\n shape = 'rect';\n break;\n case 'composite':\n radius = 0;\n shape = 'composite';\n padding = 0;\n break;\n case 'square':\n shape = 'rect';\n break;\n case 'diamond':\n shape = 'question';\n break;\n case 'hexagon':\n shape = 'hexagon';\n break;\n case 'block_arrow':\n shape = 'block_arrow';\n break;\n case 'odd':\n shape = 'rect_left_inv_arrow';\n break;\n case 'lean_right':\n shape = 'lean_right';\n break;\n case 'lean_left':\n shape = 'lean_left';\n break;\n case 'trapezoid':\n shape = 'trapezoid';\n break;\n case 'inv_trapezoid':\n shape = 'inv_trapezoid';\n break;\n case 'rect_left_inv_arrow':\n shape = 'rect_left_inv_arrow';\n break;\n case 'circle':\n shape = 'circle';\n break;\n case 'ellipse':\n shape = 'ellipse';\n break;\n case 'stadium':\n shape = 'stadium';\n break;\n case 'subroutine':\n shape = 'subroutine';\n break;\n case 'cylinder':\n shape = 'cylinder';\n break;\n case 'group':\n shape = 'rect';\n break;\n case 'doublecircle':\n shape = 'doublecircle';\n break;\n default:\n shape = 'rect';\n }\n\n const styles = getStylesFromArray(vertex?.styles ?? []);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label;\n\n const bounds = vertex.size ?? { width: 0, height: 0, x: 0, y: 0 };\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: vertexText,\n rx: radius,\n ry: radius,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n directions: vertex.directions,\n width: bounds.width,\n height: bounds.height,\n x: bounds.x,\n y: bounds.y,\n positioned,\n intersect: undefined,\n type: vertex.type,\n padding: padding ?? getConfig()?.block?.padding ?? 0,\n };\n return node;\n}\nasync function calculateBlockSize(\n elem: d3.Selection,\n block: any,\n db: any\n) {\n const node = getNodeFromBlock(block, db, false);\n if (node.type === 'group') {\n return;\n }\n\n // Add the element to the DOM to size it\n const config = getConfig();\n const nodeEl = await insertNode(elem, node, { config });\n const boundingBox = nodeEl.node().getBBox();\n const obj = db.getBlock(node.id);\n obj.size = { width: boundingBox.width, height: boundingBox.height, x: 0, y: 0, node: nodeEl };\n db.setBlock(obj);\n nodeEl.remove();\n}\ntype ActionFun = typeof calculateBlockSize;\n\nexport async function insertBlockPositioned(elem: any, block: Block, db: any) {\n const node = getNodeFromBlock(block, db, true);\n // Add the element to the DOM to size it\n const obj = db.getBlock(node.id);\n if (obj.type !== 'space') {\n const config = getConfig();\n await insertNode(elem, node, { config });\n block.intersect = node?.intersect;\n positionNode(node);\n }\n}\n\nexport async function performOperations(\n elem: d3.Selection,\n blocks: Block[],\n db: BlockDB,\n operation: ActionFun\n) {\n for (const block of blocks) {\n await operation(elem, block, db);\n if (block.children) {\n await performOperations(elem, block.children, db, operation);\n }\n }\n}\n\nexport async function calculateBlockSizes(elem: any, blocks: Block[], db: BlockDB) {\n await performOperations(elem, blocks, db, calculateBlockSize);\n}\n\nexport async function insertBlocks(\n elem: d3.Selection,\n blocks: Block[],\n db: BlockDB\n) {\n await performOperations(elem, blocks, db, insertBlockPositioned);\n}\n\nexport async function insertEdges(\n elem: any,\n edges: Block[],\n blocks: Block[],\n db: BlockDB,\n id: string\n) {\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true,\n });\n g.setGraph({\n rankdir: 'TB',\n nodesep: 10,\n ranksep: 10,\n marginx: 8,\n marginy: 8,\n });\n\n for (const block of blocks) {\n if (block.size) {\n g.setNode(block.id, {\n width: block.size.width,\n height: block.size.height,\n intersect: block.intersect,\n });\n }\n }\n\n for (const edge of edges) {\n // elem, e, edge, clusterDb, diagramType, graph;\n if (edge.start && edge.end) {\n const startBlock = db.getBlock(edge.start);\n const endBlock = db.getBlock(edge.end);\n\n if (startBlock?.size && endBlock?.size) {\n const start = startBlock.size;\n const end = endBlock.size;\n const points = [\n { x: start.x, y: start.y },\n { x: start.x + (end.x - start.x) / 2, y: start.y + (end.y - start.y) / 2 },\n { x: end.x, y: end.y },\n ];\n // edge.points = points;\n insertEdge(\n elem,\n { v: edge.start, w: edge.end, name: edge.id },\n {\n ...edge,\n arrowTypeEnd: edge.arrowTypeEnd,\n arrowTypeStart: edge.arrowTypeStart,\n points,\n classes: 'edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1',\n },\n undefined,\n 'block',\n g,\n id\n );\n if (edge.label) {\n await insertEdgeLabel(elem, {\n ...edge,\n label: edge.label,\n labelStyle: 'stroke: #333; stroke-width: 1.5px;fill:none;',\n arrowTypeEnd: edge.arrowTypeEnd,\n arrowTypeStart: edge.arrowTypeStart,\n points,\n classes: 'edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1',\n });\n positionEdgeLabel(\n { ...edge, x: points[1].x, y: points[1].y },\n {\n originalPath: points,\n }\n );\n }\n }\n }\n }\n}\n", "import { select as d3select } from 'd3';\nimport type { Diagram } from '../../Diagram.js';\nimport * as configApi from '../../config.js';\nimport insertMarkers from '../../dagre-wrapper/markers.js';\nimport { log } from '../../logger.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type { BlockDB } from './blockDB.js';\nimport { layout } from './layout.js';\nimport { calculateBlockSizes, insertBlocks, insertEdges } from './renderHelpers.js';\n\nexport const getClasses = function (text: any, diagObj: any) {\n return diagObj.db.getClasses();\n};\n\nexport const draw = async function (\n text: string,\n id: string,\n _version: string,\n diagObj: Diagram\n): Promise {\n const { securityLevel, block: conf } = configApi.getConfig();\n const db = diagObj.db as BlockDB;\n let sandboxElement: any;\n if (securityLevel === 'sandbox') {\n sandboxElement = d3select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? d3select(sandboxElement.nodes()[0].contentDocument.body)\n : d3select('body');\n\n const svg =\n securityLevel === 'sandbox'\n ? root.select(`[id=\"${id}\"]`)\n : d3select(`[id=\"${id}\"]`);\n\n // Define the supported markers for the diagram\n const markers = ['point', 'circle', 'cross'];\n\n // Add the marker definitions to the svg as marker tags\n insertMarkers(svg, markers, diagObj.type, id);\n\n const bl = db.getBlocks();\n const blArr = db.getBlocksFlat();\n const edges = db.getEdges();\n\n const nodes = svg.insert('g').attr('class', 'block');\n await calculateBlockSizes(nodes, bl, db);\n const bounds = layout(db);\n await insertBlocks(nodes, bl, db);\n await insertEdges(nodes, edges, blArr, db, id);\n\n // Establish svg dimensions and get width and height\n // Why, oh why ????\n if (bounds) {\n const bounds2 = bounds;\n const magicFactor = Math.max(1, Math.round(0.125 * (bounds2.width / bounds2.height)));\n const height = bounds2.height + magicFactor + 10;\n const width = bounds2.width + 10;\n const { useMaxWidth } = conf!;\n configureSvgSize(svg, height, width, !!useMaxWidth);\n log.debug('Here Bounds', bounds, bounds2);\n svg.attr(\n 'viewBox',\n `${bounds2.x - 5} ${bounds2.y - 5} ${bounds2.width + 10} ${bounds2.height + 10}`\n );\n }\n};\n\nexport default {\n draw,\n getClasses,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: jison doesn't export types\nimport parser from './parser/block.jison';\nimport db from './blockDB.js';\nimport flowStyles from './styles.js';\nimport renderer from './blockRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles: flowStyles,\n};\n", "import type { DiagramDB } from '../../diagram-api/types.js';\nimport type { ArchitectureDiagramConfig } from '../../config.type.js';\nimport type { D3Element } from '../../types.js';\nimport type cytoscape from 'cytoscape';\n\n/*=======================================*\\\n| Architecture Diagram Types |\n\\*=======================================*/\n\nexport type ArchitectureDirection = 'L' | 'R' | 'T' | 'B';\nexport type ArchitectureDirectionX = Extract;\nexport type ArchitectureDirectionY = Extract;\n\n/**\n * Contains LL, RR, TT, BB which are impossible connections\n */\nexport type InvalidArchitectureDirectionPair = `${ArchitectureDirection}${ArchitectureDirection}`;\nexport type ArchitectureDirectionPair = Exclude<\n InvalidArchitectureDirectionPair,\n 'LL' | 'RR' | 'TT' | 'BB'\n>;\nexport type ArchitectureDirectionPairXY = Exclude<\n InvalidArchitectureDirectionPair,\n 'LL' | 'RR' | 'TT' | 'BB' | 'LR' | 'RL' | 'TB' | 'BT'\n>;\n\nexport const ArchitectureDirectionName = {\n L: 'left',\n R: 'right',\n T: 'top',\n B: 'bottom',\n} as const;\n\nexport const ArchitectureDirectionArrow = {\n L: (scale: number) => `${scale},${scale / 2} 0,${scale} 0,0`,\n R: (scale: number) => `0,${scale / 2} ${scale},0 ${scale},${scale}`,\n T: (scale: number) => `0,0 ${scale},0 ${scale / 2},${scale}`,\n B: (scale: number) => `${scale / 2},0 ${scale},${scale} 0,${scale}`,\n} as const;\n\nexport const ArchitectureDirectionArrowShift = {\n L: (orig: number, arrowSize: number) => orig - arrowSize + 2,\n R: (orig: number, _arrowSize: number) => orig - 2,\n T: (orig: number, arrowSize: number) => orig - arrowSize + 2,\n B: (orig: number, _arrowSize: number) => orig - 2,\n} as const;\n\nexport const getOppositeArchitectureDirection = function (\n x: ArchitectureDirection\n): ArchitectureDirection {\n if (isArchitectureDirectionX(x)) {\n return x === 'L' ? 'R' : 'L';\n } else {\n return x === 'T' ? 'B' : 'T';\n }\n};\n\nexport const isArchitectureDirection = function (x: unknown): x is ArchitectureDirection {\n const temp = x as ArchitectureDirection;\n return temp === 'L' || temp === 'R' || temp === 'T' || temp === 'B';\n};\n\nexport const isArchitectureDirectionX = function (\n x: ArchitectureDirection\n): x is ArchitectureDirectionX {\n const temp = x as ArchitectureDirectionX;\n return temp === 'L' || temp === 'R';\n};\n\nexport const isArchitectureDirectionY = function (\n x: ArchitectureDirection\n): x is ArchitectureDirectionY {\n const temp = x as ArchitectureDirectionY;\n return temp === 'T' || temp === 'B';\n};\n\nexport const isArchitectureDirectionXY = function (\n a: ArchitectureDirection,\n b: ArchitectureDirection\n) {\n const aX_bY = isArchitectureDirectionX(a) && isArchitectureDirectionY(b);\n const aY_bX = isArchitectureDirectionY(a) && isArchitectureDirectionX(b);\n return aX_bY || aY_bX;\n};\n\nexport const isArchitecturePairXY = function (\n pair: ArchitectureDirectionPair\n): pair is ArchitectureDirectionPairXY {\n const lhs = pair[0] as ArchitectureDirection;\n const rhs = pair[1] as ArchitectureDirection;\n const aX_bY = isArchitectureDirectionX(lhs) && isArchitectureDirectionY(rhs);\n const aY_bX = isArchitectureDirectionY(lhs) && isArchitectureDirectionX(rhs);\n return aX_bY || aY_bX;\n};\n\n/**\n * Verifies that the architecture direction pair does not contain an invalid match (LL, RR, TT, BB)\n * @param x - architecture direction pair which could potentially be invalid\n * @returns true if the pair is not LL, RR, TT, or BB\n */\nexport const isValidArchitectureDirectionPair = function (\n x: InvalidArchitectureDirectionPair\n): x is ArchitectureDirectionPair {\n return x !== 'LL' && x !== 'RR' && x !== 'TT' && x !== 'BB';\n};\n\nexport type ArchitectureDirectionPairMap = {\n [key in ArchitectureDirectionPair]?: string;\n};\n\n/**\n * Creates a pair of the directions of each side of an edge. This function should be used instead of manually creating it to ensure that the source is always the first character.\n *\n * Note: Undefined is returned when sourceDir and targetDir are the same. In theory this should never happen since the diagram parser throws an error if a user defines it as such.\n * @param sourceDir - source direction\n * @param targetDir - target direction\n * @returns\n */\nexport const getArchitectureDirectionPair = function (\n sourceDir: ArchitectureDirection,\n targetDir: ArchitectureDirection\n): ArchitectureDirectionPair | undefined {\n const pair: `${ArchitectureDirection}${ArchitectureDirection}` = `${sourceDir}${targetDir}`;\n return isValidArchitectureDirectionPair(pair) ? pair : undefined;\n};\n\n/**\n * Given an x,y position for an arrow and the direction of the edge it belongs to, return a factor for slightly shifting the edge\n * @param param0 - [x, y] coordinate pair\n * @param pair - architecture direction pair\n * @returns a new [x, y] coordinate pair\n */\nexport const shiftPositionByArchitectureDirectionPair = function (\n [x, y]: number[],\n pair: ArchitectureDirectionPair\n): number[] {\n const lhs = pair[0] as ArchitectureDirection;\n const rhs = pair[1] as ArchitectureDirection;\n if (isArchitectureDirectionX(lhs)) {\n if (isArchitectureDirectionY(rhs)) {\n return [x + (lhs === 'L' ? -1 : 1), y + (rhs === 'T' ? 1 : -1)];\n } else {\n return [x + (lhs === 'L' ? -1 : 1), y];\n }\n } else {\n if (isArchitectureDirectionX(rhs)) {\n return [x + (rhs === 'L' ? 1 : -1), y + (lhs === 'T' ? 1 : -1)];\n } else {\n return [x, y + (lhs === 'T' ? 1 : -1)];\n }\n }\n};\n\n/**\n * Given the directional pair of an XY edge, get the scale factors necessary to shift the coordinates inwards towards the edge\n * @param pair - XY pair of an edge\n * @returns - number[] containing [+/- 1, +/- 1]\n */\nexport const getArchitectureDirectionXYFactors = function (\n pair: ArchitectureDirectionPairXY\n): number[] {\n if (pair === 'LT' || pair === 'TL') {\n return [1, 1];\n } else if (pair === 'BL' || pair === 'LB') {\n return [1, -1];\n } else if (pair === 'BR' || pair === 'RB') {\n return [-1, -1];\n } else {\n return [-1, 1];\n }\n};\n\nexport interface ArchitectureStyleOptions {\n archEdgeColor: string;\n archEdgeArrowColor: string;\n archEdgeWidth: string;\n archGroupBorderColor: string;\n archGroupBorderWidth: string;\n}\n\nexport interface ArchitectureService {\n id: string;\n type: 'service';\n edges: ArchitectureEdge[];\n icon?: string;\n iconText?: string;\n title?: string;\n in?: string;\n width?: number;\n height?: number;\n}\n\nexport interface ArchitectureJunction {\n id: string;\n type: 'junction';\n edges: ArchitectureEdge[];\n in?: string;\n width?: number;\n height?: number;\n}\n\nexport type ArchitectureNode = ArchitectureService | ArchitectureJunction;\n\nexport const isArchitectureService = function (x: ArchitectureNode): x is ArchitectureService {\n const temp = x as ArchitectureService;\n return temp.type === 'service';\n};\n\nexport const isArchitectureJunction = function (x: ArchitectureNode): x is ArchitectureJunction {\n const temp = x as ArchitectureJunction;\n return temp.type === 'junction';\n};\n\nexport interface ArchitectureGroup {\n id: string;\n icon?: string;\n title?: string;\n in?: string;\n}\n\nexport interface ArchitectureEdge
    {\n lhsId: string;\n lhsDir: DT;\n lhsInto?: boolean;\n lhsGroup?: boolean;\n rhsId: string;\n rhsDir: DT;\n rhsInto?: boolean;\n rhsGroup?: boolean;\n title?: string;\n}\n\nexport interface ArchitectureDB extends DiagramDB {\n clear: () => void;\n addService: (service: Omit) => void;\n getServices: () => ArchitectureService[];\n addJunction: (service: Omit) => void;\n getJunctions: () => ArchitectureJunction[];\n getNodes: () => ArchitectureNode[];\n getNode: (id: string) => ArchitectureNode | null;\n addGroup: (group: ArchitectureGroup) => void;\n getGroups: () => ArchitectureGroup[];\n addEdge: (edge: ArchitectureEdge) => void;\n getEdges: () => ArchitectureEdge[];\n setElementForId: (id: string, element: D3Element) => void;\n getElementById: (id: string) => D3Element;\n getDataStructures: () => ArchitectureDataStructures;\n}\n\nexport type ArchitectureAdjacencyList = Record;\nexport type ArchitectureSpatialMap = Record;\nexport interface ArchitectureDataStructures {\n adjList: ArchitectureAdjacencyList;\n spatialMaps: ArchitectureSpatialMap[];\n}\n\nexport interface ArchitectureState extends Record {\n nodes: Record;\n groups: Record;\n edges: ArchitectureEdge[];\n registeredIds: Record;\n dataStructures?: ArchitectureDataStructures;\n elements: Record;\n config: ArchitectureDiagramConfig;\n}\n\n/*=======================================*\\\n| Cytoscape Override Types |\n\\*=======================================*/\n\nexport interface EdgeSingularData {\n id: string;\n label?: string;\n source: string;\n sourceDir: ArchitectureDirection;\n sourceArrow?: boolean;\n sourceGroup?: boolean;\n target: string;\n targetDir: ArchitectureDirection;\n targetArrow?: boolean;\n targetGroup?: boolean;\n [key: string]: any;\n}\n\nexport const edgeData = (edge: cytoscape.EdgeSingular) => {\n return edge.data() as EdgeSingularData;\n};\n\nexport interface EdgeSingular extends cytoscape.EdgeSingular {\n _private: {\n bodyBounds: unknown;\n rscratch: {\n startX: number;\n startY: number;\n midX: number;\n midY: number;\n endX: number;\n endY: number;\n };\n };\n data(): EdgeSingularData;\n data(key: T): EdgeSingularData[T];\n}\n\nexport type NodeSingularData =\n | {\n type: 'service';\n id: string;\n icon?: string;\n label?: string;\n parent?: string;\n width: number;\n height: number;\n [key: string]: any;\n }\n | {\n type: 'junction';\n id: string;\n parent?: string;\n width: number;\n height: number;\n [key: string]: any;\n }\n | {\n type: 'group';\n id: string;\n icon?: string;\n label?: string;\n parent?: string;\n [key: string]: any;\n };\n\nexport const nodeData = (node: cytoscape.NodeSingular) => {\n return node.data() as NodeSingularData;\n};\n\nexport interface NodeSingular extends cytoscape.NodeSingular {\n _private: {\n bodyBounds: {\n h: number;\n w: number;\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n };\n children: cytoscape.NodeSingular[];\n };\n data(): NodeSingularData;\n data(key: T): NodeSingularData[T];\n}\n", "import type { ArchitectureDiagramConfig } from '../../config.type.js';\nimport DEFAULT_CONFIG from '../../defaultConfig.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { D3Element } from '../../types.js';\nimport { ImperativeState } from '../../utils/imperativeState.js';\nimport {\n clear as commonClear,\n getAccDescription,\n getAccTitle,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n} from '../common/commonDb.js';\nimport type {\n ArchitectureDB,\n ArchitectureDirectionPair,\n ArchitectureDirectionPairMap,\n ArchitectureEdge,\n ArchitectureGroup,\n ArchitectureJunction,\n ArchitectureNode,\n ArchitectureService,\n ArchitectureSpatialMap,\n ArchitectureState,\n} from './architectureTypes.js';\nimport {\n getArchitectureDirectionPair,\n isArchitectureDirection,\n isArchitectureJunction,\n isArchitectureService,\n shiftPositionByArchitectureDirectionPair,\n} from './architectureTypes.js';\n\nconst DEFAULT_ARCHITECTURE_CONFIG: Required =\n DEFAULT_CONFIG.architecture;\n\nconst state = new ImperativeState(() => ({\n nodes: {},\n groups: {},\n edges: [],\n registeredIds: {},\n config: DEFAULT_ARCHITECTURE_CONFIG,\n dataStructures: undefined,\n elements: {},\n}));\n\nconst clear = (): void => {\n state.reset();\n commonClear();\n};\n\nconst addService = function ({\n id,\n icon,\n in: parent,\n title,\n iconText,\n}: Omit) {\n if (state.records.registeredIds[id] !== undefined) {\n throw new Error(\n `The service id [${id}] is already in use by another ${state.records.registeredIds[id]}`\n );\n }\n if (parent !== undefined) {\n if (id === parent) {\n throw new Error(`The service [${id}] cannot be placed within itself`);\n }\n if (state.records.registeredIds[parent] === undefined) {\n throw new Error(\n `The service [${id}]'s parent does not exist. Please make sure the parent is created before this service`\n );\n }\n if (state.records.registeredIds[parent] === 'node') {\n throw new Error(`The service [${id}]'s parent is not a group`);\n }\n }\n\n state.records.registeredIds[id] = 'node';\n\n state.records.nodes[id] = {\n id,\n type: 'service',\n icon,\n iconText,\n title,\n edges: [],\n in: parent,\n };\n};\n\nconst getServices = (): ArchitectureService[] =>\n Object.values(state.records.nodes).filter(isArchitectureService);\n\nconst addJunction = function ({ id, in: parent }: Omit) {\n state.records.registeredIds[id] = 'node';\n\n state.records.nodes[id] = {\n id,\n type: 'junction',\n edges: [],\n in: parent,\n };\n};\n\nconst getJunctions = (): ArchitectureJunction[] =>\n Object.values(state.records.nodes).filter(isArchitectureJunction);\n\nconst getNodes = (): ArchitectureNode[] => Object.values(state.records.nodes);\n\nconst getNode = (id: string): ArchitectureNode | null => state.records.nodes[id];\n\nconst addGroup = function ({ id, icon, in: parent, title }: ArchitectureGroup) {\n if (state.records.registeredIds[id] !== undefined) {\n throw new Error(\n `The group id [${id}] is already in use by another ${state.records.registeredIds[id]}`\n );\n }\n if (parent !== undefined) {\n if (id === parent) {\n throw new Error(`The group [${id}] cannot be placed within itself`);\n }\n if (state.records.registeredIds[parent] === undefined) {\n throw new Error(\n `The group [${id}]'s parent does not exist. Please make sure the parent is created before this group`\n );\n }\n if (state.records.registeredIds[parent] === 'node') {\n throw new Error(`The group [${id}]'s parent is not a group`);\n }\n }\n\n state.records.registeredIds[id] = 'group';\n\n state.records.groups[id] = {\n id,\n icon,\n title,\n in: parent,\n };\n};\nconst getGroups = (): ArchitectureGroup[] => {\n return Object.values(state.records.groups);\n};\n\nconst addEdge = function ({\n lhsId,\n rhsId,\n lhsDir,\n rhsDir,\n lhsInto,\n rhsInto,\n lhsGroup,\n rhsGroup,\n title,\n}: ArchitectureEdge) {\n if (!isArchitectureDirection(lhsDir)) {\n throw new Error(\n `Invalid direction given for left hand side of edge ${lhsId}--${rhsId}. Expected (L,R,T,B) got ${lhsDir}`\n );\n }\n if (!isArchitectureDirection(rhsDir)) {\n throw new Error(\n `Invalid direction given for right hand side of edge ${lhsId}--${rhsId}. Expected (L,R,T,B) got ${rhsDir}`\n );\n }\n\n if (state.records.nodes[lhsId] === undefined && state.records.groups[lhsId] === undefined) {\n throw new Error(\n `The left-hand id [${lhsId}] does not yet exist. Please create the service/group before declaring an edge to it.`\n );\n }\n if (state.records.nodes[rhsId] === undefined && state.records.groups[lhsId] === undefined) {\n throw new Error(\n `The right-hand id [${rhsId}] does not yet exist. Please create the service/group before declaring an edge to it.`\n );\n }\n\n const lhsGroupId = state.records.nodes[lhsId].in;\n const rhsGroupId = state.records.nodes[rhsId].in;\n if (lhsGroup && lhsGroupId && rhsGroupId && lhsGroupId == rhsGroupId) {\n throw new Error(\n `The left-hand id [${lhsId}] is modified to traverse the group boundary, but the edge does not pass through two groups.`\n );\n }\n if (rhsGroup && lhsGroupId && rhsGroupId && lhsGroupId == rhsGroupId) {\n throw new Error(\n `The right-hand id [${rhsId}] is modified to traverse the group boundary, but the edge does not pass through two groups.`\n );\n }\n\n const edge = {\n lhsId,\n lhsDir,\n lhsInto,\n lhsGroup,\n rhsId,\n rhsDir,\n rhsInto,\n rhsGroup,\n title,\n };\n\n state.records.edges.push(edge);\n if (state.records.nodes[lhsId] && state.records.nodes[rhsId]) {\n state.records.nodes[lhsId].edges.push(state.records.edges[state.records.edges.length - 1]);\n state.records.nodes[rhsId].edges.push(state.records.edges[state.records.edges.length - 1]);\n }\n};\n\nconst getEdges = (): ArchitectureEdge[] => state.records.edges;\n\n/**\n * Returns the current diagram's adjacency list & spatial map.\n * If they have not been created, run the algorithms to generate them.\n * @returns\n */\nconst getDataStructures = () => {\n if (state.records.dataStructures === undefined) {\n // Create an adjacency list of the diagram to perform BFS on\n // Outer reduce applied on all services\n // Inner reduce applied on the edges for a service\n const adjList = Object.entries(state.records.nodes).reduce<\n Record\n >((prevOuter, [id, service]) => {\n prevOuter[id] = service.edges.reduce((prevInner, edge) => {\n if (edge.lhsId === id) {\n // source is LHS\n const pair = getArchitectureDirectionPair(edge.lhsDir, edge.rhsDir);\n if (pair) {\n prevInner[pair] = edge.rhsId;\n }\n } else {\n // source is RHS\n const pair = getArchitectureDirectionPair(edge.rhsDir, edge.lhsDir);\n if (pair) {\n prevInner[pair] = edge.lhsId;\n }\n }\n return prevInner;\n }, {});\n return prevOuter;\n }, {});\n\n // Configuration for the initial pass of BFS\n const firstId = Object.keys(adjList)[0];\n const visited = { [firstId]: 1 };\n const notVisited = Object.keys(adjList).reduce(\n (prev, id) => (id === firstId ? prev : { ...prev, [id]: 1 }),\n {} as Record\n );\n\n // Perform BFS on the adjacency list\n const BFS = (startingId: string): ArchitectureSpatialMap => {\n const spatialMap = { [startingId]: [0, 0] };\n const queue = [startingId];\n while (queue.length > 0) {\n const id = queue.shift();\n if (id) {\n visited[id] = 1;\n delete notVisited[id];\n const adj = adjList[id];\n const [posX, posY] = spatialMap[id];\n Object.entries(adj).forEach(([dir, rhsId]) => {\n if (!visited[rhsId]) {\n spatialMap[rhsId] = shiftPositionByArchitectureDirectionPair(\n [posX, posY],\n dir as ArchitectureDirectionPair\n );\n queue.push(rhsId);\n }\n });\n }\n }\n return spatialMap;\n };\n const spatialMaps = [BFS(firstId)];\n\n // If our diagram is disconnected, keep adding additional spatial maps until all disconnected graphs have been found\n while (Object.keys(notVisited).length > 0) {\n spatialMaps.push(BFS(Object.keys(notVisited)[0]));\n }\n state.records.dataStructures = {\n adjList,\n spatialMaps,\n };\n }\n return state.records.dataStructures;\n};\n\nconst setElementForId = (id: string, element: D3Element) => {\n state.records.elements[id] = element;\n};\nconst getElementById = (id: string) => state.records.elements[id];\n\nexport const db: ArchitectureDB = {\n clear,\n setDiagramTitle,\n getDiagramTitle,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n\n addService,\n getServices,\n addJunction,\n getJunctions,\n getNodes,\n getNode,\n addGroup,\n getGroups,\n addEdge,\n getEdges,\n setElementForId,\n getElementById,\n getDataStructures,\n};\n\n/**\n * Typed wrapper for resolving an architecture diagram's config fields. Returns the default value if undefined\n * @param field - the config field to access\n * @returns\n */\nexport function getConfigField(\n field: T\n): Required[T] {\n const arch = getConfig().architecture;\n if (arch?.[field]) {\n return arch[field] as Required[T];\n }\n return DEFAULT_ARCHITECTURE_CONFIG[field];\n}\n", "import type { Architecture } from '@mermaid-js/parser';\nimport { parse } from '@mermaid-js/parser';\nimport { log } from '../../logger.js';\nimport type { ParserDefinition } from '../../diagram-api/types.js';\nimport { populateCommonDb } from '../common/populateCommonDb.js';\nimport type { ArchitectureDB } from './architectureTypes.js';\nimport { db } from './architectureDb.js';\n\nconst populateDb = (ast: Architecture, db: ArchitectureDB) => {\n populateCommonDb(ast, db);\n ast.groups.map(db.addGroup);\n ast.services.map((service) => db.addService({ ...service, type: 'service' }));\n ast.junctions.map((service) => db.addJunction({ ...service, type: 'junction' }));\n // @ts-ignore TODO our parser guarantees the type is L/R/T/B and not string. How to change to union type?\n ast.edges.map(db.addEdge);\n};\n\nexport const parser: ParserDefinition = {\n parse: async (input: string): Promise => {\n const ast: Architecture = await parse('architecture', input);\n log.debug(ast);\n populateDb(ast, db);\n },\n};\n", "import type { DiagramStylesProvider } from '../../diagram-api/types.js';\nimport type { ArchitectureStyleOptions } from './architectureTypes.js';\n\nconst getStyles: DiagramStylesProvider = (options: ArchitectureStyleOptions) =>\n `\n .edge {\n stroke-width: ${options.archEdgeWidth};\n stroke: ${options.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${options.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${options.archGroupBorderColor};\n stroke-width: ${options.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`;\n\nexport default getStyles;\n", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"layoutBase\"] = factory();\n\telse\n\t\troot[\"layoutBase\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 28);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction LayoutConstants() {}\n\n/**\r\n * Layout Quality: 0:draft, 1:default, 2:proof\r\n */\nLayoutConstants.QUALITY = 1;\n\n/**\r\n * Default parameters\r\n */\nLayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false;\nLayoutConstants.DEFAULT_INCREMENTAL = false;\nLayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true;\nLayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false;\nLayoutConstants.DEFAULT_ANIMATION_PERIOD = 50;\nLayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false;\n\n// -----------------------------------------------------------------------------\n// Section: General other constants\n// -----------------------------------------------------------------------------\n/*\r\n * Margins of a graph to be applied on bouding rectangle of its contents. We\r\n * assume margins on all four sides to be uniform.\r\n */\nLayoutConstants.DEFAULT_GRAPH_MARGIN = 15;\n\n/*\r\n * Whether to consider labels in node dimensions or not\r\n */\nLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false;\n\n/*\r\n * Default dimension of a non-compound node.\r\n */\nLayoutConstants.SIMPLE_NODE_SIZE = 40;\n\n/*\r\n * Default dimension of a non-compound node.\r\n */\nLayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2;\n\n/*\r\n * Empty compound node size. When a compound node is empty, its both\r\n * dimensions should be of this value.\r\n */\nLayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40;\n\n/*\r\n * Minimum length that an edge should take during layout\r\n */\nLayoutConstants.MIN_EDGE_LENGTH = 1;\n\n/*\r\n * World boundaries that layout operates on\r\n */\nLayoutConstants.WORLD_BOUNDARY = 1000000;\n\n/*\r\n * World boundaries that random positioning can be performed with\r\n */\nLayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000;\n\n/*\r\n * Coordinates of the world center\r\n */\nLayoutConstants.WORLD_CENTER_X = 1200;\nLayoutConstants.WORLD_CENTER_Y = 900;\n\nmodule.exports = LayoutConstants;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar IGeometry = __webpack_require__(8);\nvar IMath = __webpack_require__(9);\n\nfunction LEdge(source, target, vEdge) {\n LGraphObject.call(this, vEdge);\n\n this.isOverlapingSourceAndTarget = false;\n this.vGraphObject = vEdge;\n this.bendpoints = [];\n this.source = source;\n this.target = target;\n}\n\nLEdge.prototype = Object.create(LGraphObject.prototype);\n\nfor (var prop in LGraphObject) {\n LEdge[prop] = LGraphObject[prop];\n}\n\nLEdge.prototype.getSource = function () {\n return this.source;\n};\n\nLEdge.prototype.getTarget = function () {\n return this.target;\n};\n\nLEdge.prototype.isInterGraph = function () {\n return this.isInterGraph;\n};\n\nLEdge.prototype.getLength = function () {\n return this.length;\n};\n\nLEdge.prototype.isOverlapingSourceAndTarget = function () {\n return this.isOverlapingSourceAndTarget;\n};\n\nLEdge.prototype.getBendpoints = function () {\n return this.bendpoints;\n};\n\nLEdge.prototype.getLca = function () {\n return this.lca;\n};\n\nLEdge.prototype.getSourceInLca = function () {\n return this.sourceInLca;\n};\n\nLEdge.prototype.getTargetInLca = function () {\n return this.targetInLca;\n};\n\nLEdge.prototype.getOtherEnd = function (node) {\n if (this.source === node) {\n return this.target;\n } else if (this.target === node) {\n return this.source;\n } else {\n throw \"Node is not incident with this edge\";\n }\n};\n\nLEdge.prototype.getOtherEndInGraph = function (node, graph) {\n var otherEnd = this.getOtherEnd(node);\n var root = graph.getGraphManager().getRoot();\n\n while (true) {\n if (otherEnd.getOwner() == graph) {\n return otherEnd;\n }\n\n if (otherEnd.getOwner() == root) {\n break;\n }\n\n otherEnd = otherEnd.getOwner().getParent();\n }\n\n return null;\n};\n\nLEdge.prototype.updateLength = function () {\n var clipPointCoordinates = new Array(4);\n\n this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates);\n\n if (!this.isOverlapingSourceAndTarget) {\n this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2];\n this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3];\n\n if (Math.abs(this.lengthX) < 1.0) {\n this.lengthX = IMath.sign(this.lengthX);\n }\n\n if (Math.abs(this.lengthY) < 1.0) {\n this.lengthY = IMath.sign(this.lengthY);\n }\n\n this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);\n }\n};\n\nLEdge.prototype.updateLengthSimple = function () {\n this.lengthX = this.target.getCenterX() - this.source.getCenterX();\n this.lengthY = this.target.getCenterY() - this.source.getCenterY();\n\n if (Math.abs(this.lengthX) < 1.0) {\n this.lengthX = IMath.sign(this.lengthX);\n }\n\n if (Math.abs(this.lengthY) < 1.0) {\n this.lengthY = IMath.sign(this.lengthY);\n }\n\n this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);\n};\n\nmodule.exports = LEdge;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction LGraphObject(vGraphObject) {\n this.vGraphObject = vGraphObject;\n}\n\nmodule.exports = LGraphObject;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar Integer = __webpack_require__(10);\nvar RectangleD = __webpack_require__(13);\nvar LayoutConstants = __webpack_require__(0);\nvar RandomSeed = __webpack_require__(16);\nvar PointD = __webpack_require__(5);\n\nfunction LNode(gm, loc, size, vNode) {\n //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode)\n if (size == null && vNode == null) {\n vNode = loc;\n }\n\n LGraphObject.call(this, vNode);\n\n //Alternative constructor 2 : LNode(Layout layout, Object vNode)\n if (gm.graphManager != null) gm = gm.graphManager;\n\n this.estimatedSize = Integer.MIN_VALUE;\n this.inclusionTreeDepth = Integer.MAX_VALUE;\n this.vGraphObject = vNode;\n this.edges = [];\n this.graphManager = gm;\n\n if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD();\n}\n\nLNode.prototype = Object.create(LGraphObject.prototype);\nfor (var prop in LGraphObject) {\n LNode[prop] = LGraphObject[prop];\n}\n\nLNode.prototype.getEdges = function () {\n return this.edges;\n};\n\nLNode.prototype.getChild = function () {\n return this.child;\n};\n\nLNode.prototype.getOwner = function () {\n // if (this.owner != null) {\n // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) {\n // throw \"assert failed\";\n // }\n // }\n\n return this.owner;\n};\n\nLNode.prototype.getWidth = function () {\n return this.rect.width;\n};\n\nLNode.prototype.setWidth = function (width) {\n this.rect.width = width;\n};\n\nLNode.prototype.getHeight = function () {\n return this.rect.height;\n};\n\nLNode.prototype.setHeight = function (height) {\n this.rect.height = height;\n};\n\nLNode.prototype.getCenterX = function () {\n return this.rect.x + this.rect.width / 2;\n};\n\nLNode.prototype.getCenterY = function () {\n return this.rect.y + this.rect.height / 2;\n};\n\nLNode.prototype.getCenter = function () {\n return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);\n};\n\nLNode.prototype.getLocation = function () {\n return new PointD(this.rect.x, this.rect.y);\n};\n\nLNode.prototype.getRect = function () {\n return this.rect;\n};\n\nLNode.prototype.getDiagonal = function () {\n return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);\n};\n\n/**\n * This method returns half the diagonal length of this node.\n */\nLNode.prototype.getHalfTheDiagonal = function () {\n return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;\n};\n\nLNode.prototype.setRect = function (upperLeft, dimension) {\n this.rect.x = upperLeft.x;\n this.rect.y = upperLeft.y;\n this.rect.width = dimension.width;\n this.rect.height = dimension.height;\n};\n\nLNode.prototype.setCenter = function (cx, cy) {\n this.rect.x = cx - this.rect.width / 2;\n this.rect.y = cy - this.rect.height / 2;\n};\n\nLNode.prototype.setLocation = function (x, y) {\n this.rect.x = x;\n this.rect.y = y;\n};\n\nLNode.prototype.moveBy = function (dx, dy) {\n this.rect.x += dx;\n this.rect.y += dy;\n};\n\nLNode.prototype.getEdgeListToNode = function (to) {\n var edgeList = [];\n var edge;\n var self = this;\n\n self.edges.forEach(function (edge) {\n\n if (edge.target == to) {\n if (edge.source != self) throw \"Incorrect edge source!\";\n\n edgeList.push(edge);\n }\n });\n\n return edgeList;\n};\n\nLNode.prototype.getEdgesBetween = function (other) {\n var edgeList = [];\n var edge;\n\n var self = this;\n self.edges.forEach(function (edge) {\n\n if (!(edge.source == self || edge.target == self)) throw \"Incorrect edge source and/or target\";\n\n if (edge.target == other || edge.source == other) {\n edgeList.push(edge);\n }\n });\n\n return edgeList;\n};\n\nLNode.prototype.getNeighborsList = function () {\n var neighbors = new Set();\n\n var self = this;\n self.edges.forEach(function (edge) {\n\n if (edge.source == self) {\n neighbors.add(edge.target);\n } else {\n if (edge.target != self) {\n throw \"Incorrect incidency!\";\n }\n\n neighbors.add(edge.source);\n }\n });\n\n return neighbors;\n};\n\nLNode.prototype.withChildren = function () {\n var withNeighborsList = new Set();\n var childNode;\n var children;\n\n withNeighborsList.add(this);\n\n if (this.child != null) {\n var nodes = this.child.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n childNode = nodes[i];\n children = childNode.withChildren();\n children.forEach(function (node) {\n withNeighborsList.add(node);\n });\n }\n }\n\n return withNeighborsList;\n};\n\nLNode.prototype.getNoOfChildren = function () {\n var noOfChildren = 0;\n var childNode;\n\n if (this.child == null) {\n noOfChildren = 1;\n } else {\n var nodes = this.child.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n childNode = nodes[i];\n\n noOfChildren += childNode.getNoOfChildren();\n }\n }\n\n if (noOfChildren == 0) {\n noOfChildren = 1;\n }\n return noOfChildren;\n};\n\nLNode.prototype.getEstimatedSize = function () {\n if (this.estimatedSize == Integer.MIN_VALUE) {\n throw \"assert failed\";\n }\n return this.estimatedSize;\n};\n\nLNode.prototype.calcEstimatedSize = function () {\n if (this.child == null) {\n return this.estimatedSize = (this.rect.width + this.rect.height) / 2;\n } else {\n this.estimatedSize = this.child.calcEstimatedSize();\n this.rect.width = this.estimatedSize;\n this.rect.height = this.estimatedSize;\n\n return this.estimatedSize;\n }\n};\n\nLNode.prototype.scatter = function () {\n var randomCenterX;\n var randomCenterY;\n\n var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY;\n var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY;\n randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX;\n\n var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY;\n var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY;\n randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY;\n\n this.rect.x = randomCenterX;\n this.rect.y = randomCenterY;\n};\n\nLNode.prototype.updateBounds = function () {\n if (this.getChild() == null) {\n throw \"assert failed\";\n }\n if (this.getChild().getNodes().length != 0) {\n // wrap the children nodes by re-arranging the boundaries\n var childGraph = this.getChild();\n childGraph.updateBounds(true);\n\n this.rect.x = childGraph.getLeft();\n this.rect.y = childGraph.getTop();\n\n this.setWidth(childGraph.getRight() - childGraph.getLeft());\n this.setHeight(childGraph.getBottom() - childGraph.getTop());\n\n // Update compound bounds considering its label properties \n if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {\n\n var width = childGraph.getRight() - childGraph.getLeft();\n var height = childGraph.getBottom() - childGraph.getTop();\n\n if (this.labelWidth) {\n if (this.labelPosHorizontal == \"left\") {\n this.rect.x -= this.labelWidth;\n this.setWidth(width + this.labelWidth);\n } else if (this.labelPosHorizontal == \"center\" && this.labelWidth > width) {\n this.rect.x -= (this.labelWidth - width) / 2;\n this.setWidth(this.labelWidth);\n } else if (this.labelPosHorizontal == \"right\") {\n this.setWidth(width + this.labelWidth);\n }\n }\n\n if (this.labelHeight) {\n if (this.labelPosVertical == \"top\") {\n this.rect.y -= this.labelHeight;\n this.setHeight(height + this.labelHeight);\n } else if (this.labelPosVertical == \"center\" && this.labelHeight > height) {\n this.rect.y -= (this.labelHeight - height) / 2;\n this.setHeight(this.labelHeight);\n } else if (this.labelPosVertical == \"bottom\") {\n this.setHeight(height + this.labelHeight);\n }\n }\n }\n }\n};\n\nLNode.prototype.getInclusionTreeDepth = function () {\n if (this.inclusionTreeDepth == Integer.MAX_VALUE) {\n throw \"assert failed\";\n }\n return this.inclusionTreeDepth;\n};\n\nLNode.prototype.transform = function (trans) {\n var left = this.rect.x;\n\n if (left > LayoutConstants.WORLD_BOUNDARY) {\n left = LayoutConstants.WORLD_BOUNDARY;\n } else if (left < -LayoutConstants.WORLD_BOUNDARY) {\n left = -LayoutConstants.WORLD_BOUNDARY;\n }\n\n var top = this.rect.y;\n\n if (top > LayoutConstants.WORLD_BOUNDARY) {\n top = LayoutConstants.WORLD_BOUNDARY;\n } else if (top < -LayoutConstants.WORLD_BOUNDARY) {\n top = -LayoutConstants.WORLD_BOUNDARY;\n }\n\n var leftTop = new PointD(left, top);\n var vLeftTop = trans.inverseTransformPoint(leftTop);\n\n this.setLocation(vLeftTop.x, vLeftTop.y);\n};\n\nLNode.prototype.getLeft = function () {\n return this.rect.x;\n};\n\nLNode.prototype.getRight = function () {\n return this.rect.x + this.rect.width;\n};\n\nLNode.prototype.getTop = function () {\n return this.rect.y;\n};\n\nLNode.prototype.getBottom = function () {\n return this.rect.y + this.rect.height;\n};\n\nLNode.prototype.getParent = function () {\n if (this.owner == null) {\n return null;\n }\n\n return this.owner.getParent();\n};\n\nmodule.exports = LNode;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LayoutConstants = __webpack_require__(0);\n\nfunction FDLayoutConstants() {}\n\n//FDLayoutConstants inherits static props in LayoutConstants\nfor (var prop in LayoutConstants) {\n FDLayoutConstants[prop] = LayoutConstants[prop];\n}\n\nFDLayoutConstants.MAX_ITERATIONS = 2500;\n\nFDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;\nFDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45;\nFDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0;\nFDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4;\nFDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0;\nFDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8;\nFDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5;\nFDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true;\nFDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true;\nFDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3;\nFDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33;\nFDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000;\nFDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000;\nFDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0;\nFDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3;\nFDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;\nFDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100;\nFDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1;\nFDLayoutConstants.MIN_EDGE_LENGTH = 1;\nFDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10;\n\nmodule.exports = FDLayoutConstants;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction PointD(x, y) {\n if (x == null && y == null) {\n this.x = 0;\n this.y = 0;\n } else {\n this.x = x;\n this.y = y;\n }\n}\n\nPointD.prototype.getX = function () {\n return this.x;\n};\n\nPointD.prototype.getY = function () {\n return this.y;\n};\n\nPointD.prototype.setX = function (x) {\n this.x = x;\n};\n\nPointD.prototype.setY = function (y) {\n this.y = y;\n};\n\nPointD.prototype.getDifference = function (pt) {\n return new DimensionD(this.x - pt.x, this.y - pt.y);\n};\n\nPointD.prototype.getCopy = function () {\n return new PointD(this.x, this.y);\n};\n\nPointD.prototype.translate = function (dim) {\n this.x += dim.width;\n this.y += dim.height;\n return this;\n};\n\nmodule.exports = PointD;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar Integer = __webpack_require__(10);\nvar LayoutConstants = __webpack_require__(0);\nvar LGraphManager = __webpack_require__(7);\nvar LNode = __webpack_require__(3);\nvar LEdge = __webpack_require__(1);\nvar RectangleD = __webpack_require__(13);\nvar Point = __webpack_require__(12);\nvar LinkedList = __webpack_require__(11);\n\nfunction LGraph(parent, obj2, vGraph) {\n LGraphObject.call(this, vGraph);\n this.estimatedSize = Integer.MIN_VALUE;\n this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN;\n this.edges = [];\n this.nodes = [];\n this.isConnected = false;\n this.parent = parent;\n\n if (obj2 != null && obj2 instanceof LGraphManager) {\n this.graphManager = obj2;\n } else if (obj2 != null && obj2 instanceof Layout) {\n this.graphManager = obj2.graphManager;\n }\n}\n\nLGraph.prototype = Object.create(LGraphObject.prototype);\nfor (var prop in LGraphObject) {\n LGraph[prop] = LGraphObject[prop];\n}\n\nLGraph.prototype.getNodes = function () {\n return this.nodes;\n};\n\nLGraph.prototype.getEdges = function () {\n return this.edges;\n};\n\nLGraph.prototype.getGraphManager = function () {\n return this.graphManager;\n};\n\nLGraph.prototype.getParent = function () {\n return this.parent;\n};\n\nLGraph.prototype.getLeft = function () {\n return this.left;\n};\n\nLGraph.prototype.getRight = function () {\n return this.right;\n};\n\nLGraph.prototype.getTop = function () {\n return this.top;\n};\n\nLGraph.prototype.getBottom = function () {\n return this.bottom;\n};\n\nLGraph.prototype.isConnected = function () {\n return this.isConnected;\n};\n\nLGraph.prototype.add = function (obj1, sourceNode, targetNode) {\n if (sourceNode == null && targetNode == null) {\n var newNode = obj1;\n if (this.graphManager == null) {\n throw \"Graph has no graph mgr!\";\n }\n if (this.getNodes().indexOf(newNode) > -1) {\n throw \"Node already in graph!\";\n }\n newNode.owner = this;\n this.getNodes().push(newNode);\n\n return newNode;\n } else {\n var newEdge = obj1;\n if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) {\n throw \"Source or target not in graph!\";\n }\n\n if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) {\n throw \"Both owners must be this graph!\";\n }\n\n if (sourceNode.owner != targetNode.owner) {\n return null;\n }\n\n // set source and target\n newEdge.source = sourceNode;\n newEdge.target = targetNode;\n\n // set as intra-graph edge\n newEdge.isInterGraph = false;\n\n // add to graph edge list\n this.getEdges().push(newEdge);\n\n // add to incidency lists\n sourceNode.edges.push(newEdge);\n\n if (targetNode != sourceNode) {\n targetNode.edges.push(newEdge);\n }\n\n return newEdge;\n }\n};\n\nLGraph.prototype.remove = function (obj) {\n var node = obj;\n if (obj instanceof LNode) {\n if (node == null) {\n throw \"Node is null!\";\n }\n if (!(node.owner != null && node.owner == this)) {\n throw \"Owner graph is invalid!\";\n }\n if (this.graphManager == null) {\n throw \"Owner graph manager is invalid!\";\n }\n // remove incident edges first (make a copy to do it safely)\n var edgesToBeRemoved = node.edges.slice();\n var edge;\n var s = edgesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n edge = edgesToBeRemoved[i];\n\n if (edge.isInterGraph) {\n this.graphManager.remove(edge);\n } else {\n edge.source.owner.remove(edge);\n }\n }\n\n // now the node itself\n var index = this.nodes.indexOf(node);\n if (index == -1) {\n throw \"Node not in owner node list!\";\n }\n\n this.nodes.splice(index, 1);\n } else if (obj instanceof LEdge) {\n var edge = obj;\n if (edge == null) {\n throw \"Edge is null!\";\n }\n if (!(edge.source != null && edge.target != null)) {\n throw \"Source and/or target is null!\";\n }\n if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) {\n throw \"Source and/or target owner is invalid!\";\n }\n\n var sourceIndex = edge.source.edges.indexOf(edge);\n var targetIndex = edge.target.edges.indexOf(edge);\n if (!(sourceIndex > -1 && targetIndex > -1)) {\n throw \"Source and/or target doesn't know this edge!\";\n }\n\n edge.source.edges.splice(sourceIndex, 1);\n\n if (edge.target != edge.source) {\n edge.target.edges.splice(targetIndex, 1);\n }\n\n var index = edge.source.owner.getEdges().indexOf(edge);\n if (index == -1) {\n throw \"Not in owner's edge list!\";\n }\n\n edge.source.owner.getEdges().splice(index, 1);\n }\n};\n\nLGraph.prototype.updateLeftTop = function () {\n var top = Integer.MAX_VALUE;\n var left = Integer.MAX_VALUE;\n var nodeTop;\n var nodeLeft;\n var margin;\n\n var nodes = this.getNodes();\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n nodeTop = lNode.getTop();\n nodeLeft = lNode.getLeft();\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n }\n\n // Do we have any nodes in this graph?\n if (top == Integer.MAX_VALUE) {\n return null;\n }\n\n if (nodes[0].getParent().paddingLeft != undefined) {\n margin = nodes[0].getParent().paddingLeft;\n } else {\n margin = this.margin;\n }\n\n this.left = left - margin;\n this.top = top - margin;\n\n // Apply the margins and return the result\n return new Point(this.left, this.top);\n};\n\nLGraph.prototype.updateBounds = function (recursive) {\n // calculate bounds\n var left = Integer.MAX_VALUE;\n var right = -Integer.MAX_VALUE;\n var top = Integer.MAX_VALUE;\n var bottom = -Integer.MAX_VALUE;\n var nodeLeft;\n var nodeRight;\n var nodeTop;\n var nodeBottom;\n var margin;\n\n var nodes = this.nodes;\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n\n if (recursive && lNode.child != null) {\n lNode.updateBounds();\n }\n nodeLeft = lNode.getLeft();\n nodeRight = lNode.getRight();\n nodeTop = lNode.getTop();\n nodeBottom = lNode.getBottom();\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingRect = new RectangleD(left, top, right - left, bottom - top);\n if (left == Integer.MAX_VALUE) {\n this.left = this.parent.getLeft();\n this.right = this.parent.getRight();\n this.top = this.parent.getTop();\n this.bottom = this.parent.getBottom();\n }\n\n if (nodes[0].getParent().paddingLeft != undefined) {\n margin = nodes[0].getParent().paddingLeft;\n } else {\n margin = this.margin;\n }\n\n this.left = boundingRect.x - margin;\n this.right = boundingRect.x + boundingRect.width + margin;\n this.top = boundingRect.y - margin;\n this.bottom = boundingRect.y + boundingRect.height + margin;\n};\n\nLGraph.calculateBounds = function (nodes) {\n var left = Integer.MAX_VALUE;\n var right = -Integer.MAX_VALUE;\n var top = Integer.MAX_VALUE;\n var bottom = -Integer.MAX_VALUE;\n var nodeLeft;\n var nodeRight;\n var nodeTop;\n var nodeBottom;\n\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n nodeLeft = lNode.getLeft();\n nodeRight = lNode.getRight();\n nodeTop = lNode.getTop();\n nodeBottom = lNode.getBottom();\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingRect = new RectangleD(left, top, right - left, bottom - top);\n\n return boundingRect;\n};\n\nLGraph.prototype.getInclusionTreeDepth = function () {\n if (this == this.graphManager.getRoot()) {\n return 1;\n } else {\n return this.parent.getInclusionTreeDepth();\n }\n};\n\nLGraph.prototype.getEstimatedSize = function () {\n if (this.estimatedSize == Integer.MIN_VALUE) {\n throw \"assert failed\";\n }\n return this.estimatedSize;\n};\n\nLGraph.prototype.calcEstimatedSize = function () {\n var size = 0;\n var nodes = this.nodes;\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n size += lNode.calcEstimatedSize();\n }\n\n if (size == 0) {\n this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE;\n } else {\n this.estimatedSize = size / Math.sqrt(this.nodes.length);\n }\n\n return this.estimatedSize;\n};\n\nLGraph.prototype.updateConnected = function () {\n var self = this;\n if (this.nodes.length == 0) {\n this.isConnected = true;\n return;\n }\n\n var queue = new LinkedList();\n var visited = new Set();\n var currentNode = this.nodes[0];\n var neighborEdges;\n var currentNeighbor;\n var childrenOfNode = currentNode.withChildren();\n childrenOfNode.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n });\n\n while (queue.length !== 0) {\n currentNode = queue.shift();\n\n // Traverse all neighbors of this node\n neighborEdges = currentNode.getEdges();\n var size = neighborEdges.length;\n for (var i = 0; i < size; i++) {\n var neighborEdge = neighborEdges[i];\n currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this);\n\n // Add unvisited neighbors to the list to visit\n if (currentNeighbor != null && !visited.has(currentNeighbor)) {\n var childrenOfNeighbor = currentNeighbor.withChildren();\n\n childrenOfNeighbor.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n });\n }\n }\n }\n\n this.isConnected = false;\n\n if (visited.size >= this.nodes.length) {\n var noOfVisitedInThisGraph = 0;\n\n visited.forEach(function (visitedNode) {\n if (visitedNode.owner == self) {\n noOfVisitedInThisGraph++;\n }\n });\n\n if (noOfVisitedInThisGraph == this.nodes.length) {\n this.isConnected = true;\n }\n }\n};\n\nmodule.exports = LGraph;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraph;\nvar LEdge = __webpack_require__(1);\n\nfunction LGraphManager(layout) {\n LGraph = __webpack_require__(6); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now.\n this.layout = layout;\n\n this.graphs = [];\n this.edges = [];\n}\n\nLGraphManager.prototype.addRoot = function () {\n var ngraph = this.layout.newGraph();\n var nnode = this.layout.newNode(null);\n var root = this.add(ngraph, nnode);\n this.setRootGraph(root);\n return this.rootGraph;\n};\n\nLGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) {\n //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge\n if (newEdge == null && sourceNode == null && targetNode == null) {\n if (newGraph == null) {\n throw \"Graph is null!\";\n }\n if (parentNode == null) {\n throw \"Parent node is null!\";\n }\n if (this.graphs.indexOf(newGraph) > -1) {\n throw \"Graph already in this graph mgr!\";\n }\n\n this.graphs.push(newGraph);\n\n if (newGraph.parent != null) {\n throw \"Already has a parent!\";\n }\n if (parentNode.child != null) {\n throw \"Already has a child!\";\n }\n\n newGraph.parent = parentNode;\n parentNode.child = newGraph;\n\n return newGraph;\n } else {\n //change the order of the parameters\n targetNode = newEdge;\n sourceNode = parentNode;\n newEdge = newGraph;\n var sourceGraph = sourceNode.getOwner();\n var targetGraph = targetNode.getOwner();\n\n if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) {\n throw \"Source not in this graph mgr!\";\n }\n if (!(targetGraph != null && targetGraph.getGraphManager() == this)) {\n throw \"Target not in this graph mgr!\";\n }\n\n if (sourceGraph == targetGraph) {\n newEdge.isInterGraph = false;\n return sourceGraph.add(newEdge, sourceNode, targetNode);\n } else {\n newEdge.isInterGraph = true;\n\n // set source and target\n newEdge.source = sourceNode;\n newEdge.target = targetNode;\n\n // add edge to inter-graph edge list\n if (this.edges.indexOf(newEdge) > -1) {\n throw \"Edge already in inter-graph edge list!\";\n }\n\n this.edges.push(newEdge);\n\n // add edge to source and target incidency lists\n if (!(newEdge.source != null && newEdge.target != null)) {\n throw \"Edge source and/or target is null!\";\n }\n\n if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) {\n throw \"Edge already in source and/or target incidency list!\";\n }\n\n newEdge.source.edges.push(newEdge);\n newEdge.target.edges.push(newEdge);\n\n return newEdge;\n }\n }\n};\n\nLGraphManager.prototype.remove = function (lObj) {\n if (lObj instanceof LGraph) {\n var graph = lObj;\n if (graph.getGraphManager() != this) {\n throw \"Graph not in this graph mgr\";\n }\n if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) {\n throw \"Invalid parent node!\";\n }\n\n // first the edges (make a copy to do it safely)\n var edgesToBeRemoved = [];\n\n edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges());\n\n var edge;\n var s = edgesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n edge = edgesToBeRemoved[i];\n graph.remove(edge);\n }\n\n // then the nodes (make a copy to do it safely)\n var nodesToBeRemoved = [];\n\n nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes());\n\n var node;\n s = nodesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n node = nodesToBeRemoved[i];\n graph.remove(node);\n }\n\n // check if graph is the root\n if (graph == this.rootGraph) {\n this.setRootGraph(null);\n }\n\n // now remove the graph itself\n var index = this.graphs.indexOf(graph);\n this.graphs.splice(index, 1);\n\n // also reset the parent of the graph\n graph.parent = null;\n } else if (lObj instanceof LEdge) {\n edge = lObj;\n if (edge == null) {\n throw \"Edge is null!\";\n }\n if (!edge.isInterGraph) {\n throw \"Not an inter-graph edge!\";\n }\n if (!(edge.source != null && edge.target != null)) {\n throw \"Source and/or target is null!\";\n }\n\n // remove edge from source and target nodes' incidency lists\n\n if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) {\n throw \"Source and/or target doesn't know this edge!\";\n }\n\n var index = edge.source.edges.indexOf(edge);\n edge.source.edges.splice(index, 1);\n index = edge.target.edges.indexOf(edge);\n edge.target.edges.splice(index, 1);\n\n // remove edge from owner graph manager's inter-graph edge list\n\n if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) {\n throw \"Edge owner graph or owner graph manager is null!\";\n }\n if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) {\n throw \"Not in owner graph manager's edge list!\";\n }\n\n var index = edge.source.owner.getGraphManager().edges.indexOf(edge);\n edge.source.owner.getGraphManager().edges.splice(index, 1);\n }\n};\n\nLGraphManager.prototype.updateBounds = function () {\n this.rootGraph.updateBounds(true);\n};\n\nLGraphManager.prototype.getGraphs = function () {\n return this.graphs;\n};\n\nLGraphManager.prototype.getAllNodes = function () {\n if (this.allNodes == null) {\n var nodeList = [];\n var graphs = this.getGraphs();\n var s = graphs.length;\n for (var i = 0; i < s; i++) {\n nodeList = nodeList.concat(graphs[i].getNodes());\n }\n this.allNodes = nodeList;\n }\n return this.allNodes;\n};\n\nLGraphManager.prototype.resetAllNodes = function () {\n this.allNodes = null;\n};\n\nLGraphManager.prototype.resetAllEdges = function () {\n this.allEdges = null;\n};\n\nLGraphManager.prototype.resetAllNodesToApplyGravitation = function () {\n this.allNodesToApplyGravitation = null;\n};\n\nLGraphManager.prototype.getAllEdges = function () {\n if (this.allEdges == null) {\n var edgeList = [];\n var graphs = this.getGraphs();\n var s = graphs.length;\n for (var i = 0; i < graphs.length; i++) {\n edgeList = edgeList.concat(graphs[i].getEdges());\n }\n\n edgeList = edgeList.concat(this.edges);\n\n this.allEdges = edgeList;\n }\n return this.allEdges;\n};\n\nLGraphManager.prototype.getAllNodesToApplyGravitation = function () {\n return this.allNodesToApplyGravitation;\n};\n\nLGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) {\n if (this.allNodesToApplyGravitation != null) {\n throw \"assert failed\";\n }\n\n this.allNodesToApplyGravitation = nodeList;\n};\n\nLGraphManager.prototype.getRoot = function () {\n return this.rootGraph;\n};\n\nLGraphManager.prototype.setRootGraph = function (graph) {\n if (graph.getGraphManager() != this) {\n throw \"Root not in this graph mgr!\";\n }\n\n this.rootGraph = graph;\n // root graph must have a root node associated with it for convenience\n if (graph.parent == null) {\n graph.parent = this.layout.newNode(\"Root node\");\n }\n};\n\nLGraphManager.prototype.getLayout = function () {\n return this.layout;\n};\n\nLGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) {\n if (!(firstNode != null && secondNode != null)) {\n throw \"assert failed\";\n }\n\n if (firstNode == secondNode) {\n return true;\n }\n // Is second node an ancestor of the first one?\n var ownerGraph = firstNode.getOwner();\n var parentNode;\n\n do {\n parentNode = ownerGraph.getParent();\n\n if (parentNode == null) {\n break;\n }\n\n if (parentNode == secondNode) {\n return true;\n }\n\n ownerGraph = parentNode.getOwner();\n if (ownerGraph == null) {\n break;\n }\n } while (true);\n // Is first node an ancestor of the second one?\n ownerGraph = secondNode.getOwner();\n\n do {\n parentNode = ownerGraph.getParent();\n\n if (parentNode == null) {\n break;\n }\n\n if (parentNode == firstNode) {\n return true;\n }\n\n ownerGraph = parentNode.getOwner();\n if (ownerGraph == null) {\n break;\n }\n } while (true);\n\n return false;\n};\n\nLGraphManager.prototype.calcLowestCommonAncestors = function () {\n var edge;\n var sourceNode;\n var targetNode;\n var sourceAncestorGraph;\n var targetAncestorGraph;\n\n var edges = this.getAllEdges();\n var s = edges.length;\n for (var i = 0; i < s; i++) {\n edge = edges[i];\n\n sourceNode = edge.source;\n targetNode = edge.target;\n edge.lca = null;\n edge.sourceInLca = sourceNode;\n edge.targetInLca = targetNode;\n\n if (sourceNode == targetNode) {\n edge.lca = sourceNode.getOwner();\n continue;\n }\n\n sourceAncestorGraph = sourceNode.getOwner();\n\n while (edge.lca == null) {\n edge.targetInLca = targetNode;\n targetAncestorGraph = targetNode.getOwner();\n\n while (edge.lca == null) {\n if (targetAncestorGraph == sourceAncestorGraph) {\n edge.lca = targetAncestorGraph;\n break;\n }\n\n if (targetAncestorGraph == this.rootGraph) {\n break;\n }\n\n if (edge.lca != null) {\n throw \"assert failed\";\n }\n edge.targetInLca = targetAncestorGraph.getParent();\n targetAncestorGraph = edge.targetInLca.getOwner();\n }\n\n if (sourceAncestorGraph == this.rootGraph) {\n break;\n }\n\n if (edge.lca == null) {\n edge.sourceInLca = sourceAncestorGraph.getParent();\n sourceAncestorGraph = edge.sourceInLca.getOwner();\n }\n }\n\n if (edge.lca == null) {\n throw \"assert failed\";\n }\n }\n};\n\nLGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) {\n if (firstNode == secondNode) {\n return firstNode.getOwner();\n }\n var firstOwnerGraph = firstNode.getOwner();\n\n do {\n if (firstOwnerGraph == null) {\n break;\n }\n var secondOwnerGraph = secondNode.getOwner();\n\n do {\n if (secondOwnerGraph == null) {\n break;\n }\n\n if (secondOwnerGraph == firstOwnerGraph) {\n return secondOwnerGraph;\n }\n secondOwnerGraph = secondOwnerGraph.getParent().getOwner();\n } while (true);\n\n firstOwnerGraph = firstOwnerGraph.getParent().getOwner();\n } while (true);\n\n return firstOwnerGraph;\n};\n\nLGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) {\n if (graph == null && depth == null) {\n graph = this.rootGraph;\n depth = 1;\n }\n var node;\n\n var nodes = graph.getNodes();\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n node = nodes[i];\n node.inclusionTreeDepth = depth;\n\n if (node.child != null) {\n this.calcInclusionTreeDepths(node.child, depth + 1);\n }\n }\n};\n\nLGraphManager.prototype.includesInvalidEdge = function () {\n var edge;\n var edgesToRemove = [];\n\n var s = this.edges.length;\n for (var i = 0; i < s; i++) {\n edge = this.edges[i];\n\n if (this.isOneAncestorOfOther(edge.source, edge.target)) {\n edgesToRemove.push(edge);\n }\n }\n\n // Remove invalid edges from graph manager\n for (var i = 0; i < edgesToRemove.length; i++) {\n this.remove(edgesToRemove[i]);\n }\n\n // Invalid edges are cleared, so return false\n return false;\n};\n\nmodule.exports = LGraphManager;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * This class maintains a list of static geometry related utility methods.\n *\n *\n * Copyright: i-Vis Research Group, Bilkent University, 2007 - present\n */\n\nvar Point = __webpack_require__(12);\n\nfunction IGeometry() {}\n\n/**\n * This method calculates *half* the amount in x and y directions of the two\n * input rectangles needed to separate them keeping their respective\n * positioning, and returns the result in the input array. An input\n * separation buffer added to the amount in both directions. We assume that\n * the two rectangles do intersect.\n */\nIGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) {\n if (!rectA.intersects(rectB)) {\n throw \"assert failed\";\n }\n\n var directions = new Array(2);\n\n this.decideDirectionsForOverlappingNodes(rectA, rectB, directions);\n\n overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x);\n overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y);\n\n // update the overlapping amounts for the following cases:\n if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) {\n /* Case x.1:\n *\n * rectA\n * \t| |\n * \t| _________ |\n * \t| | | |\n * \t|________|_______|______|\n * \t\t\t | |\n * | |\n * rectB\n */\n overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight());\n } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) {\n /* Case x.2:\n *\n * rectB\n * \t| |\n * \t| _________ |\n * \t| | | |\n * \t|________|_______|______|\n * \t\t\t | |\n * | |\n * rectA\n */\n overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight());\n }\n if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) {\n /* Case y.1:\n * ________ rectA\n * |\n * |\n * ______|____ rectB\n * | |\n * | |\n * ______|____|\n * |\n * |\n * |________\n *\n */\n overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom());\n } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) {\n /* Case y.2:\n * ________ rectB\n * |\n * |\n * ______|____ rectA\n * | |\n * | |\n * ______|____|\n * |\n * |\n * |________\n *\n */\n overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom());\n }\n\n // find slope of the line passes two centers\n var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX()));\n // if centers are overlapped\n if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) {\n // assume the slope is 1 (45 degree)\n slope = 1.0;\n }\n\n var moveByY = slope * overlapAmount[0];\n var moveByX = overlapAmount[1] / slope;\n if (overlapAmount[0] < moveByX) {\n moveByX = overlapAmount[0];\n } else {\n moveByY = overlapAmount[1];\n }\n // return half the amount so that if each rectangle is moved by these\n // amounts in opposite directions, overlap will be resolved\n overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer);\n overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer);\n};\n\n/**\n * This method decides the separation direction of overlapping nodes\n *\n * if directions[0] = -1, then rectA goes left\n * if directions[0] = 1, then rectA goes right\n * if directions[1] = -1, then rectA goes up\n * if directions[1] = 1, then rectA goes down\n */\nIGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) {\n if (rectA.getCenterX() < rectB.getCenterX()) {\n directions[0] = -1;\n } else {\n directions[0] = 1;\n }\n\n if (rectA.getCenterY() < rectB.getCenterY()) {\n directions[1] = -1;\n } else {\n directions[1] = 1;\n }\n};\n\n/**\n * This method calculates the intersection (clipping) points of the two\n * input rectangles with line segment defined by the centers of these two\n * rectangles. The clipping points are saved in the input double array and\n * whether or not the two rectangles overlap is returned.\n */\nIGeometry.getIntersection2 = function (rectA, rectB, result) {\n //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB\n var p1x = rectA.getCenterX();\n var p1y = rectA.getCenterY();\n var p2x = rectB.getCenterX();\n var p2y = rectB.getCenterY();\n\n //if two rectangles intersect, then clipping points are centers\n if (rectA.intersects(rectB)) {\n result[0] = p1x;\n result[1] = p1y;\n result[2] = p2x;\n result[3] = p2y;\n return true;\n }\n //variables for rectA\n var topLeftAx = rectA.getX();\n var topLeftAy = rectA.getY();\n var topRightAx = rectA.getRight();\n var bottomLeftAx = rectA.getX();\n var bottomLeftAy = rectA.getBottom();\n var bottomRightAx = rectA.getRight();\n var halfWidthA = rectA.getWidthHalf();\n var halfHeightA = rectA.getHeightHalf();\n //variables for rectB\n var topLeftBx = rectB.getX();\n var topLeftBy = rectB.getY();\n var topRightBx = rectB.getRight();\n var bottomLeftBx = rectB.getX();\n var bottomLeftBy = rectB.getBottom();\n var bottomRightBx = rectB.getRight();\n var halfWidthB = rectB.getWidthHalf();\n var halfHeightB = rectB.getHeightHalf();\n\n //flag whether clipping points are found\n var clipPointAFound = false;\n var clipPointBFound = false;\n\n // line is vertical\n if (p1x === p2x) {\n if (p1y > p2y) {\n result[0] = p1x;\n result[1] = topLeftAy;\n result[2] = p2x;\n result[3] = bottomLeftBy;\n return false;\n } else if (p1y < p2y) {\n result[0] = p1x;\n result[1] = bottomLeftAy;\n result[2] = p2x;\n result[3] = topLeftBy;\n return false;\n } else {\n //not line, return null;\n }\n }\n // line is horizontal\n else if (p1y === p2y) {\n if (p1x > p2x) {\n result[0] = topLeftAx;\n result[1] = p1y;\n result[2] = topRightBx;\n result[3] = p2y;\n return false;\n } else if (p1x < p2x) {\n result[0] = topRightAx;\n result[1] = p1y;\n result[2] = topLeftBx;\n result[3] = p2y;\n return false;\n } else {\n //not valid line, return null;\n }\n } else {\n //slopes of rectA's and rectB's diagonals\n var slopeA = rectA.height / rectA.width;\n var slopeB = rectB.height / rectB.width;\n\n //slope of line between center of rectA and center of rectB\n var slopePrime = (p2y - p1y) / (p2x - p1x);\n var cardinalDirectionA = void 0;\n var cardinalDirectionB = void 0;\n var tempPointAx = void 0;\n var tempPointAy = void 0;\n var tempPointBx = void 0;\n var tempPointBy = void 0;\n\n //determine whether clipping point is the corner of nodeA\n if (-slopeA === slopePrime) {\n if (p1x > p2x) {\n result[0] = bottomLeftAx;\n result[1] = bottomLeftAy;\n clipPointAFound = true;\n } else {\n result[0] = topRightAx;\n result[1] = topLeftAy;\n clipPointAFound = true;\n }\n } else if (slopeA === slopePrime) {\n if (p1x > p2x) {\n result[0] = topLeftAx;\n result[1] = topLeftAy;\n clipPointAFound = true;\n } else {\n result[0] = bottomRightAx;\n result[1] = bottomLeftAy;\n clipPointAFound = true;\n }\n }\n\n //determine whether clipping point is the corner of nodeB\n if (-slopeB === slopePrime) {\n if (p2x > p1x) {\n result[2] = bottomLeftBx;\n result[3] = bottomLeftBy;\n clipPointBFound = true;\n } else {\n result[2] = topRightBx;\n result[3] = topLeftBy;\n clipPointBFound = true;\n }\n } else if (slopeB === slopePrime) {\n if (p2x > p1x) {\n result[2] = topLeftBx;\n result[3] = topLeftBy;\n clipPointBFound = true;\n } else {\n result[2] = bottomRightBx;\n result[3] = bottomLeftBy;\n clipPointBFound = true;\n }\n }\n\n //if both clipping points are corners\n if (clipPointAFound && clipPointBFound) {\n return false;\n }\n\n //determine Cardinal Direction of rectangles\n if (p1x > p2x) {\n if (p1y > p2y) {\n cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4);\n cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2);\n } else {\n cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3);\n cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1);\n }\n } else {\n if (p1y > p2y) {\n cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1);\n cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3);\n } else {\n cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2);\n cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4);\n }\n }\n //calculate clipping Point if it is not found before\n if (!clipPointAFound) {\n switch (cardinalDirectionA) {\n case 1:\n tempPointAy = topLeftAy;\n tempPointAx = p1x + -halfHeightA / slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 2:\n tempPointAx = bottomRightAx;\n tempPointAy = p1y + halfWidthA * slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 3:\n tempPointAy = bottomLeftAy;\n tempPointAx = p1x + halfHeightA / slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 4:\n tempPointAx = bottomLeftAx;\n tempPointAy = p1y + -halfWidthA * slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n }\n }\n if (!clipPointBFound) {\n switch (cardinalDirectionB) {\n case 1:\n tempPointBy = topLeftBy;\n tempPointBx = p2x + -halfHeightB / slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 2:\n tempPointBx = bottomRightBx;\n tempPointBy = p2y + halfWidthB * slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 3:\n tempPointBy = bottomLeftBy;\n tempPointBx = p2x + halfHeightB / slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 4:\n tempPointBx = bottomLeftBx;\n tempPointBy = p2y + -halfWidthB * slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n }\n }\n }\n return false;\n};\n\n/**\n * This method returns in which cardinal direction does input point stays\n * 1: North\n * 2: East\n * 3: South\n * 4: West\n */\nIGeometry.getCardinalDirection = function (slope, slopePrime, line) {\n if (slope > slopePrime) {\n return line;\n } else {\n return 1 + line % 4;\n }\n};\n\n/**\n * This method calculates the intersection of the two lines defined by\n * point pairs (s1,s2) and (f1,f2).\n */\nIGeometry.getIntersection = function (s1, s2, f1, f2) {\n if (f2 == null) {\n return this.getIntersection2(s1, s2, f1);\n }\n\n var x1 = s1.x;\n var y1 = s1.y;\n var x2 = s2.x;\n var y2 = s2.y;\n var x3 = f1.x;\n var y3 = f1.y;\n var x4 = f2.x;\n var y4 = f2.y;\n var x = void 0,\n y = void 0; // intersection point\n var a1 = void 0,\n a2 = void 0,\n b1 = void 0,\n b2 = void 0,\n c1 = void 0,\n c2 = void 0; // coefficients of line eqns.\n var denom = void 0;\n\n a1 = y2 - y1;\n b1 = x1 - x2;\n c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 }\n\n a2 = y4 - y3;\n b2 = x3 - x4;\n c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 }\n\n denom = a1 * b2 - a2 * b1;\n\n if (denom === 0) {\n return null;\n }\n\n x = (b1 * c2 - b2 * c1) / denom;\n y = (a2 * c1 - a1 * c2) / denom;\n\n return new Point(x, y);\n};\n\n/**\n * This method finds and returns the angle of the vector from the + x-axis\n * in clockwise direction (compatible w/ Java coordinate system!).\n */\nIGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) {\n var C_angle = void 0;\n\n if (Cx !== Nx) {\n C_angle = Math.atan((Ny - Cy) / (Nx - Cx));\n\n if (Nx < Cx) {\n C_angle += Math.PI;\n } else if (Ny < Cy) {\n C_angle += this.TWO_PI;\n }\n } else if (Ny < Cy) {\n C_angle = this.ONE_AND_HALF_PI; // 270 degrees\n } else {\n C_angle = this.HALF_PI; // 90 degrees\n }\n\n return C_angle;\n};\n\n/**\n * This method checks whether the given two line segments (one with point\n * p1 and p2, the other with point p3 and p4) intersect at a point other\n * than these points.\n */\nIGeometry.doIntersect = function (p1, p2, p3, p4) {\n var a = p1.x;\n var b = p1.y;\n var c = p2.x;\n var d = p2.y;\n var p = p3.x;\n var q = p3.y;\n var r = p4.x;\n var s = p4.y;\n var det = (c - a) * (s - q) - (r - p) * (d - b);\n\n if (det === 0) {\n return false;\n } else {\n var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det;\n var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det;\n return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1;\n }\n};\n\n/**\n * This method checks and calculates the intersection of \n * a line segment and a circle.\n */\nIGeometry.findCircleLineIntersections = function (Ex, Ey, Lx, Ly, Cx, Cy, r) {\n\n // E is the starting point of the ray,\n // L is the end point of the ray,\n // C is the center of sphere you're testing against\n // r is the radius of that sphere\n\n // Compute:\n // d = L - E ( Direction vector of ray, from start to end )\n // f = E - C ( Vector from center sphere to ray start )\n\n // Then the intersection is found by..\n // P = E + t * d\n // This is a parametric equation:\n // Px = Ex + tdx\n // Py = Ey + tdy\n\n // get a, b, c values\n var a = (Lx - Ex) * (Lx - Ex) + (Ly - Ey) * (Ly - Ey);\n var b = 2 * ((Ex - Cx) * (Lx - Ex) + (Ey - Cy) * (Ly - Ey));\n var c = (Ex - Cx) * (Ex - Cx) + (Ey - Cy) * (Ey - Cy) - r * r;\n\n // get discriminant\n var disc = b * b - 4 * a * c;\n if (disc >= 0) {\n // insert into quadratic formula\n var t1 = (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a);\n var t2 = (-b - Math.sqrt(b * b - 4 * a * c)) / (2 * a);\n var intersections = null;\n if (t1 >= 0 && t1 <= 1) {\n // t1 is the intersection, and it's closer than t2\n // (since t1 uses -b - discriminant)\n // Impale, Poke\n return [t1];\n }\n\n // here t1 didn't intersect so we are either started\n // inside the sphere or completely past it\n if (t2 >= 0 && t2 <= 1) {\n // ExitWound\n return [t2];\n }\n\n return intersections;\n } else return null;\n};\n\n// -----------------------------------------------------------------------------\n// Section: Class Constants\n// -----------------------------------------------------------------------------\n/**\n * Some useful pre-calculated constants\n */\nIGeometry.HALF_PI = 0.5 * Math.PI;\nIGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI;\nIGeometry.TWO_PI = 2.0 * Math.PI;\nIGeometry.THREE_PI = 3.0 * Math.PI;\n\nmodule.exports = IGeometry;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction IMath() {}\n\n/**\n * This method returns the sign of the input value.\n */\nIMath.sign = function (value) {\n if (value > 0) {\n return 1;\n } else if (value < 0) {\n return -1;\n } else {\n return 0;\n }\n};\n\nIMath.floor = function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n};\n\nIMath.ceil = function (value) {\n return value < 0 ? Math.floor(value) : Math.ceil(value);\n};\n\nmodule.exports = IMath;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction Integer() {}\n\nInteger.MAX_VALUE = 2147483647;\nInteger.MIN_VALUE = -2147483648;\n\nmodule.exports = Integer;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar nodeFrom = function nodeFrom(value) {\n return { value: value, next: null, prev: null };\n};\n\nvar add = function add(prev, node, next, list) {\n if (prev !== null) {\n prev.next = node;\n } else {\n list.head = node;\n }\n\n if (next !== null) {\n next.prev = node;\n } else {\n list.tail = node;\n }\n\n node.prev = prev;\n node.next = next;\n\n list.length++;\n\n return node;\n};\n\nvar _remove = function _remove(node, list) {\n var prev = node.prev,\n next = node.next;\n\n\n if (prev !== null) {\n prev.next = next;\n } else {\n list.head = next;\n }\n\n if (next !== null) {\n next.prev = prev;\n } else {\n list.tail = prev;\n }\n\n node.prev = node.next = null;\n\n list.length--;\n\n return node;\n};\n\nvar LinkedList = function () {\n function LinkedList(vals) {\n var _this = this;\n\n _classCallCheck(this, LinkedList);\n\n this.length = 0;\n this.head = null;\n this.tail = null;\n\n if (vals != null) {\n vals.forEach(function (v) {\n return _this.push(v);\n });\n }\n }\n\n _createClass(LinkedList, [{\n key: \"size\",\n value: function size() {\n return this.length;\n }\n }, {\n key: \"insertBefore\",\n value: function insertBefore(val, otherNode) {\n return add(otherNode.prev, nodeFrom(val), otherNode, this);\n }\n }, {\n key: \"insertAfter\",\n value: function insertAfter(val, otherNode) {\n return add(otherNode, nodeFrom(val), otherNode.next, this);\n }\n }, {\n key: \"insertNodeBefore\",\n value: function insertNodeBefore(newNode, otherNode) {\n return add(otherNode.prev, newNode, otherNode, this);\n }\n }, {\n key: \"insertNodeAfter\",\n value: function insertNodeAfter(newNode, otherNode) {\n return add(otherNode, newNode, otherNode.next, this);\n }\n }, {\n key: \"push\",\n value: function push(val) {\n return add(this.tail, nodeFrom(val), null, this);\n }\n }, {\n key: \"unshift\",\n value: function unshift(val) {\n return add(null, nodeFrom(val), this.head, this);\n }\n }, {\n key: \"remove\",\n value: function remove(node) {\n return _remove(node, this);\n }\n }, {\n key: \"pop\",\n value: function pop() {\n return _remove(this.tail, this).value;\n }\n }, {\n key: \"popNode\",\n value: function popNode() {\n return _remove(this.tail, this);\n }\n }, {\n key: \"shift\",\n value: function shift() {\n return _remove(this.head, this).value;\n }\n }, {\n key: \"shiftNode\",\n value: function shiftNode() {\n return _remove(this.head, this);\n }\n }, {\n key: \"get_object_at\",\n value: function get_object_at(index) {\n if (index <= this.length()) {\n var i = 1;\n var current = this.head;\n while (i < index) {\n current = current.next;\n i++;\n }\n return current.value;\n }\n }\n }, {\n key: \"set_object_at\",\n value: function set_object_at(index, value) {\n if (index <= this.length()) {\n var i = 1;\n var current = this.head;\n while (i < index) {\n current = current.next;\n i++;\n }\n current.value = value;\n }\n }\n }]);\n\n return LinkedList;\n}();\n\nmodule.exports = LinkedList;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*\r\n *This class is the javascript implementation of the Point.java class in jdk\r\n */\nfunction Point(x, y, p) {\n this.x = null;\n this.y = null;\n if (x == null && y == null && p == null) {\n this.x = 0;\n this.y = 0;\n } else if (typeof x == 'number' && typeof y == 'number' && p == null) {\n this.x = x;\n this.y = y;\n } else if (x.constructor.name == 'Point' && y == null && p == null) {\n p = x;\n this.x = p.x;\n this.y = p.y;\n }\n}\n\nPoint.prototype.getX = function () {\n return this.x;\n};\n\nPoint.prototype.getY = function () {\n return this.y;\n};\n\nPoint.prototype.getLocation = function () {\n return new Point(this.x, this.y);\n};\n\nPoint.prototype.setLocation = function (x, y, p) {\n if (x.constructor.name == 'Point' && y == null && p == null) {\n p = x;\n this.setLocation(p.x, p.y);\n } else if (typeof x == 'number' && typeof y == 'number' && p == null) {\n //if both parameters are integer just move (x,y) location\n if (parseInt(x) == x && parseInt(y) == y) {\n this.move(x, y);\n } else {\n this.x = Math.floor(x + 0.5);\n this.y = Math.floor(y + 0.5);\n }\n }\n};\n\nPoint.prototype.move = function (x, y) {\n this.x = x;\n this.y = y;\n};\n\nPoint.prototype.translate = function (dx, dy) {\n this.x += dx;\n this.y += dy;\n};\n\nPoint.prototype.equals = function (obj) {\n if (obj.constructor.name == \"Point\") {\n var pt = obj;\n return this.x == pt.x && this.y == pt.y;\n }\n return this == obj;\n};\n\nPoint.prototype.toString = function () {\n return new Point().constructor.name + \"[x=\" + this.x + \",y=\" + this.y + \"]\";\n};\n\nmodule.exports = Point;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction RectangleD(x, y, width, height) {\n this.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n\n if (x != null && y != null && width != null && height != null) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n}\n\nRectangleD.prototype.getX = function () {\n return this.x;\n};\n\nRectangleD.prototype.setX = function (x) {\n this.x = x;\n};\n\nRectangleD.prototype.getY = function () {\n return this.y;\n};\n\nRectangleD.prototype.setY = function (y) {\n this.y = y;\n};\n\nRectangleD.prototype.getWidth = function () {\n return this.width;\n};\n\nRectangleD.prototype.setWidth = function (width) {\n this.width = width;\n};\n\nRectangleD.prototype.getHeight = function () {\n return this.height;\n};\n\nRectangleD.prototype.setHeight = function (height) {\n this.height = height;\n};\n\nRectangleD.prototype.getRight = function () {\n return this.x + this.width;\n};\n\nRectangleD.prototype.getBottom = function () {\n return this.y + this.height;\n};\n\nRectangleD.prototype.intersects = function (a) {\n if (this.getRight() < a.x) {\n return false;\n }\n\n if (this.getBottom() < a.y) {\n return false;\n }\n\n if (a.getRight() < this.x) {\n return false;\n }\n\n if (a.getBottom() < this.y) {\n return false;\n }\n\n return true;\n};\n\nRectangleD.prototype.getCenterX = function () {\n return this.x + this.width / 2;\n};\n\nRectangleD.prototype.getMinX = function () {\n return this.getX();\n};\n\nRectangleD.prototype.getMaxX = function () {\n return this.getX() + this.width;\n};\n\nRectangleD.prototype.getCenterY = function () {\n return this.y + this.height / 2;\n};\n\nRectangleD.prototype.getMinY = function () {\n return this.getY();\n};\n\nRectangleD.prototype.getMaxY = function () {\n return this.getY() + this.height;\n};\n\nRectangleD.prototype.getWidthHalf = function () {\n return this.width / 2;\n};\n\nRectangleD.prototype.getHeightHalf = function () {\n return this.height / 2;\n};\n\nmodule.exports = RectangleD;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction UniqueIDGeneretor() {}\n\nUniqueIDGeneretor.lastID = 0;\n\nUniqueIDGeneretor.createID = function (obj) {\n if (UniqueIDGeneretor.isPrimitive(obj)) {\n return obj;\n }\n if (obj.uniqueID != null) {\n return obj.uniqueID;\n }\n obj.uniqueID = UniqueIDGeneretor.getString();\n UniqueIDGeneretor.lastID++;\n return obj.uniqueID;\n};\n\nUniqueIDGeneretor.getString = function (id) {\n if (id == null) id = UniqueIDGeneretor.lastID;\n return \"Object#\" + id + \"\";\n};\n\nUniqueIDGeneretor.isPrimitive = function (arg) {\n var type = typeof arg === \"undefined\" ? \"undefined\" : _typeof(arg);\n return arg == null || type != \"object\" && type != \"function\";\n};\n\nmodule.exports = UniqueIDGeneretor;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar LayoutConstants = __webpack_require__(0);\nvar LGraphManager = __webpack_require__(7);\nvar LNode = __webpack_require__(3);\nvar LEdge = __webpack_require__(1);\nvar LGraph = __webpack_require__(6);\nvar PointD = __webpack_require__(5);\nvar Transform = __webpack_require__(17);\nvar Emitter = __webpack_require__(29);\n\nfunction Layout(isRemoteUse) {\n Emitter.call(this);\n\n //Layout Quality: 0:draft, 1:default, 2:proof\n this.layoutQuality = LayoutConstants.QUALITY;\n //Whether layout should create bendpoints as needed or not\n this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n //Whether layout should be incremental or not\n this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;\n //Whether we animate from before to after layout node positions\n this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;\n //Whether we animate the layout process or not\n this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;\n //Number iterations that should be done between two successive animations\n this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;\n /**\r\n * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When\r\n * they are, both spring and repulsion forces between two leaf nodes can be\r\n * calculated without the expensive clipping point calculations, resulting\r\n * in major speed-up.\r\n */\n this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;\n /**\r\n * This is used for creation of bendpoints by using dummy nodes and edges.\r\n * Maps an LEdge to its dummy bendpoint path.\r\n */\n this.edgeToDummyNodes = new Map();\n this.graphManager = new LGraphManager(this);\n this.isLayoutFinished = false;\n this.isSubLayout = false;\n this.isRemoteUse = false;\n\n if (isRemoteUse != null) {\n this.isRemoteUse = isRemoteUse;\n }\n}\n\nLayout.RANDOM_SEED = 1;\n\nLayout.prototype = Object.create(Emitter.prototype);\n\nLayout.prototype.getGraphManager = function () {\n return this.graphManager;\n};\n\nLayout.prototype.getAllNodes = function () {\n return this.graphManager.getAllNodes();\n};\n\nLayout.prototype.getAllEdges = function () {\n return this.graphManager.getAllEdges();\n};\n\nLayout.prototype.getAllNodesToApplyGravitation = function () {\n return this.graphManager.getAllNodesToApplyGravitation();\n};\n\nLayout.prototype.newGraphManager = function () {\n var gm = new LGraphManager(this);\n this.graphManager = gm;\n return gm;\n};\n\nLayout.prototype.newGraph = function (vGraph) {\n return new LGraph(null, this.graphManager, vGraph);\n};\n\nLayout.prototype.newNode = function (vNode) {\n return new LNode(this.graphManager, vNode);\n};\n\nLayout.prototype.newEdge = function (vEdge) {\n return new LEdge(null, null, vEdge);\n};\n\nLayout.prototype.checkLayoutSuccess = function () {\n return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();\n};\n\nLayout.prototype.runLayout = function () {\n this.isLayoutFinished = false;\n\n if (this.tilingPreLayout) {\n this.tilingPreLayout();\n }\n\n this.initParameters();\n var isLayoutSuccessfull;\n\n if (this.checkLayoutSuccess()) {\n isLayoutSuccessfull = false;\n } else {\n isLayoutSuccessfull = this.layout();\n }\n\n if (LayoutConstants.ANIMATE === 'during') {\n // If this is a 'during' layout animation. Layout is not finished yet. \n // We need to perform these in index.js when layout is really finished.\n return false;\n }\n\n if (isLayoutSuccessfull) {\n if (!this.isSubLayout) {\n this.doPostLayout();\n }\n }\n\n if (this.tilingPostLayout) {\n this.tilingPostLayout();\n }\n\n this.isLayoutFinished = true;\n\n return isLayoutSuccessfull;\n};\n\n/**\r\n * This method performs the operations required after layout.\r\n */\nLayout.prototype.doPostLayout = function () {\n //assert !isSubLayout : \"Should not be called on sub-layout!\";\n // Propagate geometric changes to v-level objects\n if (!this.incremental) {\n this.transform();\n }\n this.update();\n};\n\n/**\r\n * This method updates the geometry of the target graph according to\r\n * calculated layout.\r\n */\nLayout.prototype.update2 = function () {\n // update bend points\n if (this.createBendsAsNeeded) {\n this.createBendpointsFromDummyNodes();\n\n // reset all edges, since the topology has changed\n this.graphManager.resetAllEdges();\n }\n\n // perform edge, node and root updates if layout is not called\n // remotely\n if (!this.isRemoteUse) {\n // update all edges\n var edge;\n var allEdges = this.graphManager.getAllEdges();\n for (var i = 0; i < allEdges.length; i++) {\n edge = allEdges[i];\n // this.update(edge);\n }\n\n // recursively update nodes\n var node;\n var nodes = this.graphManager.getRoot().getNodes();\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n // this.update(node);\n }\n\n // update root graph\n this.update(this.graphManager.getRoot());\n }\n};\n\nLayout.prototype.update = function (obj) {\n if (obj == null) {\n this.update2();\n } else if (obj instanceof LNode) {\n var node = obj;\n if (node.getChild() != null) {\n // since node is compound, recursively update child nodes\n var nodes = node.getChild().getNodes();\n for (var i = 0; i < nodes.length; i++) {\n update(nodes[i]);\n }\n }\n\n // if the l-level node is associated with a v-level graph object,\n // then it is assumed that the v-level node implements the\n // interface Updatable.\n if (node.vGraphObject != null) {\n // cast to Updatable without any type check\n var vNode = node.vGraphObject;\n\n // call the update method of the interface\n vNode.update(node);\n }\n } else if (obj instanceof LEdge) {\n var edge = obj;\n // if the l-level edge is associated with a v-level graph object,\n // then it is assumed that the v-level edge implements the\n // interface Updatable.\n\n if (edge.vGraphObject != null) {\n // cast to Updatable without any type check\n var vEdge = edge.vGraphObject;\n\n // call the update method of the interface\n vEdge.update(edge);\n }\n } else if (obj instanceof LGraph) {\n var graph = obj;\n // if the l-level graph is associated with a v-level graph object,\n // then it is assumed that the v-level object implements the\n // interface Updatable.\n\n if (graph.vGraphObject != null) {\n // cast to Updatable without any type check\n var vGraph = graph.vGraphObject;\n\n // call the update method of the interface\n vGraph.update(graph);\n }\n }\n};\n\n/**\r\n * This method is used to set all layout parameters to default values\r\n * determined at compile time.\r\n */\nLayout.prototype.initParameters = function () {\n if (!this.isSubLayout) {\n this.layoutQuality = LayoutConstants.QUALITY;\n this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;\n this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;\n this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;\n this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;\n this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;\n }\n\n if (this.animationDuringLayout) {\n this.animationOnLayout = false;\n }\n};\n\nLayout.prototype.transform = function (newLeftTop) {\n if (newLeftTop == undefined) {\n this.transform(new PointD(0, 0));\n } else {\n // create a transformation object (from Eclipse to layout). When an\n // inverse transform is applied, we get upper-left coordinate of the\n // drawing or the root graph at given input coordinate (some margins\n // already included in calculation of left-top).\n\n var trans = new Transform();\n var leftTop = this.graphManager.getRoot().updateLeftTop();\n\n if (leftTop != null) {\n trans.setWorldOrgX(newLeftTop.x);\n trans.setWorldOrgY(newLeftTop.y);\n\n trans.setDeviceOrgX(leftTop.x);\n trans.setDeviceOrgY(leftTop.y);\n\n var nodes = this.getAllNodes();\n var node;\n\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n node.transform(trans);\n }\n }\n }\n};\n\nLayout.prototype.positionNodesRandomly = function (graph) {\n\n if (graph == undefined) {\n //assert !this.incremental;\n this.positionNodesRandomly(this.getGraphManager().getRoot());\n this.getGraphManager().getRoot().updateBounds(true);\n } else {\n var lNode;\n var childGraph;\n\n var nodes = graph.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n lNode = nodes[i];\n childGraph = lNode.getChild();\n\n if (childGraph == null) {\n lNode.scatter();\n } else if (childGraph.getNodes().length == 0) {\n lNode.scatter();\n } else {\n this.positionNodesRandomly(childGraph);\n lNode.updateBounds();\n }\n }\n }\n};\n\n/**\r\n * This method returns a list of trees where each tree is represented as a\r\n * list of l-nodes. The method returns a list of size 0 when:\r\n * - The graph is not flat or\r\n * - One of the component(s) of the graph is not a tree.\r\n */\nLayout.prototype.getFlatForest = function () {\n var flatForest = [];\n var isForest = true;\n\n // Quick reference for all nodes in the graph manager associated with\n // this layout. The list should not be changed.\n var allNodes = this.graphManager.getRoot().getNodes();\n\n // First be sure that the graph is flat\n var isFlat = true;\n\n for (var i = 0; i < allNodes.length; i++) {\n if (allNodes[i].getChild() != null) {\n isFlat = false;\n }\n }\n\n // Return empty forest if the graph is not flat.\n if (!isFlat) {\n return flatForest;\n }\n\n // Run BFS for each component of the graph.\n\n var visited = new Set();\n var toBeVisited = [];\n var parents = new Map();\n var unProcessedNodes = [];\n\n unProcessedNodes = unProcessedNodes.concat(allNodes);\n\n // Each iteration of this loop finds a component of the graph and\n // decides whether it is a tree or not. If it is a tree, adds it to the\n // forest and continued with the next component.\n\n while (unProcessedNodes.length > 0 && isForest) {\n toBeVisited.push(unProcessedNodes[0]);\n\n // Start the BFS. Each iteration of this loop visits a node in a\n // BFS manner.\n while (toBeVisited.length > 0 && isForest) {\n //pool operation\n var currentNode = toBeVisited[0];\n toBeVisited.splice(0, 1);\n visited.add(currentNode);\n\n // Traverse all neighbors of this node\n var neighborEdges = currentNode.getEdges();\n\n for (var i = 0; i < neighborEdges.length; i++) {\n var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode);\n\n // If BFS is not growing from this neighbor.\n if (parents.get(currentNode) != currentNeighbor) {\n // We haven't previously visited this neighbor.\n if (!visited.has(currentNeighbor)) {\n toBeVisited.push(currentNeighbor);\n parents.set(currentNeighbor, currentNode);\n }\n // Since we have previously visited this neighbor and\n // this neighbor is not parent of currentNode, given\n // graph contains a component that is not tree, hence\n // it is not a forest.\n else {\n isForest = false;\n break;\n }\n }\n }\n }\n\n // The graph contains a component that is not a tree. Empty\n // previously found trees. The method will end.\n if (!isForest) {\n flatForest = [];\n }\n // Save currently visited nodes as a tree in our forest. Reset\n // visited and parents lists. Continue with the next component of\n // the graph, if any.\n else {\n var temp = [].concat(_toConsumableArray(visited));\n flatForest.push(temp);\n //flatForest = flatForest.concat(temp);\n //unProcessedNodes.removeAll(visited);\n for (var i = 0; i < temp.length; i++) {\n var value = temp[i];\n var index = unProcessedNodes.indexOf(value);\n if (index > -1) {\n unProcessedNodes.splice(index, 1);\n }\n }\n visited = new Set();\n parents = new Map();\n }\n }\n\n return flatForest;\n};\n\n/**\r\n * This method creates dummy nodes (an l-level node with minimal dimensions)\r\n * for the given edge (one per bendpoint). The existing l-level structure\r\n * is updated accordingly.\r\n */\nLayout.prototype.createDummyNodesForBendpoints = function (edge) {\n var dummyNodes = [];\n var prev = edge.source;\n\n var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target);\n\n for (var i = 0; i < edge.bendpoints.length; i++) {\n // create new dummy node\n var dummyNode = this.newNode(null);\n dummyNode.setRect(new Point(0, 0), new Dimension(1, 1));\n\n graph.add(dummyNode);\n\n // create new dummy edge between prev and dummy node\n var dummyEdge = this.newEdge(null);\n this.graphManager.add(dummyEdge, prev, dummyNode);\n\n dummyNodes.add(dummyNode);\n prev = dummyNode;\n }\n\n var dummyEdge = this.newEdge(null);\n this.graphManager.add(dummyEdge, prev, edge.target);\n\n this.edgeToDummyNodes.set(edge, dummyNodes);\n\n // remove real edge from graph manager if it is inter-graph\n if (edge.isInterGraph()) {\n this.graphManager.remove(edge);\n }\n // else, remove the edge from the current graph\n else {\n graph.remove(edge);\n }\n\n return dummyNodes;\n};\n\n/**\r\n * This method creates bendpoints for edges from the dummy nodes\r\n * at l-level.\r\n */\nLayout.prototype.createBendpointsFromDummyNodes = function () {\n var edges = [];\n edges = edges.concat(this.graphManager.getAllEdges());\n edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges);\n\n for (var k = 0; k < edges.length; k++) {\n var lEdge = edges[k];\n\n if (lEdge.bendpoints.length > 0) {\n var path = this.edgeToDummyNodes.get(lEdge);\n\n for (var i = 0; i < path.length; i++) {\n var dummyNode = path[i];\n var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY());\n\n // update bendpoint's location according to dummy node\n var ebp = lEdge.bendpoints.get(i);\n ebp.x = p.x;\n ebp.y = p.y;\n\n // remove the dummy node, dummy edges incident with this\n // dummy node is also removed (within the remove method)\n dummyNode.getOwner().remove(dummyNode);\n }\n\n // add the real edge to graph\n this.graphManager.add(lEdge, lEdge.source, lEdge.target);\n }\n }\n};\n\nLayout.transform = function (sliderValue, defaultValue, minDiv, maxMul) {\n if (minDiv != undefined && maxMul != undefined) {\n var value = defaultValue;\n\n if (sliderValue <= 50) {\n var minValue = defaultValue / minDiv;\n value -= (defaultValue - minValue) / 50 * (50 - sliderValue);\n } else {\n var maxValue = defaultValue * maxMul;\n value += (maxValue - defaultValue) / 50 * (sliderValue - 50);\n }\n\n return value;\n } else {\n var a, b;\n\n if (sliderValue <= 50) {\n a = 9.0 * defaultValue / 500.0;\n b = defaultValue / 10.0;\n } else {\n a = 9.0 * defaultValue / 50.0;\n b = -8 * defaultValue;\n }\n\n return a * sliderValue + b;\n }\n};\n\n/**\r\n * This method finds and returns the center of the given nodes, assuming\r\n * that the given nodes form a tree in themselves.\r\n */\nLayout.findCenterOfTree = function (nodes) {\n var list = [];\n list = list.concat(nodes);\n\n var removedNodes = [];\n var remainingDegrees = new Map();\n var foundCenter = false;\n var centerNode = null;\n\n if (list.length == 1 || list.length == 2) {\n foundCenter = true;\n centerNode = list[0];\n }\n\n for (var i = 0; i < list.length; i++) {\n var node = list[i];\n var degree = node.getNeighborsList().size;\n remainingDegrees.set(node, node.getNeighborsList().size);\n\n if (degree == 1) {\n removedNodes.push(node);\n }\n }\n\n var tempList = [];\n tempList = tempList.concat(removedNodes);\n\n while (!foundCenter) {\n var tempList2 = [];\n tempList2 = tempList2.concat(tempList);\n tempList = [];\n\n for (var i = 0; i < list.length; i++) {\n var node = list[i];\n\n var index = list.indexOf(node);\n if (index >= 0) {\n list.splice(index, 1);\n }\n\n var neighbours = node.getNeighborsList();\n\n neighbours.forEach(function (neighbour) {\n if (removedNodes.indexOf(neighbour) < 0) {\n var otherDegree = remainingDegrees.get(neighbour);\n var newDegree = otherDegree - 1;\n\n if (newDegree == 1) {\n tempList.push(neighbour);\n }\n\n remainingDegrees.set(neighbour, newDegree);\n }\n });\n }\n\n removedNodes = removedNodes.concat(tempList);\n\n if (list.length == 1 || list.length == 2) {\n foundCenter = true;\n centerNode = list[0];\n }\n }\n\n return centerNode;\n};\n\n/**\r\n * During the coarsening process, this layout may be referenced by two graph managers\r\n * this setter function grants access to change the currently being used graph manager\r\n */\nLayout.prototype.setGraphManager = function (gm) {\n this.graphManager = gm;\n};\n\nmodule.exports = Layout;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction RandomSeed() {}\n// adapted from: https://stackoverflow.com/a/19303725\nRandomSeed.seed = 1;\nRandomSeed.x = 0;\n\nRandomSeed.nextDouble = function () {\n RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000;\n return RandomSeed.x - Math.floor(RandomSeed.x);\n};\n\nmodule.exports = RandomSeed;\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PointD = __webpack_require__(5);\n\nfunction Transform(x, y) {\n this.lworldOrgX = 0.0;\n this.lworldOrgY = 0.0;\n this.ldeviceOrgX = 0.0;\n this.ldeviceOrgY = 0.0;\n this.lworldExtX = 1.0;\n this.lworldExtY = 1.0;\n this.ldeviceExtX = 1.0;\n this.ldeviceExtY = 1.0;\n}\n\nTransform.prototype.getWorldOrgX = function () {\n return this.lworldOrgX;\n};\n\nTransform.prototype.setWorldOrgX = function (wox) {\n this.lworldOrgX = wox;\n};\n\nTransform.prototype.getWorldOrgY = function () {\n return this.lworldOrgY;\n};\n\nTransform.prototype.setWorldOrgY = function (woy) {\n this.lworldOrgY = woy;\n};\n\nTransform.prototype.getWorldExtX = function () {\n return this.lworldExtX;\n};\n\nTransform.prototype.setWorldExtX = function (wex) {\n this.lworldExtX = wex;\n};\n\nTransform.prototype.getWorldExtY = function () {\n return this.lworldExtY;\n};\n\nTransform.prototype.setWorldExtY = function (wey) {\n this.lworldExtY = wey;\n};\n\n/* Device related */\n\nTransform.prototype.getDeviceOrgX = function () {\n return this.ldeviceOrgX;\n};\n\nTransform.prototype.setDeviceOrgX = function (dox) {\n this.ldeviceOrgX = dox;\n};\n\nTransform.prototype.getDeviceOrgY = function () {\n return this.ldeviceOrgY;\n};\n\nTransform.prototype.setDeviceOrgY = function (doy) {\n this.ldeviceOrgY = doy;\n};\n\nTransform.prototype.getDeviceExtX = function () {\n return this.ldeviceExtX;\n};\n\nTransform.prototype.setDeviceExtX = function (dex) {\n this.ldeviceExtX = dex;\n};\n\nTransform.prototype.getDeviceExtY = function () {\n return this.ldeviceExtY;\n};\n\nTransform.prototype.setDeviceExtY = function (dey) {\n this.ldeviceExtY = dey;\n};\n\nTransform.prototype.transformX = function (x) {\n var xDevice = 0.0;\n var worldExtX = this.lworldExtX;\n if (worldExtX != 0.0) {\n xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX;\n }\n\n return xDevice;\n};\n\nTransform.prototype.transformY = function (y) {\n var yDevice = 0.0;\n var worldExtY = this.lworldExtY;\n if (worldExtY != 0.0) {\n yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY;\n }\n\n return yDevice;\n};\n\nTransform.prototype.inverseTransformX = function (x) {\n var xWorld = 0.0;\n var deviceExtX = this.ldeviceExtX;\n if (deviceExtX != 0.0) {\n xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX;\n }\n\n return xWorld;\n};\n\nTransform.prototype.inverseTransformY = function (y) {\n var yWorld = 0.0;\n var deviceExtY = this.ldeviceExtY;\n if (deviceExtY != 0.0) {\n yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY;\n }\n return yWorld;\n};\n\nTransform.prototype.inverseTransformPoint = function (inPoint) {\n var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y));\n return outPoint;\n};\n\nmodule.exports = Transform;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar Layout = __webpack_require__(15);\nvar FDLayoutConstants = __webpack_require__(4);\nvar LayoutConstants = __webpack_require__(0);\nvar IGeometry = __webpack_require__(8);\nvar IMath = __webpack_require__(9);\n\nfunction FDLayout() {\n Layout.call(this);\n\n this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;\n this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;\n this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;\n this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;\n this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;\n this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;\n this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n this.totalDisplacement = 0.0;\n this.oldTotalDisplacement = 0.0;\n this.maxIterations = FDLayoutConstants.MAX_ITERATIONS;\n}\n\nFDLayout.prototype = Object.create(Layout.prototype);\n\nfor (var prop in Layout) {\n FDLayout[prop] = Layout[prop];\n}\n\nFDLayout.prototype.initParameters = function () {\n Layout.prototype.initParameters.call(this, arguments);\n\n this.totalIterations = 0;\n this.notAnimatedIterations = 0;\n\n this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION;\n\n this.grid = [];\n};\n\nFDLayout.prototype.calcIdealEdgeLengths = function () {\n var edge;\n var originalIdealLength;\n var lcaDepth;\n var source;\n var target;\n var sizeOfSourceInLca;\n var sizeOfTargetInLca;\n\n var allEdges = this.getGraphManager().getAllEdges();\n for (var i = 0; i < allEdges.length; i++) {\n edge = allEdges[i];\n\n originalIdealLength = edge.idealLength;\n\n if (edge.isInterGraph) {\n source = edge.getSource();\n target = edge.getTarget();\n\n sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize();\n sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize();\n\n if (this.useSmartIdealEdgeLengthCalculation) {\n edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE;\n }\n\n lcaDepth = edge.getLca().getInclusionTreeDepth();\n\n edge.idealLength += originalIdealLength * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth);\n }\n }\n};\n\nFDLayout.prototype.initSpringEmbedder = function () {\n\n var s = this.getAllNodes().length;\n if (this.incremental) {\n if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {\n this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));\n }\n this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL;\n } else {\n if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {\n this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));\n } else {\n this.coolingFactor = 1.0;\n }\n this.initialCoolingFactor = this.coolingFactor;\n this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT;\n }\n\n this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations);\n\n // Reassign this attribute by using new constant value\n this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;\n this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length;\n\n this.repulsionRange = this.calcRepulsionRange();\n};\n\nFDLayout.prototype.calcSpringForces = function () {\n var lEdges = this.getAllEdges();\n var edge;\n\n for (var i = 0; i < lEdges.length; i++) {\n edge = lEdges[i];\n\n this.calcSpringForce(edge, edge.idealLength);\n }\n};\n\nFDLayout.prototype.calcRepulsionForces = function () {\n var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var i, j;\n var nodeA, nodeB;\n var lNodes = this.getAllNodes();\n var processedNodeSet;\n\n if (this.useFRGridVariant) {\n if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) {\n this.updateGrid();\n }\n\n processedNodeSet = new Set();\n\n // calculate repulsion forces between each nodes and its surrounding\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate);\n processedNodeSet.add(nodeA);\n }\n } else {\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n\n for (j = i + 1; j < lNodes.length; j++) {\n nodeB = lNodes[j];\n\n // If both nodes are not members of the same graph, skip.\n if (nodeA.getOwner() != nodeB.getOwner()) {\n continue;\n }\n\n this.calcRepulsionForce(nodeA, nodeB);\n }\n }\n }\n};\n\nFDLayout.prototype.calcGravitationalForces = function () {\n var node;\n var lNodes = this.getAllNodesToApplyGravitation();\n\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n this.calcGravitationalForce(node);\n }\n};\n\nFDLayout.prototype.moveNodes = function () {\n var lNodes = this.getAllNodes();\n var node;\n\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n node.move();\n }\n};\n\nFDLayout.prototype.calcSpringForce = function (edge, idealLength) {\n var sourceNode = edge.getSource();\n var targetNode = edge.getTarget();\n\n var length;\n var springForce;\n var springForceX;\n var springForceY;\n\n // Update edge length\n if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) {\n edge.updateLengthSimple();\n } else {\n edge.updateLength();\n\n if (edge.isOverlapingSourceAndTarget) {\n return;\n }\n }\n\n length = edge.getLength();\n\n if (length == 0) return;\n\n // Calculate spring forces\n springForce = edge.edgeElasticity * (length - idealLength);\n\n // Project force onto x and y axes\n springForceX = springForce * (edge.lengthX / length);\n springForceY = springForce * (edge.lengthY / length);\n\n // Apply forces on the end nodes\n sourceNode.springForceX += springForceX;\n sourceNode.springForceY += springForceY;\n targetNode.springForceX -= springForceX;\n targetNode.springForceY -= springForceY;\n};\n\nFDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) {\n var rectA = nodeA.getRect();\n var rectB = nodeB.getRect();\n var overlapAmount = new Array(2);\n var clipPoints = new Array(4);\n var distanceX;\n var distanceY;\n var distanceSquared;\n var distance;\n var repulsionForce;\n var repulsionForceX;\n var repulsionForceY;\n\n if (rectA.intersects(rectB)) // two nodes overlap\n {\n // calculate separation amount in x and y directions\n IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0);\n\n repulsionForceX = 2 * overlapAmount[0];\n repulsionForceY = 2 * overlapAmount[1];\n\n var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren);\n\n // Apply forces on the two nodes\n nodeA.repulsionForceX -= childrenConstant * repulsionForceX;\n nodeA.repulsionForceY -= childrenConstant * repulsionForceY;\n nodeB.repulsionForceX += childrenConstant * repulsionForceX;\n nodeB.repulsionForceY += childrenConstant * repulsionForceY;\n } else // no overlap\n {\n // calculate distance\n\n if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers\n {\n distanceX = rectB.getCenterX() - rectA.getCenterX();\n distanceY = rectB.getCenterY() - rectA.getCenterY();\n } else // use clipping points\n {\n IGeometry.getIntersection(rectA, rectB, clipPoints);\n\n distanceX = clipPoints[2] - clipPoints[0];\n distanceY = clipPoints[3] - clipPoints[1];\n }\n\n // No repulsion range. FR grid variant should take care of this.\n if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) {\n distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST;\n }\n\n if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) {\n distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST;\n }\n\n distanceSquared = distanceX * distanceX + distanceY * distanceY;\n distance = Math.sqrt(distanceSquared);\n\n // Here we use half of the nodes' repulsion values for backward compatibility\n repulsionForce = (nodeA.nodeRepulsion / 2 + nodeB.nodeRepulsion / 2) * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared;\n\n // Project force onto x and y axes\n repulsionForceX = repulsionForce * distanceX / distance;\n repulsionForceY = repulsionForce * distanceY / distance;\n\n // Apply forces on the two nodes \n nodeA.repulsionForceX -= repulsionForceX;\n nodeA.repulsionForceY -= repulsionForceY;\n nodeB.repulsionForceX += repulsionForceX;\n nodeB.repulsionForceY += repulsionForceY;\n }\n};\n\nFDLayout.prototype.calcGravitationalForce = function (node) {\n var ownerGraph;\n var ownerCenterX;\n var ownerCenterY;\n var distanceX;\n var distanceY;\n var absDistanceX;\n var absDistanceY;\n var estimatedSize;\n ownerGraph = node.getOwner();\n\n ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2;\n ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2;\n distanceX = node.getCenterX() - ownerCenterX;\n distanceY = node.getCenterY() - ownerCenterY;\n absDistanceX = Math.abs(distanceX) + node.getWidth() / 2;\n absDistanceY = Math.abs(distanceY) + node.getHeight() / 2;\n\n if (node.getOwner() == this.graphManager.getRoot()) // in the root graph\n {\n estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor;\n\n if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {\n node.gravitationForceX = -this.gravityConstant * distanceX;\n node.gravitationForceY = -this.gravityConstant * distanceY;\n }\n } else // inside a compound\n {\n estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor;\n\n if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {\n node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant;\n node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant;\n }\n }\n};\n\nFDLayout.prototype.isConverged = function () {\n var converged;\n var oscilating = false;\n\n if (this.totalIterations > this.maxIterations / 3) {\n oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2;\n }\n\n converged = this.totalDisplacement < this.totalDisplacementThreshold;\n\n this.oldTotalDisplacement = this.totalDisplacement;\n\n return converged || oscilating;\n};\n\nFDLayout.prototype.animate = function () {\n if (this.animationDuringLayout && !this.isSubLayout) {\n if (this.notAnimatedIterations == this.animationPeriod) {\n this.update();\n this.notAnimatedIterations = 0;\n } else {\n this.notAnimatedIterations++;\n }\n }\n};\n\n//This method calculates the number of children (weight) for all nodes\nFDLayout.prototype.calcNoOfChildrenForAllNodes = function () {\n var node;\n var allNodes = this.graphManager.getAllNodes();\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n node.noOfChildren = node.getNoOfChildren();\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: FR-Grid Variant Repulsion Force Calculation\n// -----------------------------------------------------------------------------\n\nFDLayout.prototype.calcGrid = function (graph) {\n\n var sizeX = 0;\n var sizeY = 0;\n\n sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange));\n sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange));\n\n var grid = new Array(sizeX);\n\n for (var i = 0; i < sizeX; i++) {\n grid[i] = new Array(sizeY);\n }\n\n for (var i = 0; i < sizeX; i++) {\n for (var j = 0; j < sizeY; j++) {\n grid[i][j] = new Array();\n }\n }\n\n return grid;\n};\n\nFDLayout.prototype.addNodeToGrid = function (v, left, top) {\n\n var startX = 0;\n var finishX = 0;\n var startY = 0;\n var finishY = 0;\n\n startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange));\n finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange));\n startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange));\n finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange));\n\n for (var i = startX; i <= finishX; i++) {\n for (var j = startY; j <= finishY; j++) {\n this.grid[i][j].push(v);\n v.setGridCoordinates(startX, finishX, startY, finishY);\n }\n }\n};\n\nFDLayout.prototype.updateGrid = function () {\n var i;\n var nodeA;\n var lNodes = this.getAllNodes();\n\n this.grid = this.calcGrid(this.graphManager.getRoot());\n\n // put all nodes to proper grid cells\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());\n }\n};\n\nFDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) {\n\n if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) {\n var surrounding = new Set();\n nodeA.surrounding = new Array();\n var nodeB;\n var grid = this.grid;\n\n for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) {\n for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) {\n if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) {\n for (var k = 0; k < grid[i][j].length; k++) {\n nodeB = grid[i][j][k];\n\n // If both nodes are not members of the same graph, \n // or both nodes are the same, skip.\n if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) {\n continue;\n }\n\n // check if the repulsion force between\n // nodeA and nodeB has already been calculated\n if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) {\n var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2);\n var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2);\n\n // if the distance between nodeA and nodeB \n // is less then calculation range\n if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) {\n //then add nodeB to surrounding of nodeA\n surrounding.add(nodeB);\n }\n }\n }\n }\n }\n }\n\n nodeA.surrounding = [].concat(_toConsumableArray(surrounding));\n }\n for (i = 0; i < nodeA.surrounding.length; i++) {\n this.calcRepulsionForce(nodeA, nodeA.surrounding[i]);\n }\n};\n\nFDLayout.prototype.calcRepulsionRange = function () {\n return 0.0;\n};\n\nmodule.exports = FDLayout;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LEdge = __webpack_require__(1);\nvar FDLayoutConstants = __webpack_require__(4);\n\nfunction FDLayoutEdge(source, target, vEdge) {\n LEdge.call(this, source, target, vEdge);\n\n // Ideal length and elasticity value for this edge\n this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\n this.edgeElasticity = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;\n}\n\nFDLayoutEdge.prototype = Object.create(LEdge.prototype);\n\nfor (var prop in LEdge) {\n FDLayoutEdge[prop] = LEdge[prop];\n}\n\nmodule.exports = FDLayoutEdge;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LNode = __webpack_require__(3);\nvar FDLayoutConstants = __webpack_require__(4);\n\nfunction FDLayoutNode(gm, loc, size, vNode) {\n // alternative constructor is handled inside LNode\n LNode.call(this, gm, loc, size, vNode);\n\n // Repulsion value of this node\n this.nodeRepulsion = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;\n\n //Spring, repulsion and gravitational forces acting on this node\n this.springForceX = 0;\n this.springForceY = 0;\n this.repulsionForceX = 0;\n this.repulsionForceY = 0;\n this.gravitationForceX = 0;\n this.gravitationForceY = 0;\n //Amount by which this node is to be moved in this iteration\n this.displacementX = 0;\n this.displacementY = 0;\n\n //Start and finish grid coordinates that this node is fallen into\n this.startX = 0;\n this.finishX = 0;\n this.startY = 0;\n this.finishY = 0;\n\n //Geometric neighbors of this node\n this.surrounding = [];\n}\n\nFDLayoutNode.prototype = Object.create(LNode.prototype);\n\nfor (var prop in LNode) {\n FDLayoutNode[prop] = LNode[prop];\n}\n\nFDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) {\n this.startX = _startX;\n this.finishX = _finishX;\n this.startY = _startY;\n this.finishY = _finishY;\n};\n\nmodule.exports = FDLayoutNode;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction DimensionD(width, height) {\n this.width = 0;\n this.height = 0;\n if (width !== null && height !== null) {\n this.height = height;\n this.width = width;\n }\n}\n\nDimensionD.prototype.getWidth = function () {\n return this.width;\n};\n\nDimensionD.prototype.setWidth = function (width) {\n this.width = width;\n};\n\nDimensionD.prototype.getHeight = function () {\n return this.height;\n};\n\nDimensionD.prototype.setHeight = function (height) {\n this.height = height;\n};\n\nmodule.exports = DimensionD;\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar UniqueIDGeneretor = __webpack_require__(14);\n\nfunction HashMap() {\n this.map = {};\n this.keys = [];\n}\n\nHashMap.prototype.put = function (key, value) {\n var theId = UniqueIDGeneretor.createID(key);\n if (!this.contains(theId)) {\n this.map[theId] = value;\n this.keys.push(key);\n }\n};\n\nHashMap.prototype.contains = function (key) {\n var theId = UniqueIDGeneretor.createID(key);\n return this.map[key] != null;\n};\n\nHashMap.prototype.get = function (key) {\n var theId = UniqueIDGeneretor.createID(key);\n return this.map[theId];\n};\n\nHashMap.prototype.keySet = function () {\n return this.keys;\n};\n\nmodule.exports = HashMap;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar UniqueIDGeneretor = __webpack_require__(14);\n\nfunction HashSet() {\n this.set = {};\n}\n;\n\nHashSet.prototype.add = function (obj) {\n var theId = UniqueIDGeneretor.createID(obj);\n if (!this.contains(theId)) this.set[theId] = obj;\n};\n\nHashSet.prototype.remove = function (obj) {\n delete this.set[UniqueIDGeneretor.createID(obj)];\n};\n\nHashSet.prototype.clear = function () {\n this.set = {};\n};\n\nHashSet.prototype.contains = function (obj) {\n return this.set[UniqueIDGeneretor.createID(obj)] == obj;\n};\n\nHashSet.prototype.isEmpty = function () {\n return this.size() === 0;\n};\n\nHashSet.prototype.size = function () {\n return Object.keys(this.set).length;\n};\n\n//concats this.set to the given list\nHashSet.prototype.addAllTo = function (list) {\n var keys = Object.keys(this.set);\n var length = keys.length;\n for (var i = 0; i < length; i++) {\n list.push(this.set[keys[i]]);\n }\n};\n\nHashSet.prototype.size = function () {\n return Object.keys(this.set).length;\n};\n\nHashSet.prototype.addAll = function (list) {\n var s = list.length;\n for (var i = 0; i < s; i++) {\n var v = list[i];\n this.add(v);\n }\n};\n\nmodule.exports = HashSet;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// Some matrix (1d and 2d array) operations\nfunction Matrix() {}\n\n/**\n * matrix multiplication\n * array1, array2 and result are 2d arrays\n */\nMatrix.multMat = function (array1, array2) {\n var result = [];\n\n for (var i = 0; i < array1.length; i++) {\n result[i] = [];\n for (var j = 0; j < array2[0].length; j++) {\n result[i][j] = 0;\n for (var k = 0; k < array1[0].length; k++) {\n result[i][j] += array1[i][k] * array2[k][j];\n }\n }\n }\n return result;\n};\n\n/**\n * matrix transpose\n * array and result are 2d arrays\n */\nMatrix.transpose = function (array) {\n var result = [];\n\n for (var i = 0; i < array[0].length; i++) {\n result[i] = [];\n for (var j = 0; j < array.length; j++) {\n result[i][j] = array[j][i];\n }\n }\n\n return result;\n};\n\n/**\n * multiply array with constant\n * array and result are 1d arrays\n */\nMatrix.multCons = function (array, constant) {\n var result = [];\n\n for (var i = 0; i < array.length; i++) {\n result[i] = array[i] * constant;\n }\n\n return result;\n};\n\n/**\n * substract two arrays\n * array1, array2 and result are 1d arrays\n */\nMatrix.minusOp = function (array1, array2) {\n var result = [];\n\n for (var i = 0; i < array1.length; i++) {\n result[i] = array1[i] - array2[i];\n }\n\n return result;\n};\n\n/**\n * dot product of two arrays with same size\n * array1 and array2 are 1d arrays\n */\nMatrix.dotProduct = function (array1, array2) {\n var product = 0;\n\n for (var i = 0; i < array1.length; i++) {\n product += array1[i] * array2[i];\n }\n\n return product;\n};\n\n/**\n * magnitude of an array\n * array is 1d array\n */\nMatrix.mag = function (array) {\n return Math.sqrt(this.dotProduct(array, array));\n};\n\n/**\n * normalization of an array\n * array and result are 1d array\n */\nMatrix.normalize = function (array) {\n var result = [];\n var magnitude = this.mag(array);\n\n for (var i = 0; i < array.length; i++) {\n result[i] = array[i] / magnitude;\n }\n\n return result;\n};\n\n/**\n * multiply an array with centering matrix\n * array and result are 1d array\n */\nMatrix.multGamma = function (array) {\n var result = [];\n var sum = 0;\n\n for (var i = 0; i < array.length; i++) {\n sum += array[i];\n }\n\n sum *= -1 / array.length;\n\n for (var _i = 0; _i < array.length; _i++) {\n result[_i] = sum + array[_i];\n }\n return result;\n};\n\n/**\n * a special matrix multiplication\n * result = 0.5 * C * INV * C^T * array\n * array and result are 1d, C and INV are 2d arrays\n */\nMatrix.multL = function (array, C, INV) {\n var result = [];\n var temp1 = [];\n var temp2 = [];\n\n // multiply by C^T\n for (var i = 0; i < C[0].length; i++) {\n var sum = 0;\n for (var j = 0; j < C.length; j++) {\n sum += -0.5 * C[j][i] * array[j];\n }\n temp1[i] = sum;\n }\n // multiply the result by INV\n for (var _i2 = 0; _i2 < INV.length; _i2++) {\n var _sum = 0;\n for (var _j = 0; _j < INV.length; _j++) {\n _sum += INV[_i2][_j] * temp1[_j];\n }\n temp2[_i2] = _sum;\n }\n // multiply the result by C\n for (var _i3 = 0; _i3 < C.length; _i3++) {\n var _sum2 = 0;\n for (var _j2 = 0; _j2 < C[0].length; _j2++) {\n _sum2 += C[_i3][_j2] * temp2[_j2];\n }\n result[_i3] = _sum2;\n }\n\n return result;\n};\n\nmodule.exports = Matrix;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * A classic Quicksort algorithm with Hoare's partition\n * - Works also on LinkedList objects\n *\n * Copyright: i-Vis Research Group, Bilkent University, 2007 - present\n */\n\nvar LinkedList = __webpack_require__(11);\n\nvar Quicksort = function () {\n function Quicksort(A, compareFunction) {\n _classCallCheck(this, Quicksort);\n\n if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction;\n\n var length = void 0;\n if (A instanceof LinkedList) length = A.size();else length = A.length;\n\n this._quicksort(A, 0, length - 1);\n }\n\n _createClass(Quicksort, [{\n key: '_quicksort',\n value: function _quicksort(A, p, r) {\n if (p < r) {\n var q = this._partition(A, p, r);\n this._quicksort(A, p, q);\n this._quicksort(A, q + 1, r);\n }\n }\n }, {\n key: '_partition',\n value: function _partition(A, p, r) {\n var x = this._get(A, p);\n var i = p;\n var j = r;\n while (true) {\n while (this.compareFunction(x, this._get(A, j))) {\n j--;\n }while (this.compareFunction(this._get(A, i), x)) {\n i++;\n }if (i < j) {\n this._swap(A, i, j);\n i++;\n j--;\n } else return j;\n }\n }\n }, {\n key: '_get',\n value: function _get(object, index) {\n if (object instanceof LinkedList) return object.get_object_at(index);else return object[index];\n }\n }, {\n key: '_set',\n value: function _set(object, index, value) {\n if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value;\n }\n }, {\n key: '_swap',\n value: function _swap(A, i, j) {\n var temp = this._get(A, i);\n this._set(A, i, this._get(A, j));\n this._set(A, j, temp);\n }\n }, {\n key: '_defaultCompareFunction',\n value: function _defaultCompareFunction(a, b) {\n return b > a;\n }\n }]);\n\n return Quicksort;\n}();\n\nmodule.exports = Quicksort;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// Singular Value Decomposition implementation\nfunction SVD() {};\n\n/* Below singular value decomposition (svd) code including hypot function is adopted from https://github.com/dragonfly-ai/JamaJS\n Some changes are applied to make the code compatible with the fcose code and to make it independent from Jama.\n Input matrix is changed to a 2D array instead of Jama matrix. Matrix dimensions are taken according to 2D array instead of using Jama functions.\n An object that includes singular value components is created for return. \n The types of input parameters of the hypot function are removed. \n let is used instead of var for the variable initialization.\n*/\n/*\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"{}\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright {yyyy} {name of copyright owner}\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\nSVD.svd = function (A) {\n this.U = null;\n this.V = null;\n this.s = null;\n this.m = 0;\n this.n = 0;\n this.m = A.length;\n this.n = A[0].length;\n var nu = Math.min(this.m, this.n);\n this.s = function (s) {\n var a = [];\n while (s-- > 0) {\n a.push(0);\n }return a;\n }(Math.min(this.m + 1, this.n));\n this.U = function (dims) {\n var allocate = function allocate(dims) {\n if (dims.length == 0) {\n return 0;\n } else {\n var array = [];\n for (var i = 0; i < dims[0]; i++) {\n array.push(allocate(dims.slice(1)));\n }\n return array;\n }\n };\n return allocate(dims);\n }([this.m, nu]);\n this.V = function (dims) {\n var allocate = function allocate(dims) {\n if (dims.length == 0) {\n return 0;\n } else {\n var array = [];\n for (var i = 0; i < dims[0]; i++) {\n array.push(allocate(dims.slice(1)));\n }\n return array;\n }\n };\n return allocate(dims);\n }([this.n, this.n]);\n var e = function (s) {\n var a = [];\n while (s-- > 0) {\n a.push(0);\n }return a;\n }(this.n);\n var work = function (s) {\n var a = [];\n while (s-- > 0) {\n a.push(0);\n }return a;\n }(this.m);\n var wantu = true;\n var wantv = true;\n var nct = Math.min(this.m - 1, this.n);\n var nrt = Math.max(0, Math.min(this.n - 2, this.m));\n for (var k = 0; k < Math.max(nct, nrt); k++) {\n if (k < nct) {\n this.s[k] = 0;\n for (var i = k; i < this.m; i++) {\n this.s[k] = SVD.hypot(this.s[k], A[i][k]);\n }\n ;\n if (this.s[k] !== 0.0) {\n if (A[k][k] < 0.0) {\n this.s[k] = -this.s[k];\n }\n for (var _i = k; _i < this.m; _i++) {\n A[_i][k] /= this.s[k];\n }\n ;\n A[k][k] += 1.0;\n }\n this.s[k] = -this.s[k];\n }\n for (var j = k + 1; j < this.n; j++) {\n if (function (lhs, rhs) {\n return lhs && rhs;\n }(k < nct, this.s[k] !== 0.0)) {\n var t = 0;\n for (var _i2 = k; _i2 < this.m; _i2++) {\n t += A[_i2][k] * A[_i2][j];\n }\n ;\n t = -t / A[k][k];\n for (var _i3 = k; _i3 < this.m; _i3++) {\n A[_i3][j] += t * A[_i3][k];\n }\n ;\n }\n e[j] = A[k][j];\n }\n ;\n if (function (lhs, rhs) {\n return lhs && rhs;\n }(wantu, k < nct)) {\n for (var _i4 = k; _i4 < this.m; _i4++) {\n this.U[_i4][k] = A[_i4][k];\n }\n ;\n }\n if (k < nrt) {\n e[k] = 0;\n for (var _i5 = k + 1; _i5 < this.n; _i5++) {\n e[k] = SVD.hypot(e[k], e[_i5]);\n }\n ;\n if (e[k] !== 0.0) {\n if (e[k + 1] < 0.0) {\n e[k] = -e[k];\n }\n for (var _i6 = k + 1; _i6 < this.n; _i6++) {\n e[_i6] /= e[k];\n }\n ;\n e[k + 1] += 1.0;\n }\n e[k] = -e[k];\n if (function (lhs, rhs) {\n return lhs && rhs;\n }(k + 1 < this.m, e[k] !== 0.0)) {\n for (var _i7 = k + 1; _i7 < this.m; _i7++) {\n work[_i7] = 0.0;\n }\n ;\n for (var _j = k + 1; _j < this.n; _j++) {\n for (var _i8 = k + 1; _i8 < this.m; _i8++) {\n work[_i8] += e[_j] * A[_i8][_j];\n }\n ;\n }\n ;\n for (var _j2 = k + 1; _j2 < this.n; _j2++) {\n var _t = -e[_j2] / e[k + 1];\n for (var _i9 = k + 1; _i9 < this.m; _i9++) {\n A[_i9][_j2] += _t * work[_i9];\n }\n ;\n }\n ;\n }\n if (wantv) {\n for (var _i10 = k + 1; _i10 < this.n; _i10++) {\n this.V[_i10][k] = e[_i10];\n };\n }\n }\n };\n var p = Math.min(this.n, this.m + 1);\n if (nct < this.n) {\n this.s[nct] = A[nct][nct];\n }\n if (this.m < p) {\n this.s[p - 1] = 0.0;\n }\n if (nrt + 1 < p) {\n e[nrt] = A[nrt][p - 1];\n }\n e[p - 1] = 0.0;\n if (wantu) {\n for (var _j3 = nct; _j3 < nu; _j3++) {\n for (var _i11 = 0; _i11 < this.m; _i11++) {\n this.U[_i11][_j3] = 0.0;\n }\n ;\n this.U[_j3][_j3] = 1.0;\n };\n for (var _k = nct - 1; _k >= 0; _k--) {\n if (this.s[_k] !== 0.0) {\n for (var _j4 = _k + 1; _j4 < nu; _j4++) {\n var _t2 = 0;\n for (var _i12 = _k; _i12 < this.m; _i12++) {\n _t2 += this.U[_i12][_k] * this.U[_i12][_j4];\n };\n _t2 = -_t2 / this.U[_k][_k];\n for (var _i13 = _k; _i13 < this.m; _i13++) {\n this.U[_i13][_j4] += _t2 * this.U[_i13][_k];\n };\n };\n for (var _i14 = _k; _i14 < this.m; _i14++) {\n this.U[_i14][_k] = -this.U[_i14][_k];\n };\n this.U[_k][_k] = 1.0 + this.U[_k][_k];\n for (var _i15 = 0; _i15 < _k - 1; _i15++) {\n this.U[_i15][_k] = 0.0;\n };\n } else {\n for (var _i16 = 0; _i16 < this.m; _i16++) {\n this.U[_i16][_k] = 0.0;\n };\n this.U[_k][_k] = 1.0;\n }\n };\n }\n if (wantv) {\n for (var _k2 = this.n - 1; _k2 >= 0; _k2--) {\n if (function (lhs, rhs) {\n return lhs && rhs;\n }(_k2 < nrt, e[_k2] !== 0.0)) {\n for (var _j5 = _k2 + 1; _j5 < nu; _j5++) {\n var _t3 = 0;\n for (var _i17 = _k2 + 1; _i17 < this.n; _i17++) {\n _t3 += this.V[_i17][_k2] * this.V[_i17][_j5];\n };\n _t3 = -_t3 / this.V[_k2 + 1][_k2];\n for (var _i18 = _k2 + 1; _i18 < this.n; _i18++) {\n this.V[_i18][_j5] += _t3 * this.V[_i18][_k2];\n };\n };\n }\n for (var _i19 = 0; _i19 < this.n; _i19++) {\n this.V[_i19][_k2] = 0.0;\n };\n this.V[_k2][_k2] = 1.0;\n };\n }\n var pp = p - 1;\n var iter = 0;\n var eps = Math.pow(2.0, -52.0);\n var tiny = Math.pow(2.0, -966.0);\n while (p > 0) {\n var _k3 = void 0;\n var kase = void 0;\n for (_k3 = p - 2; _k3 >= -1; _k3--) {\n if (_k3 === -1) {\n break;\n }\n if (Math.abs(e[_k3]) <= tiny + eps * (Math.abs(this.s[_k3]) + Math.abs(this.s[_k3 + 1]))) {\n e[_k3] = 0.0;\n break;\n }\n };\n if (_k3 === p - 2) {\n kase = 4;\n } else {\n var ks = void 0;\n for (ks = p - 1; ks >= _k3; ks--) {\n if (ks === _k3) {\n break;\n }\n var _t4 = (ks !== p ? Math.abs(e[ks]) : 0.0) + (ks !== _k3 + 1 ? Math.abs(e[ks - 1]) : 0.0);\n if (Math.abs(this.s[ks]) <= tiny + eps * _t4) {\n this.s[ks] = 0.0;\n break;\n }\n };\n if (ks === _k3) {\n kase = 3;\n } else if (ks === p - 1) {\n kase = 1;\n } else {\n kase = 2;\n _k3 = ks;\n }\n }\n _k3++;\n switch (kase) {\n case 1:\n {\n var f = e[p - 2];\n e[p - 2] = 0.0;\n for (var _j6 = p - 2; _j6 >= _k3; _j6--) {\n var _t5 = SVD.hypot(this.s[_j6], f);\n var cs = this.s[_j6] / _t5;\n var sn = f / _t5;\n this.s[_j6] = _t5;\n if (_j6 !== _k3) {\n f = -sn * e[_j6 - 1];\n e[_j6 - 1] = cs * e[_j6 - 1];\n }\n if (wantv) {\n for (var _i20 = 0; _i20 < this.n; _i20++) {\n _t5 = cs * this.V[_i20][_j6] + sn * this.V[_i20][p - 1];\n this.V[_i20][p - 1] = -sn * this.V[_i20][_j6] + cs * this.V[_i20][p - 1];\n this.V[_i20][_j6] = _t5;\n };\n }\n };\n };\n break;\n case 2:\n {\n var _f = e[_k3 - 1];\n e[_k3 - 1] = 0.0;\n for (var _j7 = _k3; _j7 < p; _j7++) {\n var _t6 = SVD.hypot(this.s[_j7], _f);\n var _cs = this.s[_j7] / _t6;\n var _sn = _f / _t6;\n this.s[_j7] = _t6;\n _f = -_sn * e[_j7];\n e[_j7] = _cs * e[_j7];\n if (wantu) {\n for (var _i21 = 0; _i21 < this.m; _i21++) {\n _t6 = _cs * this.U[_i21][_j7] + _sn * this.U[_i21][_k3 - 1];\n this.U[_i21][_k3 - 1] = -_sn * this.U[_i21][_j7] + _cs * this.U[_i21][_k3 - 1];\n this.U[_i21][_j7] = _t6;\n };\n }\n };\n };\n break;\n case 3:\n {\n var scale = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[p - 1]), Math.abs(this.s[p - 2])), Math.abs(e[p - 2])), Math.abs(this.s[_k3])), Math.abs(e[_k3]));\n var sp = this.s[p - 1] / scale;\n var spm1 = this.s[p - 2] / scale;\n var epm1 = e[p - 2] / scale;\n var sk = this.s[_k3] / scale;\n var ek = e[_k3] / scale;\n var b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2.0;\n var c = sp * epm1 * (sp * epm1);\n var shift = 0.0;\n if (function (lhs, rhs) {\n return lhs || rhs;\n }(b !== 0.0, c !== 0.0)) {\n shift = Math.sqrt(b * b + c);\n if (b < 0.0) {\n shift = -shift;\n }\n shift = c / (b + shift);\n }\n var _f2 = (sk + sp) * (sk - sp) + shift;\n var g = sk * ek;\n for (var _j8 = _k3; _j8 < p - 1; _j8++) {\n var _t7 = SVD.hypot(_f2, g);\n var _cs2 = _f2 / _t7;\n var _sn2 = g / _t7;\n if (_j8 !== _k3) {\n e[_j8 - 1] = _t7;\n }\n _f2 = _cs2 * this.s[_j8] + _sn2 * e[_j8];\n e[_j8] = _cs2 * e[_j8] - _sn2 * this.s[_j8];\n g = _sn2 * this.s[_j8 + 1];\n this.s[_j8 + 1] = _cs2 * this.s[_j8 + 1];\n if (wantv) {\n for (var _i22 = 0; _i22 < this.n; _i22++) {\n _t7 = _cs2 * this.V[_i22][_j8] + _sn2 * this.V[_i22][_j8 + 1];\n this.V[_i22][_j8 + 1] = -_sn2 * this.V[_i22][_j8] + _cs2 * this.V[_i22][_j8 + 1];\n this.V[_i22][_j8] = _t7;\n };\n }\n _t7 = SVD.hypot(_f2, g);\n _cs2 = _f2 / _t7;\n _sn2 = g / _t7;\n this.s[_j8] = _t7;\n _f2 = _cs2 * e[_j8] + _sn2 * this.s[_j8 + 1];\n this.s[_j8 + 1] = -_sn2 * e[_j8] + _cs2 * this.s[_j8 + 1];\n g = _sn2 * e[_j8 + 1];\n e[_j8 + 1] = _cs2 * e[_j8 + 1];\n if (wantu && _j8 < this.m - 1) {\n for (var _i23 = 0; _i23 < this.m; _i23++) {\n _t7 = _cs2 * this.U[_i23][_j8] + _sn2 * this.U[_i23][_j8 + 1];\n this.U[_i23][_j8 + 1] = -_sn2 * this.U[_i23][_j8] + _cs2 * this.U[_i23][_j8 + 1];\n this.U[_i23][_j8] = _t7;\n };\n }\n };\n e[p - 2] = _f2;\n iter = iter + 1;\n };\n break;\n case 4:\n {\n if (this.s[_k3] <= 0.0) {\n this.s[_k3] = this.s[_k3] < 0.0 ? -this.s[_k3] : 0.0;\n if (wantv) {\n for (var _i24 = 0; _i24 <= pp; _i24++) {\n this.V[_i24][_k3] = -this.V[_i24][_k3];\n };\n }\n }\n while (_k3 < pp) {\n if (this.s[_k3] >= this.s[_k3 + 1]) {\n break;\n }\n var _t8 = this.s[_k3];\n this.s[_k3] = this.s[_k3 + 1];\n this.s[_k3 + 1] = _t8;\n if (wantv && _k3 < this.n - 1) {\n for (var _i25 = 0; _i25 < this.n; _i25++) {\n _t8 = this.V[_i25][_k3 + 1];\n this.V[_i25][_k3 + 1] = this.V[_i25][_k3];\n this.V[_i25][_k3] = _t8;\n };\n }\n if (wantu && _k3 < this.m - 1) {\n for (var _i26 = 0; _i26 < this.m; _i26++) {\n _t8 = this.U[_i26][_k3 + 1];\n this.U[_i26][_k3 + 1] = this.U[_i26][_k3];\n this.U[_i26][_k3] = _t8;\n };\n }\n _k3++;\n };\n iter = 0;\n p--;\n };\n break;\n }\n };\n var result = { U: this.U, V: this.V, S: this.s };\n return result;\n};\n\n// sqrt(a^2 + b^2) without under/overflow.\nSVD.hypot = function (a, b) {\n var r = void 0;\n if (Math.abs(a) > Math.abs(b)) {\n r = b / a;\n r = Math.abs(a) * Math.sqrt(1 + r * r);\n } else if (b != 0) {\n r = a / b;\n r = Math.abs(b) * Math.sqrt(1 + r * r);\n } else {\n r = 0.0;\n }\n return r;\n};\n\nmodule.exports = SVD;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string\n * sequences by S.B.Needleman and C.D.Wunsch (1970).\n *\n * Aside from the inputs, you can assign the scores for,\n * - Match: The two characters at the current index are same.\n * - Mismatch: The two characters at the current index are different.\n * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string.\n */\n\nvar NeedlemanWunsch = function () {\n function NeedlemanWunsch(sequence1, sequence2) {\n var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1;\n var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;\n\n _classCallCheck(this, NeedlemanWunsch);\n\n this.sequence1 = sequence1;\n this.sequence2 = sequence2;\n this.match_score = match_score;\n this.mismatch_penalty = mismatch_penalty;\n this.gap_penalty = gap_penalty;\n\n // Just the remove redundancy\n this.iMax = sequence1.length + 1;\n this.jMax = sequence2.length + 1;\n\n // Grid matrix of scores\n this.grid = new Array(this.iMax);\n for (var i = 0; i < this.iMax; i++) {\n this.grid[i] = new Array(this.jMax);\n\n for (var j = 0; j < this.jMax; j++) {\n this.grid[i][j] = 0;\n }\n }\n\n // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions)\n this.tracebackGrid = new Array(this.iMax);\n for (var _i = 0; _i < this.iMax; _i++) {\n this.tracebackGrid[_i] = new Array(this.jMax);\n\n for (var _j = 0; _j < this.jMax; _j++) {\n this.tracebackGrid[_i][_j] = [null, null, null];\n }\n }\n\n // The aligned sequences (return multiple possibilities)\n this.alignments = [];\n\n // Final alignment score\n this.score = -1;\n\n // Calculate scores and tracebacks\n this.computeGrids();\n }\n\n _createClass(NeedlemanWunsch, [{\n key: \"getScore\",\n value: function getScore() {\n return this.score;\n }\n }, {\n key: \"getAlignments\",\n value: function getAlignments() {\n return this.alignments;\n }\n\n // Main dynamic programming procedure\n\n }, {\n key: \"computeGrids\",\n value: function computeGrids() {\n // Fill in the first row\n for (var j = 1; j < this.jMax; j++) {\n this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty;\n this.tracebackGrid[0][j] = [false, false, true];\n }\n\n // Fill in the first column\n for (var i = 1; i < this.iMax; i++) {\n this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty;\n this.tracebackGrid[i][0] = [false, true, false];\n }\n\n // Fill the rest of the grid\n for (var _i2 = 1; _i2 < this.iMax; _i2++) {\n for (var _j2 = 1; _j2 < this.jMax; _j2++) {\n // Find the max score(s) among [`Diag`, `Up`, `Left`]\n var diag = void 0;\n if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty;\n\n var up = this.grid[_i2 - 1][_j2] + this.gap_penalty;\n var left = this.grid[_i2][_j2 - 1] + this.gap_penalty;\n\n // If there exists multiple max values, capture them for multiple paths\n var maxOf = [diag, up, left];\n var indices = this.arrayAllMaxIndexes(maxOf);\n\n // Update Grids\n this.grid[_i2][_j2] = maxOf[indices[0]];\n this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)];\n }\n }\n\n // Update alignment score\n this.score = this.grid[this.iMax - 1][this.jMax - 1];\n }\n\n // Gets all possible valid sequence combinations\n\n }, {\n key: \"alignmentTraceback\",\n value: function alignmentTraceback() {\n var inProcessAlignments = [];\n\n inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length],\n seq1: \"\",\n seq2: \"\"\n });\n\n while (inProcessAlignments[0]) {\n var current = inProcessAlignments[0];\n var directions = this.tracebackGrid[current.pos[0]][current.pos[1]];\n\n if (directions[0]) {\n inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1],\n seq1: this.sequence1[current.pos[0] - 1] + current.seq1,\n seq2: this.sequence2[current.pos[1] - 1] + current.seq2\n });\n }\n if (directions[1]) {\n inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]],\n seq1: this.sequence1[current.pos[0] - 1] + current.seq1,\n seq2: '-' + current.seq2\n });\n }\n if (directions[2]) {\n inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1],\n seq1: '-' + current.seq1,\n seq2: this.sequence2[current.pos[1] - 1] + current.seq2\n });\n }\n\n if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1,\n sequence2: current.seq2\n });\n\n inProcessAlignments.shift();\n }\n\n return this.alignments;\n }\n\n // Helper Functions\n\n }, {\n key: \"getAllIndexes\",\n value: function getAllIndexes(arr, val) {\n var indexes = [],\n i = -1;\n while ((i = arr.indexOf(val, i + 1)) !== -1) {\n indexes.push(i);\n }\n return indexes;\n }\n }, {\n key: \"arrayAllMaxIndexes\",\n value: function arrayAllMaxIndexes(array) {\n return this.getAllIndexes(array, Math.max.apply(null, array));\n }\n }]);\n\n return NeedlemanWunsch;\n}();\n\nmodule.exports = NeedlemanWunsch;\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar layoutBase = function layoutBase() {\n return;\n};\n\nlayoutBase.FDLayout = __webpack_require__(18);\nlayoutBase.FDLayoutConstants = __webpack_require__(4);\nlayoutBase.FDLayoutEdge = __webpack_require__(19);\nlayoutBase.FDLayoutNode = __webpack_require__(20);\nlayoutBase.DimensionD = __webpack_require__(21);\nlayoutBase.HashMap = __webpack_require__(22);\nlayoutBase.HashSet = __webpack_require__(23);\nlayoutBase.IGeometry = __webpack_require__(8);\nlayoutBase.IMath = __webpack_require__(9);\nlayoutBase.Integer = __webpack_require__(10);\nlayoutBase.Point = __webpack_require__(12);\nlayoutBase.PointD = __webpack_require__(5);\nlayoutBase.RandomSeed = __webpack_require__(16);\nlayoutBase.RectangleD = __webpack_require__(13);\nlayoutBase.Transform = __webpack_require__(17);\nlayoutBase.UniqueIDGeneretor = __webpack_require__(14);\nlayoutBase.Quicksort = __webpack_require__(25);\nlayoutBase.LinkedList = __webpack_require__(11);\nlayoutBase.LGraphObject = __webpack_require__(2);\nlayoutBase.LGraph = __webpack_require__(6);\nlayoutBase.LEdge = __webpack_require__(1);\nlayoutBase.LGraphManager = __webpack_require__(7);\nlayoutBase.LNode = __webpack_require__(3);\nlayoutBase.Layout = __webpack_require__(15);\nlayoutBase.LayoutConstants = __webpack_require__(0);\nlayoutBase.NeedlemanWunsch = __webpack_require__(27);\nlayoutBase.Matrix = __webpack_require__(24);\nlayoutBase.SVD = __webpack_require__(26);\n\nmodule.exports = layoutBase;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction Emitter() {\n this.listeners = [];\n}\n\nvar p = Emitter.prototype;\n\np.addListener = function (event, callback) {\n this.listeners.push({\n event: event,\n callback: callback\n });\n};\n\np.removeListener = function (event, callback) {\n for (var i = this.listeners.length; i >= 0; i--) {\n var l = this.listeners[i];\n\n if (l.event === event && l.callback === callback) {\n this.listeners.splice(i, 1);\n }\n }\n};\n\np.emit = function (event, data) {\n for (var i = 0; i < this.listeners.length; i++) {\n var l = this.listeners[i];\n\n if (event === l.event) {\n l.callback(data);\n }\n }\n};\n\nmodule.exports = Emitter;\n\n/***/ })\n/******/ ]);\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"layout-base\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"layout-base\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"coseBase\"] = factory(require(\"layout-base\"));\n\telse\n\t\troot[\"coseBase\"] = factory(root[\"layoutBase\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__551__) {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 45:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar coseBase = {};\n\ncoseBase.layoutBase = __webpack_require__(551);\ncoseBase.CoSEConstants = __webpack_require__(806);\ncoseBase.CoSEEdge = __webpack_require__(767);\ncoseBase.CoSEGraph = __webpack_require__(880);\ncoseBase.CoSEGraphManager = __webpack_require__(578);\ncoseBase.CoSELayout = __webpack_require__(765);\ncoseBase.CoSENode = __webpack_require__(991);\ncoseBase.ConstraintHandler = __webpack_require__(902);\n\nmodule.exports = coseBase;\n\n/***/ }),\n\n/***/ 806:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar FDLayoutConstants = __webpack_require__(551).FDLayoutConstants;\n\nfunction CoSEConstants() {}\n\n//CoSEConstants inherits static props in FDLayoutConstants\nfor (var prop in FDLayoutConstants) {\n CoSEConstants[prop] = FDLayoutConstants[prop];\n}\n\nCoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false;\nCoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\nCoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60;\nCoSEConstants.TILE = true;\nCoSEConstants.TILING_PADDING_VERTICAL = 10;\nCoSEConstants.TILING_PADDING_HORIZONTAL = 10;\nCoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;\nCoSEConstants.ENFORCE_CONSTRAINTS = true;\nCoSEConstants.APPLY_LAYOUT = true;\nCoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS = true;\nCoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; // this should be set to false if there will be a constraint\n// This constant is for differentiating whether actual layout algorithm that uses cose-base wants to apply only incremental layout or \n// an incremental layout on top of a randomized layout. If it is only incremental layout, then this constant should be true.\nCoSEConstants.PURE_INCREMENTAL = CoSEConstants.DEFAULT_INCREMENTAL;\n\nmodule.exports = CoSEConstants;\n\n/***/ }),\n\n/***/ 767:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar FDLayoutEdge = __webpack_require__(551).FDLayoutEdge;\n\nfunction CoSEEdge(source, target, vEdge) {\n FDLayoutEdge.call(this, source, target, vEdge);\n}\n\nCoSEEdge.prototype = Object.create(FDLayoutEdge.prototype);\nfor (var prop in FDLayoutEdge) {\n CoSEEdge[prop] = FDLayoutEdge[prop];\n}\n\nmodule.exports = CoSEEdge;\n\n/***/ }),\n\n/***/ 880:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar LGraph = __webpack_require__(551).LGraph;\n\nfunction CoSEGraph(parent, graphMgr, vGraph) {\n LGraph.call(this, parent, graphMgr, vGraph);\n}\n\nCoSEGraph.prototype = Object.create(LGraph.prototype);\nfor (var prop in LGraph) {\n CoSEGraph[prop] = LGraph[prop];\n}\n\nmodule.exports = CoSEGraph;\n\n/***/ }),\n\n/***/ 578:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar LGraphManager = __webpack_require__(551).LGraphManager;\n\nfunction CoSEGraphManager(layout) {\n LGraphManager.call(this, layout);\n}\n\nCoSEGraphManager.prototype = Object.create(LGraphManager.prototype);\nfor (var prop in LGraphManager) {\n CoSEGraphManager[prop] = LGraphManager[prop];\n}\n\nmodule.exports = CoSEGraphManager;\n\n/***/ }),\n\n/***/ 765:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar FDLayout = __webpack_require__(551).FDLayout;\nvar CoSEGraphManager = __webpack_require__(578);\nvar CoSEGraph = __webpack_require__(880);\nvar CoSENode = __webpack_require__(991);\nvar CoSEEdge = __webpack_require__(767);\nvar CoSEConstants = __webpack_require__(806);\nvar ConstraintHandler = __webpack_require__(902);\nvar FDLayoutConstants = __webpack_require__(551).FDLayoutConstants;\nvar LayoutConstants = __webpack_require__(551).LayoutConstants;\nvar Point = __webpack_require__(551).Point;\nvar PointD = __webpack_require__(551).PointD;\nvar DimensionD = __webpack_require__(551).DimensionD;\nvar Layout = __webpack_require__(551).Layout;\nvar Integer = __webpack_require__(551).Integer;\nvar IGeometry = __webpack_require__(551).IGeometry;\nvar LGraph = __webpack_require__(551).LGraph;\nvar Transform = __webpack_require__(551).Transform;\nvar LinkedList = __webpack_require__(551).LinkedList;\n\nfunction CoSELayout() {\n FDLayout.call(this);\n\n this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled\n this.constraints = {}; // keep layout constraints\n}\n\nCoSELayout.prototype = Object.create(FDLayout.prototype);\n\nfor (var prop in FDLayout) {\n CoSELayout[prop] = FDLayout[prop];\n}\n\nCoSELayout.prototype.newGraphManager = function () {\n var gm = new CoSEGraphManager(this);\n this.graphManager = gm;\n return gm;\n};\n\nCoSELayout.prototype.newGraph = function (vGraph) {\n return new CoSEGraph(null, this.graphManager, vGraph);\n};\n\nCoSELayout.prototype.newNode = function (vNode) {\n return new CoSENode(this.graphManager, vNode);\n};\n\nCoSELayout.prototype.newEdge = function (vEdge) {\n return new CoSEEdge(null, null, vEdge);\n};\n\nCoSELayout.prototype.initParameters = function () {\n FDLayout.prototype.initParameters.call(this, arguments);\n if (!this.isSubLayout) {\n if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) {\n this.idealEdgeLength = 10;\n } else {\n this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH;\n }\n\n this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;\n this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;\n this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;\n this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;\n this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;\n\n // variables for tree reduction support\n this.prunedNodesAll = [];\n this.growTreeIterations = 0;\n this.afterGrowthIterations = 0;\n this.isTreeGrowing = false;\n this.isGrowthFinished = false;\n }\n};\n\n// This method is used to set CoSE related parameters used by spring embedder.\nCoSELayout.prototype.initSpringEmbedder = function () {\n FDLayout.prototype.initSpringEmbedder.call(this);\n\n // variables for cooling\n this.coolingCycle = 0;\n this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD;\n this.finalTemperature = 0.04;\n this.coolingAdjuster = 1;\n};\n\nCoSELayout.prototype.layout = function () {\n var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n if (createBendsAsNeeded) {\n this.createBendpoints();\n this.graphManager.resetAllEdges();\n }\n\n this.level = 0;\n return this.classicLayout();\n};\n\nCoSELayout.prototype.classicLayout = function () {\n this.nodesWithGravity = this.calculateNodesToApplyGravitationTo();\n this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity);\n this.calcNoOfChildrenForAllNodes();\n this.graphManager.calcLowestCommonAncestors();\n this.graphManager.calcInclusionTreeDepths();\n this.graphManager.getRoot().calcEstimatedSize();\n this.calcIdealEdgeLengths();\n\n if (!this.incremental) {\n var forest = this.getFlatForest();\n\n // The graph associated with this layout is flat and a forest\n if (forest.length > 0) {\n this.positionNodesRadially(forest);\n }\n // The graph associated with this layout is not flat or a forest\n else {\n // Reduce the trees when incremental mode is not enabled and graph is not a forest \n this.reduceTrees();\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n\n this.positionNodesRandomly();\n }\n } else {\n if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) {\n // Reduce the trees in incremental mode if only this constant is set to true \n this.reduceTrees();\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n }\n }\n\n if (Object.keys(this.constraints).length > 0) {\n ConstraintHandler.handleConstraints(this);\n this.initConstraintVariables();\n }\n\n this.initSpringEmbedder();\n if (CoSEConstants.APPLY_LAYOUT) {\n this.runSpringEmbedder();\n }\n\n return true;\n};\n\nCoSELayout.prototype.tick = function () {\n this.totalIterations++;\n\n if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) {\n if (this.prunedNodesAll.length > 0) {\n this.isTreeGrowing = true;\n } else {\n return true;\n }\n }\n\n if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {\n if (this.isConverged()) {\n if (this.prunedNodesAll.length > 0) {\n this.isTreeGrowing = true;\n } else {\n return true;\n }\n }\n\n this.coolingCycle++;\n\n if (this.layoutQuality == 0) {\n // quality - \"draft\"\n this.coolingAdjuster = this.coolingCycle;\n } else if (this.layoutQuality == 1) {\n // quality - \"default\"\n this.coolingAdjuster = this.coolingCycle / 3;\n }\n\n // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3\n this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature);\n this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));\n }\n // Operations while tree is growing again \n if (this.isTreeGrowing) {\n if (this.growTreeIterations % 10 == 0) {\n if (this.prunedNodesAll.length > 0) {\n this.graphManager.updateBounds();\n this.updateGrid();\n this.growTree(this.prunedNodesAll);\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n\n this.graphManager.updateBounds();\n this.updateGrid();\n if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2;else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n } else {\n this.isTreeGrowing = false;\n this.isGrowthFinished = true;\n }\n }\n this.growTreeIterations++;\n }\n // Operations after growth is finished\n if (this.isGrowthFinished) {\n if (this.isConverged()) {\n return true;\n }\n if (this.afterGrowthIterations % 10 == 0) {\n this.graphManager.updateBounds();\n this.updateGrid();\n }\n if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100);else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100);\n this.afterGrowthIterations++;\n }\n\n var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished;\n var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;\n\n this.totalDisplacement = 0;\n this.graphManager.updateBounds();\n this.calcSpringForces();\n this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate);\n this.calcGravitationalForces();\n this.moveNodes();\n this.animate();\n\n return false; // Layout is not ended yet return false\n};\n\nCoSELayout.prototype.getPositionsData = function () {\n var allNodes = this.graphManager.getAllNodes();\n var pData = {};\n for (var i = 0; i < allNodes.length; i++) {\n var rect = allNodes[i].rect;\n var id = allNodes[i].id;\n pData[id] = {\n id: id,\n x: rect.getCenterX(),\n y: rect.getCenterY(),\n w: rect.width,\n h: rect.height\n };\n }\n\n return pData;\n};\n\nCoSELayout.prototype.runSpringEmbedder = function () {\n this.initialAnimationPeriod = 25;\n this.animationPeriod = this.initialAnimationPeriod;\n var layoutEnded = false;\n\n // If aminate option is 'during' signal that layout is supposed to start iterating\n if (FDLayoutConstants.ANIMATE === 'during') {\n this.emit('layoutstarted');\n } else {\n // If aminate option is 'during' tick() function will be called on index.js\n while (!layoutEnded) {\n layoutEnded = this.tick();\n }\n\n this.graphManager.updateBounds();\n }\n};\n\n// overrides moveNodes method in FDLayout\nCoSELayout.prototype.moveNodes = function () {\n var lNodes = this.getAllNodes();\n var node;\n\n // calculate displacement for each node \n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n node.calculateDisplacement();\n }\n\n if (Object.keys(this.constraints).length > 0) {\n this.updateDisplacements();\n }\n\n // move each node\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n node.move();\n }\n};\n\n// constraint related methods: initConstraintVariables and updateDisplacements\n\n// initialize constraint related variables\nCoSELayout.prototype.initConstraintVariables = function () {\n var self = this;\n this.idToNodeMap = new Map();\n this.fixedNodeSet = new Set();\n\n var allNodes = this.graphManager.getAllNodes();\n\n // fill idToNodeMap\n for (var i = 0; i < allNodes.length; i++) {\n var node = allNodes[i];\n this.idToNodeMap.set(node.id, node);\n }\n\n // calculate fixed node weight for given compound node\n var calculateCompoundWeight = function calculateCompoundWeight(compoundNode) {\n var nodes = compoundNode.getChild().getNodes();\n var node;\n var fixedNodeWeight = 0;\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n if (node.getChild() == null) {\n if (self.fixedNodeSet.has(node.id)) {\n fixedNodeWeight += 100;\n }\n } else {\n fixedNodeWeight += calculateCompoundWeight(node);\n }\n }\n return fixedNodeWeight;\n };\n\n if (this.constraints.fixedNodeConstraint) {\n // fill fixedNodeSet\n this.constraints.fixedNodeConstraint.forEach(function (nodeData) {\n self.fixedNodeSet.add(nodeData.nodeId);\n });\n\n // assign fixed node weights to compounds if they contain fixed nodes\n var allNodes = this.graphManager.getAllNodes();\n var node;\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n if (node.getChild() != null) {\n var fixedNodeWeight = calculateCompoundWeight(node);\n if (fixedNodeWeight > 0) {\n node.fixedNodeWeight = fixedNodeWeight;\n }\n }\n }\n }\n\n if (this.constraints.relativePlacementConstraint) {\n var nodeToDummyForVerticalAlignment = new Map();\n var nodeToDummyForHorizontalAlignment = new Map();\n this.dummyToNodeForVerticalAlignment = new Map();\n this.dummyToNodeForHorizontalAlignment = new Map();\n this.fixedNodesOnHorizontal = new Set();\n this.fixedNodesOnVertical = new Set();\n\n // fill maps and sets\n this.fixedNodeSet.forEach(function (nodeId) {\n self.fixedNodesOnHorizontal.add(nodeId);\n self.fixedNodesOnVertical.add(nodeId);\n });\n\n if (this.constraints.alignmentConstraint) {\n if (this.constraints.alignmentConstraint.vertical) {\n var verticalAlignment = this.constraints.alignmentConstraint.vertical;\n for (var i = 0; i < verticalAlignment.length; i++) {\n this.dummyToNodeForVerticalAlignment.set(\"dummy\" + i, []);\n verticalAlignment[i].forEach(function (nodeId) {\n nodeToDummyForVerticalAlignment.set(nodeId, \"dummy\" + i);\n self.dummyToNodeForVerticalAlignment.get(\"dummy\" + i).push(nodeId);\n if (self.fixedNodeSet.has(nodeId)) {\n self.fixedNodesOnHorizontal.add(\"dummy\" + i);\n }\n });\n }\n }\n if (this.constraints.alignmentConstraint.horizontal) {\n var horizontalAlignment = this.constraints.alignmentConstraint.horizontal;\n for (var i = 0; i < horizontalAlignment.length; i++) {\n this.dummyToNodeForHorizontalAlignment.set(\"dummy\" + i, []);\n horizontalAlignment[i].forEach(function (nodeId) {\n nodeToDummyForHorizontalAlignment.set(nodeId, \"dummy\" + i);\n self.dummyToNodeForHorizontalAlignment.get(\"dummy\" + i).push(nodeId);\n if (self.fixedNodeSet.has(nodeId)) {\n self.fixedNodesOnVertical.add(\"dummy\" + i);\n }\n });\n }\n }\n }\n\n if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) {\n\n this.shuffle = function (array) {\n var j, x, i;\n for (i = array.length - 1; i >= 2 * array.length / 3; i--) {\n j = Math.floor(Math.random() * (i + 1));\n x = array[i];\n array[i] = array[j];\n array[j] = x;\n }\n return array;\n };\n\n this.nodesInRelativeHorizontal = [];\n this.nodesInRelativeVertical = [];\n this.nodeToRelativeConstraintMapHorizontal = new Map();\n this.nodeToRelativeConstraintMapVertical = new Map();\n this.nodeToTempPositionMapHorizontal = new Map();\n this.nodeToTempPositionMapVertical = new Map();\n\n // fill arrays and maps\n this.constraints.relativePlacementConstraint.forEach(function (constraint) {\n if (constraint.left) {\n var nodeIdLeft = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left;\n var nodeIdRight = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right;\n\n if (!self.nodesInRelativeHorizontal.includes(nodeIdLeft)) {\n self.nodesInRelativeHorizontal.push(nodeIdLeft);\n self.nodeToRelativeConstraintMapHorizontal.set(nodeIdLeft, []);\n if (self.dummyToNodeForVerticalAlignment.has(nodeIdLeft)) {\n self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdLeft)[0]).getCenterX());\n } else {\n self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(nodeIdLeft).getCenterX());\n }\n }\n if (!self.nodesInRelativeHorizontal.includes(nodeIdRight)) {\n self.nodesInRelativeHorizontal.push(nodeIdRight);\n self.nodeToRelativeConstraintMapHorizontal.set(nodeIdRight, []);\n if (self.dummyToNodeForVerticalAlignment.has(nodeIdRight)) {\n self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdRight)[0]).getCenterX());\n } else {\n self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(nodeIdRight).getCenterX());\n }\n }\n\n self.nodeToRelativeConstraintMapHorizontal.get(nodeIdLeft).push({ right: nodeIdRight, gap: constraint.gap });\n self.nodeToRelativeConstraintMapHorizontal.get(nodeIdRight).push({ left: nodeIdLeft, gap: constraint.gap });\n } else {\n var nodeIdTop = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top;\n var nodeIdBottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom;\n\n if (!self.nodesInRelativeVertical.includes(nodeIdTop)) {\n self.nodesInRelativeVertical.push(nodeIdTop);\n self.nodeToRelativeConstraintMapVertical.set(nodeIdTop, []);\n if (self.dummyToNodeForHorizontalAlignment.has(nodeIdTop)) {\n self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdTop)[0]).getCenterY());\n } else {\n self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(nodeIdTop).getCenterY());\n }\n }\n if (!self.nodesInRelativeVertical.includes(nodeIdBottom)) {\n self.nodesInRelativeVertical.push(nodeIdBottom);\n self.nodeToRelativeConstraintMapVertical.set(nodeIdBottom, []);\n if (self.dummyToNodeForHorizontalAlignment.has(nodeIdBottom)) {\n self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdBottom)[0]).getCenterY());\n } else {\n self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(nodeIdBottom).getCenterY());\n }\n }\n self.nodeToRelativeConstraintMapVertical.get(nodeIdTop).push({ bottom: nodeIdBottom, gap: constraint.gap });\n self.nodeToRelativeConstraintMapVertical.get(nodeIdBottom).push({ top: nodeIdTop, gap: constraint.gap });\n }\n });\n } else {\n var subGraphOnHorizontal = new Map(); // subgraph from vertical RP constraints\n var subGraphOnVertical = new Map(); // subgraph from vertical RP constraints\n\n // construct subgraphs from relative placement constraints \n this.constraints.relativePlacementConstraint.forEach(function (constraint) {\n if (constraint.left) {\n var left = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left;\n var right = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right;\n if (subGraphOnHorizontal.has(left)) {\n subGraphOnHorizontal.get(left).push(right);\n } else {\n subGraphOnHorizontal.set(left, [right]);\n }\n if (subGraphOnHorizontal.has(right)) {\n subGraphOnHorizontal.get(right).push(left);\n } else {\n subGraphOnHorizontal.set(right, [left]);\n }\n } else {\n var top = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top;\n var bottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom;\n if (subGraphOnVertical.has(top)) {\n subGraphOnVertical.get(top).push(bottom);\n } else {\n subGraphOnVertical.set(top, [bottom]);\n }\n if (subGraphOnVertical.has(bottom)) {\n subGraphOnVertical.get(bottom).push(top);\n } else {\n subGraphOnVertical.set(bottom, [top]);\n }\n }\n });\n\n // function to construct components from a given graph \n // also returns an array that keeps whether each component contains fixed node\n var constructComponents = function constructComponents(graph, fixedNodes) {\n var components = [];\n var isFixed = [];\n var queue = new LinkedList();\n var visited = new Set();\n var count = 0;\n\n graph.forEach(function (value, key) {\n if (!visited.has(key)) {\n components[count] = [];\n isFixed[count] = false;\n var currentNode = key;\n queue.push(currentNode);\n visited.add(currentNode);\n components[count].push(currentNode);\n\n while (queue.length != 0) {\n currentNode = queue.shift();\n if (fixedNodes.has(currentNode)) {\n isFixed[count] = true;\n }\n var neighbors = graph.get(currentNode);\n neighbors.forEach(function (neighbor) {\n if (!visited.has(neighbor)) {\n queue.push(neighbor);\n visited.add(neighbor);\n components[count].push(neighbor);\n }\n });\n }\n count++;\n }\n });\n\n return { components: components, isFixed: isFixed };\n };\n\n var resultOnHorizontal = constructComponents(subGraphOnHorizontal, self.fixedNodesOnHorizontal);\n this.componentsOnHorizontal = resultOnHorizontal.components;\n this.fixedComponentsOnHorizontal = resultOnHorizontal.isFixed;\n var resultOnVertical = constructComponents(subGraphOnVertical, self.fixedNodesOnVertical);\n this.componentsOnVertical = resultOnVertical.components;\n this.fixedComponentsOnVertical = resultOnVertical.isFixed;\n }\n }\n};\n\n// updates node displacements based on constraints\nCoSELayout.prototype.updateDisplacements = function () {\n var self = this;\n if (this.constraints.fixedNodeConstraint) {\n this.constraints.fixedNodeConstraint.forEach(function (nodeData) {\n var fixedNode = self.idToNodeMap.get(nodeData.nodeId);\n fixedNode.displacementX = 0;\n fixedNode.displacementY = 0;\n });\n }\n\n if (this.constraints.alignmentConstraint) {\n if (this.constraints.alignmentConstraint.vertical) {\n var allVerticalAlignments = this.constraints.alignmentConstraint.vertical;\n for (var i = 0; i < allVerticalAlignments.length; i++) {\n var totalDisplacementX = 0;\n for (var j = 0; j < allVerticalAlignments[i].length; j++) {\n if (this.fixedNodeSet.has(allVerticalAlignments[i][j])) {\n totalDisplacementX = 0;\n break;\n }\n totalDisplacementX += this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX;\n }\n var averageDisplacementX = totalDisplacementX / allVerticalAlignments[i].length;\n for (var j = 0; j < allVerticalAlignments[i].length; j++) {\n this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX = averageDisplacementX;\n }\n }\n }\n if (this.constraints.alignmentConstraint.horizontal) {\n var allHorizontalAlignments = this.constraints.alignmentConstraint.horizontal;\n for (var i = 0; i < allHorizontalAlignments.length; i++) {\n var totalDisplacementY = 0;\n for (var j = 0; j < allHorizontalAlignments[i].length; j++) {\n if (this.fixedNodeSet.has(allHorizontalAlignments[i][j])) {\n totalDisplacementY = 0;\n break;\n }\n totalDisplacementY += this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY;\n }\n var averageDisplacementY = totalDisplacementY / allHorizontalAlignments[i].length;\n for (var j = 0; j < allHorizontalAlignments[i].length; j++) {\n this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY = averageDisplacementY;\n }\n }\n }\n }\n\n if (this.constraints.relativePlacementConstraint) {\n\n if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) {\n // shuffle array to randomize node processing order\n if (this.totalIterations % 10 == 0) {\n this.shuffle(this.nodesInRelativeHorizontal);\n this.shuffle(this.nodesInRelativeVertical);\n }\n\n this.nodesInRelativeHorizontal.forEach(function (nodeId) {\n if (!self.fixedNodesOnHorizontal.has(nodeId)) {\n var displacement = 0;\n if (self.dummyToNodeForVerticalAlignment.has(nodeId)) {\n displacement = self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeId)[0]).displacementX;\n } else {\n displacement = self.idToNodeMap.get(nodeId).displacementX;\n }\n self.nodeToRelativeConstraintMapHorizontal.get(nodeId).forEach(function (constraint) {\n if (constraint.right) {\n var diff = self.nodeToTempPositionMapHorizontal.get(constraint.right) - self.nodeToTempPositionMapHorizontal.get(nodeId) - displacement;\n if (diff < constraint.gap) {\n displacement -= constraint.gap - diff;\n }\n } else {\n var diff = self.nodeToTempPositionMapHorizontal.get(nodeId) - self.nodeToTempPositionMapHorizontal.get(constraint.left) + displacement;\n if (diff < constraint.gap) {\n displacement += constraint.gap - diff;\n }\n }\n });\n self.nodeToTempPositionMapHorizontal.set(nodeId, self.nodeToTempPositionMapHorizontal.get(nodeId) + displacement);\n if (self.dummyToNodeForVerticalAlignment.has(nodeId)) {\n self.dummyToNodeForVerticalAlignment.get(nodeId).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementX = displacement;\n });\n } else {\n self.idToNodeMap.get(nodeId).displacementX = displacement;\n }\n }\n });\n\n this.nodesInRelativeVertical.forEach(function (nodeId) {\n if (!self.fixedNodesOnHorizontal.has(nodeId)) {\n var displacement = 0;\n if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) {\n displacement = self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeId)[0]).displacementY;\n } else {\n displacement = self.idToNodeMap.get(nodeId).displacementY;\n }\n self.nodeToRelativeConstraintMapVertical.get(nodeId).forEach(function (constraint) {\n if (constraint.bottom) {\n var diff = self.nodeToTempPositionMapVertical.get(constraint.bottom) - self.nodeToTempPositionMapVertical.get(nodeId) - displacement;\n if (diff < constraint.gap) {\n displacement -= constraint.gap - diff;\n }\n } else {\n var diff = self.nodeToTempPositionMapVertical.get(nodeId) - self.nodeToTempPositionMapVertical.get(constraint.top) + displacement;\n if (diff < constraint.gap) {\n displacement += constraint.gap - diff;\n }\n }\n });\n self.nodeToTempPositionMapVertical.set(nodeId, self.nodeToTempPositionMapVertical.get(nodeId) + displacement);\n if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) {\n self.dummyToNodeForHorizontalAlignment.get(nodeId).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementY = displacement;\n });\n } else {\n self.idToNodeMap.get(nodeId).displacementY = displacement;\n }\n }\n });\n } else {\n for (var i = 0; i < this.componentsOnHorizontal.length; i++) {\n var component = this.componentsOnHorizontal[i];\n if (this.fixedComponentsOnHorizontal[i]) {\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForVerticalAlignment.has(component[j])) {\n this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementX = 0;\n });\n } else {\n this.idToNodeMap.get(component[j]).displacementX = 0;\n }\n }\n } else {\n var sum = 0;\n var count = 0;\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForVerticalAlignment.has(component[j])) {\n var actualNodes = this.dummyToNodeForVerticalAlignment.get(component[j]);\n sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementX;\n count += actualNodes.length;\n } else {\n sum += this.idToNodeMap.get(component[j]).displacementX;\n count++;\n }\n }\n var averageDisplacement = sum / count;\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForVerticalAlignment.has(component[j])) {\n this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementX = averageDisplacement;\n });\n } else {\n this.idToNodeMap.get(component[j]).displacementX = averageDisplacement;\n }\n }\n }\n }\n\n for (var i = 0; i < this.componentsOnVertical.length; i++) {\n var component = this.componentsOnVertical[i];\n if (this.fixedComponentsOnVertical[i]) {\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForHorizontalAlignment.has(component[j])) {\n this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementY = 0;\n });\n } else {\n this.idToNodeMap.get(component[j]).displacementY = 0;\n }\n }\n } else {\n var sum = 0;\n var count = 0;\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForHorizontalAlignment.has(component[j])) {\n var actualNodes = this.dummyToNodeForHorizontalAlignment.get(component[j]);\n sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementY;\n count += actualNodes.length;\n } else {\n sum += this.idToNodeMap.get(component[j]).displacementY;\n count++;\n }\n }\n var averageDisplacement = sum / count;\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForHorizontalAlignment.has(component[j])) {\n this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementY = averageDisplacement;\n });\n } else {\n this.idToNodeMap.get(component[j]).displacementY = averageDisplacement;\n }\n }\n }\n }\n }\n }\n};\n\nCoSELayout.prototype.calculateNodesToApplyGravitationTo = function () {\n var nodeList = [];\n var graph;\n\n var graphs = this.graphManager.getGraphs();\n var size = graphs.length;\n var i;\n for (i = 0; i < size; i++) {\n graph = graphs[i];\n\n graph.updateConnected();\n\n if (!graph.isConnected) {\n nodeList = nodeList.concat(graph.getNodes());\n }\n }\n\n return nodeList;\n};\n\nCoSELayout.prototype.createBendpoints = function () {\n var edges = [];\n edges = edges.concat(this.graphManager.getAllEdges());\n var visited = new Set();\n var i;\n for (i = 0; i < edges.length; i++) {\n var edge = edges[i];\n\n if (!visited.has(edge)) {\n var source = edge.getSource();\n var target = edge.getTarget();\n\n if (source == target) {\n edge.getBendpoints().push(new PointD());\n edge.getBendpoints().push(new PointD());\n this.createDummyNodesForBendpoints(edge);\n visited.add(edge);\n } else {\n var edgeList = [];\n\n edgeList = edgeList.concat(source.getEdgeListToNode(target));\n edgeList = edgeList.concat(target.getEdgeListToNode(source));\n\n if (!visited.has(edgeList[0])) {\n if (edgeList.length > 1) {\n var k;\n for (k = 0; k < edgeList.length; k++) {\n var multiEdge = edgeList[k];\n multiEdge.getBendpoints().push(new PointD());\n this.createDummyNodesForBendpoints(multiEdge);\n }\n }\n edgeList.forEach(function (edge) {\n visited.add(edge);\n });\n }\n }\n }\n\n if (visited.size == edges.length) {\n break;\n }\n }\n};\n\nCoSELayout.prototype.positionNodesRadially = function (forest) {\n // We tile the trees to a grid row by row; first tree starts at (0,0)\n var currentStartingPoint = new Point(0, 0);\n var numberOfColumns = Math.ceil(Math.sqrt(forest.length));\n var height = 0;\n var currentY = 0;\n var currentX = 0;\n var point = new PointD(0, 0);\n\n for (var i = 0; i < forest.length; i++) {\n if (i % numberOfColumns == 0) {\n // Start of a new row, make the x coordinate 0, increment the\n // y coordinate with the max height of the previous row\n currentX = 0;\n currentY = height;\n\n if (i != 0) {\n currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION;\n }\n\n height = 0;\n }\n\n var tree = forest[i];\n\n // Find the center of the tree\n var centerNode = Layout.findCenterOfTree(tree);\n\n // Set the staring point of the next tree\n currentStartingPoint.x = currentX;\n currentStartingPoint.y = currentY;\n\n // Do a radial layout starting with the center\n point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint);\n\n if (point.y > height) {\n height = Math.floor(point.y);\n }\n\n currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION);\n }\n\n this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2));\n};\n\nCoSELayout.radialLayout = function (tree, centerNode, startingPoint) {\n var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION);\n CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep);\n var bounds = LGraph.calculateBounds(tree);\n\n var transform = new Transform();\n transform.setDeviceOrgX(bounds.getMinX());\n transform.setDeviceOrgY(bounds.getMinY());\n transform.setWorldOrgX(startingPoint.x);\n transform.setWorldOrgY(startingPoint.y);\n\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n node.transform(transform);\n }\n\n var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY());\n\n return transform.inverseTransformPoint(bottomRight);\n};\n\nCoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) {\n // First, position this node by finding its angle.\n var halfInterval = (endAngle - startAngle + 1) / 2;\n\n if (halfInterval < 0) {\n halfInterval += 180;\n }\n\n var nodeAngle = (halfInterval + startAngle) % 360;\n var teta = nodeAngle * IGeometry.TWO_PI / 360;\n\n // Make polar to java cordinate conversion.\n var cos_teta = Math.cos(teta);\n var x_ = distance * Math.cos(teta);\n var y_ = distance * Math.sin(teta);\n\n node.setCenter(x_, y_);\n\n // Traverse all neighbors of this node and recursively call this\n // function.\n var neighborEdges = [];\n neighborEdges = neighborEdges.concat(node.getEdges());\n var childCount = neighborEdges.length;\n\n if (parentOfNode != null) {\n childCount--;\n }\n\n var branchCount = 0;\n\n var incEdgesCount = neighborEdges.length;\n var startIndex;\n\n var edges = node.getEdgesBetween(parentOfNode);\n\n // If there are multiple edges, prune them until there remains only one\n // edge.\n while (edges.length > 1) {\n //neighborEdges.remove(edges.remove(0));\n var temp = edges[0];\n edges.splice(0, 1);\n var index = neighborEdges.indexOf(temp);\n if (index >= 0) {\n neighborEdges.splice(index, 1);\n }\n incEdgesCount--;\n childCount--;\n }\n\n if (parentOfNode != null) {\n //assert edges.length == 1;\n startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount;\n } else {\n startIndex = 0;\n }\n\n var stepAngle = Math.abs(endAngle - startAngle) / childCount;\n\n for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) {\n var currentNeighbor = neighborEdges[i].getOtherEnd(node);\n\n // Don't back traverse to root node in current tree.\n if (currentNeighbor == parentOfNode) {\n continue;\n }\n\n var childStartAngle = (startAngle + branchCount * stepAngle) % 360;\n var childEndAngle = (childStartAngle + stepAngle) % 360;\n\n CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation);\n\n branchCount++;\n }\n};\n\nCoSELayout.maxDiagonalInTree = function (tree) {\n var maxDiagonal = Integer.MIN_VALUE;\n\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n var diagonal = node.getDiagonal();\n\n if (diagonal > maxDiagonal) {\n maxDiagonal = diagonal;\n }\n }\n\n return maxDiagonal;\n};\n\nCoSELayout.prototype.calcRepulsionRange = function () {\n // formula is 2 x (level + 1) x idealEdgeLength\n return 2 * (this.level + 1) * this.idealEdgeLength;\n};\n\n// Tiling methods\n\n// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's\nCoSELayout.prototype.groupZeroDegreeMembers = function () {\n var self = this;\n // array of [parent_id x oneDegreeNode_id]\n var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members\n this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled\n this.idToDummyNode = {}; // A map of id to dummy node \n\n var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled\n var allNodes = this.graphManager.getAllNodes();\n\n // Fill zero degree list\n for (var i = 0; i < allNodes.length; i++) {\n var node = allNodes[i];\n var parent = node.getParent();\n // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list\n if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) {\n zeroDegree.push(node);\n }\n }\n\n // Create a map of parent node and its zero degree members\n for (var i = 0; i < zeroDegree.length; i++) {\n var node = zeroDegree[i]; // Zero degree node itself\n var p_id = node.getParent().id; // Parent id\n\n if (typeof tempMemberGroups[p_id] === \"undefined\") tempMemberGroups[p_id] = [];\n\n tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups\n }\n\n // If there are at least two nodes at a level, create a dummy compound for them\n Object.keys(tempMemberGroups).forEach(function (p_id) {\n if (tempMemberGroups[p_id].length > 1) {\n var dummyCompoundId = \"DummyCompound_\" + p_id; // The id of dummy compound which will be created soon\n self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups\n\n var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound\n\n // Create a dummy compound with calculated id\n var dummyCompound = new CoSENode(self.graphManager);\n dummyCompound.id = dummyCompoundId;\n dummyCompound.paddingLeft = parent.paddingLeft || 0;\n dummyCompound.paddingRight = parent.paddingRight || 0;\n dummyCompound.paddingBottom = parent.paddingBottom || 0;\n dummyCompound.paddingTop = parent.paddingTop || 0;\n\n self.idToDummyNode[dummyCompoundId] = dummyCompound;\n\n var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound);\n var parentGraph = parent.getChild();\n\n // Add dummy compound to parent the graph\n parentGraph.add(dummyCompound);\n\n // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent\n for (var i = 0; i < tempMemberGroups[p_id].length; i++) {\n var node = tempMemberGroups[p_id][i];\n\n parentGraph.remove(node);\n dummyParentGraph.add(node);\n }\n }\n });\n};\n\nCoSELayout.prototype.clearCompounds = function () {\n var childGraphMap = {};\n var idToNode = {};\n\n // Get compound ordering by finding the inner one first\n this.performDFSOnCompounds();\n\n for (var i = 0; i < this.compoundOrder.length; i++) {\n\n idToNode[this.compoundOrder[i].id] = this.compoundOrder[i];\n childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes());\n\n // Remove children of compounds\n this.graphManager.remove(this.compoundOrder[i].getChild());\n this.compoundOrder[i].child = null;\n }\n\n this.graphManager.resetAllNodes();\n\n // Tile the removed children\n this.tileCompoundMembers(childGraphMap, idToNode);\n};\n\nCoSELayout.prototype.clearZeroDegreeMembers = function () {\n var self = this;\n var tiledZeroDegreePack = this.tiledZeroDegreePack = [];\n\n Object.keys(this.memberGroups).forEach(function (id) {\n var compoundNode = self.idToDummyNode[id]; // Get the dummy compound\n\n tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight);\n\n // Set the width and height of the dummy compound as calculated\n compoundNode.rect.width = tiledZeroDegreePack[id].width;\n compoundNode.rect.height = tiledZeroDegreePack[id].height;\n compoundNode.setCenter(tiledZeroDegreePack[id].centerX, tiledZeroDegreePack[id].centerY);\n\n // compound left and top margings for labels\n // when node labels are included, these values may be set to different values below and are used in tilingPostLayout,\n // otherwise they stay as zero\n compoundNode.labelMarginLeft = 0;\n compoundNode.labelMarginTop = 0;\n\n // Update compound bounds considering its label properties and set label margins for left and top\n if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {\n\n var width = compoundNode.rect.width;\n var height = compoundNode.rect.height;\n\n if (compoundNode.labelWidth) {\n if (compoundNode.labelPosHorizontal == \"left\") {\n compoundNode.rect.x -= compoundNode.labelWidth;\n compoundNode.setWidth(width + compoundNode.labelWidth);\n compoundNode.labelMarginLeft = compoundNode.labelWidth;\n } else if (compoundNode.labelPosHorizontal == \"center\" && compoundNode.labelWidth > width) {\n compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2;\n compoundNode.setWidth(compoundNode.labelWidth);\n compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2;\n } else if (compoundNode.labelPosHorizontal == \"right\") {\n compoundNode.setWidth(width + compoundNode.labelWidth);\n }\n }\n\n if (compoundNode.labelHeight) {\n if (compoundNode.labelPosVertical == \"top\") {\n compoundNode.rect.y -= compoundNode.labelHeight;\n compoundNode.setHeight(height + compoundNode.labelHeight);\n compoundNode.labelMarginTop = compoundNode.labelHeight;\n } else if (compoundNode.labelPosVertical == \"center\" && compoundNode.labelHeight > height) {\n compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2;\n compoundNode.setHeight(compoundNode.labelHeight);\n compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2;\n } else if (compoundNode.labelPosVertical == \"bottom\") {\n compoundNode.setHeight(height + compoundNode.labelHeight);\n }\n }\n }\n });\n};\n\nCoSELayout.prototype.repopulateCompounds = function () {\n for (var i = this.compoundOrder.length - 1; i >= 0; i--) {\n var lCompoundNode = this.compoundOrder[i];\n var id = lCompoundNode.id;\n var horizontalMargin = lCompoundNode.paddingLeft;\n var verticalMargin = lCompoundNode.paddingTop;\n var labelMarginLeft = lCompoundNode.labelMarginLeft;\n var labelMarginTop = lCompoundNode.labelMarginTop;\n\n this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop);\n }\n};\n\nCoSELayout.prototype.repopulateZeroDegreeMembers = function () {\n var self = this;\n var tiledPack = this.tiledZeroDegreePack;\n\n Object.keys(tiledPack).forEach(function (id) {\n var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id\n var horizontalMargin = compoundNode.paddingLeft;\n var verticalMargin = compoundNode.paddingTop;\n var labelMarginLeft = compoundNode.labelMarginLeft;\n var labelMarginTop = compoundNode.labelMarginTop;\n\n // Adjust the positions of nodes wrt its compound\n self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop);\n });\n};\n\nCoSELayout.prototype.getToBeTiled = function (node) {\n var id = node.id;\n //firstly check the previous results\n if (this.toBeTiled[id] != null) {\n return this.toBeTiled[id];\n }\n\n //only compound nodes are to be tiled\n var childGraph = node.getChild();\n if (childGraph == null) {\n this.toBeTiled[id] = false;\n return false;\n }\n\n var children = childGraph.getNodes(); // Get the children nodes\n\n //a compound node is not to be tiled if all of its compound children are not to be tiled\n for (var i = 0; i < children.length; i++) {\n var theChild = children[i];\n\n if (this.getNodeDegree(theChild) > 0) {\n this.toBeTiled[id] = false;\n return false;\n }\n\n //pass the children not having the compound structure\n if (theChild.getChild() == null) {\n this.toBeTiled[theChild.id] = false;\n continue;\n }\n\n if (!this.getToBeTiled(theChild)) {\n this.toBeTiled[id] = false;\n return false;\n }\n }\n this.toBeTiled[id] = true;\n return true;\n};\n\n// Get degree of a node depending of its edges and independent of its children\nCoSELayout.prototype.getNodeDegree = function (node) {\n var id = node.id;\n var edges = node.getEdges();\n var degree = 0;\n\n // For the edges connected\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n if (edge.getSource().id !== edge.getTarget().id) {\n degree = degree + 1;\n }\n }\n return degree;\n};\n\n// Get degree of a node with its children\nCoSELayout.prototype.getNodeDegreeWithChildren = function (node) {\n var degree = this.getNodeDegree(node);\n if (node.getChild() == null) {\n return degree;\n }\n var children = node.getChild().getNodes();\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n degree += this.getNodeDegreeWithChildren(child);\n }\n return degree;\n};\n\nCoSELayout.prototype.performDFSOnCompounds = function () {\n this.compoundOrder = [];\n this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());\n};\n\nCoSELayout.prototype.fillCompexOrderByDFS = function (children) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.getChild() != null) {\n this.fillCompexOrderByDFS(child.getChild().getNodes());\n }\n if (this.getToBeTiled(child)) {\n this.compoundOrder.push(child);\n }\n }\n};\n\n/**\n* This method places each zero degree member wrt given (x,y) coordinates (top left).\n*/\nCoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin, compoundLabelMarginLeft, compoundLabelMarginTop) {\n x += compoundHorizontalMargin + compoundLabelMarginLeft;\n y += compoundVerticalMargin + compoundLabelMarginTop;\n\n var left = x;\n\n for (var i = 0; i < organization.rows.length; i++) {\n var row = organization.rows[i];\n x = left;\n var maxHeight = 0;\n\n for (var j = 0; j < row.length; j++) {\n var lnode = row[j];\n\n lnode.rect.x = x; // + lnode.rect.width / 2;\n lnode.rect.y = y; // + lnode.rect.height / 2;\n\n x += lnode.rect.width + organization.horizontalPadding;\n\n if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height;\n }\n\n y += maxHeight + organization.verticalPadding;\n }\n};\n\nCoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) {\n var self = this;\n this.tiledMemberPack = [];\n\n Object.keys(childGraphMap).forEach(function (id) {\n // Get the compound node\n var compoundNode = idToNode[id];\n\n self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight);\n\n compoundNode.rect.width = self.tiledMemberPack[id].width;\n compoundNode.rect.height = self.tiledMemberPack[id].height;\n compoundNode.setCenter(self.tiledMemberPack[id].centerX, self.tiledMemberPack[id].centerY);\n\n // compound left and top margings for labels\n // when node labels are included, these values may be set to different values below and are used in tilingPostLayout,\n // otherwise they stay as zero\n compoundNode.labelMarginLeft = 0;\n compoundNode.labelMarginTop = 0;\n\n // Update compound bounds considering its label properties and set label margins for left and top\n if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {\n\n var width = compoundNode.rect.width;\n var height = compoundNode.rect.height;\n\n if (compoundNode.labelWidth) {\n if (compoundNode.labelPosHorizontal == \"left\") {\n compoundNode.rect.x -= compoundNode.labelWidth;\n compoundNode.setWidth(width + compoundNode.labelWidth);\n compoundNode.labelMarginLeft = compoundNode.labelWidth;\n } else if (compoundNode.labelPosHorizontal == \"center\" && compoundNode.labelWidth > width) {\n compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2;\n compoundNode.setWidth(compoundNode.labelWidth);\n compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2;\n } else if (compoundNode.labelPosHorizontal == \"right\") {\n compoundNode.setWidth(width + compoundNode.labelWidth);\n }\n }\n\n if (compoundNode.labelHeight) {\n if (compoundNode.labelPosVertical == \"top\") {\n compoundNode.rect.y -= compoundNode.labelHeight;\n compoundNode.setHeight(height + compoundNode.labelHeight);\n compoundNode.labelMarginTop = compoundNode.labelHeight;\n } else if (compoundNode.labelPosVertical == \"center\" && compoundNode.labelHeight > height) {\n compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2;\n compoundNode.setHeight(compoundNode.labelHeight);\n compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2;\n } else if (compoundNode.labelPosVertical == \"bottom\") {\n compoundNode.setHeight(height + compoundNode.labelHeight);\n }\n }\n }\n });\n};\n\nCoSELayout.prototype.tileNodes = function (nodes, minWidth) {\n var horizontalOrg = this.tileNodesByFavoringDim(nodes, minWidth, true);\n var verticalOrg = this.tileNodesByFavoringDim(nodes, minWidth, false);\n\n var horizontalRatio = this.getOrgRatio(horizontalOrg);\n var verticalRatio = this.getOrgRatio(verticalOrg);\n var bestOrg;\n\n // the best ratio is the one that is closer to 1 since the ratios are already normalized\n // and the best organization is the one that has the best ratio\n if (verticalRatio < horizontalRatio) {\n bestOrg = verticalOrg;\n } else {\n bestOrg = horizontalOrg;\n }\n\n return bestOrg;\n};\n\n// get the width/height ratio of the organization that is normalized so that it will not be less than 1\nCoSELayout.prototype.getOrgRatio = function (organization) {\n // get dimensions and calculate the initial ratio\n var width = organization.width;\n var height = organization.height;\n var ratio = width / height;\n\n // if the initial ratio is less then 1 then inverse it\n if (ratio < 1) {\n ratio = 1 / ratio;\n }\n\n // return the normalized ratio\n return ratio;\n};\n\n/*\n * Calculates the ideal width for the rows. This method assumes that\n * each node has the same sizes and calculates the ideal row width that\n * approximates a square shaped complex accordingly. However, since nodes would\n * have different sizes some rows would have different sizes and the resulting\n * shape would not be an exact square.\n */\nCoSELayout.prototype.calcIdealRowWidth = function (members, favorHorizontalDim) {\n // To approximate a square shaped complex we need to make complex width equal to complex height.\n // To achieve this we need to solve the following equation system for hc:\n // (x + bx) * hc - bx = (y + by) * vc - by, hc * vc = n\n // where x is the avarage width of the nodes, y is the avarage height of nodes\n // bx and by are the buffer sizes in horizontal and vertical dimensions accordingly,\n // hc and vc are the number of rows in horizontal and vertical dimensions\n // n is number of members.\n\n var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;\n var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;\n\n // number of members\n var membersSize = members.length;\n\n // sum of the width of all members\n var totalWidth = 0;\n\n // sum of the height of all members\n var totalHeight = 0;\n\n var maxWidth = 0;\n\n // traverse all members to calculate total width and total height and get the maximum members width\n members.forEach(function (node) {\n totalWidth += node.getWidth();\n totalHeight += node.getHeight();\n\n if (node.getWidth() > maxWidth) {\n maxWidth = node.getWidth();\n }\n });\n\n // average width of the members\n var averageWidth = totalWidth / membersSize;\n\n // average height of the members\n var averageHeight = totalHeight / membersSize;\n\n // solving the initial equation system for the hc yields the following second degree equation:\n // hc^2 * (x+bx) + hc * (by - bx) - n * (y + by) = 0\n\n // the delta value to solve the equation above for hc\n var delta = Math.pow(verticalPadding - horizontalPadding, 2) + 4 * (averageWidth + horizontalPadding) * (averageHeight + verticalPadding) * membersSize;\n\n // solve the equation using delta value to calculate the horizontal count\n // that represents the number of nodes in an ideal row\n var horizontalCountDouble = (horizontalPadding - verticalPadding + Math.sqrt(delta)) / (2 * (averageWidth + horizontalPadding));\n // round the calculated horizontal count up or down according to the favored dimension\n var horizontalCount;\n\n if (favorHorizontalDim) {\n horizontalCount = Math.ceil(horizontalCountDouble);\n // if horizontalCount count is not a float value then both of rounding to floor and ceil\n // will yield the same values. Instead of repeating the same calculation try going up\n // while favoring horizontal dimension in such cases\n if (horizontalCount == horizontalCountDouble) {\n horizontalCount++;\n }\n } else {\n horizontalCount = Math.floor(horizontalCountDouble);\n }\n\n // ideal width to be calculated\n var idealWidth = horizontalCount * (averageWidth + horizontalPadding) - horizontalPadding;\n\n // if max width is bigger than calculated ideal width reset ideal width to it\n if (maxWidth > idealWidth) {\n idealWidth = maxWidth;\n }\n\n // add the left-right margins to the ideal row width\n idealWidth += horizontalPadding * 2;\n\n // return the ideal row width1\n return idealWidth;\n};\n\nCoSELayout.prototype.tileNodesByFavoringDim = function (nodes, minWidth, favorHorizontalDim) {\n var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;\n var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;\n var tilingCompareBy = CoSEConstants.TILING_COMPARE_BY;\n var organization = {\n rows: [],\n rowWidth: [],\n rowHeight: [],\n width: 0,\n height: minWidth, // assume minHeight equals to minWidth\n verticalPadding: verticalPadding,\n horizontalPadding: horizontalPadding,\n centerX: 0,\n centerY: 0\n };\n\n if (tilingCompareBy) {\n organization.idealRowWidth = this.calcIdealRowWidth(nodes, favorHorizontalDim);\n }\n\n var getNodeArea = function getNodeArea(n) {\n return n.rect.width * n.rect.height;\n };\n\n var areaCompareFcn = function areaCompareFcn(n1, n2) {\n return getNodeArea(n2) - getNodeArea(n1);\n };\n\n // Sort the nodes in descending order of their areas\n nodes.sort(function (n1, n2) {\n var cmpBy = areaCompareFcn;\n if (organization.idealRowWidth) {\n cmpBy = tilingCompareBy;\n return cmpBy(n1.id, n2.id);\n }\n return cmpBy(n1, n2);\n });\n\n // Create the organization -> calculate compound center\n var sumCenterX = 0;\n var sumCenterY = 0;\n for (var i = 0; i < nodes.length; i++) {\n var lNode = nodes[i];\n\n sumCenterX += lNode.getCenterX();\n sumCenterY += lNode.getCenterY();\n }\n\n organization.centerX = sumCenterX / nodes.length;\n organization.centerY = sumCenterY / nodes.length;\n\n // Create the organization -> tile members\n for (var i = 0; i < nodes.length; i++) {\n var lNode = nodes[i];\n\n if (organization.rows.length == 0) {\n this.insertNodeToRow(organization, lNode, 0, minWidth);\n } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) {\n var rowIndex = organization.rows.length - 1;\n if (!organization.idealRowWidth) {\n rowIndex = this.getShortestRowIndex(organization);\n }\n this.insertNodeToRow(organization, lNode, rowIndex, minWidth);\n } else {\n this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth);\n }\n\n this.shiftToLastRow(organization);\n }\n\n return organization;\n};\n\nCoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) {\n var minCompoundSize = minWidth;\n\n // Add new row if needed\n if (rowIndex == organization.rows.length) {\n var secondDimension = [];\n\n organization.rows.push(secondDimension);\n organization.rowWidth.push(minCompoundSize);\n organization.rowHeight.push(0);\n }\n\n // Update row width\n var w = organization.rowWidth[rowIndex] + node.rect.width;\n\n if (organization.rows[rowIndex].length > 0) {\n w += organization.horizontalPadding;\n }\n\n organization.rowWidth[rowIndex] = w;\n // Update compound width\n if (organization.width < w) {\n organization.width = w;\n }\n\n // Update height\n var h = node.rect.height;\n if (rowIndex > 0) h += organization.verticalPadding;\n\n var extraHeight = 0;\n if (h > organization.rowHeight[rowIndex]) {\n extraHeight = organization.rowHeight[rowIndex];\n organization.rowHeight[rowIndex] = h;\n extraHeight = organization.rowHeight[rowIndex] - extraHeight;\n }\n\n organization.height += extraHeight;\n\n // Insert node\n organization.rows[rowIndex].push(node);\n};\n\n//Scans the rows of an organization and returns the one with the min width\nCoSELayout.prototype.getShortestRowIndex = function (organization) {\n var r = -1;\n var min = Number.MAX_VALUE;\n\n for (var i = 0; i < organization.rows.length; i++) {\n if (organization.rowWidth[i] < min) {\n r = i;\n min = organization.rowWidth[i];\n }\n }\n return r;\n};\n\n//Scans the rows of an organization and returns the one with the max width\nCoSELayout.prototype.getLongestRowIndex = function (organization) {\n var r = -1;\n var max = Number.MIN_VALUE;\n\n for (var i = 0; i < organization.rows.length; i++) {\n\n if (organization.rowWidth[i] > max) {\n r = i;\n max = organization.rowWidth[i];\n }\n }\n\n return r;\n};\n\n/**\n* This method checks whether adding extra width to the organization violates\n* the aspect ratio(1) or not.\n*/\nCoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) {\n\n // if there is an ideal row width specified use it instead of checking the aspect ratio\n if (organization.idealRowWidth) {\n var lastRowIndex = organization.rows.length - 1;\n var lastRowWidth = organization.rowWidth[lastRowIndex];\n\n // check and return if ideal row width will be exceed if the node is added to the row\n return lastRowWidth + extraWidth + organization.horizontalPadding <= organization.idealRowWidth;\n }\n\n var sri = this.getShortestRowIndex(organization);\n\n if (sri < 0) {\n return true;\n }\n\n var min = organization.rowWidth[sri];\n\n if (min + organization.horizontalPadding + extraWidth <= organization.width) return true;\n\n var hDiff = 0;\n\n // Adding to an existing row\n if (organization.rowHeight[sri] < extraHeight) {\n if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri];\n }\n\n var add_to_row_ratio;\n if (organization.width - min >= extraWidth + organization.horizontalPadding) {\n add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding);\n } else {\n add_to_row_ratio = (organization.height + hDiff) / organization.width;\n }\n\n // Adding a new row for this node\n hDiff = extraHeight + organization.verticalPadding;\n var add_new_row_ratio;\n if (organization.width < extraWidth) {\n add_new_row_ratio = (organization.height + hDiff) / extraWidth;\n } else {\n add_new_row_ratio = (organization.height + hDiff) / organization.width;\n }\n\n if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio;\n\n if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio;\n\n return add_to_row_ratio < add_new_row_ratio;\n};\n\n//If moving the last node from the longest row and adding it to the last\n//row makes the bounding box smaller, do it.\nCoSELayout.prototype.shiftToLastRow = function (organization) {\n var longest = this.getLongestRowIndex(organization);\n var last = organization.rowWidth.length - 1;\n var row = organization.rows[longest];\n var node = row[row.length - 1];\n\n var diff = node.width + organization.horizontalPadding;\n\n // Check if there is enough space on the last row\n if (organization.width - organization.rowWidth[last] > diff && longest != last) {\n // Remove the last element of the longest row\n row.splice(-1, 1);\n\n // Push it to the last row\n organization.rows[last].push(node);\n\n organization.rowWidth[longest] = organization.rowWidth[longest] - diff;\n organization.rowWidth[last] = organization.rowWidth[last] + diff;\n organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)];\n\n // Update heights of the organization\n var maxHeight = Number.MIN_VALUE;\n for (var i = 0; i < row.length; i++) {\n if (row[i].height > maxHeight) maxHeight = row[i].height;\n }\n if (longest > 0) maxHeight += organization.verticalPadding;\n\n var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last];\n\n organization.rowHeight[longest] = maxHeight;\n if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding;\n\n var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last];\n organization.height += finalTotal - prevTotal;\n\n this.shiftToLastRow(organization);\n }\n};\n\nCoSELayout.prototype.tilingPreLayout = function () {\n if (CoSEConstants.TILE) {\n // Find zero degree nodes and create a compound for each level\n this.groupZeroDegreeMembers();\n // Tile and clear children of each compound\n this.clearCompounds();\n // Separately tile and clear zero degree nodes for each level\n this.clearZeroDegreeMembers();\n }\n};\n\nCoSELayout.prototype.tilingPostLayout = function () {\n if (CoSEConstants.TILE) {\n this.repopulateZeroDegreeMembers();\n this.repopulateCompounds();\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: Tree Reduction methods\n// -----------------------------------------------------------------------------\n// Reduce trees \nCoSELayout.prototype.reduceTrees = function () {\n var prunedNodesAll = [];\n var containsLeaf = true;\n var node;\n\n while (containsLeaf) {\n var allNodes = this.graphManager.getAllNodes();\n var prunedNodesInStepTemp = [];\n containsLeaf = false;\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) {\n if (CoSEConstants.PURE_INCREMENTAL) {\n var otherEnd = node.getEdges()[0].getOtherEnd(node);\n var relativePosition = new DimensionD(node.getCenterX() - otherEnd.getCenterX(), node.getCenterY() - otherEnd.getCenterY());\n prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner(), relativePosition]);\n } else {\n prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]);\n }\n containsLeaf = true;\n }\n }\n if (containsLeaf == true) {\n var prunedNodesInStep = [];\n for (var j = 0; j < prunedNodesInStepTemp.length; j++) {\n if (prunedNodesInStepTemp[j][0].getEdges().length == 1) {\n prunedNodesInStep.push(prunedNodesInStepTemp[j]);\n prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]);\n }\n }\n prunedNodesAll.push(prunedNodesInStep);\n this.graphManager.resetAllNodes();\n this.graphManager.resetAllEdges();\n }\n }\n this.prunedNodesAll = prunedNodesAll;\n};\n\n// Grow tree one step \nCoSELayout.prototype.growTree = function (prunedNodesAll) {\n var lengthOfPrunedNodesInStep = prunedNodesAll.length;\n var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1];\n\n var nodeData;\n for (var i = 0; i < prunedNodesInStep.length; i++) {\n nodeData = prunedNodesInStep[i];\n\n this.findPlaceforPrunedNode(nodeData);\n\n nodeData[2].add(nodeData[0]);\n nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target);\n }\n\n prunedNodesAll.splice(prunedNodesAll.length - 1, 1);\n this.graphManager.resetAllNodes();\n this.graphManager.resetAllEdges();\n};\n\n// Find an appropriate position to replace pruned node, this method can be improved\nCoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) {\n\n var gridForPrunedNode;\n var nodeToConnect;\n var prunedNode = nodeData[0];\n if (prunedNode == nodeData[1].source) {\n nodeToConnect = nodeData[1].target;\n } else {\n nodeToConnect = nodeData[1].source;\n }\n\n if (CoSEConstants.PURE_INCREMENTAL) {\n prunedNode.setCenter(nodeToConnect.getCenterX() + nodeData[3].getWidth(), nodeToConnect.getCenterY() + nodeData[3].getHeight());\n } else {\n var startGridX = nodeToConnect.startX;\n var finishGridX = nodeToConnect.finishX;\n var startGridY = nodeToConnect.startY;\n var finishGridY = nodeToConnect.finishY;\n\n var upNodeCount = 0;\n var downNodeCount = 0;\n var rightNodeCount = 0;\n var leftNodeCount = 0;\n var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount];\n\n if (startGridY > 0) {\n for (var i = startGridX; i <= finishGridX; i++) {\n controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1;\n }\n }\n if (finishGridX < this.grid.length - 1) {\n for (var i = startGridY; i <= finishGridY; i++) {\n controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1;\n }\n }\n if (finishGridY < this.grid[0].length - 1) {\n for (var i = startGridX; i <= finishGridX; i++) {\n controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1;\n }\n }\n if (startGridX > 0) {\n for (var i = startGridY; i <= finishGridY; i++) {\n controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1;\n }\n }\n var min = Integer.MAX_VALUE;\n var minCount;\n var minIndex;\n for (var j = 0; j < controlRegions.length; j++) {\n if (controlRegions[j] < min) {\n min = controlRegions[j];\n minCount = 1;\n minIndex = j;\n } else if (controlRegions[j] == min) {\n minCount++;\n }\n }\n\n if (minCount == 3 && min == 0) {\n if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) {\n gridForPrunedNode = 1;\n } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 0;\n } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 3;\n } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 2;\n }\n } else if (minCount == 2 && min == 0) {\n var random = Math.floor(Math.random() * 2);\n if (controlRegions[0] == 0 && controlRegions[1] == 0) {\n ;\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 1;\n }\n } else if (controlRegions[0] == 0 && controlRegions[2] == 0) {\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 2;\n }\n } else if (controlRegions[0] == 0 && controlRegions[3] == 0) {\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 3;\n }\n } else if (controlRegions[1] == 0 && controlRegions[2] == 0) {\n if (random == 0) {\n gridForPrunedNode = 1;\n } else {\n gridForPrunedNode = 2;\n }\n } else if (controlRegions[1] == 0 && controlRegions[3] == 0) {\n if (random == 0) {\n gridForPrunedNode = 1;\n } else {\n gridForPrunedNode = 3;\n }\n } else {\n if (random == 0) {\n gridForPrunedNode = 2;\n } else {\n gridForPrunedNode = 3;\n }\n }\n } else if (minCount == 4 && min == 0) {\n var random = Math.floor(Math.random() * 4);\n gridForPrunedNode = random;\n } else {\n gridForPrunedNode = minIndex;\n }\n\n if (gridForPrunedNode == 0) {\n prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2);\n } else if (gridForPrunedNode == 1) {\n prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY());\n } else if (gridForPrunedNode == 2) {\n prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2);\n } else {\n prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY());\n }\n }\n};\n\nmodule.exports = CoSELayout;\n\n/***/ }),\n\n/***/ 991:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar FDLayoutNode = __webpack_require__(551).FDLayoutNode;\nvar IMath = __webpack_require__(551).IMath;\n\nfunction CoSENode(gm, loc, size, vNode) {\n FDLayoutNode.call(this, gm, loc, size, vNode);\n}\n\nCoSENode.prototype = Object.create(FDLayoutNode.prototype);\nfor (var prop in FDLayoutNode) {\n CoSENode[prop] = FDLayoutNode[prop];\n}\n\nCoSENode.prototype.calculateDisplacement = function () {\n var layout = this.graphManager.getLayout();\n // this check is for compound nodes that contain fixed nodes\n if (this.getChild() != null && this.fixedNodeWeight) {\n this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight;\n this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight;\n } else {\n this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren;\n this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren;\n }\n\n if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) {\n this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX);\n }\n\n if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) {\n this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY);\n }\n\n // non-empty compound node, propogate movement to children as well\n if (this.child && this.child.getNodes().length > 0) {\n this.propogateDisplacementToChildren(this.displacementX, this.displacementY);\n }\n};\n\nCoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) {\n var nodes = this.getChild().getNodes();\n var node;\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n if (node.getChild() == null) {\n node.displacementX += dX;\n node.displacementY += dY;\n } else {\n node.propogateDisplacementToChildren(dX, dY);\n }\n }\n};\n\nCoSENode.prototype.move = function () {\n var layout = this.graphManager.getLayout();\n\n // a simple node or an empty compound node, move it\n if (this.child == null || this.child.getNodes().length == 0) {\n this.moveBy(this.displacementX, this.displacementY);\n\n layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY);\n }\n\n this.springForceX = 0;\n this.springForceY = 0;\n this.repulsionForceX = 0;\n this.repulsionForceY = 0;\n this.gravitationForceX = 0;\n this.gravitationForceY = 0;\n this.displacementX = 0;\n this.displacementY = 0;\n};\n\nCoSENode.prototype.setPred1 = function (pred1) {\n this.pred1 = pred1;\n};\n\nCoSENode.prototype.getPred1 = function () {\n return pred1;\n};\n\nCoSENode.prototype.getPred2 = function () {\n return pred2;\n};\n\nCoSENode.prototype.setNext = function (next) {\n this.next = next;\n};\n\nCoSENode.prototype.getNext = function () {\n return next;\n};\n\nCoSENode.prototype.setProcessed = function (processed) {\n this.processed = processed;\n};\n\nCoSENode.prototype.isProcessed = function () {\n return processed;\n};\n\nmodule.exports = CoSENode;\n\n/***/ }),\n\n/***/ 902:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar CoSEConstants = __webpack_require__(806);\nvar LinkedList = __webpack_require__(551).LinkedList;\nvar Matrix = __webpack_require__(551).Matrix;\nvar SVD = __webpack_require__(551).SVD;\n\nfunction ConstraintHandler() {}\n\nConstraintHandler.handleConstraints = function (layout) {\n // let layout = this.graphManager.getLayout();\n\n // get constraints from layout\n var constraints = {};\n constraints.fixedNodeConstraint = layout.constraints.fixedNodeConstraint;\n constraints.alignmentConstraint = layout.constraints.alignmentConstraint;\n constraints.relativePlacementConstraint = layout.constraints.relativePlacementConstraint;\n\n var idToNodeMap = new Map();\n var nodeIndexes = new Map();\n var xCoords = [];\n var yCoords = [];\n\n var allNodes = layout.getAllNodes();\n var index = 0;\n // fill index map and coordinates\n for (var i = 0; i < allNodes.length; i++) {\n var node = allNodes[i];\n if (node.getChild() == null) {\n nodeIndexes.set(node.id, index++);\n xCoords.push(node.getCenterX());\n yCoords.push(node.getCenterY());\n idToNodeMap.set(node.id, node);\n }\n }\n\n // if there exists relative placement constraint without gap value, set it to default \n if (constraints.relativePlacementConstraint) {\n constraints.relativePlacementConstraint.forEach(function (constraint) {\n if (!constraint.gap && constraint.gap != 0) {\n if (constraint.left) {\n constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.left).getWidth() / 2 + idToNodeMap.get(constraint.right).getWidth() / 2;\n } else {\n constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.top).getHeight() / 2 + idToNodeMap.get(constraint.bottom).getHeight() / 2;\n }\n }\n });\n }\n\n /* auxiliary functions */\n\n // calculate difference between two position objects\n var calculatePositionDiff = function calculatePositionDiff(pos1, pos2) {\n return { x: pos1.x - pos2.x, y: pos1.y - pos2.y };\n };\n\n // calculate average position of the nodes\n var calculateAvgPosition = function calculateAvgPosition(nodeIdSet) {\n var xPosSum = 0;\n var yPosSum = 0;\n nodeIdSet.forEach(function (nodeId) {\n xPosSum += xCoords[nodeIndexes.get(nodeId)];\n yPosSum += yCoords[nodeIndexes.get(nodeId)];\n });\n\n return { x: xPosSum / nodeIdSet.size, y: yPosSum / nodeIdSet.size };\n };\n\n // find an appropriate positioning for the nodes in a given graph according to relative placement constraints\n // this function also takes the fixed nodes and alignment constraints into account\n // graph: dag to be evaluated, direction: \"horizontal\" or \"vertical\", \n // fixedNodes: set of fixed nodes to consider during evaluation, dummyPositions: appropriate coordinates of the dummy nodes \n var findAppropriatePositionForRelativePlacement = function findAppropriatePositionForRelativePlacement(graph, direction, fixedNodes, dummyPositions, componentSources) {\n\n // find union of two sets\n function setUnion(setA, setB) {\n var union = new Set(setA);\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = setB[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var elem = _step.value;\n\n union.add(elem);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return union;\n }\n\n // find indegree count for each node\n var inDegrees = new Map();\n\n graph.forEach(function (value, key) {\n inDegrees.set(key, 0);\n });\n graph.forEach(function (value, key) {\n value.forEach(function (adjacent) {\n inDegrees.set(adjacent.id, inDegrees.get(adjacent.id) + 1);\n });\n });\n\n var positionMap = new Map(); // keeps the position for each node\n var pastMap = new Map(); // keeps the predecessors(past) of a node\n var queue = new LinkedList();\n inDegrees.forEach(function (value, key) {\n if (value == 0) {\n queue.push(key);\n if (!fixedNodes) {\n if (direction == \"horizontal\") {\n positionMap.set(key, nodeIndexes.has(key) ? xCoords[nodeIndexes.get(key)] : dummyPositions.get(key));\n } else {\n positionMap.set(key, nodeIndexes.has(key) ? yCoords[nodeIndexes.get(key)] : dummyPositions.get(key));\n }\n }\n } else {\n positionMap.set(key, Number.NEGATIVE_INFINITY);\n }\n if (fixedNodes) {\n pastMap.set(key, new Set([key]));\n }\n });\n\n // align sources of each component in enforcement phase\n if (fixedNodes) {\n componentSources.forEach(function (component) {\n var fixedIds = [];\n component.forEach(function (nodeId) {\n if (fixedNodes.has(nodeId)) {\n fixedIds.push(nodeId);\n }\n });\n if (fixedIds.length > 0) {\n var position = 0;\n fixedIds.forEach(function (fixedId) {\n if (direction == \"horizontal\") {\n positionMap.set(fixedId, nodeIndexes.has(fixedId) ? xCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId));\n position += positionMap.get(fixedId);\n } else {\n positionMap.set(fixedId, nodeIndexes.has(fixedId) ? yCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId));\n position += positionMap.get(fixedId);\n }\n });\n position = position / fixedIds.length;\n component.forEach(function (nodeId) {\n if (!fixedNodes.has(nodeId)) {\n positionMap.set(nodeId, position);\n }\n });\n } else {\n var _position = 0;\n component.forEach(function (nodeId) {\n if (direction == \"horizontal\") {\n _position += nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);\n } else {\n _position += nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);\n }\n });\n _position = _position / component.length;\n component.forEach(function (nodeId) {\n positionMap.set(nodeId, _position);\n });\n }\n });\n }\n\n // calculate positions of the nodes\n\n var _loop = function _loop() {\n var currentNode = queue.shift();\n var neighbors = graph.get(currentNode);\n neighbors.forEach(function (neighbor) {\n if (positionMap.get(neighbor.id) < positionMap.get(currentNode) + neighbor.gap) {\n if (fixedNodes && fixedNodes.has(neighbor.id)) {\n var fixedPosition = void 0;\n if (direction == \"horizontal\") {\n fixedPosition = nodeIndexes.has(neighbor.id) ? xCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id);\n } else {\n fixedPosition = nodeIndexes.has(neighbor.id) ? yCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id);\n }\n positionMap.set(neighbor.id, fixedPosition); // TODO: may do unnecessary work\n if (fixedPosition < positionMap.get(currentNode) + neighbor.gap) {\n var diff = positionMap.get(currentNode) + neighbor.gap - fixedPosition;\n pastMap.get(currentNode).forEach(function (nodeId) {\n positionMap.set(nodeId, positionMap.get(nodeId) - diff);\n });\n }\n } else {\n positionMap.set(neighbor.id, positionMap.get(currentNode) + neighbor.gap);\n }\n }\n inDegrees.set(neighbor.id, inDegrees.get(neighbor.id) - 1);\n if (inDegrees.get(neighbor.id) == 0) {\n queue.push(neighbor.id);\n }\n if (fixedNodes) {\n pastMap.set(neighbor.id, setUnion(pastMap.get(currentNode), pastMap.get(neighbor.id)));\n }\n });\n };\n\n while (queue.length != 0) {\n _loop();\n }\n\n // readjust position of the nodes after enforcement\n if (fixedNodes) {\n // find indegree count for each node\n var sinkNodes = new Set();\n\n graph.forEach(function (value, key) {\n if (value.length == 0) {\n sinkNodes.add(key);\n }\n });\n\n var _components = [];\n pastMap.forEach(function (value, key) {\n if (sinkNodes.has(key)) {\n var isFixedComponent = false;\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var nodeId = _step2.value;\n\n if (fixedNodes.has(nodeId)) {\n isFixedComponent = true;\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n if (!isFixedComponent) {\n var isExist = false;\n var existAt = void 0;\n _components.forEach(function (component, index) {\n if (component.has([].concat(_toConsumableArray(value))[0])) {\n isExist = true;\n existAt = index;\n }\n });\n if (!isExist) {\n _components.push(new Set(value));\n } else {\n value.forEach(function (ele) {\n _components[existAt].add(ele);\n });\n }\n }\n }\n });\n\n _components.forEach(function (component, index) {\n var minBefore = Number.POSITIVE_INFINITY;\n var minAfter = Number.POSITIVE_INFINITY;\n var maxBefore = Number.NEGATIVE_INFINITY;\n var maxAfter = Number.NEGATIVE_INFINITY;\n\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = component[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var nodeId = _step3.value;\n\n var posBefore = void 0;\n if (direction == \"horizontal\") {\n posBefore = nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);\n } else {\n posBefore = nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);\n }\n var posAfter = positionMap.get(nodeId);\n if (posBefore < minBefore) {\n minBefore = posBefore;\n }\n if (posBefore > maxBefore) {\n maxBefore = posBefore;\n }\n if (posAfter < minAfter) {\n minAfter = posAfter;\n }\n if (posAfter > maxAfter) {\n maxAfter = posAfter;\n }\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n var diff = (minBefore + maxBefore) / 2 - (minAfter + maxAfter) / 2;\n\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = component[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var _nodeId = _step4.value;\n\n positionMap.set(_nodeId, positionMap.get(_nodeId) + diff);\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n });\n }\n\n return positionMap;\n };\n\n // find transformation based on rel. placement constraints if there are both alignment and rel. placement constraints\n // or if there are only rel. placement contraints where the largest component isn't sufficiently large\n var applyReflectionForRelativePlacement = function applyReflectionForRelativePlacement(relativePlacementConstraints) {\n // variables to count votes\n var reflectOnY = 0,\n notReflectOnY = 0;\n var reflectOnX = 0,\n notReflectOnX = 0;\n\n relativePlacementConstraints.forEach(function (constraint) {\n if (constraint.left) {\n xCoords[nodeIndexes.get(constraint.left)] - xCoords[nodeIndexes.get(constraint.right)] >= 0 ? reflectOnY++ : notReflectOnY++;\n } else {\n yCoords[nodeIndexes.get(constraint.top)] - yCoords[nodeIndexes.get(constraint.bottom)] >= 0 ? reflectOnX++ : notReflectOnX++;\n }\n });\n\n if (reflectOnY > notReflectOnY && reflectOnX > notReflectOnX) {\n for (var _i = 0; _i < nodeIndexes.size; _i++) {\n xCoords[_i] = -1 * xCoords[_i];\n yCoords[_i] = -1 * yCoords[_i];\n }\n } else if (reflectOnY > notReflectOnY) {\n for (var _i2 = 0; _i2 < nodeIndexes.size; _i2++) {\n xCoords[_i2] = -1 * xCoords[_i2];\n }\n } else if (reflectOnX > notReflectOnX) {\n for (var _i3 = 0; _i3 < nodeIndexes.size; _i3++) {\n yCoords[_i3] = -1 * yCoords[_i3];\n }\n }\n };\n\n // find weakly connected components in undirected graph\n var findComponents = function findComponents(graph) {\n // find weakly connected components in dag\n var components = [];\n var queue = new LinkedList();\n var visited = new Set();\n var count = 0;\n\n graph.forEach(function (value, key) {\n if (!visited.has(key)) {\n components[count] = [];\n var _currentNode = key;\n queue.push(_currentNode);\n visited.add(_currentNode);\n components[count].push(_currentNode);\n\n while (queue.length != 0) {\n _currentNode = queue.shift();\n var neighbors = graph.get(_currentNode);\n neighbors.forEach(function (neighbor) {\n if (!visited.has(neighbor.id)) {\n queue.push(neighbor.id);\n visited.add(neighbor.id);\n components[count].push(neighbor.id);\n }\n });\n }\n count++;\n }\n });\n return components;\n };\n\n // return undirected version of given dag\n var dagToUndirected = function dagToUndirected(dag) {\n var undirected = new Map();\n\n dag.forEach(function (value, key) {\n undirected.set(key, []);\n });\n\n dag.forEach(function (value, key) {\n value.forEach(function (adjacent) {\n undirected.get(key).push(adjacent);\n undirected.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction });\n });\n });\n\n return undirected;\n };\n\n // return reversed (directions inverted) version of given dag\n var dagToReversed = function dagToReversed(dag) {\n var reversed = new Map();\n\n dag.forEach(function (value, key) {\n reversed.set(key, []);\n });\n\n dag.forEach(function (value, key) {\n value.forEach(function (adjacent) {\n reversed.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction });\n });\n });\n\n return reversed;\n };\n\n /**** apply transformation to the initial draft layout to better align with constrained nodes ****/\n // solve the Orthogonal Procrustean Problem to rotate and/or reflect initial draft layout\n // here we follow the solution in Chapter 20.2 of Borg, I. & Groenen, P. (2005) Modern Multidimensional Scaling: Theory and Applications \n\n /* construct source and target configurations */\n\n var targetMatrix = []; // A - target configuration\n var sourceMatrix = []; // B - source configuration \n var standardTransformation = false; // false for no transformation, true for standart (Procrustes) transformation (rotation and/or reflection)\n var reflectionType = false; // false/true for reflection check, 'reflectOnX', 'reflectOnY' or 'reflectOnBoth' for reflection type if necessary\n var fixedNodes = new Set();\n var dag = new Map(); // adjacency list to keep directed acyclic graph (dag) that consists of relative placement constraints\n var dagUndirected = new Map(); // undirected version of the dag\n var components = []; // weakly connected components\n\n // fill fixedNodes collection to use later\n if (constraints.fixedNodeConstraint) {\n constraints.fixedNodeConstraint.forEach(function (nodeData) {\n fixedNodes.add(nodeData.nodeId);\n });\n }\n\n // construct dag from relative placement constraints \n if (constraints.relativePlacementConstraint) {\n // construct both directed and undirected version of the dag\n constraints.relativePlacementConstraint.forEach(function (constraint) {\n if (constraint.left) {\n if (dag.has(constraint.left)) {\n dag.get(constraint.left).push({ id: constraint.right, gap: constraint.gap, direction: \"horizontal\" });\n } else {\n dag.set(constraint.left, [{ id: constraint.right, gap: constraint.gap, direction: \"horizontal\" }]);\n }\n if (!dag.has(constraint.right)) {\n dag.set(constraint.right, []);\n }\n } else {\n if (dag.has(constraint.top)) {\n dag.get(constraint.top).push({ id: constraint.bottom, gap: constraint.gap, direction: \"vertical\" });\n } else {\n dag.set(constraint.top, [{ id: constraint.bottom, gap: constraint.gap, direction: \"vertical\" }]);\n }\n if (!dag.has(constraint.bottom)) {\n dag.set(constraint.bottom, []);\n }\n }\n });\n\n dagUndirected = dagToUndirected(dag);\n components = findComponents(dagUndirected);\n }\n\n if (CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING) {\n // first check fixed node constraint\n if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 1) {\n constraints.fixedNodeConstraint.forEach(function (nodeData, i) {\n targetMatrix[i] = [nodeData.position.x, nodeData.position.y];\n sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeData.nodeId)], yCoords[nodeIndexes.get(nodeData.nodeId)]];\n });\n standardTransformation = true;\n } else if (constraints.alignmentConstraint) {\n (function () {\n // then check alignment constraint\n var count = 0;\n if (constraints.alignmentConstraint.vertical) {\n var verticalAlign = constraints.alignmentConstraint.vertical;\n\n var _loop2 = function _loop2(_i4) {\n var alignmentSet = new Set();\n verticalAlign[_i4].forEach(function (nodeId) {\n alignmentSet.add(nodeId);\n });\n var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {\n return fixedNodes.has(x);\n }));\n var xPos = void 0;\n if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x;\n\n verticalAlign[_i4].forEach(function (nodeId) {\n targetMatrix[count] = [xPos, yCoords[nodeIndexes.get(nodeId)]];\n sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];\n count++;\n });\n };\n\n for (var _i4 = 0; _i4 < verticalAlign.length; _i4++) {\n _loop2(_i4);\n }\n standardTransformation = true;\n }\n if (constraints.alignmentConstraint.horizontal) {\n var horizontalAlign = constraints.alignmentConstraint.horizontal;\n\n var _loop3 = function _loop3(_i5) {\n var alignmentSet = new Set();\n horizontalAlign[_i5].forEach(function (nodeId) {\n alignmentSet.add(nodeId);\n });\n var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {\n return fixedNodes.has(x);\n }));\n var yPos = void 0;\n if (intersection.size > 0) yPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y;\n\n horizontalAlign[_i5].forEach(function (nodeId) {\n targetMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yPos];\n sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];\n count++;\n });\n };\n\n for (var _i5 = 0; _i5 < horizontalAlign.length; _i5++) {\n _loop3(_i5);\n }\n standardTransformation = true;\n }\n if (constraints.relativePlacementConstraint) {\n reflectionType = true;\n }\n })();\n } else if (constraints.relativePlacementConstraint) {\n // finally check relative placement constraint\n // find largest component in dag\n var largestComponentSize = 0;\n var largestComponentIndex = 0;\n for (var _i6 = 0; _i6 < components.length; _i6++) {\n if (components[_i6].length > largestComponentSize) {\n largestComponentSize = components[_i6].length;\n largestComponentIndex = _i6;\n }\n }\n // if largest component isn't dominant, then take the votes for reflection\n if (largestComponentSize < dagUndirected.size / 2) {\n applyReflectionForRelativePlacement(constraints.relativePlacementConstraint);\n standardTransformation = false;\n reflectionType = false;\n } else {\n // use largest component for transformation\n // construct horizontal and vertical subgraphs in the largest component\n var subGraphOnHorizontal = new Map();\n var subGraphOnVertical = new Map();\n var constraintsInlargestComponent = [];\n\n components[largestComponentIndex].forEach(function (nodeId) {\n dag.get(nodeId).forEach(function (adjacent) {\n if (adjacent.direction == \"horizontal\") {\n if (subGraphOnHorizontal.has(nodeId)) {\n subGraphOnHorizontal.get(nodeId).push(adjacent);\n } else {\n subGraphOnHorizontal.set(nodeId, [adjacent]);\n }\n if (!subGraphOnHorizontal.has(adjacent.id)) {\n subGraphOnHorizontal.set(adjacent.id, []);\n }\n constraintsInlargestComponent.push({ left: nodeId, right: adjacent.id });\n } else {\n if (subGraphOnVertical.has(nodeId)) {\n subGraphOnVertical.get(nodeId).push(adjacent);\n } else {\n subGraphOnVertical.set(nodeId, [adjacent]);\n }\n if (!subGraphOnVertical.has(adjacent.id)) {\n subGraphOnVertical.set(adjacent.id, []);\n }\n constraintsInlargestComponent.push({ top: nodeId, bottom: adjacent.id });\n }\n });\n });\n\n applyReflectionForRelativePlacement(constraintsInlargestComponent);\n reflectionType = false;\n\n // calculate appropriate positioning for subgraphs\n var positionMapHorizontal = findAppropriatePositionForRelativePlacement(subGraphOnHorizontal, \"horizontal\");\n var positionMapVertical = findAppropriatePositionForRelativePlacement(subGraphOnVertical, \"vertical\");\n\n // construct source and target configuration\n components[largestComponentIndex].forEach(function (nodeId, i) {\n sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];\n targetMatrix[i] = [];\n if (positionMapHorizontal.has(nodeId)) {\n targetMatrix[i][0] = positionMapHorizontal.get(nodeId);\n } else {\n targetMatrix[i][0] = xCoords[nodeIndexes.get(nodeId)];\n }\n if (positionMapVertical.has(nodeId)) {\n targetMatrix[i][1] = positionMapVertical.get(nodeId);\n } else {\n targetMatrix[i][1] = yCoords[nodeIndexes.get(nodeId)];\n }\n });\n\n standardTransformation = true;\n }\n }\n\n // if transformation is required, then calculate and apply transformation matrix\n if (standardTransformation) {\n /* calculate transformation matrix */\n var transformationMatrix = void 0;\n var targetMatrixTranspose = Matrix.transpose(targetMatrix); // A'\n var sourceMatrixTranspose = Matrix.transpose(sourceMatrix); // B'\n\n // centralize transpose matrices\n for (var _i7 = 0; _i7 < targetMatrixTranspose.length; _i7++) {\n targetMatrixTranspose[_i7] = Matrix.multGamma(targetMatrixTranspose[_i7]);\n sourceMatrixTranspose[_i7] = Matrix.multGamma(sourceMatrixTranspose[_i7]);\n }\n\n // do actual calculation for transformation matrix\n var tempMatrix = Matrix.multMat(targetMatrixTranspose, Matrix.transpose(sourceMatrixTranspose)); // tempMatrix = A'B\n var SVDResult = SVD.svd(tempMatrix); // SVD(A'B) = USV', svd function returns U, S and V \n transformationMatrix = Matrix.multMat(SVDResult.V, Matrix.transpose(SVDResult.U)); // transformationMatrix = T = VU'\n\n /* apply found transformation matrix to obtain final draft layout */\n for (var _i8 = 0; _i8 < nodeIndexes.size; _i8++) {\n var temp1 = [xCoords[_i8], yCoords[_i8]];\n var temp2 = [transformationMatrix[0][0], transformationMatrix[1][0]];\n var temp3 = [transformationMatrix[0][1], transformationMatrix[1][1]];\n xCoords[_i8] = Matrix.dotProduct(temp1, temp2);\n yCoords[_i8] = Matrix.dotProduct(temp1, temp3);\n }\n\n // applied only both alignment and rel. placement constraints exist\n if (reflectionType) {\n applyReflectionForRelativePlacement(constraints.relativePlacementConstraint);\n }\n }\n }\n\n if (CoSEConstants.ENFORCE_CONSTRAINTS) {\n /**** enforce constraints on the transformed draft layout ****/\n\n /* first enforce fixed node constraint */\n\n if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 0) {\n var translationAmount = { x: 0, y: 0 };\n constraints.fixedNodeConstraint.forEach(function (nodeData, i) {\n var posInTheory = { x: xCoords[nodeIndexes.get(nodeData.nodeId)], y: yCoords[nodeIndexes.get(nodeData.nodeId)] };\n var posDesired = nodeData.position;\n var posDiff = calculatePositionDiff(posDesired, posInTheory);\n translationAmount.x += posDiff.x;\n translationAmount.y += posDiff.y;\n });\n translationAmount.x /= constraints.fixedNodeConstraint.length;\n translationAmount.y /= constraints.fixedNodeConstraint.length;\n\n xCoords.forEach(function (value, i) {\n xCoords[i] += translationAmount.x;\n });\n\n yCoords.forEach(function (value, i) {\n yCoords[i] += translationAmount.y;\n });\n\n constraints.fixedNodeConstraint.forEach(function (nodeData) {\n xCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.x;\n yCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.y;\n });\n }\n\n /* then enforce alignment constraint */\n\n if (constraints.alignmentConstraint) {\n if (constraints.alignmentConstraint.vertical) {\n var xAlign = constraints.alignmentConstraint.vertical;\n\n var _loop4 = function _loop4(_i9) {\n var alignmentSet = new Set();\n xAlign[_i9].forEach(function (nodeId) {\n alignmentSet.add(nodeId);\n });\n var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {\n return fixedNodes.has(x);\n }));\n var xPos = void 0;\n if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x;\n\n alignmentSet.forEach(function (nodeId) {\n if (!fixedNodes.has(nodeId)) xCoords[nodeIndexes.get(nodeId)] = xPos;\n });\n };\n\n for (var _i9 = 0; _i9 < xAlign.length; _i9++) {\n _loop4(_i9);\n }\n }\n if (constraints.alignmentConstraint.horizontal) {\n var yAlign = constraints.alignmentConstraint.horizontal;\n\n var _loop5 = function _loop5(_i10) {\n var alignmentSet = new Set();\n yAlign[_i10].forEach(function (nodeId) {\n alignmentSet.add(nodeId);\n });\n var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {\n return fixedNodes.has(x);\n }));\n var yPos = void 0;\n if (intersection.size > 0) yPos = yCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y;\n\n alignmentSet.forEach(function (nodeId) {\n if (!fixedNodes.has(nodeId)) yCoords[nodeIndexes.get(nodeId)] = yPos;\n });\n };\n\n for (var _i10 = 0; _i10 < yAlign.length; _i10++) {\n _loop5(_i10);\n }\n }\n }\n\n /* finally enforce relative placement constraint */\n\n if (constraints.relativePlacementConstraint) {\n (function () {\n var nodeToDummyForVerticalAlignment = new Map();\n var nodeToDummyForHorizontalAlignment = new Map();\n var dummyToNodeForVerticalAlignment = new Map();\n var dummyToNodeForHorizontalAlignment = new Map();\n var dummyPositionsForVerticalAlignment = new Map();\n var dummyPositionsForHorizontalAlignment = new Map();\n var fixedNodesOnHorizontal = new Set();\n var fixedNodesOnVertical = new Set();\n\n // fill maps and sets \n fixedNodes.forEach(function (nodeId) {\n fixedNodesOnHorizontal.add(nodeId);\n fixedNodesOnVertical.add(nodeId);\n });\n\n if (constraints.alignmentConstraint) {\n if (constraints.alignmentConstraint.vertical) {\n var verticalAlignment = constraints.alignmentConstraint.vertical;\n\n var _loop6 = function _loop6(_i11) {\n dummyToNodeForVerticalAlignment.set(\"dummy\" + _i11, []);\n verticalAlignment[_i11].forEach(function (nodeId) {\n nodeToDummyForVerticalAlignment.set(nodeId, \"dummy\" + _i11);\n dummyToNodeForVerticalAlignment.get(\"dummy\" + _i11).push(nodeId);\n if (fixedNodes.has(nodeId)) {\n fixedNodesOnHorizontal.add(\"dummy\" + _i11);\n }\n });\n dummyPositionsForVerticalAlignment.set(\"dummy\" + _i11, xCoords[nodeIndexes.get(verticalAlignment[_i11][0])]);\n };\n\n for (var _i11 = 0; _i11 < verticalAlignment.length; _i11++) {\n _loop6(_i11);\n }\n }\n if (constraints.alignmentConstraint.horizontal) {\n var horizontalAlignment = constraints.alignmentConstraint.horizontal;\n\n var _loop7 = function _loop7(_i12) {\n dummyToNodeForHorizontalAlignment.set(\"dummy\" + _i12, []);\n horizontalAlignment[_i12].forEach(function (nodeId) {\n nodeToDummyForHorizontalAlignment.set(nodeId, \"dummy\" + _i12);\n dummyToNodeForHorizontalAlignment.get(\"dummy\" + _i12).push(nodeId);\n if (fixedNodes.has(nodeId)) {\n fixedNodesOnVertical.add(\"dummy\" + _i12);\n }\n });\n dummyPositionsForHorizontalAlignment.set(\"dummy\" + _i12, yCoords[nodeIndexes.get(horizontalAlignment[_i12][0])]);\n };\n\n for (var _i12 = 0; _i12 < horizontalAlignment.length; _i12++) {\n _loop7(_i12);\n }\n }\n }\n\n // construct horizontal and vertical dags (subgraphs) from overall dag\n var dagOnHorizontal = new Map();\n var dagOnVertical = new Map();\n\n var _loop8 = function _loop8(nodeId) {\n dag.get(nodeId).forEach(function (adjacent) {\n var sourceId = void 0;\n var targetNode = void 0;\n if (adjacent[\"direction\"] == \"horizontal\") {\n sourceId = nodeToDummyForVerticalAlignment.get(nodeId) ? nodeToDummyForVerticalAlignment.get(nodeId) : nodeId;\n if (nodeToDummyForVerticalAlignment.get(adjacent.id)) {\n targetNode = { id: nodeToDummyForVerticalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction };\n } else {\n targetNode = adjacent;\n }\n if (dagOnHorizontal.has(sourceId)) {\n dagOnHorizontal.get(sourceId).push(targetNode);\n } else {\n dagOnHorizontal.set(sourceId, [targetNode]);\n }\n if (!dagOnHorizontal.has(targetNode.id)) {\n dagOnHorizontal.set(targetNode.id, []);\n }\n } else {\n sourceId = nodeToDummyForHorizontalAlignment.get(nodeId) ? nodeToDummyForHorizontalAlignment.get(nodeId) : nodeId;\n if (nodeToDummyForHorizontalAlignment.get(adjacent.id)) {\n targetNode = { id: nodeToDummyForHorizontalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction };\n } else {\n targetNode = adjacent;\n }\n if (dagOnVertical.has(sourceId)) {\n dagOnVertical.get(sourceId).push(targetNode);\n } else {\n dagOnVertical.set(sourceId, [targetNode]);\n }\n if (!dagOnVertical.has(targetNode.id)) {\n dagOnVertical.set(targetNode.id, []);\n }\n }\n });\n };\n\n var _iteratorNormalCompletion5 = true;\n var _didIteratorError5 = false;\n var _iteratorError5 = undefined;\n\n try {\n for (var _iterator5 = dag.keys()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n var nodeId = _step5.value;\n\n _loop8(nodeId);\n }\n\n // find source nodes of each component in horizontal and vertical dags\n } catch (err) {\n _didIteratorError5 = true;\n _iteratorError5 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion5 && _iterator5.return) {\n _iterator5.return();\n }\n } finally {\n if (_didIteratorError5) {\n throw _iteratorError5;\n }\n }\n }\n\n var undirectedOnHorizontal = dagToUndirected(dagOnHorizontal);\n var undirectedOnVertical = dagToUndirected(dagOnVertical);\n var componentsOnHorizontal = findComponents(undirectedOnHorizontal);\n var componentsOnVertical = findComponents(undirectedOnVertical);\n var reversedDagOnHorizontal = dagToReversed(dagOnHorizontal);\n var reversedDagOnVertical = dagToReversed(dagOnVertical);\n var componentSourcesOnHorizontal = [];\n var componentSourcesOnVertical = [];\n\n componentsOnHorizontal.forEach(function (component, index) {\n componentSourcesOnHorizontal[index] = [];\n component.forEach(function (nodeId) {\n if (reversedDagOnHorizontal.get(nodeId).length == 0) {\n componentSourcesOnHorizontal[index].push(nodeId);\n }\n });\n });\n\n componentsOnVertical.forEach(function (component, index) {\n componentSourcesOnVertical[index] = [];\n component.forEach(function (nodeId) {\n if (reversedDagOnVertical.get(nodeId).length == 0) {\n componentSourcesOnVertical[index].push(nodeId);\n }\n });\n });\n\n // calculate appropriate positioning for subgraphs\n var positionMapHorizontal = findAppropriatePositionForRelativePlacement(dagOnHorizontal, \"horizontal\", fixedNodesOnHorizontal, dummyPositionsForVerticalAlignment, componentSourcesOnHorizontal);\n var positionMapVertical = findAppropriatePositionForRelativePlacement(dagOnVertical, \"vertical\", fixedNodesOnVertical, dummyPositionsForHorizontalAlignment, componentSourcesOnVertical);\n\n // update positions of the nodes based on relative placement constraints\n\n var _loop9 = function _loop9(key) {\n if (dummyToNodeForVerticalAlignment.get(key)) {\n dummyToNodeForVerticalAlignment.get(key).forEach(function (nodeId) {\n xCoords[nodeIndexes.get(nodeId)] = positionMapHorizontal.get(key);\n });\n } else {\n xCoords[nodeIndexes.get(key)] = positionMapHorizontal.get(key);\n }\n };\n\n var _iteratorNormalCompletion6 = true;\n var _didIteratorError6 = false;\n var _iteratorError6 = undefined;\n\n try {\n for (var _iterator6 = positionMapHorizontal.keys()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n var key = _step6.value;\n\n _loop9(key);\n }\n } catch (err) {\n _didIteratorError6 = true;\n _iteratorError6 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion6 && _iterator6.return) {\n _iterator6.return();\n }\n } finally {\n if (_didIteratorError6) {\n throw _iteratorError6;\n }\n }\n }\n\n var _loop10 = function _loop10(key) {\n if (dummyToNodeForHorizontalAlignment.get(key)) {\n dummyToNodeForHorizontalAlignment.get(key).forEach(function (nodeId) {\n yCoords[nodeIndexes.get(nodeId)] = positionMapVertical.get(key);\n });\n } else {\n yCoords[nodeIndexes.get(key)] = positionMapVertical.get(key);\n }\n };\n\n var _iteratorNormalCompletion7 = true;\n var _didIteratorError7 = false;\n var _iteratorError7 = undefined;\n\n try {\n for (var _iterator7 = positionMapVertical.keys()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {\n var key = _step7.value;\n\n _loop10(key);\n }\n } catch (err) {\n _didIteratorError7 = true;\n _iteratorError7 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion7 && _iterator7.return) {\n _iterator7.return();\n }\n } finally {\n if (_didIteratorError7) {\n throw _iteratorError7;\n }\n }\n }\n })();\n }\n }\n\n // assign new coordinates to nodes after constraint handling\n for (var _i13 = 0; _i13 < allNodes.length; _i13++) {\n var _node = allNodes[_i13];\n if (_node.getChild() == null) {\n _node.setCenter(xCoords[nodeIndexes.get(_node.id)], yCoords[nodeIndexes.get(_node.id)]);\n }\n }\n};\n\nmodule.exports = ConstraintHandler;\n\n/***/ }),\n\n/***/ 551:\n/***/ ((module) => {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__551__;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(45);\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"cose-base\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"cose-base\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cytoscapeFcose\"] = factory(require(\"cose-base\"));\n\telse\n\t\troot[\"cytoscapeFcose\"] = factory(root[\"coseBase\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__140__) {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 658:\n/***/ ((module) => {\n\n\n\n// Simple, internal Object.assign() polyfill for options objects etc.\n\nmodule.exports = Object.assign != null ? Object.assign.bind(Object) : function (tgt) {\n for (var _len = arguments.length, srcs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n srcs[_key - 1] = arguments[_key];\n }\n\n srcs.forEach(function (src) {\n Object.keys(src).forEach(function (k) {\n return tgt[k] = src[k];\n });\n });\n\n return tgt;\n};\n\n/***/ }),\n\n/***/ 548:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\n/*\n * Auxiliary functions\n */\n\nvar LinkedList = __webpack_require__(140).layoutBase.LinkedList;\n\nvar auxiliary = {};\n\n// get the top most nodes\nauxiliary.getTopMostNodes = function (nodes) {\n var nodesMap = {};\n for (var i = 0; i < nodes.length; i++) {\n nodesMap[nodes[i].id()] = true;\n }\n var roots = nodes.filter(function (ele, i) {\n if (typeof ele === \"number\") {\n ele = i;\n }\n var parent = ele.parent()[0];\n while (parent != null) {\n if (nodesMap[parent.id()]) {\n return false;\n }\n parent = parent.parent()[0];\n }\n return true;\n });\n\n return roots;\n};\n\n// find disconnected components and create dummy nodes that connect them\nauxiliary.connectComponents = function (cy, eles, topMostNodes, dummyNodes) {\n var queue = new LinkedList();\n var visited = new Set();\n var visitedTopMostNodes = [];\n var currentNeighbor = void 0;\n var minDegreeNode = void 0;\n var minDegree = void 0;\n\n var isConnected = false;\n var count = 1;\n var nodesConnectedToDummy = [];\n var components = [];\n\n var _loop = function _loop() {\n var cmpt = cy.collection();\n components.push(cmpt);\n\n var currentNode = topMostNodes[0];\n var childrenOfCurrentNode = cy.collection();\n childrenOfCurrentNode.merge(currentNode).merge(currentNode.descendants().intersection(eles));\n visitedTopMostNodes.push(currentNode);\n\n childrenOfCurrentNode.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n cmpt.merge(node);\n });\n\n var _loop2 = function _loop2() {\n currentNode = queue.shift();\n\n // Traverse all neighbors of this node\n var neighborNodes = cy.collection();\n currentNode.neighborhood().nodes().forEach(function (node) {\n if (eles.intersection(currentNode.edgesWith(node)).length > 0) {\n neighborNodes.merge(node);\n }\n });\n\n for (var i = 0; i < neighborNodes.length; i++) {\n var neighborNode = neighborNodes[i];\n currentNeighbor = topMostNodes.intersection(neighborNode.union(neighborNode.ancestors()));\n if (currentNeighbor != null && !visited.has(currentNeighbor[0])) {\n var childrenOfNeighbor = currentNeighbor.union(currentNeighbor.descendants());\n\n childrenOfNeighbor.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n cmpt.merge(node);\n if (topMostNodes.has(node)) {\n visitedTopMostNodes.push(node);\n }\n });\n }\n }\n };\n\n while (queue.length != 0) {\n _loop2();\n }\n\n cmpt.forEach(function (node) {\n eles.intersection(node.connectedEdges()).forEach(function (e) {\n // connectedEdges() usually cached\n if (cmpt.has(e.source()) && cmpt.has(e.target())) {\n // has() is cheap\n cmpt.merge(e);\n }\n });\n });\n\n if (visitedTopMostNodes.length == topMostNodes.length) {\n isConnected = true;\n }\n\n if (!isConnected || isConnected && count > 1) {\n minDegreeNode = visitedTopMostNodes[0];\n minDegree = minDegreeNode.connectedEdges().length;\n visitedTopMostNodes.forEach(function (node) {\n if (node.connectedEdges().length < minDegree) {\n minDegree = node.connectedEdges().length;\n minDegreeNode = node;\n }\n });\n nodesConnectedToDummy.push(minDegreeNode.id());\n // TO DO: Check efficiency of this part\n var temp = cy.collection();\n temp.merge(visitedTopMostNodes[0]);\n visitedTopMostNodes.forEach(function (node) {\n temp.merge(node);\n });\n visitedTopMostNodes = [];\n topMostNodes = topMostNodes.difference(temp);\n count++;\n }\n };\n\n do {\n _loop();\n } while (!isConnected);\n\n if (dummyNodes) {\n if (nodesConnectedToDummy.length > 0) {\n dummyNodes.set('dummy' + (dummyNodes.size + 1), nodesConnectedToDummy);\n }\n }\n return components;\n};\n\n// relocates componentResult to originalCenter if there is no fixedNodeConstraint\nauxiliary.relocateComponent = function (originalCenter, componentResult, options) {\n if (!options.fixedNodeConstraint) {\n var minXCoord = Number.POSITIVE_INFINITY;\n var maxXCoord = Number.NEGATIVE_INFINITY;\n var minYCoord = Number.POSITIVE_INFINITY;\n var maxYCoord = Number.NEGATIVE_INFINITY;\n if (options.quality == \"draft\") {\n // calculate current bounding box\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = componentResult.nodeIndexes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _ref = _step.value;\n\n var _ref2 = _slicedToArray(_ref, 2);\n\n var key = _ref2[0];\n var value = _ref2[1];\n\n var cyNode = options.cy.getElementById(key);\n if (cyNode) {\n var nodeBB = cyNode.boundingBox();\n var leftX = componentResult.xCoords[value] - nodeBB.w / 2;\n var rightX = componentResult.xCoords[value] + nodeBB.w / 2;\n var topY = componentResult.yCoords[value] - nodeBB.h / 2;\n var bottomY = componentResult.yCoords[value] + nodeBB.h / 2;\n\n if (leftX < minXCoord) minXCoord = leftX;\n if (rightX > maxXCoord) maxXCoord = rightX;\n if (topY < minYCoord) minYCoord = topY;\n if (bottomY > maxYCoord) maxYCoord = bottomY;\n }\n }\n // find difference between current and original center\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n var diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2;\n var diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2;\n // move component to original center\n componentResult.xCoords = componentResult.xCoords.map(function (x) {\n return x + diffOnX;\n });\n componentResult.yCoords = componentResult.yCoords.map(function (y) {\n return y + diffOnY;\n });\n } else {\n // calculate current bounding box\n Object.keys(componentResult).forEach(function (item) {\n var node = componentResult[item];\n var leftX = node.getRect().x;\n var rightX = node.getRect().x + node.getRect().width;\n var topY = node.getRect().y;\n var bottomY = node.getRect().y + node.getRect().height;\n\n if (leftX < minXCoord) minXCoord = leftX;\n if (rightX > maxXCoord) maxXCoord = rightX;\n if (topY < minYCoord) minYCoord = topY;\n if (bottomY > maxYCoord) maxYCoord = bottomY;\n });\n // find difference between current and original center\n var _diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2;\n var _diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2;\n // move component to original center\n Object.keys(componentResult).forEach(function (item) {\n var node = componentResult[item];\n node.setCenter(node.getCenterX() + _diffOnX, node.getCenterY() + _diffOnY);\n });\n }\n }\n};\n\nauxiliary.calcBoundingBox = function (parentNode, xCoords, yCoords, nodeIndexes) {\n // calculate bounds\n var left = Number.MAX_SAFE_INTEGER;\n var right = Number.MIN_SAFE_INTEGER;\n var top = Number.MAX_SAFE_INTEGER;\n var bottom = Number.MIN_SAFE_INTEGER;\n var nodeLeft = void 0;\n var nodeRight = void 0;\n var nodeTop = void 0;\n var nodeBottom = void 0;\n\n var nodes = parentNode.descendants().not(\":parent\");\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n var node = nodes[i];\n\n nodeLeft = xCoords[nodeIndexes.get(node.id())] - node.width() / 2;\n nodeRight = xCoords[nodeIndexes.get(node.id())] + node.width() / 2;\n nodeTop = yCoords[nodeIndexes.get(node.id())] - node.height() / 2;\n nodeBottom = yCoords[nodeIndexes.get(node.id())] + node.height() / 2;\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingBox = {};\n boundingBox.topLeftX = left;\n boundingBox.topLeftY = top;\n boundingBox.width = right - left;\n boundingBox.height = bottom - top;\n return boundingBox;\n};\n\n// This function finds and returns parent nodes whose all children are hidden\nauxiliary.calcParentsWithoutChildren = function (cy, eles) {\n var parentsWithoutChildren = cy.collection();\n eles.nodes(':parent').forEach(function (parent) {\n var check = false;\n parent.children().forEach(function (child) {\n if (child.css('display') != 'none') {\n check = true;\n }\n });\n if (!check) {\n parentsWithoutChildren.merge(parent);\n }\n });\n\n return parentsWithoutChildren;\n};\n\nmodule.exports = auxiliary;\n\n/***/ }),\n\n/***/ 816:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\n/**\n The implementation of the postprocessing part that applies CoSE layout over the spectral layout\n*/\n\nvar aux = __webpack_require__(548);\nvar CoSELayout = __webpack_require__(140).CoSELayout;\nvar CoSENode = __webpack_require__(140).CoSENode;\nvar PointD = __webpack_require__(140).layoutBase.PointD;\nvar DimensionD = __webpack_require__(140).layoutBase.DimensionD;\nvar LayoutConstants = __webpack_require__(140).layoutBase.LayoutConstants;\nvar FDLayoutConstants = __webpack_require__(140).layoutBase.FDLayoutConstants;\nvar CoSEConstants = __webpack_require__(140).CoSEConstants;\n\n// main function that cose layout is processed\nvar coseLayout = function coseLayout(options, spectralResult) {\n\n var cy = options.cy;\n var eles = options.eles;\n var nodes = eles.nodes();\n var edges = eles.edges();\n\n var nodeIndexes = void 0;\n var xCoords = void 0;\n var yCoords = void 0;\n var idToLNode = {};\n\n if (options.randomize) {\n nodeIndexes = spectralResult[\"nodeIndexes\"];\n xCoords = spectralResult[\"xCoords\"];\n yCoords = spectralResult[\"yCoords\"];\n }\n\n var isFn = function isFn(fn) {\n return typeof fn === 'function';\n };\n\n var optFn = function optFn(opt, ele) {\n if (isFn(opt)) {\n return opt(ele);\n } else {\n return opt;\n }\n };\n\n /**** Postprocessing functions ****/\n\n var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles);\n\n // transfer cytoscape nodes to cose nodes\n var processChildrenList = function processChildrenList(parent, children, layout, options) {\n var size = children.length;\n for (var i = 0; i < size; i++) {\n var theChild = children[i];\n var children_of_children = null;\n if (theChild.intersection(parentsWithoutChildren).length == 0) {\n children_of_children = theChild.children();\n }\n var theNode = void 0;\n\n var dimensions = theChild.layoutDimensions({\n nodeDimensionsIncludeLabels: options.nodeDimensionsIncludeLabels\n });\n\n if (theChild.outerWidth() != null && theChild.outerHeight() != null) {\n if (options.randomize) {\n if (!theChild.isParent()) {\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(xCoords[nodeIndexes.get(theChild.id())] - dimensions.w / 2, yCoords[nodeIndexes.get(theChild.id())] - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));\n } else {\n var parentInfo = aux.calcBoundingBox(theChild, xCoords, yCoords, nodeIndexes);\n if (theChild.intersection(parentsWithoutChildren).length == 0) {\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parentInfo.width, parentInfo.height)));\n } else {\n // for the parentsWithoutChildren\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));\n }\n }\n } else {\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));\n }\n } else {\n theNode = parent.add(new CoSENode(this.graphManager));\n }\n // Attach id to the layout node and repulsion value\n theNode.id = theChild.data(\"id\");\n theNode.nodeRepulsion = optFn(options.nodeRepulsion, theChild);\n // Attach the paddings of cy node to layout node\n theNode.paddingLeft = parseInt(theChild.css('padding'));\n theNode.paddingTop = parseInt(theChild.css('padding'));\n theNode.paddingRight = parseInt(theChild.css('padding'));\n theNode.paddingBottom = parseInt(theChild.css('padding'));\n\n //Attach the label properties to both compound and simple nodes if labels will be included in node dimensions\n //These properties will be used while updating bounds of compounds during iterations or tiling\n //and will be used for simple nodes while transferring final positions to cytoscape\n if (options.nodeDimensionsIncludeLabels) {\n theNode.labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).w;\n theNode.labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).h;\n theNode.labelPosVertical = theChild.css(\"text-valign\");\n theNode.labelPosHorizontal = theChild.css(\"text-halign\");\n }\n\n // Map the layout node\n idToLNode[theChild.data(\"id\")] = theNode;\n\n if (isNaN(theNode.rect.x)) {\n theNode.rect.x = 0;\n }\n\n if (isNaN(theNode.rect.y)) {\n theNode.rect.y = 0;\n }\n\n if (children_of_children != null && children_of_children.length > 0) {\n var theNewGraph = void 0;\n theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode);\n processChildrenList(theNewGraph, children_of_children, layout, options);\n }\n }\n };\n\n // transfer cytoscape edges to cose edges\n var processEdges = function processEdges(layout, gm, edges) {\n var idealLengthTotal = 0;\n var edgeCount = 0;\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var sourceNode = idToLNode[edge.data(\"source\")];\n var targetNode = idToLNode[edge.data(\"target\")];\n if (sourceNode && targetNode && sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) {\n var e1 = gm.add(layout.newEdge(), sourceNode, targetNode);\n e1.id = edge.id();\n e1.idealLength = optFn(options.idealEdgeLength, edge);\n e1.edgeElasticity = optFn(options.edgeElasticity, edge);\n idealLengthTotal += e1.idealLength;\n edgeCount++;\n }\n }\n // we need to update the ideal edge length constant with the avg. ideal length value after processing edges\n // in case there is no edge, use other options\n if (options.idealEdgeLength != null) {\n if (edgeCount > 0) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = idealLengthTotal / edgeCount;else if (!isFn(options.idealEdgeLength)) // in case there is no edge, but option gives a value to use\n CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;else // in case there is no edge and we cannot get a value from option (because it's a function)\n CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;\n // we need to update these constant values based on the ideal edge length constant\n CoSEConstants.MIN_REPULSION_DIST = FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;\n CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\n }\n };\n\n // transfer cytoscape constraints to cose layout\n var processConstraints = function processConstraints(layout, options) {\n // get nodes to be fixed\n if (options.fixedNodeConstraint) {\n layout.constraints[\"fixedNodeConstraint\"] = options.fixedNodeConstraint;\n }\n // get nodes to be aligned\n if (options.alignmentConstraint) {\n layout.constraints[\"alignmentConstraint\"] = options.alignmentConstraint;\n }\n // get nodes to be relatively placed\n if (options.relativePlacementConstraint) {\n layout.constraints[\"relativePlacementConstraint\"] = options.relativePlacementConstraint;\n }\n };\n\n /**** Apply postprocessing ****/\n if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor;\n if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity;\n if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter;\n if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange;\n if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound;\n if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound;\n if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental;\n\n if (options.tilingCompareBy != null) CoSEConstants.TILING_COMPARE_BY = options.tilingCompareBy;\n\n if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 0;\n\n CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels;\n CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize;\n CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate;\n CoSEConstants.TILE = options.tile;\n CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical;\n CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal;\n\n CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = true;\n CoSEConstants.PURE_INCREMENTAL = !options.randomize;\n LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = options.uniformNodeDimensions;\n\n // This part is for debug/demo purpose\n if (options.step == \"transformed\") {\n CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;\n CoSEConstants.ENFORCE_CONSTRAINTS = false;\n CoSEConstants.APPLY_LAYOUT = false;\n }\n if (options.step == \"enforced\") {\n CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;\n CoSEConstants.ENFORCE_CONSTRAINTS = true;\n CoSEConstants.APPLY_LAYOUT = false;\n }\n if (options.step == \"cose\") {\n CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;\n CoSEConstants.ENFORCE_CONSTRAINTS = false;\n CoSEConstants.APPLY_LAYOUT = true;\n }\n if (options.step == \"all\") {\n if (options.randomize) CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;else CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;\n CoSEConstants.ENFORCE_CONSTRAINTS = true;\n CoSEConstants.APPLY_LAYOUT = true;\n }\n\n if (options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint) {\n CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false;\n } else {\n CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true;\n }\n\n var coseLayout = new CoSELayout();\n var gm = coseLayout.newGraphManager();\n\n processChildrenList(gm.addRoot(), aux.getTopMostNodes(nodes), coseLayout, options);\n processEdges(coseLayout, gm, edges);\n processConstraints(coseLayout, options);\n\n coseLayout.runLayout();\n\n return idToLNode;\n};\n\nmodule.exports = { coseLayout: coseLayout };\n\n/***/ }),\n\n/***/ 212:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n The implementation of the fcose layout algorithm\n*/\n\nvar assign = __webpack_require__(658);\nvar aux = __webpack_require__(548);\n\nvar _require = __webpack_require__(657),\n spectralLayout = _require.spectralLayout;\n\nvar _require2 = __webpack_require__(816),\n coseLayout = _require2.coseLayout;\n\nvar defaults = Object.freeze({\n\n // 'draft', 'default' or 'proof' \n // - 'draft' only applies spectral layout \n // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate)\n // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate) \n quality: \"default\",\n // Use random node positions at beginning of layout\n // if this is set to false, then quality option must be \"proof\"\n randomize: true,\n // Whether or not to animate the layout\n animate: true,\n // Duration of animation in ms, if enabled\n animationDuration: 1000,\n // Easing of animation, if enabled\n animationEasing: undefined,\n // Fit the viewport to the repositioned nodes\n fit: true,\n // Padding around layout\n padding: 30,\n // Whether to include labels in node dimensions. Valid in \"proof\" quality\n nodeDimensionsIncludeLabels: false,\n // Whether or not simple nodes (non-compound nodes) are of uniform dimensions\n uniformNodeDimensions: false,\n // Whether to pack disconnected components - valid only if randomize: true\n packComponents: true,\n // Layout step - all, transformed, enforced, cose - for debug purpose only\n step: \"all\",\n\n /* spectral layout options */\n\n // False for random, true for greedy\n samplingType: true,\n // Sample size to construct distance matrix\n sampleSize: 25,\n // Separation amount between nodes\n nodeSeparation: 75,\n // Power iteration tolerance\n piTol: 0.0000001,\n\n /* CoSE layout options */\n\n // Node repulsion (non overlapping) multiplier\n nodeRepulsion: function nodeRepulsion(node) {\n return 4500;\n },\n // Ideal edge (non nested) length\n idealEdgeLength: function idealEdgeLength(edge) {\n return 50;\n },\n // Divisor to compute edge forces\n edgeElasticity: function edgeElasticity(edge) {\n return 0.45;\n },\n // Nesting factor (multiplier) to compute ideal edge length for nested edges\n nestingFactor: 0.1,\n // Gravity force (constant)\n gravity: 0.25,\n // Maximum number of iterations to perform\n numIter: 2500,\n // For enabling tiling\n tile: true,\n // The function that specifies the criteria for comparing nodes while sorting them during tiling operation.\n // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set.\n tilingCompareBy: undefined,\n // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)\n tilingPaddingVertical: 10,\n // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)\n tilingPaddingHorizontal: 10,\n // Gravity range (constant) for compounds\n gravityRangeCompound: 1.5,\n // Gravity force (constant) for compounds\n gravityCompound: 1.0,\n // Gravity range (constant)\n gravityRange: 3.8,\n // Initial cooling factor for incremental layout \n initialEnergyOnIncremental: 0.3,\n\n /* constraint options */\n\n // Fix required nodes to predefined positions\n // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}]\n fixedNodeConstraint: undefined,\n // Align required nodes in vertical/horizontal direction\n // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']}\n alignmentConstraint: undefined,\n // Place two nodes relatively in vertical/horizontal direction \n // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}]\n relativePlacementConstraint: undefined,\n\n /* layout event callbacks */\n ready: function ready() {}, // on layoutready\n stop: function stop() {} // on layoutstop\n});\n\nvar Layout = function () {\n function Layout(options) {\n _classCallCheck(this, Layout);\n\n this.options = assign({}, defaults, options);\n }\n\n _createClass(Layout, [{\n key: 'run',\n value: function run() {\n var layout = this;\n var options = this.options;\n var cy = options.cy;\n var eles = options.eles;\n\n var spectralResult = [];\n var xCoords = void 0;\n var yCoords = void 0;\n var coseResult = [];\n var components = void 0;\n var componentCenters = [];\n\n // basic validity check for constraint inputs \n if (options.fixedNodeConstraint && (!Array.isArray(options.fixedNodeConstraint) || options.fixedNodeConstraint.length == 0)) {\n options.fixedNodeConstraint = undefined;\n }\n\n if (options.alignmentConstraint) {\n if (options.alignmentConstraint.vertical && (!Array.isArray(options.alignmentConstraint.vertical) || options.alignmentConstraint.vertical.length == 0)) {\n options.alignmentConstraint.vertical = undefined;\n }\n if (options.alignmentConstraint.horizontal && (!Array.isArray(options.alignmentConstraint.horizontal) || options.alignmentConstraint.horizontal.length == 0)) {\n options.alignmentConstraint.horizontal = undefined;\n }\n }\n\n if (options.relativePlacementConstraint && (!Array.isArray(options.relativePlacementConstraint) || options.relativePlacementConstraint.length == 0)) {\n options.relativePlacementConstraint = undefined;\n }\n\n // if any constraint exists, set some options\n var constraintExist = options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint;\n if (constraintExist) {\n // constraints work with these options\n options.tile = false;\n options.packComponents = false;\n }\n\n // decide component packing is enabled or not\n var layUtil = void 0;\n var packingEnabled = false;\n if (cy.layoutUtilities && options.packComponents) {\n layUtil = cy.layoutUtilities(\"get\");\n if (!layUtil) layUtil = cy.layoutUtilities();\n packingEnabled = true;\n }\n\n if (eles.nodes().length > 0) {\n // if packing is not enabled, perform layout on the whole graph\n if (!packingEnabled) {\n // store component center\n var boundingBox = options.eles.boundingBox();\n componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 });\n // apply spectral layout\n if (options.randomize) {\n var result = spectralLayout(options);\n spectralResult.push(result);\n }\n // apply cose layout as postprocessing\n if (options.quality == \"default\" || options.quality == \"proof\") {\n coseResult.push(coseLayout(options, spectralResult[0]));\n aux.relocateComponent(componentCenters[0], coseResult[0], options); // relocate center to original position\n } else {\n aux.relocateComponent(componentCenters[0], spectralResult[0], options); // relocate center to original position\n }\n } else {\n // packing is enabled\n var topMostNodes = aux.getTopMostNodes(options.eles.nodes());\n components = aux.connectComponents(cy, options.eles, topMostNodes);\n // store component centers\n components.forEach(function (component) {\n var boundingBox = component.boundingBox();\n componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 });\n });\n\n //send each component to spectral layout if randomized\n if (options.randomize) {\n components.forEach(function (component) {\n options.eles = component;\n spectralResult.push(spectralLayout(options));\n });\n }\n\n if (options.quality == \"default\" || options.quality == \"proof\") {\n var toBeTiledNodes = cy.collection();\n if (options.tile) {\n // behave nodes to be tiled as one component\n var nodeIndexes = new Map();\n var _xCoords = [];\n var _yCoords = [];\n var count = 0;\n var tempSpectralResult = { nodeIndexes: nodeIndexes, xCoords: _xCoords, yCoords: _yCoords };\n var indexesToBeDeleted = [];\n components.forEach(function (component, index) {\n if (component.edges().length == 0) {\n component.nodes().forEach(function (node, i) {\n toBeTiledNodes.merge(component.nodes()[i]);\n if (!node.isParent()) {\n tempSpectralResult.nodeIndexes.set(component.nodes()[i].id(), count++);\n tempSpectralResult.xCoords.push(component.nodes()[0].position().x);\n tempSpectralResult.yCoords.push(component.nodes()[0].position().y);\n }\n });\n indexesToBeDeleted.push(index);\n }\n });\n if (toBeTiledNodes.length > 1) {\n var _boundingBox = toBeTiledNodes.boundingBox();\n componentCenters.push({ x: _boundingBox.x1 + _boundingBox.w / 2, y: _boundingBox.y1 + _boundingBox.h / 2 });\n components.push(toBeTiledNodes);\n spectralResult.push(tempSpectralResult);\n for (var i = indexesToBeDeleted.length - 1; i >= 0; i--) {\n components.splice(indexesToBeDeleted[i], 1);\n spectralResult.splice(indexesToBeDeleted[i], 1);\n componentCenters.splice(indexesToBeDeleted[i], 1);\n };\n }\n }\n components.forEach(function (component, index) {\n // send each component to cose layout\n options.eles = component;\n coseResult.push(coseLayout(options, spectralResult[index]));\n aux.relocateComponent(componentCenters[index], coseResult[index], options); // relocate center to original position\n });\n } else {\n components.forEach(function (component, index) {\n aux.relocateComponent(componentCenters[index], spectralResult[index], options); // relocate center to original position\n });\n }\n\n // packing\n var componentsEvaluated = new Set();\n if (components.length > 1) {\n var subgraphs = [];\n var hiddenEles = eles.filter(function (ele) {\n return ele.css('display') == 'none';\n });\n components.forEach(function (component, index) {\n var nodeIndexes = void 0;\n if (options.quality == \"draft\") {\n nodeIndexes = spectralResult[index].nodeIndexes;\n }\n\n if (component.nodes().not(hiddenEles).length > 0) {\n var subgraph = {};\n subgraph.edges = [];\n subgraph.nodes = [];\n var nodeIndex = void 0;\n component.nodes().not(hiddenEles).forEach(function (node) {\n if (options.quality == \"draft\") {\n if (!node.isParent()) {\n nodeIndex = nodeIndexes.get(node.id());\n subgraph.nodes.push({ x: spectralResult[index].xCoords[nodeIndex] - node.boundingbox().w / 2, y: spectralResult[index].yCoords[nodeIndex] - node.boundingbox().h / 2, width: node.boundingbox().w, height: node.boundingbox().h });\n } else {\n var parentInfo = aux.calcBoundingBox(node, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);\n subgraph.nodes.push({ x: parentInfo.topLeftX, y: parentInfo.topLeftY, width: parentInfo.width, height: parentInfo.height });\n }\n } else {\n if (coseResult[index][node.id()]) {\n subgraph.nodes.push({ x: coseResult[index][node.id()].getLeft(), y: coseResult[index][node.id()].getTop(), width: coseResult[index][node.id()].getWidth(), height: coseResult[index][node.id()].getHeight() });\n }\n }\n });\n component.edges().forEach(function (edge) {\n var source = edge.source();\n var target = edge.target();\n if (source.css(\"display\") != \"none\" && target.css(\"display\") != \"none\") {\n if (options.quality == \"draft\") {\n var sourceNodeIndex = nodeIndexes.get(source.id());\n var targetNodeIndex = nodeIndexes.get(target.id());\n var sourceCenter = [];\n var targetCenter = [];\n if (source.isParent()) {\n var parentInfo = aux.calcBoundingBox(source, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);\n sourceCenter.push(parentInfo.topLeftX + parentInfo.width / 2);\n sourceCenter.push(parentInfo.topLeftY + parentInfo.height / 2);\n } else {\n sourceCenter.push(spectralResult[index].xCoords[sourceNodeIndex]);\n sourceCenter.push(spectralResult[index].yCoords[sourceNodeIndex]);\n }\n if (target.isParent()) {\n var _parentInfo = aux.calcBoundingBox(target, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);\n targetCenter.push(_parentInfo.topLeftX + _parentInfo.width / 2);\n targetCenter.push(_parentInfo.topLeftY + _parentInfo.height / 2);\n } else {\n targetCenter.push(spectralResult[index].xCoords[targetNodeIndex]);\n targetCenter.push(spectralResult[index].yCoords[targetNodeIndex]);\n }\n subgraph.edges.push({ startX: sourceCenter[0], startY: sourceCenter[1], endX: targetCenter[0], endY: targetCenter[1] });\n } else {\n if (coseResult[index][source.id()] && coseResult[index][target.id()]) {\n subgraph.edges.push({ startX: coseResult[index][source.id()].getCenterX(), startY: coseResult[index][source.id()].getCenterY(), endX: coseResult[index][target.id()].getCenterX(), endY: coseResult[index][target.id()].getCenterY() });\n }\n }\n }\n });\n if (subgraph.nodes.length > 0) {\n subgraphs.push(subgraph);\n componentsEvaluated.add(index);\n }\n }\n });\n var shiftResult = layUtil.packComponents(subgraphs, options.randomize).shifts;\n if (options.quality == \"draft\") {\n spectralResult.forEach(function (result, index) {\n var newXCoords = result.xCoords.map(function (x) {\n return x + shiftResult[index].dx;\n });\n var newYCoords = result.yCoords.map(function (y) {\n return y + shiftResult[index].dy;\n });\n result.xCoords = newXCoords;\n result.yCoords = newYCoords;\n });\n } else {\n var _count = 0;\n componentsEvaluated.forEach(function (index) {\n Object.keys(coseResult[index]).forEach(function (item) {\n var nodeRectangle = coseResult[index][item];\n nodeRectangle.setCenter(nodeRectangle.getCenterX() + shiftResult[_count].dx, nodeRectangle.getCenterY() + shiftResult[_count].dy);\n });\n _count++;\n });\n }\n }\n }\n }\n\n // get each element's calculated position\n var getPositions = function getPositions(ele, i) {\n if (options.quality == \"default\" || options.quality == \"proof\") {\n if (typeof ele === \"number\") {\n ele = i;\n }\n var pos = void 0;\n var node = void 0;\n var theId = ele.data('id');\n coseResult.forEach(function (result) {\n if (theId in result) {\n pos = { x: result[theId].getRect().getCenterX(), y: result[theId].getRect().getCenterY() };\n node = result[theId];\n }\n });\n if (options.nodeDimensionsIncludeLabels) {\n if (node.labelWidth) {\n if (node.labelPosHorizontal == \"left\") {\n pos.x += node.labelWidth / 2;\n } else if (node.labelPosHorizontal == \"right\") {\n pos.x -= node.labelWidth / 2;\n }\n }\n if (node.labelHeight) {\n if (node.labelPosVertical == \"top\") {\n pos.y += node.labelHeight / 2;\n } else if (node.labelPosVertical == \"bottom\") {\n pos.y -= node.labelHeight / 2;\n }\n }\n }\n if (pos == undefined) pos = { x: ele.position(\"x\"), y: ele.position(\"y\") };\n return {\n x: pos.x,\n y: pos.y\n };\n } else {\n var _pos = void 0;\n spectralResult.forEach(function (result) {\n var index = result.nodeIndexes.get(ele.id());\n if (index != undefined) {\n _pos = { x: result.xCoords[index], y: result.yCoords[index] };\n }\n });\n if (_pos == undefined) _pos = { x: ele.position(\"x\"), y: ele.position(\"y\") };\n return {\n x: _pos.x,\n y: _pos.y\n };\n }\n };\n\n // quality = \"draft\" and randomize = false are contradictive so in that case positions don't change\n if (options.quality == \"default\" || options.quality == \"proof\" || options.randomize) {\n // transfer calculated positions to nodes (positions of only simple nodes are evaluated, compounds are positioned automatically)\n var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles);\n var _hiddenEles = eles.filter(function (ele) {\n return ele.css('display') == 'none';\n });\n options.eles = eles.not(_hiddenEles);\n\n eles.nodes().not(\":parent\").not(_hiddenEles).layoutPositions(layout, options, getPositions);\n\n if (parentsWithoutChildren.length > 0) {\n parentsWithoutChildren.forEach(function (ele) {\n ele.position(getPositions(ele));\n });\n }\n } else {\n console.log(\"If randomize option is set to false, then quality option must be 'default' or 'proof'.\");\n }\n }\n }]);\n\n return Layout;\n}();\n\nmodule.exports = Layout;\n\n/***/ }),\n\n/***/ 657:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\n/**\n The implementation of the spectral layout that is the first part of the fcose layout algorithm\n*/\n\nvar aux = __webpack_require__(548);\nvar Matrix = __webpack_require__(140).layoutBase.Matrix;\nvar SVD = __webpack_require__(140).layoutBase.SVD;\n\n// main function that spectral layout is processed\nvar spectralLayout = function spectralLayout(options) {\n\n var cy = options.cy;\n var eles = options.eles;\n var nodes = eles.nodes();\n var parentNodes = eles.nodes(\":parent\");\n\n var dummyNodes = new Map(); // map to keep dummy nodes and their neighbors\n var nodeIndexes = new Map(); // map to keep indexes to nodes\n var parentChildMap = new Map(); // mapping btw. compound and its representative node \n var allNodesNeighborhood = []; // array to keep neighborhood of all nodes\n var xCoords = [];\n var yCoords = [];\n\n var samplesColumn = []; // sampled vertices\n var minDistancesColumn = [];\n var C = []; // column sampling matrix\n var PHI = []; // intersection of column and row sampling matrices \n var INV = []; // inverse of PHI \n\n var firstSample = void 0; // the first sampled node\n var nodeSize = void 0;\n\n var infinity = 100000000;\n var small = 0.000000001;\n\n var piTol = options.piTol;\n var samplingType = options.samplingType; // false for random, true for greedy\n var nodeSeparation = options.nodeSeparation;\n var sampleSize = void 0;\n\n /**** Spectral-preprocessing functions ****/\n\n /**** Spectral layout functions ****/\n\n // determine which columns to be sampled\n var randomSampleCR = function randomSampleCR() {\n var sample = 0;\n var count = 0;\n var flag = false;\n\n while (count < sampleSize) {\n sample = Math.floor(Math.random() * nodeSize);\n\n flag = false;\n for (var i = 0; i < count; i++) {\n if (samplesColumn[i] == sample) {\n flag = true;\n break;\n }\n }\n\n if (!flag) {\n samplesColumn[count] = sample;\n count++;\n } else {\n continue;\n }\n }\n };\n\n // takes the index of the node(pivot) to initiate BFS as a parameter\n var BFS = function BFS(pivot, index, samplingMethod) {\n var path = []; // the front of the path\n var front = 0; // the back of the path\n var back = 0;\n var current = 0;\n var temp = void 0;\n var distance = [];\n\n var max_dist = 0; // the furthest node to be returned\n var max_ind = 1;\n\n for (var i = 0; i < nodeSize; i++) {\n distance[i] = infinity;\n }\n\n path[back] = pivot;\n distance[pivot] = 0;\n\n while (back >= front) {\n current = path[front++];\n var neighbors = allNodesNeighborhood[current];\n for (var _i = 0; _i < neighbors.length; _i++) {\n temp = nodeIndexes.get(neighbors[_i]);\n if (distance[temp] == infinity) {\n distance[temp] = distance[current] + 1;\n path[++back] = temp;\n }\n }\n C[current][index] = distance[current] * nodeSeparation;\n }\n\n if (samplingMethod) {\n for (var _i2 = 0; _i2 < nodeSize; _i2++) {\n if (C[_i2][index] < minDistancesColumn[_i2]) minDistancesColumn[_i2] = C[_i2][index];\n }\n\n for (var _i3 = 0; _i3 < nodeSize; _i3++) {\n if (minDistancesColumn[_i3] > max_dist) {\n max_dist = minDistancesColumn[_i3];\n max_ind = _i3;\n }\n }\n }\n return max_ind;\n };\n\n // apply BFS to all nodes or selected samples\n var allBFS = function allBFS(samplingMethod) {\n\n var sample = void 0;\n\n if (!samplingMethod) {\n randomSampleCR();\n\n // call BFS\n for (var i = 0; i < sampleSize; i++) {\n BFS(samplesColumn[i], i, samplingMethod, false);\n }\n } else {\n sample = Math.floor(Math.random() * nodeSize);\n firstSample = sample;\n\n for (var _i4 = 0; _i4 < nodeSize; _i4++) {\n minDistancesColumn[_i4] = infinity;\n }\n\n for (var _i5 = 0; _i5 < sampleSize; _i5++) {\n samplesColumn[_i5] = sample;\n sample = BFS(sample, _i5, samplingMethod);\n }\n }\n\n // form the squared distances for C\n for (var _i6 = 0; _i6 < nodeSize; _i6++) {\n for (var j = 0; j < sampleSize; j++) {\n C[_i6][j] *= C[_i6][j];\n }\n }\n\n // form PHI\n for (var _i7 = 0; _i7 < sampleSize; _i7++) {\n PHI[_i7] = [];\n }\n\n for (var _i8 = 0; _i8 < sampleSize; _i8++) {\n for (var _j = 0; _j < sampleSize; _j++) {\n PHI[_i8][_j] = C[samplesColumn[_j]][_i8];\n }\n }\n };\n\n // perform the SVD algorithm and apply a regularization step\n var sample = function sample() {\n\n var SVDResult = SVD.svd(PHI);\n\n var a_q = SVDResult.S;\n var a_u = SVDResult.U;\n var a_v = SVDResult.V;\n\n var max_s = a_q[0] * a_q[0] * a_q[0];\n\n var a_Sig = [];\n\n // regularization\n for (var i = 0; i < sampleSize; i++) {\n a_Sig[i] = [];\n for (var j = 0; j < sampleSize; j++) {\n a_Sig[i][j] = 0;\n if (i == j) {\n a_Sig[i][j] = a_q[i] / (a_q[i] * a_q[i] + max_s / (a_q[i] * a_q[i]));\n }\n }\n }\n\n INV = Matrix.multMat(Matrix.multMat(a_v, a_Sig), Matrix.transpose(a_u));\n };\n\n // calculate final coordinates \n var powerIteration = function powerIteration() {\n // two largest eigenvalues\n var theta1 = void 0;\n var theta2 = void 0;\n\n // initial guesses for eigenvectors\n var Y1 = [];\n var Y2 = [];\n\n var V1 = [];\n var V2 = [];\n\n for (var i = 0; i < nodeSize; i++) {\n Y1[i] = Math.random();\n Y2[i] = Math.random();\n }\n\n Y1 = Matrix.normalize(Y1);\n Y2 = Matrix.normalize(Y2);\n\n var count = 0;\n // to keep track of the improvement ratio in power iteration\n var current = small;\n var previous = small;\n\n var temp = void 0;\n\n while (true) {\n count++;\n\n for (var _i9 = 0; _i9 < nodeSize; _i9++) {\n V1[_i9] = Y1[_i9];\n }\n\n Y1 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V1), C, INV));\n theta1 = Matrix.dotProduct(V1, Y1);\n Y1 = Matrix.normalize(Y1);\n\n current = Matrix.dotProduct(V1, Y1);\n\n temp = Math.abs(current / previous);\n\n if (temp <= 1 + piTol && temp >= 1) {\n break;\n }\n\n previous = current;\n }\n\n for (var _i10 = 0; _i10 < nodeSize; _i10++) {\n V1[_i10] = Y1[_i10];\n }\n\n count = 0;\n previous = small;\n while (true) {\n count++;\n\n for (var _i11 = 0; _i11 < nodeSize; _i11++) {\n V2[_i11] = Y2[_i11];\n }\n\n V2 = Matrix.minusOp(V2, Matrix.multCons(V1, Matrix.dotProduct(V1, V2)));\n Y2 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V2), C, INV));\n theta2 = Matrix.dotProduct(V2, Y2);\n Y2 = Matrix.normalize(Y2);\n\n current = Matrix.dotProduct(V2, Y2);\n\n temp = Math.abs(current / previous);\n\n if (temp <= 1 + piTol && temp >= 1) {\n break;\n }\n\n previous = current;\n }\n\n for (var _i12 = 0; _i12 < nodeSize; _i12++) {\n V2[_i12] = Y2[_i12];\n }\n\n // theta1 now contains dominant eigenvalue\n // theta2 now contains the second-largest eigenvalue\n // V1 now contains theta1's eigenvector\n // V2 now contains theta2's eigenvector\n\n //populate the two vectors\n xCoords = Matrix.multCons(V1, Math.sqrt(Math.abs(theta1)));\n yCoords = Matrix.multCons(V2, Math.sqrt(Math.abs(theta2)));\n };\n\n /**** Preparation for spectral layout (Preprocessing) ****/\n\n // connect disconnected components (first top level, then inside of each compound node)\n aux.connectComponents(cy, eles, aux.getTopMostNodes(nodes), dummyNodes);\n\n parentNodes.forEach(function (ele) {\n aux.connectComponents(cy, eles, aux.getTopMostNodes(ele.descendants().intersection(eles)), dummyNodes);\n });\n\n // assign indexes to nodes (first real, then dummy nodes)\n var index = 0;\n for (var i = 0; i < nodes.length; i++) {\n if (!nodes[i].isParent()) {\n nodeIndexes.set(nodes[i].id(), index++);\n }\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = dummyNodes.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n\n nodeIndexes.set(key, index++);\n }\n\n // instantiate the neighborhood matrix\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n for (var _i13 = 0; _i13 < nodeIndexes.size; _i13++) {\n allNodesNeighborhood[_i13] = [];\n }\n\n // form a parent-child map to keep representative node of each compound node \n parentNodes.forEach(function (ele) {\n var children = ele.children().intersection(eles);\n\n // let random = 0;\n while (children.nodes(\":childless\").length == 0) {\n // random = Math.floor(Math.random() * children.nodes().length); // if all children are compound then proceed randomly\n children = children.nodes()[0].children().intersection(eles);\n }\n // select the representative node - we can apply different methods here\n // random = Math.floor(Math.random() * children.nodes(\":childless\").length);\n var index = 0;\n var min = children.nodes(\":childless\")[0].connectedEdges().length;\n children.nodes(\":childless\").forEach(function (ele2, i) {\n if (ele2.connectedEdges().length < min) {\n min = ele2.connectedEdges().length;\n index = i;\n }\n });\n parentChildMap.set(ele.id(), children.nodes(\":childless\")[index].id());\n });\n\n // add neighborhood relations (first real, then dummy nodes)\n nodes.forEach(function (ele) {\n var eleIndex = void 0;\n\n if (ele.isParent()) eleIndex = nodeIndexes.get(parentChildMap.get(ele.id()));else eleIndex = nodeIndexes.get(ele.id());\n\n ele.neighborhood().nodes().forEach(function (node) {\n if (eles.intersection(ele.edgesWith(node)).length > 0) {\n if (node.isParent()) allNodesNeighborhood[eleIndex].push(parentChildMap.get(node.id()));else allNodesNeighborhood[eleIndex].push(node.id());\n }\n });\n });\n\n var _loop = function _loop(_key) {\n var eleIndex = nodeIndexes.get(_key);\n var disconnectedId = void 0;\n dummyNodes.get(_key).forEach(function (id) {\n if (cy.getElementById(id).isParent()) disconnectedId = parentChildMap.get(id);else disconnectedId = id;\n\n allNodesNeighborhood[eleIndex].push(disconnectedId);\n allNodesNeighborhood[nodeIndexes.get(disconnectedId)].push(_key);\n });\n };\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = dummyNodes.keys()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var _key = _step2.value;\n\n _loop(_key);\n }\n\n // nodeSize now only considers the size of transformed graph\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n nodeSize = nodeIndexes.size;\n\n var spectralResult = void 0;\n\n // If number of nodes in transformed graph is 1 or 2, either SVD or powerIteration causes problem\n // So skip spectral and layout the graph with cose\n if (nodeSize > 2) {\n // if # of nodes in transformed graph is smaller than sample size,\n // then use # of nodes as sample size\n sampleSize = nodeSize < options.sampleSize ? nodeSize : options.sampleSize;\n\n // instantiates the partial matrices that will be used in spectral layout\n for (var _i14 = 0; _i14 < nodeSize; _i14++) {\n C[_i14] = [];\n }\n for (var _i15 = 0; _i15 < sampleSize; _i15++) {\n INV[_i15] = [];\n }\n\n /**** Apply spectral layout ****/\n\n if (options.quality == \"draft\" || options.step == \"all\") {\n allBFS(samplingType);\n sample();\n powerIteration();\n\n spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };\n } else {\n nodeIndexes.forEach(function (value, key) {\n xCoords.push(cy.getElementById(key).position(\"x\"));\n yCoords.push(cy.getElementById(key).position(\"y\"));\n });\n spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };\n }\n return spectralResult;\n } else {\n var iterator = nodeIndexes.keys();\n var firstNode = cy.getElementById(iterator.next().value);\n var firstNodePos = firstNode.position();\n var firstNodeWidth = firstNode.outerWidth();\n xCoords.push(firstNodePos.x);\n yCoords.push(firstNodePos.y);\n if (nodeSize == 2) {\n var secondNode = cy.getElementById(iterator.next().value);\n var secondNodeWidth = secondNode.outerWidth();\n xCoords.push(firstNodePos.x + firstNodeWidth / 2 + secondNodeWidth / 2 + options.idealEdgeLength);\n yCoords.push(firstNodePos.y);\n }\n\n spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };\n return spectralResult;\n }\n};\n\nmodule.exports = { spectralLayout: spectralLayout };\n\n/***/ }),\n\n/***/ 579:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar impl = __webpack_require__(212);\n\n// registers the extension on a cytoscape lib ref\nvar register = function register(cytoscape) {\n if (!cytoscape) {\n return;\n } // can't register if cytoscape unspecified\n\n cytoscape('layout', 'fcose', impl); // register with cytoscape.js\n};\n\nif (typeof cytoscape !== 'undefined') {\n // expose to global cytoscape (i.e. window.cytoscape)\n register(cytoscape);\n}\n\nmodule.exports = register;\n\n/***/ }),\n\n/***/ 140:\n/***/ ((module) => {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__140__;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(579);\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});", "import { unknownIcon } from '../../rendering-util/icons.js';\nimport type { IconifyJSON } from '@iconify/types';\n\nconst wrapIcon = (icon: string) => {\n return `${icon}`;\n};\n\nexport const architectureIcons: IconifyJSON = {\n prefix: 'mermaid-architecture',\n height: 80,\n width: 80,\n icons: {\n database: {\n body: wrapIcon(\n ''\n ),\n },\n server: {\n body: wrapIcon(\n ''\n ),\n },\n disk: {\n body: wrapIcon(\n ''\n ),\n },\n internet: {\n body: wrapIcon(\n ''\n ),\n },\n cloud: {\n body: wrapIcon(\n ''\n ),\n },\n unknown: unknownIcon,\n blank: {\n body: wrapIcon(''),\n },\n },\n};\n", "import { getIconSVG } from '../../rendering-util/icons.js';\nimport type cytoscape from 'cytoscape';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { createText } from '../../rendering-util/createText.js';\nimport type { D3Element } from '../../types.js';\nimport { db, getConfigField } from './architectureDb.js';\nimport { architectureIcons } from './architectureIcons.js';\nimport {\n ArchitectureDirectionArrow,\n ArchitectureDirectionArrowShift,\n edgeData,\n getArchitectureDirectionPair,\n getArchitectureDirectionXYFactors,\n isArchitectureDirectionX,\n isArchitectureDirectionXY,\n isArchitectureDirectionY,\n isArchitecturePairXY,\n nodeData,\n type ArchitectureDB,\n type ArchitectureJunction,\n type ArchitectureService,\n} from './architectureTypes.js';\n\nexport const drawEdges = async function (edgesEl: D3Element, cy: cytoscape.Core) {\n const padding = getConfigField('padding');\n const iconSize = getConfigField('iconSize');\n const halfIconSize = iconSize / 2;\n const arrowSize = iconSize / 6;\n const halfArrowSize = arrowSize / 2;\n\n await Promise.all(\n cy.edges().map(async (edge) => {\n const {\n source,\n sourceDir,\n sourceArrow,\n sourceGroup,\n target,\n targetDir,\n targetArrow,\n targetGroup,\n label,\n } = edgeData(edge);\n let { x: startX, y: startY } = edge[0].sourceEndpoint();\n const { x: midX, y: midY } = edge[0].midpoint();\n let { x: endX, y: endY } = edge[0].targetEndpoint();\n\n // Adjust the edge distance if it has the {group} modifier\n const groupEdgeShift = padding + 4;\n // +18 comes from the service label height that extends the padding on the bottom side of each group\n if (sourceGroup) {\n if (isArchitectureDirectionX(sourceDir)) {\n startX += sourceDir === 'L' ? -groupEdgeShift : groupEdgeShift;\n } else {\n startY += sourceDir === 'T' ? -groupEdgeShift : groupEdgeShift + 18;\n }\n }\n\n if (targetGroup) {\n if (isArchitectureDirectionX(targetDir)) {\n endX += targetDir === 'L' ? -groupEdgeShift : groupEdgeShift;\n } else {\n endY += targetDir === 'T' ? -groupEdgeShift : groupEdgeShift + 18;\n }\n }\n\n // Adjust the edge distance if it doesn't have the {group} modifier and the endpoint is a junction node\n if (!sourceGroup && db.getNode(source)?.type === 'junction') {\n if (isArchitectureDirectionX(sourceDir)) {\n startX += sourceDir === 'L' ? halfIconSize : -halfIconSize;\n } else {\n startY += sourceDir === 'T' ? halfIconSize : -halfIconSize;\n }\n }\n if (!targetGroup && db.getNode(target)?.type === 'junction') {\n if (isArchitectureDirectionX(targetDir)) {\n endX += targetDir === 'L' ? halfIconSize : -halfIconSize;\n } else {\n endY += targetDir === 'T' ? halfIconSize : -halfIconSize;\n }\n }\n\n if (edge[0]._private.rscratch) {\n // const bounds = edge[0]._private.rscratch;\n\n const g = edgesEl.insert('g');\n\n g.insert('path')\n .attr('d', `M ${startX},${startY} L ${midX},${midY} L${endX},${endY} `)\n .attr('class', 'edge');\n\n if (sourceArrow) {\n const xShift = isArchitectureDirectionX(sourceDir)\n ? ArchitectureDirectionArrowShift[sourceDir](startX, arrowSize)\n : startX - halfArrowSize;\n const yShift = isArchitectureDirectionY(sourceDir)\n ? ArchitectureDirectionArrowShift[sourceDir](startY, arrowSize)\n : startY - halfArrowSize;\n\n g.insert('polygon')\n .attr('points', ArchitectureDirectionArrow[sourceDir](arrowSize))\n .attr('transform', `translate(${xShift},${yShift})`)\n .attr('class', 'arrow');\n }\n if (targetArrow) {\n const xShift = isArchitectureDirectionX(targetDir)\n ? ArchitectureDirectionArrowShift[targetDir](endX, arrowSize)\n : endX - halfArrowSize;\n const yShift = isArchitectureDirectionY(targetDir)\n ? ArchitectureDirectionArrowShift[targetDir](endY, arrowSize)\n : endY - halfArrowSize;\n\n g.insert('polygon')\n .attr('points', ArchitectureDirectionArrow[targetDir](arrowSize))\n .attr('transform', `translate(${xShift},${yShift})`)\n .attr('class', 'arrow');\n }\n\n if (label) {\n const axis = !isArchitectureDirectionXY(sourceDir, targetDir)\n ? isArchitectureDirectionX(sourceDir)\n ? 'X'\n : 'Y'\n : 'XY';\n\n let width = 0;\n if (axis === 'X') {\n width = Math.abs(startX - endX);\n } else if (axis === 'Y') {\n // Reduce width by a factor of 1.5 to avoid overlapping service labels\n width = Math.abs(startY - endY) / 1.5;\n } else {\n width = Math.abs(startX - endX) / 2;\n }\n\n const textElem = g.append('g');\n await createText(\n textElem,\n label,\n {\n useHtmlLabels: false,\n width,\n classes: 'architecture-service-label',\n },\n getConfig()\n );\n\n textElem\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle');\n\n if (axis === 'X') {\n textElem.attr('transform', 'translate(' + midX + ', ' + midY + ')');\n } else if (axis === 'Y') {\n textElem.attr('transform', 'translate(' + midX + ', ' + midY + ') rotate(-90)');\n } else if (axis === 'XY') {\n const pair = getArchitectureDirectionPair(sourceDir, targetDir);\n if (pair && isArchitecturePairXY(pair)) {\n const bboxOrig = textElem.node().getBoundingClientRect();\n const [x, y] = getArchitectureDirectionXYFactors(pair);\n\n textElem\n .attr('dominant-baseline', 'auto')\n .attr('transform', `rotate(${-1 * x * y * 45})`);\n\n // Calculate the new width/height with the rotation applied, and transform to the proper position\n const bboxNew = textElem.node().getBoundingClientRect();\n textElem.attr(\n 'transform',\n `\n translate(${midX}, ${midY - bboxOrig.height / 2})\n translate(${(x * bboxNew.width) / 2}, ${(y * bboxNew.height) / 2})\n rotate(${-1 * x * y * 45}, 0, ${bboxOrig.height / 2})\n `\n );\n }\n }\n }\n }\n })\n );\n};\n\nexport const drawGroups = async function (groupsEl: D3Element, cy: cytoscape.Core) {\n const padding = getConfigField('padding');\n const groupIconSize = padding * 0.75;\n\n const fontSize = getConfigField('fontSize');\n\n const iconSize = getConfigField('iconSize');\n const halfIconSize = iconSize / 2;\n\n await Promise.all(\n cy.nodes().map(async (node) => {\n const data = nodeData(node);\n if (data.type === 'group') {\n const { h, w, x1, y1 } = node.boundingBox();\n\n groupsEl\n .append('rect')\n .attr('x', x1 + halfIconSize)\n .attr('y', y1 + halfIconSize)\n .attr('width', w)\n .attr('height', h)\n .attr('class', 'node-bkg');\n\n const groupLabelContainer = groupsEl.append('g');\n let shiftedX1 = x1;\n let shiftedY1 = y1;\n if (data.icon) {\n const bkgElem = groupLabelContainer.append('g');\n bkgElem.html(\n `${await getIconSVG(data.icon, { height: groupIconSize, width: groupIconSize, fallbackPrefix: architectureIcons.prefix })}`\n );\n bkgElem.attr(\n 'transform',\n 'translate(' +\n (shiftedX1 + halfIconSize + 1) +\n ', ' +\n (shiftedY1 + halfIconSize + 1) +\n ')'\n );\n shiftedX1 += groupIconSize;\n // TODO: test with more values\n // - 1 - 2 comes from the Y axis transform of the icon and label\n shiftedY1 += fontSize / 2 - 1 - 2;\n }\n if (data.label) {\n const textElem = groupLabelContainer.append('g');\n await createText(\n textElem,\n data.label,\n {\n useHtmlLabels: false,\n width: w,\n classes: 'architecture-service-label',\n },\n getConfig()\n );\n textElem\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'start')\n .attr('text-anchor', 'start');\n\n textElem.attr(\n 'transform',\n 'translate(' +\n (shiftedX1 + halfIconSize + 4) +\n ', ' +\n (shiftedY1 + halfIconSize + 2) +\n ')'\n );\n }\n }\n })\n );\n};\n\nexport const drawServices = async function (\n db: ArchitectureDB,\n elem: D3Element,\n services: ArchitectureService[]\n): Promise {\n for (const service of services) {\n const serviceElem = elem.append('g');\n const iconSize = getConfigField('iconSize');\n\n if (service.title) {\n const textElem = serviceElem.append('g');\n await createText(\n textElem,\n service.title,\n {\n useHtmlLabels: false,\n width: iconSize * 1.5,\n classes: 'architecture-service-label',\n },\n getConfig()\n );\n\n textElem\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle');\n\n textElem.attr('transform', 'translate(' + iconSize / 2 + ', ' + iconSize + ')');\n }\n\n const bkgElem = serviceElem.append('g');\n if (service.icon) {\n // TODO: should a warning be given to end-users saying which icon names are available?\n // if (!isIconNameInUse(service.icon)) {\n // throw new Error(`Invalid SVG Icon name: \"${service.icon}\"`);\n // }\n bkgElem.html(\n `${await getIconSVG(service.icon, { height: iconSize, width: iconSize, fallbackPrefix: architectureIcons.prefix })}`\n );\n } else if (service.iconText) {\n bkgElem.html(\n `${await getIconSVG('blank', { height: iconSize, width: iconSize, fallbackPrefix: architectureIcons.prefix })}`\n );\n const textElemContainer = bkgElem.append('g');\n const fo = textElemContainer\n .append('foreignObject')\n .attr('width', iconSize)\n .attr('height', iconSize);\n const divElem = fo\n .append('div')\n .attr('class', 'node-icon-text')\n .attr('style', `height: ${iconSize}px;`)\n .append('div')\n .html(service.iconText);\n const fontSize =\n parseInt(\n window\n .getComputedStyle(divElem.node(), null)\n .getPropertyValue('font-size')\n .replace(/\\D/g, '')\n ) ?? 16;\n divElem.attr('style', `-webkit-line-clamp: ${Math.floor((iconSize - 2) / fontSize)};`);\n } else {\n bkgElem\n .append('path')\n .attr('class', 'node-bkg')\n .attr('id', 'node-' + service.id)\n .attr(\n 'd',\n `M0 ${iconSize} v${-iconSize} q0,-5 5,-5 h${iconSize} q5,0 5,5 v${iconSize} H0 Z`\n );\n }\n\n serviceElem.attr('class', 'architecture-service');\n\n const { width, height } = serviceElem._groups[0][0].getBBox();\n service.width = width;\n service.height = height;\n db.setElementForId(service.id, serviceElem);\n }\n return 0;\n};\n\nexport const drawJunctions = function (\n db: ArchitectureDB,\n elem: D3Element,\n junctions: ArchitectureJunction[]\n) {\n junctions.forEach((junction) => {\n const junctionElem = elem.append('g');\n const iconSize = getConfigField('iconSize');\n\n const bkgElem = junctionElem.append('g');\n bkgElem\n .append('rect')\n .attr('id', 'node-' + junction.id)\n .attr('fill-opacity', '0')\n .attr('width', iconSize)\n .attr('height', iconSize);\n\n junctionElem.attr('class', 'architecture-junction');\n\n const { width, height } = junctionElem._groups[0][0].getBBox();\n junctionElem.width = width;\n junctionElem.height = height;\n db.setElementForId(junction.id, junctionElem);\n });\n};\n", "import { registerIconPacks } from '../../rendering-util/icons.js';\nimport type { Position } from 'cytoscape';\nimport cytoscape from 'cytoscape';\nimport type { FcoseLayoutOptions } from 'cytoscape-fcose';\nimport fcose from 'cytoscape-fcose';\nimport { select } from 'd3';\nimport type { DrawDefinition, SVG } from '../../diagram-api/types.js';\nimport type { Diagram } from '../../Diagram.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport { getConfigField } from './architectureDb.js';\nimport { architectureIcons } from './architectureIcons.js';\nimport type {\n ArchitectureDataStructures,\n ArchitectureJunction,\n ArchitectureSpatialMap,\n EdgeSingular,\n EdgeSingularData,\n NodeSingularData,\n} from './architectureTypes.js';\nimport {\n type ArchitectureDB,\n type ArchitectureDirection,\n type ArchitectureEdge,\n type ArchitectureGroup,\n type ArchitectureService,\n ArchitectureDirectionName,\n edgeData,\n getOppositeArchitectureDirection,\n isArchitectureDirectionXY,\n isArchitectureDirectionY,\n nodeData,\n} from './architectureTypes.js';\nimport { drawEdges, drawGroups, drawJunctions, drawServices } from './svgDraw.js';\n\nregisterIconPacks([\n {\n name: architectureIcons.prefix,\n icons: architectureIcons,\n },\n]);\ncytoscape.use(fcose);\n\nfunction addServices(services: ArchitectureService[], cy: cytoscape.Core) {\n services.forEach((service) => {\n cy.add({\n group: 'nodes',\n data: {\n type: 'service',\n id: service.id,\n icon: service.icon,\n label: service.title,\n parent: service.in,\n width: getConfigField('iconSize'),\n height: getConfigField('iconSize'),\n } as NodeSingularData,\n classes: 'node-service',\n });\n });\n}\n\nfunction addJunctions(junctions: ArchitectureJunction[], cy: cytoscape.Core) {\n junctions.forEach((junction) => {\n cy.add({\n group: 'nodes',\n data: {\n type: 'junction',\n id: junction.id,\n parent: junction.in,\n width: getConfigField('iconSize'),\n height: getConfigField('iconSize'),\n } as NodeSingularData,\n classes: 'node-junction',\n });\n });\n}\n\nfunction positionNodes(db: ArchitectureDB, cy: cytoscape.Core) {\n cy.nodes().map((node) => {\n const data = nodeData(node);\n if (data.type === 'group') {\n return;\n }\n data.x = node.position().x;\n data.y = node.position().y;\n\n const nodeElem = db.getElementById(data.id);\n nodeElem.attr('transform', 'translate(' + (data.x || 0) + ',' + (data.y || 0) + ')');\n });\n}\n\nfunction addGroups(groups: ArchitectureGroup[], cy: cytoscape.Core) {\n groups.forEach((group) => {\n cy.add({\n group: 'nodes',\n data: {\n type: 'group',\n id: group.id,\n icon: group.icon,\n label: group.title,\n parent: group.in,\n } as NodeSingularData,\n classes: 'node-group',\n });\n });\n}\n\nfunction addEdges(edges: ArchitectureEdge[], cy: cytoscape.Core) {\n edges.forEach((parsedEdge) => {\n const { lhsId, rhsId, lhsInto, lhsGroup, rhsInto, lhsDir, rhsDir, rhsGroup, title } =\n parsedEdge;\n const edgeType = isArchitectureDirectionXY(parsedEdge.lhsDir, parsedEdge.rhsDir)\n ? 'segments'\n : 'straight';\n const edge: EdgeSingularData = {\n id: `${lhsId}-${rhsId}`,\n label: title,\n source: lhsId,\n sourceDir: lhsDir,\n sourceArrow: lhsInto,\n sourceGroup: lhsGroup,\n sourceEndpoint:\n lhsDir === 'L'\n ? '0 50%'\n : lhsDir === 'R'\n ? '100% 50%'\n : lhsDir === 'T'\n ? '50% 0'\n : '50% 100%',\n target: rhsId,\n targetDir: rhsDir,\n targetArrow: rhsInto,\n targetGroup: rhsGroup,\n targetEndpoint:\n rhsDir === 'L'\n ? '0 50%'\n : rhsDir === 'R'\n ? '100% 50%'\n : rhsDir === 'T'\n ? '50% 0'\n : '50% 100%',\n };\n cy.add({\n group: 'edges',\n data: edge,\n classes: edgeType,\n });\n });\n}\n\nfunction getAlignments(spatialMaps: ArchitectureSpatialMap[]): fcose.FcoseAlignmentConstraint {\n const alignments = spatialMaps.map((spatialMap) => {\n const horizontalAlignments: Record = {};\n const verticalAlignments: Record = {};\n // Group service ids in an object with their x and y coordinate as the key\n Object.entries(spatialMap).forEach(([id, [x, y]]) => {\n if (!horizontalAlignments[y]) {\n horizontalAlignments[y] = [];\n }\n if (!verticalAlignments[x]) {\n verticalAlignments[x] = [];\n }\n horizontalAlignments[y].push(id);\n verticalAlignments[x].push(id);\n });\n // Merge the values of each object into a list if the inner list has at least 2 elements\n return {\n horiz: Object.values(horizontalAlignments).filter((arr) => arr.length > 1),\n vert: Object.values(verticalAlignments).filter((arr) => arr.length > 1),\n };\n });\n\n // Merge the alignment lists for each spatial map into one 2d array per axis\n const [horizontal, vertical] = alignments.reduce(\n ([prevHoriz, prevVert], { horiz, vert }) => {\n return [\n [...prevHoriz, ...horiz],\n [...prevVert, ...vert],\n ];\n },\n [[] as string[][], [] as string[][]]\n );\n\n return {\n horizontal,\n vertical,\n };\n}\n\nfunction getRelativeConstraints(\n spatialMaps: ArchitectureSpatialMap[]\n): fcose.FcoseRelativePlacementConstraint[] {\n const relativeConstraints: fcose.FcoseRelativePlacementConstraint[] = [];\n const posToStr = (pos: number[]) => `${pos[0]},${pos[1]}`;\n const strToPos = (pos: string) => pos.split(',').map((p) => parseInt(p));\n\n spatialMaps.forEach((spatialMap) => {\n const invSpatialMap = Object.fromEntries(\n Object.entries(spatialMap).map(([id, pos]) => [posToStr(pos), id])\n );\n\n // perform BFS\n const queue = [posToStr([0, 0])];\n const visited: Record = {};\n const directions: Record = {\n L: [-1, 0],\n R: [1, 0],\n T: [0, 1],\n B: [0, -1],\n };\n while (queue.length > 0) {\n const curr = queue.shift();\n if (curr) {\n visited[curr] = 1;\n const currId = invSpatialMap[curr];\n if (currId) {\n const currPos = strToPos(curr);\n Object.entries(directions).forEach(([dir, shift]) => {\n const newPos = posToStr([currPos[0] + shift[0], currPos[1] + shift[1]]);\n const newId = invSpatialMap[newPos];\n // If there is an adjacent service to the current one and it has not yet been visited\n if (newId && !visited[newPos]) {\n queue.push(newPos);\n // @ts-ignore cannot determine if left/right or top/bottom are paired together\n relativeConstraints.push({\n [ArchitectureDirectionName[dir as ArchitectureDirection]]: newId,\n [ArchitectureDirectionName[\n getOppositeArchitectureDirection(dir as ArchitectureDirection)\n ]]: currId,\n gap: 1.5 * getConfigField('iconSize'),\n });\n }\n });\n }\n }\n }\n });\n return relativeConstraints;\n}\n\nfunction layoutArchitecture(\n services: ArchitectureService[],\n junctions: ArchitectureJunction[],\n groups: ArchitectureGroup[],\n edges: ArchitectureEdge[],\n { spatialMaps }: ArchitectureDataStructures\n): Promise {\n return new Promise((resolve) => {\n const renderEl = select('body').append('div').attr('id', 'cy').attr('style', 'display:none');\n const cy = cytoscape({\n container: document.getElementById('cy'),\n style: [\n {\n selector: 'edge',\n style: {\n 'curve-style': 'straight',\n label: 'data(label)',\n 'source-endpoint': 'data(sourceEndpoint)',\n 'target-endpoint': 'data(targetEndpoint)',\n },\n },\n {\n selector: 'edge.segments',\n style: {\n 'curve-style': 'segments',\n 'segment-weights': '0',\n 'segment-distances': [0.5],\n // @ts-ignore Incorrect library types\n 'edge-distances': 'endpoints',\n 'source-endpoint': 'data(sourceEndpoint)',\n 'target-endpoint': 'data(targetEndpoint)',\n },\n },\n {\n selector: 'node',\n style: {\n // @ts-ignore Incorrect library types\n 'compound-sizing-wrt-labels': 'include',\n },\n },\n {\n selector: 'node[label]',\n style: {\n 'text-valign': 'bottom',\n 'text-halign': 'center',\n 'font-size': `${getConfigField('fontSize')}px`,\n },\n },\n {\n selector: '.node-service',\n style: {\n label: 'data(label)',\n width: 'data(width)',\n height: 'data(height)',\n },\n },\n {\n selector: '.node-junction',\n style: {\n width: 'data(width)',\n height: 'data(height)',\n },\n },\n {\n selector: '.node-group',\n style: {\n // @ts-ignore Incorrect library types\n padding: `${getConfigField('padding')}px`,\n },\n },\n ],\n });\n // Remove element after layout\n renderEl.remove();\n\n addGroups(groups, cy);\n addServices(services, cy);\n addJunctions(junctions, cy);\n addEdges(edges, cy);\n\n // Use the spatial map to create alignment arrays for fcose\n const alignmentConstraint = getAlignments(spatialMaps);\n\n // Create the relative constraints for fcose by using an inverse of the spatial map and performing BFS on it\n const relativePlacementConstraint = getRelativeConstraints(spatialMaps);\n\n const layout = cy.layout({\n name: 'fcose',\n quality: 'proof',\n styleEnabled: false,\n animate: false,\n nodeDimensionsIncludeLabels: false,\n // Adjust the edge parameters if it passes through the border of a group\n // Hacky fix for: https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/issues/67\n idealEdgeLength(edge: EdgeSingular) {\n const [nodeA, nodeB] = edge.connectedNodes();\n const { parent: parentA } = nodeData(nodeA);\n const { parent: parentB } = nodeData(nodeB);\n const elasticity =\n parentA === parentB ? 1.5 * getConfigField('iconSize') : 0.5 * getConfigField('iconSize');\n return elasticity;\n },\n edgeElasticity(edge: EdgeSingular) {\n const [nodeA, nodeB] = edge.connectedNodes();\n const { parent: parentA } = nodeData(nodeA);\n const { parent: parentB } = nodeData(nodeB);\n const elasticity = parentA === parentB ? 0.45 : 0.001;\n return elasticity;\n },\n alignmentConstraint,\n relativePlacementConstraint,\n } as FcoseLayoutOptions);\n\n // Once the diagram has been generated and the service's position cords are set, adjust the XY edges to have a 90deg bend\n layout.one('layoutstop', () => {\n function getSegmentWeights(\n source: Position,\n target: Position,\n pointX: number,\n pointY: number\n ) {\n let W, D;\n const { x: sX, y: sY } = source;\n const { x: tX, y: tY } = target;\n\n D =\n (pointY - sY + ((sX - pointX) * (sY - tY)) / (sX - tX)) /\n Math.sqrt(1 + Math.pow((sY - tY) / (sX - tX), 2));\n W = Math.sqrt(Math.pow(pointY - sY, 2) + Math.pow(pointX - sX, 2) - Math.pow(D, 2));\n\n const distAB = Math.sqrt(Math.pow(tX - sX, 2) + Math.pow(tY - sY, 2));\n W = W / distAB;\n\n //check whether the point (pointX, pointY) is on right or left of the line src to tgt. for instance : a point C(X, Y) and line (AB). d=(xB-xA)(yC-yA)-(yB-yA)(xC-xA). if d>0, then C is on left of the line. if d<0, it is on right. if d=0, it is on the line.\n let delta1 = (tX - sX) * (pointY - sY) - (tY - sY) * (pointX - sX);\n switch (true) {\n case delta1 >= 0:\n delta1 = 1;\n break;\n case delta1 < 0:\n delta1 = -1;\n break;\n }\n //check whether the point (pointX, pointY) is \"behind\" the line src to tgt\n let delta2 = (tX - sX) * (pointX - sX) + (tY - sY) * (pointY - sY);\n switch (true) {\n case delta2 >= 0:\n delta2 = 1;\n break;\n case delta2 < 0:\n delta2 = -1;\n break;\n }\n\n D = Math.abs(D) * delta1; //ensure that sign of D is same as sign of delta1. Hence we need to take absolute value of D and multiply by delta1\n W = W * delta2;\n\n return {\n distances: D,\n weights: W,\n };\n }\n cy.startBatch();\n for (const edge of Object.values(cy.edges())) {\n if (edge.data?.()) {\n const { x: sX, y: sY } = edge.source().position();\n const { x: tX, y: tY } = edge.target().position();\n if (sX !== tX && sY !== tY) {\n const sEP = edge.sourceEndpoint();\n const tEP = edge.targetEndpoint();\n const { sourceDir } = edgeData(edge);\n const [pointX, pointY] = isArchitectureDirectionY(sourceDir)\n ? [sEP.x, tEP.y]\n : [tEP.x, sEP.y];\n const { weights, distances } = getSegmentWeights(sEP, tEP, pointX, pointY);\n edge.style('segment-distances', distances);\n edge.style('segment-weights', weights);\n }\n }\n }\n cy.endBatch();\n layout.run();\n });\n layout.run();\n\n cy.ready((e) => {\n log.info('Ready', e);\n resolve(cy);\n });\n });\n}\n\nexport const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) => {\n const db = diagObj.db as ArchitectureDB;\n\n const services = db.getServices();\n const junctions = db.getJunctions();\n const groups = db.getGroups();\n const edges = db.getEdges();\n const ds = db.getDataStructures();\n\n const svg: SVG = selectSvgElement(id);\n\n const edgesElem = svg.append('g');\n edgesElem.attr('class', 'architecture-edges');\n\n const servicesElem = svg.append('g');\n servicesElem.attr('class', 'architecture-services');\n\n const groupElem = svg.append('g');\n groupElem.attr('class', 'architecture-groups');\n\n await drawServices(db, servicesElem, services);\n drawJunctions(db, servicesElem, junctions);\n\n const cy = await layoutArchitecture(services, junctions, groups, edges, ds);\n\n await drawEdges(edgesElem, cy);\n await drawGroups(groupElem, cy);\n positionNodes(db, cy);\n\n setupGraphViewbox(undefined, svg, getConfigField('padding'), getConfigField('useMaxWidth'));\n};\n\nexport const renderer = { draw };\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { parser } from './architectureParser.js';\nimport { db } from './architectureDb.js';\nimport styles from './architectureStyles.js';\nimport { renderer } from './architectureRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n};\n", "/**\n * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid\n * functionality and to render the diagrams to svg code!\n */\nimport { registerIconPacks } from './rendering-util/icons.js';\nimport { dedent } from 'ts-dedent';\nimport type { MermaidConfig } from './config.type.js';\nimport { detectType, registerLazyLoadedDiagrams } from './diagram-api/detectType.js';\nimport { addDiagrams } from './diagram-api/diagram-orchestration.js';\nimport { loadRegisteredDiagrams } from './diagram-api/loadDiagram.js';\nimport type { ExternalDiagramDefinition, SVG, SVGGroup } from './diagram-api/types.js';\nimport type { ParseErrorFunction } from './Diagram.js';\nimport type { UnknownDiagramError } from './errors.js';\nimport type { InternalHelpers } from './internals.js';\nimport { log } from './logger.js';\nimport { mermaidAPI } from './mermaidAPI.js';\nimport type { LayoutLoaderDefinition, RenderOptions } from './rendering-util/render.js';\nimport { registerLayoutLoaders } from './rendering-util/render.js';\nimport type { LayoutData } from './rendering-util/types.js';\nimport type { ParseOptions, ParseResult, RenderResult } from './types.js';\nimport type { DetailedError } from './utils.js';\nimport utils, { isDetailedError } from './utils.js';\n\nexport type {\n DetailedError,\n ExternalDiagramDefinition,\n InternalHelpers,\n LayoutData,\n LayoutLoaderDefinition,\n MermaidConfig,\n ParseErrorFunction,\n ParseOptions,\n ParseResult,\n RenderOptions,\n RenderResult,\n SVG,\n SVGGroup,\n UnknownDiagramError,\n};\n\nexport interface RunOptions {\n /**\n * The query selector to use when finding elements to render. Default: `\".mermaid\"`.\n */\n querySelector?: string;\n /**\n * The nodes to render. If this is set, `querySelector` will be ignored.\n */\n nodes?: ArrayLike;\n /**\n * A callback to call after each diagram is rendered.\n */\n postRenderCallback?: (id: string) => unknown;\n /**\n * If `true`, errors will be logged to the console, but not thrown. Default: `false`\n */\n suppressErrors?: boolean;\n}\n\nconst handleError = (error: unknown, errors: DetailedError[], parseError?: ParseErrorFunction) => {\n log.warn(error);\n if (isDetailedError(error)) {\n // handle case where error string and hash were\n // wrapped in object like`const error = { str, hash };`\n if (parseError) {\n parseError(error.str, error.hash);\n }\n errors.push({ ...error, message: error.str, error });\n } else {\n // assume it is just error string and pass it on\n if (parseError) {\n parseError(error);\n }\n if (error instanceof Error) {\n errors.push({\n str: error.message,\n message: error.message,\n hash: error.name,\n error,\n });\n }\n }\n};\n\n/**\n * ## run\n *\n * Function that goes through the document to find the chart definitions in there and render them.\n *\n * The function tags the processed attributes with the attribute data-processed and ignores found\n * elements with the attribute already set. This way the init function can be triggered several\n * times.\n *\n * ```mermaid\n * graph LR;\n * a(Find elements)-->b{Processed}\n * b-->|Yes|c(Leave element)\n * b-->|No |d(Transform)\n * ```\n *\n * Renders the mermaid diagrams\n *\n * @param options - Optional runtime configs\n */\nconst run = async function (\n options: RunOptions = {\n querySelector: '.mermaid',\n }\n) {\n try {\n await runThrowsErrors(options);\n } catch (e) {\n if (isDetailedError(e)) {\n log.error(e.str);\n }\n if (mermaid.parseError) {\n mermaid.parseError(e as string);\n }\n if (!options.suppressErrors) {\n log.error('Use the suppressErrors option to suppress these errors');\n throw e;\n }\n }\n};\n\nconst runThrowsErrors = async function (\n { postRenderCallback, querySelector, nodes }: Omit = {\n querySelector: '.mermaid',\n }\n) {\n const conf = mermaidAPI.getConfig();\n\n log.debug(`${!postRenderCallback ? 'No ' : ''}Callback function found`);\n\n let nodesToProcess: ArrayLike;\n if (nodes) {\n nodesToProcess = nodes;\n } else if (querySelector) {\n nodesToProcess = document.querySelectorAll(querySelector);\n } else {\n throw new Error('Nodes and querySelector are both undefined');\n }\n\n log.debug(`Found ${nodesToProcess.length} diagrams`);\n if (conf?.startOnLoad !== undefined) {\n log.debug('Start On Load: ' + conf?.startOnLoad);\n mermaidAPI.updateSiteConfig({ startOnLoad: conf?.startOnLoad });\n }\n\n // generate the id of the diagram\n const idGenerator = new utils.InitIDGenerator(conf.deterministicIds, conf.deterministicIDSeed);\n\n let txt: string;\n const errors: DetailedError[] = [];\n\n // element is the current div with mermaid class\n // eslint-disable-next-line unicorn/prefer-spread\n for (const element of Array.from(nodesToProcess)) {\n log.info('Rendering diagram: ' + element.id);\n /*! Check if previously processed */\n if (element.getAttribute('data-processed')) {\n continue;\n }\n element.setAttribute('data-processed', 'true');\n\n const id = `mermaid-${idGenerator.next()}`;\n\n // Fetch the graph definition including tags\n txt = element.innerHTML;\n\n // transforms the html to pure text\n txt = dedent(utils.entityDecode(txt)) // removes indentation, required for YAML parsing\n .trim()\n .replace(//gi, '
    ');\n\n const init = utils.detectInit(txt);\n if (init) {\n log.debug('Detected early reinit: ', init);\n }\n try {\n const { svg, bindFunctions } = await render(id, txt, element);\n element.innerHTML = svg;\n if (postRenderCallback) {\n await postRenderCallback(id);\n }\n if (bindFunctions) {\n bindFunctions(element);\n }\n } catch (error) {\n handleError(error, errors, mermaid.parseError);\n }\n }\n if (errors.length > 0) {\n // TODO: We should be throwing an error object.\n throw errors[0];\n }\n};\n\n/**\n * Used to set configurations for mermaid.\n * This function should be called before the run function.\n * @param config - Configuration object for mermaid.\n */\n\nconst initialize = function (config: MermaidConfig) {\n mermaidAPI.initialize(config);\n};\n\n/**\n * ## init\n *\n * @deprecated Use {@link initialize} and {@link run} instead.\n *\n * Renders the mermaid diagrams\n *\n * @param config - **Deprecated**, please set configuration in {@link initialize}.\n * @param nodes - **Default**: `.mermaid`. One of the following:\n * - A DOM Node\n * - An array of DOM nodes (as would come from a jQuery selector)\n * - A W3C selector, a la `.mermaid`\n * @param callback - Called once for each rendered diagram's id.\n */\nconst init = async function (\n config?: MermaidConfig,\n nodes?: string | HTMLElement | NodeListOf,\n callback?: (id: string) => unknown\n) {\n log.warn('mermaid.init is deprecated. Please use run instead.');\n if (config) {\n initialize(config);\n }\n const runOptions: RunOptions = { postRenderCallback: callback, querySelector: '.mermaid' };\n if (typeof nodes === 'string') {\n runOptions.querySelector = nodes;\n } else if (nodes) {\n if (nodes instanceof HTMLElement) {\n runOptions.nodes = [nodes];\n } else {\n runOptions.nodes = nodes;\n }\n }\n await run(runOptions);\n};\n\n/**\n * Used to register external diagram types.\n * @param diagrams - Array of {@link ExternalDiagramDefinition}.\n * @param opts - If opts.lazyLoad is false, the diagrams will be loaded immediately.\n */\nconst registerExternalDiagrams = async (\n diagrams: ExternalDiagramDefinition[],\n {\n lazyLoad = true,\n }: {\n lazyLoad?: boolean;\n } = {}\n) => {\n addDiagrams();\n registerLazyLoadedDiagrams(...diagrams);\n if (lazyLoad === false) {\n await loadRegisteredDiagrams();\n }\n};\n\n/**\n * ##contentLoaded Callback function that is called when page is loaded. This functions fetches\n * configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the\n * page.\n */\nconst contentLoaded = function () {\n if (mermaid.startOnLoad) {\n const { startOnLoad } = mermaidAPI.getConfig();\n if (startOnLoad) {\n mermaid.run().catch((err) => log.error('Mermaid failed to initialize', err));\n }\n }\n};\n\nif (typeof document !== 'undefined') {\n /*!\n * Wait for document loaded before starting the execution\n */\n window.addEventListener('load', contentLoaded, false);\n}\n\n/**\n * ## setParseErrorHandler Alternative to directly setting parseError using:\n *\n * ```js\n * mermaid.parseError = function(err,hash) {\n * forExampleDisplayErrorInGui(err); // do something with the error\n * };\n * ```\n *\n * This is provided for environments where the mermaid object can't directly have a new member added\n * to it (eg. dart interop wrapper). (Initially there is no parseError member of mermaid).\n *\n * @param parseErrorHandler - New parseError() callback.\n */\nconst setParseErrorHandler = function (parseErrorHandler: (err: any, hash: any) => void) {\n mermaid.parseError = parseErrorHandler;\n};\n\nconst executionQueue: (() => Promise)[] = [];\nlet executionQueueRunning = false;\nconst executeQueue = async () => {\n if (executionQueueRunning) {\n return;\n }\n executionQueueRunning = true;\n while (executionQueue.length > 0) {\n const f = executionQueue.shift();\n if (f) {\n try {\n await f();\n } catch (e) {\n log.error('Error executing queue', e);\n }\n }\n }\n executionQueueRunning = false;\n};\n\n/**\n * Parse the text and validate the syntax.\n * @param text - The mermaid diagram definition.\n * @param parseOptions - Options for parsing. @see {@link ParseOptions}\n * @returns If valid, {@link ParseResult} otherwise `false` if parseOptions.suppressErrors is `true`.\n * @throws Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.\n *\n * @example\n * ```js\n * console.log(await mermaid.parse('flowchart \\n a --> b'));\n * // { diagramType: 'flowchart-v2' }\n * console.log(await mermaid.parse('wrong \\n a --> b', { suppressErrors: true }));\n * // false\n * console.log(await mermaid.parse('wrong \\n a --> b', { suppressErrors: false }));\n * // throws Error\n * console.log(await mermaid.parse('wrong \\n a --> b'));\n * // throws Error\n * ```\n */\nconst parse: typeof mermaidAPI.parse = async (text, parseOptions) => {\n return new Promise((resolve, reject) => {\n // This promise will resolve when the render call is done.\n // It will be queued first and will be executed when it is first in line\n const performCall = () =>\n new Promise((res, rej) => {\n mermaidAPI.parse(text, parseOptions).then(\n (r) => {\n // This resolves for the promise for the queue handling\n res(r);\n // This fulfills the promise sent to the value back to the original caller\n resolve(r);\n },\n (e) => {\n log.error('Error parsing', e);\n mermaid.parseError?.(e);\n rej(e);\n reject(e);\n }\n );\n });\n executionQueue.push(performCall);\n executeQueue().catch(reject);\n });\n};\n\n/**\n * Function that renders an svg with a graph from a chart definition. Usage example below.\n *\n * ```javascript\n * element = document.querySelector('#graphDiv');\n * const graphDefinition = 'graph TB\\na-->b';\n * const { svg, bindFunctions } = await mermaid.render('graphDiv', graphDefinition);\n * element.innerHTML = svg;\n * bindFunctions?.(element);\n * ```\n *\n * @remarks\n * Multiple calls to this function will be enqueued to run serially.\n *\n * @param id - The id for the SVG element (the element to be rendered)\n * @param text - The text for the graph definition\n * @param container - HTML element where the svg will be inserted. (Is usually element with the .mermaid class)\n * If no svgContainingElement is provided then the SVG element will be appended to the body.\n * Selector to element in which a div with the graph temporarily will be\n * inserted. If one is provided a hidden div will be inserted in the body of the page instead. The\n * element will be removed when rendering is completed.\n * @returns Returns the SVG Definition and BindFunctions.\n */\nconst render: typeof mermaidAPI.render = (id, text, container) => {\n return new Promise((resolve, reject) => {\n // This promise will resolve when the mermaidAPI.render call is done.\n // It will be queued first and will be executed when it is first in line\n const performCall = () =>\n new Promise((res, rej) => {\n mermaidAPI.render(id, text, container).then(\n (r) => {\n // This resolves for the promise for the queue handling\n res(r);\n // This fulfills the promise sent to the value back to the original caller\n resolve(r);\n },\n (e) => {\n log.error('Error parsing', e);\n mermaid.parseError?.(e);\n rej(e);\n reject(e);\n }\n );\n });\n executionQueue.push(performCall);\n executeQueue().catch(reject);\n });\n};\n\nexport interface Mermaid {\n startOnLoad: boolean;\n parseError?: ParseErrorFunction;\n /**\n * @deprecated Use {@link parse} and {@link render} instead. Please [open a discussion](https://github.com/mermaid-js/mermaid/discussions) if your use case does not fit the new API.\n * @internal\n */\n mermaidAPI: typeof mermaidAPI;\n parse: typeof parse;\n render: typeof render;\n /**\n * @deprecated Use {@link initialize} and {@link run} instead.\n */\n init: typeof init;\n run: typeof run;\n registerLayoutLoaders: typeof registerLayoutLoaders;\n registerExternalDiagrams: typeof registerExternalDiagrams;\n initialize: typeof initialize;\n contentLoaded: typeof contentLoaded;\n setParseErrorHandler: typeof setParseErrorHandler;\n detectType: typeof detectType;\n registerIconPacks: typeof registerIconPacks;\n}\n\nconst mermaid: Mermaid = {\n startOnLoad: true,\n mermaidAPI,\n parse,\n render,\n init,\n run,\n registerExternalDiagrams,\n registerLayoutLoaders,\n initialize,\n parseError: undefined,\n contentLoaded,\n setParseErrorHandler,\n detectType,\n registerIconPacks,\n};\n\nexport default mermaid;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'c4';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./c4Diagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'flowchart';\n\nconst detector: DiagramDetector = (txt, config) => {\n // If we have conferred to only use new flow charts this function should always return false\n // as in not signalling true for a legacy flowchart\n if (\n config?.flowchart?.defaultRenderer === 'dagre-wrapper' ||\n config?.flowchart?.defaultRenderer === 'elk'\n ) {\n return false;\n }\n return /^\\s*graph/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./flowDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'flowchart-v2';\n\nconst detector: DiagramDetector = (txt, config) => {\n if (config?.flowchart?.defaultRenderer === 'dagre-d3') {\n return false;\n }\n\n if (config?.flowchart?.defaultRenderer === 'elk') {\n config.layout = 'elk';\n }\n\n // If we have configured to use dagre-wrapper then we should return true in this function for graph code thus making it use the new flowchart diagram\n if (/^\\s*graph/.test(txt) && config?.flowchart?.defaultRenderer === 'dagre-wrapper') {\n return true;\n }\n return /^\\s*flowchart/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./flowDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'er';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*erDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./erDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type { DiagramDetector, DiagramLoader } from '../../diagram-api/types.js';\nimport type { ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'gitGraph';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*gitGraph/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./gitGraphDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'gantt';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*gantt/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./ganttDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'info';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*info/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./infoDiagram.js');\n return { id, diagram };\n};\n\nexport const info: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'pie';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*pie/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./pieDiagram.js');\n return { id, diagram };\n};\n\nexport const pie: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'quadrantChart';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*quadrantChart/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./quadrantDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'xychart';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*xychart-beta/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./xychartDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'requirement';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*requirement(Diagram)?/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./requirementDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'sequence';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*sequenceDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./sequenceDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'class';\n\nconst detector: DiagramDetector = (txt, config) => {\n // If we have configured to use dagre-wrapper then we should never return true in this function\n if (config?.class?.defaultRenderer === 'dagre-wrapper') {\n return false;\n }\n // We have not opted to use the new renderer so we should return true if we detect a class diagram\n return /^\\s*classDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./classDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'classDiagram';\n\nconst detector: DiagramDetector = (txt, config) => {\n // If we have configured to use dagre-wrapper then we should return true in this function for classDiagram code thus making it use the new class diagram\n if (/^\\s*classDiagram/.test(txt) && config?.class?.defaultRenderer === 'dagre-wrapper') {\n return true;\n }\n // We have not opted to use the new renderer so we should return true if we detect a class diagram\n return /^\\s*classDiagram-v2/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./classDiagram-v2.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'state';\n\nconst detector: DiagramDetector = (txt, config) => {\n // If we have confirmed to only use new state diagrams this function should always return false\n // as in not signalling true for a legacy state diagram\n if (config?.state?.defaultRenderer === 'dagre-wrapper') {\n return false;\n }\n return /^\\s*stateDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./stateDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'stateDiagram';\n\nconst detector: DiagramDetector = (txt, config) => {\n if (/^\\s*stateDiagram-v2/.test(txt)) {\n return true;\n }\n if (/^\\s*stateDiagram/.test(txt) && config?.state?.defaultRenderer === 'dagre-wrapper') {\n return true;\n }\n return false;\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./stateDiagram-v2.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'journey';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*journey/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./journeyDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type { SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\n/**\n * Draws an info picture in the tag with id: id based on the graph definition in text.\n *\n * @param _text - Mermaid graph definition.\n * @param id - The text for the error\n * @param version - The version\n */\nexport const draw = (_text: string, id: string, version: string) => {\n log.debug('rendering svg for syntax error\\n');\n const svg: SVG = selectSvgElement(id);\n const g: SVGGroup = svg.append('g');\n\n svg.attr('viewBox', '0 0 2412 512');\n configureSvgSize(svg, 100, 512, true);\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z'\n );\n\n g.append('text') // text label for the x axis\n .attr('class', 'error-text')\n .attr('x', 1440)\n .attr('y', 250)\n .attr('font-size', '150px')\n .style('text-anchor', 'middle')\n .text('Syntax error in text');\n g.append('text') // text label for the x axis\n .attr('class', 'error-text')\n .attr('x', 1250)\n .attr('y', 400)\n .attr('font-size', '100px')\n .style('text-anchor', 'middle')\n .text(`mermaid version ${version}`);\n};\n\nexport const renderer = { draw };\n\nexport default renderer;\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { renderer } from './errorRenderer.js';\n\nconst diagram: DiagramDefinition = {\n db: {},\n renderer,\n parser: {\n parse: (): void => {\n return;\n },\n },\n};\n\nexport default diagram;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../../diagram-api/types.js';\n\nconst id = 'flowchart-elk';\n\nconst detector: DiagramDetector = (txt, config = {}): boolean => {\n if (\n // If diagram explicitly states flowchart-elk\n /^\\s*flowchart-elk/.test(txt) ||\n // If a flowchart/graph diagram has their default renderer set to elk\n (/^\\s*flowchart|graph/.test(txt) && config?.flowchart?.defaultRenderer === 'elk')\n ) {\n config.layout = 'elk';\n return true;\n }\n return false;\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('../flowDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'timeline';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*timeline/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./timeline-definition.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\nconst id = 'mindmap';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*mindmap/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./mindmap-definition.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\nconst id = 'kanban';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*kanban/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./kanban-definition.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type { DiagramDetector, ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'sankey';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*sankey-beta/.test(txt);\n};\n\nconst loader = async () => {\n const { diagram } = await import('./sankeyDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'packet';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*packet-beta/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./diagram.js');\n return { id, diagram };\n};\n\nexport const packet: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n", "import type { DiagramDetector, ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'block';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*block-beta/.test(txt);\n};\n\nconst loader = async () => {\n const { diagram } = await import('./blockDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'architecture';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*architecture/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./architectureDiagram.js');\n return { id, diagram };\n};\n\nconst architecture: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default architecture;\n", "import c4 from '../diagrams/c4/c4Detector.js';\nimport flowchart from '../diagrams/flowchart/flowDetector.js';\nimport flowchartV2 from '../diagrams/flowchart/flowDetector-v2.js';\nimport er from '../diagrams/er/erDetector.js';\nimport git from '../diagrams/git/gitGraphDetector.js';\nimport gantt from '../diagrams/gantt/ganttDetector.js';\nimport { info } from '../diagrams/info/infoDetector.js';\nimport { pie } from '../diagrams/pie/pieDetector.js';\nimport quadrantChart from '../diagrams/quadrant-chart/quadrantDetector.js';\nimport xychart from '../diagrams/xychart/xychartDetector.js';\nimport requirement from '../diagrams/requirement/requirementDetector.js';\nimport sequence from '../diagrams/sequence/sequenceDetector.js';\nimport classDiagram from '../diagrams/class/classDetector.js';\nimport classDiagramV2 from '../diagrams/class/classDetector-V2.js';\nimport state from '../diagrams/state/stateDetector.js';\nimport stateV2 from '../diagrams/state/stateDetector-V2.js';\nimport journey from '../diagrams/user-journey/journeyDetector.js';\nimport errorDiagram from '../diagrams/error/errorDiagram.js';\nimport flowchartElk from '../diagrams/flowchart/elk/detector.js';\nimport timeline from '../diagrams/timeline/detector.js';\nimport mindmap from '../diagrams/mindmap/detector.js';\nimport kanban from '../diagrams/kanban/detector.js';\nimport sankey from '../diagrams/sankey/sankeyDetector.js';\nimport { packet } from '../diagrams/packet/detector.js';\nimport block from '../diagrams/block/blockDetector.js';\nimport architecture from '../diagrams/architecture/architectureDetector.js';\nimport { registerLazyLoadedDiagrams } from './detectType.js';\nimport { registerDiagram } from './diagramAPI.js';\n\nlet hasLoadedDiagrams = false;\nexport const addDiagrams = () => {\n if (hasLoadedDiagrams) {\n return;\n }\n // This is added here to avoid race-conditions.\n // We could optimize the loading logic somehow.\n hasLoadedDiagrams = true;\n registerDiagram('error', errorDiagram, (text) => {\n return text.toLowerCase().trim() === 'error';\n });\n registerDiagram(\n '---',\n // --- diagram type may appear if YAML front-matter is not parsed correctly\n {\n db: {\n clear: () => {\n // Quite ok, clear needs to be there for --- to work as a regular diagram\n },\n },\n styles: {}, // should never be used\n renderer: {\n draw: () => {\n // should never be used\n },\n },\n parser: {\n parse: () => {\n throw new Error(\n 'Diagrams beginning with --- are not valid. ' +\n 'If you were trying to use a YAML front-matter, please ensure that ' +\n \"you've correctly opened and closed the YAML front-matter with un-indented `---` blocks\"\n );\n },\n },\n init: () => null, // no op\n },\n (text) => {\n return text.toLowerCase().trimStart().startsWith('---');\n }\n );\n // Ordering of detectors is important. The first one to return true will be used.\n registerLazyLoadedDiagrams(\n c4,\n kanban,\n classDiagramV2,\n classDiagram,\n er,\n gantt,\n info,\n pie,\n requirement,\n sequence,\n flowchartElk,\n flowchartV2,\n flowchart,\n mindmap,\n timeline,\n git,\n stateV2,\n state,\n journey,\n quadrantChart,\n sankey,\n packet,\n xychart,\n block,\n architecture\n );\n};\n", "import { log } from '../logger.js';\nimport { detectors } from './detectType.js';\nimport { getDiagram, registerDiagram } from './diagramAPI.js';\n\nexport const loadRegisteredDiagrams = async () => {\n log.debug(`Loading registered diagrams`);\n // Load all lazy loaded diagrams in parallel\n const results = await Promise.allSettled(\n Object.entries(detectors).map(async ([key, { detector, loader }]) => {\n if (loader) {\n try {\n getDiagram(key);\n } catch {\n try {\n // Register diagram if it is not already registered\n const { diagram, id } = await loader();\n registerDiagram(id, diagram, detector);\n } catch (err) {\n // Remove failed diagram from detectors\n log.error(`Failed to load external diagram with key ${key}. Removing from detectors.`);\n delete detectors[key];\n throw err;\n }\n }\n }\n })\n );\n const failed = results.filter((result) => result.status === 'rejected');\n if (failed.length > 0) {\n log.error(`Failed to load ${failed.length} external diagrams`);\n for (const res of failed) {\n log.error(res);\n }\n throw new Error(`Failed to load ${failed.length} external diagrams`);\n }\n};\n", "/**\n * This file contains functions that are used internally by mermaid\n * and is not intended to be used by the end user.\n */\n// @ts-ignore TODO: Investigate D3 issue\nimport { select } from 'd3';\nimport { compile, serialize, stringify } from 'stylis';\n// @ts-ignore: TODO Fix ts errors\nimport DOMPurify from 'dompurify';\nimport isEmpty from 'lodash-es/isEmpty.js';\nimport { version } from '../package.json';\nimport { addSVGa11yTitleDescription, setA11yDiagramInfo } from './accessibility.js';\nimport assignWithDepth from './assignWithDepth.js';\nimport * as configApi from './config.js';\nimport type { MermaidConfig } from './config.type.js';\nimport { addDiagrams } from './diagram-api/diagram-orchestration.js';\nimport type { DiagramMetadata, DiagramStyleClassDef } from './diagram-api/types.js';\nimport { Diagram } from './Diagram.js';\nimport { evaluate } from './diagrams/common/common.js';\nimport errorRenderer from './diagrams/error/errorRenderer.js';\nimport { attachFunctions } from './interactionDb.js';\nimport { log, setLogLevel } from './logger.js';\nimport { preprocessDiagram } from './preprocess.js';\nimport getStyles from './styles.js';\nimport theme from './themes/index.js';\nimport type { D3Element, ParseOptions, ParseResult, RenderResult } from './types.js';\nimport { decodeEntities } from './utils.js';\nimport { toBase64 } from './utils/base64.js';\n\nconst MAX_TEXTLENGTH = 50_000;\nconst MAX_TEXTLENGTH_EXCEEDED_MSG =\n 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';\n\nconst SECURITY_LVL_SANDBOX = 'sandbox';\nconst SECURITY_LVL_LOOSE = 'loose';\n\nconst XMLNS_SVG_STD = 'http://www.w3.org/2000/svg';\nconst XMLNS_XLINK_STD = 'http://www.w3.org/1999/xlink';\nconst XMLNS_XHTML_STD = 'http://www.w3.org/1999/xhtml';\n\n// ------------------------------\n// iFrame\nconst IFRAME_WIDTH = '100%';\nconst IFRAME_HEIGHT = '100%';\nconst IFRAME_STYLES = 'border:0;margin:0;';\nconst IFRAME_BODY_STYLE = 'margin:0';\nconst IFRAME_SANDBOX_OPTS = 'allow-top-navigation-by-user-activation allow-popups';\nconst IFRAME_NOT_SUPPORTED_MSG = 'The \"iframe\" tag is not supported by your browser.';\n\n// DOMPurify settings for svgCode\nconst DOMPURIFY_TAGS = ['foreignobject'];\nconst DOMPURIFY_ATTR = ['dominant-baseline'];\n\nfunction processAndSetConfigs(text: string) {\n const processed = preprocessDiagram(text);\n configApi.reset();\n configApi.addDirective(processed.config ?? {});\n return processed;\n}\n\n/**\n * Parse the text and validate the syntax.\n * @param text - The mermaid diagram definition.\n * @param parseOptions - Options for parsing. @see {@link ParseOptions}\n * @returns An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.\n * @throws Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.\n */\nasync function parse(\n text: string,\n parseOptions: ParseOptions & { suppressErrors: true }\n): Promise;\nasync function parse(text: string, parseOptions?: ParseOptions): Promise;\nasync function parse(text: string, parseOptions?: ParseOptions): Promise {\n addDiagrams();\n try {\n const { code, config } = processAndSetConfigs(text);\n const diagram = await getDiagramFromText(code);\n return { diagramType: diagram.type, config };\n } catch (error) {\n if (parseOptions?.suppressErrors) {\n return false;\n }\n throw error;\n }\n}\n\n/**\n * Create a CSS style that starts with the given class name, then the element,\n * with an enclosing block that has each of the cssClasses followed by !important;\n * @param cssClass - CSS class name\n * @param element - CSS element\n * @param cssClasses - list of CSS styles to append after the element\n * @returns - the constructed string\n */\nexport const cssImportantStyles = (\n cssClass: string,\n element: string,\n cssClasses: string[] = []\n): string => {\n return `\\n.${cssClass} ${element} { ${cssClasses.join(' !important; ')} !important; }`;\n};\n\n/**\n * Create the user styles\n * @internal\n * @param config - configuration that has style and theme settings to use\n * @param classDefs - the classDefs in the diagram text. Might be null if none were defined. Usually is the result of a call to getClasses(...)\n * @returns the string with all the user styles\n */\nexport const createCssStyles = (\n config: MermaidConfig,\n classDefs: Map | null | undefined = new Map()\n): string => {\n let cssStyles = '';\n\n // user provided theme CSS info\n // If you add more configuration driven data into the user styles make sure that the value is\n // sanitized by the sanitize CSS function TODO where is this method? what should be used to replace it? refactor so that it's always sanitized\n if (config.themeCSS !== undefined) {\n cssStyles += `\\n${config.themeCSS}`;\n }\n\n if (config.fontFamily !== undefined) {\n cssStyles += `\\n:root { --mermaid-font-family: ${config.fontFamily}}`;\n }\n if (config.altFontFamily !== undefined) {\n cssStyles += `\\n:root { --mermaid-alt-font-family: ${config.altFontFamily}}`;\n }\n\n // classDefs defined in the diagram text\n if (classDefs instanceof Map) {\n const htmlLabels = config.htmlLabels ?? config.flowchart?.htmlLabels; // TODO why specifically check the Flowchart diagram config?\n\n const cssHtmlElements = ['> *', 'span']; // TODO make a constant\n const cssShapeElements = ['rect', 'polygon', 'ellipse', 'circle', 'path']; // TODO make a constant\n\n const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements;\n\n // create the CSS styles needed for each styleClass definition and css element\n classDefs.forEach((styleClassDef) => {\n // create the css styles for each cssElement and the styles (only if there are styles)\n if (!isEmpty(styleClassDef.styles)) {\n cssElements.forEach((cssElement) => {\n cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles);\n });\n }\n // create the css styles for the tspan element and the text styles (only if there are textStyles)\n if (!isEmpty(styleClassDef.textStyles)) {\n cssStyles += cssImportantStyles(\n styleClassDef.id,\n 'tspan',\n (styleClassDef?.textStyles || []).map((s) => s.replace('color', 'fill'))\n );\n }\n });\n }\n return cssStyles;\n};\n\nexport const createUserStyles = (\n config: MermaidConfig,\n graphType: string,\n classDefs: Map | undefined,\n svgId: string\n): string => {\n const userCSSstyles = createCssStyles(config, classDefs);\n const allStyles = getStyles(graphType, userCSSstyles, config.themeVariables);\n\n // Now turn all of the styles into a (compiled) string that starts with the id\n // use the stylis library to compile the css, turn the results into a valid CSS string (serialize(...., stringify))\n // @see https://github.com/thysultan/stylis\n return serialize(compile(`${svgId}{${allStyles}}`), stringify);\n};\n\n/**\n * Clean up svgCode. Do replacements needed\n *\n * @param svgCode - the code to clean up\n * @param inSandboxMode - security level\n * @param useArrowMarkerUrls - should arrow marker's use full urls? (vs. just the anchors)\n * @returns the cleaned up svgCode\n */\nexport const cleanUpSvgCode = (\n svgCode = '',\n inSandboxMode: boolean,\n useArrowMarkerUrls: boolean\n): string => {\n let cleanedUpSvg = svgCode;\n\n // Replace marker-end urls with just the # anchor (remove the preceding part of the URL)\n if (!useArrowMarkerUrls && !inSandboxMode) {\n cleanedUpSvg = cleanedUpSvg.replace(\n /marker-end=\"url\\([\\d+./:=?A-Za-z-]*?#/g,\n 'marker-end=\"url(#'\n );\n }\n\n cleanedUpSvg = decodeEntities(cleanedUpSvg);\n\n // replace old br tags with newer style\n cleanedUpSvg = cleanedUpSvg.replace(/
    /g, '
    ');\n\n return cleanedUpSvg;\n};\n\n/**\n * Put the svgCode into an iFrame. Return the iFrame code\n *\n * @param svgCode - the svg code to put inside the iFrame\n * @param svgElement - the d3 node that has the current svgElement so we can get the height from it\n * @returns - the code with the iFrame that now contains the svgCode\n */\nexport const putIntoIFrame = (svgCode = '', svgElement?: D3Element): string => {\n const height = svgElement?.viewBox?.baseVal?.height\n ? svgElement.viewBox.baseVal.height + 'px'\n : IFRAME_HEIGHT;\n const base64encodedSrc = toBase64(`${svgCode}`);\n return ``;\n};\n\n/**\n * Append an enclosing div, then svg, then g (group) to the d3 parentRoot. Set attributes.\n * Only set the style attribute on the enclosing div if divStyle is given.\n * Only set the xmlns:xlink attribute on svg if svgXlink is given.\n * Return the last node appended\n *\n * @param parentRoot - the d3 node to append things to\n * @param id - the value to set the id attr to\n * @param enclosingDivId - the id to set the enclosing div to\n * @param divStyle - if given, the style to set the enclosing div to\n * @param svgXlink - if given, the link to set the new svg element to\n * @returns - returns the parentRoot that had nodes appended\n */\nexport const appendDivSvgG = (\n parentRoot: D3Element,\n id: string,\n enclosingDivId: string,\n divStyle?: string,\n svgXlink?: string\n): D3Element => {\n const enclosingDiv = parentRoot.append('div');\n enclosingDiv.attr('id', enclosingDivId);\n if (divStyle) {\n enclosingDiv.attr('style', divStyle);\n }\n\n const svgNode = enclosingDiv\n .append('svg')\n .attr('id', id)\n .attr('width', '100%')\n .attr('xmlns', XMLNS_SVG_STD);\n if (svgXlink) {\n svgNode.attr('xmlns:xlink', svgXlink);\n }\n\n svgNode.append('g');\n return parentRoot;\n};\n\n/**\n * Append an iFrame node to the given parentNode and set the id, style, and 'sandbox' attributes\n * Return the appended iframe d3 node\n *\n * @param parentNode - the d3 node to append the iFrame node to\n * @param iFrameId - id to use for the iFrame\n * @returns the appended iframe d3 node\n */\nfunction sandboxedIframe(parentNode: D3Element, iFrameId: string): D3Element {\n return parentNode\n .append('iframe')\n .attr('id', iFrameId)\n .attr('style', 'width: 100%; height: 100%;')\n .attr('sandbox', '');\n}\n\n/**\n * Remove any existing elements from the given document\n *\n * @param doc - the document to removed elements from\n * @param id - id for any existing SVG element\n * @param divSelector - selector for any existing enclosing div element\n * @param iFrameSelector - selector for any existing iFrame element\n */\nexport const removeExistingElements = (\n doc: Document,\n id: string,\n divId: string,\n iFrameId: string\n) => {\n // Remove existing SVG element if it exists\n doc.getElementById(id)?.remove();\n // Remove previous temporary element if it exists\n // Both div and iframe needs to be cleared in case there is a config change happening between renders.\n doc.getElementById(divId)?.remove();\n doc.getElementById(iFrameId)?.remove();\n};\n\n/**\n * @deprecated - use the `mermaid.render` function instead of `mermaid.mermaidAPI.render`\n *\n * Deprecated for external use.\n */\n\nconst render = async function (\n id: string,\n text: string,\n svgContainingElement?: Element\n): Promise {\n addDiagrams();\n\n const processed = processAndSetConfigs(text);\n text = processed.code;\n\n const config = configApi.getConfig();\n log.debug(config);\n\n // Check the maximum allowed text size\n if (text.length > (config?.maxTextSize ?? MAX_TEXTLENGTH)) {\n text = MAX_TEXTLENGTH_EXCEEDED_MSG;\n }\n\n const idSelector = '#' + id;\n const iFrameID = 'i' + id;\n const iFrameID_selector = '#' + iFrameID;\n const enclosingDivID = 'd' + id;\n const enclosingDivID_selector = '#' + enclosingDivID;\n\n const removeTempElements = () => {\n // -------------------------------------------------------------------------------\n // Remove the temporary HTML element if appropriate\n const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector;\n const node = select(tmpElementSelector).node();\n if (node && 'remove' in node) {\n node.remove();\n }\n };\n\n let root: any = select('body');\n\n const isSandboxed = config.securityLevel === SECURITY_LVL_SANDBOX;\n const isLooseSecurityLevel = config.securityLevel === SECURITY_LVL_LOOSE;\n\n const fontFamily = config.fontFamily;\n\n // -------------------------------------------------------------------------------\n // Define the root d3 node\n // In regular execution the svgContainingElement will be the element with a mermaid class\n\n if (svgContainingElement !== undefined) {\n if (svgContainingElement) {\n svgContainingElement.innerHTML = '';\n }\n\n if (isSandboxed) {\n // If we are in sandboxed mode, we do everything mermaid related in a (sandboxed )iFrame\n const iframe = sandboxedIframe(select(svgContainingElement), iFrameID);\n root = select(iframe.nodes()[0]!.contentDocument!.body);\n root.node().style.margin = 0;\n } else {\n root = select(svgContainingElement);\n }\n appendDivSvgG(root, id, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD);\n } else {\n // No svgContainingElement was provided\n\n // If there is an existing element with the id, we remove it. This likely a previously rendered diagram\n removeExistingElements(document, id, enclosingDivID, iFrameID);\n\n // Add the temporary div used for rendering with the enclosingDivID.\n // This temporary div will contain a svg with the id == id\n\n if (isSandboxed) {\n // If we are in sandboxed mode, we do everything mermaid related in a (sandboxed) iFrame\n const iframe = sandboxedIframe(select('body'), iFrameID);\n root = select(iframe.nodes()[0]!.contentDocument!.body);\n root.node().style.margin = 0;\n } else {\n root = select('body');\n }\n\n appendDivSvgG(root, id, enclosingDivID);\n }\n\n // -------------------------------------------------------------------------------\n // Create the diagram\n\n // Important that we do not create the diagram until after the directives have been included\n let diag: Diagram;\n let parseEncounteredException;\n\n try {\n diag = await Diagram.fromText(text, { title: processed.title });\n } catch (error) {\n if (config.suppressErrorRendering) {\n removeTempElements();\n throw error;\n }\n diag = await Diagram.fromText('error');\n parseEncounteredException = error;\n }\n\n // Get the temporary div element containing the svg\n const element = root.select(enclosingDivID_selector).node();\n const diagramType = diag.type;\n\n // -------------------------------------------------------------------------------\n // Create and insert the styles (user styles, theme styles, config styles)\n\n // Insert an element into svg. This is where we put the styles\n const svg = element.firstChild;\n const firstChild = svg.firstChild;\n const diagramClassDefs = diag.renderer.getClasses?.(text, diag);\n\n const rules = createUserStyles(config, diagramType, diagramClassDefs, idSelector);\n\n const style1 = document.createElement('style');\n style1.innerHTML = rules;\n svg.insertBefore(style1, firstChild);\n\n // -------------------------------------------------------------------------------\n // Draw the diagram with the renderer\n try {\n await diag.renderer.draw(text, id, version, diag);\n } catch (e) {\n if (config.suppressErrorRendering) {\n removeTempElements();\n } else {\n errorRenderer.draw(text, id, version);\n }\n throw e;\n }\n\n // This is the d3 node for the svg element\n const svgNode = root.select(`${enclosingDivID_selector} svg`);\n const a11yTitle: string | undefined = diag.db.getAccTitle?.();\n const a11yDescr: string | undefined = diag.db.getAccDescription?.();\n addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr);\n // -------------------------------------------------------------------------------\n // Clean up SVG code\n root.select(`[id=\"${id}\"]`).selectAll('foreignobject > *').attr('xmlns', XMLNS_XHTML_STD);\n\n // Fix for when the base tag is used\n let svgCode: string = root.select(enclosingDivID_selector).node().innerHTML;\n\n log.debug('config.arrowMarkerAbsolute', config.arrowMarkerAbsolute);\n svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config.arrowMarkerAbsolute));\n\n if (isSandboxed) {\n const svgEl = root.select(enclosingDivID_selector + ' svg').node();\n svgCode = putIntoIFrame(svgCode, svgEl);\n } else if (!isLooseSecurityLevel) {\n // Sanitize the svgCode using DOMPurify\n svgCode = DOMPurify.sanitize(svgCode, {\n ADD_TAGS: DOMPURIFY_TAGS,\n ADD_ATTR: DOMPURIFY_ATTR,\n });\n }\n\n attachFunctions();\n\n if (parseEncounteredException) {\n throw parseEncounteredException;\n }\n\n removeTempElements();\n\n return {\n diagramType,\n svg: svgCode,\n bindFunctions: diag.db.bindFunctions,\n };\n};\n\n/**\n * @param userOptions - Initial Mermaid options\n */\nfunction initialize(userOptions: MermaidConfig = {}) {\n const options: MermaidConfig = assignWithDepth({}, userOptions);\n // Handle legacy location of font-family configuration\n if (options?.fontFamily && !options.themeVariables?.fontFamily) {\n if (!options.themeVariables) {\n options.themeVariables = {};\n }\n options.themeVariables.fontFamily = options.fontFamily;\n }\n\n // Set default options\n configApi.saveConfigFromInitialize(options);\n\n if (options?.theme && options.theme in theme) {\n // Todo merge with user options\n options.themeVariables = theme[options.theme as keyof typeof theme].getThemeVariables(\n options.themeVariables\n );\n } else if (options) {\n options.themeVariables = theme.default.getThemeVariables(options.themeVariables);\n }\n\n const config =\n typeof options === 'object' ? configApi.setSiteConfig(options) : configApi.getSiteConfig();\n\n setLogLevel(config.logLevel);\n addDiagrams();\n}\n\nconst getDiagramFromText = (text: string, metadata: Pick = {}) => {\n const { code } = preprocessDiagram(text);\n return Diagram.fromText(code, metadata);\n};\n\n/**\n * Add accessibility (a11y) information to the diagram.\n *\n * @param diagramType - diagram type\n * @param svgNode - d3 node to insert the a11y title and desc info\n * @param a11yTitle - a11y title\n * @param a11yDescr - a11y description\n */\nfunction addA11yInfo(\n diagramType: string,\n svgNode: D3Element,\n a11yTitle?: string,\n a11yDescr?: string\n): void {\n setA11yDiagramInfo(svgNode, diagramType);\n addSVGa11yTitleDescription(svgNode, a11yTitle, a11yDescr, svgNode.attr('id'));\n}\n\n/**\n * @internal - Use mermaid.function instead of mermaid.mermaidAPI.function\n */\nexport const mermaidAPI = Object.freeze({\n render,\n parse,\n getDiagramFromText,\n initialize,\n getConfig: configApi.getConfig,\n setConfig: configApi.setConfig,\n getSiteConfig: configApi.getSiteConfig,\n updateSiteConfig: configApi.updateSiteConfig,\n reset: () => {\n configApi.reset();\n },\n globalReset: () => {\n configApi.reset(configApi.defaultConfig);\n },\n defaultConfig: configApi.defaultConfig,\n});\n\nsetLogLevel(configApi.getConfig().logLevel);\nconfigApi.reset(configApi.getConfig());\nexport default mermaidAPI;\n", "export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\nexport var SCOPE = '@scope'\n", "/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @param {number} position\n * @return {number}\n */\nexport function indexof (value, search, position) {\n\treturn value.indexOf(search, position)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter (array, pattern) {\n\treturn array.filter(function (value) { return !match(value, pattern) })\n}\n", "import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n", "import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, token, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f', abs(index ? points[index - 1] : 0)) != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent, declarations), declarations)\n\t\t\t\t\t\tif ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters) && substr(characters, -1, void 0) !== ' ') characters += ' '\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length || (variable === 0 && previous === 47)))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment (value, root, parent, siblings) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration (value, root, parent, length, siblings) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)\n}\n", "import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\n\tfor (var i = 0; i < children.length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: if (!strlen(element.value = element.props.join(','))) return ''\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n", "/**\n * Accessibility (a11y) functions, types, helpers.\n *\n * @see https://www.w3.org/WAI/\n * @see https://www.w3.org/TR/wai-aria-1.1/\n * @see https://www.w3.org/TR/svg-aam-1.0/\n */\nimport type { D3Element } from './types.js';\n\n/**\n * SVG element role:\n * The SVG element role _should_ be set to 'graphics-document' per SVG standard\n * but in practice is not always done by browsers, etc. (As of 2022-12-08).\n * A fallback role of 'document' should be set for those browsers, etc., that only support ARIA 1.0.\n *\n * @see https://www.w3.org/TR/svg-aam-1.0/#roleMappingGeneralRules\n * @see https://www.w3.org/TR/graphics-aria-1.0/#graphics-document\n */\nconst SVG_ROLE = 'graphics-document document';\n\n/**\n * Add role and aria-roledescription to the svg element.\n *\n * @param svg - d3 object that contains the SVG HTML element\n * @param diagramType - diagram name for to the aria-roledescription\n */\nexport function setA11yDiagramInfo(svg: D3Element, diagramType: string) {\n svg.attr('role', SVG_ROLE);\n if (diagramType !== '') {\n svg.attr('aria-roledescription', diagramType);\n }\n}\n\n/**\n * Add an accessible title and/or description element to a chart.\n * The title is usually not displayed and the description is never displayed.\n *\n * The following charts display their title as a visual and accessibility element: gantt.\n *\n * @param svg - d3 node to insert the a11y title and desc info\n * @param a11yTitle - a11y title. undefined or empty strings mean to skip them\n * @param a11yDesc - a11y description. undefined or empty strings mean to skip them\n * @param baseId - id used to construct the a11y title and description id\n */\nexport function addSVGa11yTitleDescription(\n svg: D3Element,\n a11yTitle: string | undefined,\n a11yDesc: string | undefined,\n baseId: string\n): void {\n if (svg.insert === undefined) {\n return;\n }\n\n if (a11yDesc) {\n const descId = `chart-desc-${baseId}`;\n svg.attr('aria-describedby', descId);\n svg.insert('desc', ':first-child').attr('id', descId).text(a11yDesc);\n }\n if (a11yTitle) {\n const titleId = `chart-title-${baseId}`;\n svg.attr('aria-labelledby', titleId);\n svg.insert('title', ':first-child').attr('id', titleId).text(a11yTitle);\n }\n}\n", "import * as configApi from './config.js';\nimport { getDiagram, registerDiagram } from './diagram-api/diagramAPI.js';\nimport { detectType, getDiagramLoader } from './diagram-api/detectType.js';\nimport { UnknownDiagramError } from './errors.js';\nimport { encodeEntities } from './utils.js';\nimport type { DetailedError } from './utils.js';\nimport type { DiagramDefinition, DiagramMetadata } from './diagram-api/types.js';\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nexport type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void;\n\n/**\n * An object representing a parsed mermaid diagram definition.\n * @privateRemarks This is exported as part of the public mermaidAPI.\n */\nexport class Diagram {\n public static async fromText(text: string, metadata: Pick = {}) {\n const config = configApi.getConfig();\n const type = detectType(text, config);\n text = encodeEntities(text) + '\\n';\n try {\n getDiagram(type);\n } catch {\n const loader = getDiagramLoader(type);\n if (!loader) {\n throw new UnknownDiagramError(`Diagram ${type} not found.`);\n }\n // Diagram not available, loading it.\n // new diagram will try getDiagram again and if fails then it is a valid throw\n const { id, diagram } = await loader();\n registerDiagram(id, diagram);\n }\n const { db, parser, renderer, init } = getDiagram(type);\n if (parser.parser) {\n // The parser.parser.yy is only present in JISON parsers. So, we'll only set if required.\n parser.parser.yy = db;\n }\n db.clear?.();\n init?.(config);\n // This block was added for legacy compatibility. Use frontmatter instead of adding more special cases.\n if (metadata.title) {\n db.setDiagramTitle?.(metadata.title);\n }\n await parser.parse(text);\n return new Diagram(type, text, db, parser, renderer);\n }\n\n private constructor(\n public type: string,\n public text: string,\n public db: DiagramDefinition['db'],\n public parser: DiagramDefinition['parser'],\n public renderer: DiagramDefinition['renderer']\n ) {}\n\n async render(id: string, version: string) {\n await this.renderer.draw(this.text, id, version, this);\n }\n\n getParser() {\n return this.parser;\n }\n\n getType() {\n return this.type;\n }\n}\n", "let interactionFunctions: (() => void)[] = [];\nexport const addFunction = (func: () => void) => {\n interactionFunctions.push(func);\n};\nexport const attachFunctions = () => {\n interactionFunctions.forEach((f) => {\n f();\n });\n interactionFunctions = [];\n};\n", "/**\n * Remove all lines starting with `%%` from the text that don't contain a `%%{`\n * @param text - The text to remove comments from\n * @returns cleaned text\n */\nexport const cleanupComments = (text: string): string => {\n return text.replace(/^\\s*%%(?!{)[^\\n]+\\n?/gm, '').trimStart();\n};\n", "import type { GanttDiagramConfig, MermaidConfig } from '../config.type.js';\nimport { frontMatterRegex } from './regexes.js';\n// The \"* as yaml\" part is necessary for tree-shaking\nimport * as yaml from 'js-yaml';\n\ninterface FrontMatterMetadata {\n title?: string;\n // Allows custom display modes. Currently used for compact mode in gantt charts.\n displayMode?: GanttDiagramConfig['displayMode'];\n config?: MermaidConfig;\n}\n\nexport interface FrontMatterResult {\n text: string;\n metadata: FrontMatterMetadata;\n}\n\n/**\n * Extract and parse frontmatter from text, if present, and sets appropriate\n * properties in the provided db.\n * @param text - The text that may have a YAML frontmatter.\n * @returns text with frontmatter stripped out\n */\nexport function extractFrontMatter(text: string): FrontMatterResult {\n const matches = text.match(frontMatterRegex);\n if (!matches) {\n return {\n text,\n metadata: {},\n };\n }\n\n let parsed: FrontMatterMetadata =\n yaml.load(matches[1], {\n // To support config, we need JSON schema.\n // https://www.yaml.org/spec/1.2/spec.html#id2803231\n schema: yaml.JSON_SCHEMA,\n }) ?? {};\n\n // To handle runtime data type changes\n parsed = typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : {};\n\n const metadata: FrontMatterMetadata = {};\n\n // Only add properties that are explicitly supported, if they exist\n if (parsed.displayMode) {\n metadata.displayMode = parsed.displayMode.toString() as GanttDiagramConfig['displayMode'];\n }\n if (parsed.title) {\n metadata.title = parsed.title.toString();\n }\n if (parsed.config) {\n metadata.config = parsed.config;\n }\n\n return {\n text: text.slice(matches[0].length),\n metadata,\n };\n}\n", "import { cleanupComments } from './diagram-api/comments.js';\nimport { extractFrontMatter } from './diagram-api/frontmatter.js';\nimport type { DiagramMetadata } from './diagram-api/types.js';\nimport utils, { cleanAndMerge, removeDirectives } from './utils.js';\n\nconst cleanupText = (code: string) => {\n return (\n code\n // parser problems on CRLF ignore all CR and leave LF;;\n .replace(/\\r\\n?/g, '\\n')\n // clean up html tags so that all attributes use single quotes, parser throws error on double quotes\n .replace(\n /<(\\w+)([^>]*)>/g,\n (match, tag, attributes) => '<' + tag + attributes.replace(/=\"([^\"]*)\"/g, \"='$1'\") + '>'\n )\n );\n};\n\nconst processFrontmatter = (code: string) => {\n const { text, metadata } = extractFrontMatter(code);\n const { displayMode, title, config = {} } = metadata;\n if (displayMode) {\n // Needs to be supported for legacy reasons\n if (!config.gantt) {\n config.gantt = {};\n }\n config.gantt.displayMode = displayMode;\n }\n return { title, config, text };\n};\n\nconst processDirectives = (code: string) => {\n const initDirective = utils.detectInit(code) ?? {};\n const wrapDirectives = utils.detectDirective(code, 'wrap');\n if (Array.isArray(wrapDirectives)) {\n initDirective.wrap = wrapDirectives.some(({ type }) => type === 'wrap');\n } else if (wrapDirectives?.type === 'wrap') {\n initDirective.wrap = true;\n }\n return {\n text: removeDirectives(code),\n directive: initDirective,\n };\n};\n\n/**\n * Preprocess the given code by cleaning it up, extracting front matter and directives,\n * cleaning and merging configuration, and removing comments.\n * @param code - The code to preprocess.\n * @returns The object containing the preprocessed code, title, and configuration.\n */\nexport function preprocessDiagram(code: string) {\n const cleanedCode = cleanupText(code);\n const frontMatterResult = processFrontmatter(cleanedCode);\n const directiveResult = processDirectives(frontMatterResult.text);\n const config = cleanAndMerge(frontMatterResult.config, directiveResult.directive);\n code = cleanupComments(directiveResult.text);\n return {\n code,\n title: frontMatterResult.title,\n config,\n } satisfies DiagramMetadata & { code: string };\n}\n", "export function toBase64(str: string) {\n // ref: https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem\n const utf8Bytes = new TextEncoder().encode(str);\n const utf8Str = Array.from(utf8Bytes, (byte) => String.fromCodePoint(byte)).join('');\n return btoa(utf8Str);\n}\n"], "mappings": "6zBAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,eAAC,SAAS,EAAE,EAAE,CAAW,OAAOD,IAAjB,UAAuC,OAAOC,GAApB,IAA2BA,GAAO,QAAQ,EAAE,EAAc,OAAO,QAAnB,YAA2B,OAAO,IAAI,OAAO,CAAC,GAAG,EAAe,OAAO,WAApB,IAA+B,WAAW,GAAG,MAAM,MAAM,EAAE,CAAC,GAAED,GAAM,UAAU,CAAC,aAAa,IAAI,EAAE,IAAI,EAAE,IAAIE,EAAE,KAAKC,EAAE,cAAc,EAAE,SAASC,EAAE,SAASC,EAAE,OAAOC,EAAE,MAAMC,EAAE,OAAOC,EAAE,QAAQ,EAAE,UAAUC,EAAE,OAAOC,EAAE,OAAOC,EAAE,eAAeC,EAAE,6FAA6F,EAAE,sFAAsFC,EAAE,CAAC,KAAK,KAAK,SAAS,2DAA2D,MAAM,GAAG,EAAE,OAAO,wFAAwF,MAAM,GAAG,EAAE,QAAQC,EAAA,SAASC,EAAE,CAAC,IAAIC,EAAE,CAAC,KAAK,KAAK,KAAK,IAAI,EAAEd,EAAEa,EAAE,IAAI,MAAM,IAAIA,GAAGC,GAAGd,EAAE,IAAI,EAAE,GAAGc,EAAEd,CAAC,GAAGc,EAAE,CAAC,GAAG,GAAG,EAA1F,UAA2F,EAAEC,EAAEH,EAAA,SAASC,EAAEC,EAAEd,EAAE,CAAC,IAAIC,EAAE,OAAOY,CAAC,EAAE,MAAM,CAACZ,GAAGA,EAAE,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ACR,YAAe,GACf,cAAiB,GACjB,eAAkB,EACpB,EACA,MAAS,CACP,YAAe,GACf,eAAkB,GAClB,UAAa,GACb,OAAU,EACV,WAAc,GACd,aAAgB,GAChB,YAAe,GACf,qBAAwB,GACxB,SAAY,GACZ,gBAAmB,GACnB,oBAAuB,EACvB,WAAc,WACd,QAAW,GACX,YAAe,GACf,QAAW,QACb,EACA,QAAW,CACT,YAAe,GACf,eAAkB,GAClB,eAAkB,GAClB,WAAc,IACd,MAAS,IACT,OAAU,GACV,UAAa,GACb,cAAiB,EACjB,WAAc,GACd,cAAiB,GACjB,aAAgB,SAChB,gBAAmB,EACnB,YAAe,GACf,aAAgB,GAChB,eAAkB,0BAClB,WAAc,GACd,gBAAmB,GACnB,cAAiB,KACjB,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,SACF,EACA,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,UACA,SACF,EACA,eAAkB,CAChB,MACF,CACF,EACA,MAAS,CACP,YAAe,GACf,eAAkB,GAClB,oBAAuB,GACvB,cAAiB,GACjB,QAAW,EACX,WAAc,GACd,gBAAmB,gBACnB,WAAc,GACd,oBAAuB,EACzB,EACA,MAAS,CACP,YAAe,GACf,eAAkB,GAClB,cAAiB,GACjB,SAAY,EACZ,QAAW,EACX,WAAc,GACd,WAAc,IACd,WAAc,GACd,UAAa,GACb,WAAc,EACd,YAAe,EACf,eAAkB,KAClB,SAAY,GACZ,YAAe,GACf,iBAAoB,KACpB,kBAAqB,GACrB,OAAU,EACV,gBAAmB,eACrB,EACA,GAAM,CACJ,YAAe,GACf,eAAkB,GAClB,eAAkB,GAClB,gBAAmB,KACnB,eAAkB,IAClB,gBAAmB,GACnB,cAAiB,GACjB,OAAU,OACV,KAAQ,WACR,SAAY,EACd,EACA,IAAO,CACL,YAAe,GACf,aAAgB,GAClB,EACA,cAAiB,CACf,YAAe,GACf,WAAc,IACd,YAAe,IACf,cAAiB,GACjB,aAAgB,GAChB,gBAAmB,EACnB,kBAAqB,EACrB,kBAAqB,EACrB,mBAAsB,GACtB,mBAAsB,GACtB,sBAAyB,GACzB,uBAA0B,EAC1B,iBAAoB,EACpB,mBAAsB,GACtB,YAAe,EACf,cAAiB,MACjB,cAAiB,OACjB,kCAAqC,EACrC,kCAAqC,CACvC,EACA,QAAW,CACT,YAAe,GACf,MAAS,IACT,OAAU,IACV,cAAiB,GACjB,aAAgB,GAChB,UAAa,GACb,MAAS,CACP,KAAQ,4BACR,UAAa,GACb,cAAiB,GACjB,aAAgB,EAChB,UAAa,GACb,cAAiB,GACjB,aAAgB,EAChB,SAAY,GACZ,WAAc,EACd,UAAa,EACb,aAAgB,GAChB,cAAiB,CACnB,EACA,MAAS,CACP,KAAQ,4BACR,UAAa,GACb,cAAiB,GACjB,aAAgB,EAChB,UAAa,GACb,cAAiB,GACjB,aAAgB,EAChB,SAAY,GACZ,WAAc,EACd,UAAa,EACb,aAAgB,GAChB,cAAiB,CACnB,EACA,iBAAoB,WACpB,yBAA4B,EAC9B,EACA,YAAe,CACb,YAAe,GACf,UAAa,UACb,WAAc,OACd,iBAAoB,QACpB,kBAAqB,OACrB,eAAkB,IAClB,gBAAmB,IACnB,SAAY,GACZ,aAAgB,GAChB,YAAe,EACjB,EACA,QAAW,CACT,YAAe,GACf,QAAW,GACX,aAAgB,GAClB,EACA,OAAU,CACR,YAAe,GACf,QAAW,EACX,aAAgB,IAChB,cAAiB,EACnB,EACA,SAAY,CACV,YAAe,GACf,eAAkB,GAClB,eAAkB,GAClB,WAAc,IACd,MAAS,IACT,OAAU,GACV,UAAa,GACb,cAAiB,EACjB,WAAc,GACd,cAAiB,GACjB,aAAgB,SAChB,gBAAmB,EACnB,YAAe,GACf,aAAgB,GAChB,eAAkB,0BAClB,WAAc,GACd,gBAAmB,GACnB,cAAiB,KACjB,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,SACF,EACA,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,UACA,SACF,EACA,eAAkB,CAChB,MACF,EAC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AEAH,GAAShE,EAAegE,EAAM,CAChC,CAEA,SAASU,IAAgB,CACvB,OAAO,IACT,CAFSA,OAAAA,EAAAA,GAAAA,iBAIFA,EACT,CAtBSJ,EAAAA,EAAAA,gBCpKF,IAAMK,EAAOxE,EAAO,CACzB,IACA,OACA,UACA,UACA,OACA,UACA,QACA,QACA,IACA,MACA,MACA,MACA,QACA,aACA,OACA,KACA,SACA,SACA,UACA,SACA,OACA,OACA,MACA,WACA,UACA,OACA,WACA,KACA,YACA,MACA,UACA,MACA,SACA,MACA,MACA,KACA,KACA,UACA,KACA,WACA,aACA,SACA,OACA,SACA,OACA,KACA,KACA,KACA,KACA,KACA,KACA,OACA,SACA,SACA,KACA,OACA,IACA,MACA,QACA,MACA,MACA,QACA,SACA,KACA,OACA,MACA,OACA,UACA,OACA,WACA,QACA,MACA,OACA,KACA,WACA,SACA,SACA,IACA,UACA,MACA,WACA,IACA,KACA,KACA,OACA,IACA,OACA,UACA,SACA,SACA,QACA,SACA,SACA,OACA,SACA,SACA,QACA,MACA,UACA,MACA,QACA,QACA,KACA,WACA,WACA,QACA,KACA,QACA,OACA,KACA,QACA,KACA,IACA,KACA,MACA,QACA,KAAK,CACN,EAGYyE,EAAMzE,EAAO,CACxB,MACA,IACA,WACA,cACA,eACA,eACA,gBACA,mBACA,SACA,WACA,OACA,OACA,UACA,SACA,OACA,IACA,QACA,WACA,QACA,QACA,OACA,iBACA,SACA,OACA,WACA,QACA,OACA,UACA,UACA,WACA,iBACA,OACA,OACA,QACA,SACA,SACA,OACA,WACA,QACA,OACA,QACA,OACA,OAAO,CACR,EAEY0E,EAAa1E,EAAO,CAC/B,UACA,gBACA,sBACA,cACA,mBACA,oBACA,oBACA,iBACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,cAAc,CACf,EAMY2E,EAAgB3E,EAAO,CAClC,UACA,gBACA,SACA,UACA,YACA,mBACA,iBACA,gBACA,gBACA,gBACA,QACA,YACA,OACA,eACA,YACA,UACA,gBACA,SACA,MACA,aACA,UACA,KAAK,CACN,EAEY4E,EAAS5E,EAAO,CAC3B,OACA,WACA,SACA,UACA,QACA,SACA,KACA,aACA,gBACA,KACA,KACA,QACA,UACA,WACA,QACA,OACA,KACA,SACA,QACA,SACA,OACA,OACA,UACA,SACA,MACA,QACA,MACA,SACA,aACA,aAAa,CACd,EAIY6E,EAAmB7E,EAAO,CACrC,UACA,cACA,aACA,WACA,YACA,UACA,UACA,SACA,SACA,QACA,YACA,aACA,iBACA,cACA,MAAM,CACP,EAEY8E,EAAO9E,EAAO,CAAC,OAAO,CAAC,ECrRvBwE,EAAOxE,EAAO,CACzB,SACA,SACA,QACA,MACA,iBACA,eACA,uBACA,WACA,aACA,UACA,SACA,UACA,cACA,cACA,UACA,OACA,QACA,QACA,QACA,OACA,UACA,WACA,eACA,SACA,cACA,WACA,WACA,UACA,MACA,WACA,0BACA,wBACA,WACA,YACA,UACA,eACA,OACA,MACA,UACA,SACA,SACA,OACA,OACA,WACA,KACA,YACA,YACA,QACA,OACA,QACA,OACA,OACA,UACA,OACA,MACA,MACA,YACA,QACA,SACA,MACA,YACA,WACA,QACA,OACA,QACA,UACA,aACA,SACA,OACA,UACA,UACA,cACA,cACA,UACA,gBACA,sBACA,SACA,UACA,UACA,aACA,WACA,MACA,WACA,MACA,WACA,OACA,OACA,UACA,aACA,QACA,WACA,QACA,OACA,QACA,OACA,UACA,QACA,MACA,SACA,OACA,QACA,UACA,WACA,QACA,YACA,OACA,SACA,SACA,QACA,QACA,OACA,QACA,MAAM,CACP,EAEYyE,EAAMzE,EAAO,CACxB,gBACA,aACA,WACA,qBACA,SACA,gBACA,gBACA,UACA,gBACA,iBACA,QACA,OACA,KACA,QACA,OACA,gBACA,YACA,YACA,QACA,sBACA,8BACA,gBACA,kBACA,KACA,KACA,IACA,KACA,KACA,kBACA,YACA,UACA,UACA,MACA,WACA,YACA,MACA,OACA,eACA,YACA,SACA,cACA,cACA,gBACA,cACA,YACA,mBACA,eACA,aACA,eACA,cACA,KACA,KACA,KACA,KACA,aACA,WACA,gBACA,oBACA,SACA,OACA,KACA,kBACA,KACA,MACA,IACA,KACA,KACA,KACA,KACA,UACA,YACA,aACA,WACA,OACA,eACA,iBACA,eACA,mBACA,iBACA,QACA,aACA,aACA,eACA,eACA,cACA,cACA,mBACA,YACA,MACA,OACA,QACA,SACA,OACA,MACA,OACA,aACA,SACA,WACA,UACA,QACA,SACA,cACA,SACA,WACA,cACA,OACA,aACA,sBACA,mBACA,eACA,SACA,gBACA,sBACA,iBACA,IACA,KACA,KACA,SACA,OACA,OACA,cACA,YACA,UACA,SACA,SACA,QACA,OACA,kBACA,mBACA,mBACA,eACA,cACA,eACA,cACA,aACA,eACA,mBACA,oBACA,iBACA,kBACA,oBACA,iBACA,SACA,eACA,QACA,eACA,iBACA,WACA,UACA,UACA,YACA,mBACA,cACA,kBACA,iBACA,aACA,OACA,KACA,KACA,UACA,SACA,UACA,aACA,UACA,aACA,gBACA,gBACA,QACA,eACA,OACA,eACA,mBACA,mBACA,IACA,KACA,KACA,QACA,IACA,KACA,KACA,IACA,YAAY,CACb,EAEY4E,EAAS5E,EAAO,CAC3B,SACA,cACA,QACA,WACA,QACA,eACA,cACA,aACA,aACA,QACA,MACA,UACA,eACA,WACA,QACA,QACA,SACA,OACA,KACA,UACA,SACA,gBACA,SACA,SACA,iBACA,YACA,WACA,cACA,UACA,UACA,gBACA,WACA,WACA,OACA,WACA,WACA,aACA,UACA,SACA,SACA,cACA,gBACA,uBACA,YACA,YACA,aACA,WACA,iBACA,iBACA,YACA,UACA,QACA,OAAO,CACR,EAEY+E,EAAM/E,EAAO,CACxB,aACA,SACA,cACA,YACA,aAAa,CACd,EC1WYgF,EAAgB/E,EAAK,2BAA2B,EAChDgF,EAAWhF,EAAK,uBAAuB,EACvCiF,GAAcjF,EAAK,eAAe,EAClCkF,EAAYlF,EAAK,4BAA4B,EAC7CmF,GAAYnF,EAAK,gB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,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,qBACL,OAAK,qBACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,qBACL,OAAK,qBACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,eACL,OAAK,cACP,EA+BMC,GAAN,MAAMsgB,CAAO,CAnwhBb,MAmwhBa,CAAA1wB,EAAA,eACX,YAAY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,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KAwBa7D,IAAa,CACxB,CACE,aAAc,UACd,KAAM,YACN,UAAW,OACX,YAAa,yBACb,QAAS,CAAC,OAAQ,UAAW,WAAW,EACxC,gBAAiB,CAAC,YAAY,EAC9B,QAAS8D,EACX,EACA,CACE,aAAc,QACd,KAAM,oBACN,UAAW,UACX,YAAa,sBACb,QAAS,CAAC,OAAO,EACjB,gBAAiB,CAAC,aAAa,EAC/B,QAASC,EACX,EACA,CACE,aAAc,iBACd,KAAM,UACN,UAAW,UACX,YAAa,iBACb,QAAS,CAAC,WAAY,MAAM,EAC5B,QAASC,EACX,EACA,CACE,aAAc,aACd,KAAM,mBACN,UAAW,UACX,YAAa,aACb,QAAS,CAAC,aAAc,UAAW,mBAAoB,YAAY,EACnE,QAASC,EACX,EACA,CACE,aAAc,WACd,KAAM,WACN,UAAW,MACX,YAAa,mBACb,QAAS,CAAC,KAAM,WAAY,UAAU,EACtC,QAASC,EACX,EACA,CACE,aAAc,QACd,KAAM,SACN,UAAW,SACX,YAAa,iBACb,QAAS,CAAC,MAAM,EAChB,QAASC,EACX,EACA,CACE,aAAc,WACd,KAAM,UACN,UAAW,OACX,YAAa,uBACb,QAAS,CAAC,WAAY,UAAW,UAAU,EAC3C,QAASC,EACX,EACA,CACE,aAAc,sBACd,KAAM,UACN,UAAW,MACX,YAAa,gCACb,QAAS,CAAC,UAAW,SAAS,EAC9B,QAASC,EACX,EACA,CACE,aAAc,oBACd,KAAM,aACN,UAAW,SACX,YAAa,6BACb,QAAS,CAAC,aAAc,QAAQ,EAChC,gBAAiB,CAAC,YAAY,EAC9B,QAASC,EACX,EACA,CACE,aAAc,oBACd,KAAM,YACN,UAAW,SACX,YAAa,6BACb,QAAS,CAAC,YAAa,QAAQ,EAC/B,gBAAiB,C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AAc,gBACd,KAAM,cACN,UAAW,UACX,YAAa,iBACb,QAASC,EACX,EACA,CACE,aAAc,oCACd,KAAM,eACN,UAAW,SACX,YAAa,iBACb,QAASC,EACX,EACA,CACE,aAAc,WACd,KAAM,iBACN,UAAW,OACX,YAAa,qBACb,QAAS,CAAC,WAAY,gBAAgB,EACtC,QAASC,EACX,EACA,CACE,aAAc,WACd,KAAM,WACN,UAAW,MACX,YAAa,wBACb,QAAS,CAAC,MAAO,UAAU,EAC3B,QAASC,EACX,EACA,CACE,aAAc,QACd,KAAM,yBACN,UAAW,QACX,YAAa,qBACb,QAAS,CAAC,wBAAwB,EAClC,QAASC,EACX,EACA,CACE,aAAc,wBACd,KAAM,sBACN,UAAW,QACX,YAAa,wBACb,QAAS,CAAC,MAAO,qBAAqB,EACtC,QAASC,EACX,EACA,CACE,aAAc,eACd,KAAM,iBACN,UAAW,UACX,YAAa,eACb,QAAS,CAAC,OAAQ,gBAAgB,EAClC,QAASC,EACX,EACA,CACE,aAAc,UACd,KAAM,mBACN,UAAW,YACX,YAAa,uBACb,QAAS,CAAC,mBAAoB,SAAS,EACvC,QAASC,EACX,EACA,CACE,aAAc,kBACd,KAAM,oBACN,UAAW,WACX,YAAa,wBACb,QAAS,CAAC,WAAY,oBAAqB,iBAAiB,EAC5D,QAASC,EACX,EACA,CACE,aAAc,UACd,KAAM,WACN,UAAW,MACX,YAAa,qBACb,QAAS,CAAC,UAAW,UAAU,EAC/B,QAASC,EACX,EACA,CACE,aAAc,mBACd,KAAM,cACN,UAAW,WACX,YAAa,mBACb,QAAS,CAAC,mBAAoB,aAAa,EAC3C,QAASC,EACX,EACA,CACE,aAAc,WACd,KAAM,gBACN,UAAW,SACX,YAAa,iBACb,QAAS,CAAC,WAAY,eAAe,EACrC,QAASC,EACX,EACA,CACE,aAAc,aACd,KAAM,uBACN,UAAW,aACX,YAAa,kBACb,QAAS,CAAC,aAAc,kBAAkB,EAC1C,QAASC,EACX,EACA,CACE,aAAc,cACd,KAA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D,EAAI,MAAM,gBAAiBkD,CAAC,EAC5B7C,GAAQ,aAAa6C,CAAC,EACtBF,EAAIE,CAAC,EACLL,EAAOK,CAAC,CACV,CACF,CACF,CAAC,EAhBiB,eAiBpBb,GAAe,KAAKS,CAAW,EAC/BP,IAAa,EAAE,MAAMM,CAAM,CAC7B,CAAC,EAvBoC,SAiDjCxB,IAAmCzB,EAAA,CAACoB,EAAI0B,EAAMS,IAC3C,IAAI,QAAQ,CAACP,EAASC,IAAW,CAGtC,IAAMC,EAAclD,EAAA,IAClB,IAAI,QAAQ,CAACmD,EAAKC,IAAQ,CACxBtC,GAAW,OAAOM,EAAI0B,EAAMS,CAAS,EAAE,KACpCF,GAAM,CAELF,EAAIE,CAAC,EAELL,EAAQK,CAAC,CACX,EACCC,GAAM,CACLlD,EAAI,MAAM,gBAAiBkD,CAAC,EAC5B7C,GAAQ,aAAa6C,CAAC,EACtBF,EAAIE,CAAC,EACLL,EAAOK,CAAC,CACV,CACF,CACF,CAAC,EAhBiB,eAiBpBb,GAAe,KAAKS,CAAW,EAC/BP,IAAa,EAAE,MAAMM,CAAM,CAC7B,CAAC,EAvBsC,UAkDnCxC,GAAmB,CACvB,YAAa,GACb,WAAAK,GACA,MAAA+B,IACA,OAAApB,IACA,KAAAH,IACA,IAAAhB,IACA,yBAAAwB,IACA,sBAAA0B,GACA,WAAA9B,IACA,WAAY,OACZ,cAAAU,IACA,qBAAAG,IACA,WAAAkB,GACA,kBAAAC,EACF,EAEOC,IAAQlD", "names": ["require_dayjs_min", "__commonJSMin", "exports", "module", "n", "r", "s", "u", "a", "o", "c", "h", "d", "l", "$", "M", "__name", "t", "e", "m", "v", "i", "g", "D", "p", "S", "_", "w", "O", "b", "f", "y", "k", "import_dayjs", "LEVELS", "log", "setLogLevel", "format", "init_logger", "__esmMin", "__name", "_args", "level", "numericLevel", "dayjs", "defaultIconDimensions", "defaultIconTransformations", "defaultIconProps", "defaultExtendedIconProps", "init_defaults", "__esmMin", "defaultIconSizeCustomisations", "defaultIconCustomisations", "init_defaults", "__esmMin", "defaultIconTransformations", "matchIconName", "stringToIcon", "validateIconName", "init_name", "__esmMin", "__name", "value", "validate", "allowSimpleName", "provider", "colonSeparated", "name2", "prefix", "result", "name", "dashSeparated", "icon", "mergeIconTransformations", "obj1", "obj2", "result", "rotate", "init_transformations", "__esmMin", "__name", "mergeIconData", "parent", "child", "result", "mergeIconTransformations", "key", "defaultExtendedIconProps", "defaultIconTransformations", "init_merge", "__esmMin", "init_defaults", "init_transformations", "__name", "getIconsTree", "data", "names", "icons", "aliases", "resolved", "resolve", "name", "parent", "value", "__name", "init_tree", "__esmMin", "internalGetIconData", "data", "name", "tree", "icons", "aliases", "currentProps", "parse", "name2", "mergeIconData", "__name", "getIconData", "getIconsTree", "init_get_icon", "__esmMin", "init_merge", "init_tree", "calculateSize", "size", "ratio", "precision", "oldParts", "unitsSplit", "newParts", "code", "isNumber", "unitsTest", "num", "init_size", "__esmMin", "__name", "splitSVGDefs", "content", "tag", "defs", "index", "start", "end", "endEnd", "mergeDefsAndContent", "wrapSVGContent", "body", "split", "init_defs", "__esmMin", "__name", "iconToSVG", "icon", "customisations", "fullIcon", "defaultIconProps", "fullCustomisations", "defaultIconCustomisations", "box", "body", "props", "transformations", "hFlip", "vFlip", "rotation", "tempValue", "wrapSVGContent", "customisationsWidth", "customisationsHeight", "boxWidth", "boxHeight", "width", "height", "calculateSize", "attributes", "setAttr", "__name", "prop", "value", "isUnsetKeyword", "viewBox", "init_build", "__esmMin", "init_defaults", "init_size", "init_defs", "replaceIDs", "body", "prefix", "randomPrefix", "ids", "match", "regex", "suffix", "id", "newID", "counter", "escapedID", "init_id", "__esmMin", "__name", "iconToHTML", "body", "attributes", "renderAttribsHTML", "attr", "init_html", "__esmMin", "__name", "require_ms", "__commonJSMin", "exports", "module", "s", "m", "h", "d", "w", "y", "val", "options", "type", "parse", "fmtLong", "fmtShort", "str", "match", "n", "__name", "ms", "msAbs", "plural", "name", "isPlural", "require_common", "__commonJSMin", "exports", "module", "setup", "env", "createDebug", "coerce", "disable", "enable", "enabled", "destroy", "key", "selectColor", "namespace", "hash", "i", "__name", "prevTime", "enableOverride", "namespacesCache", "enabledCache", "debug", "args", "self", "curr", "ms", "index", "match", "format", "formatter", "val", "extend", "delimiter", "newDebug", "namespaces", "split", "len", "toNamespace", "name", "regexp", "require_browser", "__commonJSMin", "exports", "module", "formatArgs", "save", "load", "useColors", "localstorage", "warned", "m", "__name", "args", "c", "index", "lastC", "match", "namespaces", "r", "formatters", "v", "error", "import_debug", "init_lib", "__esmMin", "init_name", "init_get_icon", "init_build", "init_id", "init_html", "unknownIcon", "iconsStore", "loaderStore", "registerIconPacks", "getRegisteredIconData", "getIconSVG", "init_icons", "__esmMin", "init_logger", "init_lib", "__name", "iconLoaders", "iconLoader", "log", "iconName", "fallbackPrefix", "data", "stringToIcon", "prefix", "icons", "loader", "e", "iconData", "getIconData", "customisations", "renderData", "iconToSVG", "iconToHTML", "replaceIDs", "dedent", "templ", "values", "_i", "strings", "indentLengths", "arr", "str", "matches", "match", "_a", "_b", "pattern_1", "string", "value", "i", "endentations", "endentation", "indentedValue", "init_esm", "__esmMin", "__name", "frontMatterRegex", "directiveRegex", "anyCommentRegex", "init_regexes", "__esmMin", "UnknownDiagramError", "init_errors", "__esmMin", "__name", "message", "detectors", "detectType", "registerLazyLoadedDiagrams", "addDetector", "getDiagramLoader", "init_detectType", "__esmMin", "init_logger", "init_regexes", "init_errors", "__name", "text", "config", "frontMatterRegex", "directiveRegex", "anyCommentRegex", "key", "detector", "UnknownDiagramError", "diagrams", "id", "loader", "log", "parser", "c4Diagram_default", "init_c4Diagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "$VS", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "kv", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "assignWithDepth", "assignWithDepth_default", "init_assignWithDepth", "__esmMin", "__name", "dst", "src", "depth", "clobber", "config", "s", "key", "Channel", "channel_default", "init_channel", "__esmMin", "__name", "r", "g", "b", "h", "s", "l", "a", "c", "n", "p", "q", "t", "channel", "max", "min", "d", "Lang", "lang_default", "init_lang", "__esmMin", "__name", "number", "lower", "upper", "Unit", "unit_default", "init_unit", "__esmMin", "__name", "dec", "hex", "Utils", "utils_default", "init_utils", "__esmMin", "init_channel", "init_lang", "init_unit", "channel_default", "lang_default", "unit_default", "DEC2HEX", "TYPE", "init_constants", "__esmMin", "init_utils", "i", "utils_default", "Type", "type_default", "init_type", "__esmMin", "init_constants", "__name", "TYPE", "type", "Channels", "channels_default", "init_channels", "__esmMin", "init_utils", "init_type", "init_constants", "__name", "data", "color", "type_default", "TYPE", "h", "s", "l", "utils_default", "g", "b", "r", "a", "channels", "reusable_default", "init_reusable", "__esmMin", "init_channels", "channels_default", "Hex", "hex_default", "init_hex", "__esmMin", "init_reusable", "init_constants", "__name", "color", "match", "hex", "dec", "length", "hasAlpha", "isFullLength", "multiplier", "bits", "bitsOffset", "mask", "reusable_default", "channels", "r", "g", "b", "a", "DEC2HEX", "HSL", "hsl_default", "init_hsl", "__esmMin", "init_utils", "init_reusable", "__name", "hue", "match", "number", "unit", "utils_default", "color", "charCode", "h", "s", "l", "a", "isAlphaPercentage", "reusable_default", "channels", "Keyword", "keyword_default", "init_keyword", "__esmMin", "init_hex", "__name", "color", "hex", "hex_default", "channels", "name", "RGB", "rgb_default", "init_rgb", "__esmMin", "init_utils", "init_reusable", "__name", "color", "charCode", "match", "r", "isRedPercentage", "g", "isGreenPercentage", "b", "isBluePercentage", "a", "isAlphaPercentage", "reusable_default", "utils_default", "channels", "Color", "color_default", "init_color", "__esmMin", "init_hex", "init_hsl", "init_keyword", "init_rgb", "init_constants", "keyword_default", "hex_default", "rgb_default", "hsl_default", "__name", "color", "channels", "TYPE", "change", "change_default", "init_change", "__esmMin", "init_utils", "init_color", "__name", "color", "channels", "ch", "color_default", "c", "utils_default", "rgba", "rgba_default", "init_rgba", "__esmMin", "init_utils", "init_reusable", "init_color", "init_change", "__name", "r", "g", "b", "a", "change_default", "channels", "reusable_default", "utils_default", "color_default", "channel", "channel_default", "init_channel", "__esmMin", "init_utils", "init_color", "__name", "color", "utils_default", "color_default", "luminance", "luminance_default", "init_luminance", "__esmMin", "init_utils", "init_color", "__name", "color", "r", "g", "b", "color_default", "utils_default", "isLight", "is_light_default", "init_is_light", "__esmMin", "init_luminance", "__name", "color", "luminance_default", "isDark", "is_dark_default", "init_is_dark", "__esmMin", "init_is_light", "__name", "color", "is_light_default", "adjustChannel", "adjust_channel_default", "init_adjust_channel", "__esmMin", "init_utils", "init_color", "__name", "color", "channel", "amount", "channels", "color_default", "amountCurrent", "amountNext", "utils_default", "lighten", "lighten_default", "init_lighten", "__esmMin", "init_adjust_channel", "__name", "color", "amount", "adjust_channel_default", "darken", "darken_default", "init_darken", "__esmMin", "init_adjust_channel", "__name", "color", "amount", "adjust_channel_default", "adjust", "adjust_default", "init_adjust", "__esmMin", "init_color", "init_change", "__name", "color", "channels", "ch", "color_default", "changes", "c", "change_default", "mix", "mix_default", "init_mix", "__esmMin", "init_color", "init_rgba", "__name", "color1", "color2", "weight", "r1", "g1", "b1", "a1", "color_default", "r2", "g2", "b2", "a2", "weightScale", "weightNormalized", "alphaDelta", "weight1", "weight2", "r", "g", "b", "a", "rgba_default", "invert", "invert_default", "init_invert", "__esmMin", "init_color", "init_mix", "__name", "color", "weight", "inverse", "color_default", "mix_default", "init_methods", "__esmMin", "init_rgba", "init_channel", "init_is_dark", "init_lighten", "init_darken", "init_adjust", "init_invert", "init_dist", "__esmMin", "init_methods", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "init_erDiagram_oldHardcodedValues", "__esmMin", "mkBorder", "init_theme_helpers", "__esmMin", "init_dist", "__name", "col", "darkMode", "adjust_default", "Theme", "getThemeVariables", "init_theme_base", "__esmMin", "init_dist", "init_erDiagram_oldHardcodedValues", "init_theme_helpers", "__name", "adjust_default", "mkBorder", "invert_default", "darken_default", "lighten_default", "i", "multiplier", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "userOverrides", "theme", "Theme", "getThemeVariables", "init_theme_dark", "__esmMin", "init_dist", "init_theme_helpers", "__name", "lighten_default", "adjust_default", "invert_default", "mkBorder", "rgba_default", "darken_default", "i", "is_dark_default", "overrides", "keys", "k", "userOverrides", "theme", "Theme", "getThemeVariables", "init_theme_default", "__esmMin", "init_dist", "init_theme_helpers", "init_erDiagram_oldHardcodedValues", "__name", "adjust_default", "mkBorder", "invert_default", "rgba_default", "darken_default", "i", "lighten_default", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "userOverrides", "theme", "Theme", "getThemeVariables", "init_theme_forest", "__esmMin", "init_dist", "init_erDiagram_oldHardcodedValues", "init_theme_helpers", "__name", "lighten_default", "mkBorder", "invert_default", "darken_default", "adjust_default", "i", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "userOverrides", "theme", "Theme", "getThemeVariables", "init_theme_neutral", "__esmMin", "init_dist", "init_theme_helpers", "init_erDiagram_oldHardcodedValues", "__name", "lighten_default", "adjust_default", "mkBorder", "invert_default", "i", "darken_default", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "userOverrides", "theme", "themes_default", "init_themes", "__esmMin", "init_theme_base", "init_theme_dark", "init_theme_default", "init_theme_forest", "init_theme_neutral", "getThemeVariables", "config_schema_default", "init_config_schema", "__esmMin", "config", "keyify", "configKeys", "defaultConfig_default", "init_defaultConfig", "__esmMin", "init_themes", "init_config_schema", "config_schema_default", "themes_default", "__name", "obj", "prefix", "res", "el", "sanitizeDirective", "sanitizeCss", "init_sanitizeDirective", "__esmMin", "init_defaultConfig", "init_logger", "__name", "args", "log", "arg", "key", "configKeys", "cssMatchers", "cssKey", "k", "val", "str", "startCnt", "endCnt", "element", "defaultConfig", "siteConfig", "configFromInitialize", "directives", "currentConfig", "updateCurrentConfig", "setSiteConfig", "saveConfigFromInitialize", "updateSiteConfig", "getSiteConfig", "setConfig", "getConfig", "sanitize", "addDirective", "reset", "ConfigWarning", "issuedWarnings", "issueWarning", "checkConfig", "init_config", "__esmMin", "init_assignWithDepth", "init_logger", "init_themes", "init_defaultConfig", "init_sanitizeDirective", "defaultConfig_default", "assignWithDepth_default", "__name", "siteCfg", "_directives", "cfg", "sumOfDirectives", "d", "themes_default", "tmpConfigFromInitialize", "themeVariables", "conf", "options", "key", "log", "directive", "sanitizeDirective", "config", "warning", "entries", "setPrototypeOf", "isFrozen", "getPrototypeOf", "getOwnPropertyDescriptor", "Object", "freeze", "seal", "create", "apply", "construct", "Reflect", "__name", "x", "fun", "thisValue", "args", "Func", "arrayForEach", "unapply", "Array", "prototype", "forEach", "arrayPop", "pop", "arrayPush", "push", "stringToLowerCase", "String", "toLowerCase", "stringToString", "toString", "stringMatch", "match", "stringReplace", "replace", "stringIndexOf", "indexOf", "stringTrim", "trim", "objectHasOwnProperty", "hasOwnProperty", "regExpTest", "RegExp", "test", "typeErrorCreate", "unconstruct", "TypeError", "func", "thisArg", "_len", "arguments", "length", "_key", "_len2", "_key2", "addToSet", "set", "array", "transformCaseFunc", "undefined", "l", "element", "lcElement", "cleanArray", "index", "clone", "object", "newObject", "property", "value", "isArray", "constructor", "lookupGetter", "prop", "desc", "get", "fallbackValue", "html", "svg", "svgFilters", "svgDisallowed", "mathMl", "mathMlDisallowed", "text", "xml", "MUSTACHE_EXPR", "ERB_EXPR", "TMPLIT_EXPR", "DATA_ATTR", "ARIA_ATTR", "IS_ALLOWED_URI", "IS_SCRIPT_OR_DATA", "ATTR_WHITESPACE", "DOCTYPE_NAME", "CUSTOM_ELEMENT", "NODE_TYPE", "attribute", "cdataSection", "entityReference", "entityNode", "progressingInstruction", "comment", "document", "documentType", "documentFragment", "notation", "getGlobal", "window", "_createTrustedTypesPolicy", "trustedTypes", "purifyHostElement", "createPolicy", "suffix", "ATTR_NAME", "hasAttribute", "getAttribute", "policyName", "createHTML", "createScriptURL", "scriptUrl", "console", "warn", "createDOMPurify", "DOMPurify", "root", "version", "VERSION", "removed", "nodeType", "isSupported", "originalDocument", "currentScript", "DocumentFragment", "HTMLTemplateElement", "Node", "Element", "NodeFilter", "NamedNodeMap", "MozNamedAttrMap", "HTMLFormElement", "DOMParser", "ElementPrototype", "cloneNode", "remove", "getNextSibling", "getChildNodes", "getParentNode", "template", "createElement", "content", "ownerDocument", "trustedTypesPolicy", "emptyHTML", "implementation", "createNodeIterator", "createDocumentFragment", "getElementsByTagName", "importNode", "hooks", "createHTMLDocument", "EXPRESSIONS", "ALLOWED_TAGS", "DEFAULT_ALLOWED_TAGS", "TAGS", "ALLOWED_ATTR", "DEFAULT_ALLOWED_ATTR", "ATTRS", "CUSTOM_ELEMENT_HANDLING", "tagNameCheck", "writable", "configurable", "enumerable", "attributeNameCheck", "allowCustomizedBuiltInElements", "FORBID_TAGS", "FORBID_ATTR", "ALLOW_ARIA_ATTR", "ALLOW_DATA_ATTR", "ALLOW_UNKNOWN_PROTOCOLS", "ALLOW_SELF_CLOSE_IN_ATTR", "SAFE_FOR_TEMPLATES", "SAFE_FOR_XML", "WHOLE_DOCUMENT", "SET_CONFIG", "FORCE_BODY", "RETURN_DOM", "RETURN_DOM_FRAGMENT", "RETURN_TRUSTED_TYPE", "SANITIZE_DOM", "SANITIZE_NAMED_PROPS", "SANITIZE_NAMED_PROPS_PREFIX", "KEEP_CONTENT", "IN_PLACE", "USE_PROFILES", "FORBID_CONTENTS", "DEFAULT_FORBID_CONTENTS", "DATA_URI_TAGS", "DEFAULT_DATA_URI_TAGS", "URI_SAFE_ATTRIBUTES", "DEFAULT_URI_SAFE_ATTRIBUTES", "MATHML_NAMESPACE", "SVG_NAMESPACE", "HTML_NAMESPACE", "NAMESPACE", "IS_EMPTY_INPUT", "ALLOWED_NAMESPACES", "DEFAULT_ALLOWED_NAMESPACES", "PARSER_MEDIA_TYPE", "SUPPORTED_PARSER_MEDIA_TYPES", "DEFAULT_PARSER_MEDIA_TYPE", "CONFIG", "formElement", "isRegexOrFunction", "testValue", "Function", "_parseConfig", "cfg", "ADD_URI_SAFE_ATTR", "ADD_DATA_URI_TAGS", "ALLOWED_URI_REGEXP", "ADD_TAGS", "ADD_ATTR", "table", "tbody", "TRUSTED_TYPES_POLICY", "MATHML_TEXT_INTEGRATION_POINTS", "HTML_INTEGRATION_POINTS", "COMMON_SVG_AND_HTML_ELEMENTS", "ALL_SVG_TAGS", "ALL_MATHML_TAGS", "_checkValidNamespace", "parent", "tagName", "namespaceURI", "parentTagName", "Boolean", "_forceRemove", "node", "removeChild", "_removeAttribute", "name", "getAttributeNode", "from", "removeAttribute", "setAttribute", "_initDocument", "dirty", "doc", "leadingWhitespace", "matches", "dirtyPayload", "parseFromString", "documentElement", "createDocument", "innerHTML", "body", "insertBefore", "createTextNode", "childNodes", "call", "_createNodeIterator", "SHOW_ELEMENT", "SHOW_COMMENT", "SHOW_TEXT", "SHOW_PROCESSING_INSTRUCTION", "SHOW_CDATA_SECTION", "_isClobbered", "elm", "nodeName", "textContent", "attributes", "hasChildNodes", "_isNode", "_executeHook", "entryPoint", "currentNode", "data", "hook", "_sanitizeElements", "allowedTags", "firstElementChild", "_isBasicCustomElement", "parentNode", "childCount", "i", "childClone", "__removalCount", "expr", "_isValidAttribute", "lcTag", "lcName", "_sanitizeAttributes", "hookEvent", "attrName", "attrValue", "keepAttr", "allowedAttributes", "attr", "forceKeepAttr", "getAttributeType", "setAttributeNS", "_sanitizeShadowDOM", "fragment", "shadowNode", "shadowIterator", "nextNode", "sanitize", "importedNode", "returnNode", "appendChild", "firstChild", "nodeIterator", "shadowroot", "shadowrootmode", "serializedHTML", "outerHTML", "doctype", "setConfig", "clearConfig", "isValidAttribute", "tag", "addHook", "hookFunction", "removeHook", "removeHooks", "removeAllHooks", "purify", "katex_exports", "__export", "katex", "escape", "text", "ESCAPE_REGEX", "match", "ESCAPE_LOOKUP", "getDefaultValue", "schema", "type", "defaultType", "scriptFromCodepoint", "codepoint", "i", "scriptData", "script", "_i", "block", "supportedCodepoint", "allBlocks", "setFontMetrics", "fontName", "metrics", "fontMetricsData", "getCharacterMetrics", "character", "font", "mode", "ch", "extraCharacterMap", "getGlobalMetrics", "size", "sizeIndex", "fontMetricsBySizeIndex", "sigmasAndXis", "key", "assertSymbolDomNode", "group", "SymbolNode", "assertSpan", "Span", "defineSymbol", "replace", "name", "acceptUnicodeChar", "symbols", "defineFunction", "_ref", "names", "props", "handler", "htmlBuilder", "mathmlBuilder", "data", "_functions", "_htmlGroupBuilders", "_mathmlGroupBuilders", "defineFunctionBuilders", "_ref2", "buildHTMLUnbreakable", "children", "options", "body", "makeSpan$1", "strut", "makeEm", "buildHTML", "tree", "tag", "expression", "buildExpression$1", "eqnNum", "parts", "nobreak", "tagChild", "htmlNode", "newDocumentFragment", "DocumentFragment", "buildMathML", "texExpression", "isDisplayMode", "forMathmlOnly", "buildExpression", "wrapper", "MathNode", "utils", "mathMLTree", "annotation", "semantics", "math", "wrapperClass", "buildCommon", "assertNodeType", "node", "assertSymbolNodeType", "typedNode", "checkSymbolNodeType", "NON_ATOMS", "htmlBuilder$9", "elements", "makeSpan", "mathmlBuilder$8", "inner", "cdArrow", "arrowChar", "labels", "parser", "funcName", "cdArrowFunctionName", "leftLabel", "bareArrow", "sizedArrow", "rightLabel", "arrowGroup", "arrow", "parseCD", "parsedRows", "next", "ParseError", "row", "rowNodes", "cell", "newCell", "j", "isStartOfArrow", "labelNum", "inLabel", "k", "isLabelEnd", "wrappedArrow", "cols", "checkDelimiter", "delim", "context", "symDelim", "delimiters", "assertParsed", "defineEnvironment", "_environments", "defineMacro", "_macros", "getHLines", "hlineInfo", "nxt", "getAutoTag", "parseArray", "style", "hskipBeforeAndAfter", "addJot", "arraystretch", "colSeparationType", "autoTag", "singleRow", "emptySingleRow", "maxNumCols", "leqno", "stretch", "rowGaps", "hLinesBeforeRow", "tags", "beginRow", "__name", "endRow", "Token", "dCellStyle", "envName", "sizingGroup", "value", "baseOptions", "multiplier", "pos", "SourceLocation", "contains", "deflt", "uppercase", "hyphenate", "getBaseElem", "isCharacterBox", "assert", "protocolFromUrl", "SETTINGS_SCHEMA", "Settings", "Style", "D", "Dc", "T", "Tc", "S", "Sc", "SS", "SSc", "styles", "sup", "sub", "fracNum", "fracDen", "cramp", "text$1", "Style$1", "hLinePad", "sqrtMain", "sqrtSize1", "sqrtSize2", "sqrtSize3", "sqrtSize4", "phasePath", "sqrtTall", "sqrtPath", "innerPath", "path", "tallDelim", "sizeStyleMap", "sizeMultipliers", "sizeAtStyle", "Options", "ptPerUnit", "relativeUnit", "validUnit", "calculateSize", "createClass", "initNode", "toNode", "toMarkup", "Anchor", "Img", "iCombinations", "SvgNode", "PathNode", "LineNode", "ATOMS", "main", "ams", "accent", "bin", "close", "mathord", "op", "open", "punct", "rel", "spacing", "textord", "ligatures", "mathTextSymbols", "textSymbols", "_ch", "letters", "_ch2", "_i2", "wideChar", "_ch3", "_i3", "_ch4", "_i4", "extraLatin", "_ch5", "_i5", "wideLatinLetterData", "wideNumeralData", "wideCharacterFont", "lookupSymbol", "makeSymbol", "mathsym", "boldsymbol", "makeOrd", "canCombine", "tryCombineChars", "sizeElementFromChildren", "makeSpan$2", "makeSvgSpan", "makeLineSpan", "makeAnchor", "makeFragment", "wrapFragment", "getVListChildrenAndDepth", "makeVList", "makeGlue", "retrieveTextFontName", "fontMap", "svgData", "staticSvg", "thinspace", "mediumspace", "thickspace", "spacings", "tightSpacings", "normalizeArgument", "ordargument", "binLeftCanceller", "binRightCanceller", "styleMap$1", "DomEnum", "traverseNonSpaceNodes", "checkPartialGroup", "getOutermostNode", "getTypeOfDomTree", "makeNullDelimiter", "buildGroup$1", "TextNode", "SpaceNode", "makeText", "makeRow", "getVariant", "buildExpressionRow", "buildGroup", "optionsFromSettings", "displayWrap", "buildTree", "buildHTMLTree", "stretchyCodePoint", "mathMLnode", "katexImagesData", "groupLength", "svgSpan", "encloseSpan", "stretchy", "htmlBuilder$a", "mathmlBuilder$9", "NON_STRETCHY_ACCENT_REGEX", "paddedNode", "binrelClass", "htmlBuilder$8", "mathmlBuilder$7", "globalMap", "checkControlSequence", "getRHS", "letCommand", "getMetrics", "styleWrap", "centerSpan", "makeSmallDelim", "mathrmSize", "makeLargeDelim", "makeGlyphSpan", "makeInner", "lapInEms", "lap", "verts", "doubleVerts", "makeStackedDelim", "vbPad", "emPad", "sqrtSvg", "makeSqrtImage", "stackLargeDelimiters", "stackAlwaysDelimiters", "stackNeverDelimiters", "sizeToMaxHeight", "makeSizedDelim", "stackNeverDelimiterSequence", "stackAlwaysDelimiterSequence", "stackLargeDelimiterSequence", "delimTypeToFont", "traverseSequence", "makeCustomSizedDelim", "makeLeftRightDelim", "delimiter", "delimiterSizes", "htmlBuilder$7", "mathmlBuilder$6", "validateAmsEnvironmentContext", "htmlBuilder$6", "alignMap", "mathmlBuilder$5", "alignedHandler", "environments", "htmlBuilder$5", "mathmlBuilder$4", "fontAliases", "adjustStyle", "htmlBuilder$4", "mathmlBuilder$3", "stylArray", "delimFromValue", "htmlBuilder$3", "mathmlBuilder$2", "sizeData", "chooseMathStyle", "assembleSupSub", "noSuccessor", "htmlBuilder$2", "mathmlBuilder$1", "singleCharBigOps", "singleCharIntegrals", "htmlBuilder$1", "sizeFuncs", "styleMap", "htmlBuilderDelegate", "defaultVariant", "cssSpace", "regularSpace", "pad", "textFontFamilies", "textFontWeights", "textFontShapes", "optionsWithFont", "makeVerb", "functions", "spaceRegexString", "controlWordRegexString", "controlSymbolRegexString", "controlWordWhitespaceRegexString", "controlSpaceRegexString", "combiningDiacriticalMarkString", "combiningDiacriticalMarksEndRegex", "tokenRegexString", "Lexer", "Namespace", "macros", "digitToNumber", "newcommand", "dotsByToken", "spaceAfterDots", "latexRaiseA", "braketHelper", "implicitCommands", "MacroExpander", "unicodeSubRegEx", "uSubsAndSups", "unicodeAccents", "unicodeSymbols", "Parser", "parseTree", "render", "renderToString", "generateParseTree", "renderError", "renderToDomTree", "renderToHTMLTree", "init_katex", "__esmMin", "_SourceLocation", "lexer", "start", "end", "first", "second", "_Token", "loc", "endToken", "_ParseError", "message", "token", "error", "input", "underlined", "left", "right", "self", "list", "elem", "setting", "defaultIfUndefined", "str", "baseElem", "url", "protocol", "color", "def", "defs", "s", "n", "prop", "errorCode", "errorMsg", "strict", "trust", "id", "cramped", "b", "extraVinculum", "y", "x", "viewBoxHeight", "vertSegment", "height", "label", "midHeight", "className", "frag", "markup", "toText", "child", "_Options", "extension", "wantSize", "fontFamily", "fontWeight", "fontShape", "oldOptions", "unit", "sizeValue", "scale", "unitOptions", "classes", "cls", "tagName", "attr", "attribute", "href", "src", "alt", "depth", "italic", "skew", "width", "span", "needsSpan", "escaped", "attributes", "svgNS", "pathName", "alternate", "H", "L", "codePoint", "lookup", "symbolNode", "isFont", "fontOrFamily", "wideFontName", "wideFontClass", "fontClasses", "fontData", "_fontName", "_fontName2", "_fontName3", "prev", "_style", "chars", "maxFontSize", "thickness", "line", "anchor", "fragment", "params", "oldChildren", "_depth", "currPos", "diff", "bottom", "firstChild", "pstrutSize", "pstrut", "realChildren", "minPos", "maxPos", "_child", "_elem", "childWrap", "vlist", "rows", "emptySpan", "depthStrut", "topStrut", "vtable", "measurement", "rule", "baseFontName", "fontStylesName", "svgNode", "arg", "isRealGroup", "surrounding", "groups", "output", "glueOptions", "dummyPrev", "dummyNext", "isRoot", "prevType", "space", "nodes", "callback", "partialGroup", "nonspace", "result", "index", "side", "moreClasses", "groupNode", "isOrdgroup", "lastGroup", "_group", "lastChild", "settings", "katexNode", "mathMLNode", "_htmlNode", "buildSvgSpan_", "viewBoxWidth", "grp", "numChars", "_height", "imgIndex", "spans", "paths", "_minWidth", "_viewBoxHeight", "_height2", "numSvgChildren", "widthClasses", "aligns", "align1", "_path", "_svgNode", "_span", "minWidth", "topPad", "bottomPad", "img", "totalHeight", "lines", "base", "supSubGroup", "mustShift", "baseChar", "baseGroup", "accentBelow", "clearance", "accentBody", "accentFull", "accentWrap", "accentNode", "args", "isStretchy", "isShifty", "innerGroup", "kern", "optArgs", "newOptions", "upperGroup", "arrowPrefix", "lowerGroup", "arrowBody", "arrowShift", "upperShift", "lowerShift", "arrowNode", "upperNode", "lowerNode", "_lowerNode", "atom", "_ref3", "baseArg", "shiftedArg", "mclass", "baseOp", "supsub", "endChar", "parent", "number", "code", "breakOnTokenText", "newLine", "tok", "global", "macro", "numArgs", "insert", "tokens", "_ref4", "middle", "symbol", "toStyle", "delimSizeMultiplier", "shift", "center", "sizeClass", "corner", "heightTotal", "top", "repeat", "svgLabel", "topMetrics", "topHeightTotal", "repeatMetrics", "repeatHeightTotal", "bottomMetrics", "bottomHeightTotal", "middleHeightTotal", "middleFactor", "middleMetrics", "minHeight", "repeatCount", "realHeightTotal", "axisHeight", "stack", "pathStr", "svg", "innerHeight", "_innerHeight", "sqrtName", "pathNode", "sizeMultiplier", "spanHeight", "texHeight", "advanceWidth", "sequence", "heightDepth", "delimType", "delimiterFactor", "delimiterExtend", "maxDistFromAxis", "innerDepth", "hadMiddle", "leftDelim", "middleDelim", "isMiddle", "rightDelim", "colorOptions", "leftNode", "rightNode", "textNode", "middleNode", "imgShift", "isSingleChar", "lineWeight", "angleHeight", "ruleThickness", "fboxsep", "thk", "borderColor", "backgroundColor", "_ref5", "r", "c", "nr", "nc", "hlines", "pt", "arraycolsep", "localMultiplier", "baselineskip", "jot", "arrayskip", "arstrutHeight", "arstrutDepth", "setHLinePos", "hlinesInGap", "inrow", "outrow", "elt", "rowGap", "gap", "offset", "colDescriptions", "colSep", "colDescrNum", "tagSpans", "rw", "tagSpan", "colDescr", "firstSeparator", "lineType", "separator", "_shift", "sepwidth", "col", "_shift2", "dashes", "vListElems", "hline", "lineShift", "eqnNumCol", "tbl", "glue", "table", "menclose", "align", "columnLines", "prevTypeWasAlign", "iStart", "iEnd", "_cols", "rowLines", "separationType", "isSplit", "res", "numMaths", "numCols", "emptyGroup", "arg0", "isAligned", "styling", "ordgroup", "curMaths", "pregap", "symNode", "colalign", "nde", "ca", "colAlign", "payload", "nameGroup", "env", "_args", "endNameToken", "func", "originalStyle", "nstyle", "dstyle", "numerm", "hStrut", "dStrut", "denomm", "ruleWidth", "ruleSpacing", "numShift", "denomShift", "frac", "midShift", "candidateClearance", "delimSize", "isDisplay", "withDelims", "leftOp", "rightOp", "numer", "denom", "hasBarLine", "replaceWith", "delimString", "barNode", "barSize", "styl", "textOrd", "_ref6", "braceBody", "vSpan", "trustContext", "keyVal", "totalheight", "attributeStr", "mathFunction", "muUnit", "dimension", "fix", "outerMode", "supGroup", "subGroup", "slant", "baseShift", "subIsSingleCharacter", "finalGroup", "_bottom", "spacer", "hasLimits", "large", "stash", "oval", "operator", "fName", "childText", "isAllString", "word", "identifier", "defaultRuleThickness", "phantom", "amount", "dy", "smashHeight", "smashDepth", "tbArg", "letter", "smashedNode", "theta", "phi", "lineClearance", "minDelimiterHeight", "delimDepth", "rootm", "toShift", "rootVList", "rootVListWrap", "newStyle", "styleAttributes", "delegate", "_delegate", "isSup", "builderDelegate", "valueBase", "valueSup", "valueSub", "supm", "subm", "supShift", "subShift", "_newOptions", "minSupShift", "marginRight", "marginLeft", "isOiint", "maxWidth", "psi", "vlistElem", "_vlistElem", "isBrace", "isOver", "nodeType", "_base2", "_base", "variant", "ord", "padNode", "char", "nlIndex", "builtins", "globalMacros", "undefs", "undef", "t", "nextToken", "digit", "existsOK", "nonexistsOK", "exists", "argText", "thedots", "one", "middleDouble", "oldMiddle", "oldMiddleDouble", "midMacro", "double", "doubled", "expanded", "newMode", "isOptional", "delims", "isDelimited", "expandableOnly", "topToken", "expansion", "oldStackLength", "definition", "catcode", "stripped", "bodyLexer", "_Parser", "consume", "parse", "oldToken", "breakOnInfix", "lex", "overIndex", "numerNode", "denomNode", "numerBody", "denomBody", "symbolToken", "textordArray", "colorNode", "superscript", "subscript", "limits", "prime", "primes", "isSub", "subsupTokens", "funcData", "totalArgs", "argType", "optional", "modeName", "argToken", "regex", "firstToken", "lastToken", "isBlank", "groupEnd", "a", "v", "nucleus", "star", "family", "command", "toParse", "baseNode", "setupDompurifyHooks", "TEMPORARY_ATTRIBUTE", "DOMPurify", "node", "import_dompurify", "lineBreakRegex", "getRows", "setupDompurifyHooksIfNotSetup", "removeScript", "sanitizeMore", "sanitizeText", "sanitizeTextOrArray", "hasBreaks", "splitBreaks", "placeholderToBreak", "breakToPlaceholder", "getUrl", "evaluate", "getMax", "getMin", "parseGenericTypes", "countOccurrence", "shouldCombineSets", "processSet", "isMathMLSupported", "katexRegex", "hasKatex", "calculateMathMLDimensions", "renderKatex", "common_default", "init_common", "__esmMin", "__name", "s", "setup", "txt", "text", "config", "level", "a", "x", "useAbsolute", "url", "val", "values", "newValues", "value", "input", "inputSets", "output", "i", "thisSet", "previousSet", "nextSet", "string", "substring", "prevCount", "nextCount", "tildeCount", "hasStartingTilde", "chars", "first", "last", "divElem", "dim", "katex", "outputMode", "line", "_", "c", "d3Attrs", "calculateSvgSizeAttrs", "configureSvgSize", "setupGraphViewbox", "init_setupGraphViewbox", "__esmMin", "init_logger", "__name", "d3Elem", "attrs", "attr", "height", "width", "useMaxWidth", "svgElem", "graph", "padding", "svgBounds", "sWidth", "sHeight", "log", "vBox", "themes", "getStyles", "addStylesForDiagram", "styles_default", "init_styles", "__esmMin", "init_logger", "__name", "type", "userStyles", "options", "diagramStyles", "log", "diagramTheme", "commonDb_exports", "__export", "clear", "getAccDescription", "getAccTitle", "getDiagramTitle", "setAccDescription", "setAccTitle", "setDiagramTitle", "accTitle", "diagramTitle", "accDescription", "sanitizeText", "init_commonDb", "__esmMin", "init_common", "init_config", "__name", "txt", "getConfig", "log", "setLogLevel", "getConfig", "setConfig", "defaultConfig", "sanitizeText", "setupGraphViewbox", "getCommonDb", "diagrams", "registerDiagram", "getDiagram", "DiagramNotFoundError", "init_diagramAPI", "__esmMin", "init_detectType", "init_logger", "init_config", "init_common", "init_setupGraphViewbox", "init_styles", "init_commonDb", "__name", "text", "commonDb_exports", "id", "diagram", "detector", "addDetector", "addStylesForDiagram", "name", "c4ShapeArray", "boundaryParseStack", "currentBoundaryParse", "parentBoundaryParse", "boundaries", "rels", "title", "wrapEnabled", "c4ShapeInRow", "c4BoundaryInRow", "c4Type", "getC4Type", "setC4Type", "addRel", "addPersonOrSystem", "addContainer", "addComponent", "addPersonOrSystemBoundary", "addContainerBoundary", "addDeploymentNode", "popBoundaryParseStack", "updateElStyle", "updateRelStyle", "updateLayoutConfig", "getC4ShapeInRow", "getC4BoundaryInRow", "getCurrentBoundaryParse", "getParentBoundaryParse", "getC4ShapeArray", "getC4Shape", "getC4ShapeKeys", "getBoundaries", "getBoundarys", "getRels", "getTitle", "setWrap", "autoWrap", "clear", "LINETYPE", "ARROWTYPE", "PLACEMENT", "setTitle", "c4Db_default", "init_c4Db", "__esmMin", "init_diagramAPI", "init_common", "init_commonDb", "__name", "c4TypeParam", "sanitizeText", "getConfig", "type", "from", "to", "label", "techn", "descr", "sprite", "tags", "link", "rel", "old", "key", "value", "typeC4Shape", "alias", "personOrSystem", "container", "component", "boundary", "nodeType", "elementName", "bgColor", "fontColor", "borderColor", "shadowing", "shape", "legendText", "legendSprite", "element", "textColor", "lineColor", "offsetX", "offsetY", "c4ShapeInRowParam", "c4BoundaryInRowParam", "c4ShapeInRowValue", "c4BoundaryInRowValue", "parentBoundary", "wrapSetting", "txt", "setAccTitle", "getAccTitle", "getAccDescription", "setAccDescription", "ascending", "a", "b", "init_ascending", "__esmMin", "__name", "descending", "a", "b", "init_descending", "__esmMin", "__name", "bisector", "f", "compare1", "compare2", "delta", "ascending", "__name", "d", "x", "descending", "zero", "left", "a", "lo", "hi", "mid", "right", "center", "i", "init_bisector", "__esmMin", "init_ascending", "init_descending", "number", "x", "init_number", "__esmMin", "__name", "ascendingBisect", "bisectRight", "bisectLeft", "bisectCenter", "bisect_default", "init_bisect", "__esmMin", "init_ascending", "init_bisector", "init_number", "bisector", "ascending", "number", "intern_get", "_intern", "_key", "value", "key", "intern_set", "intern_delete", "keyof", "InternMap", "init_src", "__esmMin", "__name", "entries", "tickSpec", "start", "stop", "count", "step", "power", "error", "factor", "e10", "e5", "e2", "i1", "i2", "inc", "ticks", "reverse", "n", "i", "tickIncrement", "tickStep", "init_ticks", "__esmMin", "__name", "max", "values", "valueof", "value", "index", "init_max", "__esmMin", "__name", "min", "values", "valueof", "value", "index", "init_min", "__esmMin", "__name", "range", "start", "stop", "step", "n", "i", "init_range", "__esmMin", "__name", "init_src", "__esmMin", "init_bisect", "init_bisector", "init_max", "init_min", "init_range", "init_ticks", "identity_default", "x", "init_identity", "__esmMin", "__name", "translateX", "x", "translateY", "y", "number", "scale", "d", "center", "offset", "entering", "axis", "orient", "tickArguments", "tickValues", "tickFormat", "tickSizeInner", "tickSizeOuter", "tickPadding", "k", "top", "left", "right", "transform", "bottom", "context", "values", "format", "identity_default", "spacing", "range", "range0", "range1", "position", "selection", "path", "tick", "tickExit", "tickEnter", "line", "text", "epsilon", "p", "__name", "_", "axisTop", "axisBottom", "init_axis", "__esmMin", "init_identity", "init_src", "__esmMin", "init_axis", "dispatch", "i", "n", "_", "t", "Dispatch", "parseTypenames", "typenames", "types", "name", "get", "type", "c", "set", "callback", "noop", "dispatch_default", "init_dispatch", "__esmMin", "__name", "typename", "T", "copy", "that", "args", "init_src", "__esmMin", "init_dispatch", "xhtml", "namespaces_default", "init_namespaces", "__esmMin", "namespace_default", "name", "prefix", "i", "namespaces_default", "init_namespace", "__esmMin", "init_namespaces", "__name", "creatorInherit", "name", "document", "uri", "xhtml", "creatorFixed", "fullname", "creator_default", "namespace_default", "init_creator", "__esmMin", "init_namespace", "init_namespaces", "__name", "none", "selector_default", "selector", "init_selector", "__esmMin", "__name", "select_default", "select", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "Selection", "init_select", "__esmMin", "init_selection", "init_selector", "__name", "array", "x", "init_array", "__esmMin", "__name", "empty", "selectorAll_default", "selector", "init_selectorAll", "__esmMin", "__name", "arrayAll", "select", "array", "selectAll_default", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "Selection", "init_selectAll", "__esmMin", "init_selection", "init_array", "init_selectorAll", "__name", "matcher_default", "selector", "childMatcher", "node", "init_matcher", "__esmMin", "__name", "childFind", "match", "find", "childFirst", "selectChild_default", "childMatcher", "init_selectChild", "__esmMin", "init_matcher", "__name", "children", "childrenFilter", "match", "filter", "selectChildren_default", "childMatcher", "init_selectChildren", "__esmMin", "init_matcher", "__name", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Selection", "init_filter", "__esmMin", "init_selection", "init_matcher", "__name", "sparse_default", "update", "init_sparse", "__esmMin", "__name", "enter_default", "Selection", "sparse_default", "EnterNode", "parent", "datum", "init_enter", "__esmMin", "init_sparse", "init_selection", "__name", "child", "next", "selector", "constant_default", "x", "init_constant", "__esmMin", "__name", "bindIndex", "parent", "group", "enter", "update", "exit", "data", "i", "node", "groupLength", "dataLength", "EnterNode", "bindKey", "key", "nodeByKeyValue", "keyValues", "keyValue", "datum", "data_default", "value", "bind", "parents", "groups", "constant_default", "m", "j", "arraylike", "enterGroup", "updateGroup", "exitGroup", "i0", "i1", "previous", "next", "Selection", "init_data", "__esmMin", "init_selection", "init_enter", "init_constant", "__name", "exit_default", "Selection", "sparse_default", "init_exit", "__esmMin", "init_sparse", "init_selection", "__name", "join_default", "onenter", "onupdate", "onexit", "enter", "update", "exit", "init_join", "__esmMin", "__name", "merge_default", "context", "selection", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Selection", "init_merge", "__esmMin", "init_selection", "__name", "order_default", "groups", "j", "m", "group", "next", "node", "init_order", "__esmMin", "__name", "sort_default", "compare", "ascending", "compareNode", "a", "b", "__name", "groups", "m", "sortgroups", "j", "group", "n", "sortgroup", "node", "i", "Selection", "init_sort", "__esmMin", "init_selection", "call_default", "callback", "init_call", "__esmMin", "__name", "nodes_default", "init_nodes", "__esmMin", "__name", "node_default", "groups", "j", "m", "group", "n", "node", "init_node", "__esmMin", "__name", "size_default", "size", "node", "init_size", "__esmMin", "__name", "empty_default", "init_empty", "__esmMin", "__name", "each_default", "callback", "groups", "j", "m", "group", "i", "n", "node", "init_each", "__esmMin", "__name", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "value", "attrConstantNS", "attrFunction", "v", "attrFunctionNS", "attr_default", "namespace_default", "node", "init_attr", "__esmMin", "init_namespace", "__name", "window_default", "node", "init_window", "__esmMin", "__name", "styleRemove", "name", "styleConstant", "value", "priority", "styleFunction", "v", "style_default", "styleValue", "node", "window_default", "init_style", "__esmMin", "init_window", "__name", "propertyRemove", "name", "propertyConstant", "value", "propertyFunction", "v", "property_default", "init_property", "__esmMin", "__name", "classArray", "string", "classList", "node", "ClassList", "classedAdd", "names", "list", "i", "n", "classedRemove", "classedTrue", "classedFalse", "classedFunction", "value", "classed_default", "name", "init_classed", "__esmMin", "__name", "textRemove", "textConstant", "value", "textFunction", "v", "text_default", "init_text", "__esmMin", "__name", "htmlRemove", "htmlConstant", "value", "htmlFunction", "v", "html_default", "init_html", "__esmMin", "__name", "raise", "raise_default", "init_raise", "__esmMin", "__name", "lower", "lower_default", "init_lower", "__esmMin", "__name", "append_default", "name", "create", "creator_default", "init_append", "__esmMin", "init_creator", "__name", "constantNull", "insert_default", "name", "before", "create", "creator_default", "select", "selector_default", "init_insert", "__esmMin", "init_creator", "init_selector", "__name", "remove", "parent", "remove_default", "init_remove", "__esmMin", "__name", "selection_cloneShallow", "clone", "parent", "selection_cloneDeep", "clone_default", "deep", "init_clone", "__esmMin", "__name", "datum_default", "value", "init_datum", "__esmMin", "__name", "contextListener", "listener", "event", "parseTypenames", "typenames", "t", "name", "i", "onRemove", "typename", "on", "j", "m", "o", "onAdd", "value", "options", "on_default", "n", "init_on", "__esmMin", "__name", "dispatchEvent", "node", "type", "params", "window", "window_default", "event", "dispatchConstant", "dispatchFunction", "dispatch_default", "init_dispatch", "__esmMin", "init_window", "__name", "iterator_default", "groups", "j", "m", "group", "n", "node", "init_iterator", "__esmMin", "__name", "Selection", "groups", "parents", "selection", "root", "selection_selection", "selection_default", "init_selection", "__esmMin", "init_select", "init_selectAll", "init_selectChild", "init_selectChildren", "init_filter", "init_data", "init_enter", "init_exit", "init_join", "init_merge", "init_order", "init_sort", "init_call", "init_nodes", "init_node", "init_size", "init_empty", "init_each", "init_attr", "init_style", "init_property", "init_classed", "init_text", "init_html", "init_raise", "init_lower", "init_append", "init_insert", "init_remove", "init_clone", "init_datum", "init_on", "init_dispatch", "init_iterator", "__name", "select_default", "selectAll_default", "selectChild_default", "selectChildren_default", "filter_default", "data_default", "enter_default", "exit_default", "join_default", "merge_default", "order_default", "sort_default", "call_default", "nodes_default", "node_default", "size_default", "empty_default", "each_default", "attr_default", "style_default", "property_default", "classed_default", "text_default", "html_default", "raise_default", "lower_default", "append_default", "insert_default", "remove_default", "clone_default", "datum_default", "on_default", "dispatch_default", "iterator_default", "select_default", "selector", "Selection", "root", "init_select", "__esmMin", "init_selection", "__name", "init_src", "__esmMin", "init_matcher", "init_namespace", "init_select", "init_selection", "init_selector", "init_selectorAll", "init_style", "init_src", "__esmMin", "define_default", "constructor", "factory", "prototype", "extend", "parent", "definition", "key", "init_define", "__esmMin", "__name", "Color", "color_formatHex", "color_formatHex8", "color_formatHsl", "hslConvert", "color_formatRgb", "color", "format", "m", "l", "reHex", "rgbn", "Rgb", "rgba", "reRgbInteger", "reRgbPercent", "reRgbaInteger", "reRgbaPercent", "reHslPercent", "hsla", "reHslaPercent", "named", "n", "r", "g", "b", "a", "rgbConvert", "o", "rgb", "opacity", "rgb_formatHex", "hex", "rgb_formatHex8", "rgb_formatRgb", "clampa", "clampi", "value", "h", "s", "Hsl", "min", "max", "hsl", "clamph", "clampt", "hsl2rgb", "m1", "m2", "darker", "brighter", "reI", "reN", "reP", "init_color", "__esmMin", "init_define", "__name", "define_default", "channels", "extend", "k", "radians", "degrees", "init_math", "__esmMin", "labConvert", "o", "Lab", "Hcl", "hcl2lab", "Rgb", "rgbConvert", "r", "rgb2lrgb", "g", "b", "y", "xyz2lab", "Yn", "x", "z", "Xn", "Zn", "lab", "l", "a", "opacity", "t3", "t2", "t0", "lab2xyz", "t1", "lrgb2rgb", "hclConvert", "h", "degrees", "hcl", "c", "radians", "K", "init_lab", "__esmMin", "init_define", "init_color", "init_math", "__name", "define_default", "extend", "Color", "k", "init_src", "__esmMin", "init_color", "init_lab", "basis", "t1", "v0", "v1", "v2", "v3", "t2", "t3", "basis_default", "values", "n", "t", "i", "init_basis", "__esmMin", "__name", "basisClosed_default", "values", "n", "t", "i", "v0", "v1", "v2", "v3", "basis", "init_basisClosed", "__esmMin", "init_basis", "__name", "constant_default", "init_constant", "__esmMin", "__name", "x", "linear", "a", "d", "t", "exponential", "b", "y", "hue", "constant_default", "gamma", "nogamma", "init_color", "__esmMin", "init_constant", "__name", "rgbSpline", "spline", "colors", "n", "r", "g", "b", "i", "color", "rgb", "t", "rgb_default", "rgbBasis", "rgbBasisClosed", "init_rgb", "__esmMin", "init_src", "init_basis", "init_basisClosed", "init_color", "__name", "rgbGamma", "y", "gamma", "start", "end", "opacity", "nogamma", "basis_default", "basisClosed_default", "numberArray_default", "a", "b", "n", "c", "t", "isNumberArray", "x", "init_numberArray", "__esmMin", "__name", "genericArray", "a", "b", "nb", "na", "x", "c", "i", "value_default", "t", "init_array", "__esmMin", "init_value", "__name", "date_default", "a", "b", "d", "t", "init_date", "__esmMin", "__name", "number_default", "a", "b", "t", "init_number", "__esmMin", "__name", "object_default", "a", "b", "i", "c", "k", "value_default", "t", "init_object", "__esmMin", "init_value", "__name", "zero", "b", "one", "t", "string_default", "a", "bi", "reA", "reB", "am", "bm", "bs", "i", "s", "q", "number_default", "o", "init_string", "__esmMin", "init_number", "__name", "value_default", "a", "b", "t", "c", "constant_default", "number_default", "color", "rgb_default", "string_default", "date_default", "isNumberArray", "numberArray_default", "genericArray", "object_default", "init_value", "__esmMin", "init_src", "init_rgb", "init_array", "init_date", "init_number", "init_object", "init_string", "init_constant", "init_numberArray", "__name", "round_default", "a", "b", "t", "init_round", "__esmMin", "__name", "decompose_default", "a", "b", "c", "d", "e", "f", "scaleX", "scaleY", "skewX", "degrees", "identity", "init_decompose", "__esmMin", "__name", "parseCss", "value", "m", "identity", "decompose_default", "parseSvg", "svgNode", "init_parse", "__esmMin", "init_decompose", "__name", "interpolateTransform", "parse", "pxComma", "pxParen", "degParen", "pop", "s", "__name", "translate", "xa", "ya", "xb", "yb", "q", "i", "number_default", "rotate", "a", "b", "skewX", "scale", "t", "n", "o", "interpolateTransformCss", "interpolateTransformSvg", "init_transform", "__esmMin", "init_number", "init_parse", "parseCss", "parseSvg", "hcl", "hue", "start", "end", "h", "c", "nogamma", "l", "opacity", "t", "hcl_default", "hclLong", "init_hcl", "__esmMin", "init_src", "init_color", "__name", "init_src", "__esmMin", "init_value", "init_number", "init_round", "init_string", "init_transform", "init_rgb", "init_hcl", "now", "clockNow", "setFrame", "clearNow", "clock", "clockSkew", "Timer", "timer", "callback", "delay", "time", "t", "timerFlush", "frame", "taskHead", "wake", "clockLast", "timeout", "nap", "poke", "pokeDelay", "t0", "t1", "t2", "taskTail", "sleep", "interval", "init_timer", "__esmMin", "f", "__name", "timeout_default", "callback", "delay", "time", "t", "Timer", "elapsed", "init_timeout", "__esmMin", "init_timer", "__name", "init_src", "__esmMin", "init_timer", "init_timeout", "schedule_default", "node", "name", "id", "index", "group", "timing", "schedules", "create", "emptyOn", "emptyTween", "CREATED", "init", "schedule", "get", "set", "STARTED", "self", "tween", "timer", "elapsed", "SCHEDULED", "start", "__name", "i", "j", "n", "o", "stop", "timeout_default", "RUNNING", "ENDED", "tick", "STARTING", "t", "ENDING", "init_schedule", "__esmMin", "init_src", "dispatch_default", "interrupt_default", "node", "name", "schedules", "schedule", "active", "empty", "i", "STARTING", "ENDING", "ENDED", "init_interrupt", "__esmMin", "init_schedule", "__name", "interrupt_default", "name", "init_interrupt", "__esmMin", "__name", "tweenRemove", "id", "name", "tween0", "tween1", "schedule", "set", "tween", "i", "n", "tweenFunction", "value", "t", "tween_default", "get", "tweenValue", "transition", "node", "init_tween", "__esmMin", "init_schedule", "__name", "interpolate_default", "a", "b", "c", "number_default", "color", "rgb_default", "string_default", "init_interpolate", "__esmMin", "init_src", "__name", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "interpolate", "value1", "string00", "string1", "interpolate0", "string0", "attrConstantNS", "attrFunction", "value", "string10", "attrFunctionNS", "attr_default", "namespace_default", "i", "interpolateTransformSvg", "interpolate_default", "tweenValue", "init_attr", "__esmMin", "init_src", "init_tween", "init_interpolate", "__name", "attrInterpolate", "name", "i", "t", "attrInterpolateNS", "fullname", "attrTweenNS", "value", "t0", "i0", "tween", "__name", "attrTween", "attrTween_default", "key", "namespace_default", "init_attrTween", "__esmMin", "init_src", "delayFunction", "id", "value", "init", "delayConstant", "delay_default", "get", "init_delay", "__esmMin", "init_schedule", "__name", "durationFunction", "id", "value", "set", "durationConstant", "duration_default", "get", "init_duration", "__esmMin", "init_schedule", "__name", "easeConstant", "id", "value", "set", "ease_default", "get", "init_ease", "__esmMin", "init_schedule", "__name", "easeVarying", "id", "value", "v", "set", "easeVarying_default", "init_easeVarying", "__esmMin", "init_schedule", "__name", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Transition", "init_filter", "__esmMin", "init_src", "init_transition", "__name", "merge_default", "transition", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Transition", "init_merge", "__esmMin", "init_transition", "__name", "start", "name", "t", "i", "onFunction", "id", "listener", "on0", "on1", "sit", "init", "set", "schedule", "on", "on_default", "get", "init_on", "__esmMin", "init_schedule", "__name", "removeFunction", "id", "parent", "i", "remove_default", "init_remove", "__esmMin", "__name", "select_default", "select", "name", "id", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "schedule_default", "get", "Transition", "init_select", "__esmMin", "init_src", "init_transition", "init_schedule", "__name", "selectAll_default", "select", "name", "id", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "children", "child", "inherit", "get", "k", "l", "schedule_default", "Transition", "init_selectAll", "__esmMin", "init_src", "init_transition", "init_schedule", "__name", "selection_default", "Selection", "init_selection", "__esmMin", "init_src", "__name", "styleNull", "name", "interpolate", "string00", "string10", "interpolate0", "string0", "styleValue", "string1", "styleRemove", "styleConstant", "value1", "styleFunction", "value", "styleMaybeRemove", "id", "on0", "on1", "listener0", "key", "event", "remove", "schedule", "set", "on", "listener", "style_default", "priority", "i", "interpolateTransformCss", "interpolate_default", "tweenValue", "init_style", "__esmMin", "init_src", "init_schedule", "init_tween", "init_interpolate", "__name", "styleInterpolate", "name", "i", "priority", "t", "styleTween", "value", "i0", "tween", "__name", "styleTween_default", "key", "init_styleTween", "__esmMin", "textConstant", "value", "textFunction", "value1", "text_default", "tweenValue", "init_text", "__esmMin", "init_tween", "__name", "textInterpolate", "i", "t", "textTween", "value", "t0", "i0", "tween", "__name", "textTween_default", "key", "init_textTween", "__esmMin", "transition_default", "name", "id0", "id1", "newId", "groups", "m", "j", "group", "n", "node", "i", "inherit", "get", "schedule_default", "Transition", "init_transition", "__esmMin", "init_schedule", "__name", "end_default", "on0", "on1", "that", "id", "size", "resolve", "reject", "cancel", "end", "__name", "schedule", "set", "on", "init_end", "__esmMin", "init_schedule", "Transition", "groups", "parents", "name", "id", "transition", "selection_default", "newId", "selection_prototype", "init_transition", "__esmMin", "init_src", "init_attr", "init_attrTween", "init_delay", "init_duration", "init_ease", "init_easeVarying", "init_filter", "init_merge", "init_on", "init_remove", "init_select", "init_selectAll", "init_selection", "init_style", "init_styleTween", "init_text", "init_textTween", "init_tween", "init_end", "__name", "select_default", "selectAll_default", "filter_default", "merge_default", "transition_default", "on_default", "attr_default", "attrTween_default", "style_default", "styleTween_default", "text_default", "textTween_default", "remove_default", "tween_default", "delay_default", "duration_default", "ease_default", "easeVarying_default", "end_default", "cubicInOut", "init_cubic", "__esmMin", "__name", "init_src", "__esmMin", "init_cubic", "inherit", "node", "id", "timing", "transition_default", "name", "Transition", "newId", "defaultTiming", "now", "groups", "m", "j", "group", "n", "i", "schedule_default", "init_transition", "__esmMin", "init_schedule", "init_src", "cubicInOut", "__name", "init_selection", "__esmMin", "init_src", "init_interrupt", "init_transition", "selection_default", "interrupt_default", "transition_default", "init_src", "__esmMin", "init_selection", "init_constant", "__esmMin", "init_event", "__esmMin", "init_noevent", "__esmMin", "number1", "e", "number2", "type", "abs", "max", "min", "X", "Y", "XY", "init_brush", "__esmMin", "init_src", "init_constant", "init_event", "init_noevent", "__name", "x", "xy", "y", "init_src", "__esmMin", "init_brush", "append", "strings", "i", "n", "appendRound", "digits", "d", "k", "path", "Path", "pi", "tau", "epsilon", "tauEpsilon", "init_path", "__esmMin", "__name", "x", "y", "x1", "y1", "x2", "y2", "r", "x0", "y0", "x21", "y21", "x01", "y01", "l01_2", "x20", "y20", "l21_2", "l20_2", "l21", "l01", "l", "t01", "t21", "a0", "a1", "ccw", "dx", "dy", "cw", "da", "w", "h", "init_src", "__esmMin", "init_path", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "formatDecimal_default", "x", "formatDecimalParts", "p", "i", "coefficient", "init_formatDecimal", "__esmMin", "__name", "exponent_default", "x", "formatDecimalParts", "init_exponent", "__esmMin", "init_formatDecimal", "__name", "formatGroup_default", "grouping", "thousands", "value", "width", "t", "j", "g", "length", "init_formatGroup", "__esmMin", "__name", "formatNumerals_default", "numerals", "value", "i", "init_formatNumerals", "__esmMin", "__name", "formatSpecifier", "specifier", "match", "re", "FormatSpecifier", "init_formatSpecifier", "__esmMin", "__name", "formatTrim_default", "s", "out", "n", "i", "i0", "i1", "init_formatTrim", "__esmMin", "__name", "formatPrefixAuto_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "i", "prefixExponent", "n", "init_formatPrefixAuto", "__esmMin", "init_formatDecimal", "__name", "formatRounded_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "init_formatRounded", "__esmMin", "init_formatDecimal", "__name", "formatTypes_default", "init_formatTypes", "__esmMin", "init_formatDecimal", "init_formatPrefixAuto", "init_formatRounded", "__name", "x", "p", "formatDecimal_default", "formatRounded_default", "formatPrefixAuto_default", "identity_default", "x", "init_identity", "__esmMin", "__name", "locale_default", "locale", "group", "identity_default", "formatGroup_default", "map", "currencyPrefix", "currencySuffix", "decimal", "numerals", "formatNumerals_default", "percent", "minus", "nan", "newFormat", "specifier", "formatSpecifier", "fill", "align", "sign", "symbol", "zero", "width", "comma", "precision", "trim", "type", "formatTypes_default", "prefix", "suffix", "formatType", "maybeSuffix", "format", "value", "valuePrefix", "valueSuffix", "i", "n", "c", "valueNegative", "formatTrim_default", "prefixes", "prefixExponent", "length", "padding", "__name", "formatPrefix", "f", "e", "exponent_default", "k", "init_locale", "__esmMin", "init_exponent", "init_formatGroup", "init_formatNumerals", "init_formatSpecifier", "init_formatTrim", "init_formatTypes", "init_formatPrefixAuto", "init_identity", "defaultLocale", "definition", "locale", "locale_default", "format", "formatPrefix", "init_defaultLocale", "__esmMin", "init_locale", "__name", "precisionFixed_default", "step", "exponent_default", "init_precisionFixed", "__esmMin", "init_exponent", "__name", "precisionPrefix_default", "step", "value", "exponent_default", "init_precisionPrefix", "__esmMin", "init_exponent", "__name", "precisionRound_default", "step", "max", "exponent_default", "init_precisionRound", "__esmMin", "init_exponent", "__name", "init_src", "__esmMin", "init_defaultLocale", "init_formatSpecifier", "init_precisionFixed", "init_precisionPrefix", "init_precisionRound", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "initRange", "domain", "range", "init_init", "__esmMin", "__name", "ordinal", "index", "InternMap", "domain", "range", "unknown", "implicit", "scale", "d", "i", "__name", "_", "value", "initRange", "init_ordinal", "__esmMin", "init_src", "init_init", "band", "scale", "ordinal", "domain", "ordinalRange", "r0", "r1", "step", "bandwidth", "round", "paddingInner", "paddingOuter", "align", "rescale", "n", "reverse", "start", "stop", "values", "range", "i", "__name", "_", "initRange", "init_band", "__esmMin", "init_src", "init_init", "init_ordinal", "constants", "x", "init_constant", "__esmMin", "__name", "number", "x", "init_number", "__esmMin", "__name", "identity", "x", "normalize", "a", "b", "constants", "clamper", "t", "bimap", "domain", "range", "interpolate", "d0", "d1", "r0", "r1", "polymap", "j", "d", "r", "i", "bisect_default", "copy", "source", "target", "transformer", "unit", "value_default", "transform", "untransform", "unknown", "clamp", "piecewise", "output", "input", "rescale", "n", "scale", "__name", "y", "number_default", "_", "number", "round_default", "u", "continuous", "init_continuous", "__esmMin", "init_src", "init_constant", "init_number", "tickFormat", "start", "stop", "count", "specifier", "step", "tickStep", "precision", "formatSpecifier", "value", "precisionPrefix_default", "formatPrefix", "precisionRound_default", "precisionFixed_default", "format", "init_tickFormat", "__esmMin", "init_src", "__name", "linearish", "scale", "domain", "count", "d", "ticks", "specifier", "tickFormat", "i0", "i1", "start", "stop", "prestep", "step", "maxIter", "tickIncrement", "linear", "continuous", "copy", "initRange", "init_linear", "__esmMin", "init_src", "init_continuous", "init_init", "init_tickFormat", "__name", "nice", "domain", "interval", "i0", "i1", "x0", "x1", "t", "init_nice", "__esmMin", "__name", "timeInterval", "floori", "offseti", "count", "field", "interval", "date", "__name", "d0", "d1", "step", "start", "stop", "range", "previous", "test", "end", "t0", "t1", "d", "init_interval", "__esmMin", "millisecond", "milliseconds", "init_millisecond", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "k", "second", "seconds", "init_second", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeMinute", "timeMinutes", "utcMinute", "utcMinutes", "init_minute", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeHour", "timeHours", "utcHour", "utcHours", "init_hour", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeDay", "timeDays", "utcDay", "utcDays", "unixDay", "unixDays", "init_day", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeWeekday", "i", "timeInterval", "date", "step", "start", "end", "utcWeekday", "timeSunday", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "timeSundays", "timeMondays", "timeTuesdays", "timeWednesdays", "timeThursdays", "timeFridays", "timeSaturdays", "utcSunday", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "utcSundays", "utcMondays", "utcTuesdays", "utcWednesdays", "utcThursdays", "utcFridays", "utcSaturdays", "init_week", "__esmMin", "init_interval", "__name", "timeMonth", "timeMonths", "utcMonth", "utcMonths", "init_month", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeYear", "timeYears", "utcYear", "utcYears", "init_year", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "k", "ticker", "year", "month", "week", "day", "hour", "minute", "tickIntervals", "second", "ticks", "start", "stop", "count", "reverse", "interval", "tickInterval", "__name", "target", "i", "bisector", "step", "tickStep", "millisecond", "t", "utcTicks", "utcTickInterval", "timeTicks", "timeTickInterval", "init_ticks", "__esmMin", "init_src", "init_millisecond", "init_second", "init_minute", "init_hour", "init_day", "init_week", "init_month", "init_year", "utcYear", "utcMonth", "utcSunday", "unixDay", "utcHour", "utcMinute", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "init_src", "__esmMin", "init_millisecond", "init_second", "init_minute", "init_hour", "init_day", "init_week", "init_month", "init_year", "init_ticks", "localDate", "d", "date", "utcDate", "newDate", "y", "m", "formatLocale", "locale", "locale_dateTime", "locale_date", "locale_time", "locale_periods", "locale_weekdays", "locale_shortWeekdays", "locale_months", "locale_shortMonths", "periodRe", "formatRe", "periodLookup", "formatLookup", "weekdayRe", "weekdayLookup", "shortWeekdayRe", "shortWeekdayLookup", "monthRe", "monthLookup", "shortMonthRe", "shortMonthLookup", "formats", "formatShortWeekday", "formatWeekday", "formatShortMonth", "formatMonth", "formatDayOfMonth", "formatMicroseconds", "formatYearISO", "formatFullYearISO", "formatHour24", "formatHour12", "formatDayOfYear", "formatMilliseconds", "formatMonthNumber", "formatMinutes", "formatPeriod", "formatQuarter", "formatUnixTimestamp", "formatUnixTimestampSeconds", "formatSeconds", "formatWeekdayNumberMonday", "formatWeekNumberSunday", "formatWeekNumberISO", "formatWeekdayNumberSunday", "formatWeekNumberMonday", "formatYear", "formatFullYear", "formatZone", "formatLiteralPercent", "utcFormats", "formatUTCShortWeekday", "formatUTCWeekday", "formatUTCShortMonth", "formatUTCMonth", "formatUTCDayOfMonth", "formatUTCMicroseconds", "formatUTCYearISO", "formatUTCFullYearISO", "formatUTCHour24", "formatUTCHour12", "formatUTCDayOfYear", "formatUTCMilliseconds", "formatUTCMonthNumber", "formatUTCMinutes", "formatUTCPeriod", "formatUTCQuarter", "formatUTCSeconds", "formatUTCWeekdayNumberMonday", "formatUTCWeekNumberSunday", "formatUTCWeekNumberISO", "formatUTCWeekdayNumberSunday", "formatUTCWeekNumberMonday", "formatUTCYear", "formatUTCFullYear", "formatUTCZone", "parses", "parseShortWeekday", "parseWeekday", "parseShortMonth", "parseMonth", "parseLocaleDateTime", "parseDayOfMonth", "parseMicroseconds", "parseYear", "parseFullYear", "parseHour24", "parseDayOfYear", "parseMilliseconds", "parseMonthNumber", "parseMinutes", "parsePeriod", "parseQuarter", "parseUnixTimestamp", "parseUnixTimestampSeconds", "parseSeconds", "parseWeekdayNumberMonday", "parseWeekNumberSunday", "parseWeekNumberISO", "parseWeekdayNumberSunday", "parseWeekNumberMonday", "parseLocaleDate", "parseLocaleTime", "parseZone", "parseLiteralPercent", "newFormat", "specifier", "string", "i", "j", "n", "c", "pad", "format", "pads", "__name", "newParse", "Z", "parseSpecifier", "week", "day", "utcMonday", "utcDay", "timeMonday", "timeDay", "parse", "f", "p", "value", "fill", "width", "sign", "length", "requote", "s", "requoteRe", "names", "name", "numberRe", "percentRe", "timeYear", "timeSunday", "dISO", "timeThursday", "z", "utcYear", "dow", "utcSunday", "UTCdISO", "utcThursday", "init_locale", "__esmMin", "init_src", "defaultLocale", "definition", "locale", "formatLocale", "timeFormat", "timeParse", "utcFormat", "utcParse", "init_defaultLocale", "__esmMin", "init_locale", "__name", "init_src", "__esmMin", "init_defaultLocale", "date", "number", "calendar", "ticks", "tickInterval", "year", "month", "week", "day", "hour", "minute", "second", "format", "scale", "continuous", "invert", "domain", "formatMillisecond", "formatSecond", "formatMinute", "formatHour", "formatDay", "formatWeek", "formatMonth", "formatYear", "tickFormat", "__name", "y", "_", "interval", "d", "count", "specifier", "nice", "copy", "time", "initRange", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "timeFormat", "init_time", "__esmMin", "init_src", "init_continuous", "init_init", "init_nice", "init_src", "__esmMin", "init_band", "init_linear", "init_ordinal", "init_time", "colors_default", "specifier", "n", "colors", "i", "init_colors", "__esmMin", "__name", "Tableau10_default", "init_Tableau10", "__esmMin", "init_colors", "colors_default", "init_src", "__esmMin", "init_Tableau10", "constant_default", "x", "__name", "init_constant", "__esmMin", "acos", "x", "pi", "asin", "halfPi", "abs", "atan2", "cos", "max", "min", "sin", "sqrt", "epsilon", "tau", "init_math", "__esmMin", "__name", "withPath", "shape", "digits", "_", "d", "Path", "init_path", "__esmMin", "init_src", "__name", "arcInnerRadius", "d", "arcOuterRadius", "arcStartAngle", "arcEndAngle", "arcPadAngle", "intersect", "x0", "y0", "x1", "y1", "x2", "y2", "x3", "y3", "x10", "y10", "x32", "y32", "t", "epsilon", "cornerTangents", "r1", "rc", "cw", "x01", "y01", "lo", "sqrt", "ox", "oy", "x11", "y11", "x00", "y00", "dx", "dy", "d2", "r", "D", "max", "cx0", "cy0", "cx1", "cy1", "dx0", "dy0", "dx1", "dy1", "arc_default", "innerRadius", "outerRadius", "cornerRadius", "constant_default", "padRadius", "startAngle", "endAngle", "padAngle", "context", "path", "withPath", "arc", "buffer", "r0", "a0", "halfPi", "a1", "da", "abs", "tau", "cos", "sin", "a01", "a11", "a00", "a10", "da0", "da1", "ap", "rp", "min", "rc0", "rc1", "t0", "t1", "p0", "asin", "p1", "oc", "pi", "ax", "ay", "bx", "by", "kc", "acos", "lc", "atan2", "__name", "a", "_", "init_arc", "__esmMin", "init_constant", "init_math", "init_path", "array_default", "x", "slice", "init_array", "__esmMin", "__name", "Linear", "context", "linear_default", "init_linear", "__esmMin", "__name", "x", "y", "x", "p", "y", "init_point", "__esmMin", "__name", "line_default", "x", "y", "defined", "constant_default", "context", "curve", "linear_default", "output", "path", "withPath", "line", "data", "i", "n", "array_default", "defined0", "buffer", "__name", "_", "init_line", "__esmMin", "init_array", "init_constant", "init_linear", "init_path", "init_point", "descending_default", "a", "b", "init_descending", "__esmMin", "__name", "identity_default", "d", "init_identity", "__esmMin", "__name", "pie_default", "value", "identity_default", "sortValues", "descending_default", "sort", "startAngle", "constant_default", "endAngle", "tau", "padAngle", "pie", "data", "i", "n", "array_default", "j", "k", "sum", "index", "arcs", "a0", "da", "a1", "p", "pa", "v", "__name", "_", "init_pie", "__esmMin", "init_array", "init_constant", "init_descending", "init_identity", "init_math", "bumpX", "context", "Bump", "bumpY", "init_bump", "__esmMin", "__name", "x", "y", "noop_default", "init_noop", "__esmMin", "__name", "point", "that", "x", "y", "Basis", "context", "basis_default", "init_basis", "__esmMin", "__name", "BasisClosed", "context", "basisClosed_default", "init_basisClosed", "__esmMin", "init_noop", "init_basis", "__name", "noop_default", "x", "y", "point", "BasisOpen", "context", "basisOpen_default", "init_basisOpen", "__esmMin", "init_basis", "__name", "x", "y", "x0", "y0", "point", "Bundle", "context", "beta", "Basis", "bundle_default", "init_bundle", "__esmMin", "init_basis", "__name", "x", "y", "j", "x0", "y0", "dx", "dy", "i", "t", "custom", "bundle", "point", "that", "x", "y", "Cardinal", "context", "tension", "cardinal_default", "init_cardinal", "__esmMin", "__name", "custom", "cardinal", "CardinalClosed", "context", "tension", "cardinalClosed_default", "init_cardinalClosed", "__esmMin", "init_noop", "init_cardinal", "__name", "noop_default", "x", "y", "point", "custom", "cardinal", "CardinalOpen", "context", "tension", "cardinalOpen_default", "init_cardinalOpen", "__esmMin", "init_cardinal", "__name", "x", "y", "point", "custom", "cardinal", "point", "that", "x", "y", "x1", "y1", "x2", "y2", "epsilon", "a", "n", "b", "m", "CatmullRom", "context", "alpha", "catmullRom_default", "init_catmullRom", "__esmMin", "init_math", "init_cardinal", "__name", "x23", "y23", "custom", "catmullRom", "Cardinal", "CatmullRomClosed", "context", "alpha", "catmullRomClosed_default", "init_catmullRomClosed", "__esmMin", "init_cardinalClosed", "init_noop", "init_catmullRom", "__name", "noop_default", "x", "y", "x23", "y23", "point", "custom", "catmullRom", "CardinalClosed", "CatmullRomOpen", "context", "alpha", "catmullRomOpen_default", "init_catmullRomOpen", "__esmMin", "init_cardinalOpen", "init_catmullRom", "__name", "x", "y", "x23", "y23", "point", "custom", "catmullRom", "CardinalOpen", "LinearClosed", "context", "linearClosed_default", "init_linearClosed", "__esmMin", "init_noop", "__name", "noop_default", "x", "y", "sign", "x", "slope3", "that", "x2", "y2", "h0", "h1", "s0", "s1", "p", "slope2", "t", "h", "point", "t0", "t1", "x0", "y0", "x1", "y1", "dx", "MonotoneX", "context", "MonotoneY", "ReflectContext", "monotoneX", "monotoneY", "init_monotone", "__esmMin", "__name", "y", "Natural", "context", "controlPoints", "x", "i", "n", "m", "a", "b", "r", "natural_default", "init_natural", "__esmMin", "__name", "y", "px", "py", "i0", "i1", "Step", "context", "t", "step_default", "stepBefore", "stepAfter", "init_step", "__esmMin", "__name", "x", "y", "x1", "init_src", "__esmMin", "init_arc", "init_line", "init_pie", "init_basisClosed", "init_basisOpen", "init_basis", "init_bump", "init_bundle", "init_cardinalClosed", "init_cardinalOpen", "init_cardinal", "init_catmullRomClosed", "init_catmullRomOpen", "init_catmullRom", "init_linearClosed", "init_linear", "init_monotone", "init_natural", "init_step", "init_constant", "__esmMin", "init_event", "__esmMin", "Transform", "k", "x", "y", "transform", "node", "identity", "init_transform", "__esmMin", "__name", "point", "location", "init_noevent", "__esmMin", "init_zoom", "__esmMin", "init_src", "init_constant", "init_event", "init_transform", "init_noevent", "init_src", "__esmMin", "init_zoom", "init_transform", "init_src", "__esmMin", "require_constants", "__commonJSMin", "exports", "require_dist", "__commonJSMin", "exports", "constants_1", "isRelativeUrlWithoutProtocol", "url", "__name", "decodeHtmlCharacters", "str", "removedNullByte", "match", "dec", "isValidUrl", "decodeURI", "uri", "sanitizeUrl", "charsToDecode", "decodedUrl", "sanitizedUrl", "trimmedUrl", "urlSchemeParseResults", "urlScheme", "backSanitized", "url_1", "import_sanitize_url", "drawRect", "drawBackgroundRect", "drawText", "drawImage", "drawEmbeddedImage", "getNoteRect", "getTextObj", "init_svgDrawCommon", "__esmMin", "init_common", "__name", "element", "rectData", "rectElement", "attrKey", "bounds", "textData", "nText", "lineBreakRegex", "textElem", "tspan", "elem", "x", "y", "link", "imageElement", "sanitizedLink", "import_sanitize_url", "drawRect", "drawImage", "drawRels", "drawBoundary", "drawC4Shape", "insertDatabaseIcon", "insertComputerIcon", "insertClockIcon", "insertArrowHead", "insertArrowEnd", "insertArrowFilledHead", "insertDynamicNumber", "insertArrowCrossHead", "getC4ShapeFont", "_drawTextCandidateFunc", "svgDraw_default", "init_svgDraw", "__esmMin", "init_common", "init_svgDrawCommon", "__name", "elem", "rectData", "width", "height", "x", "y", "link", "imageElem", "sanitizedLink", "rels", "conf", "relsElem", "rel", "textColor", "strokeColor", "offsetX", "offsetY", "url", "line", "messageConf", "boundary", "boundaryElem", "fillColor", "fontColor", "attrsValue", "boundaryConf", "c4Shape", "personImg", "c4ShapeElem", "rect", "getNoteRect", "c4ShapeFontConf", "textFontConf", "marker", "cnf", "typeC4Shape", "byText", "content", "g", "textAttrs", "text", "_setTextAttrs", "byTspan", "fontSize", "fontFamily", "fontWeight", "lines", "common_default", "i", "dy", "byFo", "s", "toText", "fromTextAttrsDict", "key", "freeGlobal", "freeGlobal_default", "init_freeGlobal", "__esmMin", "freeSelf", "root", "root_default", "init_root", "__esmMin", "init_freeGlobal", "freeGlobal_default", "Symbol", "Symbol_default", "init_Symbol", "__esmMin", "init_root", "root_default", "getRawTag", "value", "isOwn", "hasOwnProperty", "symToStringTag", "tag", "unmasked", "result", "nativeObjectToString", "objectProto", "getRawTag_default", "init_getRawTag", "__esmMin", "init_Symbol", "Symbol_default", "__name", "objectToString", "value", "nativeObjectToString", "objectProto", "objectToString_default", "init_objectToString", "__esmMin", "__name", "baseGetTag", "value", "undefinedTag", "nullTag", "symToStringTag", "getRawTag_default", "objectToString_default", "baseGetTag_default", "init_baseGetTag", "__esmMin", "init_Symbol", "init_getRawTag", "init_objectToString", "Symbol_default", "__name", "isObject", "value", "type", "isObject_default", "init_isObject", "__esmMin", "__name", "isFunction", "value", "isObject_default", "tag", "baseGetTag_default", "funcTag", "genTag", "asyncTag", "proxyTag", "isFunction_default", "init_isFunction", "__esmMin", "init_baseGetTag", "init_isObject", "__name", "coreJsData", "coreJsData_default", "init_coreJsData", "__esmMin", "init_root", "root_default", "isMasked", "func", "maskSrcKey", "isMasked_default", "init_isMasked", "__esmMin", "init_coreJsData", "uid", "coreJsData_default", "__name", "toSource", "func", "funcToString", "funcProto", "toSource_default", "init_toSource", "__esmMin", "__name", "baseIsNative", "value", "isObject_default", "isMasked_default", "pattern", "isFunction_default", "reIsNative", "reIsHostCtor", "toSource_default", "reRegExpChar", "funcProto", "objectProto", "funcToString", "hasOwnProperty", "baseIsNative_default", "init_baseIsNative", "__esmMin", "init_isFunction", "init_isMasked", "init_isObject", "init_toSource", "__name", "getValue", "object", "key", "getValue_default", "init_getValue", "__esmMin", "__name", "getNative", "object", "key", "value", "getValue_default", "baseIsNative_default", "getNative_default", "init_getNative", "__esmMin", "init_baseIsNative", "init_getValue", "__name", "nativeCreate", "nativeCreate_default", "init_nativeCreate", "__esmMin", "init_getNative", "getNative_default", "hashClear", "nativeCreate_default", "hashClear_default", "init_hashClear", "__esmMin", "init_nativeCreate", "__name", "hashDelete", "key", "result", "hashDelete_default", "init_hashDelete", "__esmMin", "__name", "hashGet", "key", "data", "nativeCreate_default", "result", "HASH_UNDEFINED", "hasOwnProperty", "objectProto", "hashGet_default", "init_hashGet", "__esmMin", "init_nativeCreate", "__name", "hashHas", "key", "data", "nativeCreate_default", "hasOwnProperty", "objectProto", "hashHas_default", "init_hashHas", "__esmMin", "init_nativeCreate", "__name", "hashSet", "key", "value", "data", "nativeCreate_default", "HASH_UNDEFINED", "hashSet_default", "init_hashSet", "__esmMin", "init_nativeCreate", "__name", "Hash", "entries", "index", "length", "entry", "Hash_default", "init_Hash", "__esmMin", "init_hashClear", "init_hashDelete", "init_hashGet", "init_hashHas", "init_hashSet", "__name", "hashClear_default", "hashDelete_default", "hashGet_default", "hashHas_default", "hashSet_default", "listCacheClear", "listCacheClear_default", "init_listCacheClear", "__esmMin", "__name", "eq", "value", "other", "eq_default", "init_eq", "__esmMin", "__name", "assocIndexOf", "array", "key", "length", "eq_default", "assocIndexOf_default", "init_assocIndexOf", "__esmMin", "init_eq", "__name", "listCacheDelete", "key", "data", "index", "assocIndexOf_default", "lastIndex", "splice", "arrayProto", "listCacheDelete_default", "init_listCacheDelete", "__esmMin", "init_assocIndexOf", "__name", "listCacheGet", "key", "data", "index", "assocIndexOf_default", "listCacheGet_default", "init_listCacheGet", "__esmMin", "init_assocIndexOf", "__name", "listCacheHas", "key", "assocIndexOf_default", "listCacheHas_default", "init_listCacheHas", "__esmMin", "init_assocIndexOf", "__name", "listCacheSet", "key", "value", "data", "index", "assocIndexOf_default", "listCacheSet_default", "init_listCacheSet", "__esmMin", "init_assocIndexOf", "__name", "ListCache", "entries", "index", "length", "entry", "ListCache_default", "init_ListCache", "__esmMin", "init_listCacheClear", "init_listCacheDelete", "init_listCacheGet", "init_listCacheHas", "init_listCacheSet", "__name", "listCacheClear_default", "listCacheDelete_default", "listCacheGet_default", "listCacheHas_default", "listCacheSet_default", "Map", "Map_default", "init_Map", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "mapCacheClear", "Hash_default", "Map_default", "ListCache_default", "mapCacheClear_default", "init_mapCacheClear", "__esmMin", "init_Hash", "init_ListCache", "init_Map", "__name", "isKeyable", "value", "type", "isKeyable_default", "init_isKeyable", "__esmMin", "__name", "getMapData", "map", "key", "data", "isKeyable_default", "getMapData_default", "init_getMapData", "__esmMin", "init_isKeyable", "__name", "mapCacheDelete", "key", "result", "getMapData_default", "mapCacheDelete_default", "init_mapCacheDelete", "__esmMin", "init_getMapData", "__name", "mapCacheGet", "key", "getMapData_default", "mapCacheGet_default", "init_mapCacheGet", "__esmMin", "init_getMapData", "__name", "mapCacheHas", "key", "getMapData_default", "mapCacheHas_default", "init_mapCacheHas", "__esmMin", "init_getMapData", "__name", "mapCacheSet", "key", "value", "data", "getMapData_default", "size", "mapCacheSet_default", "init_mapCacheSet", "__esmMin", "init_getMapData", "__name", "MapCache", "entries", "index", "length", "entry", "MapCache_default", "init_MapCache", "__esmMin", "init_mapCacheClear", "init_mapCacheDelete", "init_mapCacheGet", "init_mapCacheHas", "init_mapCacheSet", "__name", "mapCacheClear_default", "mapCacheDelete_default", "mapCacheGet_default", "mapCacheHas_default", "mapCacheSet_default", "memoize", "func", "resolver", "FUNC_ERROR_TEXT", "memoized", "__name", "args", "key", "cache", "result", "MapCache_default", "memoize_default", "init_memoize", "__esmMin", "init_MapCache", "stackClear", "ListCache_default", "stackClear_default", "init_stackClear", "__esmMin", "init_ListCache", "__name", "stackDelete", "key", "data", "result", "stackDelete_default", "init_stackDelete", "__esmMin", "__name", "stackGet", "key", "stackGet_default", "init_stackGet", "__esmMin", "__name", "stackHas", "key", "stackHas_default", "init_stackHas", "__esmMin", "__name", "stackSet", "key", "value", "data", "ListCache_default", "pairs", "Map_default", "LARGE_ARRAY_SIZE", "MapCache_default", "stackSet_default", "init_stackSet", "__esmMin", "init_ListCache", "init_Map", "init_MapCache", "__name", "Stack", "entries", "data", "ListCache_default", "Stack_default", "init_Stack", "__esmMin", "init_ListCache", "init_stackClear", "init_stackDelete", "init_stackGet", "init_stackHas", "init_stackSet", "__name", "stackClear_default", "stackDelete_default", "stackGet_default", "stackHas_default", "stackSet_default", "defineProperty", "defineProperty_default", "init_defineProperty", "__esmMin", "init_getNative", "func", "getNative_default", "baseAssignValue", "object", "key", "value", "defineProperty_default", "baseAssignValue_default", "init_baseAssignValue", "__esmMin", "init_defineProperty", "__name", "assignMergeValue", "object", "key", "value", "eq_default", "baseAssignValue_default", "assignMergeValue_default", "init_assignMergeValue", "__esmMin", "init_baseAssignValue", "init_eq", "__name", "createBaseFor", "fromRight", "object", "iteratee", "keysFunc", "index", "iterable", "props", "length", "key", "createBaseFor_default", "init_createBaseFor", "__esmMin", "__name", "baseFor", "baseFor_default", "init_baseFor", "__esmMin", "init_createBaseFor", "createBaseFor_default", "cloneBuffer", "buffer", "isDeep", "length", "result", "allocUnsafe", "freeExports", "freeModule", "moduleExports", "Buffer", "cloneBuffer_default", "init_cloneBuffer", "__esmMin", "init_root", "root_default", "__name", "Uint8Array", "Uint8Array_default", "init_Uint8Array", "__esmMin", "init_root", "root_default", "cloneArrayBuffer", "arrayBuffer", "result", "Uint8Array_default", "cloneArrayBuffer_default", "init_cloneArrayBuffer", "__esmMin", "init_Uint8Array", "__name", "cloneTypedArray", "typedArray", "isDeep", "buffer", "cloneArrayBuffer_default", "cloneTypedArray_default", "init_cloneTypedArray", "__esmMin", "init_cloneArrayBuffer", "__name", "copyArray", "source", "array", "index", "length", "copyArray_default", "init_copyArray", "__esmMin", "__name", "objectCreate", "baseCreate", "baseCreate_default", "init_baseCreate", "__esmMin", "init_isObject", "object", "__name", "proto", "isObject_default", "result", "overArg", "func", "transform", "arg", "overArg_default", "init_overArg", "__esmMin", "__name", "getPrototype", "getPrototype_default", "init_getPrototype", "__esmMin", "init_overArg", "overArg_default", "isPrototype", "value", "Ctor", "proto", "objectProto", "isPrototype_default", "init_isPrototype", "__esmMin", "__name", "initCloneObject", "object", "isPrototype_default", "baseCreate_default", "getPrototype_default", "initCloneObject_default", "init_initCloneObject", "__esmMin", "init_baseCreate", "init_getPrototype", "init_isPrototype", "__name", "isObjectLike", "value", "isObjectLike_default", "init_isObjectLike", "__esmMin", "__name", "baseIsArguments", "value", "isObjectLike_default", "baseGetTag_default", "argsTag", "baseIsArguments_default", "init_baseIsArguments", "__esmMin", "init_baseGetTag", "init_isObjectLike", "__name", "objectProto", "hasOwnProperty", "propertyIsEnumerable", "isArguments", "isArguments_default", "init_isArguments", "__esmMin", "init_baseIsArguments", "init_isObjectLike", "baseIsArguments_default", "value", "isObjectLike_default", "isArray", "isArray_default", "init_isArray", "__esmMin", "isLength", "value", "MAX_SAFE_INTEGER", "isLength_default", "init_isLength", "__esmMin", "__name", "isArrayLike", "value", "isLength_default", "isFunction_default", "isArrayLike_default", "init_isArrayLike", "__esmMin", "init_isFunction", "init_isLength", "__name", "isArrayLikeObject", "value", "isObjectLike_default", "isArrayLike_default", "isArrayLikeObject_default", "init_isArrayLikeObject", "__esmMin", "init_isArrayLike", "init_isObjectLike", "__name", "stubFalse", "stubFalse_default", "init_stubFalse", "__esmMin", "__name", "freeExports", "freeModule", "moduleExports", "Buffer", "nativeIsBuffer", "isBuffer", "isBuffer_default", "init_isBuffer", "__esmMin", "init_root", "init_stubFalse", "root_default", "stubFalse_default", "isPlainObject", "value", "isObjectLike_default", "baseGetTag_default", "objectTag", "proto", "getPrototype_default", "Ctor", "hasOwnProperty", "funcToString", "objectCtorString", "funcProto", "objectProto", "isPlainObject_default", "init_isPlainObject", "__esmMin", "init_baseGetTag", "init_getPrototype", "init_isObjectLike", "__name", "baseIsTypedArray", "value", "isObjectLike_default", "isLength_default", "typedArrayTags", "baseGetTag_default", "argsTag", "arrayTag", "boolTag", "dateTag", "errorTag", "funcTag", "mapTag", "numberTag", "objectTag", "regexpTag", "setTag", "stringTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "baseIsTypedArray_default", "init_baseIsTypedArray", "__esmMin", "init_baseGetTag", "init_isLength", "init_isObjectLike", "__name", "baseUnary", "func", "value", "baseUnary_default", "init_baseUnary", "__esmMin", "__name", "freeExports", "freeModule", "moduleExports", "freeProcess", "nodeUtil", "nodeUtil_default", "init_nodeUtil", "__esmMin", "init_freeGlobal", "freeGlobal_default", "types", "nodeIsTypedArray", "isTypedArray", "isTypedArray_default", "init_isTypedArray", "__esmMin", "init_baseIsTypedArray", "init_baseUnary", "init_nodeUtil", "nodeUtil_default", "baseUnary_default", "baseIsTypedArray_default", "safeGet", "object", "key", "safeGet_default", "init_safeGet", "__esmMin", "__name", "assignValue", "object", "key", "value", "objValue", "hasOwnProperty", "eq_default", "baseAssignValue_default", "objectProto", "assignValue_default", "init_assignValue", "__esmMin", "init_baseAssignValue", "init_eq", "__name", "copyObject", "source", "props", "object", "customizer", "isNew", "index", "length", "key", "newValue", "baseAssignValue_default", "assignValue_default", "copyObject_default", "init_copyObject", "__esmMin", "init_assignValue", "init_baseAssignValue", "__name", "baseTimes", "n", "iteratee", "index", "result", "baseTimes_default", "init_baseTimes", "__esmMin", "__name", "isIndex", "value", "length", "type", "MAX_SAFE_INTEGER", "reIsUint", "isIndex_default", "init_isIndex", "__esmMin", "__name", "arrayLikeKeys", "value", "inherited", "isArr", "isArray_default", "isArg", "isArguments_default", "isBuff", "isBuffer_default", "isType", "isTypedArray_default", "skipIndexes", "result", "baseTimes_default", "length", "key", "hasOwnProperty", "isIndex_default", "objectProto", "arrayLikeKeys_default", "init_arrayLikeKeys", "__esmMin", "init_baseTimes", "init_isArguments", "init_isArray", "init_isBuffer", "init_isIndex", "init_isTypedArray", "__name", "nativeKeysIn", "object", "result", "key", "nativeKeysIn_default", "init_nativeKeysIn", "__esmMin", "__name", "baseKeysIn", "object", "isObject_default", "nativeKeysIn_default", "isProto", "isPrototype_default", "result", "key", "hasOwnProperty", "objectProto", "baseKeysIn_default", "init_baseKeysIn", "__esmMin", "init_isObject", "init_isPrototype", "init_nativeKeysIn", "__name", "keysIn", "object", "isArrayLike_default", "arrayLikeKeys_default", "baseKeysIn_default", "keysIn_default", "init_keysIn", "__esmMin", "init_arrayLikeKeys", "init_baseKeysIn", "init_isArrayLike", "__name", "toPlainObject", "value", "copyObject_default", "keysIn_default", "toPlainObject_default", "init_toPlainObject", "__esmMin", "init_copyObject", "init_keysIn", "__name", "baseMergeDeep", "object", "source", "key", "srcIndex", "mergeFunc", "customizer", "stack", "objValue", "safeGet_default", "srcValue", "stacked", "assignMergeValue_default", "newValue", "isCommon", "isArr", "isArray_default", "isBuff", "isBuffer_default", "isTyped", "isTypedArray_default", "isArrayLikeObject_default", "copyArray_default", "cloneBuffer_default", "cloneTypedArray_default", "isPlainObject_default", "isArguments_default", "toPlainObject_default", "isObject_default", "isFunction_default", "initCloneObject_default", "baseMergeDeep_default", "init_baseMergeDeep", "__esmMin", "init_assignMergeValue", "init_cloneBuffer", "init_cloneTypedArray", "init_copyArray", "init_initCloneObject", "init_isArguments", "init_isArray", "init_isArrayLikeObject", "init_isBuffer", "init_isFunction", "init_isObject", "init_isPlainObject", "init_isTypedArray", "init_safeGet", "init_toPlainObject", "__name", "baseMerge", "object", "source", "srcIndex", "customizer", "stack", "baseFor_default", "srcValue", "key", "Stack_default", "isObject_default", "baseMergeDeep_default", "newValue", "safeGet_default", "assignMergeValue_default", "keysIn_default", "baseMerge_default", "init_baseMerge", "__esmMin", "init_Stack", "init_assignMergeValue", "init_baseFor", "init_baseMergeDeep", "init_isObject", "init_keysIn", "init_safeGet", "__name", "identity", "value", "identity_default", "init_identity", "__esmMin", "__name", "apply", "func", "thisArg", "args", "apply_default", "init_apply", "__esmMin", "__name", "overRest", "func", "start", "transform", "nativeMax", "args", "index", "length", "array", "otherArgs", "apply_default", "overRest_default", "init_overRest", "__esmMin", "init_apply", "__name", "constant", "value", "constant_default", "init_constant", "__esmMin", "__name", "baseSetToString", "baseSetToString_default", "init_baseSetToString", "__esmMin", "init_constant", "init_defineProperty", "init_identity", "defineProperty_default", "func", "string", "constant_default", "identity_default", "shortOut", "func", "count", "lastCalled", "stamp", "nativeNow", "remaining", "HOT_SPAN", "HOT_COUNT", "shortOut_default", "init_shortOut", "__esmMin", "__name", "setToString", "setToString_default", "init_setToString", "__esmMin", "init_baseSetToString", "init_shortOut", "shortOut_default", "baseSetToString_default", "baseRest", "func", "start", "setToString_default", "overRest_default", "identity_default", "baseRest_default", "init_baseRest", "__esmMin", "init_identity", "init_overRest", "init_setToString", "__name", "isIterateeCall", "value", "index", "object", "isObject_default", "type", "isArrayLike_default", "isIndex_default", "eq_default", "isIterateeCall_default", "init_isIterateeCall", "__esmMin", "init_eq", "init_isArrayLike", "init_isIndex", "init_isObject", "__name", "createAssigner", "assigner", "baseRest_default", "object", "sources", "index", "length", "customizer", "guard", "isIterateeCall_default", "source", "createAssigner_default", "init_createAssigner", "__esmMin", "init_baseRest", "init_isIterateeCall", "__name", "merge", "merge_default", "init_merge", "__esmMin", "init_baseMerge", "init_createAssigner", "createAssigner_default", "object", "source", "srcIndex", "baseMerge_default", "interpolateToCurve", "interpolate", "defaultCurve", "curveName", "d3CurveTypes", "formatUrl", "linkStr", "config", "url", "distance", "p1", "p2", "traverseEdge", "points", "prevPoint", "totalDistance", "point", "remainingDistance", "calculatePoint", "calcLabelPosition", "calcTerminalLabelPosition", "terminalMarkerSize", "position", "_points", "log", "distanceToCardinalityPoint", "center", "d", "angle", "cardinalityPosition", "getStylesFromArray", "arr", "style", "labelStyle", "element", "makeRandomHex", "length", "result", "characters", "charactersLength", "calculateTextHeight", "text", "calculateTextDimensions", "calculateTextWidth", "isDetailedError", "error", "cleanAndMerge", "defaultData", "data", "merge_default", "handleUndefinedAttr", "attrValue", "import_sanitize_url", "ZERO_WIDTH_SPACE", "directiveWithoutOpen", "detectInit", "detectDirective", "removeDirectives", "isSubstringInArray", "runFunc", "roundNumber", "calcCardinalityPosition", "cnt", "generateId", "random", "getTextObj", "drawSimpleText", "wrapLabel", "breakString", "InitIDGenerator", "decoder", "entityDecode", "insertTitle", "parseFontSize", "utils_default", "encodeEntities", "decodeEntities", "getEdgeId", "init_utils", "__esmMin", "init_src", "init_common", "init_sanitizeDirective", "init_logger", "init_detectType", "init_assignWithDepth", "init_memoize", "init_merge", "init_regexes", "basis_default", "basisClosed_default", "basisOpen_default", "bumpX", "bumpY", "bundle_default", "cardinalClosed_default", "cardinalOpen_default", "cardinal_default", "catmullRomClosed_default", "catmullRomOpen_default", "catmullRom_default", "linear_default", "linearClosed_default", "monotoneX", "monotoneY", "natural_default", "step_default", "stepAfter", "stepBefore", "__name", "inits", "results", "args", "init", "sanitizeDirective", "assignWithDepth_default", "type", "detectType", "prop", "commentWithoutDirectives", "match", "directiveRegex", "str", "i", "functionName", "params", "arrPaths", "len", "fnName", "obj", "num", "precision", "factor", "distanceToTraverse", "vectorDistance", "distanceRatio", "isRelationTypePresent", "initialPosition", "options", "elem", "textData", "nText", "common_default", "_fontSizePx", "textElem", "span", "memoize_default", "label", "maxWidth", "words", "completedLines", "nextLine", "word", "index", "wordLength", "nextLineLength", "hyphenatedStrings", "remainingWord", "line", "hyphenCharacter", "lines", "currentLine", "character", "currentCharacter", "isLastLine", "hyphenatedNextLine", "fontSize", "fontFamily", "fontWeight", "fontFamilies", "dims", "body", "select_default", "g", "cHeight", "dim", "textObj", "bBox", "deterministic", "seed", "html", "parent", "cssClass", "titleTopMargin", "title", "bounds", "fontSizeNumber", "txt", "s", "innerTxt", "from", "to", "counter", "prefix", "suffix", "calcC4ShapeTextWH", "textType", "c4Shape", "c4ShapeTextWrap", "textConf", "textLimitWidth", "wrapLabel", "common_default", "calculateTextHeight", "lines", "lineHeight", "line", "calculateTextWidth", "drawInsideBoundary", "diagram", "parentBoundaryAlias", "parentBounds", "currentBoundaries", "diagObj", "currentBounds", "Bounds", "c4BoundaryInRow", "i", "currentBoundary", "Y", "currentBoundaryTextWrap", "conf", "currentBoundaryLabelConf", "boundaryFont", "currentBoundaryTypeConf", "currentBoundaryDescrConf", "_x", "_y", "currentPersonOrSystemArray", "currentPersonOrSystemKeys", "drawC4ShapeArray", "nextCurrentBoundaries", "drawBoundary", "globalBoundaryMaxX", "globalBoundaryMaxY", "c4ShapeInRow", "setConf", "c4ShapeFont", "messageFont", "Point", "getIntersectPoint", "getIntersectPoints", "drawRels", "draw", "c4Renderer_default", "init_c4Renderer", "__esmMin", "init_src", "init_svgDraw", "init_logger", "init_c4Diagram", "init_common", "init_c4Db", "init_diagramAPI", "init_assignWithDepth", "init_utils", "init_setupGraphViewbox", "parser", "c4Db_default", "__name", "startx", "stopx", "starty", "stopy", "obj", "key", "val", "fun", "_startx", "_stopx", "_starty", "_stopy", "margin", "cnf", "assignWithDepth_default", "typeC4Shape", "boundary", "bounds", "boundaryTextWrap", "boundaryLabelConf", "svgDraw_default", "c4ShapeArray", "c4ShapeKeys", "c4ShapeKey", "c4ShapeTypeConf", "c4ShapeLabelConf", "c4ShapeTechnConf", "rectHeight", "rectWidth", "c4ShapeDescrConf", "x", "y", "fromNode", "endPoint", "x1", "y1", "x2", "y2", "fromCenterX", "fromCenterY", "dx", "dy", "tanDYX", "fromDYX", "returnPoint", "endNode", "endIntersectPoint", "startPoint", "rels", "getC4ShapeObj", "rel", "relTextWrap", "relConf", "points", "_text", "id", "_version", "getConfig", "securityLevel", "sandboxElement", "select_default", "root", "db", "log", "screenBounds", "title", "box", "height", "width", "configureSvgSize", "extraVertForTitle", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "c4Diagram_exports", "__export", "diagram", "init_c4Diagram", "__esmMin", "init_c4Db", "init_c4Renderer", "init_styles", "c4Diagram_default", "c4Db_default", "c4Renderer_default", "styles_default", "__name", "c4", "wrap", "_getDefaults", "changeDefaults", "newDefaults", "_defaults", "escape", "html", "encode", "escapeTest", "escapeReplace", "getEscapeReplacement", "escapeTestNoEncode", "escapeReplaceNoEncode", "unescape", "unescapeTest", "_", "n", "edit", "regex", "opt", "source", "obj", "__name", "name", "val", "valSource", "caret", "cleanUrl", "href", "splitCells", "tableRow", "count", "row", "match", "offset", "str", "escaped", "curr", "cells", "rtrim", "c", "invert", "l", "suffLen", "currChar", "findClosingBracket", "b", "level", "i", "outputLink", "cap", "link", "raw", "lexer", "title", "text", "token", "indentCodeCompensation", "matchIndentToCode", "indentToCode", "node", "matchIndentInNode", "indentInNode", "marked", "src", "markedInstance", "escapeReplacements", "noopTest", "_Tokenizer", "newline", "blockCode", "fences", "hr", "heading", "bullet", "lheading", "_paragraph", "blockText", "_blockLabel", "def", "list", "_tag", "_comment", "paragraph", "blockquote", "blockNormal", "gfmTable", "blockGfm", "blockPedantic", "inlineCode", "br", "inlineText", "_punctuation", "punctuation", "blockSkip", "emStrongLDelim", "emStrongRDelimAst", "emStrongRDelimUnd", "anyPunctuation", "autolink", "_inlineComment", "tag", "_inlineLabel", "reflink", "nolink", "reflinkSearch", "inlineNormal", "inlinePedantic", "inlineGfm", "inlineBreaks", "block", "inline", "_Lexer", "_Renderer", "_TextRenderer", "_Parser", "_Hooks", "Marked", "options", "setOptions", "use", "walkTokens", "parseInline", "parser", "ch", "trimmed", "lines", "tokens", "inBlockquote", "currentLines", "currentRaw", "currentText", "top", "lastToken", "oldToken", "newText", "newToken", "bull", "isordered", "itemRegex", "endsWithBlankLine", "endEarly", "itemContents", "line", "t", "nextLine", "blankLine", "indent", "nextBulletRegex", "hrRegex", "fencesBeginRegex", "headingBeginRegex", "rawLine", "istask", "ischecked", "spacers", "hasMultipleLineBreaks", "headers", "aligns", "rows", "item", "align", "cell", "trimmedUrl", "rtrimSlash", "lastParenIndex", "linkLen", "links", "linkString", "maskedSrc", "prevChar", "lLength", "rDelim", "rLength", "delimTotal", "midDelimTotal", "endReg", "lastCharLength", "hasNonSpaceChars", "hasSpaceCharsOnBothEnds", "prevCapZero", "__Lexer", "rules", "next", "lastParagraphClipped", "leading", "tabs", "cutSrc", "extTokenizer", "startIndex", "tempSrc", "tempStart", "getStartIndex", "errMsg", "keepPrevChar", "lang", "langString", "code", "depth", "ordered", "start", "body", "j", "type", "startAttr", "itemBody", "checkbox", "checked", "header", "k", "content", "cleanHref", "out", "__Parser", "anyToken", "genericToken", "ret", "textToken", "renderer", "markdown", "#parseMarkdown", "args", "callback", "values", "tableToken", "listToken", "childTokens", "extensions", "pack", "opts", "ext", "prevRenderer", "extLevel", "prop", "rendererProp", "rendererFunc", "#convertRendererFunction", "tokenizer", "tokenizerProp", "tokenizerFunc", "prevTokenizer", "hooks", "hooksProp", "hooksFunc", "prevHook", "arg", "packWalktokens", "func", "loose", "task", "origOpt", "throwError", "#onError", "e", "silent", "async", "msg", "preprocessMarkdown", "markdown", "markdownAutoWrap", "withoutMultipleNewlines", "withoutExtraSpaces", "dedent", "markdownToLines", "config", "preprocessedMarkdown", "nodes", "marked", "lines", "currentLine", "processNode", "node", "parentType", "textLine", "index", "word", "contentNode", "__name", "treeNode", "markdownToHTML", "output", "init_handle_markdown_text", "__esmMin", "init_marked_esm", "init_esm", "splitTextToChars", "text", "s", "splitWordToFitWidth", "checkFit", "word", "characters", "splitWordToFitWidthRecursion", "usedChars", "remainingChars", "type", "nextChar", "rest", "newWord", "splitLineToFitWidth", "line", "content", "splitLineToFitWidthRecursion", "words", "lines", "newLine", "joiner", "nextWord", "lineWithNextWord", "init_splitText", "__esmMin", "__name", "applyStyle", "dom", "styleFn", "addHtmlSpan", "element", "node", "width", "classes", "addBackground", "fo", "div", "label", "hasKatex", "renderKatex", "common_default", "getConfig", "labelClass", "span", "bbox", "createTspan", "textElement", "lineIndex", "lineHeight", "computeWidthOfText", "parentNode", "line", "testElement", "testSpan", "updateTextContentAndStyles", "textLength", "computeDimensionOfText", "text", "textDimension", "createFormattedText", "g", "structuredText", "labelGroup", "bkg", "checkWidth", "__name", "linesUnderWidth", "splitLineToFitWidth", "preparedLine", "tspan", "padding", "wrappedLine", "word", "index", "innerTspan", "replaceIconSubstring", "s", "createText", "init_createText", "__esmMin", "init_diagramAPI", "init_common", "init_src", "init_logger", "init_handle_markdown_text", "init_utils", "init_splitText", "el", "style", "isTitle", "useHtmlLabels", "isNode", "addSvgBackground", "config", "log", "htmlText", "markdownToHTML", "decodedReplacedText", "decodeEntities", "inputForKatex", "sanitizeBR", "markdownToLines", "svgLabel", "nodeLabelTextStyle", "select_default", "edgeLabelRectStyle", "edgeLabelTextStyle", "createPathFromPoints", "points", "pointStrings", "p", "i", "generateFullSineWavePoints", "x1", "y1", "x2", "y2", "amplitude", "numCycles", "deltaX", "deltaY", "cycleLength", "frequency", "midY", "t", "x", "y", "generateCirclePoints", "centerX", "centerY", "radius", "numPoints", "startAngle", "endAngle", "startAngleRad", "angleStep", "angle", "labelHelper", "insertLabel", "updateNodeBounds", "getNodeClasses", "init_util", "__esmMin", "init_createText", "init_diagramAPI", "init_src", "init_defaultConfig", "init_common", "init_utils", "__name", "parent", "node", "_classes", "cssClasses", "useHtmlLabels", "evaluate", "getConfig", "shapeSvg", "labelEl", "handleUndefinedAttr", "label", "text", "createText", "sanitizeText", "decodeEntities", "bbox", "halfPadding", "div", "dv", "select_default", "images", "noImgText", "img", "res", "setupImage", "bodyFontSize", "enlargingFactor", "parsedBodyFontSize", "defaultConfig_default", "parseFontSize", "width", "options", "element", "extra", "intersectNode", "node", "point", "intersect_node_default", "init_intersect_node", "__esmMin", "__name", "intersectEllipse", "node", "rx", "ry", "point", "cx", "cy", "px", "py", "det", "dx", "dy", "intersect_ellipse_default", "init_intersect_ellipse", "__esmMin", "__name", "intersectCircle", "node", "rx", "point", "intersect_ellipse_default", "intersect_circle_default", "init_intersect_circle", "__esmMin", "init_intersect_ellipse", "__name", "intersectLine", "p1", "p2", "q1", "q2", "a1", "a2", "b1", "b2", "c1", "c2", "r1", "r2", "r3", "r4", "denom", "offset", "num", "y", "sameSign", "intersect_line_default", "init_intersect_line", "__esmMin", "__name", "intersectPolygon", "node", "polyPoints", "point", "x1", "y1", "intersections", "minX", "minY", "entry", "left", "top", "i", "p1", "p2", "intersect", "intersect_line_default", "p", "q", "pdx", "pdy", "distp", "qdx", "qdy", "distq", "intersect_polygon_default", "init_intersect_polygon", "__esmMin", "init_intersect_line", "__name", "intersectRect", "intersect_rect_default", "init_intersect_rect", "__esmMin", "__name", "node", "point", "x", "y", "dx", "dy", "w", "h", "sx", "sy", "intersect_default", "init_intersect", "__esmMin", "init_intersect_node", "init_intersect_circle", "init_intersect_ellipse", "init_intersect_polygon", "init_intersect_rect", "intersect_node_default", "intersect_circle_default", "intersect_ellipse_default", "intersect_polygon_default", "intersect_rect_default", "solidStateFill", "compileStyles", "styles2Map", "styles2String", "userNodeOverrides", "init_handDrawnShapeStyles", "__esmMin", "init_diagramAPI", "__name", "color", "handDrawnSeed", "getConfig", "node", "stylesMap", "styles", "styleMap", "style", "key", "value", "stylesArray", "labelStyles", "nodeStyles", "borderStyles", "backgroundStyles", "options", "themeVariables", "nodeBorder", "mainBkg", "t", "s", "o", "h", "r", "e", "n", "a", "i", "c", "l", "k", "b", "f", "d", "g", "M", "y", "m", "u", "p", "x", "w", "P", "v", "S", "O", "L", "T", "A", "$", "j", "z", "G", "D", "F", "E", "q", "V", "_", "Z", "I", "C", "W", "R", "__name", "Q", "H", "N", "B", "J", "K", "U", "X", "Y", "tt", "et", "st", "nt", "ot", "at", "init_rough_esm", "__esmMin", "anchor", "parent", "node", "labelStyles", "styles2String", "classes", "getNodeClasses", "cssClasses", "shapeSvg", "radius", "cssStyles", "rc", "at", "options", "userNodeOverrides", "roughNode", "circleElem", "handleUndefinedAttr", "updateNodeBounds", "point", "log", "intersect_default", "init_anchor", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_utils", "__name", "generateArcPoints", "x1", "y1", "x2", "y2", "rx", "ry", "clockwise", "midX", "midY", "angle", "dx", "dy", "transformedX", "transformedY", "distance", "scaledCenterDistance", "centerX", "centerY", "startAngle", "angleRange", "points", "i", "t", "x", "y", "bowTieRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "cssStyles", "rc", "at", "options", "userNodeOverrides", "bowTieRectPath", "createPathFromPoints", "bowTieRectShapePath", "bowTieRectShape", "updateNodeBounds", "point", "intersect_default", "init_bowTieRect", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "insertPolygonShape", "parent", "w", "h", "points", "d", "init_insertPolygonShape", "__esmMin", "__name", "card", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "h", "padding", "w", "left", "right", "top", "bottom", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "init_card", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "choice", "parent", "node", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "cssStyles", "s", "points", "rc", "at", "options", "userNodeOverrides", "choicePath", "createPathFromPoints", "roughNode", "choiceShape", "point", "intersect_default", "init_choice", "__esmMin", "init_intersect", "init_rough_esm", "init_handDrawnShapeStyles", "init_util", "__name", "circle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "halfPadding", "labelHelper", "getNodeClasses", "radius", "circleElem", "cssStyles", "rc", "at", "options", "userNodeOverrides", "roughNode", "handleUndefinedAttr", "updateNodeBounds", "point", "log", "intersect_default", "init_circle", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_utils", "__name", "createLine", "r", "xAxis45", "yAxis45", "lineLength", "pointQ1", "pointQ2", "pointQ3", "pointQ4", "crossedCircle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "radius", "cssStyles", "rc", "at", "options", "userNodeOverrides", "circleNode", "linePath", "lineNode", "updateNodeBounds", "point", "log", "intersect_default", "init_crossedCircle", "__esmMin", "init_logger", "init_util", "init_handDrawnShapeStyles", "init_rough_esm", "init_intersect", "__name", "generateCirclePoints", "centerX", "centerY", "radius", "numPoints", "startAngle", "endAngle", "points", "startAngleRad", "angleStep", "i", "angle", "x", "y", "curlyBraceLeft", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "cssStyles", "rectPoints", "rc", "at", "options", "userNodeOverrides", "newCurlyBracePath", "createPathFromPoints", "curlyBraceLeftNode", "rectPath", "rectShape", "curlyBraceLeftShape", "updateNodeBounds", "point", "intersect_default", "init_curlyBraceLeft", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "generateCirclePoints", "centerX", "centerY", "radius", "numPoints", "startAngle", "endAngle", "points", "startAngleRad", "angleStep", "i", "angle", "x", "y", "curlyBraceRight", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "cssStyles", "rectPoints", "rc", "at", "options", "userNodeOverrides", "newCurlyBracePath", "createPathFromPoints", "curlyBraceRightNode", "rectPath", "rectShape", "curlyBraceRightShape", "updateNodeBounds", "point", "intersect_default", "init_curlyBraceRight", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "generateCirclePoints", "centerX", "centerY", "radius", "numPoints", "startAngle", "endAngle", "points", "startAngleRad", "angleStep", "i", "angle", "x", "y", "curlyBraces", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "cssStyles", "leftCurlyBracePoints", "rightCurlyBracePoints", "rectPoints", "rc", "at", "options", "userNodeOverrides", "newLeftCurlyBracePath", "createPathFromPoints", "leftCurlyBraceNode", "newRightCurlyBracePath", "rightCurlyBraceNode", "rectPath", "rectShape", "curlyBracesShape", "updateNodeBounds", "point", "intersect_default", "init_curlyBraces", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "curvedTrapezoid", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "minWidth", "minHeight", "w", "radius", "cssStyles", "rc", "at", "options", "userNodeOverrides", "totalWidth", "totalHeight", "rw", "tw", "points", "generateCirclePoints", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "intersect_default", "init_curvedTrapezoid", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "cylinder", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "rx", "ry", "h", "cssStyles", "rc", "at", "outerPathData", "createOuterCylinderPathD", "innerPathData", "createInnerCylinderPathD", "outerNode", "userNodeOverrides", "innerLine", "pathData", "createCylinderPathD", "handleUndefinedAttr", "updateNodeBounds", "point", "pos", "intersect_default", "x", "y", "init_cylinder", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_utils", "__name", "width", "height", "dividedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "rectOffset", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pts", "poly", "p", "polygon", "updateNodeBounds", "point", "intersect_default", "init_dividedRect", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "doublecircle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "halfPadding", "labelHelper", "getNodeClasses", "outerRadius", "innerRadius", "circleGroup", "cssStyles", "rc", "at", "outerOptions", "userNodeOverrides", "innerOptions", "outerRoughNode", "innerRoughNode", "handleUndefinedAttr", "outerCircle", "innerCircle", "updateNodeBounds", "point", "log", "intersect_default", "init_doubleCircle", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_utils", "__name", "filledCircle", "parent", "node", "themeVariables", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "radius", "cssStyles", "rc", "at", "nodeBorder", "options", "userNodeOverrides", "circleNode", "updateNodeBounds", "point", "log", "intersect_default", "init_filledCircle", "__esmMin", "init_rough_esm", "init_logger", "init_intersect", "init_handDrawnShapeStyles", "init_util", "__name", "flippedTriangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "tw", "points", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "updateNodeBounds", "point", "log", "intersect_default", "init_flippedTriangle", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "forkJoin", "parent", "node", "dir", "state", "themeVariables", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "cssStyles", "width", "height", "x", "y", "rc", "at", "options", "userNodeOverrides", "roughNode", "shape", "updateNodeBounds", "padding", "point", "intersect_default", "init_forkJoin", "__esmMin", "init_rough_esm", "init_intersect", "init_handDrawnShapeStyles", "init_util", "__name", "halfRoundedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "minWidth", "minHeight", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "radius", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "generateCirclePoints", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "log", "intersect_default", "init_halfRoundedRectangle", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "hexagon", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "f", "h", "m", "w", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createHexagonPathD", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "init_hexagon", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "x", "y", "width", "height", "hourglass", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "labelHelper", "getNodeClasses", "w", "h", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "log", "intersect_default", "init_hourglass", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "icon", "parent", "node", "themeVariables", "flowchart", "labelStyles", "styles2String", "assetHeight", "assetWidth", "iconSize", "defaultWidth", "shapeSvg", "bbox", "label", "labelHelper", "topLabel", "height", "width", "nodeBorder", "stylesMap", "compileStyles", "y", "labelPadding", "rc", "at", "options", "userNodeOverrides", "iconNode", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "iconElem", "getIconSVG", "iconBBox", "iconWidth", "iconHeight", "iconX", "iconY", "updateNodeBounds", "point", "log", "intersect_default", "dx", "dy", "nodeHeight", "points", "init_icon", "__esmMin", "init_rough_esm", "init_logger", "init_icons", "init_intersect", "init_handDrawnShapeStyles", "init_util", "__name", "iconCircle", "parent", "node", "themeVariables", "flowchart", "labelStyles", "styles2String", "assetHeight", "assetWidth", "iconSize", "defaultWidth", "shapeSvg", "bbox", "label", "labelHelper", "padding", "labelPadding", "topLabel", "nodeBorder", "mainBkg", "stylesMap", "compileStyles", "rc", "at", "options", "userNodeOverrides", "fill", "iconElem", "getIconSVG", "iconBBox", "iconWidth", "iconHeight", "iconX", "iconY", "diameter", "iconNode", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "updateNodeBounds", "point", "log", "intersect_default", "init_iconCircle", "__esmMin", "init_rough_esm", "init_logger", "init_icons", "init_intersect", "init_handDrawnShapeStyles", "init_util", "__name", "createRoundedRectPathD", "init_roundedRectPath", "__esmMin", "__name", "x", "y", "totalWidth", "totalHeight", "radius", "iconRounded", "parent", "node", "themeVariables", "flowchart", "labelStyles", "styles2String", "assetHeight", "assetWidth", "iconSize", "defaultWidth", "shapeSvg", "bbox", "halfPadding", "label", "labelHelper", "topLabel", "height", "width", "nodeBorder", "mainBkg", "stylesMap", "compileStyles", "x", "y", "labelPadding", "rc", "at", "options", "userNodeOverrides", "fill", "iconNode", "createRoundedRectPathD", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "iconElem", "getIconSVG", "iconBBox", "iconWidth", "iconHeight", "iconX", "iconY", "updateNodeBounds", "point", "log", "intersect_default", "dx", "dy", "nodeHeight", "points", "init_iconRounded", "__esmMin", "init_rough_esm", "init_logger", "init_icons", "init_intersect", "init_handDrawnShapeStyles", "init_roundedRectPath", "init_util", "__name", "iconSquare", "parent", "node", "themeVariables", "flowchart", "labelStyles", "styles2String", "assetHeight", "assetWidth", "iconSize", "defaultWidth", "shapeSvg", "bbox", "halfPadding", "label", "labelHelper", "topLabel", "height", "width", "nodeBorder", "mainBkg", "stylesMap", "compileStyles", "x", "y", "labelPadding", "rc", "at", "options", "userNodeOverrides", "fill", "iconNode", "createRoundedRectPathD", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "iconElem", "getIconSVG", "iconBBox", "iconWidth", "iconHeight", "iconX", "iconY", "updateNodeBounds", "point", "log", "intersect_default", "dx", "dy", "nodeHeight", "points", "init_iconSquare", "__esmMin", "init_rough_esm", "init_logger", "init_icons", "init_intersect", "init_roundedRectPath", "init_handDrawnShapeStyles", "init_util", "__name", "imageSquare", "parent", "node", "flowchart", "img", "imageNaturalWidth", "imageNaturalHeight", "labelStyles", "styles2String", "defaultWidth", "imageRawWidth", "imageWidth", "imageHeight", "shapeSvg", "bbox", "label", "labelHelper", "topLabel", "x", "y", "labelPadding", "rc", "at", "options", "userNodeOverrides", "imageNode", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "image", "updateNodeBounds", "point", "log", "intersect_default", "dx", "dy", "nodeHeight", "points", "init_imageSquare", "__esmMin", "init_rough_esm", "init_logger", "init_intersect", "init_handDrawnShapeStyles", "init_util", "__name", "inv_trapezoid", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "init_invertedTrapezoid", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "drawRect", "parent", "node", "options", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "totalWidth", "totalHeight", "x", "y", "rect", "rx", "ry", "cssStyles", "rc", "at", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "handleUndefinedAttr", "updateNodeBounds", "point", "intersect_default", "init_drawRect", "__esmMin", "init_util", "init_intersect", "init_roundedRectPath", "init_handDrawnShapeStyles", "init_rough_esm", "init_utils", "__name", "labelRect", "parent", "node", "shapeSvg", "bbox", "label", "labelHelper", "rect", "updateNodeBounds", "point", "intersect_default", "init_labelRect", "__esmMin", "init_drawRect", "init_util", "init_intersect", "__name", "lean_left", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "init_leanLeft", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "lean_right", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "init_leanRight", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "lightningBolt", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "cssStyles", "width", "height", "gap", "points", "rc", "at", "options", "userNodeOverrides", "linePath", "createPathFromPoints", "lineNode", "updateNodeBounds", "point", "log", "intersect_default", "init_lightningBolt", "__esmMin", "init_logger", "init_util", "init_handDrawnShapeStyles", "init_rough_esm", "init_intersect", "__name", "linedCylinder", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "rx", "ry", "h", "outerOffset", "cylinder", "cssStyles", "rc", "at", "outerPathData", "createOuterCylinderPathD", "innerPathData", "createInnerCylinderPathD", "options", "userNodeOverrides", "outerNode", "innerLine", "pathData", "createCylinderPathD", "handleUndefinedAttr", "updateNodeBounds", "point", "pos", "intersect_default", "x", "y", "init_linedCylinder", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_utils", "__name", "width", "height", "linedWaveEdgedRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "waveAmplitude", "finalH", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "generateFullSineWavePoints", "poly", "p", "waveEdgeRect", "updateNodeBounds", "point", "intersect_default", "init_linedWaveEdgedRect", "__esmMin", "init_util", "init_intersect", "init_rough_esm", "init_handDrawnShapeStyles", "__name", "multiRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "rectOffset", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "outerPathPoints", "innerPathPoints", "outerPath", "createPathFromPoints", "outerNode", "innerPath", "innerNode", "updateNodeBounds", "point", "intersect_default", "init_multiRect", "__esmMin", "init_util", "init_handDrawnShapeStyles", "init_rough_esm", "init_intersect", "__name", "multiWaveEdgedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "waveAmplitude", "finalH", "x", "y", "rectOffset", "cssStyles", "wavePoints", "generateFullSineWavePoints", "lastWavePoint", "outerPathPoints", "innerPathPoints", "rc", "at", "options", "userNodeOverrides", "outerPath", "createPathFromPoints", "outerNode", "innerPath", "innerNode", "shape", "updateNodeBounds", "point", "intersect_default", "init_multiWaveEdgedRectangle", "__esmMin", "init_util", "init_intersect", "init_rough_esm", "init_handDrawnShapeStyles", "__name", "note", "parent", "node", "themeVariables", "labelStyles", "nodeStyles", "styles2String", "getConfig", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "totalWidth", "totalHeight", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "noteShapeNode", "rect", "updateNodeBounds", "point", "intersect_default", "init_note", "__esmMin", "init_rough_esm", "init_intersect", "init_handDrawnShapeStyles", "init_util", "init_config", "__name", "question", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "s", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createDecisionBoxPathD", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "log", "intersect_default", "init_question", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "x", "y", "size", "rect_left_inv_arrow", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "x", "y", "notch", "points", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "polygon", "updateNodeBounds", "point", "intersect_default", "init_rectLeftInvArrow", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "applyStyle", "dom", "styleFn", "addHtmlLabel", "node", "fo", "select_default", "div", "label", "hasKatex", "renderKatex", "common_default", "getConfig", "labelClass", "createLabel", "createLabel_default", "init_createLabel", "__esmMin", "init_src", "init_logger", "init_diagramAPI", "init_common", "init_utils", "__name", "_vertexText", "style", "isTitle", "isNode", "vertexText", "evaluate", "log", "decodeEntities", "s", "svgLabel", "rows", "row", "tspan", "rectWithTitle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "classes", "shapeSvg", "g", "label", "description", "title", "text", "createLabel_default", "bbox", "evaluate", "getConfig", "div", "dv", "select_default", "log", "textRows", "titleBox", "descr", "halfPadding", "totalWidth", "totalHeight", "x", "y", "rect", "innerLine", "rc", "at", "options", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "roughLine", "updateNodeBounds", "point", "intersect_default", "init_rectWithTitle", "__esmMin", "init_src", "init_common", "init_util", "init_createLabel", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_diagramAPI", "init_roundedRectPath", "init_logger", "__name", "roundedRect", "parent", "node", "options", "drawRect", "init_roundedRect", "__esmMin", "init_drawRect", "__name", "shadedProcess", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "halfPadding", "w", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "roughNode", "p", "rect", "handleUndefinedAttr", "updateNodeBounds", "point", "intersect_default", "init_shadedProcess", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_utils", "__name", "slopedRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "intersect_default", "init_slopedRect", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "squareRect", "parent", "node", "options", "drawRect", "init_squareRect", "__esmMin", "init_drawRect", "__name", "stadium", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "h", "w", "rect", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createRoundedRectPathD", "roughNode", "handleUndefinedAttr", "updateNodeBounds", "point", "intersect_default", "init_stadium", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_roundedRectPath", "init_utils", "__name", "state", "parent", "node", "drawRect", "init_state", "__esmMin", "init_drawRect", "__name", "stateEnd", "parent", "node", "themeVariables", "labelStyles", "nodeStyles", "styles2String", "cssStyles", "lineColor", "stateBorder", "nodeBorder", "shapeSvg", "rc", "at", "options", "userNodeOverrides", "roughNode", "innerFill", "roughInnerNode", "circle", "updateNodeBounds", "point", "intersect_default", "init_stateEnd", "__esmMin", "init_rough_esm", "init_intersect", "init_handDrawnShapeStyles", "init_util", "__name", "stateStart", "parent", "node", "themeVariables", "lineColor", "shapeSvg", "circle", "roughNode", "at", "solidStateFill", "updateNodeBounds", "point", "intersect_default", "init_stateStart", "__esmMin", "init_rough_esm", "init_intersect", "init_handDrawnShapeStyles", "init_util", "__name", "subroutine", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "halfPadding", "w", "h", "x", "y", "points", "rc", "at", "options", "userNodeOverrides", "roughNode", "l1", "l2", "rect", "cssStyles", "handleUndefinedAttr", "updateNodeBounds", "el", "insertPolygonShape", "point", "intersect_default", "init_subroutine", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "init_utils", "__name", "taggedRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "x", "y", "tagWidth", "tagHeight", "cssStyles", "rc", "at", "options", "userNodeOverrides", "rectPoints", "tagPoints", "rectPath", "createPathFromPoints", "rectNode", "tagPath", "tagNode", "updateNodeBounds", "point", "intersect_default", "init_taggedRect", "__esmMin", "init_util", "init_handDrawnShapeStyles", "init_rough_esm", "init_intersect", "__name", "taggedWaveEdgedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "waveAmplitude", "tagWidth", "tagHeight", "finalH", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "generateFullSineWavePoints", "y", "tagPoints", "waveEdgeRectPath", "createPathFromPoints", "waveEdgeRectNode", "taggedWaveEdgeRectPath", "taggedWaveEdgeRectNode", "waveEdgeRect", "updateNodeBounds", "point", "intersect_default", "init_taggedWaveEdgedRectangle", "__esmMin", "init_util", "init_intersect", "init_rough_esm", "init_handDrawnShapeStyles", "__name", "text", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "totalWidth", "totalHeight", "x", "y", "rect", "updateNodeBounds", "point", "intersect_default", "init_text", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "__name", "tiltedCylinder", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "halfPadding", "labelHelper", "getNodeClasses", "labelPadding", "ry", "rx", "w", "cssStyles", "cylinder", "rc", "at", "outerPathData", "createOuterCylinderPathD", "innerPathData", "createInnerCylinderPathD", "outerNode", "userNodeOverrides", "innerLine", "pathData", "createCylinderPathD", "handleUndefinedAttr", "updateNodeBounds", "point", "pos", "intersect_default", "y", "x", "init_tiltedCylinder", "__esmMin", "init_util", "init_handDrawnShapeStyles", "init_rough_esm", "init_intersect", "init_utils", "__name", "width", "height", "trapezoid", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "init_trapezoid", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "trapezoidalPentagon", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "minWidth", "minHeight", "w", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "intersect_default", "init_trapezoidalPentagon", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "triangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "useHtmlLabels", "evaluate", "getConfig", "w", "tw", "points", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "polygon", "updateNodeBounds", "point", "log", "intersect_default", "init_triangle", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_common", "init_diagramAPI", "__name", "waveEdgedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "waveAmplitude", "finalH", "cssStyles", "widthDif", "extraW", "rc", "at", "options", "userNodeOverrides", "points", "generateFullSineWavePoints", "waveEdgeRectPath", "createPathFromPoints", "waveEdgeRectNode", "waveEdgeRect", "updateNodeBounds", "point", "intersect_default", "init_waveEdgedRectangle", "__esmMin", "init_util", "init_intersect", "init_rough_esm", "init_handDrawnShapeStyles", "__name", "waveRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "minWidth", "minHeight", "baseWidth", "baseHeight", "aspectRatio", "w", "h", "waveAmplitude", "finalH", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "generateFullSineWavePoints", "waveRectPath", "createPathFromPoints", "waveRectNode", "waveRect", "updateNodeBounds", "point", "intersect_default", "init_waveRectangle", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "windowPane", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "rectOffset", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "outerPathPoints", "path", "no", "updateNodeBounds", "point", "intersect_default", "init_windowPane", "__esmMin", "init_util", "init_handDrawnShapeStyles", "init_rough_esm", "init_intersect", "__name", "textHelper", "parent", "node", "config", "useHtmlLabels", "GAP", "TEXT_PADDING", "shapeSvg", "getNodeClasses", "annotationGroup", "labelGroup", "membersGroup", "methodsGroup", "annotationGroupHeight", "labelGroupHeight", "membersGroupHeight", "annotation", "addText", "labelGroupBBox", "yOffset", "member", "height", "methodsYOffset", "method", "bbox", "annotationGroupBBox", "parentGroup", "styles", "textEl", "getConfig", "evaluate", "textContent", "hasKatex", "text", "createText", "sanitizeText", "decodeEntities", "calculateTextWidth", "numberOfLines", "div", "dv", "select_default", "images", "noImgText", "img", "res", "setupImage", "bodyFontSize", "width", "__name", "textChild", "init_shapeUtil", "__esmMin", "init_src", "init_config", "init_util", "init_utils", "init_diagramAPI", "init_createText", "init_common", "classBox", "parent", "node", "config", "getConfig", "PADDING", "GAP", "useHtmlLabels", "evaluate", "classNode", "shapeSvg", "bbox", "textHelper", "labelStyles", "nodeStyles", "styles2String", "styles", "renderExtraBox", "rc", "at", "options", "userNodeOverrides", "w", "h", "y", "roughRect", "rect", "rectBBox", "_", "i", "nodes", "text", "select_default", "transform", "translateY", "translate", "newTranslateY", "newTranslateX", "annotationGroupHeight", "labelGroupHeight", "membersGroupHeight", "roughLine", "colorRegex", "match", "colorStyle", "updateNodeBounds", "point", "intersect_default", "init_classBox", "__esmMin", "init_util", "init_diagramAPI", "init_src", "init_rough_esm", "init_handDrawnShapeStyles", "init_intersect", "init_shapeUtil", "init_common", "__name", "kanbanItem", "parent", "kanbanNode", "config", "labelStyles", "nodeStyles", "styles2String", "labelPaddingX", "orgWidth", "shapeSvg", "bbox", "labelElTitle", "labelHelper", "getNodeClasses", "padding", "ticketUrl", "link", "options", "labelEl", "bbox2", "insertLabel", "labelElAssigned", "bboxAssigned", "labelPaddingY", "totalWidth", "heightAdj", "totalHeight", "x", "y", "rect", "rx", "ry", "cssStyles", "rc", "at", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "priority", "line", "lineX", "y1", "y2", "colorFromPriority", "updateNodeBounds", "point", "intersect_default", "init_kanbanItem", "__esmMin", "init_util", "init_intersect", "init_roundedRectPath", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "isValidShape", "shape", "shapes", "shapesDefs", "generateShapeMap", "init_shapes", "__esmMin", "init_anchor", "init_bowTieRect", "init_card", "init_choice", "init_circle", "init_crossedCircle", "init_curlyBraceLeft", "init_curlyBraceRight", "init_curlyBraces", "init_curvedTrapezoid", "init_cylinder", "init_dividedRect", "init_doubleCircle", "init_filledCircle", "init_flippedTriangle", "init_forkJoin", "init_halfRoundedRectangle", "init_hexagon", "init_hourglass", "init_icon", "init_iconCircle", "init_iconRounded", "init_iconSquare", "init_imageSquare", "init_invertedTrapezoid", "init_labelRect", "init_leanLeft", "init_leanRight", "init_lightningBolt", "init_linedCylinder", "init_linedWaveEdgedRect", "init_multiRect", "init_multiWaveEdgedRectangle", "init_note", "init_question", "init_rectLeftInvArrow", "init_rectWithTitle", "init_roundedRect", "init_shadedProcess", "init_slopedRect", "init_squareRect", "init_stadium", "init_state", "init_stateEnd", "init_stateStart", "init_subroutine", "init_taggedRect", "init_taggedWaveEdgedRectangle", "init_text", "init_tiltedCylinder", "init_trapezoid", "init_trapezoidalPentagon", "init_triangle", "init_waveEdgedRectangle", "init_waveRectangle", "init_windowPane", "init_classBox", "init_kanbanItem", "squareRect", "roundedRect", "stadium", "subroutine", "cylinder", "circle", "question", "hexagon", "lean_right", "lean_left", "trapezoid", "inv_trapezoid", "doublecircle", "text", "card", "shadedProcess", "stateStart", "stateEnd", "forkJoin", "hourglass", "curlyBraceLeft", "curlyBraceRight", "curlyBraces", "lightningBolt", "waveEdgedRectangle", "halfRoundedRectangle", "tiltedCylinder", "linedCylinder", "curvedTrapezoid", "dividedRectangle", "triangle", "windowPane", "filledCircle", "trapezoidalPentagon", "flippedTriangle", "slopedRect", "multiWaveEdgedRectangle", "multiRect", "bowTieRect", "crossedCircle", "taggedWaveEdgedRectangle", "taggedRect", "waveRectangle", "rect_left_inv_arrow", "linedWaveEdgedRect", "__name", "entries", "state", "choice", "note", "rectWithTitle", "labelRect", "iconSquare", "iconCircle", "icon", "iconRounded", "imageSquare", "anchor", "kanbanItem", "classBox", "alias", "isNothing", "subject", "isObject", "toArray", "sequence", "extend", "target", "source", "index", "length", "key", "sourceKeys", "repeat", "string", "count", "result", "cycle", "isNegativeZero", "number", "formatError", "exception", "compact", "where", "message", "YAMLException$1", "reason", "mark", "getLine", "buffer", "lineStart", "lineEnd", "position", "maxLineLength", "head", "tail", "maxHalfLength", "padStart", "max", "common", "makeSnippet", "options", "re", "lineStarts", "lineEnds", "match", "foundLineNo", "i", "line", "lineNoLength", "compileStyleAliases", "map", "style", "alias", "Type$1", "tag", "name", "TYPE_CONSTRUCTOR_OPTIONS", "data", "YAML_NODE_KINDS", "compileList", "schema", "currentType", "newIndex", "previousType", "previousIndex", "compileMap", "collectType", "type", "__name", "Schema$1", "definition", "resolveYamlNull", "constructYamlNull", "isNull", "object", "resolveYamlBoolean", "constructYamlBoolean", "isBoolean", "isHexCode", "c", "isOctCode", "isDecCode", "resolveYamlInteger", "hasDigits", "ch", "constructYamlInteger", "value", "sign", "isInteger", "resolveYamlFloat", "YAML_FLOAT_PATTERN", "constructYamlFloat", "representYamlFloat", "res", "SCIENTIFIC_WITHOUT_DOT", "isFloat", "resolveYamlTimestamp", "YAML_DATE_REGEXP", "YAML_TIMESTAMP_REGEXP", "constructYamlTimestamp", "year", "month", "day", "hour", "minute", "second", "fraction", "delta", "tz_hour", "tz_minute", "date", "representYamlTimestamp", "resolveYamlMerge", "resolveYamlBinary", "code", "idx", "bitlen", "BASE64_MAP", "constructYamlBinary", "tailbits", "input", "bits", "representYamlBinary", "isBinary", "obj", "resolveYamlOmap", "objectKeys", "pair", "pairKey", "pairHasKey", "_toString$2", "_hasOwnProperty$3", "constructYamlOmap", "resolveYamlPairs", "keys", "_toString$1", "constructYamlPairs", "resolveYamlSet", "_hasOwnProperty$2", "constructYamlSet", "_class", "is_EOL", "is_WHITE_SPACE", "is_WS_OR_EOL", "is_FLOW_INDICATOR", "fromHexCode", "lc", "escapedHexLen", "fromDecimalCode", "simpleEscapeSequence", "charFromCodepoint", "State$1", "_default", "generateError", "state", "snippet", "throwError", "throwWarning", "captureSegment", "start", "end", "checkJson", "_position", "_length", "_character", "_result", "PATTERN_NON_PRINTABLE", "mergeMappings", "destination", "overridableKeys", "quantity", "_hasOwnProperty$1", "storeMappingPair", "keyTag", "keyNode", "valueNode", "startLine", "startLineStart", "startPos", "readLineBreak", "skipSeparationSpace", "allowComments", "checkIndent", "lineBreaks", "testDocumentSeparator", "writeFoldedLines", "readPlainScalar", "nodeIndent", "withinFlowCollection", "preceding", "following", "captureStart", "captureEnd", "hasPendingContent", "_line", "_lineStart", "_lineIndent", "_kind", "readSingleQuotedScalar", "readDoubleQuotedScalar", "hexLength", "hexResult", "tmp", "simpleEscapeCheck", "simpleEscapeMap", "readFlowCollection", "readNext", "_pos", "_tag", "_anchor", "terminator", "isPair", "isExplicitPair", "isMapping", "composeNode", "CONTEXT_FLOW_IN", "readBlockScalar", "folding", "chomping", "CHOMPING_CLIP", "didReadContent", "detectedIndent", "textIndent", "emptyLines", "atMoreIndented", "CHOMPING_KEEP", "CHOMPING_STRIP", "readBlockSequence", "detected", "CONTEXT_BLOCK_IN", "readBlockMapping", "flowIndent", "allowCompact", "_keyLine", "_keyLineStart", "_keyPos", "atExplicitKey", "CONTEXT_FLOW_OUT", "CONTEXT_BLOCK_OUT", "readTagProperty", "isVerbatim", "isNamed", "tagHandle", "tagName", "PATTERN_TAG_HANDLE", "PATTERN_FLOW_INDICATORS", "PATTERN_TAG_URI", "readAnchorProperty", "readAlias", "parentIndent", "nodeContext", "allowToSeek", "allowBlockStyles", "allowBlockScalars", "allowBlockCollections", "indentStatus", "atNewLine", "hasContent", "typeIndex", "typeQuantity", "typeList", "blockIndent", "readDocument", "documentStart", "directiveName", "directiveArgs", "hasDirectives", "directiveHandlers", "PATTERN_NON_ASCII_LINE_BREAKS", "loadDocuments", "nullpos", "loadAll$1", "iterator", "documents", "load$1", "compileStyleMap", "_hasOwnProperty", "encodeHex", "character", "handle", "State", "QUOTING_TYPE_DOUBLE", "QUOTING_TYPE_SINGLE", "indentString", "spaces", "ind", "next", "generateNextLine", "level", "testImplicitResolving", "str", "isWhitespace", "CHAR_SPACE", "CHAR_TAB", "isPrintable", "CHAR_BOM", "isNsCharOrWhitespace", "CHAR_CARRIAGE_RETURN", "CHAR_LINE_FEED", "isPlainSafe", "prev", "inblock", "cIsNsCharOrWhitespace", "cIsNsChar", "CHAR_COMMA", "CHAR_LEFT_SQUARE_BRACKET", "CHAR_RIGHT_SQUARE_BRACKET", "CHAR_LEFT_CURLY_BRACKET", "CHAR_RIGHT_CURLY_BRACKET", "CHAR_SHARP", "CHAR_COLON", "isPlainSafeFirst", "CHAR_MINUS", "CHAR_QUESTION", "CHAR_AMPERSAND", "CHAR_ASTERISK", "CHAR_EXCLAMATION", "CHAR_VERTICAL_LINE", "CHAR_EQUALS", "CHAR_GREATER_THAN", "CHAR_SINGLE_QUOTE", "CHAR_DOUBLE_QUOTE", "CHAR_PERCENT", "CHAR_COMMERCIAL_AT", "CHAR_GRAVE_ACCENT", "isPlainSafeLast", "codePointAt", "pos", "first", "needIndentIndicator", "leadingSpaceRe", "chooseScalarStyle", "singleLineOnly", "indentPerLevel", "lineWidth", "testAmbiguousType", "quotingType", "forceQuotes", "char", "prevChar", "hasLineBreak", "hasFoldableLine", "shouldTrackWidth", "previousLineBreak", "plain", "STYLE_DOUBLE", "STYLE_PLAIN", "STYLE_SINGLE", "STYLE_FOLDED", "STYLE_LITERAL", "writeScalar", "iskey", "DEPRECATED_BOOLEANS_SYNTAX", "DEPRECATED_BASE60_SYNTAX", "indent", "testAmbiguity", "blockHeader", "dropEndingNewline", "foldString", "escapeString", "indentIndicator", "clip", "keep", "chomp", "width", "lineRe", "nextLF", "foldLine", "prevMoreIndented", "moreIndented", "prefix", "breakRe", "curr", "escapeSeq", "ESCAPE_SEQUENCES", "writeFlowSequence", "writeNode", "writeBlockSequence", "writeFlowMapping", "objectKeyList", "objectKey", "objectValue", "pairBuffer", "writeBlockMapping", "explicitPair", "detectType", "explicit", "_toString", "block", "isblockseq", "tagStr", "objectOrArray", "duplicateIndex", "duplicate", "getDuplicateReferences", "objects", "duplicatesIndexes", "inspectNode", "dump$1", "renamed", "from", "to", "isNothing_1", "isObject_1", "toArray_1", "repeat_1", "isNegativeZero_1", "extend_1", "seq", "failsafe", "_null", "bool", "int", "float", "json", "core", "timestamp", "merge", "binary", "omap", "pairs", "set", "loadAll_1", "load_1", "loader", "dump_1", "dumper", "JSON_SCHEMA", "load", "loadAll", "dump", "safeLoad", "safeLoadAll", "safeDump", "init_js_yaml", "__esmMin", "implicit", "type$1", "args", "major", "minor", "getCompiledStyles", "classDefs", "compiledStyles", "customClass", "cssClass", "classes", "s", "MERMAID_DOM_ID_PREFIX", "vertexCounter", "config", "vertices", "edges", "subGraphs", "subGraphLookup", "tooltips", "subCount", "firstGraphFlag", "direction", "version", "funs", "sanitizeText", "lookUpDomId", "addVertex", "addSingleLink", "addLink", "updateLinkInterpolate", "updateLink", "addClass", "setDirection", "setClass", "setTooltip", "setClickFun", "setLink", "getTooltip", "setClickEvent", "bindFunctions", "getDirection", "getVertices", "getEdges", "getClasses", "setupToolTips", "clear", "setGen", "defaultStyle", "addSubGraph", "getPosForId", "secCount", "posCrossRef", "indexNodes2", "getDepthFirstPos", "indexNodes", "getSubGraphs", "firstGraph", "destructStartLink", "countChar", "destructEndLink", "destructLink", "exists", "makeUniq", "lex", "getTypeFromVertex", "findNode", "destructEdgeType", "addNodeFromVertex", "getData", "flowDb_default", "init_flowDb", "__esmMin", "init_src", "init_utils", "init_diagramAPI", "init_common", "init_shapes", "init_logger", "init_js_yaml", "init_commonDb", "getConfig", "__name", "txt", "common_default", "id", "vertex", "textObj", "type", "style", "dir", "props", "shapeData", "yamlData", "doc", "load", "JSON_SCHEMA", "isValidShape", "_start", "_end", "edge", "log", "linkTextObj", "start", "end", "positions", "interpolate", "pos", "ids", "classNode", "newStyle", "className", "subGraph", "tooltip", "functionName", "functionArgs", "domId", "argList", "i", "item", "elem", "utils_default", "linkStr", "target", "element", "fun", "tooltipElem", "select_default", "el", "rect", "ver", "_id", "list", "_title", "title", "uniq", "a", "prims", "objs", "nodeList", "nodes", "count", "posCount", "childPos", "res", "_str", "str", "stroke", "char", "length", "line", "dots", "_startStr", "info", "startInfo", "allSgs", "sg", "allSubgraphs", "node", "arrowTypeStart", "arrowTypeEnd", "parentDB", "subGraphDB", "look", "parentId", "isGroup", "baseNode", "e", "rawEdge", "index", "styles", "getEdgeId", "defaultConfig", "setAccTitle", "getAccTitle", "getAccDescription", "setAccDescription", "setDiagramTitle", "getDiagramTitle", "getDiagramElement", "init_insertElementsForSize", "__esmMin", "init_src", "__name", "id", "securityLevel", "sandboxElement", "select_default", "getSubGraphTitleMargins", "init_subGraphTitleMargins", "__esmMin", "__name", "flowchart", "subGraphTitleTopMargin", "subGraphTitleBottomMargin", "subGraphTitleTotalMargin", "rect", "noteGroup", "roundedWithTitle", "kanbanSection", "divider", "squareRect", "shapes", "clusterElems", "insertCluster", "clear", "init_clusters", "__esmMin", "init_diagramAPI", "init_common", "init_logger", "init_subGraphTitleMargins", "init_src", "init_rough_esm", "init_createText", "init_intersect_rect", "init_createLabel", "init_roundedRectPath", "init_handDrawnShapeStyles", "__name", "parent", "node", "log", "siteConfig", "getConfig", "themeVariables", "handDrawnSeed", "clusterBkg", "clusterBorder", "labelStyles", "nodeStyles", "borderStyles", "backgroundStyles", "styles2String", "shapeSvg", "useHtmlLabels", "evaluate", "labelEl", "text", "createText", "bbox", "div", "dv", "select_default", "width", "height", "x", "y", "rc", "at", "options", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "subGraphTitleTopMargin", "getSubGraphTitleMargins", "span", "rectBox", "point", "intersect_rect_default", "padding", "halfPadding", "altBackground", "compositeBackground", "compositeTitleBackground", "nodeBorder", "outerRectG", "label", "innerRect", "createLabel_default", "innerHeight", "innerY", "isAlt", "roughOuterNode", "roughInnerNode", "elem", "shape", "cluster", "calculateDeltaAndAngle", "point1", "point2", "pointTransformer", "x1", "y1", "x2", "y2", "deltaX", "deltaY", "markerOffsets", "getLineFunctionsWithOffset", "init_lineWithOffset", "__esmMin", "__name", "data", "edge", "d", "i", "offset", "DIRECTION", "angle", "differenceToEnd", "differenceInYEnd", "differenceToStart", "differenceInYStart", "startMarkerHeight", "endMarkerHeight", "extraRoom", "adjustment", "differenceInXEnd", "differenceInXStart", "addEdgeMarkers", "arrowTypesMap", "addEdgeMarker", "init_edgeMarker", "__esmMin", "init_logger", "__name", "svgPath", "edge", "url", "id", "diagramType", "position", "arrowType", "endMarkerType", "log", "suffix", "setTerminalWidth", "fo", "value", "getConfig", "extractCornerPoints", "points", "cornerPoints", "cornerPointPositions", "i", "prev", "curr", "next", "edgeLabels", "terminalLabels", "clear", "getLabelStyles", "insertEdgeLabel", "positionEdgeLabel", "outsideNode", "intersection", "cutPathAtIntersect", "findAdjacentPoint", "fixCorners", "insertEdge", "init_edges", "__esmMin", "init_diagramAPI", "init_common", "init_logger", "init_createText", "init_utils", "init_lineWithOffset", "init_subGraphTitleMargins", "init_src", "init_rough_esm", "init_createLabel", "init_edgeMarker", "__name", "styleArray", "acc", "style", "elem", "edge", "useHtmlLabels", "evaluate", "labelElement", "createText", "log", "edgeLabel", "label", "bbox", "div", "dv", "select_default", "startLabelElement", "createLabel_default", "startEdgeLabelLeft", "inner", "slBox", "startEdgeLabelRight", "endLabelElement", "endEdgeLabelLeft", "endEdgeLabelRight", "paths", "path", "siteConfig", "subGraphTitleTotalMargin", "getSubGraphTitleMargins", "el", "x", "y", "pos", "utils_default", "node", "point", "dx", "dy", "w", "h", "outsidePoint", "insidePoint", "r", "Q", "R", "q", "res", "_x", "_y", "_points", "boundaryNode", "lastPointOutside", "isInside", "inter", "pointPresent", "p", "e", "pointA", "pointB", "distance", "xDiff", "yDiff", "length", "ratio", "lineData", "newLineData", "prevPoint", "nextPoint", "cornerPoint", "newPrevPoint", "newNextPoint", "a", "newCornerPoint", "clusterDb", "diagramType", "startNode", "endNode", "id", "handDrawnSeed", "pointsHasChanged", "tail", "head", "curve", "basis_default", "getLineFunctionsWithOffset", "lineFunction", "line_default", "strokeClasses", "svgPath", "linePath", "edgeStyles", "rc", "at", "svgPathNode", "d", "url", "addEdgeMarkers", "insertMarkers", "extension", "composition", "aggregation", "dependency", "lollipop", "point", "circle", "cross", "barb", "markers", "markers_default", "init_markers", "__esmMin", "init_logger", "__name", "elem", "markerArray", "type", "id", "markerName", "log", "insertNode", "elem", "node", "renderOptions", "newEl", "el", "shapeHandler", "shapes", "target", "nodeElems", "setNodeElem", "clear", "positionNode", "init_nodes", "__esmMin", "init_logger", "init_shapes", "__name", "log", "padding", "diff", "internalHelpers", "init_internals", "__esmMin", "init_config", "init_common", "init_logger", "init_clusters", "init_edges", "init_markers", "init_nodes", "init_util", "init_utils", "common_default", "getConfig", "insertCluster", "insertEdge", "insertEdgeLabel", "markers_default", "insertNode", "interpolateToCurve", "labelHelper", "log", "positionEdgeLabel", "isSymbol", "value", "isObjectLike_default", "baseGetTag_default", "symbolTag", "isSymbol_default", "init_isSymbol", "__esmMin", "init_baseGetTag", "init_isObjectLike", "__name", "arrayMap", "array", "iteratee", "index", "length", "result", "arrayMap_default", "init_arrayMap", "__esmMin", "__name", "baseToString", "value", "isArray_default", "arrayMap_default", "isSymbol_default", "symbolToString", "result", "INFINITY", "symbolProto", "baseToString_default", "init_baseToString", "__esmMin", "init_Symbol", "init_arrayMap", "init_isArray", "init_isSymbol", "Symbol_default", "__name", "trimmedEndIndex", "string", "index", "reWhitespace", "trimmedEndIndex_default", "init_trimmedEndIndex", "__esmMin", "__name", "baseTrim", "string", "trimmedEndIndex_default", "reTrimStart", "baseTrim_default", "init_baseTrim", "__esmMin", "init_trimmedEndIndex", "__name", "toNumber", "value", "isSymbol_default", "NAN", "isObject_default", "other", "baseTrim_default", "isBinary", "reIsBinary", "reIsOctal", "freeParseInt", "reIsBadHex", "toNumber_default", "init_toNumber", "__esmMin", "init_baseTrim", "init_isObject", "init_isSymbol", "__name", "toFinite", "value", "toNumber_default", "INFINITY", "sign", "MAX_INTEGER", "toFinite_default", "init_toFinite", "__esmMin", "init_toNumber", "__name", "toInteger", "value", "result", "toFinite_default", "remainder", "toInteger_default", "init_toInteger", "__esmMin", "init_toFinite", "__name", "WeakMap", "WeakMap_default", "init_WeakMap", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "noop", "noop_default", "init_noop", "__esmMin", "__name", "arrayEach", "array", "iteratee", "index", "length", "arrayEach_default", "init_arrayEach", "__esmMin", "__name", "baseFindIndex", "array", "predicate", "fromIndex", "fromRight", "length", "index", "baseFindIndex_default", "init_baseFindIndex", "__esmMin", "__name", "baseIsNaN", "value", "baseIsNaN_default", "init_baseIsNaN", "__esmMin", "__name", "strictIndexOf", "array", "value", "fromIndex", "index", "length", "strictIndexOf_default", "init_strictIndexOf", "__esmMin", "__name", "baseIndexOf", "array", "value", "fromIndex", "strictIndexOf_default", "baseFindIndex_default", "baseIsNaN_default", "baseIndexOf_default", "init_baseIndexOf", "__esmMin", "init_baseFindIndex", "init_baseIsNaN", "init_strictIndexOf", "__name", "arrayIncludes", "array", "value", "length", "baseIndexOf_default", "arrayIncludes_default", "init_arrayIncludes", "__esmMin", "init_baseIndexOf", "__name", "nativeKeys", "nativeKeys_default", "init_nativeKeys", "__esmMin", "init_overArg", "overArg_default", "baseKeys", "object", "isPrototype_default", "nativeKeys_default", "result", "key", "hasOwnProperty", "objectProto", "baseKeys_default", "init_baseKeys", "__esmMin", "init_isPrototype", "init_nativeKeys", "__name", "keys", "object", "isArrayLike_default", "arrayLikeKeys_default", "baseKeys_default", "keys_default", "init_keys", "__esmMin", "init_arrayLikeKeys", "init_baseKeys", "init_isArrayLike", "__name", "objectProto", "hasOwnProperty", "assign", "assign_default", "init_assign", "__esmMin", "init_assignValue", "init_copyObject", "init_createAssigner", "init_isArrayLike", "init_isPrototype", "init_keys", "createAssigner_default", "object", "source", "isPrototype_default", "isArrayLike_default", "copyObject_default", "keys_default", "key", "assignValue_default", "isKey", "value", "object", "isArray_default", "type", "isSymbol_default", "reIsPlainProp", "reIsDeepProp", "isKey_default", "init_isKey", "__esmMin", "init_isArray", "init_isSymbol", "__name", "memoizeCapped", "func", "result", "memoize_default", "key", "cache", "MAX_MEMOIZE_SIZE", "memoizeCapped_default", "init_memoizeCapped", "__esmMin", "init_memoize", "__name", "rePropName", "reEscapeChar", "stringToPath", "stringToPath_default", "init_stringToPath", "__esmMin", "init_memoizeCapped", "memoizeCapped_default", "string", "result", "match", "number", "quote", "subString", "toString", "value", "baseToString_default", "toString_default", "init_toString", "__esmMin", "init_baseToString", "__name", "castPath", "value", "object", "isArray_default", "isKey_default", "stringToPath_default", "toString_default", "castPath_default", "init_castPath", "__esmMin", "init_isArray", "init_isKey", "init_stringToPath", "init_toString", "__name", "toKey", "value", "isSymbol_default", "result", "INFINITY", "toKey_default", "init_toKey", "__esmMin", "init_isSymbol", "__name", "baseGet", "object", "path", "castPath_default", "index", "length", "toKey_default", "baseGet_default", "init_baseGet", "__esmMin", "init_castPath", "init_toKey", "__name", "get", "object", "path", "defaultValue", "result", "baseGet_default", "get_default", "init_get", "__esmMin", "init_baseGet", "__name", "arrayPush", "array", "values", "index", "length", "offset", "arrayPush_default", "init_arrayPush", "__esmMin", "__name", "isFlattenable", "value", "isArray_default", "isArguments_default", "spreadableSymbol", "isFlattenable_default", "init_isFlattenable", "__esmMin", "init_Symbol", "init_isArguments", "init_isArray", "Symbol_default", "__name", "baseFlatten", "array", "depth", "predicate", "isStrict", "result", "index", "length", "isFlattenable_default", "value", "arrayPush_default", "baseFlatten_default", "init_baseFlatten", "__esmMin", "init_arrayPush", "init_isFlattenable", "__name", "flatten", "array", "length", "baseFlatten_default", "flatten_default", "init_flatten", "__esmMin", "init_baseFlatten", "__name", "flatRest", "func", "setToString_default", "overRest_default", "flatten_default", "flatRest_default", "init_flatRest", "__esmMin", "init_flatten", "init_overRest", "init_setToString", "__name", "baseSlice", "array", "start", "end", "index", "length", "result", "baseSlice_default", "init_baseSlice", "__esmMin", "__name", "hasUnicode", "string", "reHasUnicode", "rsAstralRange", "rsComboMarksRange", "reComboHalfMarksRange", "rsComboSymbolsRange", "rsComboRange", "rsVarRange", "rsZWJ", "hasUnicode_default", "init_hasUnicode", "__esmMin", "__name", "arrayReduce", "array", "iteratee", "accumulator", "initAccum", "index", "length", "arrayReduce_default", "init_arrayReduce", "__esmMin", "__name", "baseAssign", "object", "source", "copyObject_default", "keys_default", "baseAssign_default", "init_baseAssign", "__esmMin", "init_copyObject", "init_keys", "__name", "baseAssignIn", "object", "source", "copyObject_default", "keysIn_default", "baseAssignIn_default", "init_baseAssignIn", "__esmMin", "init_copyObject", "init_keysIn", "__name", "arrayFilter", "array", "predicate", "index", "length", "resIndex", "result", "value", "arrayFilter_default", "init_arrayFilter", "__esmMin", "__name", "stubArray", "stubArray_default", "init_stubArray", "__esmMin", "__name", "objectProto", "propertyIsEnumerable", "nativeGetSymbols", "getSymbols", "getSymbols_default", "init_getSymbols", "__esmMin", "init_arrayFilter", "init_stubArray", "object", "arrayFilter_default", "symbol", "stubArray_default", "copySymbols", "source", "object", "copyObject_default", "getSymbols_default", "copySymbols_default", "init_copySymbols", "__esmMin", "init_copyObject", "init_getSymbols", "__name", "nativeGetSymbols", "getSymbolsIn", "getSymbolsIn_default", "init_getSymbolsIn", "__esmMin", "init_arrayPush", "init_getPrototype", "init_getSymbols", "init_stubArray", "object", "result", "arrayPush_default", "getSymbols_default", "getPrototype_default", "stubArray_default", "copySymbolsIn", "source", "object", "copyObject_default", "getSymbolsIn_default", "copySymbolsIn_default", "init_copySymbolsIn", "__esmMin", "init_copyObject", "init_getSymbolsIn", "__name", "baseGetAllKeys", "object", "keysFunc", "symbolsFunc", "result", "isArray_default", "arrayPush_default", "baseGetAllKeys_default", "init_baseGetAllKeys", "__esmMin", "init_arrayPush", "init_isArray", "__name", "getAllKeys", "object", "baseGetAllKeys_default", "keys_default", "getSymbols_default", "getAllKeys_default", "init_getAllKeys", "__esmMin", "init_baseGetAllKeys", "init_getSymbols", "init_keys", "__name", "getAllKeysIn", "object", "baseGetAllKeys_default", "keysIn_default", "getSymbolsIn_default", "getAllKeysIn_default", "init_getAllKeysIn", "__esmMin", "init_baseGetAllKeys", "init_getSymbolsIn", "init_keysIn", "__name", "DataView", "DataView_default", "init_DataView", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "Promise", "Promise_default", "init_Promise", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "Set", "Set_default", "init_Set", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "mapTag", "objectTag", "promiseTag", "setTag", "weakMapTag", "dataViewTag", "dataViewCtorString", "mapCtorString", "promiseCtorString", "setCtorString", "weakMapCtorString", "getTag", "getTag_default", "init_getTag", "__esmMin", "init_DataView", "init_Map", "init_Promise", "init_Set", "init_WeakMap", "init_baseGetTag", "init_toSource", "toSource_default", "DataView_default", "Map_default", "Promise_default", "Set_default", "WeakMap_default", "baseGetTag_default", "__name", "value", "result", "Ctor", "ctorString", "initCloneArray", "array", "length", "result", "hasOwnProperty", "objectProto", "initCloneArray_default", "init_initCloneArray", "__esmMin", "__name", "cloneDataView", "dataView", "isDeep", "buffer", "cloneArrayBuffer_default", "cloneDataView_default", "init_cloneDataView", "__esmMin", "init_cloneArrayBuffer", "__name", "cloneRegExp", "regexp", "result", "reFlags", "cloneRegExp_default", "init_cloneRegExp", "__esmMin", "__name", "cloneSymbol", "symbol", "symbolValueOf", "symbolProto", "cloneSymbol_default", "init_cloneSymbol", "__esmMin", "init_Symbol", "Symbol_default", "__name", "initCloneByTag", "object", "tag", "isDeep", "Ctor", "arrayBufferTag", "cloneArrayBuffer_default", "boolTag", "dateTag", "dataViewTag", "cloneDataView_default", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "cloneTypedArray_default", "mapTag", "numberTag", "stringTag", "regexpTag", "cloneRegExp_default", "setTag", "symbolTag", "cloneSymbol_default", "initCloneByTag_default", "init_initCloneByTag", "__esmMin", "init_cloneArrayBuffer", "init_cloneDataView", "init_cloneRegExp", "init_cloneSymbol", "init_cloneTypedArray", "__name", "baseIsMap", "value", "isObjectLike_default", "getTag_default", "mapTag", "baseIsMap_default", "init_baseIsMap", "__esmMin", "init_getTag", "init_isObjectLike", "__name", "nodeIsMap", "isMap", "isMap_default", "init_isMap", "__esmMin", "init_baseIsMap", "init_baseUnary", "init_nodeUtil", "nodeUtil_default", "baseUnary_default", "baseIsMap_default", "baseIsSet", "value", "isObjectLike_default", "getTag_default", "setTag", "baseIsSet_default", "init_baseIsSet", "__esmMin", "init_getTag", "init_isObjectLike", "__name", "nodeIsSet", "isSet", "isSet_default", "init_isSet", "__esmMin", "init_baseIsSet", "init_baseUnary", "init_nodeUtil", "nodeUtil_default", "baseUnary_default", "baseIsSet_default", "baseClone", "value", "bitmask", "customizer", "key", "object", "stack", "result", "isDeep", "CLONE_DEEP_FLAG", "isFlat", "CLONE_FLAT_FLAG", "isFull", "CLONE_SYMBOLS_FLAG", "isObject_default", "isArr", "isArray_default", "initCloneArray_default", "copyArray_default", "tag", "getTag_default", "isFunc", "funcTag", "genTag", "isBuffer_default", "cloneBuffer_default", "objectTag", "argsTag", "initCloneObject_default", "copySymbolsIn_default", "baseAssignIn_default", "copySymbols_default", "baseAssign_default", "cloneableTags", "initCloneByTag_default", "Stack_default", "stacked", "isSet_default", "subValue", "isMap_default", "keysFunc", "getAllKeysIn_default", "getAllKeys_default", "keysIn_default", "keys_default", "props", "arrayEach_default", "assignValue_default", "arrayTag", "boolTag", "dateTag", "errorTag", "mapTag", "numberTag", "regexpTag", "setTag", "stringTag", "symbolTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "baseClone_default", "init_baseClone", "__esmMin", "init_Stack", "init_arrayEach", "init_assignValue", "init_baseAssign", "init_baseAssignIn", "init_cloneBuffer", "init_copyArray", "init_copySymbols", "init_copySymbolsIn", "init_getAllKeys", "init_getAllKeysIn", "init_getTag", "init_initCloneArray", "init_initCloneByTag", "init_initCloneObject", "init_isArray", "init_isBuffer", "init_isMap", "init_isObject", "init_isSet", "init_keys", "init_keysIn", "__name", "clone", "value", "baseClone_default", "CLONE_SYMBOLS_FLAG", "clone_default", "init_clone", "__esmMin", "init_baseClone", "__name", "cloneDeep", "value", "baseClone_default", "CLONE_DEEP_FLAG", "CLONE_SYMBOLS_FLAG", "cloneDeep_default", "init_cloneDeep", "__esmMin", "init_baseClone", "__name", "compact", "array", "index", "length", "resIndex", "result", "value", "compact_default", "init_compact", "__esmMin", "__name", "setCacheAdd", "value", "HASH_UNDEFINED", "setCacheAdd_default", "init_setCacheAdd", "__esmMin", "__name", "setCacheHas", "value", "setCacheHas_default", "init_setCacheHas", "__esmMin", "__name", "SetCache", "values", "index", "length", "MapCache_default", "SetCache_default", "init_SetCache", "__esmMin", "init_MapCache", "init_setCacheAdd", "init_setCacheHas", "__name", "setCacheAdd_default", "setCacheHas_default", "arraySome", "array", "predicate", "index", "length", "arraySome_default", "init_arraySome", "__esmMin", "__name", "cacheHas", "cache", "key", "cacheHas_default", "init_cacheHas", "__esmMin", "__name", "equalArrays", "array", "other", "bitmask", "customizer", "equalFunc", "stack", "isPartial", "COMPARE_PARTIAL_FLAG", "arrLength", "othLength", "arrStacked", "othStacked", "index", "result", "seen", "COMPARE_UNORDERED_FLAG", "SetCache_default", "arrValue", "othValue", "compared", "arraySome_default", "othIndex", "cacheHas_default", "equalArrays_default", "init_equalArrays", "__esmMin", "init_SetCache", "init_arraySome", "init_cacheHas", "__name", "mapToArray", "map", "index", "result", "value", "key", "mapToArray_default", "init_mapToArray", "__esmMin", "__name", "setToArray", "set", "index", "result", "value", "setToArray_default", "init_setToArray", "__esmMin", "__name", "equalByTag", "object", "other", "tag", "bitmask", "customizer", "equalFunc", "stack", "dataViewTag", "arrayBufferTag", "Uint8Array_default", "boolTag", "dateTag", "numberTag", "eq_default", "errorTag", "regexpTag", "stringTag", "mapTag", "convert", "mapToArray_default", "setTag", "isPartial", "COMPARE_PARTIAL_FLAG", "setToArray_default", "stacked", "COMPARE_UNORDERED_FLAG", "result", "equalArrays_default", "symbolTag", "symbolValueOf", "symbolProto", "equalByTag_default", "init_equalByTag", "__esmMin", "init_Symbol", "init_Uint8Array", "init_eq", "init_equalArrays", "init_mapToArray", "init_setToArray", "Symbol_default", "__name", "equalObjects", "object", "other", "bitmask", "customizer", "equalFunc", "stack", "isPartial", "COMPARE_PARTIAL_FLAG", "objProps", "getAllKeys_default", "objLength", "othProps", "othLength", "index", "key", "hasOwnProperty", "objStacked", "othStacked", "result", "skipCtor", "objValue", "othValue", "compared", "objCtor", "othCtor", "objectProto", "equalObjects_default", "init_equalObjects", "__esmMin", "init_getAllKeys", "__name", "baseIsEqualDeep", "object", "other", "bitmask", "customizer", "equalFunc", "stack", "objIsArr", "isArray_default", "othIsArr", "objTag", "arrayTag", "getTag_default", "othTag", "argsTag", "objectTag", "objIsObj", "othIsObj", "isSameTag", "isBuffer_default", "Stack_default", "isTypedArray_default", "equalArrays_default", "equalByTag_default", "COMPARE_PARTIAL_FLAG", "objIsWrapped", "hasOwnProperty", "othIsWrapped", "objUnwrapped", "othUnwrapped", "equalObjects_default", "objectProto", "baseIsEqualDeep_default", "init_baseIsEqualDeep", "__esmMin", "init_Stack", "init_equalArrays", "init_equalByTag", "init_equalObjects", "init_getTag", "init_isArray", "init_isBuffer", "init_isTypedArray", "__name", "baseIsEqual", "value", "other", "bitmask", "customizer", "stack", "isObjectLike_default", "baseIsEqualDeep_default", "baseIsEqual_default", "init_baseIsEqual", "__esmMin", "init_baseIsEqualDeep", "init_isObjectLike", "__name", "baseIsMatch", "object", "source", "matchData", "customizer", "index", "length", "noCustomizer", "data", "key", "objValue", "srcValue", "stack", "Stack_default", "result", "baseIsEqual_default", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "baseIsMatch_default", "init_baseIsMatch", "__esmMin", "init_Stack", "init_baseIsEqual", "__name", "isStrictComparable", "value", "isObject_default", "isStrictComparable_default", "init_isStrictComparable", "__esmMin", "init_isObject", "__name", "getMatchData", "object", "result", "keys_default", "length", "key", "value", "isStrictComparable_default", "getMatchData_default", "init_getMatchData", "__esmMin", "init_isStrictComparable", "init_keys", "__name", "matchesStrictComparable", "key", "srcValue", "object", "matchesStrictComparable_default", "init_matchesStrictComparable", "__esmMin", "__name", "baseMatches", "source", "matchData", "getMatchData_default", "matchesStrictComparable_default", "object", "baseIsMatch_default", "baseMatches_default", "init_baseMatches", "__esmMin", "init_baseIsMatch", "init_getMatchData", "init_matchesStrictComparable", "__name", "baseHasIn", "object", "key", "baseHasIn_default", "init_baseHasIn", "__esmMin", "__name", "hasPath", "object", "path", "hasFunc", "castPath_default", "index", "length", "result", "key", "toKey_default", "isLength_default", "isIndex_default", "isArray_default", "isArguments_default", "hasPath_default", "init_hasPath", "__esmMin", "init_castPath", "init_isArguments", "init_isArray", "init_isIndex", "init_isLength", "init_toKey", "__name", "hasIn", "object", "path", "hasPath_default", "baseHasIn_default", "hasIn_default", "init_hasIn", "__esmMin", "init_baseHasIn", "init_hasPath", "__name", "baseMatchesProperty", "path", "srcValue", "isKey_default", "isStrictComparable_default", "matchesStrictComparable_default", "toKey_default", "object", "objValue", "get_default", "hasIn_default", "baseIsEqual_default", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "baseMatchesProperty_default", "init_baseMatchesProperty", "__esmMin", "init_baseIsEqual", "init_get", "init_hasIn", "init_isKey", "init_isStrictComparable", "init_matchesStrictComparable", "init_toKey", "__name", "baseProperty", "key", "object", "baseProperty_default", "init_baseProperty", "__esmMin", "__name", "basePropertyDeep", "path", "object", "baseGet_default", "basePropertyDeep_default", "init_basePropertyDeep", "__esmMin", "init_baseGet", "__name", "property", "path", "isKey_default", "baseProperty_default", "toKey_default", "basePropertyDeep_default", "property_default", "init_property", "__esmMin", "init_baseProperty", "init_basePropertyDeep", "init_isKey", "init_toKey", "__name", "baseIteratee", "value", "identity_default", "isArray_default", "baseMatchesProperty_default", "baseMatches_default", "property_default", "baseIteratee_default", "init_baseIteratee", "__esmMin", "init_baseMatches", "init_baseMatchesProperty", "init_identity", "init_isArray", "init_property", "__name", "arrayAggregator", "array", "setter", "iteratee", "accumulator", "index", "length", "value", "arrayAggregator_default", "init_arrayAggregator", "__esmMin", "__name", "baseForOwn", "object", "iteratee", "baseFor_default", "keys_default", "baseForOwn_default", "init_baseForOwn", "__esmMin", "init_baseFor", "init_keys", "__name", "createBaseEach", "eachFunc", "fromRight", "collection", "iteratee", "isArrayLike_default", "length", "index", "iterable", "createBaseEach_default", "init_createBaseEach", "__esmMin", "init_isArrayLike", "__name", "baseEach", "baseEach_default", "init_baseEach", "__esmMin", "init_baseForOwn", "init_createBaseEach", "createBaseEach_default", "baseForOwn_default", "baseAggregator", "collection", "setter", "iteratee", "accumulator", "baseEach_default", "value", "key", "baseAggregator_default", "init_baseAggregator", "__esmMin", "init_baseEach", "__name", "createAggregator", "setter", "initializer", "collection", "iteratee", "func", "isArray_default", "arrayAggregator_default", "baseAggregator_default", "accumulator", "baseIteratee_default", "createAggregator_default", "init_createAggregator", "__esmMin", "init_arrayAggregator", "init_baseAggregator", "init_baseIteratee", "init_isArray", "__name", "now", "now_default", "init_now", "__esmMin", "init_root", "__name", "root_default", "objectProto", "hasOwnProperty", "defaults", "defaults_default", "init_defaults", "__esmMin", "init_baseRest", "init_eq", "init_isIterateeCall", "init_keysIn", "baseRest_default", "object", "sources", "index", "length", "guard", "isIterateeCall_default", "source", "props", "keysIn_default", "propsIndex", "propsLength", "key", "value", "eq_default", "arrayIncludesWith", "array", "value", "comparator", "index", "length", "arrayIncludesWith_default", "init_arrayIncludesWith", "__esmMin", "__name", "baseDifference", "array", "values", "iteratee", "comparator", "index", "includes", "arrayIncludes_default", "isCommon", "length", "result", "valuesLength", "arrayMap_default", "baseUnary_default", "arrayIncludesWith_default", "LARGE_ARRAY_SIZE", "cacheHas_default", "SetCache_default", "outer", "value", "computed", "valuesIndex", "baseDifference_default", "init_baseDifference", "__esmMin", "init_SetCache", "init_arrayIncludes", "init_arrayIncludesWith", "init_arrayMap", "init_baseUnary", "init_cacheHas", "__name", "difference", "difference_default", "init_difference", "__esmMin", "init_baseDifference", "init_baseFlatten", "init_baseRest", "init_isArrayLikeObject", "baseRest_default", "array", "values", "isArrayLikeObject_default", "baseDifference_default", "baseFlatten_default", "last", "array", "length", "last_default", "init_last", "__esmMin", "__name", "drop", "array", "n", "guard", "length", "toInteger_default", "baseSlice_default", "drop_default", "init_drop", "__esmMin", "init_baseSlice", "init_toInteger", "__name", "dropRight", "array", "n", "guard", "length", "toInteger_default", "baseSlice_default", "dropRight_default", "init_dropRight", "__esmMin", "init_baseSlice", "init_toInteger", "__name", "castFunction", "value", "identity_default", "castFunction_default", "init_castFunction", "__esmMin", "init_identity", "__name", "forEach", "collection", "iteratee", "func", "isArray_default", "arrayEach_default", "baseEach_default", "castFunction_default", "forEach_default", "init_forEach", "__esmMin", "init_arrayEach", "init_baseEach", "init_castFunction", "init_isArray", "__name", "init_each", "__esmMin", "init_forEach", "arrayEvery", "array", "predicate", "index", "length", "arrayEvery_default", "init_arrayEvery", "__esmMin", "__name", "baseEvery", "collection", "predicate", "result", "baseEach_default", "value", "index", "baseEvery_default", "init_baseEvery", "__esmMin", "init_baseEach", "__name", "every", "collection", "predicate", "guard", "func", "isArray_default", "arrayEvery_default", "baseEvery_default", "isIterateeCall_default", "baseIteratee_default", "every_default", "init_every", "__esmMin", "init_arrayEvery", "init_baseEvery", "init_baseIteratee", "init_isArray", "init_isIterateeCall", "__name", "baseFilter", "collection", "predicate", "result", "baseEach_default", "value", "index", "baseFilter_default", "init_baseFilter", "__esmMin", "init_baseEach", "__name", "filter", "collection", "predicate", "func", "isArray_default", "arrayFilter_default", "baseFilter_default", "baseIteratee_default", "filter_default", "init_filter", "__esmMin", "init_arrayFilter", "init_baseFilter", "init_baseIteratee", "init_isArray", "__name", "createFind", "findIndexFunc", "collection", "predicate", "fromIndex", "iterable", "isArrayLike_default", "iteratee", "baseIteratee_default", "keys_default", "__name", "key", "index", "createFind_default", "init_createFind", "__esmMin", "init_baseIteratee", "init_isArrayLike", "init_keys", "findIndex", "array", "predicate", "fromIndex", "length", "index", "toInteger_default", "nativeMax", "baseFindIndex_default", "baseIteratee_default", "findIndex_default", "init_findIndex", "__esmMin", "init_baseFindIndex", "init_baseIteratee", "init_toInteger", "__name", "find", "find_default", "init_find", "__esmMin", "init_createFind", "init_findIndex", "createFind_default", "findIndex_default", "head", "array", "head_default", "init_head", "__esmMin", "__name", "init_first", "__esmMin", "init_head", "baseMap", "collection", "iteratee", "index", "result", "isArrayLike_default", "baseEach_default", "value", "key", "baseMap_default", "init_baseMap", "__esmMin", "init_baseEach", "init_isArrayLike", "__name", "map", "collection", "iteratee", "func", "isArray_default", "arrayMap_default", "baseMap_default", "baseIteratee_default", "map_default", "init_map", "__esmMin", "init_arrayMap", "init_baseIteratee", "init_baseMap", "init_isArray", "__name", "flatMap", "collection", "iteratee", "baseFlatten_default", "map_default", "flatMap_default", "init_flatMap", "__esmMin", "init_baseFlatten", "init_map", "__name", "forIn", "object", "iteratee", "baseFor_default", "castFunction_default", "keysIn_default", "forIn_default", "init_forIn", "__esmMin", "init_baseFor", "init_castFunction", "init_keysIn", "__name", "forOwn", "object", "iteratee", "baseForOwn_default", "castFunction_default", "forOwn_default", "init_forOwn", "__esmMin", "init_baseForOwn", "init_castFunction", "__name", "objectProto", "hasOwnProperty", "groupBy", "groupBy_default", "init_groupBy", "__esmMin", "init_baseAssignValue", "init_createAggregator", "createAggregator_default", "result", "value", "key", "baseAssignValue_default", "baseGt", "value", "other", "baseGt_default", "init_baseGt", "__esmMin", "__name", "baseHas", "object", "key", "hasOwnProperty", "objectProto", "baseHas_default", "init_baseHas", "__esmMin", "__name", "has", "object", "path", "hasPath_default", "baseHas_default", "has_default", "init_has", "__esmMin", "init_baseHas", "init_hasPath", "__name", "isString", "value", "isArray_default", "isObjectLike_default", "baseGetTag_default", "stringTag", "isString_default", "init_isString", "__esmMin", "init_baseGetTag", "init_isArray", "init_isObjectLike", "__name", "baseValues", "object", "props", "arrayMap_default", "key", "baseValues_default", "init_baseValues", "__esmMin", "init_arrayMap", "__name", "values", "object", "baseValues_default", "keys_default", "values_default", "init_values", "__esmMin", "init_baseValues", "init_keys", "__name", "includes", "collection", "value", "fromIndex", "guard", "isArrayLike_default", "values_default", "toInteger_default", "length", "nativeMax", "isString_default", "baseIndexOf_default", "includes_default", "init_includes", "__esmMin", "init_baseIndexOf", "init_isArrayLike", "init_isString", "init_toInteger", "init_values", "__name", "indexOf", "array", "value", "fromIndex", "length", "index", "toInteger_default", "nativeMax", "baseIndexOf_default", "indexOf_default", "init_indexOf", "__esmMin", "init_baseIndexOf", "init_toInteger", "__name", "isEmpty", "value", "isArrayLike_default", "isArray_default", "isBuffer_default", "isTypedArray_default", "isArguments_default", "tag", "getTag_default", "mapTag", "setTag", "isPrototype_default", "baseKeys_default", "key", "hasOwnProperty", "objectProto", "isEmpty_default", "init_isEmpty", "__esmMin", "init_baseKeys", "init_getTag", "init_isArguments", "init_isArray", "init_isArrayLike", "init_isBuffer", "init_isPrototype", "init_isTypedArray", "__name", "baseIsRegExp", "value", "isObjectLike_default", "baseGetTag_default", "regexpTag", "baseIsRegExp_default", "init_baseIsRegExp", "__esmMin", "init_baseGetTag", "init_isObjectLike", "__name", "nodeIsRegExp", "isRegExp", "isRegExp_default", "init_isRegExp", "__esmMin", "init_baseIsRegExp", "init_baseUnary", "init_nodeUtil", "nodeUtil_default", "baseUnary_default", "baseIsRegExp_default", "isUndefined", "value", "isUndefined_default", "init_isUndefined", "__esmMin", "__name", "baseLt", "value", "other", "baseLt_default", "init_baseLt", "__esmMin", "__name", "mapValues", "object", "iteratee", "result", "baseIteratee_default", "baseForOwn_default", "value", "key", "baseAssignValue_default", "mapValues_default", "init_mapValues", "__esmMin", "init_baseAssignValue", "init_baseForOwn", "init_baseIteratee", "__name", "baseExtremum", "array", "iteratee", "comparator", "index", "length", "value", "current", "computed", "isSymbol_default", "result", "baseExtremum_default", "init_baseExtremum", "__esmMin", "init_isSymbol", "__name", "max", "array", "baseExtremum_default", "identity_default", "baseGt_default", "max_default", "init_max", "__esmMin", "init_baseExtremum", "init_baseGt", "init_identity", "__name", "min", "array", "baseExtremum_default", "identity_default", "baseLt_default", "min_default", "init_min", "__esmMin", "init_baseExtremum", "init_baseLt", "init_identity", "__name", "minBy", "array", "iteratee", "baseExtremum_default", "baseIteratee_default", "baseLt_default", "minBy_default", "init_minBy", "__esmMin", "init_baseExtremum", "init_baseIteratee", "init_baseLt", "__name", "negate", "predicate", "FUNC_ERROR_TEXT", "args", "negate_default", "init_negate", "__esmMin", "__name", "baseSet", "object", "path", "value", "customizer", "isObject_default", "castPath_default", "index", "length", "lastIndex", "nested", "key", "toKey_default", "newValue", "objValue", "isIndex_default", "assignValue_default", "baseSet_default", "init_baseSet", "__esmMin", "init_assignValue", "init_castPath", "init_isIndex", "init_isObject", "init_toKey", "__name", "basePickBy", "object", "paths", "predicate", "index", "length", "result", "path", "value", "baseGet_default", "baseSet_default", "castPath_default", "basePickBy_default", "init_basePickBy", "__esmMin", "init_baseGet", "init_baseSet", "init_castPath", "__name", "pickBy", "object", "predicate", "props", "arrayMap_default", "getAllKeysIn_default", "prop", "baseIteratee_default", "basePickBy_default", "value", "path", "pickBy_default", "init_pickBy", "__esmMin", "init_arrayMap", "init_baseIteratee", "init_basePickBy", "init_getAllKeysIn", "__name", "baseSortBy", "array", "comparer", "length", "baseSortBy_default", "init_baseSortBy", "__esmMin", "__name", "compareAscending", "value", "other", "valIsDefined", "valIsNull", "valIsReflexive", "valIsSymbol", "isSymbol_default", "othIsDefined", "othIsNull", "othIsReflexive", "othIsSymbol", "compareAscending_default", "init_compareAscending", "__esmMin", "init_isSymbol", "__name", "compareMultiple", "object", "other", "orders", "index", "objCriteria", "othCriteria", "length", "ordersLength", "result", "compareAscending_default", "order", "compareMultiple_default", "init_compareMultiple", "__esmMin", "init_compareAscending", "__name", "baseOrderBy", "collection", "iteratees", "orders", "arrayMap_default", "iteratee", "isArray_default", "value", "baseGet_default", "identity_default", "index", "baseUnary_default", "baseIteratee_default", "result", "baseMap_default", "key", "criteria", "baseSortBy_default", "object", "other", "compareMultiple_default", "baseOrderBy_default", "init_baseOrderBy", "__esmMin", "init_arrayMap", "init_baseGet", "init_baseIteratee", "init_baseMap", "init_baseSortBy", "init_baseUnary", "init_compareMultiple", "init_identity", "init_isArray", "__name", "asciiSize", "asciiSize_default", "init_asciiSize", "__esmMin", "init_baseProperty", "baseProperty_default", "unicodeSize", "string", "result", "reUnicode", "rsAstralRange", "rsComboMarksRange", "reComboHalfMarksRange", "rsComboSymbolsRange", "rsComboRange", "rsVarRange", "rsAstral", "rsCombo", "rsFitz", "rsModifier", "rsNonAstral", "rsRegional", "rsSurrPair", "rsZWJ", "reOptMod", "rsOptVar", "rsOptJoin", "rsSeq", "rsSymbol", "unicodeSize_default", "init_unicodeSize", "__esmMin", "__name", "stringSize", "string", "hasUnicode_default", "unicodeSize_default", "asciiSize_default", "stringSize_default", "init_stringSize", "__esmMin", "init_asciiSize", "init_hasUnicode", "init_unicodeSize", "__name", "basePick", "object", "paths", "basePickBy_default", "value", "path", "hasIn_default", "basePick_default", "init_basePick", "__esmMin", "init_basePickBy", "init_hasIn", "__name", "pick", "pick_default", "init_pick", "__esmMin", "init_basePick", "init_flatRest", "flatRest_default", "object", "paths", "basePick_default", "baseRange", "start", "end", "step", "fromRight", "index", "length", "nativeMax", "nativeCeil", "result", "baseRange_default", "init_baseRange", "__esmMin", "__name", "createRange", "fromRight", "start", "end", "step", "isIterateeCall_default", "toFinite_default", "baseRange_default", "createRange_default", "init_createRange", "__esmMin", "init_baseRange", "init_isIterateeCall", "init_toFinite", "__name", "range", "range_default", "init_range", "__esmMin", "init_createRange", "createRange_default", "baseReduce", "collection", "iteratee", "accumulator", "initAccum", "eachFunc", "value", "index", "baseReduce_default", "init_baseReduce", "__esmMin", "__name", "reduce", "collection", "iteratee", "accumulator", "func", "isArray_default", "arrayReduce_default", "baseReduce_default", "initAccum", "baseIteratee_default", "baseEach_default", "reduce_default", "init_reduce", "__esmMin", "init_arrayReduce", "init_baseEach", "init_baseIteratee", "init_baseReduce", "init_isArray", "__name", "reject", "collection", "predicate", "func", "isArray_default", "arrayFilter_default", "baseFilter_default", "negate_default", "baseIteratee_default", "reject_default", "init_reject", "__esmMin", "init_arrayFilter", "init_baseFilter", "init_baseIteratee", "init_isArray", "init_negate", "__name", "size", "collection", "isArrayLike_default", "isString_default", "stringSize_default", "tag", "getTag_default", "mapTag", "setTag", "baseKeys_default", "size_default", "init_size", "__esmMin", "init_baseKeys", "init_getTag", "init_isArrayLike", "init_isString", "init_stringSize", "__name", "baseSome", "collection", "predicate", "result", "baseEach_default", "value", "index", "baseSome_default", "init_baseSome", "__esmMin", "init_baseEach", "__name", "some", "collection", "predicate", "guard", "func", "isArray_default", "arraySome_default", "baseSome_default", "isIterateeCall_default", "baseIteratee_default", "some_default", "init_some", "__esmMin", "init_arraySome", "init_baseIteratee", "init_baseSome", "init_isArray", "init_isIterateeCall", "__name", "sortBy", "sortBy_default", "init_sortBy", "__esmMin", "init_baseFlatten", "init_baseOrderBy", "init_baseRest", "init_isIterateeCall", "baseRest_default", "collection", "iteratees", "length", "isIterateeCall_default", "baseOrderBy_default", "baseFlatten_default", "INFINITY", "createSet", "createSet_default", "init_createSet", "__esmMin", "init_Set", "init_noop", "init_setToArray", "Set_default", "setToArray_default", "values", "noop_default", "baseUniq", "array", "iteratee", "comparator", "index", "includes", "arrayIncludes_default", "length", "isCommon", "result", "seen", "arrayIncludesWith_default", "LARGE_ARRAY_SIZE", "set", "createSet_default", "setToArray_default", "cacheHas_default", "SetCache_default", "outer", "value", "computed", "seenIndex", "baseUniq_default", "init_baseUniq", "__esmMin", "init_SetCache", "init_arrayIncludes", "init_arrayIncludesWith", "init_cacheHas", "init_createSet", "init_setToArray", "__name", "union", "union_default", "init_union", "__esmMin", "init_baseFlatten", "init_baseRest", "init_baseUniq", "init_isArrayLikeObject", "baseRest_default", "arrays", "baseUniq_default", "baseFlatten_default", "isArrayLikeObject_default", "uniq", "array", "baseUniq_default", "uniq_default", "init_uniq", "__esmMin", "init_baseUniq", "__name", "uniqBy", "array", "iteratee", "baseUniq_default", "baseIteratee_default", "uniqBy_default", "init_uniqBy", "__esmMin", "init_baseIteratee", "init_baseUniq", "__name", "uniqueId", "prefix", "id", "idCounter", "toString_default", "uniqueId_default", "init_uniqueId", "__esmMin", "init_toString", "__name", "baseZipObject", "props", "values", "assignFunc", "index", "length", "valsLength", "result", "value", "baseZipObject_default", "init_baseZipObject", "__esmMin", "__name", "zipObject", "props", "values", "baseZipObject_default", "assignValue_default", "zipObject_default", "init_zipObject", "__esmMin", "init_assignValue", "init_baseZipObject", "__name", "init_lodash", "__esmMin", "init_assign", "init_clone", "init_cloneDeep", "init_compact", "init_constant", "init_defaults", "init_difference", "init_drop", "init_dropRight", "init_each", "init_every", "init_filter", "init_find", "init_first", "init_flatMap", "init_flatten", "init_forEach", "init_forIn", "init_forOwn", "init_groupBy", "init_has", "init_identity", "init_includes", "init_indexOf", "init_isArray", "init_isEmpty", "init_isFunction", "init_isObject", "init_isRegExp", "init_isString", "init_isUndefined", "init_keys", "init_last", "init_map", "init_mapValues", "init_max", "init_merge", "init_min", "init_minBy", "init_noop", "init_now", "init_pick", "init_pickBy", "init_range", "init_reduce", "init_reject", "init_size", "init_some", "init_sortBy", "init_union", "init_uniq", "init_uniqueId", "init_values", "init_zipObject", "incrementOrInitEntry", "map", "k", "decrementOrRemoveEntry", "edgeArgsToId", "isDirected", "v_", "w_", "name", "v", "w", "tmp", "EDGE_KEY_DELIM", "isUndefined_default", "DEFAULT_EDGE_NAME", "edgeArgsToObj", "edgeObj", "edgeObjToId", "GRAPH_NODE", "Graph", "init_graph", "__esmMin", "init_lodash", "__name", "opts", "constant_default", "label", "newDefault", "isFunction_default", "keys_default", "self", "filter_default", "isEmpty_default", "vs", "value", "args", "forEach_default", "removeEdge", "e", "child", "parent", "ancestor", "children", "predsV", "sucsV", "preds", "union_default", "neighbors", "filter", "copy", "parents", "findParent", "values_default", "reduce_default", "valueSpecified", "arg0", "edge", "u", "inV", "edges", "outV", "inEdges", "init_graphlib", "__esmMin", "init_graph", "unlink", "entry", "filterOutLinks", "k", "v", "List", "init_list", "__esmMin", "__name", "sentinel", "strs", "curr", "greedyFAS", "g", "weightFn", "state", "buildState", "DEFAULT_WEIGHT_FN", "results", "doGreedyFAS", "flatten_default", "map_default", "e", "buckets", "zeroIdx", "sources", "sinks", "entry", "removeNode", "i", "collectPredecessors", "forEach_default", "edge", "weight", "uEntry", "assignBucket", "w", "wEntry", "fasGraph", "Graph", "maxIn", "maxOut", "v", "prevWeight", "edgeWeight", "range_default", "List", "init_greedy_fas", "__esmMin", "init_lodash", "init_graphlib", "init_list", "constant_default", "__name", "run", "g", "fas", "greedyFAS", "weightFn", "dfsFAS", "forEach_default", "e", "label", "uniqueId_default", "__name", "stack", "visited", "dfs", "v", "undo", "forwardName", "init_acyclic", "__esmMin", "init_lodash", "init_greedy_fas", "addDummyNode", "g", "type", "attrs", "name", "v", "uniqueId_default", "simplify", "simplified", "Graph", "forEach_default", "e", "simpleLabel", "label", "asNonCompoundGraph", "intersectRect", "rect", "point", "x", "y", "dx", "dy", "w", "h", "sx", "sy", "buildLayerMatrix", "layering", "map_default", "range_default", "maxRank", "node", "rank", "isUndefined_default", "normalizeRanks", "min", "min_default", "has_default", "removeEmptyRanks", "offset", "layers", "delta", "nodeRankFactor", "vs", "i", "addBorderNode", "prefix", "order", "max_default", "partition", "collection", "fn", "result", "value", "time", "start", "now_default", "notime", "init_util", "__esmMin", "init_lodash", "init_graphlib", "__name", "addBorderSegments", "g", "dfs", "v", "children", "node", "forEach_default", "rank", "maxRank", "addBorderNode", "__name", "prop", "prefix", "sg", "sgNode", "label", "prev", "curr", "addDummyNode", "init_add_border_segments", "__esmMin", "init_lodash", "init_util", "adjust", "g", "rankDir", "swapWidthHeight", "undo", "reverseY", "swapXY", "forEach_default", "v", "swapWidthHeightOne", "attrs", "w", "reverseYOne", "edge", "swapXYOne", "x", "init_coordinate_system", "__esmMin", "init_lodash", "__name", "run", "g", "forEach_default", "edge", "normalizeEdge", "v", "vRank", "w", "wRank", "name", "edgeLabel", "labelRank", "attrs", "dummy", "i", "addDummyNode", "undo", "node", "origLabel", "init_normalize", "__esmMin", "init_lodash", "init_util", "__name", "longestPath", "g", "visited", "dfs", "v", "label", "rank", "min_default", "map_default", "e", "__name", "forEach_default", "slack", "init_util", "__esmMin", "init_lodash", "feasibleTree", "g", "t", "Graph", "start", "size", "edge", "delta", "tightTree", "findMinSlackEdge", "slack", "shiftRanks", "dfs", "v", "forEach_default", "e", "edgeV", "w", "__name", "minBy_default", "init_feasible_tree", "__esmMin", "init_lodash", "init_graphlib", "init_util", "init_components", "__esmMin", "init_priority_queue", "__esmMin", "DEFAULT_WEIGHT_FUNC", "init_dijkstra", "__esmMin", "init_lodash", "init_priority_queue", "constant_default", "init_dijkstra_all", "__esmMin", "init_dijkstra", "init_tarjan", "__esmMin", "init_find_cycles", "__esmMin", "init_tarjan", "DEFAULT_WEIGHT_FUNC", "init_floyd_warshall", "__esmMin", "init_lodash", "constant_default", "topsort", "g", "visited", "stack", "results", "visit", "node", "CycleException", "forEach_default", "__name", "size_default", "init_topsort", "__esmMin", "init_lodash", "init_is_acyclic", "__esmMin", "init_topsort", "dfs", "g", "vs", "order", "isArray_default", "navigation", "acc", "visited", "forEach_default", "v", "doDfs", "postorder", "w", "init_dfs", "__esmMin", "init_lodash", "__name", "postorder", "g", "vs", "dfs", "init_postorder", "__esmMin", "init_dfs", "__name", "preorder", "g", "vs", "dfs", "init_preorder", "__esmMin", "init_dfs", "__name", "init_prim", "__esmMin", "init_priority_queue", "init_graph", "init_alg", "__esmMin", "init_components", "init_dijkstra", "init_dijkstra_all", "init_find_cycles", "init_floyd_warshall", "init_is_acyclic", "init_postorder", "init_preorder", "init_prim", "init_tarjan", "init_topsort", "networkSimplex", "g", "simplify", "longestPath", "t", "feasibleTree", "initLowLimValues", "initCutValues", "e", "f", "leaveEdge", "enterEdge", "exchangeEdges", "vs", "postorder", "forEach_default", "v", "assignCutValue", "child", "childLab", "parent", "calcCutValue", "childIsTail", "graphEdge", "cutValue", "isOutEdge", "other", "pointsToHead", "otherWeight", "isTreeEdge", "otherCutValue", "tree", "root", "dfsAssignLowLim", "visited", "nextLim", "low", "label", "w", "find_default", "edge", "vLabel", "wLabel", "tailLabel", "flip", "candidates", "filter_default", "isDescendant", "minBy_default", "slack", "updateRanks", "preorder", "flipped", "u", "rootLabel", "init_network_simplex", "__esmMin", "init_lodash", "init_alg", "init_util", "init_feasible_tree", "__name", "rank", "g", "networkSimplexRanker", "tightTreeRanker", "longestPathRanker", "longestPath", "feasibleTree", "networkSimplex", "init_rank", "__esmMin", "init_feasible_tree", "init_network_simplex", "init_util", "__name", "run", "g", "root", "addDummyNode", "depths", "treeDepths", "height", "max_default", "values_default", "nodeSep", "forEach_default", "e", "weight", "sumWeights", "child", "dfs", "v", "children", "top", "addBorderNode", "bottom", "label", "childNode", "childTop", "childBottom", "thisWeight", "minlen", "depth", "__name", "reduce_default", "acc", "cleanup", "graphLabel", "edge", "init_nesting_graph", "__esmMin", "init_lodash", "init_util", "addSubgraphConstraints", "g", "cg", "vs", "prev", "rootPrev", "forEach_default", "v", "child", "parent", "prevChild", "init_add_subgraph_constraints", "__esmMin", "init_lodash", "__name", "buildLayerGraph", "g", "rank", "relationship", "root", "createRootNode", "result", "Graph", "v", "forEach_default", "node", "parent", "e", "u", "edge", "weight", "isUndefined_default", "uniqueId_default", "init_build_layer_graph", "__esmMin", "init_lodash", "init_graphlib", "__name", "crossCount", "g", "layering", "cc", "i", "twoLayerCrossCount", "northLayer", "southLayer", "southPos", "zipObject_default", "map_default", "v", "southEntries", "flatten_default", "sortBy_default", "e", "firstIndex", "treeSize", "tree", "forEach_default", "entry", "index", "weightSum", "init_cross_count", "__esmMin", "init_lodash", "__name", "initOrder", "g", "visited", "simpleNodes", "filter_default", "v", "maxRank", "max_default", "map_default", "layers", "range_default", "dfs", "has_default", "node", "forEach_default", "__name", "orderedVs", "sortBy_default", "init_init_order", "__esmMin", "init_lodash", "barycenter", "g", "movable", "map_default", "v", "inV", "result", "reduce_default", "acc", "e", "edge", "nodeU", "init_barycenter", "__esmMin", "init_lodash", "__name", "resolveConflicts", "entries", "cg", "mappedEntries", "forEach_default", "entry", "i", "tmp", "isUndefined_default", "e", "entryV", "entryW", "sourceSet", "filter_default", "doResolveConflicts", "handleIn", "vEntry", "uEntry", "mergeEntries", "__name", "handleOut", "wEntry", "map_default", "pick_default", "target", "source", "sum", "weight", "init_resolve_conflicts", "__esmMin", "init_lodash", "sort", "entries", "biasRight", "parts", "partition", "entry", "sortable", "unsortable", "sortBy_default", "vs", "sum", "weight", "vsIndex", "compareWithBias", "consumeUnsortable", "forEach_default", "result", "flatten_default", "index", "last", "last_default", "bias", "entryV", "entryW", "init_sort", "__esmMin", "init_lodash", "init_util", "__name", "sortSubgraph", "g", "v", "cg", "biasRight", "movable", "node", "bl", "br", "subgraphs", "filter_default", "w", "barycenters", "barycenter", "forEach_default", "entry", "subgraphResult", "mergeBarycenters", "entries", "resolveConflicts", "expandSubgraphs", "result", "sort", "flatten_default", "blPred", "brPred", "target", "other", "isUndefined_default", "init_sort_subgraph", "__esmMin", "init_lodash", "init_barycenter", "init_resolve_conflicts", "init_sort", "__name", "order", "g", "maxRank", "downLayerGraphs", "buildLayerGraphs", "range_default", "upLayerGraphs", "layering", "initOrder", "assignOrder", "bestCC", "best", "i", "lastBest", "sweepLayerGraphs", "buildLayerMatrix", "cc", "crossCount", "cloneDeep_default", "ranks", "relationship", "map_default", "rank", "buildLayerGraph", "layerGraphs", "biasRight", "cg", "Graph", "forEach_default", "lg", "root", "sorted", "sortSubgraph", "v", "addSubgraphConstraints", "layer", "init_order", "__esmMin", "init_lodash", "init_graphlib", "init_util", "init_add_subgraph_constraints", "init_build_layer_graph", "init_cross_count", "init_init_order", "init_sort_subgraph", "__name", "parentDummyChains", "g", "postorderNums", "postorder", "forEach_default", "v", "node", "edgeObj", "pathData", "findPath", "path", "lca", "pathIdx", "pathV", "ascending", "w", "vPath", "wPath", "low", "lim", "parent", "result", "dfs", "__name", "init_parent_dummy_chains", "__esmMin", "init_lodash", "findType1Conflicts", "g", "layering", "conflicts", "visitLayer", "prevLayer", "layer", "k0", "scanPos", "prevLayerLength", "lastNode", "last_default", "forEach_default", "v", "i", "w", "findOtherInnerSegmentNode", "k1", "scanNode", "u", "uLabel", "uPos", "addConflict", "__name", "reduce_default", "findType2Conflicts", "scan", "south", "southPos", "southEnd", "prevNorthBorder", "nextNorthBorder", "range_default", "uNode", "north", "prevNorthPos", "nextNorthPos", "southLookahead", "predecessors", "find_default", "tmp", "conflictsV", "hasConflict", "verticalAlignment", "neighborFn", "root", "align", "pos", "order", "prevIdx", "ws", "sortBy_default", "mp", "il", "horizontalCompaction", "reverseSep", "xs", "blockG", "buildBlockGraph", "borderType", "iterate", "setXsFunc", "nextNodesFunc", "stack", "elem", "visited", "pass1", "acc", "e", "pass2", "min", "node", "blockGraph", "Graph", "graphLabel", "sepFn", "sep", "vRoot", "uRoot", "prevMax", "findSmallestWidthAlignment", "xss", "minBy_default", "values_default", "max", "forIn_default", "x", "halfWidth", "width", "alignCoordinates", "alignTo", "alignToVals", "alignToMin", "min_default", "alignToMax", "max_default", "vert", "horiz", "alignment", "delta", "xsVals", "mapValues_default", "balance", "ignore", "map_default", "positionX", "buildLayerMatrix", "merge_default", "adjustedLayering", "inner", "smallestWidth", "nodeSep", "edgeSep", "vLabel", "wLabel", "sum", "init_bk", "__esmMin", "init_lodash", "init_graphlib", "init_util", "position", "g", "asNonCompoundGraph", "positionY", "forOwn_default", "positionX", "x", "v", "layering", "buildLayerMatrix", "rankSep", "prevY", "forEach_default", "layer", "maxHeight", "max_default", "map_default", "init_position", "__esmMin", "init_lodash", "init_util", "init_bk", "__name", "layout", "g", "opts", "time", "notime", "layoutGraph", "buildLayoutGraph", "runLayout", "updateInputGraph", "makeSpaceForEdgeLabels", "removeSelfEdges", "run", "rank", "asNonCompoundGraph", "injectEdgeLabelProxies", "removeEmptyRanks", "cleanup", "normalizeRanks", "assignRankMinMax", "removeEdgeLabelProxies", "parentDummyChains", "addBorderSegments", "order", "insertSelfEdges", "adjust", "position", "positionSelfEdges", "removeBorderNodes", "undo", "fixupEdgeLabelCoords", "translateGraph", "assignNodeIntersects", "reversePointsForReversedEdges", "inputGraph", "forEach_default", "v", "inputLabel", "layoutLabel", "e", "Graph", "graph", "canonicalize", "merge_default", "graphDefaults", "selectNumberAttrs", "graphNumAttrs", "pick_default", "graphAttrs", "node", "defaults_default", "nodeNumAttrs", "nodeDefaults", "edge", "edgeDefaults", "edgeNumAttrs", "edgeAttrs", "w", "label", "addDummyNode", "maxRank", "max_default", "minX", "maxX", "minY", "maxY", "graphLabel", "marginX", "marginY", "getExtremes", "attrs", "x", "y", "h", "__name", "p", "nodeV", "nodeW", "p1", "p2", "intersectRect", "t", "b", "l", "last_default", "r", "layers", "buildLayerMatrix", "layer", "orderShift", "i", "selfEdge", "selfNode", "dx", "dy", "obj", "mapValues_default", "newAttrs", "k", "init_layout", "__esmMin", "init_lodash", "init_graphlib", "init_add_border_segments", "init_coordinate_system", "init_acyclic", "init_normalize", "init_rank", "init_nesting_graph", "init_order", "init_parent_dummy_chains", "init_position", "init_util", "init_dagre", "__esmMin", "init_acyclic", "init_layout", "init_normalize", "init_rank", "write", "g", "json", "writeNodes", "writeEdges", "isUndefined_default", "clone_default", "map_default", "v", "nodeValue", "parent", "node", "edgeValue", "edge", "init_json", "__esmMin", "init_lodash", "init_graph", "__name", "clusterDb", "descendants", "parents", "clear", "isDescendant", "edgeInCluster", "copy", "extractDescendants", "findCommonEdges", "findNonClusterChild", "getAnchorId", "adjustClustersAndEdges", "extractor", "sorter", "sortNodesByHierarchy", "init_mermaid_graphlib", "__esmMin", "init_logger", "init_graphlib", "init_json", "__name", "id", "ancestorId", "ancestorDescendants", "log", "edge", "clusterId", "clusterDescendants", "graph", "newGraph", "rootId", "nodes", "node", "data", "edges", "e", "children", "res", "child", "id1", "id2", "edges1", "edges2", "edges1Prim", "edges2Prim", "edgeIn1", "reserve", "_id", "commonEdges", "depth", "d1", "d2", "nonClusterChild", "parent", "v", "w", "write", "hasChildren", "dir", "clusterGraph", "Graph", "result", "sorted", "dagre_exports", "__export", "render", "recursiveRender", "init_dagre", "__esmMin", "init_json", "init_graphlib", "init_markers", "init_util", "init_mermaid_graphlib", "init_nodes", "init_clusters", "init_edges", "init_logger", "init_subGraphTitleMargins", "init_diagramAPI", "__name", "_elem", "graph", "diagramType", "id", "parentCluster", "siteConfig", "log", "write", "dir", "elem", "clusters", "edgePaths", "edgeLabels", "nodes", "v", "node", "data", "ranksep", "nodesep", "o", "newEl", "updateNodeBounds", "setNodeElem", "findNonClusterChild", "clusterDb", "insertNode", "edgePromises", "e", "edge", "insertEdgeLabel", "layout", "diff", "subGraphTitleTotalMargin", "getSubGraphTitleMargins", "sortNodesByHierarchy", "positionNode", "halfPadding", "labelHeight", "offsetY", "insertCluster", "parent", "point", "startNode", "endNode", "paths", "insertEdge", "positionEdgeLabel", "n", "data4Layout", "svg", "Graph", "element", "markers_default", "clear", "nodeId", "specialId1", "specialId2", "edge1", "edgeMid", "edge2", "adjustClustersAndEdges", "getConfig", "layoutAlgorithms", "registerLayoutLoaders", "registerDefaultLayoutLoaders", "render", "getRegisteredLayoutAlgorithm", "init_render", "__esmMin", "init_internals", "init_logger", "__name", "loaders", "loader", "data4Layout", "svg", "layoutDefinition", "internalHelpers", "algorithm", "fallback", "log", "setupViewPortForSVG", "calculateDimensionsWithPadding", "createViewBox", "init_setupViewPortForSVG", "__esmMin", "init_setupGraphViewbox", "init_logger", "__name", "svg", "padding", "cssDiagram", "useMaxWidth", "width", "height", "x", "y", "configureSvgSize", "viewBox", "log", "bounds", "getClasses", "draw", "flowRenderer_v3_unified_default", "init_flowRenderer_v3_unified", "__esmMin", "init_src", "init_diagramAPI", "init_logger", "init_insertElementsForSize", "init_render", "init_setupViewPortForSVG", "init_utils", "init_flowDb", "__name", "text", "diagramObj", "id", "_version", "diag", "log", "securityLevel", "conf", "layout", "getConfig", "sandboxElement", "select_default", "doc", "data4Layout", "svg", "getDiagramElement", "direction", "getDirection", "getRegisteredLayoutAlgorithm", "render", "padding", "utils_default", "setupViewPortForSVG", "vertex", "node", "link", "linkNode", "shape", "label", "parser", "flow_default", "init_flow", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "$VS", "$VT", "$VU", "$VV", "$VW", "$VX", "$VY", "$VZ", "$V_", "$V$", "$V01", "$V11", "$V21", "$V31", "$V41", "$V51", "$V61", "$V71", "$V81", "$V91", "$Va1", "$Vb1", "$Vc1", "$Vd1", "$Ve1", "$Vf1", "$Vg1", "$Vh1", "$Vi1", "$Vj1", "$Vk1", "$Vl1", "$Vm1", "$Vn1", "$Vo1", "$Vp1", "$Vq1", "$Vr1", "$Vs1", "$Vt1", "$Vu1", "$Vv1", "$Vw1", "$Vx1", "$Vy1", "$Vz1", "$VA1", "$VB1", "$VC1", "$VD1", "$VE1", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "inf", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "re", "Parser", "fade", "getStyles", "styles_default", "init_styles", "__esmMin", "init_dist", "__name", "color", "opacity", "channel", "channel_default", "r", "g", "b", "rgba_default", "options", "flowDiagram_exports", "__export", "diagram", "init_flowDiagram", "__esmMin", "init_diagramAPI", "init_flowDb", "init_flowRenderer_v3_unified", "init_flow", "init_styles", "flow_default", "flowDb_default", "flowRenderer_v3_unified_default", "styles_default", "__name", "cnf", "setConfig", "parser", "erDiagram_default", "init_erDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "entities", "relationships", "Cardinality", "Identification", "addEntity", "getEntities", "addAttributes", "addRelationship", "getRelationships", "clear", "erDb_default", "init_erDb", "__esmMin", "init_logger", "init_diagramAPI", "init_commonDb", "__name", "name", "alias", "log", "entityName", "attribs", "entity", "i", "entA", "rolA", "entB", "rSpec", "rel", "getConfig", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "setDiagramTitle", "getDiagramTitle", "ERMarkers", "insertMarkers", "erMarkers_default", "init_erMarkers", "__esmMin", "__name", "elem", "conf", "marker", "regex_default", "init_regex", "__esmMin", "validate", "uuid", "regex_default", "validate_default", "init_validate", "__esmMin", "init_regex", "__name", "unsafeStringify", "arr", "offset", "byteToHex", "init_stringify", "__esmMin", "i", "__name", "parse", "uuid", "validate_default", "v", "arr", "parse_default", "init_parse", "__esmMin", "init_validate", "__name", "stringToBytes", "str", "bytes", "i", "v35", "name", "version", "hashfunc", "generateUUID", "value", "namespace", "buf", "offset", "_namespace", "parse_default", "unsafeStringify", "__name", "DNS", "URL", "init_v35", "__esmMin", "init_stringify", "init_parse", "f", "s", "x", "y", "z", "ROTL", "n", "sha1", "bytes", "K", "H", "msg", "i", "l", "N", "M", "arr", "j", "W", "t", "a", "b", "c", "e", "T", "sha1_default", "init_sha1", "__esmMin", "__name", "v5", "v5_default", "init_v5", "__esmMin", "init_v35", "init_sha1", "v35", "sha1_default", "init_esm_browser", "__esmMin", "init_v5", "generateId", "str", "prefix", "simplifiedStr", "BAD_ID_CHARS_REGEXP", "strWithHyphen", "v5_default", "MERMAID_ERDIAGRAM_UUID", "conf", "entityNameIds", "setConf", "drawAttributes", "drawEntities", "adjustEntities", "getEdgeName", "addRelationships", "relCnt", "drawRelationshipFromLayout", "draw", "erRenderer_default", "init_erRenderer", "__esmMin", "init_graphlib", "init_src", "init_dagre", "init_diagramAPI", "init_logger", "init_utils", "init_erMarkers", "init_setupGraphViewbox", "init_common", "init_esm_browser", "__name", "cnf", "keys", "key", "groupNode", "entityTextNode", "attributes", "heightPadding", "widthPadding", "attrFontSize", "labelBBox", "attributeNodes", "hasKeyType", "hasComment", "maxTypeWidth", "maxNameWidth", "maxKeyWidth", "maxCommentWidth", "cumulativeHeight", "attrNum", "item", "attrPrefix", "nodeHeight", "attributeType", "parseGenericTypes", "typeNode", "getConfig", "nameNode", "attributeNode", "typeBBox", "nameBBox", "keyTypeNodeText", "keyTypeNode", "keyTypeBBox", "commentNode", "commentNodeBBox", "widthPaddingFactor", "maxWidth", "bBox", "spareColumnWidth", "heightOffset", "attribStyle", "alignY", "typeRect", "nameXOffset", "nameRect", "keyTypeAndCommentXOffset", "keyTypeRect", "svgNode", "entities", "graph", "firstOne", "entityName", "entityId", "textId", "textNode", "entityWidth", "entityHeight", "rectBBox", "v", "rel", "relationships", "g", "svg", "insert", "diagObj", "edge", "lineFunction", "line_default", "d", "basis_default", "svgPath", "url", "erMarkers_default", "len", "labelPoint", "labelId", "labelText", "labelNode", "firstShift", "txt", "i", "text", "id", "_version", "log", "securityLevel", "sandboxElement", "select_default", "Graph", "firstEntity", "layout", "padding", "utils_default", "svgBounds", "width", "height", "configureSvgSize", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "erDiagram_exports", "__export", "diagram", "init_erDiagram", "__esmMin", "init_erDb", "init_erRenderer", "init_styles", "erDiagram_default", "erDb_default", "erRenderer_default", "styles_default", "isAstNode", "obj", "isReference", "isAstNodeDescription", "isLinkingError", "isCompositeCstNode", "node", "isLeafCstNode", "isRootCstNode", "AbstractAstReflection", "init_syntax_tree", "__esmMin", "__name", "type", "subtype", "supertype", "nested", "existing", "result", "allTypes", "types", "possibleSubType", "toString", "item", "isIterable", "obj", "stream", "collections", "collection", "StreamImpl", "iterator", "state", "DONE_RESULT", "next", "EMPTY_STREAM", "TreeStreamImpl", "Reduction", "init_stream", "__esmMin", "_StreamImpl", "__name", "startFn", "nextFn", "count", "result", "keyFn", "valueFn", "entryStream", "element", "other", "separator", "value", "addSeparator", "searchElement", "fromIndex", "index", "predicate", "callbackfn", "done", "initialValue", "previousValue", "mapped", "depth", "skipCount", "i", "maxSize", "by", "set", "e", "key", "otherKeySet", "ownKey", "root", "children", "options", "sum", "a", "b", "product", "min", "max", "cst_utils_exports", "__export", "DefaultNameRegexp", "RangeComparison", "compareRange", "findCommentNode", "findDeclarationNodeAtOffset", "findLeafNodeAtOffset", "findLeafNodeBeforeOffset", "flattenCst", "getInteriorNodes", "getNextNode", "getPreviousNode", "getStartlineNode", "inRange", "isChildNode", "isCommentNode", "streamCst", "toDocumentSegment", "tokenToRange", "node", "TreeStreamImpl", "element", "isCompositeCstNode", "isLeafCstNode", "child", "parent", "token", "offset", "end", "range", "to", "startInside", "endInside", "cstNode", "nameRegexp", "localOffset", "textAtOffset", "commentNames", "previous", "isRootCstNode", "endIndex", "e", "searchResult", "binarySearch", "closest", "left", "right", "closestNode", "middle", "middleNode", "hidden", "index", "last", "next", "line", "selfIndex", "start", "commonParent", "getCommonParent", "a", "b", "aParents", "getParentChain", "bParents", "current", "i", "aParent", "bParent", "chain", "init_cst_utils", "__esmMin", "init_syntax_tree", "init_stream", "__name", "assertUnreachable", "_", "ErrorWithLocation", "init_errors", "__esmMin", "__name", "node", "message", "ast_exports", "__export", "AbstractElement", "AbstractRule", "AbstractType", "Action", "Alternatives", "ArrayLiteral", "ArrayType", "Assignment", "BooleanLiteral", "CharacterRange", "Condition", "Conjunction", "CrossReference", "Disjunction", "EndOfFile", "Grammar", "GrammarImport", "Group", "InferredType", "Interface", "Keyword", "LangiumGrammarAstReflection", "LangiumGrammarTerminals", "NamedArgument", "NegatedToken", "Negation", "NumberLiteral", "Parameter", "ParameterReference", "ParserRule", "ReferenceType", "RegexToken", "ReturnType", "RuleCall", "SimpleType", "StringLiteral", "TerminalAlternatives", "TerminalGroup", "TerminalRule", "TerminalRuleCall", "Type", "TypeAttribute", "TypeDefinition", "UnionType", "UnorderedGroup", "UntilToken", "ValueLiteral", "Wildcard", "isAbstractElement", "isAbstractRule", "isAbstractType", "isAction", "isAlternatives", "isArrayLiteral", "isArrayType", "isAssignment", "isBooleanLiteral", "isCharacterRange", "isCondition", "isConjunction", "isCrossReference", "isDisjunction", "isEndOfFile", "isFeatureName", "isGrammar", "isGrammarImport", "isGroup", "isInferredType", "isInterface", "isKeyword", "isNamedArgument", "isNegatedToken", "isNegation", "isNumberLiteral", "isParameter", "isParameterReference", "isParserRule", "isPrimitiveType", "isReferenceType", "isRegexToken", "isReturnType", "isRuleCall", "isSimpleType", "isStringLiteral", "isTerminalAlternatives", "isTerminalGroup", "isTerminalRule", "isTerminalRuleCall", "isType", "isTypeAttribute", "isTypeDefinition", "isUnionType", "isUnorderedGroup", "isUntilToken", "isValueLiteral", "isWildcard", "reflection", "item", "init_ast", "__esmMin", "init_syntax_tree", "__name", "AbstractAstReflection", "subtype", "supertype", "refInfo", "referenceId", "type", "ast_utils_exports", "__export", "assignMandatoryProperties", "copyAstNode", "findLocalReferences", "findRootNode", "getContainerOfType", "getDocument", "hasContainerOfType", "linkContentToContainer", "streamAllContents", "streamAst", "streamContents", "streamReferences", "node", "name", "value", "item", "index", "isAstNode", "typePredicate", "predicate", "result", "options", "range", "StreamImpl", "state", "property", "isAstNodeInRange", "element", "DONE_RESULT", "root", "TreeStreamImpl", "astNode", "nodeRange", "_a", "inRange", "isReference", "targetNode", "lookup", "refs", "refInfo", "stream", "reflection", "typeMetaData", "genericNode", "copyDefaultValue", "propertyType", "buildReference", "copy", "copiedArray", "init_ast_utils", "__esmMin", "init_syntax_tree", "init_stream", "init_cst_utils", "__name", "cc", "char", "insertToSet", "item", "set", "subItem", "addFlag", "flagObj", "flagKey", "x", "ASSERT_EXISTS", "obj", "ASSERT_NEVER_REACH_HERE", "isCharacter", "init_utils", "__esmMin", "__name", "digitsCharCodes", "wordCharCodes", "whitespaceCodes", "init_character_classes", "__esmMin", "init_utils", "i", "cc", "hexDigitPattern", "decimalPattern", "decimalPatternNoZero", "RegExpParser", "init_regexp_parser", "__esmMin", "init_utils", "init_character_classes", "__name", "newState", "input", "value", "flags", "addFlag", "alts", "begin", "terms", "type", "ASSERT_EXISTS", "disjunction", "ASSERT_NEVER_REACH_HERE", "isBacktracking", "range", "atLeast", "atMost", "atom", "cc", "set", "complement", "digitsCharCodes", "whitespaceCodes", "wordCharCodes", "escapeCode", "letter", "escapedChar", "nextChar", "from", "isFromSingleChar", "isCharacter", "to", "isToSingleChar", "insertToSet", "capturing", "groupAst", "number", "howMuch", "prevState", "howMany", "hexString", "hexChar", "char", "BaseRegExpVisitor", "init_base_regexp_visitor", "__esmMin", "__name", "node", "key", "child", "subChild", "init_api", "__esmMin", "init_regexp_parser", "init_base_regexp_visitor", "regexp_utils_exports", "__export", "NEWLINE_REGEXP", "escapeRegExp", "getCaseInsensitivePattern", "getTerminalParts", "isMultilineComment", "isWhitespace", "partialMatches", "partialRegExp", "regexp", "pattern", "regexpParser", "parts", "alternative", "visitor", "value", "keyword", "letter", "regex", "input", "partial", "match", "re", "source", "i", "process", "result", "tmp", "appendRaw", "nbChars", "__name", "appendOptional", "TerminalRegExpVisitor", "init_regexp_utils", "__esmMin", "init_api", "RegExpParser", "BaseRegExpVisitor", "node", "char", "escapedChar", "set", "grammar_utils_exports", "__export", "findAssignment", "findNameAssignment", "findNodeForKeyword", "findNodeForProperty", "findNodesForKeyword", "findNodesForKeywordInternal", "findNodesForProperty", "getActionAtElement", "getActionType", "getAllReachableRules", "getCrossReferenceTerminal", "getEntryRule", "getExplicitRuleType", "getHiddenRules", "getRuleType", "getTypeName", "isArrayCardinality", "isArrayOperator", "isCommentTerminal", "isDataType", "isDataTypeRule", "isOptionalCardinality", "terminalRegex", "grammar", "isParserRule", "isTerminalRule", "allTerminals", "ruleNames", "entryRule", "topMostRules", "rule", "ruleDfs", "rules", "visitedSet", "streamAllContents", "node", "isRuleCall", "isTerminalRuleCall", "refRule", "crossRef", "nameAssigment", "terminalRule", "property", "findNodesForPropertyInternal", "index", "nodes", "element", "first", "nodeFeature", "getContainerOfType", "isAssignment", "isCompositeCstNode", "e", "keyword", "isKeyword", "treeIterator", "streamCst", "result", "keywordNodes", "childNode", "cstNode", "astNode", "_a", "assignment", "type", "startNode", "isInferredType", "isAction", "assertUnreachable", "findNameAssignmentInternal", "cache", "go", "refType", "childAssignment", "__name", "isSimpleType", "parent", "isGroup", "elements", "item", "action", "isAbstractElement", "cardinality", "operator", "isDataTypeRuleInternal", "visited", "isDataTypeInternal", "isArrayType", "isReferenceType", "isUnionType", "ref", "isType", "isInterface", "isReturnType", "actionType", "_b", "_c", "flags", "source", "abstractElementToRegex", "flagText", "value", "name", "isTerminalAlternatives", "terminalAlternativesToRegex", "isTerminalGroup", "terminalGroupToRegex", "isCharacterRange", "characterRangeToRegex", "withCardinality", "isNegatedToken", "negateTokenToRegex", "isUntilToken", "untilTokenToRegex", "isRegexToken", "lastSlash", "regexFlags", "isWildcard", "WILDCARD", "alternatives", "group", "until", "negate", "range", "keywordToRegex", "escapeRegExp", "regex", "options", "init_grammar_utils", "__esmMin", "init_errors", "init_ast", "init_syntax_tree", "init_ast_utils", "init_cst_utils", "init_regexp_utils", "createGrammarConfig", "services", "rules", "grammar", "rule", "isTerminalRule", "isCommentTerminal", "isMultilineComment", "terminalRegex", "DefaultNameRegexp", "init_grammar_config", "__esmMin", "init_cst_utils", "init_grammar_utils", "init_regexp_utils", "init_ast", "__name", "init_version", "__esmMin", "PRINT_ERROR", "msg", "PRINT_WARNING", "init_print", "__esmMin", "__name", "timer", "func", "start", "val", "init_timer", "__esmMin", "__name", "toFastProperties", "toBecomeFast", "FakeConstructor", "__name", "fakeInstance", "fakeAccess", "init_to_fast_properties", "__esmMin", "init_api", "__esmMin", "init_print", "init_timer", "init_to_fast_properties", "tokenLabel", "tokType", "hasTokenLabel", "obj", "isString_default", "serializeGrammar", "topRules", "map_default", "serializeProduction", "node", "convertDefinition", "definition", "__name", "NonTerminal", "serializedNonTerminal", "Alternative", "Option", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "Terminal", "RepetitionWithSeparator", "Repetition", "Alternation", "serializedTerminal", "pattern", "isRegExp_default", "Rule", "AbstractProduction", "init_model", "__esmMin", "init_lodash", "value", "_definition", "visitor", "forEach_default", "prod", "options", "assign_default", "pickBy_default", "v", "GAstVisitor", "init_visitor", "__esmMin", "init_model", "__name", "node", "nodeAny", "NonTerminal", "Alternative", "Option", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Repetition", "Alternation", "Terminal", "Rule", "isSequenceProd", "prod", "Alternative", "Option", "Repetition", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Terminal", "Rule", "isOptionalProd", "alreadyVisited", "Alternation", "some_default", "subProd", "NonTerminal", "includes_default", "AbstractProduction", "every_default", "isBranchingProd", "getProductionDslName", "init_helpers", "__esmMin", "init_lodash", "init_model", "__name", "init_api", "__esmMin", "init_model", "init_visitor", "init_helpers", "restForRepetitionWithSeparator", "repSepProd", "currRest", "prevRest", "Option", "Terminal", "RestWalker", "init_rest", "__esmMin", "init_lodash", "init_api", "__name", "prod", "forEach_default", "subProd", "index", "drop_default", "NonTerminal", "Alternative", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Repetition", "Alternation", "terminal", "refProd", "flatProd", "fullOrRest", "optionProd", "atLeastOneProd", "fullAtLeastOneRest", "atLeastOneSepProd", "fullAtLeastOneSepRest", "manyProd", "fullManyRest", "manySepProd", "fullManySepRest", "orProd", "alt", "prodWrapper", "first", "prod", "NonTerminal", "Terminal", "firstForTerminal", "isSequenceProd", "firstForSequence", "isBranchingProd", "firstForBranching", "firstSet", "seq", "nextSubProdIdx", "hasInnerProdsRemaining", "currSubProd", "isLastInnerProdOptional", "isOptionalProd", "uniq_default", "allAlternativesFirsts", "map_default", "innerProd", "flatten_default", "terminal", "init_first", "__esmMin", "init_lodash", "init_api", "__name", "IN", "init_constants", "__esmMin", "computeAllProdsFollows", "topProductions", "reSyncFollows", "forEach_default", "topProd", "currRefsFollow", "ResyncFollowsWalker", "assign_default", "buildBetweenProdsFollowPrefix", "inner", "occurenceInParent", "IN", "init_follow", "__esmMin", "init_rest", "init_first", "init_lodash", "init_constants", "init_api", "RestWalker", "__name", "terminal", "currRest", "prevRest", "refProd", "followName", "fullRest", "restProd", "Alternative", "t_in_topProd_follows", "first", "getRegExpAst", "regExp", "regExpStr", "regExpAstCache", "regExpAst", "regExpParser", "clearRegExpParserCache", "init_reg_exp_parser", "__esmMin", "init_api", "RegExpParser", "__name", "getOptimizedStartCodesIndices", "regExp", "ensureOptimizations", "ast", "getRegExpAst", "firstCharOptimizedIndices", "e", "complementErrorMessage", "PRINT_WARNING", "failedOptimizationPrefixMsg", "msgSuffix", "PRINT_ERROR", "result", "ignoreCase", "terms", "term", "atom", "addOptimizedIdxToResult", "forEach_default", "code", "range", "rangeCode", "minOptimizationVal", "minUnOptVal", "maxUnOptVal", "minOptIdx", "charCodeToOptimizedIndex", "maxOptIdx", "currOptIdx", "isOptionalQuantifier", "isWholeOptional", "values_default", "optimizedCharIdx", "handleIgnoreCase", "char", "upperChar", "lowerChar", "findCode", "setNode", "targetCharCodes", "find_default", "codeOrRange", "includes_default", "targetCode", "quantifier", "isArray_default", "every_default", "canMatchCharCode", "charCodes", "pattern", "charCodeFinder", "CharCodeFinder", "init_reg_exp", "__esmMin", "init_api", "init_lodash", "init_reg_exp_parser", "init_lexer", "__name", "BaseRegExpVisitor", "node", "analyzeTokenTypes", "tokenTypes", "options", "defaults_default", "SUPPORT_STICKY", "__name", "msg", "action", "tracer", "initCharCodeToOptimizedIndexMap", "onlyRelevantTypes", "reject_default", "currType", "PATTERN", "Lexer", "hasCustom", "allTransformedPatterns", "map_default", "currPattern", "isRegExp_default", "regExpSource", "includes_default", "addStickyFlag", "addStartOfInput", "isFunction_default", "escapedRegExpString", "wrappedRegExp", "patternIdxToType", "patternIdxToGroup", "patternIdxToLongerAltIdxArr", "patternIdxToPushMode", "patternIdxToPopMode", "clazz", "groupName", "isString_default", "isUndefined_default", "longerAltType", "isArray_default", "type", "indexOf_default", "has_default", "patternIdxToCanLineTerminator", "lineTerminatorCharCodes", "getCharCodes", "tokType", "checkLineBreaksIssues", "canMatchCharCode", "patternIdxToIsCustom", "patternIdxToShort", "emptyGroups", "patternIdxToConfig", "isCustomPattern", "isShortPattern", "reduce_default", "acc", "x", "idx", "canBeOptimized", "charCodeToPatternIdxToConfig", "result", "currTokType", "charCode", "optimizedIdx", "charCodeToOptimizedIndex", "addToMapOfArrays", "lastOptimizedIdx", "forEach_default", "charOrInt", "currOptimizedIdx", "PRINT_ERROR", "failedOptimizationPrefixMsg", "optimizedCodes", "getOptimizedStartCodesIndices", "isEmpty_default", "code", "validatePatterns", "validModesNames", "errors", "missingResult", "findMissingPatterns", "invalidResult", "findInvalidPatterns", "validTokenTypes", "validateRegExpPattern", "findInvalidGroupType", "findModesThatDoNotExist", "findUnreachablePatterns", "withRegExpPatterns", "filter_default", "findEndOfInputAnchor", "findStartOfInputAnchor", "findUnsupportedFlags", "findDuplicatePatterns", "findEmptyMatchRegExps", "tokenTypesWithMissingPattern", "LexerDefinitionErrorType", "valid", "difference_default", "tokenTypesWithInvalidPattern", "pattern", "EndAnchorFinder", "BaseRegExpVisitor", "node", "invalidRegex", "regexpAst", "getRegExpAst", "endAnchorVisitor", "end_of_input", "matchesEmptyString", "StartAnchorFinder", "startAnchorVisitor", "start_of_input", "invalidFlags", "found", "identicalPatterns", "outerType", "innerType", "compact_default", "duplicatePatterns", "currIdenticalSet", "setOfIdentical", "tokenTypeNames", "head_default", "invalidTypes", "group", "validModes", "invalidModes", "canBeTested", "noMetaChar", "testIdx", "str", "tokenType", "testTokenType", "regExpArray", "regExp", "find_default", "char", "flags", "performRuntimeChecks", "lexerDefinition", "trackLines", "lineTerminatorCharacters", "DEFAULT_MODE", "MODES", "currModeValue", "currModeName", "currIdx", "longerAlt", "currLongerAlt", "performWarningRuntimeChecks", "warnings", "hasAnyLineBreak", "allTokenTypes", "flatten_default", "values_default", "concreteTokenTypes", "terminatorCharCodes", "currIssue", "warningDescriptor", "buildLineBreakIssueMessage", "cloneEmptyGroups", "clonedResult", "groupKeys", "keys_default", "currKey", "currGroupValue", "e", "details", "charsOrCodes", "numOrString", "map", "key", "value", "minOptimizationVal", "charCodeToOptimizedIdxMap", "i", "LineTerminatorOptimizedTester", "init_lexer", "__esmMin", "init_api", "init_lexer_public", "init_lodash", "init_reg_exp", "init_reg_exp_parser", "text", "len", "c", "tokenStructuredMatcher", "tokInstance", "tokConstructor", "instanceType", "tokenStructuredMatcherNoCategories", "token", "tokType", "augmentTokenTypes", "tokenTypes", "tokenTypesAndParents", "expandCategories", "assignTokenDefaultProps", "assignCategoriesMapProp", "assignCategoriesTokensProp", "forEach_default", "result", "clone_default", "categories", "searching", "compact_default", "flatten_default", "map_default", "currTokType", "newCategories", "difference_default", "isEmpty_default", "hasShortKeyProperty", "tokenIdxToClass", "tokenShortNameIdx", "hasCategoriesProperty", "isArray_default", "hasExtendingTokensTypesProperty", "hasExtendingTokensTypesMapProperty", "val", "key", "singleAssignCategoriesToksMap", "path", "nextNode", "pathNode", "nextCategory", "newPath", "includes_default", "has_default", "isTokenType", "init_tokens", "__esmMin", "init_lodash", "__name", "defaultLexerErrorProvider", "init_lexer_errors_public", "__esmMin", "token", "fullText", "startOffset", "length", "line", "column", "LexerDefinitionErrorType", "DEFAULT_LEXER_CONFIG", "Lexer", "init_lexer_public", "__esmMin", "init_lexer", "init_lodash", "init_api", "init_tokens", "init_lexer_errors_public", "init_reg_exp_parser", "defaultLexerErrorProvider", "__name", "lexerDefinition", "config", "phaseDesc", "phaseImpl", "indent", "time", "value", "timer", "traceMethod", "assign_default", "traceInitVal", "actualDefinition", "hasOnlySingleMode", "LineTerminatorOptimizedTester", "isArray_default", "clone_default", "DEFAULT_MODE", "performRuntimeChecks", "performWarningRuntimeChecks", "forEach_default", "currModeValue", "currModeName", "reject_default", "currTokType", "isUndefined_default", "allModeNames", "keys_default", "currModDef", "currModName", "validatePatterns", "isEmpty_default", "augmentTokenTypes", "currAnalyzeResult", "analyzeTokenTypes", "allErrMessagesString", "map_default", "error", "warningDescriptor", "PRINT_WARNING", "SUPPORT_STICKY", "identity_default", "noop_default", "unOptimizedModes", "reduce_default", "cannotBeOptimized", "canBeOptimized", "modeName", "clearRegExpParserCache", "toFastProperties", "text", "initialMode", "i", "j", "k", "matchAltImage", "longerAlt", "matchedImage", "payload", "altPayload", "imageLength", "group", "tokType", "newToken", "errLength", "droppedChar", "msg", "match", "orgText", "orgLength", "offset", "matchedTokensIndex", "guessedNumberOfTokens", "matchedTokens", "errors", "line", "column", "groups", "cloneEmptyGroups", "trackLines", "lineTerminatorPattern", "currModePatternsLength", "patternIdxToConfig", "currCharCodeToPatternIdxToConfig", "modeStack", "emptyArray", "getPossiblePatterns", "getPossiblePatternsSlow", "getPossiblePatternsOptimized", "charCode", "optimizedCharIdx", "charCodeToOptimizedIndex", "possiblePatterns", "pop_mode", "popToken", "newMode", "last_default", "modeCanBeOptimized", "push_mode", "currConfig", "recoveryEnabled", "nextCharCode", "chosenPatternIdxToConfig", "chosenPatternsLength", "currPattern", "singleCharCode", "longerAltLength", "longerAltConfig", "longerAltPattern", "numOfLTsInMatch", "foundTerminator", "lastLTEndOffset", "errorStartOffset", "errorLine", "errorColumn", "foundResyncPoint", "pushMode", "length", "regExp", "newLastIndex", "lastLTIdx", "lastCharIsLT", "fixForEndingInLT", "oldColumn", "image", "startOffset", "tokenTypeIdx", "tokenType", "startLine", "startColumn", "tokenVector", "index", "tokenToAdd", "token", "pattern", "regExpArray", "tokenLabel", "tokType", "hasTokenLabel", "obj", "isString_default", "createToken", "config", "createTokenInternal", "pattern", "tokenType", "isUndefined_default", "has_default", "PARENT", "CATEGORIES", "augmentTokenTypes", "LABEL", "GROUP", "POP_MODE", "PUSH_MODE", "LONGER_ALT", "LINE_BREAKS", "START_CHARS_HINT", "createTokenInstance", "image", "startOffset", "endOffset", "startLine", "endLine", "startColumn", "endColumn", "tokenMatcher", "token", "tokenStructuredMatcher", "EOF", "init_tokens_public", "__esmMin", "init_lodash", "init_lexer_public", "init_tokens", "__name", "Lexer", "defaultParserErrorProvider", "defaultGrammarResolverErrorProvider", "defaultGrammarValidatorErrorProvider", "init_errors_public", "__esmMin", "init_tokens_public", "init_lodash", "init_api", "expected", "actual", "previous", "ruleName", "hasTokenLabel", "tokenLabel", "firstRedundant", "expectedPathsPerAlt", "customUserDescription", "errPrefix", "errSuffix", "head_default", "allLookAheadPaths", "reduce_default", "result", "currAltPaths", "nextValidTokenSequences", "map_default", "currPath", "currTokenType", "calculatedDescription", "itemMsg", "idx", "expectedIterationPaths", "topLevelRule", "undefinedRule", "duplicateProds", "getExtraProductionArgument", "prod", "Terminal", "NonTerminal", "__name", "topLevelName", "duplicateProd", "index", "dslName", "getProductionDslName", "extraArgument", "hasExplicitIndex", "msg", "rule", "options", "pathMsg", "currTok", "occurrence", "currtok", "currMessage", "pathNames", "currRule", "leftRecursivePath", "Rule", "resolveGrammar", "topLevels", "errMsgProvider", "refResolver", "GastRefResolverVisitor", "init_resolver", "__esmMin", "init_parser", "init_lodash", "init_api", "__name", "GAstVisitor", "nameToTopRule", "forEach_default", "values_default", "prod", "node", "ref", "msg", "ParserDefinitionErrorType", "possiblePathsFrom", "targetDef", "maxLength", "currPath", "clone_default", "result", "remainingPathWith", "nextDef", "drop_default", "__name", "getAlternativesForProd", "definition", "alternatives", "prod", "Alternative", "NonTerminal", "Option", "RepetitionMandatory", "newDef", "Repetition", "RepetitionMandatoryWithSeparator", "Terminal", "RepetitionWithSeparator", "Alternation", "forEach_default", "currAlt", "isEmpty_default", "nextPossibleTokensAfter", "initialDef", "tokenVector", "tokMatcher", "maxLookAhead", "EXIT_NON_TERMINAL", "EXIT_NON_TERMINAL_ARR", "EXIT_ALTERNATIVE", "foundCompletePath", "tokenVectorLength", "minimalAlternativesIndex", "possiblePaths", "last_default", "currDef", "currIdx", "currRuleStack", "currOccurrenceStack", "nextPath", "dropRight_default", "nextIdx", "actualToken", "newRuleStack", "newOccurrenceStack", "nextPathWithout", "nextPathWith", "secondIteration", "separatorGast", "nthRepetition", "i", "currAltPath", "Rule", "expandTopLevelRule", "topRule", "newCurrOccurrenceStack", "AbstractNextPossibleTokensWalker", "NextAfterTokenWalker", "AbstractNextTerminalAfterProductionWalker", "NextTerminalAfterManyWalker", "NextTerminalAfterManySepWalker", "NextTerminalAfterAtLeastOneWalker", "NextTerminalAfterAtLeastOneSepWalker", "init_interpreter", "__esmMin", "init_lodash", "init_first", "init_rest", "init_api", "RestWalker", "topProd", "path", "prevRest", "refProd", "currRest", "fullRest", "terminal", "restProd", "first", "occurrence", "manyProd", "firstAfterMany", "head_default", "manySepProd", "firstAfterManySep", "atLeastOneProd", "firstAfterAtLeastOne", "atleastOneSepProd", "firstAfterfirstAfterAtLeastOneSep", "getProdType", "prod", "Option", "PROD_TYPE", "Repetition", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Alternation", "getLookaheadPaths", "options", "occurrence", "rule", "prodType", "maxLookahead", "type", "getLookaheadPathsForOr", "getLookaheadPathsForOptionalProd", "buildLookaheadFuncForOr", "ruleGrammar", "hasPredicates", "dynamicTokensEnabled", "laFuncBuilder", "lookAheadPaths", "tokenMatcher", "areTokenCategoriesNotUsed", "tokenStructuredMatcherNoCategories", "tokenStructuredMatcher", "buildLookaheadFuncForOptionalProd", "k", "lookaheadBuilder", "buildAlternativesLookAheadFunc", "alts", "numOfAlts", "areAllOneTokenLookahead", "every_default", "currAlt", "currPath", "orAlts", "predicates", "map_default", "t", "currNumOfPaths", "currPredicate", "nextPath", "j", "currPathLength", "i", "nextToken", "singleTokenAlts", "flatten_default", "choiceToAlt", "reduce_default", "result", "idx", "forEach_default", "currTokType", "has_default", "currExtendingType", "buildSingleAlternativeLookaheadFunction", "alt", "numOfPaths", "singleTokensTypes", "isEmpty_default", "expectedTokenUniqueKey", "initializeArrayOfArrays", "size", "pathToHashKeys", "path", "keys", "tokType", "longerKeys", "currShorterKey", "categoriesKeySuffix", "isUniquePrefixHash", "altKnownPathsKeys", "searchPathKeys", "currAltIdx", "otherAltKnownPathsKeys", "searchIdx", "searchKey", "lookAheadSequenceFromAlternatives", "altsDefs", "partialAlts", "possiblePathsFrom", "finalResult", "altsHashes", "currAltPaths", "dict", "item", "currKey", "newData", "pathLength", "currDataset", "altIdx", "currAltPathsAndSuffixes", "currPathIdx", "currPathPrefix", "suffixDef", "prefixKeys", "currAltResult", "containsPath", "newPartialPathsAndSuffixes", "key", "orProd", "visitor", "InsideDefinitionFinderVisitor", "insideDefVisitor", "insideDef", "afterDef", "RestDefinitionFinderWalker", "insideFlat", "Alternative", "afterFlat", "alternative", "searchPath", "compareOtherPath", "otherPath", "searchTok", "otherTok", "isStrictPrefixOfPath", "prefix", "other", "otherTokType", "singleAltPaths", "singlePath", "token", "init_lookahead", "__esmMin", "init_lodash", "init_interpreter", "init_rest", "init_tokens", "init_api", "__name", "RestWalker", "topProd", "targetOccurrence", "targetProdType", "node", "expectedProdType", "currRest", "prevRest", "optionProd", "atLeastOneProd", "atLeastOneSepProd", "manyProd", "manySepProd", "GAstVisitor", "targetRef", "expectedProdName", "validateLookahead", "options", "lookaheadValidationErrorMessages", "map_default", "errorMessage", "ParserDefinitionErrorType", "validateGrammar", "topLevels", "tokenTypes", "errMsgProvider", "grammarName", "duplicateErrors", "flatMap_default", "currTopLevel", "validateDuplicateProductions", "termsNamespaceConflictErrors", "checkTerminalAndNoneTerminalsNameSpace", "tooManyAltsErrors", "curRule", "validateTooManyAlts", "duplicateRulesError", "validateRuleDoesNotAlreadyExist", "topLevelRule", "collectorVisitor", "OccurrenceValidationCollector", "allRuleProductions", "productionGroups", "groupBy_default", "identifyProductionForDuplicates", "duplicates", "pickBy_default", "currGroup", "values_default", "currDuplicates", "firstProd", "head_default", "msg", "dslName", "getProductionDslName", "defError", "param", "getExtraProductionArgument", "prod", "Terminal", "NonTerminal", "rule", "allRules", "className", "errors", "reduce_default", "result", "errMsg", "validateRuleIsOverridden", "ruleName", "definedRulesNames", "includes_default", "validateNoLeftRecursion", "topRule", "currRule", "path", "nextNonTerminals", "getFirstNoneTerminal", "isEmpty_default", "validNextSteps", "difference_default", "errorsFromNextSteps", "currRefRule", "newPath", "clone_default", "definition", "Alternative", "Option", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Repetition", "Alternation", "flatten_default", "currSubDef", "isFirstOptional", "isOptionalProd", "hasMore", "rest", "drop_default", "validateEmptyOrAlternative", "orCollector", "OrCollector", "ors", "currOr", "exceptLast", "dropRight_default", "currAlternative", "currAltIdx", "possibleFirstInAlt", "nextPossibleTokensAfter", "tokenStructuredMatcher", "validateAmbiguousAlternationAlternatives", "globalMaxLookahead", "reject_default", "currOccurrence", "actualMaxLookahead", "alternatives", "getLookaheadPathsForOr", "altsAmbiguityErrors", "checkAlternativesAmbiguities", "altsPrefixAmbiguityErrors", "checkPrefixAlternativesAmbiguities", "validateSomeNonEmptyLookaheadPath", "topLevelRules", "maxLookahead", "forEach_default", "currTopRule", "RepetitionCollector", "currProd", "prodType", "getProdType", "pathsInsideProduction", "getLookaheadPathsForOptionalProd", "alternation", "foundAmbiguousPaths", "identicalAmbiguities", "currAlt", "currPath", "altsCurrPathAppearsIn", "currOtherAlt", "currOtherAltIdx", "containsPath", "currAmbDescriptor", "ambgIndices", "pathsAndIndices", "idx", "currPathsAndIdx", "compact_default", "currPathAndIdx", "targetIdx", "targetPath", "prefixAmbiguitiesPathsAndIndices", "filter_default", "searchPathAndIdx", "isStrictPrefixOfPath", "currAmbPathAndIdx", "occurrence", "tokenNames", "currToken", "currRuleName", "init_checks", "__esmMin", "init_lodash", "init_parser", "init_api", "init_lookahead", "init_interpreter", "init_tokens", "__name", "GAstVisitor", "subrule", "option", "manySep", "atLeastOne", "atLeastOneSep", "many", "or", "terminal", "node", "resolveGrammar", "options", "actualOptions", "defaults_default", "defaultGrammarResolverErrorProvider", "topRulesTable", "forEach_default", "rule", "validateGrammar", "defaultGrammarValidatorErrorProvider", "init_gast_resolver_public", "__esmMin", "init_lodash", "init_resolver", "init_checks", "init_errors_public", "__name", "isRecognitionException", "error", "includes_default", "RECOGNITION_EXCEPTION_NAMES", "MISMATCHED_TOKEN_EXCEPTION", "NO_VIABLE_ALT_EXCEPTION", "EARLY_EXIT_EXCEPTION", "NOT_ALL_INPUT_PARSED_EXCEPTION", "RecognitionException", "MismatchedTokenException", "NoViableAltException", "NotAllInputParsedException", "EarlyExitException", "init_exceptions_public", "__esmMin", "init_lodash", "__name", "message", "token", "previousToken", "attemptInRepetitionRecovery", "prodFunc", "args", "lookaheadFunc", "dslMethodIdx", "prodOccurrence", "nextToksWalker", "notStuck", "key", "firstAfterRepInfo", "currRuleName", "ruleGrammar", "expectTokAfterLastMatch", "nextTokIdx", "isEndOfRule", "EOF", "EOF_FOLLOW_KEY", "IN_RULE_RECOVERY_EXCEPTION", "InRuleRecoveryException", "Recoverable", "init_recoverable", "__esmMin", "init_tokens_public", "init_lodash", "init_exceptions_public", "init_constants", "init_parser", "__name", "message", "config", "has_default", "DEFAULT_PARSER_CONFIG", "tokType", "tokToInsert", "createTokenInstance", "grammarRule", "grammarRuleArgs", "lookAheadFunc", "expectedTokType", "reSyncTokType", "savedLexerState", "resyncedTokens", "passedResyncPoint", "nextTokenWithoutResync", "currToken", "generateErrorMessage", "previousToken", "msg", "error", "MismatchedTokenException", "dropRight_default", "tokIdxInRule", "grammarPath", "follows", "nextTok", "expectedToken", "isEmpty_default", "mismatchedTok", "find_default", "possibleFollowsTokType", "tokenTypeIdx", "followKey", "currentRuleReSyncSet", "includes_default", "allPossibleReSyncTokTypes", "nextToken", "k", "foundMatch", "resyncTokType", "tokenMatcher", "currRuleShortName", "currRuleIdx", "prevRuleShortName", "explicitRuleStack", "explicitOccurrenceStack", "map_default", "ruleName", "idx", "followStack", "currKey", "flatten_default", "followName", "IN", "token", "resyncTokens", "pathRuleStack", "pathOccurrenceStack", "clone_default", "currShortName", "getKeyForAutomaticLookahead", "ruleIdx", "dslMethodIdx", "occurrence", "init_keys", "__esmMin", "__name", "LLkLookaheadStrategy", "init_llk_lookahead", "__esmMin", "init_lodash", "init_errors_public", "init_parser", "init_checks", "init_lookahead", "__name", "options", "_a", "DEFAULT_PARSER_CONFIG", "leftRecursionErrors", "isEmpty_default", "emptyAltErrors", "ambiguousAltsErrors", "emptyRepetitionErrors", "rules", "flatMap_default", "currTopRule", "validateNoLeftRecursion", "defaultGrammarValidatorErrorProvider", "validateEmptyOrAlternative", "maxLookahead", "validateAmbiguousAlternationAlternatives", "validateSomeNonEmptyLookaheadPath", "buildLookaheadFuncForOr", "buildAlternativesLookAheadFunc", "buildLookaheadFuncForOptionalProd", "getProdType", "buildSingleAlternativeLookaheadFunction", "collectMethods", "rule", "collectorVisitor", "dslMethods", "LooksAhead", "DslMethodsCollectorVisitor", "init_looksahead", "__esmMin", "init_lodash", "init_parser", "init_keys", "init_api", "init_llk_lookahead", "__name", "config", "has_default", "DEFAULT_PARSER_CONFIG", "LLkLookaheadStrategy", "rules", "forEach_default", "currRule", "alternation", "repetition", "option", "repetitionMandatory", "repetitionMandatoryWithSeparator", "repetitionWithSeparator", "currProd", "prodIdx", "getProductionDslName", "laFunc", "key", "getKeyForAutomaticLookahead", "prodOccurrence", "prodKey", "prodType", "prodMaxLookahead", "dslMethodName", "dslMethodIdx", "occurrence", "currRuleShortName", "value", "GAstVisitor", "manySep", "atLeastOne", "atLeastOneSep", "many", "or", "setNodeLocationOnlyOffset", "currNodeLocation", "newLocationInfo", "setNodeLocationFull", "addTerminalToCst", "node", "token", "tokenTypeName", "addNoneTerminalToCst", "ruleName", "ruleResult", "init_cst", "__esmMin", "__name", "defineNameProp", "obj", "nameValue", "NAME", "init_lang_extensions", "__esmMin", "__name", "defaultVisit", "ctx", "param", "childrenNames", "keys_default", "childrenNamesLength", "currChildName", "currChildArray", "currChildArrayLength", "j", "currChild", "createBaseSemanticVisitorConstructor", "grammarName", "ruleNames", "derivedConstructor", "__name", "defineNameProp", "semanticProto", "cstNode", "isArray_default", "isUndefined_default", "semanticDefinitionErrors", "validateVisitor", "isEmpty_default", "errorMessages", "map_default", "currDefError", "createBaseVisitorConstructorWithDefaults", "baseConstructor", "withDefaultsProto", "forEach_default", "ruleName", "visitorInstance", "validateMissingCstMethods", "missingRuleNames", "filter_default", "currRuleName", "isFunction_default", "errors", "CstVisitorDefinitionError", "compact_default", "init_cst_visitor", "__esmMin", "init_lodash", "init_lang_extensions", "TreeBuilder", "init_tree_builder", "__esmMin", "init_cst", "init_lodash", "init_cst_visitor", "init_parser", "__name", "config", "has_default", "DEFAULT_PARSER_CONFIG", "noop_default", "setNodeLocationFull", "setNodeLocationOnlyOffset", "cstNode", "nextToken", "fullRuleName", "ruleCstNode", "prevToken", "loc", "key", "consumedToken", "rootCst", "addTerminalToCst", "ruleCstResult", "ruleName", "preCstNode", "addNoneTerminalToCst", "isUndefined_default", "newBaseCstVisitorConstructor", "createBaseSemanticVisitorConstructor", "keys_default", "newConstructor", "createBaseVisitorConstructorWithDefaults", "ruleStack", "occurrenceStack", "LexerAdapter", "init_lexer_adapter", "__esmMin", "init_parser", "__name", "newInput", "END_OF_FILE", "howMuch", "soughtIdx", "newState", "RecognizerApi", "init_recognizer_api", "__esmMin", "init_lodash", "init_exceptions_public", "init_parser", "init_errors_public", "init_checks", "init_api", "__name", "impl", "idx", "tokType", "options", "ruleToCall", "actionORMethodDef", "altsOrOpts", "name", "implementation", "config", "DEFAULT_RULE_CONFIG", "includes_default", "error", "defaultGrammarValidatorErrorProvider", "ParserDefinitionErrorType", "ruleImplementation", "ruleErrors", "validateRuleIsOverridden", "grammarRule", "args", "orgState", "e", "isRecognitionException", "serializeGrammar", "values_default", "RecognizerEngine", "init_recognizer_engine", "__esmMin", "init_lodash", "init_keys", "init_exceptions_public", "init_lookahead", "init_interpreter", "init_parser", "init_recoverable", "init_tokens_public", "init_tokens", "__name", "tokenVocabulary", "config", "tokenStructuredMatcherNoCategories", "has_default", "isArray_default", "isEmpty_default", "reduce_default", "acc", "tokType", "every_default", "flatten_default", "values_default", "isTokenType", "allTokenTypes", "uniqueTokens", "uniq_default", "isObject_default", "clone_default", "EOF", "noTokenCategoriesUsed", "tokenConstructor", "tokenStructuredMatcher", "augmentTokenTypes", "ruleName", "impl", "resyncEnabled", "DEFAULT_RULE_CONFIG", "recoveryValueFunc", "shortName", "invokeRuleWithTry", "args", "cst", "e", "resyncEnabledConfig", "isFirstInvokedRule", "reSyncEnabled", "isRecognitionException", "recogError", "reSyncTokType", "partialCstResult", "actionORMethodDef", "occurrence", "key", "lookAheadFunc", "action", "predicate", "orgLookaheadFunction", "prodOccurrence", "laKey", "notStuck", "PROD_TYPE", "NextTerminalAfterAtLeastOneWalker", "options", "separator", "separatorLookAheadFunc", "NextTerminalAfterAtLeastOneSepWalker", "lookaheadFunction", "NextTerminalAfterManyWalker", "NextTerminalAfterManySepWalker", "nextTerminalAfterWalker", "beforeIteration", "altsOrOpts", "alts", "altIdxToTake", "firstRedundantTok", "errMsg", "NotAllInputParsedException", "ruleToCall", "idx", "ruleResult", "consumedToken", "nextToken", "eFromConsumption", "msg", "previousToken", "MismatchedTokenException", "follows", "eFromInRuleRecovery", "IN_RULE_RECOVERY_EXCEPTION", "savedErrors", "savedRuleStack", "newState", "fullName", "idxInCallingRule", "ErrorHandler", "init_error_handler", "__esmMin", "init_exceptions_public", "init_lodash", "init_lookahead", "init_parser", "__name", "config", "has_default", "DEFAULT_PARSER_CONFIG", "error", "isRecognitionException", "clone_default", "newErrors", "occurrence", "prodType", "userDefinedErrMsg", "ruleName", "ruleGrammar", "insideProdPaths", "getLookaheadPathsForOptionalProd", "actualTokens", "i", "msg", "EarlyExitException", "errMsgTypes", "lookAheadPathsPerAlternative", "getLookaheadPathsForOr", "previousToken", "errMsg", "NoViableAltException", "ContentAssist", "init_context_assist", "__esmMin", "init_interpreter", "init_lodash", "__name", "startRuleName", "precedingInput", "startRuleGast", "isUndefined_default", "nextPossibleTokensAfter", "grammarPath", "topRuleName", "head_default", "topProduction", "NextAfterTokenWalker", "recordProd", "prodConstructor", "mainProdArg", "occurrence", "handleSep", "assertMethodIdxIsValid", "prevProd", "last_default", "grammarAction", "isFunction_default", "newProd", "has_default", "RECORDING_NULL_OBJECT", "recordOrProd", "hasOptions", "isArray_default", "alts", "newOrProd", "Alternation", "hasPredicates", "some_default", "currAlt", "forEach_default", "currAltFlat", "Alternative", "getIdxSuffix", "idx", "MAX_METHOD_IDX", "error", "HANDLE_SEPARATOR", "RFT", "RECORDING_PHASE_TOKEN", "RECORDING_PHASE_CSTNODE", "GastRecorder", "init_gast_recorder", "__esmMin", "init_lodash", "init_api", "init_lexer_public", "init_tokens", "init_tokens_public", "init_parser", "init_keys", "createToken", "Lexer", "augmentTokenTypes", "createTokenInstance", "__name", "config", "i", "arg1", "arg2", "that", "impl", "grammarRule", "args", "howMuch", "END_OF_FILE", "name", "def", "newTopLevelRule", "Rule", "originalError", "actionORMethodDef", "Option", "RepetitionMandatory", "options", "RepetitionMandatoryWithSeparator", "Repetition", "RepetitionWithSeparator", "altsOrOpts", "ruleToCall", "ruleName", "newNoneTerminal", "NonTerminal", "tokType", "hasShortKeyProperty", "Terminal", "PerformanceTracer", "init_perf_tracer", "__esmMin", "init_lodash", "init_api", "init_parser", "__name", "config", "has_default", "userTraceInitPerf", "traceIsNumber", "DEFAULT_PARSER_CONFIG", "phaseDesc", "phaseImpl", "indent", "time", "value", "timer", "traceMethod", "applyMixins", "derivedCtor", "baseCtors", "baseCtor", "baseProto", "propName", "basePropDescriptor", "init_apply_mixins", "__esmMin", "__name", "EMPTY_ALT", "value", "END_OF_FILE", "DEFAULT_PARSER_CONFIG", "DEFAULT_RULE_CONFIG", "ParserDefinitionErrorType", "Parser", "EmbeddedActionsParser", "init_parser", "__esmMin", "init_lodash", "init_api", "init_follow", "init_tokens_public", "init_errors_public", "init_gast_resolver_public", "init_recoverable", "init_looksahead", "init_tree_builder", "init_lexer_adapter", "init_recognizer_api", "init_recognizer_engine", "init_error_handler", "init_context_assist", "init_gast_recorder", "init_perf_tracer", "init_apply_mixins", "init_checks", "createTokenInstance", "EOF", "defaultParserErrorProvider", "__name", "_Parser", "parserInstance", "defErrorsMsgs", "className", "toFastProperties", "forEach_default", "currRuleName", "originalGrammarAction", "recordedRuleGast", "resolverErrors", "resolveGrammar", "values_default", "isEmpty_default", "validationErrors", "validateGrammar", "defaultGrammarValidatorErrorProvider", "lookaheadValidationErrors", "validateLookahead", "allFollows", "computeAllProdsFollows", "_b", "_a", "map_default", "defError", "tokenVocabulary", "config", "that", "has_default", "applyMixins", "Recoverable", "LooksAhead", "TreeBuilder", "LexerAdapter", "RecognizerEngine", "RecognizerApi", "ErrorHandler", "ContentAssist", "GastRecorder", "PerformanceTracer", "configClone", "clone_default", "init_model", "__esmMin", "init_api", "init_generate", "__esmMin", "init_api", "__esmMin", "init_model", "init_generate", "init_render_public", "__esmMin", "init_version", "init_api", "__esmMin", "init_version", "init_parser", "init_lexer_public", "init_tokens_public", "init_lookahead", "init_llk_lookahead", "init_errors_public", "init_exceptions_public", "init_lexer_errors_public", "init_render_public", "buildATNKey", "rule", "type", "occurrence", "createATN", "rules", "atn", "createRuleStartAndStopATNStates", "ruleLength", "i", "ruleBlock", "block", "buildRuleHandle", "start", "newState", "ATN_RULE_START", "stop", "ATN_RULE_STOP", "atom", "production", "Terminal", "tokenRef", "NonTerminal", "ruleRef", "Alternation", "alternation", "Option", "option", "Repetition", "repetition", "RepetitionWithSeparator", "repetitionSep", "RepetitionMandatory", "repetitionMandatory", "RepetitionMandatoryWithSeparator", "repetitionMandatorySep", "starState", "ATN_STAR_BLOCK_START", "defineDecisionState", "handle", "makeAlts", "star", "sep", "plusState", "ATN_PLUS_BLOCK_START", "plus", "ATN_BASIC", "alts", "map_default", "e", "optional", "handles", "filter_default", "makeBlock", "blkStart", "blkEnd", "loop", "ATN_PLUS_LOOP_BACK", "end", "ATN_LOOP_END", "epsilon", "entry", "ATN_STAR_LOOP_ENTRY", "loopEnd", "ATN_STAR_LOOP_BACK", "state", "ATN_BLOCK_END", "alt", "getProdType", "altsLength", "transition", "isRuleTransition", "RuleTransition", "ruleTransition", "next", "removeState", "first", "last", "tokenType", "left", "right", "addTransition", "AtomTransition", "currentRule", "nonTerminal", "call", "a", "b", "EpsilonTransition", "partial", "t", "AbstractTransition", "init_atn", "__esmMin", "init_map", "init_filter", "init_api", "__name", "target", "ruleStart", "followState", "getATNConfigKey", "config", "alt", "e", "DFA_ERROR", "ATNConfigSet", "init_dfa", "__esmMin", "init_map", "__name", "key", "map_default", "value", "k", "createDFACache", "startState", "decision", "map", "predicateSet", "key", "existing", "isLL1Sequence", "sequences", "allowEmpty", "fullSet", "alt", "altSet", "tokType", "indices", "index", "initATNSimulator", "atn", "decisionLength", "decisionToDFA", "i", "adaptivePredict", "dfaCaches", "logging", "dfa", "start", "closure", "computeStartState", "addDFAState", "newDFAState", "performLookahead", "s0", "previousD", "path", "t", "d", "getExistingTargetState", "computeLookaheadTarget", "DFA_ERROR", "buildAdaptivePredictError", "token", "lookahead", "reach", "computeReachSet", "addDFAEdge", "newState", "predictedAlt", "getUniqueAlt", "hasConflictTerminatingPrediction", "prediction", "min_default", "reportLookaheadAmbiguity", "ambiguityIndices", "prefixPath", "atnState", "topLevelRule", "production", "message", "buildAmbiguityError", "options", "pathMsg", "map_default", "currtok", "tokenLabel", "occurrence", "currMessage", "getProductionDslName", "prod", "NonTerminal", "Option", "Alternation", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Repetition", "Terminal", "previous", "current", "nextTransitions", "flatMap_default", "e", "nextTokenTypes", "uniqBy_default", "AtomTransition", "state", "configs", "intermediate", "ATNConfigSet", "skippedStopStates", "c", "ATN_RULE_STOP", "transitionLength", "transition", "target", "getReachableTarget", "hasConfigInRuleStopState", "tokenMatcher", "from", "to", "mapKey", "numberOfTransitions", "config", "p", "atnStack", "followConfig", "getEpsilonTarget", "EpsilonTransition", "RuleTransition", "stack", "allConfigsInRuleStopStates", "altSets", "getConflictingAltSets", "hasConflictingAltSet", "hasStateAssociatedWithOneAlt", "configToAlts", "getATNConfigKey", "alts", "value", "PredicateSet", "EMPTY_PREDICATES", "LLStarLookaheadStrategy", "init_all_star_lookahead", "__esmMin", "init_api", "init_atn", "init_dfa", "init_min", "init_flatMap", "init_uniqBy", "init_map", "init_flatten", "init_forEach", "init_isEmpty", "init_reduce", "__name", "size", "LLkLookaheadStrategy", "_a", "createATN", "prodOccurrence", "rule", "hasPredicates", "dynamicTokensEnabled", "dfas", "buildATNKey", "decisionIndex", "partialAlts", "getLookaheadPaths", "currAlt", "choiceToAlt", "reduce_default", "result", "idx", "forEach_default", "currTokType", "currExtendingType", "orAlts", "nextToken", "gate", "predicates", "length", "prodType", "g", "singleTokensTypes", "flatten_default", "isEmpty_default", "expectedTokenUniqueKey", "init_lib", "__esmMin", "init_all_star_lookahead", "DocumentUri", "URI", "integer", "uinteger", "Position", "Range", "Location", "LocationLink", "Color", "ColorInformation", "ColorPresentation", "FoldingRangeKind", "FoldingRange", "DiagnosticRelatedInformation", "DiagnosticSeverity", "DiagnosticTag", "CodeDescription", "Diagnostic", "Command", "TextEdit", "ChangeAnnotation", "ChangeAnnotationIdentifier", "AnnotatedTextEdit", "TextDocumentEdit", "CreateFile", "RenameFile", "DeleteFile", "WorkspaceEdit", "TextDocumentIdentifier", "VersionedTextDocumentIdentifier", "OptionalVersionedTextDocumentIdentifier", "TextDocumentItem", "MarkupKind", "MarkupContent", "CompletionItemKind", "InsertTextFormat", "CompletionItemTag", "InsertReplaceEdit", "InsertTextMode", "CompletionItemLabelDetails", "CompletionItem", "CompletionList", "MarkedString", "Hover", "ParameterInformation", "SignatureInformation", "DocumentHighlightKind", "DocumentHighlight", "SymbolKind", "SymbolTag", "SymbolInformation", "WorkspaceSymbol", "DocumentSymbol", "CodeActionKind", "CodeActionTriggerKind", "CodeActionContext", "CodeAction", "CodeLens", "FormattingOptions", "DocumentLink", "SelectionRange", "SemanticTokenTypes", "SemanticTokenModifiers", "SemanticTokens", "InlineValueText", "InlineValueVariableLookup", "InlineValueEvaluatableExpression", "InlineValueContext", "InlayHintKind", "InlayHintLabelPart", "InlayHint", "StringValue", "InlineCompletionItem", "InlineCompletionList", "InlineCompletionTriggerKind", "SelectedCompletionInfo", "InlineCompletionContext", "WorkspaceFolder", "TextDocument", "FullTextDocument", "Is", "init_main", "__esmMin", "is", "value", "__name", "create", "line", "character", "candidate", "one", "two", "three", "four", "uri", "range", "targetUri", "targetRange", "targetSelectionRange", "originSelectionRange", "red", "green", "blue", "alpha", "color", "label", "textEdit", "additionalTextEdits", "startLine", "endLine", "startCharacter", "endCharacter", "kind", "collapsedText", "result", "location", "message", "severity", "code", "source", "relatedInformation", "_a", "title", "command", "args", "replace", "newText", "insert", "position", "del", "needsConfirmation", "description", "annotation", "textDocument", "edits", "options", "oldUri", "newUri", "change", "version", "languageId", "text", "items", "isIncomplete", "fromPlainText", "plainText", "documentation", "parameters", "name", "containerName", "detail", "selectionRange", "children", "diagnostics", "only", "triggerKind", "kindOrCommandOrEdit", "checkKind", "data", "tabSize", "insertSpaces", "target", "parent", "variableName", "caseSensitiveLookup", "expression", "frameId", "stoppedLocation", "createSnippet", "insertText", "filterText", "selectedCompletionInfo", "content", "applyEdits", "document", "sortedEdits", "mergeSort", "a", "b", "diff", "lastModifiedOffset", "i", "e", "startOffset", "endOffset", "compare", "p", "left", "right", "leftIdx", "rightIdx", "start", "end", "event", "lineOffsets", "isLineStart", "ch", "offset", "low", "high", "mid", "lineOffset", "nextLineOffset", "toString", "defined", "undefined", "boolean", "string", "number", "numberRange", "min", "max", "func", "objectLiteral", "typedArray", "check", "CstNodeBuilder", "AbstractCstNode", "LeafCstNodeImpl", "CompositeCstNodeImpl", "CstNodeContainer", "RootCstNodeImpl", "init_cst_node_builder", "__esmMin", "init_main", "init_syntax_tree", "init_cst_utils", "__name", "input", "feature", "compositeNode", "token", "leafNode", "tokenToRange", "node", "parent", "index", "item", "current", "hiddenTokens", "hiddenNode", "tokenStart", "tokenEnd", "i", "child", "childStart", "childEnd", "isCompositeCstNode", "_a", "_b", "value", "offset", "length", "range", "tokenType", "hidden", "firstNode", "lastNode", "firstRange", "lastRange", "Position", "_CstNodeContainer", "items", "start", "count", "isDataTypeNode", "node", "DatatypeSymbol", "ruleSuffix", "withRuleSuffix", "AbstractLangiumParser", "LangiumParser", "AbstractParserErrorMessageProvider", "LangiumParserErrorMessageProvider", "LangiumCompletionParser", "defaultConfig", "ChevrotainWrapper", "init_langium_parser", "__esmMin", "init_api", "init_lib", "init_ast", "init_grammar_utils", "init_ast_utils", "init_cst_node_builder", "__name", "name", "services", "tokens", "idx", "choices", "callback", "CstNodeBuilder", "rule", "impl", "type", "isDataTypeRule", "getTypeName", "ruleMethod", "input", "lexerResult", "result", "$type", "implementation", "args", "tokenType", "feature", "token", "leafNode", "assignment", "isCrossRef", "current", "convertedValue", "isKeyword", "text", "cstNode", "subruleResult", "resultKind", "object", "newItem", "action", "last", "pop", "obj", "linkContentToContainer", "assignMandatoryProperties", "getContainerOfType", "isAssignment", "isCrossReference", "operator", "value", "item", "target", "source", "existingValue", "newValue", "options", "defaultParserErrorProvider", "expected", "actual", "firstRedundant", "size", "element", "index", "EmbeddedActionsParser", "config", "useDefaultLookahead", "LLkLookaheadStrategy", "LLStarLookaheadStrategy", "createParser", "grammar", "parser", "tokens", "buildRules", "parserContext", "reachable", "getAllReachableRules", "parserRules", "stream", "isParserRule", "rule", "ctx", "buildElement", "element", "ignoreGuard", "method", "isKeyword", "buildKeyword", "isAction", "buildAction", "isAssignment", "isCrossReference", "buildCrossReference", "isRuleCall", "buildRuleCall", "isAlternatives", "buildAlternatives", "isUnorderedGroup", "buildUnorderedGroup", "isGroup", "buildGroup", "isEndOfFile", "idx", "__name", "EOF", "ErrorWithLocation", "wrap", "getGuardCondition", "action", "actionType", "getTypeName", "ruleCall", "predicate", "buildRuleCallPredicate", "args", "getRule", "isTerminalRule", "getToken", "assertUnreachable", "namedArgs", "predicates", "e", "buildPredicate", "ruleArgs", "i", "ruleTarget", "condition", "isDisjunction", "left", "right", "isConjunction", "isNegation", "value", "isParameterReference", "name", "isBooleanLiteral", "alternatives", "methods", "predicatedMethod", "guard", "alt", "gate", "group", "orIdx", "idFunc", "groupIdx", "lParser", "stackId", "key", "groupState", "trackedAlternatives", "wrapped", "crossRef", "terminal", "terminalRule", "keyword", "assignment", "findNameAssignment", "assignTerminal", "token", "cardinality", "EMPTY_ALT", "getRuleName", "item", "parent", "ruleName", "init_parser_builder_base", "__esmMin", "init_api", "init_ast", "init_errors", "init_stream", "init_grammar_utils", "createCompletionParser", "services", "grammar", "lexer", "parser", "LangiumCompletionParser", "createParser", "init_completion_parser_builder", "__esmMin", "init_langium_parser", "init_parser_builder_base", "__name", "createLangiumParser", "services", "parser", "prepareLangiumParser", "grammar", "lexer", "LangiumParser", "createParser", "init_langium_parser_builder", "__esmMin", "init_langium_parser", "init_parser_builder_base", "__name", "DefaultTokenBuilder", "init_token_builder", "__esmMin", "init_api", "init_ast", "init_ast_utils", "init_grammar_utils", "init_regexp_utils", "init_stream", "__name", "grammar", "options", "reachableRules", "stream", "getAllReachableRules", "terminalTokens", "tokens", "terminalToken", "pattern", "isWhitespace", "rules", "isTerminalRule", "e", "terminal", "regex", "terminalRegex", "tokenType", "Lexer", "stickyRegex", "text", "offset", "isParserRule", "rule", "streamAllContents", "isKeyword", "a", "b", "keyword", "caseInsensitive", "getCaseInsensitivePattern", "longerAlts", "token", "partialMatches", "DefaultValueConverter", "ValueConverter", "init_value_converter", "__esmMin", "init_ast", "init_grammar_utils", "__name", "input", "cstNode", "feature", "isCrossReference", "getCrossReferenceTerminal", "isRuleCall", "rule", "_a", "getRuleType", "convertString", "result", "i", "c", "c1", "convertEscapeCharacter", "char", "convertID", "convertInt", "convertBigint", "convertDate", "convertNumber", "convertBoolean", "require_ral", "__commonJSMin", "exports", "_ral", "RAL", "__name", "install", "ral", "require_is", "__commonJSMin", "exports", "boolean", "value", "__name", "string", "number", "error", "func", "array", "stringArray", "elem", "require_events", "__commonJSMin", "exports", "ral_1", "Event", "_disposable", "CallbackList", "__name", "callback", "context", "bucket", "foundCallbackWithDifferentContext", "len", "args", "ret", "callbacks", "contexts", "i", "e", "Emitter", "_Emitter", "_options", "listener", "thisArgs", "disposables", "result", "event", "require_cancellation", "__commonJSMin", "exports", "ral_1", "Is", "events_1", "CancellationToken", "is", "value", "candidate", "__name", "shortcutEvent", "callback", "context", "handle", "MutableToken", "CancellationTokenSource", "cancellation_exports", "init_cancellation", "__esmMin", "__reExport", "delayNextTick", "resolve", "startCancelableOperation", "lastTick", "setInterruptionPeriod", "period", "globalInterruptionPeriod", "isOperationCancelled", "err", "OperationCancelled", "interruptAndCheck", "token", "current", "Deferred", "init_promise_utils", "__esmMin", "init_cancellation", "__name", "reject", "arg", "mergeSort", "data", "compare", "p", "left", "right", "leftIdx", "rightIdx", "i", "computeLineOffsets", "text", "isAtLineStart", "textOffset", "result", "ch", "isEOL", "char", "getWellformedRange", "range", "start", "end", "getWellformedEdit", "textEdit", "FullTextDocument", "TextDocument", "init_main", "__esmMin", "_FullTextDocument", "__name", "uri", "languageId", "version", "content", "changes", "change", "startOffset", "endOffset", "startLine", "endLine", "lineOffsets", "addedLineOffsets", "len", "diff", "offset", "low", "high", "mid", "line", "position", "lineOffset", "nextLineOffset", "event", "candidate", "create", "update", "document", "applyEdits", "edits", "sortedEdits", "a", "b", "lastModifiedOffset", "spans", "e", "URI", "Utils", "assertPath", "path", "TypeError", "JSON", "stringify", "normalizeStringPosix", "allowAboveRoot", "code", "res", "lastSegmentLength", "lastSlash", "dots", "i", "length", "charCodeAt", "lastSlashIndex", "lastIndexOf", "slice", "posix", "resolve", "__name", "cwd", "resolvedPath", "resolvedAbsolute", "arguments", "process", "normalize", "isAbsolute", "trailingSeparator", "join", "joined", "arg", "relative", "from", "to", "fromStart", "fromEnd", "fromLen", "toStart", "toLen", "lastCommonSep", "fromCode", "out", "_makeLong", "dirname", "hasRoot", "end", "matchedSlash", "basename", "ext", "start", "extIdx", "firstNonSlashEnd", "extname", "startDot", "startPart", "preDotState", "format", "pathObject", "sep", "dir", "root", "base", "name", "parse", "ret", "delimiter", "win32", "module", "exports", "__webpack_module_cache__", "__webpack_require__", "moduleId", "cachedModule", "__webpack_modules__", "d", "definition", "key", "o", "Object", "defineProperty", "enumerable", "get", "obj", "prop", "prototype", "hasOwnProperty", "call", "r", "Symbol", "toStringTag", "value", "isWindows", "f", "P", "platform", "navigator", "userAgent", "indexOf", "_schemePattern", "_singleSlashStart", "_doubleSlashStart", "_validateUri", "_strict", "scheme", "Error", "authority", "query", "fragment", "test", "_empty", "_slash", "_regexp", "thing", "fsPath", "with", "toString", "schemeOrData", "this", "uriToFsPath", "change", "Uri", "match", "exec", "percentDecode", "replace", "idx", "substring", "components", "result", "skipEncoding", "_asFormatted", "toJSON", "data", "_formatted", "external", "_fsPath", "_sep", "_pathSepMarker", "$mid", "encodeTable", "encodeURIComponentFast", "uriComponent", "isPath", "isAuthority", "nativeEncodePos", "pos", "encodeURIComponent", "charAt", "substr", "escaped", "encodeURIComponentMinimal", "uri", "keepDriveLetterCasing", "toLowerCase", "encoder", "userinfo", "String", "fromCharCode", "decodeURIComponentGraceful", "str", "decodeURIComponent", "_rEncodedAsHex", "A", "posixPath", "slash", "t", "joinPath", "paths", "resolvePath", "slashAdded", "LIB", "UriUtils", "init_uri_utils", "__esmMin", "init_esm", "Utils", "equals", "a", "b", "__name", "relative", "from", "to", "fromPath", "toPath", "fromParts", "e", "toParts", "i", "backPart", "toPart", "DocumentState", "DefaultLangiumDocumentFactory", "DefaultLangiumDocuments", "init_documents", "__esmMin", "init_main", "init_cancellation", "init_stream", "init_uri_utils", "__name", "services", "uri", "cancellationToken", "content", "textDocument", "URI", "text", "model", "parseResult", "cancelToken", "document", "textDocumentGetter", "oldText", "_a", "_b", "serviceRegistry", "textDoc", "TextDocument", "stream", "uriString", "langiumDoc", "DefaultLinker", "init_linker", "__esmMin", "init_cancellation", "init_syntax_tree", "init_ast_utils", "init_promise_utils", "init_documents", "__name", "services", "document", "cancelToken", "node", "streamAst", "interruptAndCheck", "streamReferences", "ref", "refInfo", "description", "isLinkingError", "linkedNode", "err", "property", "refNode", "refText", "linker", "reference", "isAstNode", "isAstNodeDescription", "refData", "getDocument", "DocumentState", "_a", "nodeDescription", "doc", "targetDescription", "referenceType", "isNamed", "node", "DefaultNameProvider", "init_name_provider", "__esmMin", "init_grammar_utils", "__name", "findNodeForProperty", "DefaultReferences", "init_references", "__esmMin", "init_grammar_utils", "init_syntax_tree", "init_ast_utils", "init_cst_utils", "init_stream", "init_uri_utils", "__name", "services", "sourceCstNode", "assignment", "findAssignment", "nodeElem", "reference", "isReference", "ref", "nameNode", "isChildNode", "astNode", "targetNode", "options", "refs", "indexReferences", "UriUtils", "stream", "doc", "getDocument", "path", "toDocumentSegment", "MultiMap", "BiMap", "init_collections", "__esmMin", "init_stream", "__name", "elements", "key", "value", "Reduction", "stream", "a", "values", "index", "_a", "callbackfn", "array", "DefaultScopeComputation", "init_scope_computation", "__esmMin", "init_cancellation", "init_ast_utils", "init_collections", "init_promise_utils", "__name", "services", "document", "cancelToken", "parentNode", "children", "streamContents", "exports", "node", "interruptAndCheck", "name", "rootNode", "scopes", "MultiMap", "streamAllContents", "container", "StreamScope", "MapScope", "EMPTY_SCOPE", "init_scope", "__esmMin", "init_stream", "__name", "elements", "outerScope", "options", "_a", "name", "local", "e", "element", "localName", "elementStream", "stream", "EMPTY_STREAM", "DisposableCache", "SimpleCache", "ContextCache", "DocumentCache", "WorkspaceCache", "init_caching", "__esmMin", "__name", "disposable", "key", "value", "provider", "converter", "contextKey", "contextCache", "mapKey", "documentCache", "sharedServices", "uri", "changed", "deleted", "allUris", "DefaultScopeProvider", "init_scope_provider", "__esmMin", "init_scope", "init_ast_utils", "init_stream", "init_caching", "__name", "services", "WorkspaceCache", "context", "scopes", "referenceType", "precomputed", "getDocument", "currentNode", "allDescriptions", "stream", "desc", "result", "i", "elements", "outerScope", "options", "StreamScope", "s", "e", "name", "_context", "MapScope", "isAstNodeWithComment", "node", "isIntermediateReference", "obj", "DefaultJsonSerializer", "init_json_serializer", "__esmMin", "init_esm", "init_syntax_tree", "init_ast_utils", "init_grammar_utils", "__name", "services", "options", "specificReplacer", "defaultReplacer", "key", "value", "replacer", "getDocument", "content", "root", "refText", "sourceText", "textRegions", "comments", "uriConverter", "isReference", "refValue", "$refText", "targetDocument", "targetUri", "targetPath", "_b", "_a", "isAstNode", "astNode", "_c", "_d", "comment", "createDocumentSegment", "cstNode", "textRegion", "assignments", "propertyAssignments", "findNodesForProperty", "container", "containerProperty", "containerIndex", "propertyName", "item", "index", "element", "mutable", "property", "reference", "error", "ref", "uri", "fragmentIndex", "documentUri", "URI", "document", "err", "DefaultServiceRegistry", "init_service_registry", "__esmMin", "init_uri_utils", "__name", "language", "ext", "uri", "UriUtils", "services", "diagnosticData", "code", "ValidationCategory", "ValidationRegistry", "init_validation_registry", "__esmMin", "init_collections", "init_promise_utils", "init_stream", "__name", "services", "MultiMap", "checksRecord", "thisObj", "category", "type", "ch", "callbacks", "check", "entry", "node", "accept", "cancelToken", "err", "isOperationCancelled", "message", "subtype", "categories", "checks", "stream", "getDiagnosticRange", "info", "cstNode", "findNodeForProperty", "findNodeForKeyword", "toDiagnosticSeverity", "severity", "DefaultDocumentValidator", "DocumentValidator", "init_document_validator", "__esmMin", "init_cancellation", "init_grammar_utils", "init_ast_utils", "init_cst_utils", "init_promise_utils", "init_validation_registry", "__name", "services", "document", "options", "cancelToken", "parseResult", "diagnostics", "interruptAndCheck", "d", "_a", "err", "isOperationCancelled", "_options", "lexerError", "diagnostic", "diagnosticData", "parserError", "range", "token", "position", "tokenToRange", "reference", "linkingError", "rootNode", "validationItems", "acceptor", "message", "streamAst", "node", "checks", "check", "DefaultAstNodeDescriptionProvider", "DefaultReferenceDescriptionProvider", "init_ast_descriptions", "__esmMin", "init_cancellation", "init_syntax_tree", "init_ast_utils", "init_cst_utils", "init_promise_utils", "init_uri_utils", "__name", "services", "node", "name", "document", "getDocument", "path", "nameNodeSegment", "nameSegmentGetter", "_a", "toDocumentSegment", "cancelToken", "descr", "rootNode", "astNode", "streamAst", "interruptAndCheck", "streamReferences", "refInfo", "isLinkingError", "description", "targetNodeDescr", "refCstNode", "docUri", "UriUtils", "DefaultAstNodeLocator", "init_ast_node_locator", "__esmMin", "__name", "node", "containerPath", "newSegment", "$containerProperty", "$containerIndex", "path", "previousValue", "currentValue", "propertyIndex", "property", "arrayIndex", "array", "DefaultConfigurationProvider", "init_configuration", "__esmMin", "init_promise_utils", "__name", "services", "Deferred", "params", "_b", "_a", "languages", "lang", "configToUpdate", "configs", "conf", "idx", "change", "section", "configuration", "language", "sectionName", "languageId", "Disposable", "init_disposable", "__esmMin", "create", "callback", "__name", "DefaultDocumentBuilder", "init_document_builder", "__esmMin", "init_cancellation", "init_disposable", "init_collections", "init_promise_utils", "init_stream", "init_validation_registry", "init_documents", "__name", "services", "MultiMap", "DocumentState", "documents", "options", "cancelToken", "document", "key", "buildState", "previousCategories", "_a", "categories", "_b", "ValidationCategory", "c", "e", "changed", "deleted", "deletedUri", "changedUri", "newDocument", "allChangedUris", "stream", "uri", "doc", "interruptAndCheck", "rebuildDocuments", "listener", "changedUris", "ref", "callback", "Disposable", "index", "scopeComputation", "toBeValidated", "state", "targetState", "filtered", "uriOrToken", "OperationCancelled", "resolve", "reject", "buildDisposable", "cancelDisposable", "listeners", "validator", "validationSetting", "diagnostics", "newCategories", "DefaultIndexManager", "init_index_manager", "__esmMin", "init_ast_utils", "init_caching", "init_cancellation", "init_stream", "init_uri_utils", "__name", "services", "ContextCache", "targetNode", "astNodePath", "targetDocUri", "getDocument", "result", "docRefs", "refDescr", "UriUtils", "stream", "nodeType", "uris", "documentUris", "uri", "_a", "e", "uriString", "document", "cancelToken", "exports", "indexData", "changedUris", "references", "ref", "DefaultWorkspaceManager", "init_workspace_manager", "__esmMin", "init_cancellation", "init_promise_utils", "init_uri_utils", "__name", "services", "Deferred", "params", "_a", "_params", "token", "folders", "cancelToken", "documents", "interruptAndCheck", "fileExtensions", "e", "collector", "document", "wf", "entry", "_folders", "_collector", "workspaceFolder", "URI", "folderPath", "content", "_workspaceFolder", "name", "UriUtils", "extname", "isTokenTypeArray", "tokenVocabulary", "isIMultiModeLexerDefinition", "isTokenTypeDictionary", "DefaultLexer", "init_lexer", "__esmMin", "init_api", "__name", "services", "tokens", "lexerTokens", "Lexer", "text", "chevrotainResult", "_a", "buildTokens", "res", "token", "parseJSDoc", "node", "start", "options", "opts", "position", "Position", "lines", "getLines", "normalizedOptions", "normalizeOptions", "tokens", "tokenize", "parseJSDocComment", "isJSDoc", "first", "last", "firstRegex", "lastRegex", "content", "NEWLINE_REGEXP", "context", "currentLine", "currentCharacter", "i", "line", "index", "match", "_a", "_b", "_c", "lastCharacter", "skipWhitespace", "Range", "tagRegex", "tagMatch", "fullMatch", "value", "end", "rest", "inlineTagMatches", "inlineTagRegex", "buildInlineTokens", "tags", "lineIndex", "characterIndex", "lastIndex", "matchIndex", "startContent", "offset", "tagName", "endContent", "nonWhitespaceRegex", "whitespaceEndRegex", "startPosition", "JSDocCommentImpl", "elements", "element", "parseJSDocElement", "_d", "next", "parseJSDocTag", "parseJSDocText", "appendEmptyLine", "token", "JSDocLineImpl", "firstToken", "lastToken", "parseJSDocInline", "JSDocTextImpl", "parseJSDocLine", "inline", "tagToken", "name", "nextToken", "docLine", "JSDocTagImpl", "textDoc", "range", "normalizeOption", "option", "escaped", "escapeRegExp", "renderInlineTag", "tag", "display", "displayStart", "renderLinkDefault", "URI", "fillNewlines", "text", "init_jsdoc", "__esmMin", "init_main", "init_regexp_utils", "init_uri_utils", "__name", "e", "rendered", "marker", "JSDocDocumentationProvider", "init_documentation_provider", "__esmMin", "init_ast_utils", "init_jsdoc", "__name", "services", "node", "comment", "isJSDoc", "parseJSDoc", "link", "display", "tag", "name", "description", "_a", "line", "character", "uri", "_node", "_tag", "precomputed", "getDocument", "currentNode", "e", "DefaultCommentProvider", "init_comment_provider", "__esmMin", "init_json_serializer", "init_cst_utils", "__name", "services", "node", "isAstNodeWithComment", "_a", "findCommentNode", "event_exports", "init_event", "__esmMin", "__reExport", "DefaultAsyncParser", "AbstractThreadedAsyncParser", "ParserWorker", "init_async_parser", "__esmMin", "init_promise_utils", "init_event", "__name", "services", "text", "worker", "deferred", "cancelToken", "Deferred", "timeout", "cancellation", "result", "hydrated", "err", "index", "OperationCancelled", "sendMessage", "onMessage", "onError", "terminate", "parseResult", "error", "DefaultWorkspaceLock", "init_workspace_lock", "__esmMin", "init_cancellation", "init_promise_utils", "__name", "action", "tokenSource", "queue", "cancellationToken", "deferred", "Deferred", "entry", "entries", "result", "err", "isOperationCancelled", "DefaultHydrator", "init_hydrator", "__esmMin", "init_cst_node_builder", "init_ast", "init_syntax_tree", "init_ast_utils", "init_collections", "init_cst_utils", "__name", "services", "BiMap", "result", "e", "node", "astNodes", "cstNodes", "astNode", "streamAst", "cstNode", "streamCst", "context", "obj", "name", "value", "arr", "item", "isAstNode", "isReference", "reference", "isRootCstNode", "isCompositeCstNode", "child", "isLeafCstNode", "root", "cst", "RootCstNodeImpl", "CompositeCstNodeImpl", "parent", "num", "cstNodeObj", "hydrated", "tokenType", "offset", "length", "startLine", "startColumn", "endLine", "endColumn", "hidden", "LeafCstNodeImpl", "id", "element", "isAbstractElement", "createDefaultCoreModule", "context", "__name", "services", "DefaultCommentProvider", "JSDocDocumentationProvider", "DefaultAsyncParser", "createGrammarConfig", "createLangiumParser", "createCompletionParser", "DefaultValueConverter", "DefaultTokenBuilder", "DefaultLexer", "LangiumParserErrorMessageProvider", "DefaultAstNodeLocator", "DefaultAstNodeDescriptionProvider", "DefaultReferenceDescriptionProvider", "DefaultLinker", "DefaultNameProvider", "DefaultScopeProvider", "DefaultScopeComputation", "DefaultReferences", "DefaultHydrator", "DefaultJsonSerializer", "DefaultDocumentValidator", "ValidationRegistry", "createDefaultSharedCoreModule", "DefaultServiceRegistry", "DefaultLangiumDocuments", "DefaultLangiumDocumentFactory", "DefaultDocumentBuilder", "DefaultIndexManager", "DefaultWorkspaceManager", "DefaultWorkspaceLock", "DefaultConfigurationProvider", "init_default_module", "__esmMin", "init_grammar_config", "init_completion_parser_builder", "init_langium_parser_builder", "init_token_builder", "init_value_converter", "init_linker", "init_name_provider", "init_references", "init_scope_computation", "init_scope_provider", "init_json_serializer", "init_service_registry", "init_document_validator", "init_validation_registry", "init_ast_descriptions", "init_ast_node_locator", "init_configuration", "init_document_builder", "init_documents", "init_index_manager", "init_workspace_manager", "init_lexer", "init_documentation_provider", "init_comment_provider", "init_langium_parser", "init_async_parser", "init_workspace_lock", "init_hydrator", "inject", "module1", "module2", "module3", "module4", "module5", "module6", "module7", "module8", "module9", "module", "_merge", "_inject", "eagerLoad", "item", "isProxy", "value", "injector", "proxy", "__name", "obj", "prop", "_resolve", "_", "__requested__", "error", "target", "source", "key", "value2", "value1", "Module", "init_dependency_injection", "__esmMin", "m1", "m2", "init_services", "__esmMin", "init_documentation", "__esmMin", "init_comment_provider", "init_documentation_provider", "init_jsdoc", "init_language_meta_data", "__esmMin", "init_languages", "__esmMin", "init_grammar_config", "init_language_meta_data", "init_parser_config", "__esmMin", "init_parser", "__esmMin", "init_async_parser", "init_completion_parser_builder", "init_cst_node_builder", "init_langium_parser_builder", "init_langium_parser", "init_lexer", "init_parser_config", "init_token_builder", "init_value_converter", "init_references", "__esmMin", "init_linker", "init_name_provider", "init_scope", "init_scope_computation", "init_scope_provider", "init_serializer", "__esmMin", "init_hydrator", "init_json_serializer", "EmptyFileSystemProvider", "EmptyFileSystem", "init_file_system_provider", "__esmMin", "__name", "createMinimalGrammarServices", "shared", "inject", "createDefaultSharedCoreModule", "EmptyFileSystem", "minimalSharedGrammarModule", "grammar", "createDefaultCoreModule", "minimalGrammarModule", "loadGrammarFromJson", "json", "services", "astNode", "URI", "_a", "init_grammar_loader", "__esmMin", "init_default_module", "init_dependency_injection", "init_ast", "init_file_system_provider", "init_uri_utils", "__name", "LangiumGrammarAstReflection", "utils_exports", "__export", "ast_utils_exports", "BiMap", "cancellation_exports", "ContextCache", "cst_utils_exports", "DONE_RESULT", "Deferred", "Disposable", "DisposableCache", "DocumentCache", "EMPTY_STREAM", "ErrorWithLocation", "grammar_utils_exports", "MultiMap", "OperationCancelled", "Reduction", "regexp_utils_exports", "SimpleCache", "StreamImpl", "TreeStreamImpl", "URI", "UriUtils", "WorkspaceCache", "assertUnreachable", "delayNextTick", "interruptAndCheck", "isOperationCancelled", "loadGrammarFromJson", "setInterruptionPeriod", "startCancelableOperation", "stream", "init_utils", "__esmMin", "init_caching", "init_event", "__reExport", "event_exports", "init_collections", "init_disposable", "init_errors", "init_grammar_loader", "init_promise_utils", "init_stream", "init_uri_utils", "init_ast_utils", "init_cancellation", "init_cst_utils", "init_grammar_utils", "init_regexp_utils", "init_validation", "__esmMin", "init_document_validator", "init_validation_registry", "init_workspace", "__esmMin", "init_ast_descriptions", "init_ast_node_locator", "init_configuration", "init_document_builder", "init_documents", "init_file_system_provider", "init_index_manager", "init_workspace_lock", "init_workspace_manager", "lib_exports", "__export", "AbstractAstReflection", "AbstractCstNode", "AbstractLangiumParser", "AbstractParserErrorMessageProvider", "AbstractThreadedAsyncParser", "ast_utils_exports", "BiMap", "cancellation_exports", "CompositeCstNodeImpl", "ContextCache", "CstNodeBuilder", "cst_utils_exports", "DONE_RESULT", "DatatypeSymbol", "DefaultAstNodeDescriptionProvider", "DefaultAstNodeLocator", "DefaultAsyncParser", "DefaultCommentProvider", "DefaultConfigurationProvider", "DefaultDocumentBuilder", "DefaultDocumentValidator", "DefaultHydrator", "DefaultIndexManager", "DefaultJsonSerializer", "DefaultLangiumDocumentFactory", "DefaultLangiumDocuments", "DefaultLexer", "DefaultLinker", "DefaultNameProvider", "DefaultReferenceDescriptionProvider", "DefaultReferences", "DefaultScopeComputation", "DefaultScopeProvider", "DefaultServiceRegistry", "DefaultTokenBuilder", "DefaultValueConverter", "DefaultWorkspaceLock", "DefaultWorkspaceManager", "Deferred", "Disposable", "DisposableCache", "DocumentCache", "DocumentState", "DocumentValidator", "EMPTY_SCOPE", "EMPTY_STREAM", "EmptyFileSystem", "EmptyFileSystemProvider", "ErrorWithLocation", "ast_exports", "grammar_utils_exports", "JSDocDocumentationProvider", "LangiumCompletionParser", "LangiumParser", "LangiumParserErrorMessageProvider", "LeafCstNodeImpl", "MapScope", "Module", "MultiMap", "OperationCancelled", "ParserWorker", "Reduction", "regexp_utils_exports", "RootCstNodeImpl", "SimpleCache", "StreamImpl", "StreamScope", "TextDocument", "TreeStreamImpl", "URI", "UriUtils", "ValidationCategory", "ValidationRegistry", "ValueConverter", "WorkspaceCache", "assertUnreachable", "createCompletionParser", "createDefaultCoreModule", "createDefaultSharedCoreModule", "createGrammarConfig", "createLangiumParser", "delayNextTick", "diagnosticData", "eagerLoad", "getDiagnosticRange", "inject", "interruptAndCheck", "isAstNode", "isAstNodeDescription", "isAstNodeWithComment", "isCompositeCstNode", "isIMultiModeLexerDefinition", "isJSDoc", "isLeafCstNode", "isLinkingError", "isNamed", "isOperationCancelled", "isReference", "isRootCstNode", "isTokenTypeArray", "isTokenTypeDictionary", "loadGrammarFromJson", "parseJSDoc", "prepareLangiumParser", "setInterruptionPeriod", "startCancelableOperation", "stream", "toDiagnosticSeverity", "init_lib", "__esmMin", "init_default_module", "init_dependency_injection", "init_service_registry", "init_services", "init_syntax_tree", "init_documentation", "init_languages", "init_parser", "init_references", "init_serializer", "init_utils", "__reExport", "utils_exports", "init_validation", "init_workspace", "init_ast", "isArchitecture", "item", "reflection", "Architecture", "isBranch", "Branch", "isCommit", "Commit", "isCommon", "Common", "isGitGraph", "GitGraph", "isInfo", "Info", "isMerge", "Merge", "isPacket", "Packet", "isPacketBlock", "PacketBlock", "isPie", "Pie", "isPieSection", "PieSection", "__defProp", "__name", "Statement", "Checkout", "CherryPicking", "Direction", "MermaidAstReflection", "loadedInfoGrammar", "InfoGrammar", "loadedPacketGrammar", "PacketGrammar", "loadedPieGrammar", "PieGrammar", "loadedArchitectureGrammar", "ArchitectureGrammar", "loadedGitGraphGrammar", "GitGraphGrammar", "InfoLanguageMetaData", "PacketLanguageMetaData", "PieLanguageMetaData", "ArchitectureLanguageMetaData", "GitGraphLanguageMetaData", "MermaidGeneratedSharedModule", "InfoGeneratedModule", "PacketGeneratedModule", "PieGeneratedModule", "ArchitectureGeneratedModule", "GitGraphGeneratedModule", "accessibilityDescrRegex", "accessibilityTitleRegex", "titleRegex", "rulesRegexes", "AbstractMermaidValueConverter", "CommonValueConverter", "AbstractMermaidTokenBuilder", "CommonTokenBuilder", "init_chunk_Y27MQZ3U", "__esmMin", "init_lib", "target", "value", "AbstractAstReflection", "subtype", "supertype", "refInfo", "referenceId", "type", "loadGrammarFromJson", "DefaultValueConverter", "rule", "input", "cstNode", "_cstNode", "regex", "match", "_rule", "_input", "DefaultTokenBuilder", "keywords", "rules", "terminalTokens", "options", "tokenTypes", "tokenType", "createGitGraphServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "GitGraph", "createDefaultCoreModule", "GitGraphGeneratedModule", "GitGraphModule", "GitGraphTokenBuilder", "init_chunk_NCMFTTUW", "__esmMin", "init_chunk_Y27MQZ3U", "init_lib", "AbstractMermaidTokenBuilder", "__name", "CommonValueConverter", "createInfoServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "Info", "createDefaultCoreModule", "InfoGeneratedModule", "InfoModule", "InfoTokenBuilder", "init_chunk_4YFB5VUC", "__esmMin", "init_chunk_Y27MQZ3U", "init_lib", "AbstractMermaidTokenBuilder", "__name", "CommonValueConverter", "createPacketServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "Packet", "createDefaultCoreModule", "PacketGeneratedModule", "PacketModule", "PacketTokenBuilder", "init_chunk_EQFLFMNE", "__esmMin", "init_chunk_Y27MQZ3U", "init_lib", "AbstractMermaidTokenBuilder", "__name", "CommonValueConverter", "createPieServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "Pie", "createDefaultCoreModule", "PieGeneratedModule", "PieModule", "PieTokenBuilder", "PieValueConverter", "init_chunk_BI6EQKOQ", "__esmMin", "init_chunk_Y27MQZ3U", "init_lib", "AbstractMermaidTokenBuilder", "__name", "AbstractMermaidValueConverter", "rule", "input", "_cstNode", "createArchitectureServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "Architecture", "createDefaultCoreModule", "ArchitectureGeneratedModule", "ArchitectureModule", "ArchitectureTokenBuilder", "ArchitectureValueConverter", "init_chunk_FF7BQXOH", "__esmMin", "init_chunk_Y27MQZ3U", "init_lib", "AbstractMermaidTokenBuilder", "__name", "AbstractMermaidValueConverter", "rule", "input", "_cstNode", "info_46DW6VJ7_exports", "__export", "InfoModule", "createInfoServices", "init_info_46DW6VJ7", "__esmMin", "init_chunk_4YFB5VUC", "init_chunk_Y27MQZ3U", "packet_W2GHVCYJ_exports", "__export", "PacketModule", "createPacketServices", "init_packet_W2GHVCYJ", "__esmMin", "init_chunk_EQFLFMNE", "init_chunk_Y27MQZ3U", "pie_BEWT4RHE_exports", "__export", "PieModule", "createPieServices", "init_pie_BEWT4RHE", "__esmMin", "init_chunk_BI6EQKOQ", "init_chunk_Y27MQZ3U", "architecture_I3QFYML2_exports", "__export", "ArchitectureModule", "createArchitectureServices", "init_architecture_I3QFYML2", "__esmMin", "init_chunk_FF7BQXOH", "init_chunk_Y27MQZ3U", "gitGraph_YCYPL57B_exports", "__export", "GitGraphModule", "createGitGraphServices", "init_gitGraph_YCYPL57B", "__esmMin", "init_chunk_NCMFTTUW", "init_chunk_Y27MQZ3U", "parse", "diagramType", "text", "initializer", "initializers", "parsers", "result", "MermaidParseError", "init_mermaid_parser_core", "__esmMin", "init_chunk_NCMFTTUW", "init_chunk_4YFB5VUC", "init_chunk_EQFLFMNE", "init_chunk_BI6EQKOQ", "init_chunk_FF7BQXOH", "init_chunk_Y27MQZ3U", "__name", "createInfoServices2", "parser", "createPacketServices2", "createPieServices2", "createArchitectureServices2", "createGitGraphServices2", "lexerErrors", "err", "parserErrors", "populateCommonDb", "ast", "db", "init_populateCommonDb", "__esmMin", "__name", "commitType", "init_gitGraphTypes", "__esmMin", "ImperativeState", "init_imperativeState", "__esmMin", "init", "__name", "getID", "random", "uniqBy", "list", "fn", "recordMap", "out", "item", "key", "upsert", "arr", "newVal", "index", "prettyPrintCommitHistory", "commitArr", "commit", "line", "c", "label", "branch", "state", "log", "newCommit", "DEFAULT_GITGRAPH_CONFIG", "getConfig", "setDirection", "setOptions", "getOptions", "merge", "cherryPick", "checkout", "prettyPrint", "clear", "getBranchesAsObjArray", "getBranches", "getCommits", "getCommitsArray", "getCurrentBranch", "getDirection", "getHead", "db", "init_gitGraphAst", "__esmMin", "init_logger", "init_utils", "init_config", "init_common", "init_commonDb", "init_gitGraphTypes", "init_imperativeState", "init_defaultConfig", "defaultConfig_default", "__name", "cleanAndMerge", "ImperativeState", "config", "mainBranchName", "mainBranchOrder", "dir", "rawOptString", "commitDB", "msg", "id", "type", "tags", "common_default", "tag", "commitType", "branchDB", "name", "order", "mergeDB", "otherBranch", "customId", "overrideType", "customTags", "currentBranchCheck", "otherBranchCheck", "currentCommit", "otherCommit", "error", "verifiedBranch", "cherryPickDB", "sourceId", "targetId", "parentCommitId", "sourceCommit", "sourceCommitBranch", "currentCommitId", "node", "branchConfig", "i", "a", "b", "o", "setAccTitle", "getAccTitle", "getAccDescription", "setAccDescription", "setDiagramTitle", "getDiagramTitle", "populate", "parseStatement", "parseCommit", "parseBranch", "parseMerge", "parseCheckout", "parseCherryPicking", "parser", "init_gitGraphParser", "__esmMin", "init_mermaid_parser_core", "init_logger", "init_populateCommonDb", "init_gitGraphAst", "init_gitGraphTypes", "__name", "ast", "db", "populateCommonDb", "statement", "stmt", "log", "commit", "commitType", "branch", "merge", "checkout", "cherryPicking", "input", "parse", "DEFAULT_CONFIG", "DEFAULT_GITGRAPH_CONFIG", "LAYOUT_OFFSET", "COMMIT_STEP", "PX", "PY", "THEME_COLOR_LIMIT", "branchPos", "commitPos", "defaultPos", "allCommitsDict", "lanes", "maxPos", "dir", "clear", "drawText", "findClosestParent", "findClosestParentBT", "setParallelBTPos", "findClosestParentPos", "calculateCommitPosition", "setCommitPosition", "setRootPosition", "drawCommitBullet", "drawCommitLabel", "drawCommitTags", "getCommitClassType", "calculatePosition", "getCommitPosition", "drawCommits", "shouldRerouteArrow", "findLane", "drawArrow", "drawArrows", "drawBranches", "setBranchPosition", "draw", "gitGraphRenderer_default", "init_gitGraphRenderer", "__esmMin", "init_src", "init_diagramAPI", "init_logger", "init_utils", "init_gitGraphTypes", "getConfig", "__name", "txt", "svgLabel", "row", "tspan", "parents", "closestParent", "comparisonFunc", "targetPosition", "a", "b", "parent", "parentPosition", "maxPosition", "sortedKeys", "commits", "curPos", "roots", "key", "commit", "x", "y", "p", "closestParentPos", "branch", "gBullets", "commitPosition", "typeClass", "branchIndex", "commitSymbolType", "commitType", "circle", "circle2", "gLabels", "pos", "wrapper", "labelBkg", "text", "bbox", "r_x", "r_y", "yOffset", "maxTagBboxWidth", "maxTagBboxHeight", "tagElements", "tagValue", "rect", "hole", "tag", "tagBbox", "h2", "ly", "yOrigin", "defaultCommitPosition", "isParallelCommits", "posWithOffset", "svg", "modifyGraph", "keys", "sortKeys", "seqA", "seqB", "commitA", "commitB", "p1", "p2", "allCommits", "branchToGetCurve", "isOnBranchToGetCurve", "isBetweenCommits", "commitX", "y1", "y2", "depth", "candidate", "lane", "diff", "arrowNeedsRerouting", "arc", "arc2", "radius", "offset", "colorClassNum", "lineDef", "lineY", "lineX", "gArrows", "branches", "g", "index", "adjustIndexForTheme", "line", "name", "labelElement", "bkg", "label", "rotateCommitLabel", "id", "ver", "diagObj", "log", "db", "diagram", "select_default", "branchLabel", "utils_default", "setupGraphViewbox", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "i", "gitGraphDiagram_exports", "__export", "diagram", "init_gitGraphDiagram", "__esmMin", "init_gitGraphParser", "init_gitGraphAst", "init_gitGraphRenderer", "init_styles", "parser", "db", "gitGraphRenderer_default", "styles_default", "parser", "gantt_default", "init_gantt", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "require_isoWeek", "__commonJSMin", "exports", "module", "e", "t", "i", "s", "a", "__name", "d", "n", "o", "r", "u", "require_customParseFormat", "__commonJSMin", "exports", "module", "e", "t", "n", "r", "o", "a", "__name", "f", "u", "i", "c", "l", "h", "d", "s", "m", "M", "Y", "p", "v", "D", "w", "g", "y", "L", "require_advancedFormat", "__commonJSMin", "exports", "module", "e", "t", "r", "s", "a", "getTaskTags", "data", "task", "tags", "matchFound", "t", "pattern", "regex", "import_sanitize_url", "import_dayjs", "import_isoWeek", "import_customParseFormat", "import_advancedFormat", "WEEKEND_START_DAY", "dateFormat", "axisFormat", "tickInterval", "todayMarker", "includes", "excludes", "links", "sections", "tasks", "currentSection", "displayMode", "funs", "inclusiveEndDates", "topAxis", "weekday", "weekend", "lastOrder", "clear", "setAxisFormat", "getAxisFormat", "setTickInterval", "getTickInterval", "setTodayMarker", "getTodayMarker", "setDateFormat", "enableInclusiveEndDates", "endDatesAreInclusive", "enableTopAxis", "topAxisEnabled", "setDisplayMode", "getDisplayMode", "getDateFormat", "setIncludes", "getIncludes", "setExcludes", "getExcludes", "getLinks", "addSection", "getSections", "getTasks", "isInvalidDate", "setWeekday", "getWeekday", "setWeekend", "checkTaskDates", "fixTaskDates", "getStartDate", "parseDuration", "getEndDate", "taskCnt", "parseId", "compileData", "parseData", "lastTask", "lastTaskID", "rawTasks", "taskDb", "addTask", "findTaskById", "addTaskOrg", "compileTasks", "setLink", "setClass", "setClickFun", "pushFun", "setClickEvent", "bindFunctions", "ganttDb_default", "init_ganttDb", "__esmMin", "init_logger", "init_diagramAPI", "init_utils", "init_commonDb", "dayjs", "dayjsIsoWeek", "dayjsCustomParseFormat", "dayjsAdvancedFormat", "__name", "txt", "allItemsProcessed", "maxDepth", "iterationCount", "date", "startDay", "startTime", "originalEndTime", "fixedEndTime", "renderEndTime", "endTime", "invalid", "prevTime", "str", "afterStatement", "latestTask", "id", "today", "mDate", "log", "d", "statement", "inclusive", "untilStatement", "earliestTask", "parsedDate", "durationValue", "durationUnit", "newEndTime", "idStr", "prevTask", "dataStr", "ds", "i", "endTimeData", "prevTaskId", "descr", "rawTask", "taskInfo", "pos", "newTask", "compileTask", "allProcessed", "ids", "_linkStr", "linkStr", "getConfig", "className", "functionName", "functionArgs", "argList", "item", "utils_default", "callbackFunction", "elem", "element", "fun", "setAccTitle", "getAccTitle", "setDiagramTitle", "getDiagramTitle", "setAccDescription", "getAccDescription", "import_dayjs", "setConf", "mapWeekdayToTimeFunction", "getMaxIntersections", "w", "draw", "ganttRenderer_default", "init_ganttRenderer", "__esmMin", "init_logger", "init_src", "init_common", "init_diagramAPI", "init_setupGraphViewbox", "__name", "log", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "timeSunday", "tasks", "orderOffset", "timeline", "sorted", "b", "maxIntersections", "element", "j", "text", "id", "version", "diagObj", "conf", "getConfig", "securityLevel", "sandboxElement", "select_default", "root", "doc", "elem", "taskArray", "categories", "checkUnique", "categoryHeights", "h", "categoryElements", "intersections", "category", "categoryHeight", "task", "svg", "timeScale", "time", "min", "d", "max", "taskCompare", "a", "taskA", "taskB", "result", "makeGantt", "configureSvgSize", "pageWidth", "pageHeight", "barHeight", "gap", "topPadding", "leftPadding", "colorScale", "linear", "hcl_default", "drawExcludeDays", "makeGrid", "drawRects", "vertLabels", "drawToday", "theArray", "theGap", "theTopPad", "theSidePad", "theBarHeight", "theColorScale", "uniqueTasks", "item", "i", "rectangles", "links", "res", "classStr", "secNum", "taskClass", "startX", "endX", "textWidth", "taskType", "o", "taskRect", "taskText", "oldParent", "Link", "excludes", "includes", "minTime", "maxTime", "startTime", "endTime", "dayjs", "dateFormat", "excludeRanges", "range", "renderEnd", "bottomXAxis", "axisBottom", "timeFormat", "resultTickInterval", "every", "interval", "weekday", "millisecond", "second", "timeMinute", "timeHour", "timeDay", "timeMonth", "topXAxis", "axisTop", "prevGap", "numOccurrences", "rows", "common_default", "dy", "svgLabel", "row", "tspan", "todayMarker", "todayG", "today", "todayLine", "arr", "hash", "l", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "ganttDiagram_exports", "__export", "diagram", "init_ganttDiagram", "__esmMin", "init_gantt", "init_ganttDb", "init_ganttRenderer", "init_styles", "gantt_default", "ganttDb_default", "ganttRenderer_default", "styles_default", "parser", "init_infoParser", "__esmMin", "init_mermaid_parser_core", "init_logger", "__name", "input", "ast", "parse", "log", "version", "init_package", "__esmMin", "DEFAULT_INFO_DB", "getVersion", "db", "init_infoDb", "__esmMin", "init_package", "version", "__name", "selectSvgElement", "init_selectSvgElement", "__esmMin", "init_src", "init_diagramAPI", "__name", "id", "securityLevel", "getConfig", "root", "select_default", "doc", "draw", "renderer", "init_infoRenderer", "__esmMin", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "__name", "text", "id", "version", "log", "svg", "selectSvgElement", "configureSvgSize", "infoDiagram_exports", "__export", "diagram", "init_infoDiagram", "__esmMin", "init_infoParser", "init_infoDb", "init_infoRenderer", "parser", "db", "renderer", "DEFAULT_PIE_CONFIG", "DEFAULT_PIE_DB", "sections", "showData", "config", "getConfig", "clear", "addSection", "getSections", "setShowData", "getShowData", "db", "init_pieDb", "__esmMin", "init_logger", "init_commonDb", "init_defaultConfig", "defaultConfig_default", "__name", "label", "value", "log", "toggle", "setDiagramTitle", "getDiagramTitle", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "populateDb", "parser", "init_pieParser", "__esmMin", "init_mermaid_parser_core", "init_logger", "init_populateCommonDb", "init_pieDb", "__name", "ast", "db", "populateCommonDb", "input", "parse", "log", "getStyles", "pieStyles_default", "init_pieStyles", "__esmMin", "__name", "options", "createPieArcs", "draw", "renderer", "init_pieRenderer", "__esmMin", "init_src", "init_diagramAPI", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "init_utils", "__name", "sections", "pieData", "element", "a", "b", "pie_default", "d3Section", "text", "id", "_version", "diagObj", "log", "db", "globalConfig", "getConfig", "pieConfig", "cleanAndMerge", "MARGIN", "LEGEND_RECT_SIZE", "LEGEND_SPACING", "height", "pieWidth", "svg", "selectSvgElement", "group", "themeVariables", "outerStrokeWidth", "parseFontSize", "textPosition", "radius", "arcGenerator", "arc_default", "labelArcGenerator", "arcs", "myGeneratedColors", "color", "ordinal", "datum", "sum", "section", "legend", "_datum", "index", "offset", "horizontal", "vertical", "label", "value", "longestTextWidth", "node", "totalWidth", "configureSvgSize", "pieDiagram_exports", "__export", "diagram", "init_pieDiagram", "__esmMin", "init_pieParser", "init_pieDb", "init_pieStyles", "init_pieRenderer", "parser", "db", "renderer", "pieStyles_default", "parser", "quadrant_default", "init_quadrant", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "$VS", "$VT", "$VU", "$VV", "$VW", "$VX", "$VY", "$VZ", "$V_", "$V$", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "defaultThemeVariables", "QuadrantBuilder", "init_quadrantBuilder", "__esmMin", "init_src", "init_defaultConfig", "init_logger", "init_theme_default", "getThemeVariables", "__name", "defaultConfig_default", "log", "data", "points", "className", "styles", "config", "themeConfig", "xAxisPosition", "showXAxis", "showYAxis", "showTitle", "xAxisSpaceCalculation", "xAxisSpace", "yAxisSpaceCalculation", "yAxisSpace", "titleSpaceCalculation", "titleSpace", "quadrantLeft", "quadrantTop", "quadrantWidth", "quadrantHeight", "quadrantHalfWidth", "quadrantHalfHeight", "spaceData", "quadrantSpace", "drawXAxisLabelsInMiddle", "drawYAxisLabelsInMiddle", "axisLabels", "quadrants", "quadrant", "xAxis", "linear", "yAxis", "point", "classStyles", "halfExternalBorderWidth", "calculatedSpace", "validateHexCode", "value", "validateNumber", "validateSizeInPixels", "InvalidStyleError", "init_utils", "__esmMin", "__name", "style", "type", "textSanitizer", "text", "sanitizeText", "config", "setQuadrant1Text", "textObj", "quadrantBuilder", "setQuadrant2Text", "setQuadrant3Text", "setQuadrant4Text", "setXAxisLeftText", "setXAxisRightText", "setYAxisTopText", "setYAxisBottomText", "parseStyles", "styles", "stylesObject", "style", "key", "value", "validateNumber", "InvalidStyleError", "validateHexCode", "validateSizeInPixels", "addPoint", "className", "x", "y", "addClass", "setWidth", "width", "setHeight", "height", "getQuadrantData", "getConfig", "themeVariables", "quadrantChartConfig", "getDiagramTitle", "clear", "quadrantDb_default", "init_quadrantDb", "__esmMin", "init_diagramAPI", "init_common", "init_commonDb", "init_quadrantBuilder", "init_utils", "__name", "QuadrantBuilder", "setAccTitle", "getAccTitle", "setDiagramTitle", "getAccDescription", "setAccDescription", "draw", "quadrantRenderer_default", "init_quadrantRenderer", "__esmMin", "init_src", "init_diagramAPI", "init_logger", "init_setupGraphViewbox", "__name", "txt", "id", "_version", "diagObj", "getDominantBaseLine", "horizontalPos", "getTextAnchor", "verticalPos", "getTransformation", "data", "conf", "getConfig", "log", "securityLevel", "sandboxElement", "select_default", "svg", "group", "width", "height", "configureSvgSize", "quadrantData", "quadrantsGroup", "borderGroup", "dataPointGroup", "labelGroup", "titleGroup", "quadrants", "dataPoints", "quadrantDiagram_exports", "__export", "diagram", "init_quadrantDiagram", "__esmMin", "init_quadrant", "init_quadrantDb", "init_quadrantRenderer", "quadrant_default", "quadrantDb_default", "quadrantRenderer_default", "__name", "parser", "xychart_default", "init_xychart", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "isBarPlot", "data", "isBandAxisData", "isLinearAxisData", "init_interfaces", "__esmMin", "__name", "TextDimensionCalculatorWithFont", "init_textDimensionCalculator", "__esmMin", "init_createText", "parentGroup", "__name", "texts", "fontSize", "acc", "cur", "dimension", "elem", "t", "bbox", "computeDimensionOfText", "width", "height", "BaseAxis", "init_baseAxis", "__esmMin", "axisConfig", "title", "textDimensionCalculator", "axisThemeConfig", "__name", "range", "axisPosition", "tick", "availableSpace", "availableHeight", "spaceRequired", "maxPadding", "heightRequired", "availableWidth", "widthRequired", "point", "drawableElement", "x", "y", "BandAxis", "init_bandAxis", "__esmMin", "init_src", "init_logger", "init_baseAxis", "BaseAxis", "__name", "axisConfig", "axisThemeConfig", "categories", "title", "textDimensionCalculator", "band", "range", "log", "value", "LinearAxis", "init_linearAxis", "__esmMin", "init_src", "init_baseAxis", "BaseAxis", "__name", "axisConfig", "axisThemeConfig", "domain", "title", "textDimensionCalculator", "linear", "value", "getAxis", "data", "axisConfig", "axisThemeConfig", "tmpSVGGroup", "textDimensionCalculator", "TextDimensionCalculatorWithFont", "isBandAxisData", "BandAxis", "LinearAxis", "init_axis", "__esmMin", "init_interfaces", "init_textDimensionCalculator", "init_bandAxis", "init_linearAxis", "__name", "getChartTitleComponent", "chartConfig", "chartData", "chartThemeConfig", "tmpSVGGroup", "textDimensionCalculator", "TextDimensionCalculatorWithFont", "ChartTitle", "init_chartTitle", "__esmMin", "init_textDimensionCalculator", "__name", "point", "availableSpace", "titleDimension", "widthRequired", "heightRequired", "drawableElem", "LinePlot", "init_linePlot", "__esmMin", "init_src", "plotData", "xAxis", "yAxis", "orientation", "plotIndex", "__name", "finalData", "d", "path", "line_default", "BarPlot", "init_barPlot", "__esmMin", "barData", "boundingRect", "xAxis", "yAxis", "orientation", "plotIndex", "__name", "finalData", "d", "barWidth", "barWidthHalf", "data", "getPlotComponent", "chartConfig", "chartData", "chartThemeConfig", "BasePlot", "init_plot", "__esmMin", "init_linePlot", "init_barPlot", "__name", "xAxis", "yAxis", "point", "availableSpace", "drawableElem", "i", "plot", "linePlot", "LinePlot", "barPlot", "BarPlot", "Orchestrator", "init_orchestrator", "__esmMin", "init_axis", "init_chartTitle", "init_plot", "init_interfaces", "chartConfig", "chartData", "chartThemeConfig", "tmpSVGGroup", "getChartTitleComponent", "getPlotComponent", "getAxis", "__name", "availableWidth", "availableHeight", "plotX", "plotY", "chartWidth", "chartHeight", "spaceUsed", "p", "isBarPlot", "titleYEnd", "drawableElem", "component", "XYChartBuilder", "init_chartBuilder", "__esmMin", "init_orchestrator", "__name", "config", "chartData", "chartThemeConfig", "tmpSVGGroup", "Orchestrator", "getChartDefaultThemeConfig", "defaultThemeVariables", "getThemeVariables", "config", "getConfig", "cleanAndMerge", "getChartDefaultConfig", "defaultConfig_default", "getChartDefaultData", "textSanitizer", "text", "sanitizeText", "setTmpSVGG", "SVGG", "tmpSVGGroup", "setOrientation", "orientation", "xyChartConfig", "setXAxisTitle", "title", "xyChartData", "setXAxisRangeData", "min", "max", "hasSetXAxis", "setXAxisBand", "categories", "c", "setYAxisTitle", "setYAxisRangeData", "hasSetYAxis", "setYAxisRangeFromPlotData", "data", "minValue", "maxValue", "prevMinValue", "isLinearAxisData", "prevMaxValue", "transformDataWithoutCategory", "retData", "isBandAxisData", "i", "step", "getPlotColorFromPalette", "plotIndex", "plotColorPalette", "setLineData", "plotData", "setBarData", "getDrawableElem", "getDiagramTitle", "XYChartBuilder", "xyChartThemeConfig", "getChartThemeConfig", "getChartConfig", "clear", "xychartDb_default", "init_xychartDb", "__esmMin", "init_config", "init_defaultConfig", "init_theme_default", "init_utils", "init_common", "init_commonDb", "init_chartBuilder", "init_interfaces", "color", "__name", "setAccTitle", "getAccTitle", "setDiagramTitle", "getAccDescription", "setAccDescription", "draw", "xychartRenderer_default", "init_xychartRenderer", "__esmMin", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "__name", "txt", "id", "_version", "diagObj", "db", "themeConfig", "chartConfig", "getDominantBaseLine", "horizontalPos", "getTextAnchor", "verticalPos", "getTextTransformation", "data", "log", "svg", "selectSvgElement", "group", "background", "configureSvgSize", "shapes", "groups", "getGroup", "gList", "elem", "prefix", "i", "parent", "shape", "shapeGroup", "xychartDiagram_exports", "__export", "diagram", "init_xychartDiagram", "__esmMin", "init_xychart", "init_xychartDb", "init_xychartRenderer", "xychart_default", "xychartDb_default", "xychartRenderer_default", "parser", "requirementDiagram_default", "init_requirementDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "relations", "latestRequirement", "requirements", "latestElement", "elements", "RequirementType", "RiskLevel", "VerifyType", "Relationships", "addRequirement", "getRequirements", "setNewReqId", "setNewReqText", "setNewReqRisk", "setNewReqVerifyMethod", "addElement", "getElements", "setNewElementType", "setNewElementDocRef", "addRelationship", "getRelationships", "clear", "requirementDb_default", "init_requirementDb", "__esmMin", "init_diagramAPI", "init_logger", "init_commonDb", "__name", "name", "type", "id", "text", "risk", "verifyMethod", "log", "docRef", "src", "dst", "getConfig", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "ReqMarkers", "insertLineEndings", "requirementMarkers_default", "init_requirementMarkers", "__esmMin", "__name", "parentNode", "conf", "containsNode", "conf", "relCnt", "newRectNode", "newTitleNode", "newBodyNode", "addEdgeLabel", "drawRelationshipFromLayout", "drawReqs", "drawElements", "addRelationships", "adjustEntities", "elementString", "draw", "requirementRenderer_default", "init_requirementRenderer", "__esmMin", "init_src", "init_dagre", "init_graphlib", "init_diagramAPI", "init_logger", "init_setupGraphViewbox", "init_common", "init_requirementMarkers", "__name", "parentNode", "id", "txts", "x", "title", "i", "textStr", "yPadding", "linePadding", "totalY", "yStart", "body", "currentRow", "charLimit", "wrappedTxts", "currentTextLen", "firstPart", "lastStr", "svgPath", "txt", "len", "labelPoint", "labelId", "labelBBox", "svg", "rel", "g", "insert", "diagObj", "edge", "lineFunction", "line_default", "d", "common_default", "requirementMarkers_default", "reqs", "graph", "svgNode", "req", "reqName", "log", "groupNode", "textId", "rectNode", "nodes", "titleNodeInfo", "bodyNode", "rectBBox", "els", "el", "elName", "relationships", "src", "dst", "v", "str", "text", "_version", "getConfig", "securityLevel", "sandboxElement", "select_default", "Graph", "requirements", "elements", "layout", "padding", "svgBounds", "width", "height", "configureSvgSize", "requirementDiagram_exports", "__export", "diagram", "init_requirementDiagram", "__esmMin", "init_requirementDb", "init_styles", "init_requirementRenderer", "requirementDiagram_default", "requirementDb_default", "requirementRenderer_default", "styles_default", "parser", "sequenceDiagram_default", "init_sequenceDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "insertLinks", "actor", "links", "key", "insertProperties", "properties", "boxEnd", "state", "addBox", "addActor", "activationCount", "addMessage", "addSignal", "hasAtLeastOneBox", "hasAtLeastOneBoxWithTitle", "getMessages", "getBoxes", "getActors", "getCreatedActors", "getDestroyedActors", "getActor", "getActorKeys", "enableSequenceNumbers", "disableSequenceNumbers", "showSequenceNumbers", "setWrap", "extractWrap", "autoWrap", "clear", "parseMessage", "parseBoxData", "LINETYPE", "ARROWTYPE", "PLACEMENT", "addNote", "addLinks", "addALink", "addProperties", "addDetails", "getActorProperty", "apply", "sequenceDb_default", "init_sequenceDb", "__esmMin", "init_diagramAPI", "init_logger", "init_imperativeState", "init_common", "init_commonDb", "ImperativeState", "__name", "data", "id", "name", "description", "type", "assignedBox", "old", "prevActorInRecords", "part", "i", "count", "idFrom", "idTo", "message", "answer", "messageType", "activate", "error", "b", "wrapSetting", "text", "wrap", "getConfig", "str", "trimmedStr", "cleanedText", "log", "match", "color", "title", "style", "sanitizeText", "placement", "note", "actors", "actorId", "sanitizedText", "e", "sep", "label", "link", "elem", "details", "param", "item", "setAccTitle", "getAccTitle", "getDiagramTitle", "setDiagramTitle", "setAccDescription", "getAccDescription", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "import_sanitize_url", "ACTOR_TYPE_WIDTH", "TOP_ACTOR_CLASS", "BOTTOM_ACTOR_CLASS", "ACTOR_BOX_CLASS", "ACTOR_MAN_FIGURE_CLASS", "drawRect", "drawPopup", "popupMenuToggle", "drawKatex", "drawText", "drawLabel", "actorCnt", "fixLifeLineHeights", "drawActorTypeParticipant", "drawActorTypeActor", "drawActor", "drawBox", "anchorElement", "drawActivation", "drawLoop", "drawBackgroundRect", "insertDatabaseIcon", "insertComputerIcon", "insertClockIcon", "insertArrowHead", "insertArrowFilledHead", "insertSequenceNumber", "insertArrowCrossHead", "getTextObj", "getNoteRect", "_drawTextCandidateFunc", "_drawMenuItemTextCandidateFunc", "svgDraw_default", "init_svgDraw", "__esmMin", "init_common", "init_svgDrawCommon", "init_utils", "init_config", "__name", "elem", "rectData", "actor", "minMenuWidth", "textAttrs", "forceMenus", "links", "displayValue", "g", "actorClass", "menuWidth", "rectElem", "linkY", "key", "linkElem", "sanitizedLink", "popId", "textData", "msgModel", "textElem", "lines", "renderKatex", "getConfig", "dim", "rectDim", "startx", "stopx", "starty", "temp", "prevTextHeight", "textHeight", "common_default", "_textFontSize", "_textFontSizePx", "parseFontSize", "textElems", "dy", "yfunc", "i", "line", "text", "ZERO_WIDTH_SPACE", "span", "txtObject", "genPoints", "x", "y", "width", "height", "cut", "polygon", "diagram", "actors", "actorKeys", "conf", "actorKey", "actorDOM", "isFooter", "actorY", "center", "centerY", "boxplusLineGroup", "rect", "cssclass", "iconSrc", "drawEmbeddedImage", "drawImage", "hasKatex", "bounds", "actElem", "cssClass", "circle", "box", "verticalPos", "actorActivations", "loopModel", "labelText", "boxMargin", "boxTextMargin", "labelBoxHeight", "labelBoxWidth", "fontFamily", "fontSize", "fontWeight", "drawLoopLine", "stopy", "item", "txt", "idx", "sectionHeight", "te", "acc", "curr", "byText", "content", "_setTextAttrs", "byTspan", "actorFontSize", "actorFontFamily", "actorFontWeight", "_actorFontSize", "_actorFontSizePx", "byFo", "s", "byKatex", "calculateMathMLDimensions", "toText", "fromTextAttrsDict", "boundMessage", "_diagram", "msgModel", "bounds", "startx", "stopx", "message", "lines", "common_default", "isKatexMsg", "hasKatex", "textDims", "calculateMathMLDimensions", "getConfig", "utils_default", "messageFont", "conf", "lineHeight", "lineStartY", "totalOffset", "textWidth", "dx", "adjustLoopHeightForWrap", "loopWidths", "msg", "preMargin", "postMargin", "addLoopFn", "heightAdjust", "loopWidth", "textConf", "log", "adjustCreatedDestroyedData", "index", "actors", "createdActors", "destroyedActors", "receiverAdjustment", "actor", "adjustment", "__name", "senderAdjustment", "ACTOR_TYPE_WIDTH", "getMaxMessageWidthPerActor", "messages", "diagObj", "maxMessageWidthPerActor", "isNote", "isMessage", "textFont", "noteFont", "wrappedMessage", "messageWidth", "calculateActorMargins", "actorToMessageWidth", "boxes", "maxHeight", "prop", "actorFont", "actDims", "actorKey", "nextActor", "actorWidth", "maxBoxHeight", "box", "totalWidth", "total", "aKey", "boxMsgDimensions", "minWidth", "missing", "drawNote", "drawMessage", "addActorRenderingData", "drawActors", "drawActorsPopup", "setConf", "actorActivations", "activationBounds", "draw", "getRequiredPopupWidth", "buildNoteModel", "buildMessageModel", "calculateLoopBounds", "sequenceRenderer_default", "init_sequenceRenderer", "__esmMin", "init_src", "init_svgDraw", "init_logger", "init_common", "init_svgDrawCommon", "init_diagramAPI", "init_assignWithDepth", "init_utils", "init_setupGraphViewbox", "it", "acc", "h", "boxModel", "actorModel", "loopModel", "noteModel", "obj", "key", "val", "fun", "starty", "stopy", "_self", "cnt", "updateFn", "type", "item", "n", "_startx", "_stopx", "_starty", "_stopy", "diagram", "actorRect", "stackedSize", "x", "svgDraw_default", "lastActorActivationIdx", "activation", "title", "fill", "loop", "bump", "elem", "rect", "getNoteRect", "g", "rectElem", "textObj", "getTextObj", "textElem", "drawKatex", "drawText", "textHeight", "te", "curr", "cnf", "sequenceIndex", "sequenceVisible", "line", "url", "actorKeys", "verticalPos", "isFooter", "prevWidth", "prevMargin", "prevBox", "height", "doc", "maxWidth", "minMenuWidth", "menuDimensions", "assignWithDepth_default", "actorObj", "activations", "left", "right", "_text", "id", "_version", "securityLevel", "sequence", "sandboxElement", "select_default", "root", "hasBoxes", "hasBoxTitles", "newActors", "activeEnd", "activationData", "sequenceIndexStep", "messagesToDraw", "backgrounds", "e", "fixLifeLineHeights", "requiredBoxSize", "boxHeight", "boxWidth", "width", "configureSvgSize", "extraVertForTitle", "requiredPopupWidth", "labelWidth", "fromActor", "toActor", "shouldWrap", "textDimensions", "fromLeft", "fromRight", "toLeft", "toRight", "isArrowToRight", "isArrowToActivation", "adjustValue", "value", "allBounds", "boundedWidth", "msgDims", "_maxWidthPerActor", "loops", "stack", "current", "toAdd", "a", "stk", "from", "to", "sequenceDiagram_exports", "__export", "diagram", "init_sequenceDiagram", "__esmMin", "init_sequenceDb", "init_styles", "init_sequenceRenderer", "sequenceDiagram_default", "sequenceDb_default", "sequenceRenderer_default", "styles_default", "__name", "wrap", "parser", "classDiagram_default", "init_classDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "$VS", "$VT", "$VU", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "visibilityValues", "ClassMember", "init_classTypes", "__esmMin", "init_diagramAPI", "init_common", "__name", "input", "memberType", "sanitizedInput", "sanitizeText", "getConfig", "displayText", "parseGenericTypes", "cssStyle", "potentialClassifier", "match", "detectedVisibility", "lastChar", "length", "firstChar", "combinedText", "getArrowMarker", "type", "marker", "MERMAID_DOM_ID_PREFIX", "relations", "classes", "styleClasses", "notes", "interfaces", "classCounter", "namespaces", "namespaceCounter", "functions", "sanitizeText", "splitClassNameAndType", "setClassLabel", "addClass", "addInterface", "lookUpDomId", "clear", "getClass", "getClasses", "getRelations", "getNotes", "addRelation", "addAnnotation", "addMember", "addMembers", "addNote", "cleanupLabel", "setCssClass", "defineClass", "setTooltip", "getTooltip", "setLink", "setClickEvent", "setClickFunc", "bindFunctions", "lineType", "relationType", "setupToolTips", "direction", "getDirection", "setDirection", "addNamespace", "getNamespace", "getNamespaces", "addClassesToNamespace", "setCssStyle", "getData", "classDb_default", "init_classDb", "__esmMin", "init_src", "init_logger", "init_diagramAPI", "init_common", "init_utils", "init_commonDb", "init_classTypes", "__name", "txt", "common_default", "getConfig", "_id", "id", "genericType", "className", "split", "label", "name", "classId", "classInterface", "classRelation", "log", "invalidTypes", "annotation", "validatedClassName", "member", "theClass", "memberString", "ClassMember", "members", "text", "note", "ids", "classNode", "style", "styleClass", "s", "newStyle", "value", "tooltip", "namespace", "linkStr", "target", "config", "utils_default", "functionName", "functionArgs", "_domId", "domId", "elemId", "argList", "i", "item", "elem", "element", "fun", "tooltipElem", "select_default", "el", "rect", "dir", "classNames", "styles", "thisClass", "nodes", "edges", "namespaceKey", "node", "classKey", "cnt", "noteNode", "noteClassId", "edge", "_interface", "interfaceNode", "getEdgeId", "setAccTitle", "getAccTitle", "getAccDescription", "setAccDescription", "setDiagramTitle", "getDiagramTitle", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "getDir", "getClasses", "draw", "classRenderer_v3_unified_default", "init_classRenderer_v3_unified", "__esmMin", "init_diagramAPI", "init_logger", "init_insertElementsForSize", "init_render", "init_setupViewPortForSVG", "init_utils", "__name", "parsedItem", "defaultDir", "dir", "parsedItemDoc", "text", "diagramObj", "id", "_version", "diag", "log", "securityLevel", "conf", "layout", "getConfig", "data4Layout", "svg", "getDiagramElement", "getRegisteredLayoutAlgorithm", "render", "padding", "utils_default", "setupViewPortForSVG", "classDiagram_exports", "__export", "diagram", "init_classDiagram", "__esmMin", "init_classDb", "init_styles", "init_classRenderer_v3_unified", "classDiagram_default", "classDb_default", "classRenderer_v3_unified_default", "styles_default", "__name", "cnf", "classDiagram_v2_exports", "__export", "diagram", "init_classDiagram_v2", "__esmMin", "init_classDiagram", "init_classDb", "init_styles", "init_classRenderer_v3_unified", "classDiagram_default", "classDb_default", "classRenderer_v3_unified_default", "styles_default", "__name", "cnf", "parser", "stateDiagram_default", "init_stateDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "stateStmt", "relDescription", "id", "description", "parts", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "DEFAULT_DIAGRAM_DIRECTION", "DEFAULT_NESTED_DOC_DIR", "STMT_STATE", "STMT_RELATION", "STMT_CLASSDEF", "STMT_STYLEDEF", "STMT_APPLYCLASS", "DEFAULT_STATE_TYPE", "DIVIDER_TYPE", "G_EDGE_STYLE", "G_EDGE_ARROWHEADSTYLE", "G_EDGE_LABELPOS", "G_EDGE_LABELTYPE", "G_EDGE_THICKNESS", "SHAPE_STATE", "SHAPE_STATE_WITH_DESC", "SHAPE_START", "SHAPE_END", "SHAPE_DIVIDER", "SHAPE_GROUP", "SHAPE_NOTE", "SHAPE_NOTEGROUP", "CSS_DIAGRAM", "CSS_STATE", "CSS_DIAGRAM_STATE", "CSS_EDGE", "CSS_NOTE", "CSS_NOTE_EDGE", "CSS_EDGE_NOTE_EDGE", "CSS_DIAGRAM_NOTE", "CSS_CLUSTER", "CSS_DIAGRAM_CLUSTER", "CSS_CLUSTER_ALT", "CSS_DIAGRAM_CLUSTER_ALT", "PARENT", "NOTE", "DOMID_STATE", "DOMID_TYPE_SPACER", "NOTE_ID", "PARENT_ID", "init_stateCommon", "__esmMin", "stateDomId", "itemId", "counter", "type", "typeSpacer", "DOMID_TYPE_SPACER", "typeStr", "DOMID_STATE", "insertOrUpdateNode", "nodes", "nodeData", "classes", "cssClass", "classDef", "existingNodeData", "node", "getClassesFromDbInfo", "dbInfoItem", "getStylesFromDbInfo", "nodeDb", "graphItemCount", "setupDoc", "getDir", "dataFetcher", "reset", "init_dataFetcher", "__esmMin", "init_diagramAPI", "init_logger", "init_common", "init_stateCommon", "__name", "parentParsedItem", "doc", "diagramStates", "edges", "altFlag", "look", "log", "item", "STMT_STATE", "DEFAULT_STATE_TYPE", "STMT_RELATION", "edgeData", "G_EDGE_STYLE", "common_default", "getConfig", "G_EDGE_ARROWHEADSTYLE", "G_EDGE_LABELPOS", "G_EDGE_LABELTYPE", "G_EDGE_THICKNESS", "CSS_EDGE", "parsedItem", "defaultDir", "DEFAULT_NESTED_DOC_DIR", "dir", "parsedItemDoc", "parent", "dbState", "classStr", "style", "shape", "SHAPE_STATE", "SHAPE_START", "SHAPE_END", "CSS_DIAGRAM_STATE", "newNode", "SHAPE_STATE_WITH_DESC", "SHAPE_GROUP", "DIVIDER_TYPE", "SHAPE_DIVIDER", "CSS_DIAGRAM_CLUSTER", "CSS_DIAGRAM_CLUSTER_ALT", "noteData", "SHAPE_NOTE", "CSS_DIAGRAM_NOTE", "NOTE_ID", "NOTE", "parentNodeId", "PARENT_ID", "groupData", "SHAPE_NOTEGROUP", "PARENT", "from", "to", "CSS_EDGE_NOTE_EDGE", "getDir", "getClasses", "draw", "stateRenderer_v3_unified_default", "init_stateRenderer_v3_unified", "__esmMin", "init_diagramAPI", "init_logger", "init_insertElementsForSize", "init_render", "init_setupViewPortForSVG", "init_utils", "init_stateCommon", "__name", "parsedItem", "defaultDir", "DEFAULT_NESTED_DOC_DIR", "dir", "parsedItemDoc", "text", "diagramObj", "id", "_version", "diag", "log", "securityLevel", "conf", "layout", "getConfig", "data4Layout", "svg", "getDiagramElement", "render", "padding", "utils_default", "setupViewPortForSVG", "CSS_DIAGRAM", "newClassesList", "startIdIfNeeded", "id", "fixedId", "START_NODE", "startEndCount", "START_TYPE", "startTypeIfNeeded", "type", "DEFAULT_STATE_TYPE", "endIdIfNeeded", "END_NODE", "END_TYPE", "endTypeIfNeeded", "addRelationObjs", "item1", "item2", "relationTitle", "id1", "type1", "id2", "type2", "addState", "currentDocument", "common_default", "getConfig", "COLOR_KEYWORD", "FILL_KEYWORD", "BG_FILL", "STYLECLASS_SEP", "nodes", "edges", "direction", "rootDoc", "classes", "newDoc", "documents", "dividerCnt", "lineType", "relationType", "clone", "setRootDoc", "getRootDoc", "docTranslator", "getRootDocV2", "extract", "clear", "getState", "getStates", "logDocuments", "getRelations", "addRelation", "addDescription", "cleanupLabel", "getDividerId", "addStyleClass", "getClasses", "setCssClass", "setStyle", "setTextStyle", "getDirection", "setDirection", "trimColon", "getData", "stateDb_default", "init_stateDb", "__esmMin", "init_logger", "init_utils", "init_common", "init_diagramAPI", "init_commonDb", "init_dataFetcher", "init_stateRenderer_v3_unified", "init_stateCommon", "__name", "DEFAULT_DIAGRAM_DIRECTION", "o", "log", "parent", "node", "first", "STMT_RELATION", "STMT_STATE", "doc", "currentDoc", "i", "DIVIDER_TYPE", "newNode", "generateId", "docNode", "_doc", "item", "STMT_CLASSDEF", "STMT_STYLEDEF", "ids", "styles", "foundState", "trimmedId", "s", "STMT_APPLYCLASS", "diagramStates", "look", "reset", "dataFetcher", "descr", "note", "textStyles", "des", "doc2", "cssClass", "style", "textStyle", "saveCommon", "title", "theState", "_descr", "label", "styleAttributes", "foundClass", "attrib", "fixedAttrib", "newStyle2", "itemIds", "cssClassName", "itemId", "styleText", "dir", "str", "config", "getDir", "getAccTitle", "setAccTitle", "getAccDescription", "setAccDescription", "setDiagramTitle", "getDiagramTitle", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "idCache", "set", "get", "keys", "size", "id_cache_default", "init_id_cache", "__esmMin", "__name", "key", "val", "k", "drawStartState", "drawDivider", "drawSimpleState", "drawDescrState", "addTitleAndBox", "drawEndState", "drawForkJoinState", "_drawLongText", "drawNote", "drawState", "edgeCount", "drawEdge", "init_shapes", "__esmMin", "init_src", "init_id_cache", "init_stateDb", "init_utils", "init_common", "init_diagramAPI", "init_logger", "__name", "g", "getConfig", "stateDef", "state", "classBox", "addTspan", "textEl", "txt", "isFirst", "tSpan", "titleBox", "titleHeight", "description", "isSecond", "descr", "descrLine", "descrBox", "width", "altBkg", "pad", "dblPad", "orgBox", "orgWidth", "orgX", "title", "titleWidth", "startX", "graphBox", "lineY", "height", "tmp", "_text", "x", "y", "textHeight", "textElem", "text", "lines", "common_default", "tHeight", "line", "span", "textBounds", "note", "rectElem", "textWidth", "elem", "id", "stateInfo", "stateBox", "id_cache_default", "path", "relation", "getRelationType", "type", "stateDb_default", "p", "lineData", "lineFunction", "line_default", "d", "basis_default", "svgPath", "url", "label", "utils_default", "rows", "titleRows", "maxWidth", "minX", "i", "boundsTmp", "log", "boxHeight", "heightAdj", "bounds", "conf", "transformationLog", "setConf", "insertMarkers", "draw", "getLabelWidth", "renderDoc", "stateRenderer_default", "init_stateRenderer", "__esmMin", "init_src", "init_dagre", "init_graphlib", "init_logger", "init_common", "init_shapes", "init_diagramAPI", "init_setupGraphViewbox", "__name", "elem", "text", "id", "_version", "diagObj", "getConfig", "securityLevel", "sandboxElement", "select_default", "root", "doc", "log", "diagram", "rootDoc", "padding", "bounds", "width", "height", "svgWidth", "configureSvgSize", "parentId", "altBkg", "domDocument", "graph", "Graph", "i", "edgeFreeDoc", "states", "relations", "keys", "first", "key", "stateDef", "node", "sub", "addTitleAndBox", "boxBounds", "drawState", "noteDef", "note", "cnt", "relation", "common_default", "layout", "svgElem", "v", "divider", "parent", "pWidth", "pShift", "stateBox", "e", "drawEdge", "stateInfo", "stateDiagram_exports", "__export", "diagram", "init_stateDiagram", "__esmMin", "init_stateDb", "init_styles", "init_stateRenderer", "stateDiagram_default", "stateDb_default", "stateRenderer_default", "styles_default", "__name", "cnf", "stateDiagram_v2_exports", "__export", "diagram", "init_stateDiagram_v2", "__esmMin", "init_stateDiagram", "init_stateDb", "init_styles", "init_stateRenderer_v3_unified", "stateDiagram_default", "stateDb_default", "stateRenderer_v3_unified_default", "styles_default", "__name", "cnf", "parser", "journey_default", "init_journey", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "currentSection", "sections", "tasks", "rawTasks", "clear", "addSection", "getSections", "getTasks", "updateActors", "addTask", "addTaskOrg", "compileTasks", "getActors", "journeyDb_default", "init_journeyDb", "__esmMin", "init_diagramAPI", "init_commonDb", "__name", "txt", "allItemsProcessed", "maxDepth", "iterationCount", "tempActors", "task", "descr", "taskData", "pieces", "score", "peeps", "peopleList", "s", "rawTask", "newTask", "compileTask", "pos", "allProcessed", "i", "getConfig", "setDiagramTitle", "getDiagramTitle", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "drawRect", "drawFace", "drawCircle", "drawText", "drawLabel", "drawSection", "taskCount", "drawTask", "drawBackgroundRect", "_drawTextCandidateFunc", "initGraphics", "svgDraw_default", "init_svgDraw", "__esmMin", "init_src", "init_svgDrawCommon", "__name", "elem", "rectData", "element", "faceData", "circleElement", "face", "smile", "arc", "arc_default", "sad", "ambivalent", "circleData", "textData", "txtObject", "genPoints", "x", "y", "width", "height", "cut", "polygon", "section", "conf", "g", "rect", "getNoteRect", "task", "center", "maxHeight", "xPos", "person", "colour", "circle", "bounds", "byText", "content", "textAttrs", "text", "_setTextAttrs", "byTspan", "taskFontSize", "taskFontFamily", "lines", "i", "dy", "byFo", "body", "toText", "fromTextAttrsDict", "key", "graphics", "drawActorLegend", "diagram", "conf", "getConfig", "yPos", "actors", "person", "colour", "circleData", "svgDraw_default", "labelData", "setConf", "LEFT_MARGIN", "draw", "bounds", "fills", "textColours", "drawTasks", "journeyRenderer_default", "init_journeyRenderer", "__esmMin", "init_src", "init_svgDraw", "init_diagramAPI", "init_setupGraphViewbox", "__name", "cnf", "key", "text", "id", "version", "diagObj", "securityLevel", "sandboxElement", "select_default", "root", "tasks", "title", "actorNames", "member", "actorPos", "actorName", "box", "height", "width", "configureSvgSize", "extraVertForTitle", "obj", "val", "fun", "startx", "starty", "stopx", "stopy", "_self", "cnt", "updateFn", "type", "item", "n", "_startx", "_stopx", "_starty", "_stopy", "bump", "verticalPos", "lastSection", "sectionVHeight", "taskPos", "sectionNumber", "fill", "num", "i", "task", "taskInSectionCount", "currentSection", "taskIndex", "section", "taskActors", "acc", "journeyDiagram_exports", "__export", "diagram", "init_journeyDiagram", "__esmMin", "init_journey", "init_journeyDb", "init_styles", "init_journeyRenderer", "journey_default", "journeyDb_default", "journeyRenderer_default", "styles_default", "__name", "cnf", "parser", "timeline_default", "init_timeline", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "timelineDb_exports", "__export", "addEvent", "addSection", "addTask", "addTaskOrg", "clear", "timelineDb_default", "getCommonDb", "getSections", "getTasks", "currentSection", "currentTaskId", "sections", "tasks", "rawTasks", "compileTasks", "init_timelineDb", "__esmMin", "init_commonDb", "__name", "commonDb_exports", "txt", "allItemsProcessed", "maxDepth", "iterationCount", "period", "length", "event", "rawTask", "task", "descr", "newTask", "compileTask", "pos", "allProcessed", "i", "wrap", "text", "width", "select_default", "words", "word", "line", "lineHeight", "y", "dy", "tspan", "j", "MAX_SECTIONS", "drawRect", "drawFace", "drawCircle", "drawText", "drawLabel", "drawSection", "taskCount", "drawTask", "drawBackgroundRect", "getTextObj", "getNoteRect", "_drawTextCandidateFunc", "initGraphics", "drawNode", "getVirtualNodeHeight", "defaultBkg", "svgDraw_default", "init_svgDraw", "__esmMin", "init_src", "__name", "elem", "rectData", "rectElem", "element", "faceData", "circleElement", "face", "smile", "arc", "arc_default", "sad", "ambivalent", "circleData", "textData", "nText", "textElem", "span", "txtObject", "genPoints", "x", "height", "cut", "polygon", "section", "conf", "g", "rect", "task", "center", "maxHeight", "bounds", "byText", "content", "textAttrs", "colour", "_setTextAttrs", "byTspan", "taskFontSize", "taskFontFamily", "lines", "i", "byFo", "body", "toText", "fromTextAttrsDict", "key", "graphics", "node", "fullSection", "nodeElem", "bkgElem", "bbox", "fontSize", "draw", "drawTasks", "drawEvents", "timelineRenderer_default", "init_timelineRenderer", "__esmMin", "init_src", "init_svgDraw", "init_logger", "init_diagramAPI", "init_setupGraphViewbox", "__name", "text", "id", "version", "diagObj", "conf", "getConfig", "LEFT_MARGIN", "log", "securityLevel", "sandboxElement", "select_default", "svg", "tasks", "title", "svgDraw_default", "sections", "maxSectionHeight", "maxTaskHeight", "depthY", "sectionBeginY", "masterX", "masterY", "sectionNumber", "hasSections", "section", "sectionNode", "sectionHeight", "maxEventCount", "maxEventLineLength", "i", "task", "taskNode", "taskHeight", "maxEventLineLengthTemp", "event", "eventNode", "tasksForSection", "sectionNodeWrapper", "node", "box", "setupGraphViewbox", "diagram", "sectionColor", "isWithoutSections", "taskWrapper", "lineWrapper", "lineLength", "events", "maxEventHeight", "eventBeginY", "eventWrapper", "eventHeight", "genSections", "getStyles", "styles_default", "init_styles", "__esmMin", "init_dist", "__name", "options", "sections", "i", "is_dark_default", "lighten_default", "darken_default", "sw", "timeline_definition_exports", "__export", "diagram", "init_timeline_definition", "__esmMin", "init_timeline", "init_timelineDb", "init_timelineRenderer", "init_styles", "timelineDb_exports", "timelineRenderer_default", "timeline_default", "styles_default", "parser", "mindmap_default", "init_mindmap", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "nodes", "cnt", "elements", "clear", "getParent", "getMindmap", "addNode", "nodeType", "getType", "setElementForId", "decorateNode", "type2Str", "getLogger", "getElementById", "db", "mindmapDb_default", "init_mindmapDb", "__esmMin", "init_diagramAPI", "init_common", "init_logger", "init_defaultConfig", "__name", "level", "i", "id", "descr", "type", "log", "conf", "getConfig", "padding", "defaultConfig_default", "node", "sanitizeText", "parent", "startStr", "endStr", "element", "decoration", "config", "_typeof", "obj", "_classCallCheck", "instance", "Constructor", "_defineProperties", "target", "props", "i", "descriptor", "_createClass", "protoProps", "staticProps", "_defineProperty$1", "key", "value", "_slicedToArray", "arr", "_arrayWithHoles", "_iterableToArrayLimit", "_unsupportedIterableToArray", "_nonIterableRest", "_i", "_arr", "_n", "_d", "_s", "_e", "err", "o", "minLen", "_arrayLikeToArray", "n", "len", "arr2", "_createForOfIteratorHelper", "allowArrayLike", "it", "F", "__name", "e", "normalCompletion", "didErr", "step", "isObject", "type", "createCommonjsModule", "fn", "module", "trimmedEndIndex", "string", "index", "reWhitespace", "baseTrim", "_trimmedEndIndex", "reTrimStart", "getRawTag", "isOwn", "hasOwnProperty$4", "symToStringTag$1", "tag", "unmasked", "result", "nativeObjectToString$1", "objectToString", "nativeObjectToString", "baseGetTag", "undefinedTag", "nullTag", "symToStringTag", "_getRawTag", "_objectToString", "isObjectLike", "isSymbol", "isObjectLike_1", "_baseGetTag", "symbolTag", "toNumber", "isSymbol_1", "NAN", "isObject_1", "other", "_baseTrim", "isBinary", "reIsBinary", "reIsOctal", "freeParseInt", "reIsBadHex", "debounce", "func", "wait", "options", "lastArgs", "lastThis", "maxWait", "timerId", "lastCallTime", "lastInvokeTime", "leading", "maxing", "trailing", "FUNC_ERROR_TEXT$1", "toNumber_1", "nativeMax", "invokeFunc", "time", "args", "thisArg", "leadingEdge", "timerExpired", "remainingWait", "timeSinceLastCall", "timeSinceLastInvoke", "timeWaiting", "nativeMin", "shouldInvoke", "now_1", "trailingEdge", "cancel", "flush", "debounced", "isInvoking", "clusteringDistance", "method", "length", "getP", "getQ", "nodeP", "nodeQ", "impl", "fn$6", "distances", "isKey", "object", "isArray_1", "reIsPlainProp", "reIsDeepProp", "isFunction", "funcTag", "genTag", "asyncTag", "proxyTag", "isMasked", "maskSrcKey", "toSource", "funcToString$1", "baseIsNative", "_isMasked", "pattern", "isFunction_1", "reIsNative", "reIsHostCtor", "_toSource", "getValue$1", "getNative", "_getValue", "_baseIsNative", "hashClear", "_nativeCreate", "hashDelete", "hashGet", "data", "HASH_UNDEFINED$1", "hasOwnProperty$2", "hashHas", "hasOwnProperty$1", "hashSet", "HASH_UNDEFINED", "Hash", "entries", "entry", "listCacheClear", "eq", "assocIndexOf", "array", "eq_1", "listCacheDelete", "_assocIndexOf", "lastIndex", "splice", "listCacheGet", "listCacheHas", "listCacheSet", "ListCache", "mapCacheClear", "_Hash", "_Map", "_ListCache", "isKeyable", "getMapData", "map", "_isKeyable", "mapCacheDelete", "_getMapData", "mapCacheGet", "mapCacheHas", "mapCacheSet", "size", "MapCache", "memoize", "resolver", "FUNC_ERROR_TEXT", "memoized", "cache", "_MapCache", "memoizeCapped", "memoize_1", "MAX_MEMOIZE_SIZE", "arrayMap", "iteratee", "baseToString", "_arrayMap", "symbolToString", "INFINITY$1", "toString$1", "_baseToString", "castPath", "_isKey", "_stringToPath", "toString_1", "toKey", "INFINITY", "baseGet", "path", "_castPath", "_toKey", "get", "defaultValue", "_baseGet", "baseAssignValue", "_defineProperty", "assignValue", "objValue", "hasOwnProperty", "_baseAssignValue", "isIndex", "MAX_SAFE_INTEGER", "reIsUint", "baseSet", "customizer", "nested", "newValue", "_isIndex", "_assignValue", "set", "_baseSet", "copyArray", "source", "toPath", "_copyArray", "forEachCompound", "eles", "includeSelf", "recursiveStep", "q", "did", "Set$1", "cy", "hasCompounds", "ele", "_ele", "addChildren", "children", "child", "addParent", "parent", "addParentAndChildren", "defineDegreeFunction", "callback", "includeLoops", "self", "degree", "node", "connectedEdges", "edge", "defineDegreeBoundsFunction", "degreeFn", "ret", "nodes", "returnFalse", "returnTrue", "Emitter", "opts", "emptyOpts", "context", "defaultsKeys", "defaults$8", "styleCache", "_p", "val", "cacheStyleFunction", "hashString", "cachePrototypeStyleFunction", "selfFn", "checkCompound", "parentOk", "parents", "defineDerivedStateFunction", "specs", "ok", "edgeOkViaNode", "hasCompoundNodes", "src", "tgt", "defineSwitchFunction", "params", "changedEles", "handler", "_handler", "addlEvents", "able", "changed", "overrideAble", "changedColl", "defineSwitchSet", "elesfn$3", "defineSourceFunction", "selector", "sources", "defineEdgesWithFunction", "otherNodes", "elements", "p", "h", "edges", "edgeData", "thisToOther", "otherToThis", "edgeConnectsThisAndOther", "defineParallelEdgesFunction", "defaults", "extend", "edge1", "edge1_p", "src1", "srcid1", "tgtid1", "srcEdges1", "j", "edge2", "edge2data", "tgtid2", "srcid2", "codirected", "oppdirected", "generateCubicBezier", "mX1", "mY1", "mX2", "mY2", "NEWTON_ITERATIONS", "NEWTON_MIN_SLOPE", "SUBDIVISION_PRECISION", "SUBDIVISION_MAX_ITERATIONS", "kSplineTableSize", "kSampleStepSize", "float32ArraySupported", "mSampleValues", "A", "aA1", "aA2", "B", "C", "calcBezier", "aT", "getSlope", "newtonRaphsonIterate", "aX", "aGuessT", "currentSlope", "currentX", "calcSampleValues", "_i2", "binarySubdivide", "aA", "aB", "currentT", "getTForX", "intervalStart", "currentSample", "lastSample", "dist", "guessForT", "initialSlope", "_precomputed", "precompute", "f", "str", "getEasedValue", "start", "end", "percent", "easingFn", "getValue", "prop", "spec", "ease", "startProp", "endProp", "propSpec", "number$1", "easedArr", "si", "ei", "step$1", "ani", "now", "isCore", "isEles", "ani_p", "pEasing", "startTime", "style", "easings", "easingVals", "easingProp", "name", "easing", "startPos", "endPos", "newPos", "valid", "startPan", "endPan", "pan", "animatingPan", "startZoom", "endZoom", "animatingZoom", "bound", "_name", "easedVal", "startAnimation", "stepAll", "doneEles", "stepOne", "current", "queue", "ranAnis", "next", "callbacks", "_callbacks", "cb", "ranEleAni", "handledThisEle", "ranCoreAni", "BreadthFirstLayout", "defaults$7", "deprecatedOptionDefaults", "CircleLayout", "defaults$6", "ConcentricLayout", "defaults$5", "CoseLayout", "defaults$4", "notEdges", "sourceId", "targetId", "hasSource", "hasTarget", "GridLayout", "defaults$3", "NullLayout", "defaults$2", "PresetLayout", "defaults$1", "RandomLayout", "NullRenderer", "drawPreparedRoundCorner", "ctx", "roundCorner", "getRoundCorner", "previousPoint", "currentPoint", "nextPoint", "radiusMax", "isArcRadius", "calcCornerArc", "x", "y", "cRadius", "startX", "startY", "stopX", "stopY", "v1", "radDirection", "v2", "drawDirection", "getPts", "pts", "retPts", "pushBezierPts", "r", "qbezierAt$1", "p1", "p2", "p3", "t", "qbezierAt", "bpts", "polygon", "points", "pt", "triangleBackcurve", "controlPoint", "firstPt", "triangleTee", "trianglePoints", "teePoints", "triPts", "teePts", "firstTeePt", "circleTriangle", "rx", "ry", "firstTrPt", "circle", "roundRect", "width", "height", "radius", "stroke", "b64ToBlob", "b64", "mimeType", "bytes", "buff", "buffUint8", "b64UriToB64", "b64uri", "output", "canvas", "getB64Uri", "Promise$1", "resolve", "reject", "blob", "CanvasRenderer", "containerWindow", "document", "CRp", "tapHlOffAttr", "tapHlOffStyle", "containerStyle", "container", "styleMap", "ms", "k", "emptyBb", "makeBoundingBox", "getBoxCenter", "bb", "getCenterOffset", "backgroundTimestampHasChanged", "same", "getStyleKey", "getLabelKey", "getSourceLabelKey", "getTargetLabelKey", "drawElement", "scaledLabelShown", "useEleOpacity", "drawLabel", "drawSourceLabel", "drawTargetLabel", "getElementBox", "getLabelBox", "getSourceLabelBox", "getTargetLabelBox", "isLabelVisibleAtScale", "getElementRotationPoint", "addTextMargin", "prefix", "pre", "getRsPt", "rs", "getLabelRotationPoint", "getSourceLabelRotationPoint", "getTargetLabelRotationPoint", "getElementRotationOffset", "getSourceLabelRotationOffset", "getTargetLabelRotationOffset", "getLabelRotationOffset", "eleTxrCache", "ElementTextureCache", "lblTxrCache", "slbTxrCache", "tlbTxrCache", "lyrTxrCache", "LayeredTextureCache", "willDraw", "refineInLayers", "reqs", "setExtension", "registrant", "ext", "overrideErr", "field", "warn", "Core", "Collection", "Layout", "plainObject", "layoutProto", "optLayoutFns", "fnName", "regStop", "anis", "getCy", "layout", "emitterOpts", "evt", "define", "BaseRenderer", "getExtension", "bProto", "RegistrantRenderer", "rProto", "Renderer", "proto", "pName", "pVal", "existsInR", "_pName", "error", "setMap", "extensions", "getMap", "setModule", "moduleType", "moduleName", "modules", "getModule", "_window", "navigator", "typeofstr", "typeofobj", "typeoffn", "typeofhtmlele", "instanceStr", "integer", "htmlElement", "elementOrCollection", "element", "collection", "core", "stylesheet", "event", "emptyString", "domElement", "boundingBox", "promise", "memoize$1", "camel2dash", "dash2camel", "prependCamel", "capitalize", "number", "rgba", "rgbaNoBackRefs", "hsla", "hslaNoBackRefs", "hex3", "hex6", "ascending", "descending", "hex2tuple", "hsl2tuple", "rgb2tuple", "colorname2tuple", "color2tuple", "colors", "commonjsGlobal", "freeGlobal", "_freeGlobal", "freeSelf", "root", "_root", "Symbol$1", "_Symbol", "objectProto$5", "objectProto$4", "debounce_1", "performance", "pnow", "raf", "requestAnimationFrame", "performanceNow", "DEFAULT_HASH_SEED", "K", "DEFAULT_HASH_SEED_ALT", "hashIterableInts", "hashInt", "hashIntAlt", "combineHashes", "combineHashesArray", "hashArrays", "hashIntsArray", "hashStrings", "hashStringsArray", "warningsEnabled", "warnSupported", "traceSupported", "MAX_INT$1", "trueify", "falsify", "zeroify", "noop$1", "warnings", "clone", "copy", "copyArray$1", "uuid", "_staticEmptyObject", "staticEmptyObject", "defaults$g", "removeFromArray", "clearArray", "push", "getPrefixedProperty", "setPrefixedProperty", "ObjectMap", "Map$2", "undef", "ObjectSet", "Element", "defineSearch", "elesfn$v", "heap$1", "heap", "dijkstraDefaults", "elesfn$u", "elesfn$t", "aStarDefaults", "elesfn$s", "floydWarshallDefaults", "elesfn$r", "bellmanFordDefaults", "elesfn$q", "sqrt2", "collapse", "contractUntil", "elesfn$p", "copyPosition", "modelToRenderedPosition", "renderedToModelPosition", "array2point", "min", "max", "mean", "median", "deg2rad", "getAngleFromDisp", "log2", "signum", "sqdist", "inPlaceSumNormalize", "qbezierPtAt", "lineAt", "copyBoundingBox", "clearBoundingBox", "shiftBoundingBox", "updateBoundingBox", "expandBoundingBoxByPoint", "expandBoundingBox", "expandBoundingBoxSides", "assignBoundingBox", "boundingBoxesIntersect", "inBoundingBox", "pointInBoundingBox", "boundingBoxInBoundingBox", "roundRectangleIntersectLine", "inLineVicinity", "inBezierVicinity", "solveQuadratic", "solveCubic", "sqdistToQuadraticBezier", "sqdistToFiniteLine", "pointInsidePolygonPoints", "pointInsidePolygon", "pointInsideRoundPolygon", "joinLines", "expandPolygon", "intersectLineEllipse", "checkInEllipse", "intersectLineCircle", "midOfThree", "finiteLinesIntersect", "polygonIntersectLine", "roundPolygonIntersectLine", "shortenIntersection", "generateUnitNgonPointsFitToSquare", "fitPolygonToSquare", "generateUnitNgonPoints", "getRoundRectangleRadius", "getRoundPolygonRadius", "getCutRectangleCornerLength", "bezierPtsToQuadCoeff", "getBarrelCurveConstants", "pageRankDefaults", "elesfn$o", "defaults$f", "elesfn$n", "defaults$e", "elesfn$m", "defaults$d", "elesfn$l", "defaults$c", "setOptions$3", "getSimilarity$1", "addLoops", "normalize", "mmult", "expand", "inflate", "hasConverged", "assign$2", "isDuplicate", "removeDuplicates", "markovClustering", "markovClustering$1", "identity", "absDiff", "addAbsDiff", "addSquaredDiff", "sqrt", "maxAbsDiff", "getDistance", "defaults$b", "setOptions$2", "getDist", "randomCentroids", "classify", "buildCluster", "haveValuesConverged", "haveMatricesConverged", "seenBefore", "randomMedoids", "findCost", "kMeans", "kMedoids", "updateCentroids", "updateMembership", "assign$1", "fuzzyCMeans", "kClustering", "defaults$a", "linkageAliases", "setOptions$1", "mergeClosest", "getAllChildren", "buildDendrogram", "buildClustersFromTree", "hierarchicalClustering", "hierarchicalClustering$1", "defaults$9", "setOptions", "getSimilarity", "getPreference", "findExemplars", "assignClusters", "assign", "affinityPropagation", "affinityPropagation$1", "hierholzerDefaults", "elesfn$k", "hopcroftTarjanBiconnected", "hopcroftTarjanBiconnected$1", "tarjanStronglyConnected", "tarjanStronglyConnected$1", "elesfn$j", "STATE_PENDING", "STATE_FULFILLED", "STATE_REJECTED", "api", "deliver", "execute", "execute_handlers", "Animation", "anifn", "define$3", "isArray", "coreJsData", "_coreJsData", "funcProto$1", "reRegExpChar", "funcProto", "objectProto$3", "funcToString", "hasOwnProperty$3", "_getNative", "nativeCreate", "_hashClear", "_hashDelete", "objectProto$2", "_hashGet", "objectProto$1", "_hashHas", "_hashSet", "_listCacheClear", "arrayProto", "_listCacheDelete", "_listCacheGet", "_listCacheHas", "_listCacheSet", "Map$1", "_mapCacheClear", "_mapCacheDelete", "_mapCacheGet", "_mapCacheHas", "_mapCacheSet", "_memoizeCapped", "rePropName", "reEscapeChar", "stringToPath", "symbolProto", "get_1", "defineProperty", "objectProto", "set_1", "toPath_1", "define$2", "define$1", "elesfn$i", "elesfn$h", "tokens", "newQuery", "Type", "stateSelectors", "lookup", "stateSelectorMatches", "stateSelectorRegex", "cleanMetaChars", "replaceLastQuery", "exprs", "consumeExpr", "consumeWhitespace", "parse", "toString", "parse$1", "valCmp", "boolCmp", "existCmp", "data$1", "meta", "match", "matches$1", "filter", "matches", "matching", "Selector", "selfn", "elesfn$g", "elesfn$f", "fn$5", "elesfn$e", "elesfn$d", "fn$4", "elesfn$c", "beforePositionSet", "positionDef", "position", "fn$3", "elesfn$b", "noninf", "updateBounds", "updateBoundsFromBox", "prefixedProperty", "updateBoundsFromArrow", "updateBoundsFromLabel", "updateBoundsFromOutline", "boundingBoxImpl", "getKey", "getBoundingBoxPosKey", "cachedBoundingBoxImpl", "defBbOpts", "defBbOptsKey", "filledBbOpts", "bounds", "fn$2", "elesfn$a", "defineDimFns", "widthHeight", "ifEdge", "ifEdgeRenderedPosition", "ifEdgeRenderedPositions", "controlPoints", "segmentPoints", "sourceEndpoint", "targetEndpoint", "midpoint", "renderedName", "edgePoints", "dimensions", "Event", "eventRegex", "universalNamespace", "forEachEvent", "makeEventObj", "forEachEventObj", "emitterOptions$1", "argSelector$1", "elesfn$9", "elesfn$8", "fn$1", "elesfn$7", "zIndexSort", "elesfn$6", "defineSymbolIterator", "getLayoutDimensionOptions", "elesfn$5", "elesfn$4", "eleTakesUpSpace", "eleInteractive", "parentInteractive", "eleVisible", "edgeVisibleViaNode", "elesfn$2", "defineDagExtremity", "defineDagOneHop", "defineDagAllHops", "elesfn$1", "corefn$9", "generateSpringRK4", "cubicBezier", "corefn$8", "emitterOptions", "argSelector", "elesfn", "corefn$7", "corefn$6", "corefn$5", "rendererDefaults", "corefn$4", "corefn$3", "styfn$8", "TRUE", "FALSE", "styfn$7", "styfn$6", "styfn$5", "styfn$4", "styfn$3", "styfn$2", "styfn$1", "Style", "styfn", "corefn$2", "defaultSelectionType", "corefn$1", "corefn", "getInfo", "setInfo", "DEBUG", "createLayoutInfo", "findLCA", "findLCA_aux", "printLayoutInfo", "randomizePositions", "getScaleInBoundsFn", "refreshPositions", "calculateNodeForces", "randomDistance", "nodeRepulsion", "nodesOverlap", "findClippingPoint", "calculateEdgeForces", "calculateGravityForces", "propagateForces", "updatePositions", "limitForce", "updateAncestryBoundaries", "separateComponents", "noop", "throwImgErr", "BRp$f", "BRp$e", "BRp$d", "sinA", "sinA90", "angle", "halfAngle", "lenOut", "limit", "lastPoint", "asVec", "invertVec", "BRp$c", "BRp$b", "BRp$a", "BRp$9", "lineAngleFromDelta", "lineAngle", "bezierAngle", "BRp$8", "TOO_SMALL_CUT_RECT", "warnedCutRect", "BRp$7", "BRp$6", "BRp$5", "BRp$4", "BRp$3", "BRp$2", "BRp$1", "beforeRenderCallbacks", "BR", "BRp", "fullFpsTime", "defs", "ElementTextureCacheLookup", "minTxrH", "txrStepH", "minLvl$1", "maxLvl$1", "maxZoom$1", "eleTxrSpacing", "defTxrWidth", "maxTxrW", "maxTxrH", "minUtility", "maxFullness", "maxFullnessChecks", "deqCost$1", "deqAvgCost$1", "deqNoDrawCost$1", "deqFastCost$1", "deqRedrawThreshold$1", "maxDeqSize$1", "getTxrReasons", "initDefaults", "ETCp", "defNumLayers", "minLvl", "maxLvl", "maxZoom", "deqRedrawThreshold", "refineEleDebounceTime", "deqCost", "deqAvgCost", "deqNoDrawCost", "deqFastCost", "maxDeqSize", "invalidThreshold", "maxLayerArea", "useHighQualityEleTxrReqs", "LTCp", "layerIdPool", "MAX_INT", "CRp$a", "CRp$9", "getZeroRotation", "getLabelRotation", "getSourceLabelRotation", "getTargetLabelRotation", "getOpacity", "getTextOpacity", "CRp$8", "drawEdgeOverlayUnderlay", "CRp$7", "CRp$6", "CRp$5", "drawNodeOverlayUnderlay", "CRp$4", "motionBlurDelay", "CRp$3", "sin0", "cos0", "sin", "cos", "ellipseStepSize", "CRp$2", "CRp$1", "CR", "pathsImpld", "renderer", "incExts", "extension", "Stylesheet", "sheetfn", "version", "cytoscape", "init_cytoscape_esm", "__esmMin", "keyFn", "memoizedFn", "v", "a", "b", "keys", "hex", "shortHex", "g", "base", "hsl", "s", "l", "hue2rgb", "m", "rgb", "isPct", "channel", "atLeastOneIsPct", "allArePct", "alpha", "color", "iterator", "seed", "hash", "num", "hash1", "hash2", "hashes", "hashes1", "hashes2", "ints", "strs", "msg", "enabled", "_defaults", "filledOpts", "optVal", "oneCopy", "otherArr", "el", "propName", "arrayOrObjectSet", "_this", "restore", "group", "rpos", "zoom", "classes", "cls", "bypass", "roots", "directed", "Q", "connectedNodes", "connectedBy", "id2depth", "V", "found", "_this$byGroup", "vi", "viId", "_loop", "vId", "depth", "prevEdge", "prevNode", "vwEdges", "w", "wId", "_ret", "connectedEles", "exports", "Heap", "defaultCmp", "floor", "heapify", "heappop", "heappush", "heappushpop", "heapreplace", "insort", "nlargest", "nsmallest", "updateItem", "_siftdown", "_siftup", "lo", "hi", "cmp", "mid", "item", "lastelt", "returnitem", "_ref", "_len", "_ref1", "_results", "_results1", "_j", "pos", "elem", "los", "startpos", "newitem", "parentpos", "childpos", "endpos", "rightpos", "factory", "_dijkstraDefaults", "weight", "weightFn", "prev", "knownDist", "setDist", "d", "distBetween", "u", "uvs", "smallestDistance", "smallestEdge", "_weight", "smalletsDist", "uid", "neighbors", "vid", "vDist", "alt", "S", "numNodes", "forest", "findSetIndex", "setUIndex", "setVIndex", "setU", "setV", "_aStarDefaults", "goal", "heuristic", "sid", "tid", "gScore", "fScore", "closedSetIds", "openSet", "openSetIds", "cameFrom", "cameFromEdge", "addToOpenSet", "id", "cMin", "cMinId", "popFromOpenSet", "isInOpenSet", "steps", "pathNode", "pathNodeId", "pathEdge", "wSrc", "wTgt", "wid", "tempScore", "_floydWarshallDefault", "N", "Nsq", "indexOf", "atIndex", "edgeNext", "st", "ts", "ik", "ij", "kj", "getArgEle", "indexOfArgEle", "res", "from", "to", "fromNode", "_bellmanFordDefaults", "infoMap", "hasNegativeWeightCycle", "negativeWeightCycles", "numEdges", "getNodeFromTo", "distanceTo", "pathTo", "thisStart", "_getInfo", "pred", "info", "replacedEdge", "checkForEdgeReplacement", "node1", "node2", "info1", "info2", "srcInfo", "tgtInfo", "negativeWeightCycleIds", "_edge", "_src", "_tgt", "_weight2", "srcDist", "tgtDist", "negativeNodes", "numNegativeNodes", "cycle", "_node", "smallestId", "smallestIndex", "c", "cycleId", "edgeIndex", "nodeMap", "remainingEdges", "edgeInfo", "sourceIn", "targetIn", "partition1", "partition2", "newEdges", "metaNodeMap", "sizeLimit", "numIter", "stopSize", "edgeIndexes", "minCutSize", "minCutEdgeIndexes", "minCutNodeMap", "metaNodeMap2", "copyNodesMap", "_i3", "iter", "_i4", "edgesState", "edgesState2", "res1", "res2", "cut", "witnessNodePartition", "_i5", "partitionId", "constructComponent", "subset", "component", "components", "begin", "total", "sort", "includeHoles", "off", "deg", "dispX", "dispY", "dx", "dy", "p0", "vec", "vecDist", "normVec", "bb1", "bb2", "padding", "top", "right", "bottom", "left", "_padding", "nodeX", "nodeY", "cornerRadius", "halfWidth", "halfHeight", "doWidth", "doHeight", "straightLineIntersections", "topStartX", "topStartY", "topEndX", "topEndY", "rightStartX", "rightStartY", "rightEndX", "rightEndY", "bottomStartX", "bottomStartY", "bottomEndX", "bottomEndY", "leftStartX", "leftStartY", "leftEndX", "leftEndY", "arcIntersections", "topLeftCenterX", "topLeftCenterY", "topRightCenterX", "topRightCenterY", "bottomRightCenterX", "bottomRightCenterY", "bottomLeftCenterX", "bottomLeftCenterY", "lx1", "ly1", "lx2", "ly2", "tolerance", "x1", "x2", "y1", "y2", "x3", "y3", "sqrtR", "denom", "root1", "root2", "epsilon", "discriminant", "dum1", "term1", "r13", "zeroThreshold", "minDistanceSquared", "curX", "curY", "distSquared", "offset", "line", "lineSq", "hypSq", "dotProduct", "adjSq", "up", "basePoints", "centerX", "centerY", "direction", "transformedPoints", "expandedLineSet", "corners", "cutPolygonPoints", "corner", "squaredDistance", "lineSet", "vertices", "currentLineStartX", "currentLineStartY", "currentLineEndX", "currentLineEndY", "nextLineStartX", "nextLineStartY", "nextLineEndX", "nextLineEndY", "intersection", "pad", "currentPointX", "currentPointY", "nextPointX", "nextPointY", "offsetX", "offsetY", "offsetLength", "normalizedOffsetX", "normalizedOffsetY", "ellipseWradius", "ellipseHradius", "newLength", "lenProportion", "t1", "t2", "tMin", "tMax", "inRangeParams", "nearIntersectionX", "nearIntersectionY", "farIntersectionX", "farIntersectionY", "x4", "y4", "infiniteLines", "dx13", "dx21", "dx43", "dy13", "dy21", "dy43", "ua_t", "ub_t", "u_b", "ua", "ub", "flptThreshold", "_min", "_max", "intersections", "doTransform", "currentY", "nextX", "nextY", "lines", "lowestIntersection", "lowestSquaredDistance", "amount", "disp", "lenRatio", "sides", "rotationRadians", "minX", "minY", "maxX", "maxY", "sx", "sy", "increment", "startAngle", "currentAngle", "_pageRankDefaults", "dampingFactor", "precision", "iterations", "numNodesSqd", "matrix", "columnSum", "additionalProb", "srcId", "tgtId", "_n2", "_n3", "eigenvector", "temp", "previous", "_i6", "_j2", "_n4", "diff", "_i7", "delta", "indegrees", "outdegrees", "maxIndegree", "maxOutdegree", "_currDegree", "degrees", "maxDegree", "currDegree", "callingEles", "_options", "incoming", "outgoing", "k_in", "k_out", "s_in", "s_out", "connEdges", "harmonic", "closenesses", "maxCloseness", "fw", "currCloseness", "node_i", "_defaults2", "dijkstra", "totalDistance", "weighted", "_C", "P", "_vid", "_v", "vEle", "edgeWeight", "_w", "_w2", "_v2", "attributes", "M", "sum", "col", "row", "_row", "expandFactor", "_M", "inflateFactor", "n2", "roundFactor", "clusters", "cluster", "c1", "c2", "id2position", "sim", "isStillMoving", "currentMax", "init", "visit", "post", "dim", "centroid", "mode", "noNodeP", "ndim", "centroids", "distance", "assignment", "sensitivityThreshold", "medoids", "potentialNewMedoid", "cost", "newCentroid", "curCost", "minCosts", "U", "numerator", "denominator", "_c", "_U", "pow", "_c2", "_c3", "preferredAlias", "dists", "mins", "minKey", "attrs", "n1", "_dist", "merged", "cur", "key1", "key2", "leftStr", "rightStr", "leaves", "retClusters", "dmp", "pref", "validPrefs", "attr", "preference", "R", "indices", "exemplars", "_ei", "ii", "maxI", "maxSum", "old", "Rp", "se", "_i8", "max2", "AS", "_i9", "_j3", "_j4", "_i10", "E", "_sum", "_i11", "_j5", "exemplarsIndices", "clusterIndices", "_i12", "clusterIndex", "_hierholzerDefaults", "dflag", "oddIn", "oddOut", "startVertex", "ind", "outd", "d1", "d2", "walk", "currentNode", "subtour", "adj", "adjTail", "adjHead", "trail", "edgeCount", "stack", "visitedEdges", "buildComponent", "cutset", "nodeId", "biconnectedSearch", "otherNodeId", "edgeId", "cutVertices", "stronglyConnectedSearch", "sourceNodeId", "targetNodeId", "componentNodes", "componentEdges", "executor", "onFulfilled", "onRejected", "curr", "state", "handlers", "then", "resolved", "ps", "resolveAll", "rejectAll", "vals", "doneCount", "fulfill", "isPromise", "opts2", "isEle", "tAni", "wasPlaying", "swap", "_pa", "startStyleProp", "selfIsArrayLike", "all", "complete", "properties", "propertiesEmpty", "panBy", "cyPan", "center", "centerPan", "fit", "fitVp", "vp", "clearQueue", "jumpToEnd", "quote", "subString", "single", "isPathLike", "change", "_valid", "names", "i_a", "l_a", "_i_a", "_l_a", "_privateFields", "_keys", "_key", "validKeyToDelete", "events", "offArgs", "onArgs", "_classes", "classesSet", "eleClasses", "changedEle", "eleHasClass", "className", "toggle", "toggleUndefd", "il", "hasClass", "changedNow", "duration", "ops", "op", "selToFn", "sel", "$1", "examiningQuery", "replacementQuery", "query", "_ref2", "_ref3", "_ref4", "_ref5", "_ref6", "_ref7", "_ref8", "_ref9", "_ref10", "variable", "_ref11", "_ref12", "comparatorOp", "valueIsString", "_ref13", "_ref14", "boolOp", "_ref15", "_ref16", "currentSubject", "compoundCount", "lastQ", "nextQuery", "edgeQuery", "srcTgtQ", "_source", "_target", "nhoodQ", "neighbor", "parentChildQuery", "compound", "subject", "_child", "_parent", "_parent2", "_child2", "pcQChecks", "ancChQuery", "descendant", "ancestor", "_descendant", "_ancestor", "_ancestor2", "_descendant2", "adQChecks", "topQ", "topChk", "topType", "remaining", "expr", "consumed", "currentQuery", "exprInfo", "clean", "cleanVal", "space", "checkToString", "check", "operator", "_operator", "_field", "_field2", "_operator2", "_field3", "queryToString", "lhs", "sub", "rhs", "chk", "fieldVal", "isFieldStr", "isFieldNum", "isValStr", "fieldStr", "valStr", "caseInsensitive", "notExpr", "isIneqCmp", "stateSelector", "qA", "qB", "selectorFunction", "otherSel", "selObj", "thisLength", "collectionLength", "nhood", "arg1", "arg2", "arg3", "arg4", "selectorOrEles", "tch", "ch", "cacheHit", "ancestors", "eleChildren", "add", "silent", "oldPos", "_fn", "_pos", "setting", "ppos", "_ele2", "hasParent", "relativeToParent", "origin", "_hasParent", "_relativeToParent", "_origin", "force", "update", "includeLabels", "computeBiasValues", "propDiff", "propBias", "propBiasComplement", "biasDiff", "biasComplementDiff", "biasTotal", "computePaddingValues", "paddingObject", "relativeTo", "leftVal", "rightVal", "topVal", "bottomVal", "widthBiasDiffs", "diffLeft", "diffRight", "heightBiasDiffs", "diffTop", "diffBottom", "b2", "rstyle", "halfArW", "arrowType", "bbs", "prefixDash", "label", "halign", "valign", "labelWidth", "labelHeight", "labelX", "labelY", "marginX", "marginY", "isEdge", "rotation", "outlineWidth", "borderWidth", "halfBorderWidth", "marginOfError", "lh", "lw", "lw_2", "lh_2", "bbPrefix", "isAutorotate", "isPfValue", "theta", "xo", "yo", "rotate", "px1y1", "px1y2", "px2y1", "px2y2", "bbPrefixRot", "bbRot", "outlineOpacity", "outlineOffset", "nodeShape", "outlineSize", "scaleX", "scaleY", "xOffset", "yOffset", "hDelta", "wDelta", "oBounds", "styleEnabled", "headless", "isNode", "ex1", "ex2", "ey1", "ey2", "manualExpansion", "isDisplayed", "displayed", "overlayOpacity", "overlayPadding", "underlayOpacity", "underlayPadding", "wHalf", "halfW", "halfH", "curveStyle", "hpts", "_temp", "n1pos", "n2pos", "_temp2", "_temp3", "ghost", "gx", "gy", "bbBody", "bbOverlay", "bbLabels", "tf", "usingDefOpts", "currPosKey", "isPosKeySame", "useCache", "isDirty", "needRecalc", "storeOldPos", "getOldPos", "border", "od", "getPoint", "getPoints", "rName", "q1", "q2", "qualifier", "conf", "confOverrides", "eventList", "namespace", "eventObj", "listeners", "listener", "extraParams", "manualCallback", "numListenersBeforeEmit", "_loop2", "selector1", "selector2", "arg", "argSel", "_filter", "filterEles", "include", "toRemove", "remove", "col1", "col2", "col1Smaller", "colS", "colL", "inOther", "both", "retEles", "toAdd", "toAddEle", "unmergedLastEle", "lastEleI", "lastEle", "lastEleId", "toRmFn", "mapFn", "initialValue", "valFn", "maxEle", "minEle", "getDepth", "depthDiff", "getEleDepth", "eleDiff", "zDiff", "thisSize", "sortFn", "sorted", "srcDepth", "tgtDepth", "typeofUndef", "isIteratorSupported", "dims", "bbDim", "layoutEles", "getMemoizeKey", "fnMem", "calculateSpacing", "spacing", "nodesBb", "spacingVector", "useSpacingFactor", "spacingBb", "getFinalPos", "animateNode", "fitAni", "zoomPanAni", "dirty", "notifyRenderer", "bEles", "updatedEles", "property", "includeNonDefault", "overriddenStyle", "pstyle", "updateTransitions", "parentOpacity", "opacity", "disqualified", "oEles", "sEles", "sElesIds", "newNext", "nid", "otherNode", "visited", "unvisited", "visitInComponent", "cmpt", "unique", "removed", "createdElements", "elesIds", "json", "_data", "_l", "element$1", "_data2", "move", "newParentValSpecd", "checkSwitch", "trueFnName", "falseFnName", "obj_k", "jsons", "elesArr", "addToPool", "cy_p", "removeFromElements", "_private", "_data3", "fields", "fieldsLength", "badSourceOrTarget", "_data4", "parentId", "specifiedParent", "selfAsParent", "restored", "_ele3", "toUpdateStyle", "removeFromPool", "elesToRemove", "elesToRemoveIds", "addConnectedEdges", "alreadyAdded", "removeEdgeRef", "removeParallelRef", "pllEdge", "alteredParents", "removeChildRef", "pid", "_ele4", "pllEdges", "elesStillInside", "_ele5", "removedElements", "_ele6", "struct", "modifyPool", "srcExists", "tgtExists", "_data5", "parentExists", "pidToAssign", "updated", "_data6", "_jsons", "elesByGroup", "_jsons2", "grs", "elesArray", "jl", "_json", "springAccelerationForState", "springEvaluateStateWithDerivative", "initialState", "dt", "derivative", "springIntegrateState", "dxdt", "dvdt", "springRK4Factory", "tension", "friction", "initState", "time_lapsed", "DT", "have_duration", "last_state", "percentComplete", "bezier", "spring", "headlessStep", "eventName", "eventEles", "bool", "ids", "pxRatio", "RendererProto", "rOpts", "domEle", "ie", "cxtMeta", "cxtStyle", "app", "hintsDiff", "oldCxtKey", "newCxtKey", "dualCxtKey", "cachedVal", "diffProps", "addedProp", "cxt", "oldHasCxt", "newHasCxt", "cxtHasDiffed", "cxtHasMappedProps", "laterCxtOverrides", "laterCxt", "hasLaterCxt", "cxtKey", "prevKey", "contextSelectorMatches", "cxtStyles", "hasCxt", "retDiffProps", "types", "diffPropName", "cxtProp", "eleProp", "mapping", "fnValue", "retDiffProp", "propNames", "propGrKeys", "propHash", "seedKey", "oldStyleKey", "overriddenStyles", "grKey", "updateGrKey1", "updateGrKey2", "updateGrKey", "updateGrKeyWStr", "strVal", "cleanNum", "parsedProp", "propInfo", "_grKey", "normalizedNumberVal", "numberVal", "haveNormNum", "haveUnitedNum", "haveNum", "units", "_grKey2", "grHash", "sk", "labelKeys", "sourceLabelKeys", "targetLabelKeys", "_p$styleKeys", "nodeBody", "nodeBorder", "nodeOutline", "backgroundImage", "pie", "nodeKeys", "flatProp", "propIsBypass", "origProp", "origPropIsBypass", "flatPropMapping", "getVal", "checkTriggers", "fromVal", "toVal", "printMappingErr", "fieldWidth", "r1", "r2", "g1", "g2", "b1", "a1", "a2", "clr", "calcValue", "_fields", "_fieldVal", "fnRetVal", "keepBypasses", "delay", "anyPrev", "styProp", "diffProp", "prevProp", "fromProp", "toProp", "initVal", "initDt", "fromValue", "toValue", "getTrigger", "onTrigger", "triggerCheck", "isBypass", "_parsedProp", "specifiedProps", "_name2", "_value", "_parsedProp2", "_prop", "isColor", "isMulti", "oldValue", "px", "isRenderedVal", "subproperty", "styleProp", "strValue", "getRenderedValue", "getValueStringWithUnits", "isArrayValue", "haveUnits", "aniProps", "aniProp", "propsObj", "chVal", "css", "selAndBlockStr", "blockRem", "propAndValStr", "removeSelAndBlockFromRemaining", "removePropAndValFromRem", "nothingLeftToParse", "selAndBlock", "selectorStr", "blockStr", "invalidBlock", "_nothingLeftToParse", "propAndVal", "propStr", "hex3$1", "hex6$1", "mapData", "mapArg", "urlRegexes", "valArr", "unitsArr", "val1", "val2", "str1", "str2", "empty1", "empty2", "mainLabel", "sourceLabel", "targetLabel", "labelDimensions", "commonLabel", "behavior", "visibility", "overlay", "underlay", "transition", "nodeSizeHashOverride", "edgeLine", "edgeArrow", "arrowPrefixes", "triggersBounds", "propGroups", "propGroupNames", "propGroupKeys", "aliases", "alias", "pointsToProp", "aliasProp", "rawProps", "parsedProps", "propIsFlat", "flatKey", "bypassKey", "valueKey", "argHash", "propCache", "passedValue", "mapped", "_mapped", "valueMin", "valueMax", "pfValArr", "hasEnum", "checkEnums", "en", "implicitUnits", "unitsRegex", "propsStr", "propsSplit", "tuple", "enumProp", "regexes", "regex", "ele_p", "mapVal", "currentSelectorIsCore", "newStyle", "selType", "arg0", "viewportState", "bbe", "currentPan", "currentZoom", "bail", "pan1", "zoom1", "zoom2", "pan2", "zoomDefd", "panDefd", "zoomFailed", "panFailed", "z", "rb", "_int", "reg", "readies", "head", "defVal", "def", "altVal", "loadExtData", "extData", "anyIsPromise", "rendererOptions", "setElesAndLayout", "onload", "ondone", "oldEles", "layoutOpts", "thens", "initStyle", "initEles", "ownerDocument", "getFreshRef", "idInJson", "updateEles", "gr", "toMod", "_toMod$_i", "parentsToRemove", "flat", "graph", "maximal", "rootsArray", "comp", "compRoots", "depths", "foundByBfs", "addToDepth", "changeDepth", "newDepth", "pNode", "orphanNodes", "assignDepthsAt", "assignDepths", "adjustMaximally", "shifted", "eInfo", "incomers", "maxDepth", "incmr", "iInfo", "enqueue", "dequeue", "didShift", "minDistance", "nbb", "cachedWeightedPercent", "getWeightedPercent", "eleDepth", "samples", "bf", "nDepth", "apct", "bpct", "orphanDepth", "biggestDepthSize", "maxDepthSize", "getPosition", "_getInfo2", "depthSize", "distanceX", "distanceY", "radiusStepSize", "epos", "clockwise", "sweep", "dTheta", "dcos", "dsin", "rMin", "getPos", "nodeValues", "maxNodeSize", "levelWidth", "levels", "currentLevel", "minDist", "firstLvlHasMulti", "maxR", "rStep", "level", "rDeltaMax", "_r", "_level", "rDelta", "_level2", "_level3", "_dTheta", "_r2", "_val", "layoutInfo", "refresh", "mainLoop", "done", "getScaledPos", "loopRet", "frame", "id2cmptId", "tempNode", "tempGraph", "p_id", "node_id", "node_ix", "tempEdge", "idealLength", "elasticity", "sourceIx", "targetIx", "sourceGraph", "targetGraph", "lca", "lcaGraph", "graphIx", "nodeIx", "childGraphIx", "coseBB", "lnode", "pctX", "pctY", "_step", "cmptId1", "cmptId2", "directionX", "directionY", "maxRandDist", "overlap", "forceX", "forceY", "point1", "point2", "distanceSqr", "dX", "dY", "overlapX", "overlapY", "X", "Y", "H", "W", "dirSlope", "nodeSlope", "lx", "ly", "distThreshold", "fx", "fy", "nodeIndex", "offX", "offY", "childNode", "tempForce", "flag", "cid", "totalA", "usedW", "rowH", "maxRowW", "cells", "splits", "rows", "cols", "small", "large", "oRows", "oCols", "sm", "lg", "_sm", "_lg", "cellWidth", "cellHeight", "cellUsed", "used", "use", "moveToNextCell", "id2manPos", "rcPos", "posIsFn", "arrowShapes", "bbCollide", "translation", "edgeWidth", "inside", "transform", "xRotated", "yRotated", "xScaled", "yScaled", "xTranslated", "yTranslated", "transformPoints", "pointsToArr", "standardGap", "defineArrowShape", "defn", "ptsTrans", "ctrlPt", "ctrlPtTrans", "circleInside", "shiftFactor", "y0", "crossLinePts", "clientX", "clientY", "offsets", "offsetLeft", "offsetTop", "scale", "rect", "styleValue", "clientWidth", "clientHeight", "paddingHor", "paddingVer", "borderHor", "unscaledW", "unscaledH", "interactiveElementsOnly", "isTouch", "near", "edgeThreshold", "nodeThreshold", "labelThreshold", "minSqDist", "nearEdge", "nearNode", "addEle", "sqDist", "checkNode", "hw", "hh", "shape", "checkEdge", "styleWidth", "widthSq", "width2", "arSize", "arrows", "ar", "preprop", "checkLabel", "th", "text", "eventsEnabled", "ox", "oy", "box", "x1c", "x2c", "y1c", "y2c", "boxBb", "nodeBb", "allInside", "isHaystack", "isBezier", "isMultibezier", "isSegments", "isCompound", "isSelf", "endX", "endY", "midX", "midY", "bX", "bY", "i2", "i1", "cpts", "bp0x", "bp0y", "bp1x", "bp1y", "ic", "i3", "pp", "originalV", "invertedV", "pairInfo", "posPts", "intersectionPts", "vectorNormInverse", "midptPts", "srcManEndpt", "tgtManEndpt", "haveManualEndPts", "recalcVectorNormInverse", "edgeDistances", "_this$manualEndptToPx", "_this$manualEndptToPx2", "_this$manualEndptToPx3", "_this$manualEndptToPx4", "endPts", "srcPos", "tgtPos", "srcW", "tgtW", "srcH", "tgtH", "halfRadius", "segmentWs", "segmentDs", "segmentRs", "segmentTs", "segmentsN", "lastRadius", "lastRadiusType", "w1", "w2", "_this$findMidptPtsEtc", "adjustedMidpt", "edgeIsUnbundled", "dirCounts", "ctrlptDists", "ctrlptDist", "loopDir", "loopSwp", "stepSize", "loopDist", "loopAngle", "outAngle", "inAngle", "dc", "loopW", "loopaPos", "loopbPos", "loopPos", "minCompoundStretch", "compoundStretchA", "compoundStretchB", "edgeIsSwapped", "ctrlptWs", "bezierN", "ctrlptWeight", "multi", "normctrlptDist", "manctrlptDist", "sign", "distanceFromMidpoint", "_this$findMidptPtsEtc2", "VERTICAL", "HORIZONTAL", "LEFTWARD", "RIGHTWARD", "DOWNWARD", "UPWARD", "AUTO", "dIncludesNodeBody", "taxiDir", "rawTaxiDir", "taxiTurn", "turnIsPercent", "taxiTurnPfVal", "turnIsNegative", "minD", "dw", "dh", "pdx", "pdy", "subDWH", "dxy", "dwh", "isExplicitDir", "isVert", "pl", "sgnL", "forcedDir", "getIsTooClose", "isTooCloseSrc", "isTooCloseTgt", "isTooClose", "lShapeInsideSrc", "lShapeInsideTgt", "_lShapeInsideSrc", "_lShapeInsideTgt", "_y", "_x", "_x2", "_x3", "_y2", "_y3", "_y4", "_x4", "_x5", "_x6", "_y5", "_y6", "srcShape", "tgtShape", "srcCornerRadius", "tgtCornerRadius", "srcRs", "tgtRs", "badStart", "badAStart", "badEnd", "badAEnd", "minCpADistFactor", "arrowW", "minCpADist", "startACpDist", "closeStartACp", "endACpDist", "closeEndACp", "overlapping", "cpD", "cpL", "cpM", "cpProj", "srcCtrlPtIntn", "_cpD", "_cpL", "_cpM", "_radius", "_cpProj", "tgtCtrlPtIntn", "mt", "point", "factor", "hashTable", "pairId", "map2", "pairIds", "haystackEdges", "edgeIsBezier", "srcIndex", "tgtIndex", "tableEntry", "swappedpairInfo", "firstEdge", "_curveStyle", "_edgeIsUnbundled", "srcOutside", "srcIntn", "tgtOutside", "tgtIntn", "vector", "vectorNorm", "passedPairInfo", "npos", "intersect", "tgtArShape", "srcArShape", "et", "taxi", "segments", "hasEndpts", "overrideEndpts", "srcManEndptVal", "tgtManEndptVal", "p1_i", "p2_i", "cpStart", "cpEnd", "srcArrowFromPt", "tgtArrowFromPt", "trs", "lw2", "lh2", "va", "ha", "labelIntersect", "refPt", "intSqdist", "labIntSqdist", "labInt2SqDist", "arrowEnd", "edgeEnd", "srs", "_lw", "_lh", "_lx", "_ly", "_lw2", "_lh2", "_va", "_ha", "_labelIntersect", "_refPt", "_intSqdist", "_labIntSqdist", "_minSqDist", "_labInt2SqDist", "arrowStart", "edgeStart", "lpts", "content", "textX", "textY", "nodeWidth", "nodeHeight", "nodePos", "textHalign", "textValign", "t0", "lp0", "lp1", "setRs", "midAngle", "createControlPointInfo", "ctrlpts", "nProjs", "addSegment", "cp", "prevSegment", "segment", "prevCp", "calculateEndProjection", "isSrc", "cps", "selected", "startDist", "totalDist", "_cp", "_seg", "lastSeg", "seg", "tSegment", "segDt", "di", "d0", "pD", "_t", "labelDims", "lineHeight", "textWrap", "numLines", "normPerLineHeight", "labelLineHeight", "pfd", "textTransform", "rscratch", "wrapStyle", "labelKey", "zwsp", "maxW", "overflow", "overflowAny", "wrappedLines", "separatorRegex", "lineDims", "lineW", "processedLine", "separatorMatches", "subline", "previousIndex", "_iterator", "separatorMatch", "wordSeparator", "word", "testLine", "testDims", "testW", "_maxW", "ellipsized", "ellipsis", "incLastCh", "widthWithNextCh", "justification", "cacheKey", "existingVal", "fStyle", "family", "c2d", "ds", "metrics", "rot", "rotStr", "elesToUpdate", "dirtyStyleCaches", "updateEleCalcs", "fns", "isCleanConnected", "_p2", "_rstyle", "_p3", "_rstyle2", "grabTargets", "forceRecalc", "url", "crossOrigin", "onLoad", "imageCache", "image", "dataUriPrefix", "isDataUri", "useCapture", "tgtIsDom", "supportsPassive", "on", "isSelected", "triggerEvents", "isMultSelKeyDown", "allowPanningPassthrough", "down", "downs", "allowPassthrough", "setGrabbed", "setFreed", "setInDragLayer", "setOutDragLayer", "setGrabTarget", "removeGrabTarget", "addToDragList", "list", "listHasEle", "addDescendantsToDrag", "innerNodes", "addNodesToDrag", "updateAncestorsInDragLayer", "addNodeToDrag", "freeDraggedElements", "grabbedEles", "blurActiveDomElement", "haveMutationsApi", "haveResizeObserverApi", "mutns", "mutn", "rNodes", "rNode", "onResize", "forEachUp", "invalidateCoords", "inBoxSelection", "eventInContainer", "containerPageCoords", "positions", "atLeastOnePosInside", "tParent", "containerIsTarget", "gpos", "select", "nears", "draggedElements", "checkForTaphold", "cxtEvt", "makeEvent", "triggerGrab", "selectedNodes", "capture", "preventDefault", "mdownPos", "mdownGPos", "last", "isOverThresholdDrag", "dx2", "dy2", "dist2", "multSelKeyDown", "updateDragDelta", "dragDelta", "goIntoBoxMode", "deltaP", "mdPos", "justStartedDrag", "totalShift", "clickTimeout", "didDoubleClick", "prevClickTimeStamp", "cxtTap", "eleWouldBeSelected", "downWasGrabbed", "wheelHandler", "needsWheelFix", "newZoom", "f1x1", "f1y1", "f2x1", "f2y1", "distance1", "distance1Sq", "center1", "modelCenter1", "containerWidth", "containerHeight", "twoFingersStartInside", "distanceSq", "touchstartHandler", "earlier", "cxtDistThreshold", "cxtDistThresholdSq", "near1", "near2", "draggedEles", "sPos", "touch0", "touchmoveHandler", "startGPos", "f1x2", "f1y2", "f2x2", "f2y2", "distance2Sq", "factorSq", "distThresholdSq", "factorThreshold", "factorThresholdSq", "de_p", "_start", "distance2", "df1x", "df1y", "df2x", "df2y", "tx", "ty", "ctrx", "ctry", "touchcancelHandler", "touchendHandler", "didDoubleTouch", "touchTimeout", "prevTouchTimeStamp", "ctxTapend", "ctxTap", "startWasGrabbed", "rdist2", "pointers", "makeTouch", "makePointer", "addPointer", "removePointer", "updatePointer", "addTouchesToEvent", "pointerIsMouse", "diam", "cl", "xBegin", "xEnd", "yBegin", "yEnd", "cPts", "cutTrianglePts", "bPts", "approximateBarrelCurvePts", "m0", "m1", "m2", "curveConstants", "hOffset", "wOffset", "ctrlPtXOffset", "barrelCurvePts", "getCurveT", "curvePts", "x0", "xMin", "xMax", "yMin", "yMax", "coeff", "validRoots", "curveRegions", "cornerPts", "bezY", "topIntersections", "outerWidth", "outerHeight", "nodeShapes", "diamondPoints", "star5Points", "outerPoints", "innerPoints", "innerRadius", "tagPoints", "priority", "cbs", "renderFn", "requestTime", "endTime", "ctr", "stylesheetId", "stylesheetAlreadyExists", "computedStyle", "binding", "queueRedraw", "frameStartTime", "avgRenderTime", "renderTime", "deqd", "extent", "pixelRatio", "frameDuration", "timeAvailable", "thisDeqd", "doesEleInvalidateKey", "idsByKey", "currKey", "newKey", "lvl", "cachesByLvl", "lvls", "caches", "entireKeyInvalidated", "initOptions", "txrH", "rtxtrQs", "rtxtrQ", "k2q", "reason", "eleScaledH", "eleScaledW", "eleCache", "txrQ", "txr", "addNewTxr", "scalableFrom", "otherCache", "deqing", "highQualityReq", "downscaleReq", "higherCache", "oneUpCache", "downscale", "lowerCache", "_l2", "invalid", "noOtherElesUseCache", "_cache", "eleCaches", "minW", "existingReq", "req", "dequeued", "cacheExists", "qSort", "layer", "firstGet", "layersByLvl", "layers", "lvlComplete", "tmpLayers", "checkTempLevels", "canUseAsTmpLvl", "checkLvls", "dir", "getBb", "makeLayer", "after", "area", "maxElesPerLayer", "allowLazyQueueing", "existingLayer", "numElesInLayers", "haveLayers", "rLyr", "elesQ", "hasId", "eleDeqs", "layersInLevel", "replaced", "shiftToOriginWithBb", "showLabel", "showOverlay", "showOpacity", "getRotation", "smooth", "rotPt", "oldGlobalAlpha", "requestHighQuality", "_r$data", "badLine", "shouldDrawOverlay", "shouldDrawOpacity", "lineOpacity", "lineStyle", "lineCap", "lineOutlineWidth", "lineOutlineColor", "effectiveLineOpacity", "effectiveArrowOpacity", "drawLine", "strokeOpacity", "drawLineOutline", "drawOverlay", "drawUnderlay", "drawArrows", "arrowOpacity", "drawText", "ghostOpacity", "effectiveGhostOpacity", "overlayOrUnderlay", "usePaths", "canvasCxt", "pathCacheHit", "lineDashPattern", "lineDashOffset", "pathCacheKey", "keyMatches", "normal", "triangleHead", "arrowShape", "arrowClearFill", "arrowFill", "pArrowWidth", "arrowWidth", "edgeOpacity", "gco", "fill", "shapeWidth", "canvasContext", "shapeImpl", "cachedPath", "img", "ix", "iy", "iw", "ih", "nodeOpacity", "styleObj", "getIndexedStyle", "repeat", "nodeW", "nodeH", "paddingX2", "nodeTW", "nodeTH", "clip", "shouldClip", "imgOpacity", "imgW", "imgH", "posXUnits", "posXPfVal", "offXUnits", "offXPfVal", "posYUnits", "posYPfVal", "offYUnits", "offYPfVal", "gAlpha", "smoothingEnabled", "isSmoothingSwitched", "computedSize", "minSize", "_label", "srcLabel", "tgtLabel", "applyRotation", "labelStyle", "labelSize", "labelFamily", "labelWeight", "outlineColor", "pdash", "textAngle", "orgTextX", "orgTextY", "textW", "textH", "backgroundOpacity", "borderOpacity", "textBorderWidth", "backgroundPadding", "styleShape", "rounded", "roundRadius", "bgX", "bgY", "bgW", "bgH", "textFill", "textBackgroundColor", "textStroke", "textLineWidth", "textBorderColor", "textBorderStyle", "whiteWidth", "lineWidth", "halfTextW", "eleOpacity", "bgImgProp", "urls", "urlDefined", "numImages", "defd", "bgImgCrossOrigin", "darkness", "bgOpacity", "borderColor", "borderStyle", "borderJoin", "borderCap", "borderPosition", "borderPattern", "borderOffset", "outlineStyle", "setupShapeColor", "bgOpy", "setupBorderColor", "bdrOpy", "setupOutlineColor", "otlnOpy", "getPath", "pathCache", "shapePts", "shapePath", "drawShape", "drawImages", "prevBging", "totalCompleted", "bgContainment", "drawPie", "redrawShape", "pieOpacity", "darken", "darkenOpacity", "drawBorder", "region", "drawOutline", "bWidth", "sWidth", "sHeight", "_path", "outlinePath", "sMult", "_pad", "effGhostOpacity", "cyStyle", "pieSize", "lastPercent", "angleStart", "angleDelta", "angleEnd", "backingStore", "needToCreateCache", "shapeStyleName", "gradientStyle", "_end", "_width", "_height", "hasPositions", "backgroundFill", "backgroundColor", "lineFill", "lineColor", "mbPxRatio", "canvasWidth", "canvasHeight", "canvasContainer", "forcedContext", "drawAllLayers", "drawOnlyNodeLayer", "forcedZoom", "forcedPan", "needDraw", "textureDraw", "motionBlur", "inNodeDragGesture", "motionBlurFadeEffect", "effectiveZoom", "effectivePan", "prevVp", "viewportIsDiff", "mbclear", "setContextTransform", "clear", "ePan", "eZoom", "texture", "outsideBgColor", "outsideBgOpacity", "vpManip", "hideEdges", "needMbClear", "useBuffer", "timeToRender", "fps", "maxFps", "cxtNode", "txtNode", "cxtDrag", "txtDrag", "drawMotionBlur", "txt", "needClear", "pxr", "cornerLength", "barrelCurveConstants", "xPos", "yPos", "rw", "rh", "buffer", "ctrRect", "specdMaxDims", "maxScaleW", "maxScaleH", "buffCanvas", "buffCxt", "zsortedEles", "require_layout_base", "__commonJSMin", "exports", "module", "__name", "root", "factory", "modules", "installedModules", "__webpack_require__", "moduleId", "value", "name", "getter", "object", "property", "LayoutConstants", "LGraphObject", "IGeometry", "IMath", "LEdge", "source", "target", "vEdge", "prop", "node", "graph", "otherEnd", "clipPointCoordinates", "vGraphObject", "Integer", "RectangleD", "RandomSeed", "PointD", "LNode", "gm", "loc", "size", "vNode", "width", "height", "upperLeft", "dimension", "cx", "cy", "x", "y", "dx", "dy", "to", "edgeList", "edge", "self", "other", "neighbors", "withNeighborsList", "childNode", "children", "nodes", "i", "noOfChildren", "randomCenterX", "randomCenterY", "minX", "maxX", "minY", "maxY", "childGraph", "trans", "left", "top", "leftTop", "vLeftTop", "pt", "dim", "LGraphManager", "Point", "LinkedList", "LGraph", "parent", "obj2", "vGraph", "obj1", "sourceNode", "targetNode", "newNode", "newEdge", "obj", "edgesToBeRemoved", "s", "index", "sourceIndex", "targetIndex", "nodeTop", "nodeLeft", "margin", "lNode", "recursive", "right", "bottom", "nodeRight", "nodeBottom", "boundingRect", "queue", "visited", "currentNode", "neighborEdges", "currentNeighbor", "childrenOfNode", "neighborEdge", "childrenOfNeighbor", "noOfVisitedInThisGraph", "visitedNode", "layout", "ngraph", "nnode", "newGraph", "parentNode", "sourceGraph", "targetGraph", "lObj", "nodesToBeRemoved", "nodeList", "graphs", "firstNode", "secondNode", "ownerGraph", "sourceAncestorGraph", "targetAncestorGraph", "edges", "firstOwnerGraph", "secondOwnerGraph", "depth", "FDLayoutConstants", "rectA", "rectB", "overlapAmount", "separationBuffer", "directions", "slope", "moveByY", "moveByX", "result", "p1x", "p1y", "p2x", "p2y", "topLeftAx", "topLeftAy", "topRightAx", "bottomLeftAx", "bottomLeftAy", "bottomRightAx", "halfWidthA", "halfHeightA", "topLeftBx", "topLeftBy", "topRightBx", "bottomLeftBx", "bottomLeftBy", "bottomRightBx", "halfWidthB", "halfHeightB", "clipPointAFound", "clipPointBFound", "slopeA", "slopeB", "slopePrime", "cardinalDirectionA", "cardinalDirectionB", "tempPointAx", "tempPointAy", "tempPointBx", "tempPointBy", "line", "s1", "s2", "f1", "f2", "x1", "y1", "x2", "y2", "x3", "y3", "x4", "y4", "a1", "a2", "b1", "b2", "c1", "c2", "denom", "Cx", "Cy", "Nx", "Ny", "C_angle", "p1", "p2", "p3", "p4", "a", "b", "c", "d", "p", "q", "r", "det", "lambda", "gamma", "_createClass", "defineProperties", "props", "descriptor", "Constructor", "protoProps", "staticProps", "_classCallCheck", "instance", "nodeFrom", "add", "prev", "next", "list", "_remove", "vals", "_this", "v", "val", "otherNode", "current", "_typeof", "UniqueIDGeneretor", "id", "arg", "type", "_toConsumableArray", "arr", "arr2", "Transform", "Emitter", "Layout", "isRemoteUse", "isLayoutSuccessfull", "allEdges", "newLeftTop", "flatForest", "isForest", "allNodes", "isFlat", "toBeVisited", "parents", "unProcessedNodes", "temp", "dummyNodes", "dummyNode", "dummyEdge", "k", "lEdge", "path", "ebp", "sliderValue", "defaultValue", "minDiv", "maxMul", "minValue", "maxValue", "removedNodes", "remainingDegrees", "foundCenter", "centerNode", "degree", "tempList", "tempList2", "neighbours", "neighbour", "otherDegree", "newDegree", "wox", "woy", "wex", "wey", "dox", "doy", "dex", "dey", "xDevice", "worldExtX", "yDevice", "worldExtY", "xWorld", "deviceExtX", "yWorld", "deviceExtY", "inPoint", "outPoint", "FDLayout", "lcaDepth", "sizeOfSourceInLca", "sizeOfTargetInLca", "lEdges", "gridUpdateAllowed", "forceToNodeSurroundingUpdate", "j", "nodeA", "nodeB", "lNodes", "processedNodeSet", "idealLength", "length", "springForce", "springForceX", "springForceY", "clipPoints", "distanceX", "distanceY", "distanceSquared", "distance", "repulsionForce", "repulsionForceX", "repulsionForceY", "childrenConstant", "ownerCenterX", "ownerCenterY", "absDistanceX", "absDistanceY", "estimatedSize", "converged", "oscilating", "sizeX", "sizeY", "grid", "startX", "finishX", "startY", "finishY", "surrounding", "FDLayoutEdge", "FDLayoutNode", "_startX", "_finishX", "_startY", "_finishY", "DimensionD", "HashMap", "key", "theId", "HashSet", "keys", "Quicksort", "A", "compareFunction", "NeedlemanWunsch", "sequence1", "sequence2", "match_score", "mismatch_penalty", "gap_penalty", "_i", "_j", "_i2", "_j2", "diag", "up", "maxOf", "indices", "inProcessAlignments", "indexes", "array", "layoutBase", "event", "callback", "l", "data", "require_cose_base", "__commonJSMin", "exports", "module", "__name", "root", "factory", "__WEBPACK_EXTERNAL_MODULE_0__", "modules", "installedModules", "__webpack_require__", "moduleId", "value", "name", "getter", "object", "property", "FDLayoutConstants", "CoSEConstants", "prop", "FDLayoutEdge", "CoSEEdge", "source", "target", "vEdge", "LGraph", "CoSEGraph", "parent", "graphMgr", "vGraph", "LGraphManager", "CoSEGraphManager", "layout", "FDLayoutNode", "IMath", "CoSENode", "gm", "loc", "size", "vNode", "dX", "dY", "nodes", "node", "i", "pred1", "next", "processed", "FDLayout", "LayoutConstants", "Point", "PointD", "Layout", "Integer", "IGeometry", "Transform", "CoSELayout", "createBendsAsNeeded", "allNodes", "intersection", "x", "forest", "gridUpdateAllowed", "forceToNodeSurroundingUpdate", "pData", "rect", "id", "layoutEnded", "nodeList", "graph", "graphs", "edges", "visited", "edge", "edgeList", "multiEdge", "currentStartingPoint", "numberOfColumns", "height", "currentY", "currentX", "point", "tree", "centerNode", "startingPoint", "radialSep", "bounds", "transform", "bottomRight", "parentOfNode", "startAngle", "endAngle", "distance", "radialSeparation", "halfInterval", "nodeAngle", "teta", "cos_teta", "x_", "y_", "neighborEdges", "childCount", "branchCount", "incEdgesCount", "startIndex", "temp", "index", "stepAngle", "currentNeighbor", "childStartAngle", "childEndAngle", "maxDiagonal", "diagonal", "self", "tempMemberGroups", "zeroDegree", "p_id", "dummyCompoundId", "dummyCompound", "dummyParentGraph", "parentGraph", "childGraphMap", "idToNode", "tiledZeroDegreePack", "compoundNode", "lCompoundNode", "horizontalMargin", "verticalMargin", "tiledPack", "childGraph", "children", "theChild", "degree", "child", "organization", "y", "compoundHorizontalMargin", "compoundVerticalMargin", "left", "row", "maxHeight", "j", "lnode", "minWidth", "verticalPadding", "horizontalPadding", "n1", "n2", "lNode", "rowIndex", "minCompoundSize", "secondDimension", "w", "h", "extraHeight", "r", "min", "max", "extraWidth", "sri", "hDiff", "add_to_row_ratio", "add_new_row_ratio", "longest", "last", "diff", "prevTotal", "finalTotal", "prunedNodesAll", "containsLeaf", "prunedNodesInStepTemp", "prunedNodesInStep", "lengthOfPrunedNodesInStep", "nodeData", "gridForPrunedNode", "nodeToConnect", "prunedNode", "startGridX", "finishGridX", "startGridY", "finishGridY", "upNodeCount", "downNodeCount", "rightNodeCount", "leftNodeCount", "controlRegions", "minCount", "minIndex", "random", "coseBase", "require_cytoscape_cose_bilkent", "__commonJSMin", "exports", "module", "__name", "root", "factory", "__WEBPACK_EXTERNAL_MODULE_0__", "modules", "installedModules", "__webpack_require__", "moduleId", "value", "name", "getter", "object", "property", "LayoutConstants", "FDLayoutConstants", "CoSEConstants", "CoSELayout", "CoSENode", "PointD", "DimensionD", "defaults", "extend", "options", "obj", "i", "_CoSELayout", "_options", "getUserOptions", "ready", "frameId", "idToLNode", "layout", "self", "gm", "nodes", "edges", "edge", "sourceNode", "targetNode", "e1", "getPositions", "ele", "theId", "lNode", "iterateAnimated", "afterReposition", "ticksPerFrame", "isDone", "animationData", "pNode", "temp", "nodesMap", "roots", "parent", "children", "size", "theChild", "children_of_children", "theNode", "dimensions", "labelWidth", "labelHeight", "labelPos", "theNewGraph", "register", "cytoscape", "insertPolygonShape", "parent", "w", "h", "points", "node", "d", "MAX_SECTIONS", "defaultBkg", "rectBkg", "cloudBkg", "bangBkg", "circleBkg", "hexagonBkg", "roundedRectBkg", "drawNode", "positionNode", "init_svgDraw", "__esmMin", "init_createText", "init_utils", "__name", "db", "elem", "section", "r1", "r2", "r3", "r4", "r", "_db", "m", "fullSection", "conf", "htmlLabels", "nodeElem", "sectionClass", "bkgElem", "textElem", "description", "createText", "bbox", "fontSize", "parseFontSize", "orgHeight", "heightDiff", "dx", "dy", "x", "y", "drawNodes", "db", "svg", "mindmap", "section", "conf", "drawNode", "child", "index", "drawEdges", "edgesEl", "cy", "edge", "id", "data", "bounds", "log", "addNodes", "level", "layoutMindmap", "node", "resolve", "renderEl", "select_default", "cytoscape", "n", "e", "positionNodes", "positionNode", "el", "import_cytoscape_cose_bilkent", "draw", "mindmapRenderer_default", "init_mindmapRenderer", "__esmMin", "init_cytoscape_esm", "init_src", "init_diagramAPI", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "init_svgDraw", "init_defaultConfig", "coseBilkent", "__name", "text", "_version", "diagObj", "mm", "getConfig", "selectSvgElement", "edgesElem", "nodesElem", "setupGraphViewbox", "defaultConfig_default", "genSections", "getStyles", "styles_default", "init_styles", "__esmMin", "init_dist", "__name", "options", "sections", "i", "is_dark_default", "lighten_default", "darken_default", "sw", "mindmap_definition_exports", "__export", "diagram", "init_mindmap_definition", "__esmMin", "init_mindmap", "init_mindmapDb", "init_mindmapRenderer", "init_styles", "mindmapDb_default", "mindmapRenderer_default", "mindmap_default", "styles_default", "parser", "kanban_default", "init_kanban", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "re", "Parser", "nodes", "sections", "cnt", "elements", "clear", "getSection", "getSections", "getData", "addNode", "nodeType", "getType", "setElementForId", "decorateNode", "type2Str", "getLogger", "getElementById", "db", "kanbanDb_default", "init_kanbanDb", "__esmMin", "init_diagramAPI", "init_common", "init_logger", "init_defaultConfig", "init_js_yaml", "__name", "level", "sectionLevel", "lastSection", "i", "edges", "_nodes", "conf", "getConfig", "section", "node", "sanitizeText", "children", "n", "item", "childNode", "id", "descr", "type", "shapeData", "padding", "defaultConfig_default", "yamlData", "doc", "load", "JSON_SCHEMA", "startStr", "endStr", "log", "element", "decoration", "config", "draw", "kanbanRenderer_default", "init_kanbanRenderer", "__esmMin", "init_diagramAPI", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "init_defaultConfig", "init_clusters", "init_nodes", "__name", "text", "id", "_version", "diagObj", "log", "data4Layout", "conf", "getConfig", "svg", "selectSvgElement", "sectionsElem", "nodesElem", "sections", "node", "cnt", "padding", "sectionObjects", "maxLabelHeight", "section", "WIDTH", "sectionObj", "insertCluster", "i", "top", "y", "sectionItems", "item", "bbox", "insertNode", "positionNode", "rect", "height", "setupGraphViewbox", "defaultConfig_default", "genSections", "getStyles", "styles_default", "init_styles", "__esmMin", "init_dist", "__name", "options", "sections", "i", "is_dark_default", "lighten_default", "darken_default", "adjuster", "color", "level", "sw", "kanban_definition_exports", "__export", "diagram", "init_kanban_definition", "__esmMin", "init_kanban", "init_kanbanDb", "init_kanbanRenderer", "init_styles", "kanbanDb_default", "kanbanRenderer_default", "kanban_default", "styles_default", "parser", "sankey_default", "init_sankey", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "source", "target", "value", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "links", "nodes", "nodesMap", "clear", "SankeyLink", "addLink", "SankeyNode", "findOrCreateNode", "getNodes", "getLinks", "getGraph", "sankeyDB_default", "init_sankeyDB", "__esmMin", "init_diagramAPI", "init_common", "init_commonDb", "__name", "source", "target", "value", "ID", "common_default", "getConfig", "node", "link", "getAccTitle", "setAccTitle", "getAccDescription", "setAccDescription", "getDiagramTitle", "setDiagramTitle", "max", "values", "valueof", "value", "index", "init_max", "__esmMin", "__name", "min", "values", "valueof", "value", "index", "init_min", "__esmMin", "__name", "sum", "values", "valueof", "value", "index", "init_sum", "__esmMin", "__name", "init_src", "__esmMin", "init_max", "init_min", "init_sum", "targetDepth", "d", "left", "node", "right", "n", "justify", "center", "min", "init_align", "__esmMin", "init_src", "__name", "constant", "x", "init_constant", "__esmMin", "__name", "ascendingSourceBreadth", "a", "b", "ascendingBreadth", "ascendingTargetBreadth", "value", "d", "defaultId", "defaultNodes", "graph", "defaultLinks", "find", "nodeById", "id", "node", "computeLinkBreadths", "nodes", "y0", "y1", "link", "Sankey", "x0", "x1", "dx", "dy", "py", "align", "justify", "sort", "linkSort", "links", "iterations", "sankey", "computeNodeLinks", "computeNodeValues", "computeNodeDepths", "computeNodeHeights", "computeNodeBreadths", "__name", "_", "constant", "i", "source", "target", "sourceLinks", "targetLinks", "sum", "n", "current", "next", "x", "computeNodeLayers", "max", "kx", "columns", "column", "initializeNodeBreadths", "ky", "min", "c", "y", "reorderLinks", "alpha", "beta", "relaxRightToLeft", "relaxLeftToRight", "w", "v", "targetTop", "reorderNodeLinks", "resolveCollisions", "sourceTop", "subject", "resolveCollisionsBottomToTop", "resolveCollisionsTopToBottom", "width", "init_sankey", "__esmMin", "init_src", "init_align", "init_constant", "Path", "path", "pi", "tau", "epsilon", "tauEpsilon", "path_default", "init_path", "__esmMin", "__name", "x", "y", "x1", "y1", "x2", "y2", "r", "x0", "y0", "x21", "y21", "x01", "y01", "l01_2", "x20", "y20", "l21_2", "l20_2", "l21", "l01", "l", "t01", "t21", "a0", "a1", "ccw", "dx", "dy", "cw", "da", "w", "h", "init_src", "__esmMin", "init_path", "constant_default", "x", "__name", "init_constant", "__esmMin", "x", "p", "y", "init_point", "__esmMin", "__name", "slice", "init_array", "__esmMin", "linkSource", "d", "linkTarget", "link", "curve", "source", "target", "x", "y", "context", "buffer", "argv", "slice", "s", "t", "path_default", "__name", "_", "constant_default", "curveHorizontal", "x0", "y0", "x1", "y1", "linkHorizontal", "init_link", "__esmMin", "init_src", "init_array", "init_constant", "init_point", "init_src", "__esmMin", "init_link", "horizontalSource", "d", "horizontalTarget", "sankeyLinkHorizontal_default", "linkHorizontal", "init_sankeyLinkHorizontal", "__esmMin", "init_src", "__name", "init_src", "__esmMin", "init_sankey", "init_align", "init_sankeyLinkHorizontal", "Uid", "init_uid", "__esmMin", "_Uid", "__name", "name", "id", "alignmentsMap", "draw", "sankeyRenderer_default", "init_sankeyRenderer", "__esmMin", "init_diagramAPI", "init_src", "init_setupGraphViewbox", "init_uid", "left", "right", "center", "justify", "__name", "text", "id", "_version", "diagObj", "securityLevel", "conf", "getConfig", "defaultSankeyConfig", "defaultConfig", "sandboxElement", "select_default", "root", "svg", "width", "height", "useMaxWidth", "nodeAlignment", "prefix", "suffix", "showValues", "graph", "nodeAlign", "Sankey", "d", "colorScheme", "ordinal", "Tableau10_default", "Uid", "getText", "value", "link", "linkColor", "gradient", "coloring", "sankeyLinkHorizontal_default", "setupGraphViewbox", "prepareTextForParsing", "init_sankeyUtils", "__esmMin", "__name", "text", "sankeyDiagram_exports", "__export", "diagram", "originalParse", "init_sankeyDiagram", "__esmMin", "init_sankey", "init_sankeyDB", "init_sankeyRenderer", "init_sankeyUtils", "sankey_default", "text", "prepareTextForParsing", "sankeyDB_default", "sankeyRenderer_default", "defaultPacketData", "data", "DEFAULT_PACKET_CONFIG", "getConfig", "getPacket", "pushWord", "clear", "db", "init_db", "__esmMin", "init_config", "init_defaultConfig", "init_utils", "init_commonDb", "defaultConfig_default", "__name", "config", "cleanAndMerge", "word", "setAccTitle", "getAccTitle", "setDiagramTitle", "getDiagramTitle", "getAccDescription", "setAccDescription", "maxPacketSize", "populate", "getNextFittingBlock", "parser", "init_parser", "__esmMin", "init_mermaid_parser_core", "init_logger", "init_populateCommonDb", "init_db", "__name", "ast", "populateCommonDb", "db", "lastByte", "word", "row", "bitsPerRow", "start", "end", "label", "log", "block", "nextBlock", "input", "parse", "draw", "drawWord", "renderer", "init_renderer", "__esmMin", "init_selectSvgElement", "init_setupGraphViewbox", "__name", "_text", "id", "_version", "diagram", "db", "config", "rowHeight", "paddingY", "bitWidth", "bitsPerRow", "words", "title", "totalRowHeight", "svgHeight", "svgWidth", "svg", "selectSvgElement", "configureSvgSize", "word", "packet", "rowNumber", "paddingX", "showBits", "group", "wordY", "block", "blockX", "width", "isSingleBlock", "bitNumberY", "defaultPacketStyleOptions", "styles", "init_styles", "__esmMin", "init_utils", "__name", "packet", "options", "cleanAndMerge", "diagram_exports", "__export", "diagram", "init_diagram", "__esmMin", "init_db", "init_parser", "init_renderer", "init_styles", "parser", "db", "renderer", "styles", "parser", "block_default", "init_block", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "num", "spaceId", "edgeData", "id2", "id", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "typeStr2Type", "typeStr", "log", "edgeTypeStr2Type", "edgeStrToEdgeData", "blockDatabase", "edgeList", "edgeCount", "COLOR_KEYWORD", "FILL_KEYWORD", "BG_FILL", "STYLECLASS_SEP", "config", "classes", "sanitizeText", "addStyleClass", "addStyle2Node", "setCssClass", "populateBlockDatabase", "blocks", "rootBlock", "clear", "cnt", "generateId", "setHierarchy", "getColumns", "getBlocksFlat", "getBlocks", "getEdges", "getBlock", "setBlock", "getLogger", "getClasses", "db", "blockDB_default", "init_blockDB", "__esmMin", "init_clone", "init_config", "init_diagramAPI", "init_logger", "init_common", "init_commonDb", "getConfig", "__name", "txt", "common_default", "id", "styleAttributes", "foundClass", "attrib", "fixedAttrib", "newStyle2", "styles", "foundBlock", "itemIds", "cssClassName", "trimmedId", "_blockList", "parent", "blockList", "children", "block", "count", "existingBlock", "w", "j", "newBlock", "clone_default", "blockId", "fade", "getStyles", "styles_default", "init_styles", "__esmMin", "init_dist", "__name", "color", "opacity", "channel", "channel_default", "r", "g", "b", "rgba_default", "options", "insertMarkers", "extension", "composition", "aggregation", "dependency", "lollipop", "point", "circle", "cross", "barb", "markers", "markers_default", "init_markers", "__esmMin", "init_logger", "__name", "elem", "markerArray", "type", "id", "markerName", "log", "calculateBlockPosition", "columns", "position", "px", "py", "setBlockSizes", "block", "db", "siblingWidth", "siblingHeight", "log", "maxWidth", "maxHeight", "child", "childSize", "getMaxChildSize", "padding", "numItems", "xSize", "ySize", "width", "height", "childWidth", "childHeight", "num", "layoutBlocks", "widthOfChildren", "columnPos", "startingPosX", "rowPos", "parent", "halfWidth", "findBounds", "minX", "minY", "maxX", "maxY", "x", "y", "layout", "root", "init_layout", "__esmMin", "init_logger", "init_diagramAPI", "getConfig", "__name", "applyStyle", "dom", "styleFn", "addHtmlLabel", "node", "fo", "select_default", "div", "label", "labelClass", "span", "createLabel", "createLabel_default", "init_createLabel", "__esmMin", "init_src", "init_logger", "init_diagramAPI", "init_common", "init_utils", "init_createText", "__name", "_vertexText", "style", "isTitle", "isNode", "vertexText", "evaluate", "getConfig", "log", "replaceIconSubstring", "decodeEntities", "svgLabel", "rows", "row", "tspan", "addEdgeMarkers", "arrowTypesMap", "addEdgeMarker", "init_edgeMarker", "__esmMin", "init_logger", "__name", "svgPath", "edge", "url", "id", "diagramType", "position", "arrowType", "endMarkerType", "log", "suffix", "setTerminalWidth", "fo", "value", "getConfig", "edgeLabels", "terminalLabels", "insertEdgeLabel", "positionEdgeLabel", "outsideNode", "intersection", "cutPathAtIntersect", "insertEdge", "init_edges", "__esmMin", "init_logger", "init_createLabel", "init_createText", "init_src", "init_diagramAPI", "init_utils", "init_common", "init_lineWithOffset", "init_subGraphTitleMargins", "init_edgeMarker", "__name", "elem", "edge", "config", "useHtmlLabels", "evaluate", "labelElement", "createText", "createLabel_default", "edgeLabel", "label", "bbox", "div", "dv", "select_default", "startLabelElement", "startEdgeLabelLeft", "inner", "slBox", "startEdgeLabelRight", "endLabelElement", "endEdgeLabelLeft", "endEdgeLabelRight", "paths", "log", "path", "siteConfig", "subGraphTitleTotalMargin", "getSubGraphTitleMargins", "el", "x", "y", "pos", "utils_default", "node", "point", "dx", "dy", "w", "h", "outsidePoint", "insidePoint", "r", "Q", "R", "q", "res", "_x", "_y", "_points", "boundaryNode", "points", "lastPointOutside", "isInside", "inter", "pointPresent", "p", "e", "clusterDb", "diagramType", "graph", "id", "pointsHasChanged", "tail", "head", "lineData", "curve", "basis_default", "getLineFunctionsWithOffset", "lineFunction", "line_default", "strokeClasses", "svgPath", "url", "addEdgeMarkers", "expandAndDeduplicateDirections", "getArrowPoints", "init_blockArrowHelper", "__esmMin", "__name", "directions", "uniqueDirections", "direction", "duplicatedDirections", "bbox", "node", "f", "height", "midpoint", "width", "padding", "intersectNode", "node", "point", "intersect_node_default", "init_intersect_node", "__esmMin", "__name", "intersectEllipse", "node", "rx", "ry", "point", "cx", "cy", "px", "py", "det", "dx", "dy", "intersect_ellipse_default", "init_intersect_ellipse", "__esmMin", "__name", "intersectCircle", "node", "rx", "point", "intersect_ellipse_default", "intersect_circle_default", "init_intersect_circle", "__esmMin", "init_intersect_ellipse", "__name", "intersectLine", "p1", "p2", "q1", "q2", "a1", "a2", "b1", "b2", "c1", "c2", "r1", "r2", "r3", "r4", "denom", "offset", "num", "y", "sameSign", "intersect_line_default", "init_intersect_line", "__esmMin", "__name", "intersectPolygon", "node", "polyPoints", "point", "x1", "y1", "intersections", "minX", "minY", "entry", "left", "top", "i", "p1", "p2", "intersect", "intersect_line_default", "p", "q", "pdx", "pdy", "distp", "qdx", "qdy", "distq", "intersect_polygon_default", "init_intersect_polygon", "__esmMin", "init_intersect_line", "__name", "intersectRect", "intersect_rect_default", "init_intersect_rect", "__esmMin", "__name", "node", "point", "x", "y", "dx", "dy", "w", "h", "sx", "sy", "intersect_default", "init_intersect", "__esmMin", "init_intersect_node", "init_intersect_circle", "init_intersect_ellipse", "init_intersect_polygon", "init_intersect_rect", "intersect_node_default", "intersect_circle_default", "intersect_ellipse_default", "intersect_polygon_default", "intersect_rect_default", "insertPolygonShape", "parent", "w", "h", "points", "d", "labelHelper", "updateNodeBounds", "init_util", "__esmMin", "init_createLabel", "init_createText", "init_diagramAPI", "init_src", "init_common", "init_utils", "__name", "node", "_classes", "isNode", "config", "getConfig", "classes", "useHtmlLabels", "evaluate", "shapeSvg", "label", "labelText", "textNode", "text", "createText", "sanitizeText", "decodeEntities", "createLabel_default", "bbox", "halfPadding", "div", "dv", "select_default", "images", "noImgText", "img", "res", "setupImage", "bodyFontSize", "width", "element", "note", "note_default", "init_note", "__esmMin", "init_util", "init_logger", "init_diagramAPI", "init_intersect", "__name", "parent", "node", "getConfig", "shapeSvg", "bbox", "halfPadding", "labelHelper", "log", "rect", "updateNodeBounds", "point", "intersect_default", "applyNodePropertyBorders", "rect", "borders", "totalWidth", "totalHeight", "strokeDashArray", "addBorder", "__name", "length", "skipBorder", "log", "formatClass", "getClassesFromNode", "question", "choice", "hexagon", "block_arrow", "rect_left_inv_arrow", "lean_right", "lean_left", "trapezoid", "inv_trapezoid", "rect_right_inv_arrow", "cylinder", "composite", "labelRect", "rectWithTitle", "stadium", "circle", "doublecircle", "subroutine", "start", "forkJoin", "end", "class_box", "shapes", "nodeElems", "insertNode", "positionNode", "init_nodes", "__esmMin", "init_src", "init_diagramAPI", "init_common", "init_logger", "init_blockArrowHelper", "init_createLabel", "init_intersect", "init_note", "init_util", "str", "node", "otherClasses", "parent", "shapeSvg", "bbox", "labelHelper", "w", "h", "points", "questionElem", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "s", "d", "f", "m", "hex", "getArrowPoints", "blockArrow", "el", "rx", "ry", "shape", "pos", "x", "y", "halfPadding", "propKeys", "propKey", "classes", "innerLine", "label", "text2", "title", "text", "createLabel_default", "evaluate", "getConfig", "div", "dv", "select_default", "textRows", "titleBox", "descr", "gap", "circleGroup", "outerCircle", "innerCircle", "dir", "width", "height", "rowPadding", "lineHeight", "topLine", "bottomLine", "maxWidth", "maxHeight", "labelContainer", "verticalPos", "hasInterface", "interfaceLabelText", "interfaceLabel", "interfaceBBox", "classTitleString", "classTitleLabel", "classTitleBBox", "classAttributes", "member", "parsedInfo", "parsedText", "lbl", "classMethods", "displayText", "diffX", "memberBBox", "note_default", "elem", "renderOptions", "newEl", "target", "padding", "diff", "getNodeFromBlock", "block", "db", "positioned", "vertex", "classStr", "radius", "shape", "padding", "styles", "getStylesFromArray", "vertexText", "bounds", "getConfig", "calculateBlockSize", "elem", "node", "config", "nodeEl", "insertNode", "boundingBox", "obj", "insertBlockPositioned", "positionNode", "performOperations", "blocks", "operation", "calculateBlockSizes", "insertBlocks", "insertEdges", "edges", "id", "g", "Graph", "edge", "startBlock", "endBlock", "start", "end", "points", "insertEdge", "insertEdgeLabel", "positionEdgeLabel", "init_renderHelpers", "__esmMin", "init_graphlib", "init_config", "init_edges", "init_nodes", "init_utils", "__name", "getClasses", "draw", "blockRenderer_default", "init_blockRenderer", "__esmMin", "init_src", "init_config", "init_markers", "init_logger", "init_setupGraphViewbox", "init_layout", "init_renderHelpers", "__name", "text", "diagObj", "id", "_version", "securityLevel", "conf", "getConfig", "db", "sandboxElement", "select_default", "root", "svg", "markers_default", "bl", "blArr", "edges", "nodes", "calculateBlockSizes", "bounds", "layout", "insertBlocks", "insertEdges", "bounds2", "magicFactor", "height", "width", "useMaxWidth", "configureSvgSize", "log", "blockDiagram_exports", "__export", "diagram", "init_blockDiagram", "__esmMin", "init_block", "init_blockDB", "init_styles", "init_blockRenderer", "block_default", "blockDB_default", "blockRenderer_default", "styles_default", "ArchitectureDirectionName", "ArchitectureDirectionArrow", "ArchitectureDirectionArrowShift", "getOppositeArchitectureDirection", "isArchitectureDirection", "isArchitectureDirectionX", "isArchitectureDirectionY", "isArchitectureDirectionXY", "isArchitecturePairXY", "isValidArchitectureDirectionPair", "getArchitectureDirectionPair", "shiftPositionByArchitectureDirectionPair", "getArchitectureDirectionXYFactors", "isArchitectureService", "isArchitectureJunction", "edgeData", "nodeData", "init_architectureTypes", "__esmMin", "__name", "scale", "orig", "arrowSize", "_arrowSize", "x", "temp", "a", "b", "aX_bY", "aY_bX", "pair", "lhs", "rhs", "sourceDir", "targetDir", "y", "edge", "node", "getConfigField", "field", "arch", "getConfig", "DEFAULT_ARCHITECTURE_CONFIG", "state", "clear", "addService", "getServices", "addJunction", "getJunctions", "getNodes", "getNode", "addGroup", "getGroups", "addEdge", "getEdges", "getDataStructures", "setElementForId", "getElementById", "db", "init_architectureDb", "__esmMin", "init_defaultConfig", "init_diagramAPI", "init_imperativeState", "init_commonDb", "init_architectureTypes", "defaultConfig_default", "ImperativeState", "__name", "id", "icon", "parent", "title", "iconText", "isArchitectureService", "isArchitectureJunction", "lhsId", "rhsId", "lhsDir", "rhsDir", "lhsInto", "rhsInto", "lhsGroup", "rhsGroup", "isArchitectureDirection", "lhsGroupId", "rhsGroupId", "edge", "adjList", "prevOuter", "service", "prevInner", "pair", "getArchitectureDirectionPair", "firstId", "visited", "notVisited", "prev", "BFS", "startingId", "spatialMap", "queue", "adj", "posX", "posY", "dir", "shiftPositionByArchitectureDirectionPair", "spatialMaps", "element", "setDiagramTitle", "getDiagramTitle", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "populateDb", "parser", "init_architectureParser", "__esmMin", "init_mermaid_parser_core", "init_logger", "init_populateCommonDb", "init_architectureDb", "__name", "ast", "db", "populateCommonDb", "service", "input", "parse", "log", "getStyles", "architectureStyles_default", "init_architectureStyles", "__esmMin", "__name", "options", "require_layout_base", "__commonJSMin", "exports", "module", "__name", "root", "factory", "modules", "installedModules", "__webpack_require__", "moduleId", "value", "name", "getter", "object", "property", "LayoutConstants", "LGraphObject", "IGeometry", "IMath", "LEdge", "source", "target", "vEdge", "prop", "node", "graph", "otherEnd", "clipPointCoordinates", "vGraphObject", "Integer", "RectangleD", "RandomSeed", "PointD", "LNode", "gm", "loc", "size", "vNode", "width", "height", "upperLeft", "dimension", "cx", "cy", "x", "y", "dx", "dy", "to", "edgeList", "edge", "self", "other", "neighbors", "withNeighborsList", "childNode", "children", "nodes", "i", "noOfChildren", "randomCenterX", "randomCenterY", "minX", "maxX", "minY", "maxY", "childGraph", "trans", "left", "top", "leftTop", "vLeftTop", "FDLayoutConstants", "pt", "dim", "LGraphManager", "Point", "LinkedList", "LGraph", "parent", "obj2", "vGraph", "obj1", "sourceNode", "targetNode", "newNode", "newEdge", "obj", "edgesToBeRemoved", "s", "index", "sourceIndex", "targetIndex", "nodeTop", "nodeLeft", "margin", "lNode", "recursive", "right", "bottom", "nodeRight", "nodeBottom", "boundingRect", "queue", "visited", "currentNode", "neighborEdges", "currentNeighbor", "childrenOfNode", "neighborEdge", "childrenOfNeighbor", "noOfVisitedInThisGraph", "visitedNode", "layout", "ngraph", "nnode", "newGraph", "parentNode", "sourceGraph", "targetGraph", "lObj", "nodesToBeRemoved", "nodeList", "graphs", "firstNode", "secondNode", "ownerGraph", "sourceAncestorGraph", "targetAncestorGraph", "edges", "firstOwnerGraph", "secondOwnerGraph", "depth", "edgesToRemove", "rectA", "rectB", "overlapAmount", "separationBuffer", "directions", "slope", "moveByY", "moveByX", "result", "p1x", "p1y", "p2x", "p2y", "topLeftAx", "topLeftAy", "topRightAx", "bottomLeftAx", "bottomLeftAy", "bottomRightAx", "halfWidthA", "halfHeightA", "topLeftBx", "topLeftBy", "topRightBx", "bottomLeftBx", "bottomLeftBy", "bottomRightBx", "halfWidthB", "halfHeightB", "clipPointAFound", "clipPointBFound", "slopeA", "slopeB", "slopePrime", "cardinalDirectionA", "cardinalDirectionB", "tempPointAx", "tempPointAy", "tempPointBx", "tempPointBy", "line", "s1", "s2", "f1", "f2", "x1", "y1", "x2", "y2", "x3", "y3", "x4", "y4", "a1", "a2", "b1", "b2", "c1", "c2", "denom", "Cx", "Cy", "Nx", "Ny", "C_angle", "p1", "p2", "p3", "p4", "a", "b", "c", "d", "p", "q", "r", "det", "lambda", "gamma", "Ex", "Ey", "Lx", "Ly", "disc", "t1", "t2", "intersections", "_createClass", "defineProperties", "props", "descriptor", "Constructor", "protoProps", "staticProps", "_classCallCheck", "instance", "nodeFrom", "add", "prev", "next", "list", "_remove", "vals", "_this", "v", "val", "otherNode", "current", "_typeof", "UniqueIDGeneretor", "id", "arg", "type", "_toConsumableArray", "arr", "arr2", "Transform", "Emitter", "Layout", "isRemoteUse", "isLayoutSuccessfull", "allEdges", "newLeftTop", "flatForest", "isForest", "allNodes", "isFlat", "toBeVisited", "parents", "unProcessedNodes", "temp", "dummyNodes", "dummyNode", "dummyEdge", "k", "lEdge", "path", "ebp", "sliderValue", "defaultValue", "minDiv", "maxMul", "minValue", "maxValue", "removedNodes", "remainingDegrees", "foundCenter", "centerNode", "degree", "tempList", "tempList2", "neighbours", "neighbour", "otherDegree", "newDegree", "wox", "woy", "wex", "wey", "dox", "doy", "dex", "dey", "xDevice", "worldExtX", "yDevice", "worldExtY", "xWorld", "deviceExtX", "yWorld", "deviceExtY", "inPoint", "outPoint", "FDLayout", "originalIdealLength", "lcaDepth", "sizeOfSourceInLca", "sizeOfTargetInLca", "lEdges", "gridUpdateAllowed", "forceToNodeSurroundingUpdate", "j", "nodeA", "nodeB", "lNodes", "processedNodeSet", "idealLength", "length", "springForce", "springForceX", "springForceY", "clipPoints", "distanceX", "distanceY", "distanceSquared", "distance", "repulsionForce", "repulsionForceX", "repulsionForceY", "childrenConstant", "ownerCenterX", "ownerCenterY", "absDistanceX", "absDistanceY", "estimatedSize", "converged", "oscilating", "sizeX", "sizeY", "grid", "startX", "finishX", "startY", "finishY", "surrounding", "FDLayoutEdge", "FDLayoutNode", "_startX", "_finishX", "_startY", "_finishY", "DimensionD", "HashMap", "key", "theId", "HashSet", "keys", "Matrix", "array1", "array2", "array", "constant", "product", "magnitude", "sum", "_i", "C", "INV", "temp1", "temp2", "_i2", "_sum", "_j", "_i3", "_sum2", "_j2", "Quicksort", "A", "compareFunction", "SVD", "nu", "dims", "allocate", "e", "work", "wantu", "wantv", "nct", "nrt", "lhs", "rhs", "t", "_i4", "_i5", "_i6", "_i7", "_i8", "_t", "_i9", "_i10", "_j3", "_i11", "_k", "_j4", "_t2", "_i12", "_i13", "_i14", "_i15", "_i16", "_k2", "_j5", "_t3", "_i17", "_i18", "_i19", "pp", "iter", "eps", "tiny", "_k3", "kase", "ks", "_t4", "f", "_j6", "_t5", "cs", "sn", "_i20", "_f", "_j7", "_t6", "_cs", "_sn", "_i21", "scale", "sp", "spm1", "epm1", "sk", "ek", "shift", "_f2", "g", "_j8", "_t7", "_cs2", "_sn2", "_i22", "_i23", "_i24", "_t8", "_i25", "_i26", "NeedlemanWunsch", "sequence1", "sequence2", "match_score", "mismatch_penalty", "gap_penalty", "diag", "up", "maxOf", "indices", "inProcessAlignments", "indexes", "layoutBase", "event", "callback", "l", "data", "require_cose_base", "__commonJSMin", "exports", "module", "__name", "root", "factory", "__WEBPACK_EXTERNAL_MODULE__551__", "__webpack_modules__", "__unused_webpack_exports", "__webpack_require__", "coseBase", "FDLayoutConstants", "CoSEConstants", "prop", "FDLayoutEdge", "CoSEEdge", "source", "target", "vEdge", "LGraph", "CoSEGraph", "parent", "graphMgr", "vGraph", "LGraphManager", "CoSEGraphManager", "layout", "FDLayout", "CoSENode", "ConstraintHandler", "LayoutConstants", "Point", "PointD", "DimensionD", "Layout", "Integer", "IGeometry", "Transform", "LinkedList", "CoSELayout", "gm", "vNode", "createBendsAsNeeded", "allNodes", "intersection", "x", "forest", "gridUpdateAllowed", "forceToNodeSurroundingUpdate", "pData", "i", "rect", "id", "layoutEnded", "lNodes", "node", "self", "calculateCompoundWeight", "compoundNode", "nodes", "fixedNodeWeight", "nodeData", "nodeToDummyForVerticalAlignment", "nodeToDummyForHorizontalAlignment", "nodeId", "verticalAlignment", "horizontalAlignment", "array", "j", "constraint", "nodeIdLeft", "nodeIdRight", "nodeIdTop", "nodeIdBottom", "subGraphOnHorizontal", "subGraphOnVertical", "left", "right", "top", "bottom", "constructComponents", "graph", "fixedNodes", "components", "isFixed", "queue", "visited", "count", "value", "key", "currentNode", "neighbors", "neighbor", "resultOnHorizontal", "resultOnVertical", "fixedNode", "allVerticalAlignments", "totalDisplacementX", "averageDisplacementX", "allHorizontalAlignments", "totalDisplacementY", "averageDisplacementY", "displacement", "diff", "component", "sum", "actualNodes", "averageDisplacement", "nodeList", "graphs", "size", "edges", "edge", "edgeList", "k", "multiEdge", "currentStartingPoint", "numberOfColumns", "height", "currentY", "currentX", "point", "tree", "centerNode", "startingPoint", "radialSep", "bounds", "transform", "bottomRight", "parentOfNode", "startAngle", "endAngle", "distance", "radialSeparation", "halfInterval", "nodeAngle", "teta", "cos_teta", "x_", "y_", "neighborEdges", "childCount", "branchCount", "incEdgesCount", "startIndex", "temp", "index", "stepAngle", "currentNeighbor", "childStartAngle", "childEndAngle", "maxDiagonal", "diagonal", "tempMemberGroups", "zeroDegree", "p_id", "dummyCompoundId", "dummyCompound", "dummyParentGraph", "parentGraph", "childGraphMap", "idToNode", "tiledZeroDegreePack", "width", "lCompoundNode", "horizontalMargin", "verticalMargin", "labelMarginLeft", "labelMarginTop", "tiledPack", "childGraph", "children", "theChild", "degree", "child", "organization", "y", "compoundHorizontalMargin", "compoundVerticalMargin", "compoundLabelMarginLeft", "compoundLabelMarginTop", "row", "maxHeight", "lnode", "minWidth", "horizontalOrg", "verticalOrg", "horizontalRatio", "verticalRatio", "bestOrg", "ratio", "members", "favorHorizontalDim", "verticalPadding", "horizontalPadding", "membersSize", "totalWidth", "totalHeight", "maxWidth", "averageWidth", "averageHeight", "delta", "horizontalCountDouble", "horizontalCount", "idealWidth", "tilingCompareBy", "getNodeArea", "n", "areaCompareFcn", "n1", "n2", "cmpBy", "sumCenterX", "sumCenterY", "lNode", "rowIndex", "minCompoundSize", "secondDimension", "w", "h", "extraHeight", "r", "min", "max", "extraWidth", "lastRowIndex", "lastRowWidth", "sri", "hDiff", "add_to_row_ratio", "add_new_row_ratio", "longest", "last", "prevTotal", "finalTotal", "prunedNodesAll", "containsLeaf", "prunedNodesInStepTemp", "otherEnd", "relativePosition", "prunedNodesInStep", "lengthOfPrunedNodesInStep", "gridForPrunedNode", "nodeToConnect", "prunedNode", "startGridX", "finishGridX", "startGridY", "finishGridY", "upNodeCount", "downNodeCount", "rightNodeCount", "leftNodeCount", "controlRegions", "minCount", "minIndex", "random", "FDLayoutNode", "IMath", "loc", "dX", "dY", "pred1", "next", "processed", "_toConsumableArray", "arr", "arr2", "Matrix", "SVD", "constraints", "idToNodeMap", "nodeIndexes", "xCoords", "yCoords", "calculatePositionDiff", "pos1", "pos2", "calculateAvgPosition", "nodeIdSet", "xPosSum", "yPosSum", "findAppropriatePositionForRelativePlacement", "direction", "dummyPositions", "componentSources", "setUnion", "setA", "setB", "union", "_iteratorNormalCompletion", "_didIteratorError", "_iteratorError", "_iterator", "_step", "elem", "err", "inDegrees", "adjacent", "positionMap", "pastMap", "fixedIds", "position", "fixedId", "_position", "_loop", "fixedPosition", "sinkNodes", "_components", "isFixedComponent", "_iteratorNormalCompletion2", "_didIteratorError2", "_iteratorError2", "_iterator2", "_step2", "isExist", "existAt", "ele", "minBefore", "minAfter", "maxBefore", "maxAfter", "_iteratorNormalCompletion3", "_didIteratorError3", "_iteratorError3", "_iterator3", "_step3", "posBefore", "posAfter", "_iteratorNormalCompletion4", "_didIteratorError4", "_iteratorError4", "_iterator4", "_step4", "_nodeId", "applyReflectionForRelativePlacement", "relativePlacementConstraints", "reflectOnY", "notReflectOnY", "reflectOnX", "notReflectOnX", "_i", "_i2", "_i3", "findComponents", "_currentNode", "dagToUndirected", "dag", "undirected", "dagToReversed", "reversed", "targetMatrix", "sourceMatrix", "standardTransformation", "reflectionType", "dagUndirected", "verticalAlign", "_loop2", "_i4", "alignmentSet", "xPos", "horizontalAlign", "_loop3", "_i5", "yPos", "largestComponentSize", "largestComponentIndex", "_i6", "constraintsInlargestComponent", "positionMapHorizontal", "positionMapVertical", "transformationMatrix", "targetMatrixTranspose", "sourceMatrixTranspose", "_i7", "tempMatrix", "SVDResult", "_i8", "temp1", "temp2", "temp3", "translationAmount", "posInTheory", "posDesired", "posDiff", "xAlign", "_loop4", "_i9", "yAlign", "_loop5", "_i10", "dummyToNodeForVerticalAlignment", "dummyToNodeForHorizontalAlignment", "dummyPositionsForVerticalAlignment", "dummyPositionsForHorizontalAlignment", "fixedNodesOnHorizontal", "fixedNodesOnVertical", "_loop6", "_i11", "_loop7", "_i12", "dagOnHorizontal", "dagOnVertical", "_loop8", "sourceId", "targetNode", "_iteratorNormalCompletion5", "_didIteratorError5", "_iteratorError5", "_iterator5", "_step5", "undirectedOnHorizontal", "undirectedOnVertical", "componentsOnHorizontal", "componentsOnVertical", "reversedDagOnHorizontal", "reversedDagOnVertical", "componentSourcesOnHorizontal", "componentSourcesOnVertical", "_loop9", "_iteratorNormalCompletion6", "_didIteratorError6", "_iteratorError6", "_iterator6", "_step6", "_loop10", "_iteratorNormalCompletion7", "_didIteratorError7", "_iteratorError7", "_iterator7", "_step7", "_i13", "_node", "__webpack_module_cache__", "moduleId", "cachedModule", "__webpack_exports__", "require_cytoscape_fcose", "__commonJSMin", "exports", "module", "__name", "root", "factory", "__WEBPACK_EXTERNAL_MODULE__140__", "__webpack_modules__", "tgt", "_len", "srcs", "_key", "src", "k", "__unused_webpack_exports", "__webpack_require__", "_slicedToArray", "sliceIterator", "arr", "i", "_arr", "_n", "_d", "_e", "_i", "_s", "err", "LinkedList", "auxiliary", "nodes", "nodesMap", "roots", "ele", "parent", "cy", "eles", "topMostNodes", "dummyNodes", "queue", "visited", "visitedTopMostNodes", "currentNeighbor", "minDegreeNode", "minDegree", "isConnected", "count", "nodesConnectedToDummy", "components", "_loop", "cmpt", "currentNode", "childrenOfCurrentNode", "node", "_loop2", "neighborNodes", "neighborNode", "childrenOfNeighbor", "e", "temp", "originalCenter", "componentResult", "options", "minXCoord", "maxXCoord", "minYCoord", "maxYCoord", "_iteratorNormalCompletion", "_didIteratorError", "_iteratorError", "_iterator", "_step", "_ref", "_ref2", "key", "value", "cyNode", "nodeBB", "leftX", "rightX", "topY", "bottomY", "diffOnX", "diffOnY", "x", "y", "item", "_diffOnX", "_diffOnY", "parentNode", "xCoords", "yCoords", "nodeIndexes", "left", "right", "top", "bottom", "nodeLeft", "nodeRight", "nodeTop", "nodeBottom", "s", "boundingBox", "parentsWithoutChildren", "check", "child", "aux", "CoSELayout", "CoSENode", "PointD", "DimensionD", "LayoutConstants", "FDLayoutConstants", "CoSEConstants", "coseLayout", "spectralResult", "edges", "idToLNode", "isFn", "fn", "optFn", "opt", "processChildrenList", "children", "layout", "size", "theChild", "children_of_children", "theNode", "dimensions", "parentInfo", "theNewGraph", "processEdges", "gm", "idealLengthTotal", "edgeCount", "edge", "sourceNode", "targetNode", "e1", "processConstraints", "_createClass", "defineProperties", "target", "props", "descriptor", "Constructor", "protoProps", "staticProps", "_classCallCheck", "instance", "assign", "_require", "spectralLayout", "_require2", "defaults", "Layout", "coseResult", "componentCenters", "constraintExist", "layUtil", "packingEnabled", "component", "toBeTiledNodes", "_xCoords", "_yCoords", "tempSpectralResult", "indexesToBeDeleted", "index", "_boundingBox", "componentsEvaluated", "subgraphs", "hiddenEles", "subgraph", "nodeIndex", "source", "sourceNodeIndex", "targetNodeIndex", "sourceCenter", "targetCenter", "_parentInfo", "shiftResult", "result", "newXCoords", "newYCoords", "_count", "nodeRectangle", "getPositions", "pos", "theId", "_pos", "_hiddenEles", "Matrix", "SVD", "parentNodes", "parentChildMap", "allNodesNeighborhood", "samplesColumn", "minDistancesColumn", "C", "PHI", "INV", "firstSample", "nodeSize", "infinity", "small", "piTol", "samplingType", "nodeSeparation", "sampleSize", "randomSampleCR", "sample", "flag", "BFS", "pivot", "samplingMethod", "path", "front", "back", "current", "distance", "max_dist", "max_ind", "neighbors", "_i2", "_i3", "allBFS", "_i4", "_i5", "_i6", "j", "_i7", "_i8", "_j", "SVDResult", "a_q", "a_u", "a_v", "max_s", "a_Sig", "powerIteration", "theta1", "theta2", "Y1", "Y2", "V1", "V2", "previous", "_i9", "_i10", "_i11", "_i12", "_i13", "min", "ele2", "eleIndex", "disconnectedId", "id", "_iteratorNormalCompletion2", "_didIteratorError2", "_iteratorError2", "_iterator2", "_step2", "_i14", "_i15", "iterator", "firstNode", "firstNodePos", "firstNodeWidth", "secondNode", "secondNodeWidth", "impl", "register", "cytoscape", "__webpack_module_cache__", "moduleId", "cachedModule", "__webpack_exports__", "wrapIcon", "architectureIcons", "init_architectureIcons", "__esmMin", "init_icons", "__name", "icon", "unknownIcon", "drawEdges", "drawGroups", "drawServices", "drawJunctions", "init_svgDraw", "__esmMin", "init_icons", "init_diagramAPI", "init_createText", "init_architectureDb", "init_architectureIcons", "init_architectureTypes", "__name", "edgesEl", "cy", "padding", "getConfigField", "iconSize", "halfIconSize", "arrowSize", "halfArrowSize", "edge", "source", "sourceDir", "sourceArrow", "sourceGroup", "target", "targetDir", "targetArrow", "targetGroup", "label", "edgeData", "startX", "startY", "midX", "midY", "endX", "endY", "groupEdgeShift", "isArchitectureDirectionX", "db", "g", "xShift", "ArchitectureDirectionArrowShift", "yShift", "isArchitectureDirectionY", "ArchitectureDirectionArrow", "axis", "isArchitectureDirectionXY", "width", "textElem", "createText", "getConfig", "pair", "getArchitectureDirectionPair", "isArchitecturePairXY", "bboxOrig", "x", "y", "getArchitectureDirectionXYFactors", "bboxNew", "groupsEl", "groupIconSize", "fontSize", "node", "data", "nodeData", "w", "x1", "y1", "groupLabelContainer", "shiftedX1", "shiftedY1", "bkgElem", "getIconSVG", "architectureIcons", "elem", "services", "service", "serviceElem", "divElem", "height", "junctions", "junction", "junctionElem", "addServices", "services", "cy", "service", "getConfigField", "addJunctions", "junctions", "junction", "positionNodes", "db", "node", "data", "nodeData", "addGroups", "groups", "group", "addEdges", "edges", "parsedEdge", "lhsId", "rhsId", "lhsInto", "lhsGroup", "rhsInto", "lhsDir", "rhsDir", "rhsGroup", "title", "edgeType", "isArchitectureDirectionXY", "edge", "getAlignments", "spatialMaps", "alignments", "spatialMap", "horizontalAlignments", "verticalAlignments", "id", "x", "y", "arr", "horizontal", "vertical", "prevHoriz", "prevVert", "horiz", "vert", "getRelativeConstraints", "relativeConstraints", "posToStr", "__name", "pos", "strToPos", "p", "invSpatialMap", "queue", "visited", "directions", "curr", "currId", "currPos", "dir", "shift", "newPos", "newId", "ArchitectureDirectionName", "getOppositeArchitectureDirection", "layoutArchitecture", "resolve", "renderEl", "select_default", "cytoscape", "alignmentConstraint", "relativePlacementConstraint", "layout", "nodeA", "nodeB", "parentA", "parentB", "getSegmentWeights", "source", "target", "pointX", "pointY", "W", "D", "sX", "sY", "tX", "tY", "distAB", "delta1", "delta2", "sEP", "tEP", "sourceDir", "edgeData", "isArchitectureDirectionY", "weights", "distances", "e", "log", "import_cytoscape_fcose", "draw", "renderer", "init_architectureRenderer", "__esmMin", "init_icons", "init_cytoscape_esm", "init_src", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "init_architectureDb", "init_architectureIcons", "init_architectureTypes", "init_svgDraw", "registerIconPacks", "architectureIcons", "fcose", "text", "_version", "diagObj", "ds", "svg", "selectSvgElement", "edgesElem", "servicesElem", "groupElem", "drawServices", "drawJunctions", "drawEdges", "drawGroups", "setupGraphViewbox", "architectureDiagram_exports", "__export", "diagram", "init_architectureDiagram", "__esmMin", "init_architectureParser", "init_architectureDb", "init_architectureStyles", "init_architectureRenderer", "parser", "db", "renderer", "architectureStyles_default", "mermaid_exports", "__export", "mermaid_default", "init_icons", "init_esm", "init_detectType", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "c4Detector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "flowDetector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "flowDetector_v2_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "erDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "gitGraphDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "ganttDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "info", "id", "detector", "__name", "txt", "loader", "diagram", "pie", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "quadrantDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "xychartDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "requirementDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "sequenceDetector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "classDetector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "classDetector_V2_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "stateDetector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "stateDetector_V2_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "journeyDetector_default", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "draw", "__name", "_text", "id", "version", "log", "svg", "selectSvgElement", "g", "configureSvgSize", "renderer", "errorRenderer_default", "diagram", "renderer", "__name", "errorDiagram_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "detector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "detector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "detector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "detector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "sankeyDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "packet", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "blockDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "architecture", "architectureDetector_default", "init_detectType", "init_diagramAPI", "hasLoadedDiagrams", "addDiagrams", "__name", "registerDiagram", "errorDiagram_default", "text", "registerLazyLoadedDiagrams", "c4Detector_default", "detector_default", "classDetector_V2_default", "classDetector_default", "erDetector_default", "ganttDetector_default", "info", "pie", "requirementDetector_default", "sequenceDetector_default", "flowDetector_v2_default", "flowDetector_default", "gitGraphDetector_default", "stateDetector_V2_default", "stateDetector_default", "journeyDetector_default", "quadrantDetector_default", "sankeyDetector_default", "packet", "xychartDetector_default", "blockDetector_default", "architectureDetector_default", "init_logger", "init_detectType", "init_diagramAPI", "loadRegisteredDiagrams", "__name", "log", "failed", "detectors", "key", "detector", "loader", "getDiagram", "diagram", "id", "registerDiagram", "err", "result", "res", "init_logger", "init_src", "COMMENT", "RULESET", "DECLARATION", "IMPORT", "KEYFRAMES", "LAYER", "abs", "from", "trim", "value", "__name", "replace", "value", "pattern", "replacement", "__name", "indexof", "search", "position", "charat", "index", "substr", "begin", "end", "strlen", "sizeof", "append", "array", "line", "column", "length", "position", "character", "characters", "node", "value", "root", "parent", "type", "props", "children", "siblings", "__name", "char", "character", "__name", "prev", "position", "charat", "characters", "column", "line", "next", "length", "peek", "caret", "slice", "begin", "end", "substr", "token", "type", "alloc", "value", "strlen", "dealloc", "delimit", "trim", "delimiter", "whitespace", "type", "character", "peek", "next", "token", "__name", "escaping", "index", "count", "next", "character", "slice", "caret", "peek", "__name", "delimiter", "type", "position", "commenter", "from", "identifier", "token", "compile", "value", "dealloc", "parse", "alloc", "__name", "root", "parent", "rule", "rules", "rulesets", "pseudo", "points", "declarations", "index", "offset", "length", "atrule", "property", "previous", "variable", "scanning", "ampersand", "character", "type", "props", "children", "reference", "characters", "next", "charat", "indexof", "replace", "delimit", "abs", "whitespace", "escaping", "caret", "peek", "append", "comment", "commenter", "token", "strlen", "substr", "declaration", "ruleset", "prev", "from", "identifier", "siblings", "post", "size", "sizeof", "i", "j", "k", "x", "y", "z", "trim", "node", "RULESET", "COMMENT", "char", "DECLARATION", "serialize", "children", "callback", "output", "i", "__name", "stringify", "element", "index", "LAYER", "IMPORT", "DECLARATION", "COMMENT", "KEYFRAMES", "RULESET", "strlen", "import_dompurify", "init_isEmpty", "init_package", "SVG_ROLE", "setA11yDiagramInfo", "svg", "diagramType", "__name", "addSVGa11yTitleDescription", "a11yTitle", "a11yDesc", "baseId", "descId", "titleId", "init_assignWithDepth", "init_config", "init_config", "init_diagramAPI", "init_detectType", "init_errors", "init_utils", "Diagram", "_Diagram", "type", "text", "db", "parser", "renderer", "__name", "metadata", "config", "getConfig", "detectType", "encodeEntities", "getDiagram", "loader", "getDiagramLoader", "UnknownDiagramError", "id", "diagram", "registerDiagram", "init", "version", "init_common", "interactionFunctions", "attachFunctions", "__name", "interactionFunctions", "f", "init_logger", "cleanupComments", "__name", "text", "init_regexes", "init_js_yaml", "extractFrontMatter", "text", "matches", "frontMatterRegex", "parsed", "load", "JSON_SCHEMA", "metadata", "__name", "init_utils", "cleanupText", "__name", "code", "match", "tag", "attributes", "processFrontmatter", "text", "metadata", "extractFrontMatter", "displayMode", "title", "config", "processDirectives", "initDirective", "utils_default", "wrapDirectives", "type", "removeDirectives", "preprocessDiagram", "cleanedCode", "frontMatterResult", "directiveResult", "cleanAndMerge", "cleanupComments", "init_styles", "init_themes", "init_utils", "toBase64", "str", "utf8Bytes", "utf8Str", "byte", "__name", "MAX_TEXTLENGTH", "MAX_TEXTLENGTH_EXCEEDED_MSG", "SECURITY_LVL_SANDBOX", "SECURITY_LVL_LOOSE", "XMLNS_SVG_STD", "XMLNS_XLINK_STD", "XMLNS_XHTML_STD", "IFRAME_WIDTH", "IFRAME_HEIGHT", "IFRAME_STYLES", "IFRAME_BODY_STYLE", "IFRAME_SANDBOX_OPTS", "IFRAME_NOT_SUPPORTED_MSG", "DOMPURIFY_TAGS", "DOMPURIFY_ATTR", "processAndSetConfigs", "text", "processed", "preprocessDiagram", "reset", "addDirective", "__name", "parse", "parseOptions", "addDiagrams", "code", "config", "getDiagramFromText", "error", "cssImportantStyles", "cssClass", "element", "cssClasses", "createCssStyles", "classDefs", "cssStyles", "cssElements", "styleClassDef", "isEmpty_default", "cssElement", "s", "createUserStyles", "graphType", "svgId", "userCSSstyles", "allStyles", "styles_default", "serialize", "compile", "stringify", "cleanUpSvgCode", "svgCode", "inSandboxMode", "useArrowMarkerUrls", "cleanedUpSvg", "decodeEntities", "putIntoIFrame", "svgElement", "height", "base64encodedSrc", "toBase64", "appendDivSvgG", "parentRoot", "id", "enclosingDivId", "divStyle", "svgXlink", "enclosingDiv", "svgNode", "sandboxedIframe", "parentNode", "iFrameId", "removeExistingElements", "doc", "divId", "render", "svgContainingElement", "getConfig", "log", "idSelector", "iFrameID", "iFrameID_selector", "enclosingDivID", "enclosingDivID_selector", "removeTempElements", "node", "select_default", "isSandboxed", "root", "isLooseSecurityLevel", "fontFamily", "iframe", "diag", "parseEncounteredException", "Diagram", "diagramType", "svg", "firstChild", "diagramClassDefs", "rules", "style1", "version", "e", "errorRenderer_default", "a11yTitle", "a11yDescr", "addA11yInfo", "evaluate", "svgEl", "DOMPurify", "attachFunctions", "initialize", "userOptions", "options", "assignWithDepth_default", "saveConfigFromInitialize", "themes_default", "setSiteConfig", "getSiteConfig", "setLogLevel", "metadata", "setA11yDiagramInfo", "addSVGa11yTitleDescription", "mermaidAPI", "setConfig", "updateSiteConfig", "defaultConfig", "init_render", "init_utils", "handleError", "__name", "error", "errors", "parseError", "log", "isDetailedError", "run", "options", "runThrowsErrors", "mermaid", "postRenderCallback", "querySelector", "nodes", "conf", "mermaidAPI", "nodesToProcess", "idGenerator", "utils_default", "txt", "element", "id", "dedent", "init", "svg", "bindFunctions", "render", "initialize", "config", "callback", "runOptions", "registerExternalDiagrams", "diagrams", "lazyLoad", "addDiagrams", "registerLazyLoadedDiagrams", "loadRegisteredDiagrams", "contentLoaded", "startOnLoad", "err", "setParseErrorHandler", "parseErrorHandler", "executionQueue", "executionQueueRunning", "executeQueue", "f", "parse", "text", "parseOptions", "resolve", "reject", "performCall", "res", "rej", "r", "e", "container", "registerLayoutLoaders", "detectType", "registerIconPacks", "mermaid_default"] }